cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with deploying a JAR file

Former Member
0 Kudos

Dear programmers,

I've problems with deploying a JAR file. I have tried to build 3 projects:

- Java project

- External Library DC project

- J2EE server component - Library DC

I did made a .jar file from the java project (without errors).

I've put the jar file into the external library project and builded the project.

The link to the Library DC was succesfull, and also the '<var>gen/default/plublic/defLib/lib/java</var> then you meet <var>js.jar</var>' was O.K.

After deploying the library is found in the visual administrator, but the JAR file is not!

Any ideas, what the problem could be?

- Adri

Accepted Solutions (1)

Accepted Solutions (1)

former_member186016
Active Contributor
0 Kudos

Expose the jar as public part of type assembly from the External Library DC project.

Then add this External Library DC project to dc dependency list of J2EE server component (Library DC).

Have you done this ?

Regards,

Ashwani Kr Sharma

Answers (2)

Answers (2)

Former Member
0 Kudos

I've extracted the sda file, and no .JAR file is included. What should I do?

former_member186016
Active Contributor
0 Kudos

Hi Adri,

I an not sure why is happening in your case. Can you please do following. It should solve your problem.

1) Create External Library DC.

2) Add the jar under libraries folder in the DC.

3) Expose this jar as public part.While exposing select "Can be packaged in other build result (e.g. SDA)"

4) Create the J2EE Server Component of library type.

5) Add the External Library DC as used dc in the J2EE dc.

6) Build the J2EE dc.

Check the sda. It should have the jar from External Library DC.

Regards,

Ashwani Kr Sharma

Former Member
0 Kudos

Hi Ashwani Kr Sharma,

Thanks for your reply! I did exactly what you said, but the sda doesn't contain the jar file.

I uploaded the JAR file to my website, is it possible that the file is corrupt or not correct? <a href="http://www.digia3.nl/javajar.jar">Link to jar file</a>

Maybe I added the JAR at a wrong way to the external library project? I copied the file, and pasted it in the 'libraries' folder with windows explorer.

In advance,

Adri

former_member186016
Active Contributor
0 Kudos

Hi Adri,

The jar is absolutely correct.

Can you refresh the view in IDE, and see that the jar file is under libraries folder.

Then do what i said in previous post.

Also after this can you upload the sda as well. [Just asking this to check it]

Regards,

Ashwani Kr Sharma

Former Member
0 Kudos

After some extra research I found this thread:

It's about the same problem. The build process depends on which SP<> is installed. A good resolution isn't posted. One of the options is to uninstall SP16 and install SP15..

If you have a suggestion too, I'm curious.

Regards, Adri

former_member186016
Active Contributor
0 Kudos

Hi,

I using the SP19 IDE. There it is working correctly.

By the thread you posted it is definetly a bug in SP16. Even i was not expecting this wrong behavior in SP16. This would be major bug.

To continue your work you can manually copy the jar in the root of archive file for library DC and then deploy it.

Regards,

Ashwani Kr Sharma

Former Member
0 Kudos

Well, I've copied the JAR directly into the SDA file (src folder) and tried to deploy it with the SDM DeployTool. That was not working, so I tried to edit the provider.xml file and added these lines:

<jars>

<jar-name>javajar.jar</jar-name>

</jars>

Deploying will work now properly, but the "NoClassDefFoundException" stays.

Also in the Visual Administrator, the JAR is under the librarie "libjava".

Any ideas? In advance,

Adri

Former Member
0 Kudos

A new advantage.. The error "noClassDefFound" is resolved. I should add the JAR files manually in the webdynpro EAR file -> wda and deploy the ear.

This way is very time consuming, but it works for the moment. If you have any suggestions, they are welcome.

Thanks for your help,

Adri

Former Member
0 Kudos

Thanks for your reply.

I've deleted the projects and try it again.

The following piece of the warning report comes by building the library DC:

-


Warning: Warning: Source folder does not exist, will be ignored: server

Plugin initialized in 0.046 seconds

Preparing data context..

No 'default' JDK defined, will use running VM.

Data context prepared in 0.016 seconds

packDeployArchive:

[srcpacker] Creating source archive

[srcpacker] No sources available for packing, no archive will be created.

[timer] Source archive creation finished in 0.031 seconds

[jarsap] Info: JarSAP version 20041217.1600

[jarsap] Info: JarSAPProcessing version 20060104.1634 / JarSL version 20060106.1831

[jarsap] Property jarsap.info.dir is not set.

[jarsap] Building: D:\Documents and Settings\Administrator\.dtc\LocalDevelopment\DCs\sap.com\libjava\_comp\gen\default\deploy\sap.com~libjava.sda with compression

[timer] JarSAP finished in 0.234 seconds

Ant build finished OK

-


I added the external library dc as an 'build' dependency to the library dc. The external library was builded successfully with the jar as public part. (assembly)

Any ideas?

Regards, Adri

former_member186016
Active Contributor
0 Kudos

Hi Adri,

The build seem to be fine. Can you please open the <b>sap.comlibjava.sda</b> file @ <b>D:\Documents and Settings\Administrator\.dtc\LocalDevelopment\DCs\sap.com\libjava\_comp\gen\default\deploy\sap.comlibjava.sda</b> and verify that the jar from external libraby dc is bundled here.

If it is bundled proceed to deploy and library dc and verify the results.

Regards,

Ashwani Kr Sharma