• 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

how to map sapjco.jar file to a jsp program

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In my program i am getting error of
org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: 1 in the generated java file
The type com.sap.mw.jco.JCO$Function cannot be resolved. It is indirectly referenced from required .class files

An error occurred at line: 1 in the generated java file
The type com.sap.mw.jco.JCO$Repository cannot be resolved. It is indirectly referenced from required .class files

An error occurred at line: 19 in the jsp file: /barCodeHanu.jsp
JCO.Client cannot be resolved to a type
16: try{
17:
18: SapConnectionBean mysap = new SapConnectionBean();
19: JCO.Client client = mysap.getSAPConnection();
20: JCO.Repository mRepository;
21: JCO.Function function = null;
22: try{


An error occurred at line: 19 in the jsp file: /barCodeHanu.jsp
The type com.sap.mw.jco.JCO$Client cannot be resolved. It is indirectly referenced from required .class files
16: try{
17:
18: SapConnectionBean mysap = new SapConnectionBean();
19: JCO.Client client = mysap.getSAPConnection();
20: JCO.Repository mRepository;
21: JCO.Function function = null;
22: try{


An error occurred at line: 20 in the jsp file: /barCodeHanu.jsp
JCO.Repository cannot be resolved to a type
17:
18: SapConnectionBean mysap = new SapConnectionBean();
19: JCO.Client client = mysap.getSAPConnection();
20: JCO.Repository mRepository;
21: JCO.Function function = null;
22: try{
23:


An error occurred at line: 21 in the jsp file: /barCodeHanu.jsp
JCO.Function cannot be resolved to a type
18: SapConnectionBean mysap = new SapConnectionBean();
19: JCO.Client client = mysap.getSAPConnection();
20: JCO.Repository mRepository;
21: JCO.Function function = null;
22: try{
23:
24: mRepository = new JCO.Repository("ARAsoft", client);


An error occurred at line: 24 in the jsp file: /barCodeHanu.jsp
JCO.Repository cannot be resolved to a type
21: JCO.Function function = null;
22: try{
23:
24: mRepository = new JCO.Repository("ARAsoft", client);
25: function = mysap.createFunction(mRepository, "Z_BC_LABEL");
26: if (function == null) {
27: out.println("Function is null!");


An error occurred at line: 39 in the jsp file: /barCodeHanu.jsp
JCO.Table cannot be resolved to a type
36: } catch (Exception e) {
37: out.println(e.toString());
38: }
39: JCO.Table table = function.getTableParameterList().getTable("ZBAR");
40: int numRows = table.getNumRows();
41: String[] value = new String[8];
42:


An error occurred at line: 48 in the jsp file: /barCodeHanu.jsp
com.sap.mw.jco.JCO.Field cannot be resolved to a type
45: try{
46: do
47: {
48: com.sap.mw.jco.JCO.Field tabField;
49: for(com.sap.mw.jco.JCO.FieldIterator fI = table.fields(); fI.hasMoreElements(); out.println(String.valueOf(tabField.getString())))
50: tabField = fI.nextField();
51:


An error occurred at line: 49 in the jsp file: /barCodeHanu.jsp
com.sap.mw.jco.JCO.FieldIterator cannot be resolved to a type
46: do
47: {
48: com.sap.mw.jco.JCO.Field tabField;
49: for(com.sap.mw.jco.JCO.FieldIterator fI = table.fields(); fI.hasMoreElements(); out.println(String.valueOf(tabField.getString())))
50: tabField = fI.nextField();
51:
52:


Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:423)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:316)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:294)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:281)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


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

Hope this is due to class path problem ...the jar file sapjco.jar can't capture...thi jar file is at WEB-INF/lib FOLDER...

is any need to give this in classpath?
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No. Putting it in WEB-INF/lib is enough. Be sure that you've got the right jar file and that it contains the classes that appear to be missing, and that you've put it in the WEB-INF/lib for the right web app.
 
I can't beleive you just said that. Now I need to calm down with this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic