cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to Deploy EJB with JCo code

Former Member
0 Kudos

Built an EJB to call a BAPI. Following is the line of code that gets the JCo client connection.

<hr>

IWDJCOClientConnection client = WDSystemLandscape.getJCOClientConnection("WD_MODELDATA_DEST");

<hr>

Tobe able to comile the code, I've included tc/wd/webdynpro library along with other libraries.

It's compiling and be able to create EAR file. However, when deploying on portal server (Developer workplace), getting the following Error:

<hr>

ERROR: Not updated. Deploy Service returned ERROR:

java.rmi.RemoteException: Cannot deploy application sap.com/ProfileParamEJBEAR..

Reason: Exception during generation of components of application sap.com/ProfileParamEJBEAR in container EJBContainer.; nested exception is:

com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Exception during generation of components of application sap.com/ProfileParamEJBEAR in container EJBContainer.

at com.sap.engine.services.deploy.server.DeployServiceImpl.deploy(DeployServiceImpl.java:569)

at com.sap.engine.services.deploy.server.DeployServiceImpl.deployApplicationDuringUpdate(DeployServiceImpl.java:703)

at com.sap.engine.services.deploy.server.DeployServiceImpl.update(DeployServiceImpl.java:668)

at com.sap.engine.services.deploy.server.DeployServiceImplp4_Skel.dispatch(DeployServiceImplp4_Skel.java:1278)

at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:330)

at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:201)

at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:136)

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:104)

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

Caused by: com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Exception during generation of components of application sap.com/ProfileParamEJBEAR in container EJBContainer.

at com.sap.engine.services.deploy.server.application.DeploymentTransaction.makeComponents(DeploymentTransaction.java:621)

at com.sap.engine.services.deploy.server.application.DeployUtilTransaction.commonBegin(DeployUtilTransaction.java:321)

at com.sap.engine.services.deploy.server.application.DeploymentTransaction.begin(DeploymentTransaction.java:307)

at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:292)

at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhases(ApplicationTransaction.java:326)

at com.sap.engine.services.deploy.server.DeployServiceImpl.makeGlobalTransaction(DeployServiceImpl.java:3187)

at com.sap.engine.services.deploy.server.DeployServiceImpl.deploy(DeployServiceImpl.java:554)

... 12 more

<b> Caused by: java.lang.NoClassDefFoundError: com/sap/tc/webdynpro/services/sal/sl/api/IWDJCOClientConnection </b> at java.lang.Class.getDeclaredConstructors0(Native Method)

at java.lang.Class.privateGetDeclaredConstructors(Class.java:1618)

at java.lang.Class.getConstructors(Class.java:865)

at com.sap.engine.services.ejb.deploy.verifier.BeanClassCheck.check(BeanClassCheck.java:33)

at com.sap.engine.services.ejb.deploy.verifier.session.SessionBeanCheck.check(SessionBeanCheck.java:51)

at com.sap.engine.services.ejb.deploy.verifier.Verifier.checkBean(Verifier.java:82)

at com.sap.engine.services.ejb.deploy.verifier.Verifier.check(Verifier.java:46)

at com.sap.engine.services.ejb.deploy.DeployAdmin.generate(DeployAdmin.java:254)

at com.sap.engine.services.ejb.EJBAdmin.deploy(EJBAdmin.java:2163)

at com.sap.engine.services.deploy.server.application.DeploymentTransaction.makeComponents(DeploymentTransaction.java:606)

... 18 more

For detailed information see the log file of the Deploy Service.

<hr>

Any ideas? Appreciate your reivew and help!

Thanks

Edited by: Sat Narayana on May 19, 2011 4:54 PM

Edited by: Sat Narayana on May 19, 2011 4:58 PM

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Sat,

Add a runtime reference to the IWDJCOClientConnection interface in the EAR file under application-j2ee-engine.xml. This error is caused when you try to make a hard reference and the link between the deployed app and the referenced app is missing.

In your case, it should be a reference to the interface 'com/sap/tc/webdynpro/services/sal/sl/api/IWDJCOClientConnection'.

Given below is another link, which might help you but I strongly suspect the case of not adding a reference in the application-j2ee-engine.xml of the ear file.

[http://wiki.sdn.sap.com/wiki/display/JSTSG/(JSTSG)(Deploy)Problems-P39]

Hope it helps,

Prathamesh

Former Member
0 Kudos

<p>Thanks for the response Prathamesh!</p>

<p>I've already referenced the link, but couldn't find any new info.</p>

<p>It looks like deployment service is not finding service : tcwdwebdynpro

I've added the above reference in application-j2ee-engine.xml as EJB is getting compiled only when I add "tcwdwebdynpro" in used DC.

</p>

<p>

How do I locate this service on the server; I searchd in Visual Admin>Cluster>Services>Deploy>Applications-->tc* apps; they all started and my other WD apps are working fine.

</p>

Not sure if my NWDS is messed up.

Any ideas?

Former Member
0 Kudos

I can suggest you another way of accessing the RFCs in the backend. The overall solution remains the same however only the manner of connecting to the backend differs, instead of using JCOs we use RFC destinations(created in the Visual Administration).

The link below will explain you how to connect the backend using an existing destination

[http://help.sap.com/saphelp_nw04s/helpdata/en/17/d609b48ea5f748b47c0f32be265935/frameset.htm]

I am a little crunched on time to try the web dynpro solution myself that is why I am suggesting an alternative. The solution works to good effect. If you feel like employing this or have more questions regarding this solution then let me know.

Hope it helps,

Prathamesh

Former Member
0 Kudos

As explained in other threads: Solved it by creating a library project to include external JARs for Web Dynpro jars to be used at "deployment time"; also, by removing this library reference in EAR.

Thanks all.

joo_ferreira
Participant
0 Kudos

Hello,

Can you further explain how did you solve your problem? I'm facing a similar one:

Using an EAR, that points to a EJB (that has a webservice) and using Web Dynpro features at the method.

The exception is similar!!

Regards,

Joã