0 Replies Latest reply: Dec 11, 2012 3:09 AM by 978074 RSS

    Moving web-application from WebLogic 10.0.0 to 10.3.3 - EJB Exception

    978074
      Hello all,
      I've moved my web-application from weblogic 10.0.0 to the new platform with Weblogic 10.3.3. After this I had some JMSEceptions (unable to run JMS methods inside of servlet or EJB) and they were fixed. For now I got new exception:
      ####<07.12.2012 16:03:06 FET> <Info> <EJB> <pc-XXXXXX> <AdminServer> <[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <BEA1-00340877198035A73969> <1354885386932> <BEA-010227> <EJB Exception occurred during invocation from home or business: weblogic.ejb.container.internal.StatelessEJBHomeImpl@14df37f threw exception: javax.ejb.EJBTransactionRolledbackException: EJB Exception: : java.lang.ClassCastException: com.XXX.XXXX.XXXXXX.persistence.OperatorBean cannot be cast to com.XXX.XXXX.XXXXXX.persistence.SwitchboardBean
      at com.XXX.XXXX.XXXXXX.SwitchboardDataImpl.initialize(SwitchboardDataImpl.java:147) // itsSwitchboardBean = itsEntityManager.find(SwitchboardBean.class, switchboardNumber);
      at com.XXX.XXXX.XXXXXX.SwitchboardDataImpl.create(SwitchboardDataImpl.java:86)
      at com.XXX.XXXX.XXXXXX.SwitchboardDataEJB.create(SwitchboardDataEJB.java:64)

      persistence.xml:
      ... <persistence-unit name="xxxSwitchboard_PU" transaction-type="JTA">
      <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
      <jta-data-source>jdbc/xxSwitchboard</jta-data-source>
      <non-jta-data-source>jdbc/xxSwitchboard</non-jta-data-source>
      <class>com.XXX.XXXX.XXXXXX.switchboard.persistence.OwnerBean</class>
      <class>com.XXX.XXXX.XXXXXX.switchboard.persistence.OperatorBean</class>
      <class>com.XXX.XXXX.XXXXXX.switchboard.persistence.SwitchboardBean</class>
      <class>com.XXX.XXXX.XXXXXX.switchboard.persistence.CallBean</class>
      <exclude-unlisted-classes>false</exclude-unlisted-classes>
      </persistence-unit>...

      @Entity
      public class OperatorBean extends OwnerBean
      {
      @ManyToOne(optional = true, fetch = FetchType.EAGER)
      private SwitchboardBean switchboard;
      ....

      @Entity
      public class SwitchboardBean extends OwnerBean
      {
      @OneToMany(mappedBy = "switchboard", cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)
      private List<OperatorBean> itsOperators = new ArrayList<OperatorBean>();
      ...

      Seems that it happened due to updating weblogic version (changes in jee, jms, ejb, jpa versions?). Could you please advice me how to fix this issue?

      Thanks, Ilya