Non-application exception occurred while processing method

Hi friends,

I am using WSAD 5.1.1 in windows environament. I have a stateless sessionbean having textFileCreator() method in EJBProject that uses a java class ELUWS14 having a method eluws14() which returns a HashMap. This class is in WebProject. I am getting the following error while invoking the Stateless Session bean.

Could any One help me.

Advance thanks.

[9/6/06 12:42:08:500 IST] 5145b290 ExceptionUtil E CNTR0020E: Non-application exception occurred while processing method "txtFileCreator" on bean "BeanId(DefaultEAR#ProtoMVC2EJB.jar#XMLDomReader, null)". Exception data: java.lang.NoClassDefFoundError: com/sound/delegator/service/message/ELUWS14

at com.sound.bean.XMLDomReader.txtFileCreator(XMLDomR eader.java:75)

at com.sound.bean.EJSRemoteStatelessXMLDomReader_ac07 dc27.txtFileCreator(EJSRemoteStatelessXMLDomReader _ac07dc27.java:22)

at com.sound.bean._XMLDomReaderRemote_Stub.txtFileCre ator(_XMLDomReaderRemote_Stub.java:255)

at com.sound.delegator.service.message.MessageRequest orDelegator.load(MessageRequestorDelegator.java:18 2)

at com.sound.delegator.service.message.MessageRequest orDelegator.process(MessageRequestorDelegator.java :106)

at com.sound.controller.TaskController.executeTask(Ta skController.java:108)

at com.sound.controller.SDRControlServlet.performTask (SDRControlServlet.java:143)

at com.sound.controller.SDRControlServlet.doPost(SDRC ontrolServlet.java:83)

at javax.servlet.http.HttpServlet.service(HttpServlet .java:760)

at javax.servlet.http.HttpServlet.service(HttpServlet .java:853)

at com.ibm.ws.webcontainer.servlet.StrictServletInsta nce.doService(StrictServletInstance.java:110)

at com.ibm.ws.webcontainer.servlet.StrictLifecycleSer vlet._service(StrictLifecycleServlet.java:174)

at com.ibm.ws.webcontainer.servlet.IdleServletState.s ervice(StrictLifecycleServlet.java:313)

at com.ibm.ws.webcontainer.servlet.StrictLifecycleSer vlet.service(StrictLifecycleServlet.java:116)

at com.ibm.ws.webcontainer.servlet.ServletInstance.se rvice(ServletInstance.java:283)

at com.ibm.ws.webcontainer.servlet.ValidServletRefere nceState.dispatch(ValidServletReferenceState.java: 42)

at com.ibm.ws.webcontainer.servlet.ServletInstanceRef erence.dispatch(ServletInstanceReference.java:40)

at com.ibm.ws.webcontainer.webapp.WebAppRequestDispat cher.handleWebAppDispatch(WebAppRequestDispatcher. java:974)

at com.ibm.ws.webcontainer.webapp.WebAppRequestDispat cher.dispatch(WebAppRequestDispatcher.java:555)

at com.ibm.ws.webcontainer.webapp.WebAppRequestDispat cher.forward(WebAppRequestDispatcher.java:200)

at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForwar d(WebAppInvoker.java:119)

at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleIn vocationHook(WebAppInvoker.java:276)

at com.ibm.ws.webcontainer.cache.invocation.CachedInv ocation.handleInvocation(CachedInvocation.java:71)

at com.ibm.ws.webcontainer.srp.ServletRequestProcesso r.dispatchByURI(ServletRequestProcessor.java:182)

at com.ibm.ws.webcontainer.oselistener.OSEListenerDis patcher.service(OSEListener.java:334)

at com.ibm.ws.webcontainer.http.HttpConnection.handle Request(HttpConnection.java:56)

at com.ibm.ws.http.HttpConnection.readAndHandleReques t(HttpConnection.java:618)

at com.ibm.ws.http.HttpConnection.run(HttpConnection. java:439)

at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.j ava:593)

[3521 byte] By [anand7504a] at [2007-10-3 4:21:57]
# 1

Since you want to use a class that is not part of your EJB environment you cant access it.

Like you said your ELUWS14 class is part of your web project, most likely to be inside a war. And the session bean inside an ear.

If you need that class on both environments (session beans and web components) the best approach is to create a JAR file and include it there. If it is going to change a lot then the best approach is to have it on your ear (EJB side), and your web components should call the session beans method to invoke operations.

Your business rules should not access your presentation layer:

EJB -> Web componentsNot a good idea

EJB <-> Web componentsNot a good idea

EJB <- Web componentsThis is the way to go

So, web components should access classes from the ear, and not viceversa. This is why containers make ear classes accesible to web component, and not in the other way

aranzugliaa at 2007-7-14 22:24:13 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2
Thank u Mr.aranzuglia for your help. The solution what u suggested worked fine. Thank u once againwith regards,S. Anand Mohan
anand7504a at 2007-7-14 22:24:13 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...