Advertisement
Guest User

Untitled

a guest
Jul 28th, 2016
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.39 KB | None | 0 0
  1. ...INFO | 2016-07-28 14:55:20 | [main] internal.PooledConnections (PooledConnections.java:39) - HHH000115: Hibernate connection pool size: 20 (min=1)
  2. INFO | 2016-07-28 14:55:20 | [main] dialect.Dialect (Dialect.java:153) - HHH000400: Using dialect: org.hibernate.dialect.PostgreSQL95Dialect
  3. 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
  4. 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
  5. Exception in thread "main" javax.persistence.PersistenceException: [PersistenceUnit: entityManager] Unable to build Hibernate SessionFactory
  6. at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.persistenceException(EntityManagerFactoryBuilderImpl.java:961)
  7. at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:891)
  8. at org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:58)...
  9.  
  10. <persistence xmlns="http://java.sun.com/xml/ns/persistence"
  11. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  12. xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
  13. version="2.0">
  14. <persistence-unit name="entityManager">
  15. <provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
  16. <class>resultstorage.BenchmarkResult</class>
  17. <properties>
  18. <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQL95Dialect"/>
  19. <property name="hibernate.connection.driver_class" value="org.postgresql.Driver"/>
  20. <property name="hibernate.connection.username" value="postgres"/>
  21. <property name="hibernate.connection.password" value="12345"/>
  22. <property name="hibernate.connection.url" value="jdbc:postgresql://localhost:5432/postgres"/>
  23. <property name="connection_pool_size" value="1"/>
  24. <property name="hibernate.hbm2ddl.auto" value="create"/>
  25. <property name="hibernate.format_sql" value="true"/>
  26. <property name="show_sql" value="true"/>
  27. </properties>
  28. </persistence-unit>
  29.  
  30. import org.hibernate.annotations.GenericGenerator;
  31.  
  32. import javax.persistence.*;
  33. import javax.persistence.metamodel.BasicType;
  34. import java.util.Date;
  35.  
  36. @Entity
  37. @Table(name = "BenchmarkResults")
  38. public class BenchmarkResult {
  39. private long id;
  40. private String usecase;
  41. private Date time;
  42. private String server;
  43. private long result;
  44.  
  45. public BenchmarkResult(String usecase, Date time, String server, long result) {
  46. this.usecase = usecase;
  47. this.time = time;
  48. this.server = server;
  49. this.result = result;
  50. }
  51.  
  52. @Id
  53. @Column(name = "ID")
  54. @GeneratedValue(generator="increment")
  55. @GenericGenerator(name="increment", strategy = "increment")
  56. public long getId() {
  57. return id;
  58. }
  59.  
  60. @Basic
  61. @Column(name = "USECASE")
  62. public String getUsecase() {
  63. return usecase;
  64. }
  65.  
  66. @Temporal(TemporalType.TIMESTAMP)
  67. @Column(name = "TIME")
  68. public Date getTime() {
  69. return time;
  70. }
  71.  
  72. @Basic
  73. @Column(name = "HOSTNAME")
  74. public String getServer() {
  75. return server;
  76. }
  77.  
  78. @Basic
  79. @Column(name = "RESULT")
  80. public long getResult() {
  81. return result;
  82. }
  83.  
  84. public void setId(long id) {
  85. this.id = id;
  86. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement