cancel
Showing results for 
Search instead for 
Did you mean: 

Can't deploy archive in J2EE Preview

Former Member
0 Kudos

When I try to deploy a war archive in the J2EE Preview, the deployment fails with a class not found error for a NetWeaver class.

Reason: com.sap.engine.lib.converter.AbstractConverter; nested exception is:

java.rmi.RemoteException: class java.lang.NoClassDefFoundError: com.sap

.engine.lib.converter.AbstractConverter

The same error occurs if I try to deploy using telnet or the Developer Studio. I successfully deployed the same archive a few days ago so it seems like something has changed in my environment. Any idea where I should look? I've looked at various NetWeaver jar files but haven't found one containing AbstractConverter.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Just to clarify - I am able to successfully deploy WAR archives using NetWeaver Preview Edition. I use SAP Developer Studio to perform the deployments. Simple wars that I deploy work properly as I'm able to invoke their servlets.

I also deployed a large war (37MB) successfully but encountered classpath problems when the application was started. I tried to fix the classpath problems by modifying the engine's classpath but this seemed to trigger other problems including the classpath problem that disabled deployment capabilities. Once I reset the classpath to the template default, deployments worked again.

I found instructions for how to deploy a war online but don't recall where. The instructions indicated that you need to do the following.

1) Start NetWeaver Developer Studio.

2) From the menu, open Window -> Show View -> Other -> Deploy View ->.

3) Open the Deploy View window and press the Import button.

4) After your war has been imported, press the Deploy button.

This process worked for me. You should be able to build your war normally. When you "import" it, NetWeaver specific files are added to the war. Once it's been imported, you can then deploy it to your server.

You should also be able to use Shell Administration via telnet to deploy but I haven't done it successfully yet.

Jerry

Former Member
0 Kudos

Hi,

Could you please paste the entire exception stack trace which consists " Reason: com.sap.engine.lib.converter.AbstractConverter; nested exception is:

java.rmi.RemoteException: class java.lang.NoClassDefFoundError: com.sap

.engine.lib.converter.AbstractConverter"?

It will help to find out the reason of failure.

As I understood you managed to deploy the component but the component can not start.

Just to exclude trivial cases, do you know if you or somebody else has removed components from the engine using the undeploy view or the telnet command?

Finally: it is still not possible to deploy non sap components to the engine using the telnet command.

The only way is either to import(convert) the archives.

Best Regards,

Boris

Former Member
0 Kudos

Unfortunately I no longer have the logs containing the stack trace. I can't replicate the problem again unless I redeploy my archive and make the same classpath changes that I previously made. These classpath changes were apparently causing the problem. I'm about to take two weeks off from work so I won't be pursuing this issue further until mid-August.

I don't think I had removed any applications via telnet at the time that I encountered the error. I did undeploy some of the SAP sample applications via telnet; I'm not sure exactly when I did this but I think it was after I started encountering the AbstractConverter error.

I wasn't sure whether the shell admin tool could perform imports as well as deployments. If I understand you correctly, I would need to "import" a war in some manner (e.g., manually or using DS) before I can deploy it via telnet.

My original problem occurred when I modified the VM Environment classpath for my server instance. Is this the recommended way to add third party jars to my application's classpath?

Former Member
0 Kudos

Hi Jerry,

It is bad practice to alter VM's classpath in order to include clases needed by some application. As we are expected to run thousands of applications on one engine, we have solution for that. The 6.40/7.00 style of solving this issue is to create online library, put the jars in it and reffer it from your application. For the coming release we have better solution - we have introduced library modules inside applications, so you could have an EAR that actually acts as library containing common jars. Both methods however require that you use our specific descriptors. We will have support for that in the IDE, but for J1 it is not yet 100% there.

As for the differences - deploy view, IDE, telnet, shell - all tools are channeled through the same internal API when we speak about SDAs. When you need to deploy pure JEE archives, you have the option to use DeploView's import button, or the command line tool. Please consult the documentation coming with the CD for details

Best Regards,

Georgi

Former Member
0 Kudos

Georgi,

How would that solution differ from my adding the missing jars to my WAR archive in WEB-INF/lib? Right now, we don't add certain necessary jars (e.g., Xalan, Xerces, Log4j) to the archive because they're either provided by the servers that we deploy to or we can easily add them to the server's classpath via an extension mechanism.

We don't want to deploy the archive as an EAR on NetWeaver if that's not a requirement. Adding a descriptor should be ok; are you referring to SAP_MANIFEST and sda.xml or to additional descriptors?

Thanks,

Jerry

Former Member
0 Kudos

Hi Jerry,

If you put the jars in the lib folder, then they are part of your application. If you deploy them as a library, they can be shared between many applications. The descriptors I speak about are SAP_MANIFEST and application_j2ee_engine.xml.

We don't advice app developers to extend engine's classpath as adding shared library is much easier (via IDE or manually), and it is more robust to deploy - on the next system you want to run, you just deploy your components and that's all. Imagine 20 developers changing engine's classpath? I don't want to get a ticket for such engine

If there is interest, I could share example of how to build a library and access it from your application. The libraries you mention below are often needed, so I'd be glad to reuse them in the example

Best Regards,

Georgi

Former Member
0 Kudos

Yes, I would be interested in an example demonstrating how to use a library. I won't have access to this forum for the next two weeks but will check for your response on my return.

Thanks,

Jerry

Former Member
0 Kudos

Is it possible to use libraries with the J2EE Preview edition? I can create a Library project using the wizard but it doesn't look like there's any way to build it (e.g., I don't see a Build Library Archive function on the context menu).

I can include my third party jars in my application's EAR file but am interested in understanding how the Library archive can be used.

Thanks,

Jerry

Former Member
0 Kudos

Hi Jerry,

It's been long since I promised to answer this question. Now with the availability of the next JEE release, we are in good shape to show to the developers how this can be used. Please follow the link below

/people/community.user/blog/2006/10/24/applications-and-shared-libraries

Best Regards,

Georgi

Vlad
Advisor
Advisor
0 Kudos

I would correct this link even after 8 years :

Answers (5)

Answers (5)

Former Member
0 Kudos

re: Authentication. I don't have any problem authenticating during the deployment process. This works properly for me both in NetWeaver Developer Studio and when using Shell Administration via telnet. I'm prompted for the username/password and authentication is successful.

0 Kudos

Hi Chart,

the version is same/correct and the deploment and authentication works fine.

In order to check your case, please send me - galin.galchev@sap.com the logs from:

server0\log and JC**\work . Just zip them. The email size is limit to 3 MB.

Regards Galin

Former Member
0 Kudos

Dear Galin Galchev,

Thank you very much for your help.

I feel very bad about this problem.

Many people think I cannot remember my master password.

As your request, I send the 2 files below to your e-mail.

I send the work.rar file (from C:\SAP\JP1\JC00\work).

I send the log.rar file (from C:\SAP\JP1\JC00\j2ee\cluster\server0\log).

Best Regards,

Chart K.

Former Member
0 Kudos

HI Jerry,

I do not see your authentication step when you work with SAP J2EE server.

Can you deploy the file without any authentication ?

No, you must meet the authentication step.

This is the step that you meet A BUG.

If you enter the Administrator and <master-password>,

the below errors will show.

Exception occurred during the 'deploy' operation.

Cause:com.sap.engine.services.dc.api.AuthenticationException: BaseLoginException.Cannot get initial context.

Reason: The user account is either expired, or not valid yet.

Exception:

com.sap.ide.eclipse.deployer.api.AuthenticationException: com.sap.engine.services.dc.api.AuthenticationException: BaseLoginException.Cannot get initial context.

Reason: The user account is either expired, or not valid yet.

at com.sap.ide.eclipse.deployer.dc.DCClientImpl.<init>(DCClientImpl.java:47)

at com.sap.ide.eclipse.deployer.dc.DCClientFactoryImpl.createClient(DCClientFactoryImpl.java:80)

at com.sap.ide.eclipse.deployer.DeployerPlugin.getClient(DeployerPlugin.java:181)

at com.sap.ide.eclipse.j2ee.engine.deploy.view.util.UIUtils.getClient(UIUtils.java:399)

at com.sap.ide.eclipse.j2ee.engine.deploy.view.deploy.action.DeployAction$1.run(DeployAction.java:135)

at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)

Caused by: com.sap.engine.services.dc.api.AuthenticationException: BaseLoginException.Cannot get initial context.

Reason: The user account is either expired, or not valid yet.

at com.sap.engine.services.dc.api.session.impl.SessionImpl.checkForTicketException(SessionImpl.java:230)

at com.sap.engine.services.dc.api.session.impl.SessionImpl.getContext(SessionImpl.java:181)

at com.sap.engine.services.dc.api.session.impl.SessionImpl.<init>(SessionImpl.java:102)

at com.sap.engine.services.dc.api.session.impl.SessionFactoryImpl.newSession(SessionFactoryImpl.java:24)

at com.sap.engine.services.dc.api.impl.ClientFactoryImpl.createClient(ClientFactoryImpl.java:62)

at com.sap.ide.eclipse.deployer.dc.DCClientImpl.<init>(DCClientImpl.java:42)

... 5 more

Caused by: com.sap.engine.services.security.exceptions.BaseLoginException: The user account is either expired, or not valid yet.

at com.sap.engine.services.security.login.FastLoginContext.login(FastLoginContext.java:199)

at com.sap.engine.services.security.remoteimpl.login.RemoteLoginContextHelperImpl.login(RemoteLoginContextHelperImpl.java:78)

at com.sap.engine.services.security.remoteimpl.login.RemoteLoginContextHelperImplp4_Skel.dispatch(RemoteLoginContextHelperImplp4_Skel.java:64)

at com.sap.engine.services.rmi_p4.P4Message.process(P4Message.java:225)

at com.sap.engine.services.cross.fca.MessageReader.run(MessageReader.java:59)

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

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

Thus, I think you not use the SAP NetWeaver J2EE Preview Edition (Release SAP NetWeaver™ 2007).

Please try !!(The time to install and test is not over 30 minutes.)

Former Member
0 Kudos

Hi Jerry,

How do you manage to deploy war archive? As far I know it is not possible to deploy pure war. It is necessary to create ear and publish it. Could you explain a little bit what are you doing. If it is possible could you send the archive which are you trying to deploy. You mentioned that you have tried to deploy it using the telnet. Besides it would be useful to paste the entire exception stack trace.

Best regards,

Boris

Former Member
0 Kudos

I located AbstractConverter in sap.comtcjej2eedescriptorsimpl.jar. Hovever adding this to the engine's classpath caused another class not found error related to jaxrpc. It looks like I'm encountering class loading problems because I've tweaked the engine's classpath to satisfy classpath requirements for an application that I've deployed.

Former Member
0 Kudos

I would like to talk directly with the SAP software engineers who are resonsible to produce the SAP Netweaver J2EE Preview (Release SAP NetWeaver™ 2007).

I think the problems I met is a BIG BUG. (I am very confident.)

I cannot deploy any example in SAP Netweaver J2EE Engine -Both Java EE 5 and J2EE 1.4. (The reason maybe the username and password that you provide is not correct.)

You can try it by yourself. (The time to install and test is not over 30 minutes.)

I test this may be 10 th time (including new installation).

You can see the below link (same problem another persons):

If you can deploy the examples, please inform me directly.