• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

NoClassDefFoundError after upgrading from WL SP2 to SP4

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am facing a problem where we have upgraded our Weblogic server 8.1 from SP2 to SP4. After upgrading in some application it has started
giving NoClassDefFoundError. Actually My code in a java file calls JCO class which is in jco.jar file and the methods it call is JCO.addClientPool where it is giving error.

This is point where it is giving error in my code
-----------------------------------------------------

JCO.addClientPool(
com.abc.Configuration.get("sap_inckey"),
Integer.parseInt(Configuration.get("sap_maxcon")),
Configuration.get("sap_client"),
Configuration.get("sap_incuser"),
Configuration.get("sap_incpassword"),
Configuration.get("sap_language"),
Configuration.get("sap_host"),
Configuration.get("sap_incsystemnumber"));
---------------------------------------------------------

--------------

Exception it is giving is following---->
<Mar 31, 2006 2:57:34 AM PST> <Error> <HTTP> <BEA-101017> <[ServletContext(id=26
751898,name=web,context-path=/web)] Root cause of ServletException.
java.lang.NoClassDefFoundError
at com.mindspeed.incentiverpt.BAPI_IncentiveReport.getAeCodeNames(BAPI_I
ncentiveReport.java:112)
at jsp_servlet._incentiverpt.__incrpthome._jspService(__incrpthome.java:
193)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
(ServletStubImpl.java:1006)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:419)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:315)
at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispat
cherImpl.java:322)
at com.mindspeed.incentiverpt.IncRedirectServlet.doPost(IncRedirectServl
et.java:40)
at com.mindspeed.incentiverpt.IncRedirectServlet.doGet(IncRedirectServle
t.java:21)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
(ServletStubImpl.java:1006)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:419)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:315)
-------------------------------------------------------

Please help me out.

Thanks in advance
Nilesh sah
 
Nilesh Sah
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
Is n't there anyone who can help me out in this problem.I have stuck in this from last 2 weeks

Thanks
Nilesh
 
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What class is not found? Where is that class located in your application?
 
Nilesh Sah
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ,
Infact it is the JCO class it is not been able to pick which in in my jco.jar. However the same code runs well if in WL sp2.Is there any version issue for jco.jar because JCO class is mainly used for SAP.
Thanks a lot
Nilesh Sah
 
Nilesh Sah
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ,
I have stuck in a problem where my application is using jco.jar file for SAP integration to my java application.
I have a java class "BAPI_IncentiveReport" in which it calls "addClientPool" that is in JCO class in jco.jar file but it is giving NoClassDefFoundError after i upgraded my Weblogic server 8.1 sp2 to sp4.
I have jco.jar under /opt/mspd/domains/mspdapps/lib as well as libjRFC11.jco,libjRFC12.jco and librfccm.so files there. I also tried by keeping them under my application WEB-INF/lib folder but it is giving me same error.
-------------------
package com.mindspeed.incentiverpt;

import com.sap.mw.jco.*;
import java.util.*;
import java.io.*;
import com.mindspeed.Configuration;
public class BAPI_IncentiveReport
{

private String rptId;

private String aecode;

private boolean submit= false;
private static final String POOL_NAME=
com.mindspeed.Configuration.get("sap_inckey");

/**
* BAPI_IncentiveReport constructor comment.
*/
public BAPI_IncentiveReport() {
super();
}
/**
* BAPI_IncentiveReport constructor comment.
*/
public BAPI_IncentiveReport(String rptId, String aecode)
{
super();
this.aecode = aecode;
this.rptId = rptId;
}
public EmployeeAttr[] getAeCodeNames()
{
boolean retval= false;
JCO.Client client= null;
EmployeeAttr[] empnames= null;
Hashtable empallData= new Hashtable();
Hashtable aecodeData= new Hashtable();

try
{
/* This is the point where it is giving NoClassDefFoundError.Till here every thing is executing------>*/
JCO.addClientPool(
com.mindspeed.Configuration.get("sap_inckey"),
Integer.parseInt(Configuration.get("sap_maxcon")),
Configuration.get("sap_client"),
Configuration.get("sap_incuser"),
Configuration.get("sap_incpassword"),
Configuration.get("sap_language"),
Configuration.get("sap_host"),
Configuration.get("sap_incsystemnumber"));

String timeinterval= "99991231";
IRepository repos=
JCO.createRepository("ESSRepos", Configuration.get("sap_inckey"));
client= JCO.getClient(Configuration.get("sap_inckey"));
System.out.println("Sagar");
System.out.println(rptId);
System.out.println(aecode);
IFunctionTemplate ftemplate= repos.getFunctionTemplate("ZRFC_GET_PID");
JCO.Function function= new JCO.Function(ftemplate);
JCO.ParameterList input= function.getImportParameterList();
input.setValue(rptId, "RPT_ID");
input.setValue(aecode, "AECODE");

client.execute(function);

JCO.ParameterList output= function.getExportParameterList();
System.out.println(output);

JCO.Table dirrpt= function.getTableParameterList().getTable("DIRRPT");
.
.
.
.
.
.
.
.and more code
--------------------


The error it is giving is
---------->
<Apr 5, 2006 5:13:13 AM PDT> <Error> <HTTP> <BEA-101017> <[ServletContext(id=138
06908,name=web,context-path=/web)] Root cause of ServletException.
java.lang.NoClassDefFoundError
at com.mindspeed.incentiverpt.BAPI_IncentiveReport.getAeCodeNames(BAPI_I
ncentiveReport.java:112)
at jsp_servlet._incentiverpt.__incrpthome._jspService(__incrpthome.java:
193)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
(ServletStubImpl.java:1006)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:419)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:315)
at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispat
cherImpl.java:322)
at com.mindspeed.incentiverpt.Inc



