The error implies that the class files are in the wrong directories in your ejb.jar, that structure should look something like:

cart-ejb.jar/
                    META-INF/ejb-jar.xml
                    cart/
                            CartBean.class
                            CartHome.class
                            Cart.class

Also, Orion stores the reference to your ejb in the JNDI context under the name you give it via the <ejb-name> tag in ejb-jar.xml file.  This is the same name you need to use when you do your JNDI lookup.  Double check that these match - I would use something simple to test(i.e. - 'cartEJB').
 

Hope this helps
-Matt
 

Derek Akers wrote:

     I am trying to access an ejb (stateful session) from a jsp using: Context initialContext = new InitialContext();
CartHome cartHome = (CartHome)javax.rmi.PortableRemoteObject.narrow(initialContext.lookup("java:comp/env/ejb/cart"),CartHome.class); where the bean is cart.CartBeanthe home interface is cart.CartHomethe remote interface is cart.Cart (cart is the package) but I keep getting the error error: File D:\orion\applications\cart\cart-web\WEB-INF\classes\CartHome.class does not contain type CartHome as expected, but type cart.CartHome. Please remove the file, or make sure it appears in the correct subdirectory of the class path.Now, I have tried putting the *.java files in classes\cart directory, but this does not work.  Does anyone have any ideas as to how to fix this problem so I can access the bean?  <jsp:useBean../>  does not work.  Are there other simple ways which I can use to access this bean?

Reply via email to