java - Unable to build Hibernate SessionFactory -
hello i'm experiencing error when trying build entitymanager hibernate.
...info | 2016-07-28 14:55:20 | [main] internal.pooledconnections (pooledconnections.java:39) - hhh000115: hibernate connection pool size: 20 (min=1) info | 2016-07-28 14:55:20 | [main] dialect.dialect (dialect.java:153) - hhh000400: using dialect: org.hibernate.dialect.postgresql95dialect info | 2016-07-28 14:55:20 | [main] internal.lobcreatorbuilderimpl (lobcreatorbuilderimpl.java:124) - hhh000424: disabling contextual lob creation createclob() method threw error : java.lang.reflect.invocationtargetexception info | 2016-07-28 14:55:20 | [main] type.basictyperegistry (basictyperegistry.java:148) - hhh000270: type registration [java.util.uuid] overrides previous : org.hibernate.type.uuidbinarytype@550a1967 exception in thread "main" javax.persistence.persistenceexception: [persistenceunit: entitymanager] unable build hibernate sessionfactory @ org.hibernate.jpa.boot.internal.entitymanagerfactorybuilderimpl.persistenceexception(entitymanagerfactorybuilderimpl.java:961) @ org.hibernate.jpa.boot.internal.entitymanagerfactorybuilderimpl.build(entitymanagerfactorybuilderimpl.java:891) @ org.hibernate.jpa.hibernatepersistenceprovider.createentitymanagerfactory(hibernatepersistenceprovider.java:58)...
my persistence xml is:
<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_2_0.xsd" version="2.0"> <persistence-unit name="entitymanager"> <provider>org.hibernate.jpa.hibernatepersistenceprovider</provider> <class>resultstorage.benchmarkresult</class> <properties> <property name="hibernate.dialect" value="org.hibernate.dialect.postgresql95dialect"/> <property name="hibernate.connection.driver_class" value="org.postgresql.driver"/> <property name="hibernate.connection.username" value="postgres"/> <property name="hibernate.connection.password" value="12345"/> <property name="hibernate.connection.url" value="jdbc:postgresql://localhost:5432/postgres"/> <property name="connection_pool_size" value="1"/> <property name="hibernate.hbm2ddl.auto" value="create"/> <property name="hibernate.format_sql" value="true"/> <property name="show_sql" value="true"/> </properties> </persistence-unit>
the annotated class im mapping is: package resultstorage;
import org.hibernate.annotations.genericgenerator; import javax.persistence.*; import javax.persistence.metamodel.basictype; import java.util.date; @entity @table(name = "benchmarkresults") public class benchmarkresult { private long id; private string usecase; private date time; private string server; private long result; public benchmarkresult(string usecase, date time, string server, long result) { this.usecase = usecase; this.time = time; this.server = server; this.result = result; } @id @column(name = "id") @generatedvalue(generator="increment") @genericgenerator(name="increment", strategy = "increment") public long getid() { return id; } @basic @column(name = "usecase") public string getusecase() { return usecase; } @temporal(temporaltype.timestamp) @column(name = "time") public date gettime() { return time; } @basic @column(name = "hostname") public string getserver() { return server; } @basic @column(name = "result") public long getresult() { return result; } public void setid(long id) { this.id = id; }
}
can me on issue? in advance!
Comments
Post a Comment