on 05-05-2004 11:58 AM
Hi
I was trying to create a J2EE application on NETWEAVER.
I have created the ear file and deployed it on the server .
I have created a simple application using a JSP and Servlet.
While running the application i am getting a runtime error <b>NoClassDefFoundError</b> in the servlet on the line where i have called the JCO.createClient() function.
I have checked the CLASSPATH variables and even the .classpath files , all have the required entries to locate the jar file.
It seems to me that i am missing some reference variable setting on the server.
Can anyone of you pleas help me with this issue.
Please if possible do let me know the administrator password for the WAS installed on a local system.
Thanks a lot in advance
Nikhil Mahajan
ph- 91-22-55557342
Hi
I have a similar problem and I wonder if some one could give me some light. I am using WebSphere WAS 5.0 on AIX and using Java within my application (Ariba).
When I try to call the sapjco, I get the following error:
"java.lang.NoClassDefFoundError: com/sap/mw/jco/JCO
at config.java.custom.sap.JCoConnectionPool.<init>(JCoConnectionPool.java(Compiled Code))
at config.java.custom.sap.JCoConnectionPool.initializePool(JCoConnectionPool.java(Compiled Code))"
Eventhough I have the classpath is set in WebSphere, still doesn't work.
Thanks,
Juan P
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
i'm trying to connect to SAP through a jsp page. i'm getting a NoClassDefFoundError as well with JCO$BasicRepository.
as i have java classes packed as jars handling the jco codes, i believe that it is the same problem. but i am not using netweaver. i am using Sun's Application Server 8. frmo what i read, i would likely have to insert the previously posted xml line in some xml file as well.
so the question is, which file is this that i will have to edit? thx.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you are using SAP J2EE Server please go c:\SAP J2EE Server\cluster\server\managers\
find library.txt and reference.txt files
open and add below line in library.txt
library jco sapjco.jar
open and add below line in reference.txt
reference sample library:jco
here "sample" is your ear application name, which you have mentioned in the application.xml file when you are deploying ear file.
You can keep your sapjco.jar file in your application WEB-INF\lib folder.
Once you update this, please restart your SAP j2EE server and deploy the same application again. I hope this will work.
hi
One more questionn
in the tag
<reference-target
provider-name="sap.com"
target-type="library">com.sap.mw.jco</reference-target>
Do i need to mention the full path where the jar is located
Thanks
Nikhil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Stefan
i think this is going to look for the file once the application is stsrted on the server.
Can you please let me know from where will it pick the jar file .
Or should we provide the path where this jar is present on the local machine
as i have the server running on the local machine only.
Thanks
Nikhil
Hi Nikhil,
sorry, if my last answer was a little bit to short The point is, that the library you are going to reference is already present (deployed as a library) in the server. So there's no need for you to take care about jar paths. There's no difference if the server runs locally or remote.
Hope that helps.
Regards
Stefan
Hi Stefan
I did try to run the application after placing the above code in the application- j2ee-engine.xml.
it still gives me the same error.
ERROR IS AS BELOW
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)......
on the line 62 of the servlet the code mentioned is
JCO.createClient(....
Can you please advise on this issue.
Thanks
Nikhil
Thanks a lot for the help
I will try it out right away.
Thanks and regards
Nikhil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You have to set a reference to the JCO(not sure what would be the correct name of the JCO library) library in the application-j2ee-engine.xml file of your ear.
Regards,
Prasad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
did you add the reference to your application-engine.xml:
<reference reference-type="hard">
<reference-target
provider-name="sap.com"
target-type="library">com.sap.mw.jco</reference-target>
</reference>
That should link your application to the jco-jar
Best Regards, astrid
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.