2016-05-30 14 views
1

Wenn ich meine WAR-Datei in wildfly9.0 deploy, bekomme ich folgenden Fehler; Irgendeine Ahnung?java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl kann nicht in java.lang.Class umgewandelt werden

Hibernate version = 5.0.1.Final

Hibernate Validator version = 5.2.1.Final

09:57:34,368 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 64) MSC000001: Failed to start service jboss.persistenceunit."test2dbwar.war#test2dbwar-persistence-unit": org.jboss.msc.service.StartException in service jboss.persistenceunit."test2dbwar.war#test2dbwar-persistence-unit": java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl cannot be cast to java.lang.Class 
    at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:172) 
    at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:117) 
    at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:665) 
    at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:182) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
    at java.lang.Thread.run(Thread.java:745) 
    at org.jboss.threads.JBossThread.run(JBossThread.java:320) 
Caused by: java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl cannot be cast to java.lang.Class 
    at org.hibernate.cfg.AttributeConverterDefinition.<init>(AttributeConverterDefinition.java:67) 
    at org.hibernate.cfg.Configuration.addAttributeConverter(Configuration.java:2729) 
    at org.hibernate.cfg.Configuration.addAttributeConverter(Configuration.java:2673) 
    at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.buildHibernateConfiguration(EntityManagerFactoryBuilderImpl.java:1153) 
    at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:853) 
    at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:850) 
    at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:425) 
    at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:849) 
    at org.jboss.as.jpa.hibernate4.TwoPhaseBootstrapImpl.build(TwoPhaseBootstrapImpl.java:44) 
    at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:154) 
    ... 7 more 

09:57:34,381 ERROR [org.jboss.as.controller.management-operation] (XNIO-1 task-9) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "test2dbwar.war")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.persistenceunit.\"test2dbwar.war#test2dbwar-persistence-unit\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"test2dbwar.war#test2dbwar-persistence-unit\": java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl cannot be cast to java.lang.Class 
    C 

Antwort

0

Wildfly 9 des Hibernate enthalten Version What versions of libraries are shipped with WildFly 9.0.1.Final Wahrscheinlich nicht 5. Sehen Sie ist, dass Sie die verwenden Korrigieren Sie die Version oder schließen Sie die Bibliotheken der Server mit jboss-deployment-structure.xml aus. Oder versuchen Sie Wildfly 10, das enthält Hibernate 5.

+0

Es sieht Versionen sind ähnlich. Ich habe mehr als 50 Modelle und versuche, sie zu speichern. Es hat gut funktioniert und plötzlich taucht dieses Problem auf – Ratha