Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ...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 as 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 to build Hibernate SessionFactory
- at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.persistenceException(EntityManagerFactoryBuilderImpl.java:961)
- at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:891)
- at org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:58)...
- <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>
- 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;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement