Author |
Message
|
raghavendrarao5 |
Posted: Fri Mar 14, 2008 2:21 am Post subject: [RESOLVED]java.lang.NoClassDefFoundError:com.sap.mw.jco.JCO |
|
|
Novice
Joined: 10 Jan 2008 Posts: 14
|
IBM Websphere Adapter for SAP (IBM: 6.1.0.0_IF03)
Configuration of the SAP adapter worked fine. Was able to connect to the SAP system and import the BAPI definition.
During runtime, following error was encountered:
Quote: |
SCA context:
Interaction: [invokeAsyncWithCallback,retrieveSapCustomer_GetDetailsWrapper] => {BAPI_MODULE}SAPOutboundInterface.import
Handler: com/ibm/ws/sca/internal/j2c/handler/J2CImportHandler (com.ibm.ws.sca.internal.j2c.handler.J2CImportHandler,com/ibm/wsspi/sca/extensions/ImportBindingGroup2)
Wrapped by:
com.ibm.ws.sca.uow.UOWRolledBackException: caused by: java.lang.NoClassDefFoundError: com.sap.mw.jco.JCO
at com.ibm.wsspi.sca.ejb.module.impl.ModuleSessionBean.processUOWMessage(ModuleSessionBean.java:350)
at com.ibm.wsspi.sca.ejb.module.impl.ModuleSessionBean.transactionSupportsActivitySessionSupports(ModuleSessionBean.java:262)
at com.ibm.wsspi.sca.ejb.module.EJSLocalStatelessModule_43132892.transactionSupportsActivitySessionSupports(EJSLocalStatelessModule_43132892.java:403)
at com.ibm.ws.sca.internal.uow.handler.UOWStrategyImpl.transactionAnyActivitySessionAny(UOWStrategyImpl.java:486)
at com.ibm.ws.sca.internal.uow.handler.JoinUOWHandler.processMessage(JoinUOWHandler.java:151)
at com.ibm.ws.sca.internal.message.impl.MessageDispatcherImpl.processMessage(MessageDispatcherImpl.java:1297)
at com.ibm.ws.sca.internal.message.impl.ManagedMessageImpl.process(ManagedMessageImpl.java:812)
at com.ibm.ws.sca.internal.async.impl.AbstractAsyncInboundHandler.processMessage(AbstractAsyncInboundHandler.java:117)
at com.ibm.wsspi.sca.async.bean.impl.ServiceSIBusMessageBean.processMessage(ServiceSIBusMessageBean.java:284)
at com.ibm.wsspi.sca.async.bean.impl.ServiceSIBusMessageBean.access$000(ServiceSIBusMessageBean.java:53)
at com.ibm.wsspi.sca.async.bean.impl.ServiceSIBusMessageBean$1.onMessage(ServiceSIBusMessageBean.java:77)
at com.ibm.wbiserver.manualrecovery.ejb.RecoveryMDBHandler.processMessage(RecoveryMDBHandler.java:134)
at com.ibm.wbiserver.manualrecovery.ejb.RecoveryMDBHandler.onMessage(RecoveryMDBHandler.java:82)
at com.ibm.wsspi.sca.async.bean.impl.ServiceSIBusMessageBean.onMessage(ServiceSIBusMessageBean.java:134)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at com.ibm.ejs.container.MessageEndpointHandler.invokeMdbMethod(MessageEndpointHandler.java:1018)
at com.ibm.ejs.container.MessageEndpointHandler.invoke(MessageEndpointHandler.java:747)
at $Proxy10.onMessage(Unknown Source)
at com.ibm.ws.sib.ra.inbound.impl.SibRaEndpointInvokerImpl.invokeEndpoint(SibRaEndpointInvokerImpl.java:156)
at com.ibm.ws.sib.ra.inbound.impl.SibRaDispatcher.dispatch(SibRaDispatcher.java:768)
at com.ibm.ws.sib.ra.inbound.impl.SibRaSingleProcessListener$SibRaWork.run(SibRaSingleProcessListener.java:584)
at com.ibm.ejs.j2c.work.WorkProxy.run(WorkProxy.java:419)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
Caused by: java.lang.NoClassDefFoundError: com.sap.mw.jco.JCO
at com.ibm.j2ca.sap.SAPConnectionProperties.run(SAPConnectionProperties.java:35)
at java.security.AccessController.doPrivileged(AccessController.java:197)
at com.ibm.j2ca.sap.SAPManagedConnection.getSAPJCOConnection(SAPManagedConnection.java:600)
at com.ibm.j2ca.sap.SAPManagedConnection.getWBIConnection(SAPManagedConnection.java:303)
at com.ibm.j2ca.base.WBIManagedConnection.getConnection(WBIManagedConnection.java:263)
at com.ibm.ejs.j2c.MCWrapper.getConnection(MCWrapper.java:1973)
at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:605)
at com.ibm.j2ca.base.WBIConnectionFactory.getConnection(WBIConnectionFactory.java:74)
at com.ibm.ws.sca.internal.j2c.J2CInterfaceBindingImpl.invoke(J2CInterfaceBindingImpl.java:114)
at com.ibm.ws.sca.internal.j2c.handler.J2CImportHandler.invokeDynamicImport(J2CImportHandler.java:982)
at com.ibm.ws.sca.internal.j2c.handler.J2CImportHandler.processMessage(J2CImportHandler.java:338)
at com.ibm.ws.sca.internal.message.impl.MessageDispatcherImpl.processMessage(MessageDispatcherImpl.java:1297)
at com.ibm.ws.sca.internal.message.impl.ManagedMessageImpl.process(ManagedMessageImpl.java:812)
at com.ibm.wsspi.sca.ejb.module.impl.ModuleSessionBean.processUOWMessage(ModuleSessionBean.java:338)
|
Tried setting the CLASSPATH for "sapjco.jar" in:
1. Server environment
2. WPS startup (setUpCmdLine.bat).
Still the error persists...Any pointers would be helpful...
Thanks,
Raghavendra.
Last edited by raghavendrarao5 on Thu Mar 20, 2008 5:59 am; edited 1 time in total |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Mar 14, 2008 2:17 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Did you set the libpath to the SAP jco directory? The sapjco.jar is only one of the components used to access SAP. You still need a native lib and it usually in the same directory...
Was you sapjco.jar defined in an absolute or relative path?
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
raghavendrarao5 |
Posted: Sat Mar 15, 2008 4:01 am Post subject: |
|
|
Novice
Joined: 10 Jan 2008 Posts: 14
|
I set the system CLASSPATH variable to the absolute path for sapjco.jar.
I also tried adding the same path in setUpCmdLine.bat -> the WPS startup script.
Still the issue persists -> sapjco.jar is not getting picked up. Any pointers on where to set the path for sapjco.jar..?  |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Mar 15, 2008 6:41 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
How about making sure the adapter framework picks it up? _________________ MQ & Broker admin |
|
Back to top |
|
 |
