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