Skip to main content

EJB 3.* with glassfish eclipse

Please note these forums are being decommissioned and use the new and improved forums at
No replies
Joined: 2010-12-20

Hello, I'm new to EJB and I want to create a small web application. I want to use jsp's for the view, servlets for the controller and EJB for the model. As IDE I downloaded GlassFish eclipse, this makes life a lot easier but I have come to think that it hides more complexity than is good for me.
I first made a dynamic webproject for the creation of a servlet "UserServlet" and a jsp to view some dummy data: And everything went smoothly, I first did it with a dummy model(created with a POJO) and left out the EJB.
After the servlet structure worked I created a second project, this time an EJB project.
business interface:
remote interface:
local interface:
I also made a jar of this and added it to the dynamic web project so I could call the EJB from the servlet and replace the old POJO model with the EJB model.
Everything is smoothly I thought but this is not the case, I'm stuck on this for a month now and the only result I seem to get is:
maandag 20 december 2010 20:58:49 Europe/Brussels [#|2010-12-20T20:59:06.730+0100|SEVERE|glassfishv3.0||_ThreadID=26;_ThreadName=Thread-1;|javax.naming.NamingException: Lookup failed for 'ejb/UserManagerBean' in SerialContext [Root exception is javax.naming.NamingException: ejb ref resolution error for remote business interfaceuser.UserManagerRemote [Root exception is java.lang.ClassNotFoundException: user.UserManagerRemote]]
at com.sun.enterprise.naming.impl.SerialContext.lookup(
at javax.naming.InitialContext.lookup(
at javax.naming.InitialContext.lookup(
at immo.user.UserServlet.init(
at javax.servlet.GenericServlet.init(
at org.apache.catalina.core.StandardWrapper.initServlet(
at org.apache.catalina.core.StandardWrapper.allocate(
at org.apache.catalina.core.StandardWrapperValve.invoke(
at org.apache.catalina.core.StandardContextValve.invoke(
at org.apache.catalina.core.StandardPipeline.invoke(
at com.sun.enterprise.web.WebPipeline.invoke(
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(
at org.apache.catalina.core.StandardHostValve.invoke(
at org.apache.catalina.connector.CoyoteAdapter.doService(
at org.apache.catalina.connector.CoyoteAdapter.service(
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(
at com.sun.grizzly.http.ProcessorTask.doProcess(
at com.sun.grizzly.http.ProcessorTask.process(
at com.sun.grizzly.http.DefaultProtocolFilter.execute(
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(
at com.sun.grizzly.DefaultProtocolChain.execute(
at com.sun.grizzly.DefaultProtocolChain.execute(
at com.sun.grizzly.http.HttpProtocolChain.execute(
at com.sun.grizzly.ProtocolChainContextTask.doCall(
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(
at com.sun.grizzly.util.AbstractThreadPool$
Caused by: javax.naming.NamingException: ejb ref resolution error for remote business interfaceuser.UserManagerRemote [Root exception is java.lang.ClassNotFoundException: user.UserManagerRemote]
at com.sun.ejb.EJBUtils.lookupRemote30BusinessObject(
at com.sun.ejb.containers.RemoteBusinessObjectFactory.getObjectInstance(
at javax.naming.spi.NamingManager.getObjectInstance(
at com.sun.enterprise.naming.impl.SerialContext.getObjectInstance(
at com.sun.enterprise.naming.impl.SerialContext.lookup(
When I fool around a bit with the lookup method I can generate another exception: classdefnotfoundexception.
Who can tell me what I'm doing wrong and how to fix it?