raghavendrarao5 |
Posted: Mon Mar 17, 2008 1:35 am Post subject: |
|
|
Novice
Joined: 10 Jan 2008 Posts: 14
|
The adapter framework also has the path updated (in the".classpath" file).
Outbound interface component causes this issue:
Quote: |
SCA context:
Interaction: [invokeAsyncWithCallback,retrieveSapCustomer_GetDetailsWrapper] => {BAPI_MODULE}SAPOutboundInterface.import
Handler: com/ibm/ws/sca/internal/j2c/handler/J2CImportHandler (com.ibm.ws.sca.internal.j2c.handler.J2CImportHandler,com/ibm/wsspi/sca/extensions/ImportBindingGroup2)
Wrapped by:
com.ibm.ws.sca.uow.UOWRolledBackException: caused by: java.lang.NoClassDefFoundError: com.sap.mw.jco.JCO
|
|
|
Back to top |
|
 |
raghavendrarao5 |
Posted: Thu Mar 20, 2008 5:57 am Post subject: [RESOLVED] java.lang.NoClassDefFoundError:com.sap.mw.jco.JCO |
|
|
Novice
Joined: 10 Jan 2008 Posts: 14
|
One step further ...the sapjco.jar path got recognized after the following changes:
1. sapjco.jar added separately under the runtime classpath -> C:\Program Files\IBM\WID61\runtimes\bi_v61\lib\sapjco.jar (this is to be added manually)
2. setUpcmdLine.bat modified (under C:\Program Files\IBM\WID61\runtimes\bi_v61\bin) setting WAS_CLASSPATH = %WAS_CLASSPATH%;C:\Program Files\IBM\WID61\runtimes\bi_v61\lib\sapjco.jar
I now encountered a different error - "Customer id does not exist in SAP database"...earlier issue got resolved...
Thank you for the input, fjb_saper. |
|
Back to top |
|
 |
|