Wednesday, September 26, 2012

Re: How to use Request Factory with JPA Hibernate and PostgreSQL ?

Btw, do I have to disable App Engine ?   Actually My Project-Propertys->Google->App Engine-> Use Google App Engine is set.
Do I have to configurate jdoconfig.xml?

When i use the following persistence.xml I dont get the exception anymore, buts its still not working :(

Thats the output:
Sep 26, 2012 7:13:11 PM org.hibernate.engine.jdbc.internal.JdbcServicesImpl configure
WARN: HHH000342: Could not obtain connection to query metadata : Der Verbindungsversuch schlug fehl.

Any ideas? :/
Adding i.e.  <property name="hibernate.connection.pool_size">10</property> I get the ecxeption again.

I had already tested the connection data with a jdbc connect, so they should be right.



Thats the xml:

<?xml version="1.0" encoding="UTF-8" ?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
        http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0">

    <persistence-unit name="transactions-optional" transaction-type="RESOURCE_LOCAL">
        <provider>org.hibernate.ejb.HibernatePersistence</provider>
<!--         <class>de.mash.server.Worker</class> -->
        <properties>
              <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/>
              <property name="hibernate.connection.url" value="jdbc:postgresql://127.0.0.1:5432/dev_mash"/>
              <property name="hibernate.connection.driver_class" value="org.postgresql.Driver"/>
              <property name="hibernate.connection.username" value="postgres"/>
              <property name="hibernate.connection.password" value="m4nu3l"/>
            
        </properties>
   
    </persistence-unit>
</persistence>



Am Mittwoch, 26. September 2012 04:36:05 UTC+2 schrieb Manuel:
Hi everyone,

I want to use a postgres db with the RF JPA.
I dont know if I´m on the right way, but I thought i just have to edit the persistence.xml?


Thats what my persistence.xml look like:

<?xml version="1.0" encoding="UTF-8" ?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
        http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0">

    <persistence-unit name="transactions-optional" transaction-type="RESOURCE_LOCAL">
        <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
       
        <properties>
            <property name="jdbc.driver" value="org.postgresql.Driver" />
            <property name="jdbc.url" value="jdbc:postgresql://localhost:5432/dev_mash" />
            <property name="jdbc.user" value="postgres" />
            <property name="jdbc.password" value="q1" />
            <property name="show_sql">true</property>
            <property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
            <property name="connection.pool_size" value="10" />
            <property name="current_session_context_class" value="thread" />
        </properties>
   
    </persistence-unit>
</persistence>


I just started to work on that, so any help is much appreciated.
If you need any further information, please let me know.

Thanks in advanced.

Regards

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/L3wlMETqQlgJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment