cancel
Showing results for 
Search instead for 
Did you mean: 

Where must I add the classe12.zip from Oracle in WebAS

Former Member
0 Kudos

Hello,

I am currently working on a web service that should connect to oracle. The java classes run fine on my computer but when I generate a web-service and deploy it on the webAS, it does not run anymore. The problem is that there is no trace of the jar file classe12.zip needed by my web-service on the wedAS.

In which directory should I add this jar file?

Thanks for your help.

Michel

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Additional troubleshooting information:

I tried to build the web service in a different way. I went to File -> New -> Other -> Web Service -> Web Service Archive. Then point the browse to my web service project. The EAR is generated at put to the root path of the project. This EAR works fine and point to my j2ee library.

If I used the Build option from "right click" the project to open the context menu: Development Component -> Build. The EAR is generated by this procedure will be put in the deploy folder. This EAR did not work.

Why does this happen? Why can I not make a working EAR file from the second way which is the typical way to build a DC? Is the first way the right way to build a web service EAR?

Former Member
0 Kudos

One more information, I saw in the previous post that the tool Deploy Tool is used to realize this manipulation on Web AS 6.20. I am currently working on Web AS 6.40. Is this tool still available on 6.40?

What is the easiest manipulation to deploy an external library on web AS 6.40?

Former Member
0 Kudos

Hi Michel,

you can deploy a library on the Web AS 6.40 using the NetWeaver Developer Studio. You do that in a J2EE Server Component -> Library project. For more information, refer to the manual at http://help.sap.com/saphelp_nw04/helpdata/en/9f/2ade3fc6c6ec06e10000000a1550b0/frameset.htm

And yes, the Deploy Tool is available on Web AS 6.40 as well. If you prefer using it, see the corresponding deployment manual at: http://help.sap.com/saphelp_nw04/helpdata/en/0c/86b46fae4039428760a11890d2a14a/frameset.htm

The Deploy tool is started by the DeployTool.bat file under C:\usr\sap\J2E\JC00\j2ee\deploying directory (path for a standard installation).

Regards,

Ivo

Former Member
0 Kudos

Thank you for your help Ivo. I try the first solution proposed without succees. It seems to me that this solution only permits you to deploy library generated by yourself in your workspace (and only jar file) but what I need is to deploy the external class12.zip. Perhaps I miss something in the concept ...

I will try the second solution one.

Former Member
0 Kudos

Hi Michel,

well, you can import the external library to your Developer studio workspace. I'll try to list the steps:

1. Rename the class12.zip to class12.jar

2. In the developer studio, create your library project. Suppose you gave it a name 'TestLib'.

3. From the main menu of the studio, choose File -> Import. From the pop-up choose File system. On the next screen of the wizard, in the "From directory" field browse to your jar file. In the "Into folder" field below browse to your TestLib directory. Hit Finish!

4. Next steps are described in the documentation I sent to you yesterday!

Good luck!

Ivo

Former Member
0 Kudos

Thank you again for your help Ivo. I succeed to deploy my external jar using your recommandation. The required library is on the WebAS. My last problem to resolve is that my web-service doesn't find this library during the call. I think that I have miss a link in the chain but I am confident that I will resolve this point next week.

Michel

Former Member
0 Kudos

Hi Michel,

did you set a reference from your application to the library? Do that in the application-j2ee-engine.xml of your application.

You can do that in the NW Developer studio. When defining the reference, specify the following in the required fields:

reference target - enter the same name here as the name of the Component Name field that you have specified in the server/provider.xml -> General tab of your Library project.

reference type - hard

reference target type - library

provider name - sap.com

Regards,

Ivo

Former Member
0 Kudos

Hi Ivaylo,

I had a similar type of a problem in which the application is not loading the sapjco.jar file.

Will i also have to make a library and add a reference to that library.

If possible can you please mail me the steps on

nikhil.mahajan@capgemini.com

