The Artima Developer Community
Sponsored Link

Java Answers Forum
Orionserver ClassLoad issue

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
behemot behemot

Posts: 1
Nickname: behemot
Registered: Jun, 2002

Orionserver ClassLoad issue Posted: Jun 16, 2002 10:34 AM
Reply to this message Reply
Advertisement
Im using an Orion application srever, and i have the following problem:
I have created an entity EJB called Booking. And i'm trying to get access to it from a JSP by using custom tags. I manage to load the EntityWrapper in the Tag class but when i try to narrow this to type of EJB that is specified from the JSP i get a classNotFoundException. The code causing this is:
ClassLoader classLoader = pageContext.getPage().getClass().getClassLoader();
object = (EJBObject) javax.rmi.PortableRemoteObject.narrow(instance, Class.forName(type, true, classLoader))
Here 'type' is specified from the JSP, and 'instance' is the EntityWrapper for the EJB provided by the Orion container.
Obviously the problem is with the classLoader, cause when i replace the 2:nd argument in narrow() by a static reference to the EJB class it works. To be honest i dont really know how the ClassLoader works. Does anyone know what im doing wrong, or how i can get the classLoader to find the Class im looking for?

Topic: Jump and Skip Program(Does Not Work) Previous Topic   Next Topic Topic: Garbage Collection of Remote Objects

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use