BSCS Adapter

We have a package “OTechBscsCasAdapter” which an adapter for BSCS. It was developped with WebMethods 6.1. We installed WebMethods 6.5 and we try do the migration for that package (the package was re-compiled). At the loading time of the package we always have the same error for the 2 services of the package (“startup” & “shutdown”) :

2008-10-20 11:39:32 CEST [ISS.0026.0002E] Failure while loading service OTechBscsCas.admin:startup: java.lang.NoClassDefFoundError: com/wm/adk/WmAdapter
2008-10-20 11:39:32 CEST [ISS.0026.0002E] Failure while loading service OTechBscsCas.admin:shutdown: java.lang.NoClassDefFoundError: com/wm/adk/WmAdapter

WmAdapter is located in the “wmart.jar” which is well loaded at start time. We tried to reference wmart.jar in “application.classpath” property but then there are several other errors.

Would you have any idea ?

Is this your custom jar file??

If yes then try placing the wmart.jar in the specific pacakge itself i.e.

packages\OTechBscsCasAdapter\code\jars\static folder or IS\lib\jars folder and either ways…and finally restart IS.Check the Package load errors still if any…

HTH,
RMg

If it is the wmart.jar from the WmART package, that package (and I believe the jar) changed from 6.1 to 6.5. That may be causing the problem if the new wmart.jar is what is loading.

I’d also take a look at the code from OTechBscsCas.admin:startup and see what method it is trying to call in com.wm.adk.WmAdapter. Perhaps that method no longer is implemented in the same way.

Thanks for your advice.
I put the wmart.jar in the folder IS/lib/jars. I do not have anymore the exception "java.lang.NoClassDefFoundError" about WmAdapter class at loading time of the package. It appears as fully loaded in the “Packages > Management” tab.

But this time there is another exception :
java.lang.NoClassDefFoundError: com/wm/pkg/art/log/ARTJLog
at com.wm.adk.WmAdapter.(WmAdapter.java:54)
at com.capgemini.tmnf.adapter.BSCSCASAdapter.BSCSCASAdapter.(BSCSCASAdapter.java:47)
at com.capgemini.tmnf.adapter.BSCSCASAdapter.BSCSCASAdapter.getInstance(BSCSCASAdapter.java:164)
at OTechBscsCas.admin.startup(admin.java:94)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:322)
at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java:612)
at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsPr$
at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java:235)
at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java:49)
at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:198)
at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java:39)
at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:411)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:521)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:369)
at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:246)
at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:128)
at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:100)
at com.wm.app.b2b.server.SessionInvoke.run(Session.java:705)
at com.wm.util.pool.PooledThread.run(PooledThread.java:105)
at java.lang.Thread.run(Thread.java:595)

ARTJLog class is used in the WmAdapter class. The class file is not located in the “wmart.jar” file but in the folder IS/packages/WmART/code/classes/com/wm/pkg/art/log.

WmART package is well defined as a dependecy of our specific package “OTechBSCSCas” but it seems that none of WmART ressources can be accessed. I do not understand??

Did you put wmart.jar in the packages\OTechBscsCasAdapter\code\jars\static folder also?? and reload the package.

Also it could be WmART procedure itself changed from 61 vs 65 with the custom adapter framework development.

HTH,
RMg

I put the wmart.jar in the folder packages\OTechBscsCasAdapter\code\jars\static also. But unfortunately the same result.

Thanks.
Christophe.

Thanks,
Yes the WmAdapter is located in the wmart.jar which is well loaded at start time. This package is also registered in our specific package as a dependency. I do not understand why this wmart.jar ressources can not be accessed by our package at the loading. Maybe the “manifest.v3” has changed between 6.1 and 6.5?

Here is the startup source code :
public static final void startup(IData pipeline) throws ServiceException{
try {
Runtime cr = Runtime.getRuntime();
cr.runFinalization();
cr.gc();

      // -- Only 1 instance of the CasConnectJNI.dll is permitted (first problem)

      // get the main class loader
      ClassLoader cl0 = ClassLoader.getSystemClassLoader();

      // load the main CAS client class
      // => this class must be accessible from the main class loader
      Class c = cl0.loadClass("com.mobistar.cas.CasConnectJNI");

      // instanciate the CasConnectJNI class to load the DLL
      Object ccj = c.newInstance();

      // the CASConnectJNI class is now reachable from the main class loader
      // any IS package code can use it
      // only 1 instance of the DLL is needed

      // -- Now instanciate the adapter (one instance only) with the current
      // classloader => the class is put within the current package scope.
      BSCSAdapter instance = BSCSAdapter.getInstance();

      // and register the adapter instance
      if (instance!=null) {AdapterAdmin.registerAdapter(instance);}

      // initialization done.
    } catch (Throwable t) {
      throw new ServiceException(t);
    }

return;
}
and the “BSCSCASAdapter” extends WmAdapter class.