Please help me out.

Thanks in advance
Nilesh Shah
 
Nilesh Sah
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
Can anyone provide me any help on this issue.

Thanks and Regards
Nilesh
 
Nilesh Sah
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I just want to know Is there any compatibility issue of jco.jar with WLS 8.1 sp4 version because it was running fine with sp2.

Thanks
Nilesh

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

My opnion on this is copy sapjcorfc.dll and llibrfc11or 12.dll on to C:\\Windows\System32 folder and restart the application. It may solve your problem.
 
Nilesh Sah
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Santosh,
My application environment is SOLARIS(SPARC) and I had already copied these files to the place where my jco.jar file is afterwards I restarted the server but still it is not workinga and giving same error as previous one.

Thanks
Nilesh Sah
 
Nilesh Sah
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ,
Any other ideas on this...I am really struggling hard to identify the reason of its not working.


Thanks and Regards
Nilesh Sah

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Nilesh

I've been strugling with same kind of problem and do feel for you. This problem is very confusing.

Mainly becuase BEA is the true source of this error !

I've seeked the dev2dev forums over and over again and came up with zero amount of answers.

I think I've finally began to get the true reason of this error.

BEA 8.1 sp 3 comes up with it's own jrockit java and alternative Sun's
jdk142_04

Now it goes like this. Take the peace of your code

-----------------------------------------------------

JCO.addClientPool(
com.abc.Configuration.get("sap_inckey"),
Integer.parseInt(Configuration.get("sap_maxcon")),
Configuration.get("sap_client"),
Configuration.get("sap_incuser"),
Configuration.get("sap_incpassword"),
Configuration.get("sap_language"),
Configuration.get("sap_host"),
Configuration.get("sap_incsystemnumber"));
---------------------------------------------------------

and cut it down for debug purposes.

The Java VM under bea does not handle your class properly.
Some java class ( Configuration.java maybe ? )
doest go trought the VM and therefor it can't handle the
class at all.

Therefore the servlet can't be loaded, becuase the VW does'nt have a functional instance of this class !!!
That's why the "NoClassDefFoundError"

I have the exact same problem with another application and I've maneged to get further to an error

D:\bea\user_projects\domains\mydomain\.\beasto\.wlnotdelete\extract\beasto_sto_sto\jsp_servlet\__index.java:123: cannot access hannu.dev.fi.Kukkuu
bad class file: D:\bea\user_projects\domains\mydomain\beastato\.wlnotdelete\extract\beasto_sto_sto\jarfiles\WEB-INF\lib\hannu9667.jar(hannu/dev/fi/Kukkuu.class)
class file has wrong version 49.0, should be 48.0
Please remove or make sure it appears in the correct subdirectory of the classpath.

Now this error can basicly be fixed with the right JAVA_VM version, but not as easily as one may think. There is alternative java for bea 8.1.3 to be used inside the installation files. See %WL%\jdk142_04, this won't probably help becuase it's basicly the same WM. I've tried to use jdk1.5.0_05, but then the whole bea won't start

You can see how to change the VM for bea domain from doc:
http://e-docs.bea.com/common/docs20/pdf/relnotes.pdf
section "Switching JDKs"

I post on this forum when I manage to resolve this problem some more
 
Hannu Ala-Harja
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try to compile your files using the target 1.4 option.
If your files has been compiled with java 1.5 then it won't fly in bea 8.1.3 becuase the javac executer can ondy execute files upto 48.0 or previous.

In other words it can't execute classes that has been compiled with javac thats is newer than the one inside BEA.

So this is my best guess for the solution of your problem :roll:
[ June 04, 2006: Message edited by: Hannu Ala-Harja ]
 
Hannu Ala-Harja
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The best and the safest way to beat this problem is to compile and create the jar file using either jrockit or the java included in bea package.
 
Nilesh Sah
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Hannu,
Thanks for your reply.I will try to do that and will get back to you with the results.

Thanks and Regards
Nilesh Sah
 
Nilesh Sah
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Hannu,
I had already compiled the java file where the above mentioned code is written and placed it in place of previous one and jco.jar is the file that is downloaded and I do not have code for it.

Thanks a lot
Nilesh Sah
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic