TOPIC: Beim Start Servlet 9 von 10 Mal PersistenceExcepti
5 months 3 weeks ago #1260
Hallo, beim "Start Servlet" 9 von 10 Mal bekome ich
javax.persistence.PersistenceException: [PersistenceUnit: MyProject] Unable to build Hibernate SessionFactory
.
Ich würde Euch sehr dankbar, wenn Ihr mir eine Lösung vorschlagen könnten!
Beste Grüße,
Leo
HHH010002: C3P0 using driver: org.gjt.mm.mysql.Driver at URL: jdbc:mysql://localhost:3306/myprogram
HHH10001001: Connection properties: {user=admin, password=****}
HHH10001003: Autocommit mode: false
Initializing c3p0-0.9.5.2 [built 08-December-2015 22:06:04 -0800; debug? true; trace: 10]
HHH10001007: JDBC isolation level: <unknown>
HHH10001007: JDBC isolation level: <unknown>
Initializing c3p0 pool... com.mchange.v2.c3p0.PoolBackedDataSource@4ed963e [ connectionPoolDataSource -> com.mchange.v2.c3p0.WrapperConnectionPoolDataSource@4f53226 [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, contextClassLoaderSource -> caller, debugUnreturnedConnectionStackTraces -> false, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, forceSynchronousCheckins -> false, identityToken -> 1hgeby99s139334wjedw0q|fb07116, idleConnectionTestPeriod -> 300, initialPoolSize -> 1, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 3000, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 100, maxStatements -> 50, maxStatementsPerConnection -> 0, minPoolSize -> 1, nestedDataSource -> com.mchange.v2.c3p0.DriverManagerDataSource@3c6649f3 [ description -> null, driverClass -> null, factoryClassLocation -> null, forceUseNamedDriverClass -> false, identityToken -> 1hgeby99s139334wjedw0q|3b937d40, jdbcUrl -> jdbc:mysql://localhost:3306/myprogram, properties -> {user=******, password=******} ], preferredTestQuery -> null, privilegeSpawnedThreads -> false, propertyCycle -> 0, statementCacheNumDeferredCloseThreads -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false; userOverrides: {} ], dataSourceName -> null, extensions -> {}, factoryClassLocation -> null, identityToken -> 1hgeby99s139334wjedw0q|12146416, numHelperThreads -> 3 ]
Initializing c3p0 pool... com.mchange.v2.c3p0.PoolBackedDataSource@4e6025f7 [ connectionPoolDataSource -> com.mchange.v2.c3p0.WrapperConnectionPoolDataSource@d718d54d [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, contextClassLoaderSource -> caller, debugUnreturnedConnectionStackTraces -> false, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, forceSynchronousCheckins -> false, identityToken -> 1hgeby99s139334wjedw0q|1c96749e, idleConnectionTestPeriod -> 300, initialPoolSize -> 1, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 3000, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 100, maxStatements -> 50, maxStatementsPerConnection -> 0, minPoolSize -> 1, nestedDataSource -> com.mchange.v2.c3p0.DriverManagerDataSource@160c2867 [ description -> null, driverClass -> null, factoryClassLocation -> null, forceUseNamedDriverClass -> false, identityToken -> 1hgeby99s139334wjedw0q|20ed560, jdbcUrl -> jdbc:mysql://localhost:3306/myprogram, properties -> {user=******, password=******} ], preferredTestQuery -> null, privilegeSpawnedThreads -> false, propertyCycle -> 0, statementCacheNumDeferredCloseThreads -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false; userOverrides: {} ], dataSourceName -> null, extensions -> {}, factoryClassLocation -> null, identityToken -> 1hgeby99s139334wjedw0q|1a199f8a, numHelperThreads -> 3 ]
HHH000400: Using dialect: org.hibernate.dialect.MySQL57InnoDBDialect
HHH000400: Using dialect: org.hibernate.dialect.MySQL57InnoDBDialect
Envers integration enabled? : true
Envers integration enabled? : true
Starting 16 Services...
Starting service
All Services successfully started, 16 Services in 20ms
Moving from UNINITIALIZED to AVAILABLE
Initialize successful.
Using default Copier for JSR-107 store-by-value cache org.hibernate.cache.spi.UpdateTimestampsCache
Creating Cache 'org.hibernate.cache.spi.UpdateTimestampsCache' in Eh107InternalCacheManager.
Serializer for <java.lang.Object> : org.ehcache.impl.serialization.PlainJavaSerializer@21d451a
Serializer for <java.lang.Object> : org.ehcache.impl.serialization.PlainJavaSerializer@76c81f37
Copier for <java.lang.Object> : org.ehcache.impl.copy.SerializingCopier@3ff67282
Copier for <java.lang.Object> : org.ehcache.impl.copy.SerializingCopier@31cfd7bf
Cache added org.hibernate.cache.spi.UpdateTimestampsCache
Cache 'org.hibernate.cache.spi.UpdateTimestampsCache' created in Eh107InternalCacheManager.
Using default Copier for JSR-107 store-by-value cache org.hibernate.cache.spi.UpdateTimestampsCache
Creating Cache 'org.hibernate.cache.spi.UpdateTimestampsCache' in Eh107InternalCacheManager.
HHH000250: Starting update timestamps cache at region: org.hibernate.cache.spi.UpdateTimestampsCache
Using default Copier for JSR-107 store-by-value cache org.hibernate.cache.internal.StandardQueryCache
Creating Cache 'org.hibernate.cache.internal.StandardQueryCache' in Eh107InternalCacheManager.
Serializer for <java.lang.Object> : org.ehcache.impl.serialization.PlainJavaSerializer@52aff83b
Serializer for <java.lang.Object> : org.ehcache.impl.serialization.PlainJavaSerializer@70bfa915
Copier for <java.lang.Object> : org.ehcache.impl.copy.SerializingCopier@27bcf72a
Copier for <java.lang.Object> : org.ehcache.impl.copy.SerializingCopier@67e53528
Cache added org.hibernate.cache.internal.StandardQueryCache
Cache 'org.hibernate.cache.internal.StandardQueryCache' created in Eh107InternalCacheManager.
HHH000248: Starting query cache at region: org.hibernate.cache.internal.StandardQueryCache
HV000001: Hibernate Validator 5.4.0.Final
Using default Copier for JSR-107 store-by-value cache org.myorg.myproject.entities.User
Creating Cache 'org.myorg.myproject.entities.User' in Eh107InternalCacheManager.
Serializer for <java.lang.Object> : org.ehcache.impl.serialization.PlainJavaSerializer@90a5ca4
Serializer for <java.lang.Object> : org.ehcache.impl.serialization.PlainJavaSerializer@3b9379e
Copier for <java.lang.Object> : org.ehcache.impl.copy.SerializingCopier@15f19636
Copier for <java.lang.Object> : org.ehcache.impl.copy.SerializingCopier@6deee5f5
Cache added org.myorg.myproject.entities.User
Cache 'org.myorg.myproject.entities.User' created in Eh107InternalCacheManager.
Exception in thread "Thread-4" javax.persistence.PersistenceException: [PersistenceUnit: MyProject] Unable to build Hibernate SessionFactory
	at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.persistenceException(EntityManagerFactoryBuilderImpl.java:967)
	at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:892)
	at org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:58)
	at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:55)
	at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:39)
	at com.xdev.persistence.EntityManagerFactoryProvider$Default.createEntityManagerFactory(EntityManagerFactoryProvider.java:52)
	at com.xdev.persistence.PersistenceManager$Implementation.getEntityManagerFactory(PersistenceManager.java:212)
	at com.xdev.communication.SessionStrategy$PerRequest.requestStart(SessionStrategy.java:64)
	at com.xdev.communication.RunnableAccessWrapper.run(RunnableAccessWrapper.java:76)
	at java.lang.Thread.run(Thread.java:748)
Caused by: org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.spi.CacheImplementor]
	at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:271)
	at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:233)
	at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:210)
	at org.hibernate.service.internal.SessionFactoryServiceRegistryImpl.getService(SessionFactoryServiceRegistryImpl.java:77)
	at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:240)
	at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:445)
	at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:889)
	... 8 more
Caused by: javax.cache.CacheException: A Cache named [org.hibernate.cache.spi.UpdateTimestampsCache] already exists
	at org.ehcache.jsr107.Eh107CacheManager.createCache(Eh107CacheManager.java:188)
	at org.hibernate.cache.jcache.JCacheRegionFactory.createCache(JCacheRegionFactory.java:204)
	at org.hibernate.cache.jcache.JCacheRegionFactory.getOrCreateCache(JCacheRegionFactory.java:190)
	at org.hibernate.cache.jcache.JCacheRegionFactory.buildTimestampsRegion(JCacheRegionFactory.java:141)
	at org.hibernate.cache.spi.RegionFactory.buildTimestampsRegion(RegionFactory.java:261)
	at org.hibernate.internal.CacheImpl.<init>(CacheImpl.java:78)
	at org.hibernate.engine.spi.CacheInitiator.initiateService(CacheInitiator.java:28)
	at org.hibernate.engine.spi.CacheInitiator.initiateService(CacheInitiator.java:20)
	at org.hibernate.service.internal.SessionFactoryServiceRegistryImpl.initiateService(SessionFactoryServiceRegistryImpl.java:58)
	at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:259)
	... 14 more
Caused by: org.ehcache.jsr107.MultiCacheException: [Exception 0] Cache 'org.hibernate.cache.spi.UpdateTimestampsCache' already exists
	at org.ehcache.jsr107.Eh107CacheManager.createCache(Eh107CacheManager.java:186)
	... 23 more
The administrator has disabled public write access.