Thanks

Nikhil

Former Member
0 Kudos

HI Nikhil,

no, you do not have to deploy a library, because it's already there (Jco library is a standard one and is delivered with Web AS Java). All you need to do is just set a reference to it from your application (as was suggested in your thread in Java Programming forum).

You've written there that you've added the reference to the application-j2ee-engine.xml. How did you add it - by editing the XML file? Did you restart your application after adding the reference (I mean stop it, and then start it again)?

Regards,

Ivo

Former Member
0 Kudos

Hi Ivaylo,

I edited the xml file an have put the following code

<reference reference-type="hard">

<reference-target

provider-name="sap.com"

target-type="library">com.sap.mw.jco</reference-target>

</reference>

The i had save the file and recreated a era file and deployed it .

The when i tried to run the application it gave me the same error as earlier

<b>NoClassDefFound</b> in the line in the servlet where the code was

JCO.createClient()

Can you please help me on this issue.

You can reply me on the other tapic posted by me

TOPIC - WAS unable to load a external jar file

thanks for the help

Nikhil Mahajan

Former Member
0 Kudos

Sorry Nikhil, but I have no further ideas.

Hope anyone else can help?

Former Member
0 Kudos

Bingo !!!

<b>Thank you Ivo !!! </b>

My external JAR is now loaded and my web service is able to communicate with my Oracle Database.

Like you wrote, I forgot to reference my library in my application.

Michel

Former Member
0 Kudos

Hi

I an still getting the following error

java.lang.NoClassDefFoundError

at Salesorder.doPost(Salesorder.java:62)

at Salesorder.doGet(Salesorder.java:53)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:129)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)....

Can anyone please help me with this

Thanks

Nikhil

Former Member
0 Kudos

Hi,

I encountered the similar problem and I found that there is a library "jrfc.jar", but not "sapjco.jar", deployed with reference-target "com.sap.mw.jco" in WAS 6.4. After I setting a reference from my application to the library "jrfc.jar", I can complie and deploy the application. However, when I run my application, some exceptions occur. I just wonder if "jrfc.jar" is the same as "sapjco.jar". Do you have any idea ?

Thx~~

Regards,

Teddy

Former Member
0 Kudos

Hi Teddy,

yes, you're talking about the same thing here. In fact, there is no sapjco.jar, but rather <i>sapjco</i> is the display name for the Jco library on the Web AS Java. All the Java classes of this library reside into a JAR file, called jrfc.jar (this jar file is part of the Web AS). A library also has a Component Name (or Library Name). In our case with the Jco lib, this is com.sap.mw.jco. The component name is the name to use when setting a reference to the library.

You can view all those details about libraries using the Visual Administator. Go to <dispatcher/server> -> Libraries -> <your library>

If you want further details on the matter, read the SAP J2EE Engine System Architecture here:http://help.sap.com/saphelp_nw04/helpdata/en/51/c01bc857c29f43ade7082e6a8dce07/frameset.htm

Does that help?

Regards,

Ivo

Former Member
0 Kudos

What is the server/provider.xml file? I am having the same problem in my case that I created a java project and I exposed my java class through web service wizard. Everything was deployed and worked fine as the instructions in SAP manuals. However, I started having the NoClassDefFound error when I used classes from my J2EE server library. I specified the library usage in my UsedDC part of my java project with checkboxes for compile, build, runtime and runtime type is strong. I could deploy the EAR, but I got the NoClassDefFound error in runtime. Next step, I tried to add the application-j2ee-engine.xml to my java project and declared the library reference as you mentioned. Still no hope!!

I examined the EAR archive and I realized there were two application-j2ee-engine.xml files. One was directly under the archive /META-INF generated by the project build. It did not contain any reference to the library. The second one was under the WSAR archive in the same level with /META-INF in the EAR archive. The second one was the one I created in my java project. What is going on here?

Please help!

Giavinh Pham