RE: Apache Tomcat/4.0.3 - HTTP Status 500 - Internal Server Error -HELP-ME-PLEASE
-Original Message- From: Korakaki Stella [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 28, 2002 7:39 AM To: Tomcat Users List Subject: Apache Tomcat/4.0.3 - HTTP Status 500 - Internal Server Error -HELP-ME-PLEASE java.lang.NoClassDefFoundError at Login2.doGet(Login2.java:51) at - Could someone tell me what is wrong ? Please help me !! Whatever class you are trying to load on line 51 of Login2.java is not available to Tomcat. Randy -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Apache Tomcat/4.0.3 - HTTP Status 500 - Internal Server Error -HELP-ME-PLEASE
Thanx Randy but I've placed my jar file with the classes needed at $CATALINA_HOME/common/classes/jCO.jar . This is not enough ? Stella -Original Message- From: Korakaki Stella [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 28, 2002 7:39 AM To: Tomcat Users List Subject: Apache Tomcat/4.0.3 - HTTP Status 500 - Internal Server Error -HELP-ME-PLEASE java.lang.NoClassDefFoundError at Login2.doGet(Login2.java:51) at - Could someone tell me what is wrong ? Please help me !! Whatever class you are trying to load on line 51 of Login2.java is not available to Tomcat. Randy -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] Stella Korakaki Koutoudis Consulting -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Apache Tomcat/4.0.3 - HTTP Status 500 - Internal Server Error -HELP-ME-PLEASE
Thanx Randy but I've placed my jar file with the classes needed at $CATALINA_HOME/common/lib/jCO.jar . This is not enough ? Stella -Original Message- From: Korakaki Stella [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 28, 2002 7:39 AM To: Tomcat Users List Subject: Apache Tomcat/4.0.3 - HTTP Status 500 - Internal Server Error -HELP-ME-PLEASE java.lang.NoClassDefFoundError at Login2.doGet(Login2.java:51) at - Could someone tell me what is wrong ? Please help me !! Whatever class you are trying to load on line 51 of Login2.java is not available to Tomcat. Randy -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] Stella Korakaki Koutoudis Consulting -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Apache Tomcat/4.0.3 - HTTP Status 500 - Internal Server Error -HELP-ME-PLEASE
A few questions to remove the obvious: 1. Have you restarted Tomcat after copying the jco.jar file? 2. Does the jco.jar file really have a file /com//jco.class? 3. Does Tomcat have permissions to read this file (more of an issue on Unix, but possible on windows)? 4. Can you run jar -xvf jco.jar to extract the jar file? 5. Have you tried putting the jar fine in the WEB-INF/lib directory to see if it works there? 6. Is Tomcat printing any error message (to catalina.log or the console) during startup that might indicate its not loading this jar? That's all I can think of right now. Try these and see if anything pops up, if not post back and I'll try another round. Randy -Original Message- From: Korakaki Stella [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 28, 2002 7:59 AM To: Tomcat Users List Subject: RE: Apache Tomcat/4.0.3 - HTTP Status 500 - Internal Server Error -HELP-ME-PLEASE Thanx Randy but I've placed my jar file with the classes needed at $CATALINA_HOME/common/lib/jCO.jar . This is not enough ? Stella -Original Message- From: Korakaki Stella [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 28, 2002 7:39 AM To: Tomcat Users List Subject: Apache Tomcat/4.0.3 - HTTP Status 500 - Internal Server Error -HELP-ME-PLEASE java.lang.NoClassDefFoundError at Login2.doGet(Login2.java:51) at - Could someone tell me what is wrong ? Please help me !! Whatever class you are trying to load on line 51 of Login2.java is not available to Tomcat. Randy -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] Stella Korakaki Koutoudis Consulting -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Apache Tomcat/4.0.3 - HTTP Status 500 - Internal Server Error -HELP-ME-PLEASE
So it executed the Servlet Login2 as evidence in the stacktrace root cause java.lang.NoClassDefFoundError at Login2.doGet(Login2.java:51) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) ... and it got all the way to line 51. It looks like there are other classes from this jar package that are being invoked. If they are being invoked with no exception then the jar file is found. But the class at line 51 is not found. My line counting isn't working so you need to point to the source code line 51. Also assuming your classes are like this: com.sap.mw.jco.JCO.Repository and the jco.jar file is in your WEB-INF/lib directory. -Original Message- From: Korakaki Stella [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 28, 2002 4:39 AM To: Tomcat Users List Subject: Apache Tomcat/4.0.3 - HTTP Status 500 - Internal Server Error -HELP-ME-PLEASE When I'm trying to execute the following servlet from the web browser: - import com.sap.mw.jco.*; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class Login2 extends HttpServlet { JCO.Client mConnection; JCO.Repository mRepository; public JCO.Function createFunction(String name) throws Exception { try { IFunctionTemplate ft = mRepository.getFunctionTemplate(name.toUpperCase()); if (ft == null) return null; return ft.getFunction(); } catch (Exception ex) { throw new Exception(Problem retrieving JCO.Function object.); } } public void doGet (HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { res.setContentType(text/html); PrintWriter out = res.getWriter(); String tmp; out.println(htmlbody); try { // Change the logon information to your own system/user mConnection = JCO.createClient(300, // SAP client username, // userid , // password EN, // language 127.0.0.1, // application server host name 00);// system number mConnection.connect(); mRepository = new JCO.Repository(ARAsoft, mConnection); } catch (Exception ex) { ex.printStackTrace(); System.exit(1); } JCO.Function function = null; JCO.Table codes = null; try { function = this.createFunction(ZRFC_CUSTOMERS); if (function == null) { System.out.println(ZRFC_CUSTOMERS + not found in SAP.); System.exit(1); } JCO.ParameterList input=function.getImportParameterList(); input.setValue(0001,BUKRS); mConnection.execute(function); codes = function.getTableParameterList().getTable(CUSTOMER); for (int i = 0; i codes.getNumRows(); i++) { codes.setRow(i); tmp=codes.getString(NAME1); if (tmp.length() 12 ) { out.println(li);out.println(tmp);} else {out.println(li);out.println(tmp.substring(0,12));} } } catch (Exception ex) { ex.printStackTrace(); System.exit(1); } out.println(/body/html); mConnection.disconnect(); } } -- Stella Korakaki Koutoudis Consulting -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Apache Tomcat/4.0.3 - HTTP Status 500 - Internal Server Error -HELP-ME-PLEASE
Thanx Carl, I've placed jCO.jar at $CATALINA_HOME/common/lib/ it didn't work. I've tried to extract it and placed the classes at $CATALINA_HOME/common/classes/ and didn't work either. Also, I tried $JAVA_HOME/jre/lib/ext/jCO.jar and all other possible paths but tomcat seemed that could not find it. I worked with Apache Jserv before and the same servlets worked fine but I want to use Tomcat now. Any idea someone ? So it executed the Servlet Login2 as evidence in the stacktrace root cause java.lang.NoClassDefFoundError at Login2.doGet(Login2.java:51) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) ... and it got all the way to line 51. It looks like there are other classes from this jar package that are being invoked. If they are being invoked with no exception then the jar file is found. But the class at line 51 is not found. My line counting isn't working so you need to point to the source code line 51. Also assuming your classes are like this: com.sap.mw.jco.JCO.Repository and the jco.jar file is in your WEB-INF/lib directory. -Original Message- From: Korakaki Stella [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 28, 2002 4:39 AM To: Tomcat Users List Subject: Apache Tomcat/4.0.3 - HTTP Status 500 - Internal Server Error -HELP-ME-PLEASE When I'm trying to execute the following servlet from the web browser: - import com.sap.mw.jco.*; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class Login2 extends HttpServlet { JCO.Client mConnection; JCO.Repository mRepository; public JCO.Function createFunction(String name) throws Exception { try { IFunctionTemplate ft = mRepository.getFunctionTemplate(name.toUpperCase()); if (ft == null) return null; return ft.getFunction(); } catch (Exception ex) { throw new Exception(Problem retrieving JCO.Function object.); } } public void doGet (HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { res.setContentType(text/html); PrintWriter out = res.getWriter(); String tmp; out.println(htmlbody); try { // Change the logon information to your own system/user mConnection = JCO.createClient(300, // SAP client username, // userid , // password EN, // language 127.0.0.1, // application server host name 00);// system number mConnection.connect(); mRepository = new JCO.Repository(ARAsoft, mConnection); } catch (Exception ex) { ex.printStackTrace(); System.exit(1); } JCO.Function function = null; JCO.Table codes = null; try { function = this.createFunction(ZRFC_CUSTOMERS); if (function == null) { System.out.println(ZRFC_CUSTOMERS + not found in SAP.); System.exit(1); } JCO.ParameterList input=function.getImportParameterList(); input.setValue(0001,BUKRS); mConnection.execute(function); codes = function.getTableParameterList().getTable(CUSTOMER); for (int i = 0; i codes.getNumRows(); i++) { codes.setRow(i); tmp=codes.getString(NAME1); if (tmp.length() 12 ) { out.println(li);out.println(tmp);} else {out.println(li);out.println(tmp.substring(0,12));} } } catch (Exception ex) { ex.printStackTrace(); System.exit(1); } out.println(/body/html); mConnection.disconnect(); } } -- Stella Korakaki Koutoudis Consulting -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] Stella Korakaki Koutoudis Consulting -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]