1 Reply Latest reply on May 4, 2015 11:13 PM by lylewang

    Internal Exception: java.lang.ClassCastException: com.test.cm.CMSessionCustomizer      cannot be cast to org.eclipse.persistence.config.SessionCustomizer

    muraliguttha

      13:50:26,236 INFO  [stdout] (http-/0.0.0.0:8080-3) [EL Severe]: 2015-05-04 13:50:26.236--ServerSession(2084917225)--Thread(Thread[http-/0.0.0.0:8080-3,5,main])--Local Exception Stack:

      13:50:26,246 INFO  [stdout] (http-/0.0.0.0:8080-3) Exception [EclipseLink-28014] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.EntityManagerSetupException

      13:50:26,246 INFO  [stdout] (http-/0.0.0.0:8080-3) Exception Description: Exception was thrown while processing property [eclipselink.session.customizer] with value [com.test.cm.CMSessionCustomizer].

      13:50:26,246 INFO  [stdout] (http-/0.0.0.0:8080-3) Internal Exception: java.lang.ClassCastException: com.test.cm.CMSessionCustomizer cannot be cast to org.eclipse.persistence.config.SessionCustomizer

      13:50:26,246 INFO  [stdout] (http-/0.0.0.0:8080-3) at org.eclipse.persistence.exceptions.EntityManagerSetupException.failedWhileProcessingProperty(EntityManagerSetupException.java:189)

      13:50:26,256 INFO  [stdout] (http-/0.0.0.0:8080-3) at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.processSessionCustomizer(EntityManagerSetupImpl.java:1969)

      13:50:26,256 INFO  [stdout] (http-/0.0.0.0:8080-3) at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.updateSession(EntityManagerSetupImpl.java:1935)

      13:50:26,256 INFO  [stdout] (http-/0.0.0.0:8080-3) at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:455)

      13:50:26,266 INFO  [stdout] (http-/0.0.0.0:8080-3) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getDatabaseSession(EntityManagerFactoryDelegate.java:188)

      13:50:26,266 INFO  [stdout] (http-/0.0.0.0:8080-3) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:277)

      13:50:26,266 INFO  [stdout] (http-/0.0.0.0:8080-3) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:290)

      13:50:26,266 INFO  [stdout] (http-/0.0.0.0:8080-3) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:268)

      13:50:26,276 INFO  [stdout] (http-/0.0.0.0:8080-3) at org.jboss.as.jpa.container.EntityManagerUtil.createEntityManager(EntityManagerUtil.java:44)

      13:50:26,276 INFO  [stdout] (http-/0.0.0.0:8080-3) at org.jboss.as.jpa.transaction.TransactionUtil.getOrCreateTransactionScopedEntityManager(TransactionUtil.java:114)

      13:50:26,276 INFO  [stdout] (http-/0.0.0.0:8080-3) at org.jboss.as.jpa.container.TransactionScopedEntityManager.getEntityManager(TransactionScopedEntityManager.java:73)

      13:50:26,286 INFO  [stdout] (http-/0.0.0.0:8080-3) at org.jboss.as.jpa.container.AbstractEntityManager.createQuery(AbstractEntityManager.java:424)

      ---

      ---

      13:50:26,576 INFO  [stdout] (http-/0.0.0.0:8080-3) Caused by: java.lang.ClassCastException: com.test.cm.CMSessionCustomizer cannot be cast to org.eclipse.persistence.config.SessionCustomizer

      13:50:26,586 INFO  [stdout] (http-/0.0.0.0:8080-3) at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.processSessionCustomizer(EntityManagerSetupImpl.java:1966)

      13:50:26,586 INFO  [stdout] (http-/0.0.0.0:8080-3) ... 146 more

       

      my persistence.xml has entry

      <property name="eclipselink.session.customizer" value="com.test.cm.CMSessionCustomizer"/>

       

      Not able to understand what was the issue. Any suggestions.