cancel
Showing results for 
Search instead for 
Did you mean: 

glassfish cannot load JCO.Exception, but JCO.Client

Former Member
0 Kudos

Hello!

I'm running Sun Java System Application Server 9.1_01 (build b09d-fcs) here on a JRE 1.6.0_03-b05.

I tried to deploy a number of beans that are using the SAP JCO connector. The beans look good in eclipse and -as long as I do not import / use the com.sap.mw.jco.JCO.Exception class- I can deploy the beans without any trouble.

But once I enable usage of com.sap.mw.jco.JCO.Exception, deployment fails for a java.lang.NoClassDefFoundError.

Meanwhile, it still loads a number of other imported classes, such as:

- com.sap.mw.jco.JCO

- com.sap.mw.jco.JCO.Client

- com.sap.mw.jco.JCO.Pool

I don't really understand the problem; the com.sap.mw.jco.JCO.Exception is included in the sapjco.jar provided to glassfish as com.sap.mw.jco.JCO$Exception.

Here's the stacktrace created by glassfish:

[#|2008-03-04T11:52:39.381+0100|SEVERE|sun-appserver9.1|javax.enterprise.system.tools.deployment|_ThreadID=50;_ThreadName=Thread-130;_RequestID=8ed10eef-a25f-481d-b6a0-de444cc031fa;|Exception occured in J2EEC Phase

java.lang.NoClassDefFoundError: com/sap/mw/jco/JCO$Exception

at java.lang.Class.getDeclaredMethods0(Native Method)

at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)

at java.lang.Class.privateGetPublicMethods(Class.java:2547)

at java.lang.Class.getMethods(Class.java:1410)

at com.sun.xml.ws.model.RuntimeModeler.determineWebMethodUse(RuntimeModeler.java:303)

at com.sun.xml.ws.model.RuntimeModeler.processClass(RuntimeModeler.java:319)

at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:256)

at com.sun.tools.ws.wscompile.WsgenTool.buildModel(WsgenTool.java:218)

at com.sun.tools.ws.wscompile.WsgenTool.run(WsgenTool.java:119)

at com.sun.tools.ws.util.WSToolsObjectFactoryImpl.wsgen(WSToolsObjectFactoryImpl.java:61)

at com.sun.tools.ws.spi.WSToolsObjectFactory.wsgen(WSToolsObjectFactory.java:107)

at com.sun.enterprise.webservice.WsUtil.runWsGen(WsUtil.java:1845)

at com.sun.enterprise.webservice.WsUtil.genWSInfo(WsUtil.java:2249)

at com.sun.enterprise.deployment.backend.ModuleDeployer.loadDescriptors(ModuleDeployer.java:424)

at com.sun.enterprise.deployment.backend.EjbModuleDeployer.deploy(EjbModuleDeployer.java:140)

at com.sun.enterprise.deployment.backend.ModuleDeployer.doRequestFinish(ModuleDeployer.java:179)

at com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:191)

at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108)

at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:919)

at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:279)

at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:788)

at com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:187)

at com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:223)

|#]

Thanks for your help and please let me know, if you need any other information regarding this problem.

Bye,

Stefan

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

as written before: the glassfish-v2ur1-b09d seems to have a bug. The March 5th 2008 nightly build does not have it.

Therefore, please try a newer "release" if you experience the same problem.

One more hint: you'll have to provide the two .dlls and sapjco in the glassfish\lib - directory to complete deployment.

Bye,

Stefan

SB9
Active Participant
0 Kudos

Hi Stefan,

The usage for JCO should be only for compile time. You need not include it in deploy time (usage) as JCO will already be present in the class path of Netweaver server and so it will be loaded by classloader automatically.

Hope this helps.

Thanks,

Soujanya

Former Member
0 Kudos

Hello Soujanya and Thanks for your reply,

sorry, but I'm not using NetWeaver. I'm using Sun Java System Application Server 9.1_01 (build b09d-fcs) which translates to Glassfish-v2ur1-b09d.

Therefore, I have to put sapjco.jar into glassfish's classpath directory (currently glassfish\domains\domain1\lib ... right now, it doesn't work on Ubuntu linux ... for some reason ... please check )

I already thought about giving the Ressource Adapter a try, but right now, I would like to use the sapjco. What I still don't get: why does it load JCO.Client + JCO.Pool, but not JCO.Exception?

Maybe you can help me out anyway.

Thanks and have a nice day.

Bye,

Stefan

Former Member
0 Kudos

Hello again!

Alright, I solved the problem: I installed March 5th 2008 nightly build. With this one the problem is gone. I cannot tell, whether another build would solve it, too, but this does.

Thanks and have a great weekend.

Bye,

Stefan