• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

help needed in jco programming

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi friends

when i try to connect with SAP server using jco i have some probem.

Connection with jco program is working fine. I make it ajava file and run separately).

Now i want do that with jsp.
I am getting error of
Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
org.apache.jsp.barcodeMainP_jsp._jspService(org.apache.jsp.barcodeMainP_jsp:124)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root cause

java.lang.NoClassDefFoundError
mySAP.JcoTest.createConnection(JcoTest.java:78)
mySAP.JcoTest.<init>(JcoTest.java:8)
org.apache.jsp.barcodeMainP_jsp._jspService(org.apache.jsp.barcodeMainP_jsp:74)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


note The full stack trace of the root cause is available in the Apache Tomcat/5.5.9 logs.


My Programs



My SAP calling program
<%@page language="java"
import="java.sql.*,java.io.*,mySAP.*,java.net.URL;"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>

<body>
<%!StringBuffer stringbuffer = new StringBuffer();
int testemp;%>
<%
String dofrom;
String doto;
String s;
String s1;
dofrom = request.getParameter("DOFrom");
doto = request.getParameter("DOTo");
ResultSet resultset;

String flag = request.getParameter("dall");
mySAP.JcoTest obj = new mySAP.JcoTest();
StringBuffer sb = obj.fetchData("one", "two");
out.println(sb);
try {

StringBuffer stringbuffer = new StringBuffer();
String separator = System.getProperty("file.separator");

String path = System.getProperty("user.dir") + separator;

} catch (Exception e) {
out.println("error%%%%%%%%%" + e);
}
%>
</body>
</html>
Regards
 
Ranch Hand
Posts: 180
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
seems to be JCO libraries are not in the classpath
 
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When dealing with JCO, you have to make sure the mysap dll's or so files are are there in the system path.

Cheers
Aneesh
 
Marshal
Posts: 75861
361
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You have been offered classpath and path. Not sure myself, but classpath sounds more likely to be correct. Remember to set the classpath for your application with the -cp flag, not by setting up a system classpath.
 
reply
    Bookmark Topic Watch Topic
  • New Topic