• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem with JNDI lookup in Glassfish V3

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I got the application that works correctly on Glassfish V2, however when I try to migrate it to Glassfish V3 i have following exception:

javax.naming.CommunicationException: Can't find SerialContextProvider [Root exception is java.lang.ClassCastException]
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:164)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:409)
at javax.naming.InitialContext.lookup(InitialContext.java:409)
at com.jmwrti.timetableserver.TimetableHandler.getTimetableImportDAO(TimetableHandler.java:66)
Caused by: java.lang.ClassCastException
at com.sun.corba.ee.impl.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:258)
at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:153)
at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:136)
at com.sun.enterprise.naming.SerialContext.getCachedProvider(SerialContext.java:259)
at com.sun.enterprise.naming.SerialContext.getRemoteProvider(SerialContext.java:204
Caused by: java.lang.ClassCastException: Object is not of remote type com.sun.enterprise.naming.SerialContextProvider
at com.sun.corba.ee.impl.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:250)

Here is the method that do the lookup:


Here is the the interface:

The bean:


I really dont understand why this is not working on Glassfish V3. I tried to remove the narrow method but the exception is still appearing. I am newbe to Glassfish and EJB so any help would be appreciated.

Thanks,
Kamila
 
Ranch Hand
Posts: 754
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What if you try with "TimetableImportBean" only? Or "TimetableImportRemote" without the full path?
 
Kamila Jolan
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hebert, thanks for answer, I still tried that but I still have that error.
 
Hebert Coelho
Ranch Hand
Posts: 754
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could you do another test?

 
Kamila Jolan
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Hebert

I managed to get this working. I had forgot to create the JNDI entries for the JMS resource in Glassfish. Thanks for your help.
 
Look ma! I'm selling my stuff!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic