0 Replies Latest reply on May 16, 2008 11:43 AM by 666705

    ClassCastException: weblogic.jndi.Alias when using multiple JNDI names

    666705
      Weblogic 10 MP1 under Windows XP SP3, Sun JDK 1.5.0_14

      I have specified specified multiple JNDI names for a datasource. When I'm trying to use that datasource, a ClassCastException: weblogic.jndi.Alias is thrown. So it seems that an instance of Alias is returned instead of a DataSource. What am I doing wrong? I'm using toplink essentials as persistence provider.

      Stack trace:
      java.lang.ClassCastException: weblogic.jndi.Alias
           at oracle.toplink.essentials.jndi.JNDIConnector.connect(JNDIConnector.java:129)
           at oracle.toplink.essentials.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:184)
           at oracle.toplink.essentials.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:582)
           at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:280)
           at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:229)
           at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:93)
           at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:126)
           at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:120)
           at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:91)