Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

  • alius
    replied
    Hi,

    It looks like your problem is related to JBoss class loading.

    SmartGWT has it's own hibernate copy and it looks like it clashes with JBoss'es one.

    Googling gives a lot of results - I haven't found a clear answer but some threads look promising:
    http://community.jboss.org/message/582843?tstart=0
    http://community.jboss.org/message/576887#576887?tstart=0

    Regards,
    Alius

    Leave a comment:


  • ClassCastException HibernatePersistence PersistenceProvider

    I am porting my existing EJB3 application contained within a .ear and an existing GWT/SmartGWT application contained within a .war to run on Jboss 6 final. Both applications ran on jboss 4.2.3 GA. The SmartGWT application called back into services from JBoss 4.2.3

    I am using SmartGWTPower 2.4

    Since the SmartGWT application calls into a JBoss services; therefore I included: jboss-service-client.jar and jboss-service-jmx-client.jar as well as utility jar from the original application. When I do this I get the following exception on deployment:

    DEPLOYMENTS IN ERROR:
    Deployment "persistence.unit:unitName=SST.war#test" is in error due to the
    following reason(s): java.lang.ClassCastException:
    org.hibernate.ejb.HibernatePersistence cannot be cast to
    javax.persistence.spi.PersistenceProvider
    at org.jboss.jpa.builder.DefaultCEMFBuilder.build(DefaultCEMFBuilder.jav
    a:46) [:1.0.2-alpha-3]
    at org.jboss.as.jpa.scanner.HackCEMFBuilder.build(HackCEMFBuilder.java:4
    9) [:6.0.0.Final]
    at org.jboss.jpa.deployment.PersistenceUnitDeployment.start(PersistenceU
    nitDeployment.java:275) [:1.0.2-alpha-3]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_1
    7]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39) [:1.6.0_17]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25) [:1.6.0_17]
    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_17]
    at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(Reflec
    tionUtils.java:60) [jboss-reflect.jar:2.2.0.GA]
    at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(
    ReflectMethodInfoImpl.java:168) [jboss-reflect.jar:2.2.0.GA]
    at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethod
    JoinPoint.java:66) [jboss-reflect.jar:2.2.0.GA]
    at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$Joi
    npointDispatchWrapper.execute(KernelControllerContextAction.java:257) [jboss-ker
    nel.jar:2.2.0.GA]
    at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(Executio
    nWrapper.java:47) [jboss-kernel.jar:2.2.0.GA]
    at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dis
    patchExecutionWrapper(KernelControllerContextAction.java:125) [jboss-kernel.jar:
    2.2.0.GA]
    at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dis
    patchJoinPoint(KernelControllerContextAction.java:72) [jboss-kernel.jar:2.2.0.GA
    ]
    at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInte
    rnal(LifecycleAction.java:202) [jboss-kernel.jar:2.2.0.GA]
    at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction
    (InstallsAwareAction.java:54) [jboss-kernel.jar:2.2.0.GA]
    at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction
    (InstallsAwareAction.java:42) [jboss-kernel.jar:2.2.0.GA]
    at org.jboss.dependency.plugins.action.SimpleControllerContextAction.sim
    pleInstallAction(SimpleControllerContextAction.java:62) [jboss-dependency.jar:2.
    2.0.GA]


    Can anyone provide any insight into why this might be happening?
Working...
X