Christophe.

Do you see the IS/lib/jars/wmart.jar listed in the ISAdmin’s About section page??

Hi,
yes IS/lib/jars/wmart.jar is listed in the Server classpath section of the About page :

Software Product webMethods Integration Server Version 6.5 Updates WmPRT_6-5-1_SP1
IS_6-5_SP3
Build Number 394 SSL Strong (128-bit) Server Environment Java Version 1.5.0_06 (49.0) Java Data Model 32-bit Java Vendor Sun Microsystems Inc. Java Home /usr/jdk/instances/jdk1.5.0/jre Java Classpath /usr/java/jre//lib/i18n.jar
/SFW/webmet//IntegrationServer/lib/proxy.jar
/SFW/webmet//IntegrationServer/lib/system/CAS.jar
/SFW/webmet//IntegrationServer/lib/system/casclient.jar
Server Classpath /SFW/webmet/IntegrationServer/updates/WmPRT_6-5-1_SP1.jar
/SFW/webmet/IntegrationServer/updates/IS_6-5_SP3.jar
/SFW/webmet//IntegrationServer/lib/classes/
/SFW/webmet//IntegrationServer/lib/server.jar
/SFW/webmet//IntegrationServer/lib/client.jar
/SFW/webmet//IntegrationServer/lib/mail.jar
/SFW/webmet//common/lib/wmbrokerclient.jar
/SFW/webmet//common/lib/wmjmsclient.jar
/SFW/webmet//common/lib/jms.jar
/SFW/webmet/IntegrationServer/packages/OTechBscsCas/code/jars/BSCSCASAdapter.jar
/SFW/webmet//IntegrationServer/lib/entrust/enttoolkit.jar
/SFW/webmet/IntegrationServer/replicate/salvage/OTechBscsCas/code/jars/BSCSCASAdapter.jar
/SFW/webmet/IntegrationServer/lib/jars/wmart.jar
/SFW/webmet/IntegrationServer/lib/jars/xmlParserAPIs.jar
/SFW/webmet/IntegrationServer/lib/jars/client_withFix92.jar
/SFW/webmet/IntegrationServer/lib/jars/resolver.jar
/SFW/webmet/IntegrationServer/lib/jars/xml-apis.jar
/SFW/webmet/IntegrationServer/lib/jars/sl53_cj36.jar
/SFW/webmet/IntegrationServer/lib/jars/xercesImpl.jar
/SFW/webmet/IntegrationServer/packages/WmJDBCAdapter/code/jars/static/javaxsql.zip
/SFW/webmet/IntegrationServer/packages/WmWin32/code/classes/
/SFW/webmet/IntegrationServer/packages/WmFlatFile/code/jars/static/ffcore.jar
/SFW/webmet/IntegrationServer/packages/WmART/code/jars/static/wmartbundle.jar
/SFW/webmet/IntegrationServer/packages/WmPRT/code/jars/static/commons-jxpath-1.1.jar
/SFW/webmet/IntegrationServer/packages/WmPRT/code/jars/static/1jxpathpatch.jar
/SFW/webmet/IntegrationServer/packages/WmPRT/code/jars/static/jwsdl-1.0.jar
/SFW/webmet/IntegrationServer/packages/WmPRT/code/jars/static/wmprt.jar
/SFW/webmet/IntegrationServer/packages/WmPRT/code/jars/static/castor-0.9.5.2.jar
/SFW/webmet/IntegrationServer/packages/OTechBscsCas/code/jars/static/wmart.jar
/usr/app/oracle/10g/product/jdbc/lib/classes12.zip
OS SunOS OS Platform sparc OS Version 5.10 Current User cbouvet Working Dir /SFW/webmet/IntegrationServer Packages/Updates View

Instead of coping the wmart.jar file here and there you should just set the dependency of your package on WmART package. This way they will share the class loader and all the Java objects defined in WmART package will be available to your package.

HTH

ok, thanks.
The dependency was correctly set in our package. The problem is now solved. It was due to a problem of location installation of one of our component.