cancel
Showing results for 
Search instead for 
Did you mean: 

NoClassDefFoundError: com/sap/util/monitor/jarm/TaskMonitor

Former Member
0 Kudos

I'm trying to call an RFC using JCo from an EJB Session Bean.

I can compile and deploy the EAR without any problems. But at runtime, at the moment I try to invoke the RFC, I get a NoClassDefFoundError (see stack trace at bottom).

The missing class can be found in the com.sap.util.monitor.jarm library, which I included as a Used DC for both my EJB DC and my EAR DC.

I also included the following fragment in the EAR project's application-j2ee-engine.xml file :


<reference reference-type="hard">
   <reference-target provider-name="sap.com" 
      target-type="library">com.sap.util.monitor.jarm</reference-target>
</reference>

These steps worked fine for another class which was also giving me a NoClassDefFoundError earlier in the process. But this time, for some reason, it doesn't seem to cut it. I keep getting that Error.

Any ideas ?

-


java.lang.NoClassDefFoundError: com/sap/util/monitor/jarm/TaskMonitor

at com.sap.mw.jco.util.Jarm.getRequestMonitor(Jarm.java:57)

at com.sap.mw.jco.JCO$Client.beginCall(JCO.java:4144)

at com.sap.mw.jco.JCO$Client.execute(JCO.java:3796)

at com.sap.mw.jco.JCO$Client.execute(JCO.java:3627)

at com.sap.mw.jco.JCO$Client.execute(JCO.java:3459)

at com.sap.aii.proxy.framework.core.JcoProxy.send(JcoProxy.java:74)

at com.sap.aii.proxy.framework.core.AbstractProxy$JcoProxyHelper.send(AbstractProxy.java:173)

at com.sap.aii.proxy.framework.core.AbstractProxy.send$(AbstractProxy.java:141)

at com.peerclo.redifax.workstation.abap.CostCenterGetList_PortType.bapi_Costcenter_Getlist1(CostCenterGetList_PortType.java:16)

at com.peerclo.redifax.workstation.ejb.session.WorkstationSessionBean.validateZone(WorkstationSessionBean.java:250)

at com.peerclo.redifax.workstation.ejb.session.WorkstationSessionLocalLocalObjectImpl0.validateZone(WorkstationSessionLocalLocalObjectImpl0.java:473)

at com.peerclo.redifax.workstation.wdp.cmdbean.WorkstationBizDelegate.validateZone(WorkstationBizDelegate.java:197)

at com.peerclo.redifax.workstation.wdp.cmdbean.WorkstationCommandBean.validateZone(WorkstationCommandBean.java:128)

at com.peerclo.redifax.workstation.wd.MaintenanceView.checkFieldFormats(MaintenanceView.java:377)

at com.peerclo.redifax.workstation.wd.MaintenanceView.onActionSearch(MaintenanceView.java:408)

at com.peerclo.redifax.workstation.wd.wdp.InternalMaintenanceView.wdInvokeEventHandler(InternalMaintenanceView.java:239)

at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87)

at com.sap.tc.webdynpro.progmodel.controller.Action.fire(Action.java:67)

at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.handleAction(WebDynproMainTask.java:101)

at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.handleActionEvent(WebDynproMainTask.java:304)

at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:649)

at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:59)

at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:248)

at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doWebDynproProcessing(DispatcherServlet.java:154)

at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:116)

at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:55)

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

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

at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)

at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)

at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)

at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)

at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)

at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)

at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)

at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)

at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)

at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)

at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)

at java.security.AccessController.doPrivileged(Native Method)

at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)

at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Does the other DC also use JCO?

I suspect that the JCO class is loaded from some used service and that that service does not have access to Jarm.

Regards,

Marc

Former Member
0 Kudos

The DC that tries to use JCO is the EJB DC (the Session Bean).

The other DC is an EAR DC with no code - it is just a Container to deploy my EJBs.

What do you mean some used service that does not have access to Jarm ?

1) The problem occurs on my local J2EE engine - I'm not aware of having deployed any other service that might try to access Jarm.

2) In my session bean, I provide username & password for connecting to JCO:


	jcoclient = JCO.createClient(  
		JCO_CLIENT,
		JCO_USER,
		JCO_PASSWORD,
		JCO_LANGUAGE,
		JCO_SERVER,
		JCO_SYSTEM);
				
	jcoclient.connect();

In the debugger, I can see that the call to connect() succeeds. It's when I actually invoke the RFC that the error gets raised.

Former Member
0 Kudos

Sorry, I misunderstood "These steps worked fine for another class which was also giving me a NoClassDefFoundError earlier in the process". I though it was in another deployable.

What I meant is: You have to have the runtime-reference in the application-j2ee-engine.xml of your EAR DC so that you can access JCO. So far so good, but now JCO tries to initialize some Jarm stuff. I'm not familiar with Jarm but either your application also needs some reference to that or the service that provides JCO needs to be able to use Jarm. (Or something is wrong with you engine installation, but that would probably be the worst case).

Regards,

Marc

Former Member
0 Kudos

If you refer to my initial posting, you'll notice that I did include a reference to the com.sap.util.monitor.jarm library in the application-j2ee-engine.xml file. I verified that this library does in fact exist under the bin/ext/ directory of my J2EE Engine.

I've searched thru SDN on this subject - to find that a few other people seemed to have experienced the same problem with the same class. The only solutions that have been suggested until now were to change the classpath to point to the correct library. However, in my case, I'm not dealing with a stand-alone java program, but rather an EJB Session Bean that gets deployed in the J2EE engine (hence, the update to application-j2ee-engine.xml). I need to make sure that whatever solution I come up with continues to work when my EJBs and EAR ultimately get deployed to our portal.