Class/Package problem with tomcat

Hi everyone,
i am pretty new to tomcat and jsp and I have to setup a webapp using tomcat. Actually I setup the tomcat-server and moved all files in the webapps/ROOT/myapp directory. Unfortunately I get the following error-message when I access the main page of the webapp: org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 14 in the jsp file: /myapp/index.jsp
Generated servlet error:
    [javac] Compiling 1 source file
/usr/local/jakarta-tomcat-4.1.29/work/Standalone/localhost/_/myapp/index_jsp.java:43: package de.myclasses.myapp.beans does not exist
      de.myclasses.myapp.beans.MyClass tmb = null;The package de/myclasses/myapp/beans is in the classes directory in the WEB-INF folder within my application directory. So do I have to set something like a CLASSPATH somewhere?
Thanks!

Hi everyone,
i am pretty new to tomcat and jsp and I have to setup
a webapp using tomcat. Actually I setup the
tomcat-server and moved all files in the
webapps/ROOT/myapp In this case, the webapps/ROOT/ is you application directory (servlet context). The myapp is a sub-context, and does not get a WEB-INF directory.
So, either your classes should be in:
webapps/ROOT/WEB-INF/classes/...
or (better) you should make a new Servlet Context in parallel to the ROOT context (under webapps)
webapps/myapp/
and put the classes under
webapps/myapp/WEB-INF/classes/...
Don't forget to make a webapps/myapps/WEB-INF/web.xml.
directory. Unfortunately I get the
following error-message when I access the main page
of the webapp: org.apache.jasper.JasperException: Unable to compile
class for JSP
An error occurred at line: 14 in the jsp file:
/myapp/index.jsp
Generated servlet error:
[javac] Compiling 1 source file
/usr/local/jakarta-tomcat-4.1.29/work/Standalone/local
host/_/myapp/index_jsp.java:43: package
de.myclasses.myapp.beans does not exist
de.myclasses.myapp.beans.MyClass tmb =
tmb = null;The package de/myclasses/myapp/beans is in the
classes directory in the WEB-INF folder within my
application directory. So do I have to set something
like a CLASSPATH somewhere?
Thanks!

Similar Messages

  • Problems with Tomcat & Eclipse on MacOSX

    Hi everybody. I have a problem with Tomcat and Eclipse. I must make an application with JSF for my dissertation and i even become a new Mac user so i have some problems. I have installed Eclipse 3,3 Europe on Mac OSX 10,4, also I have installed Tomcat 5,5 setting up environment variable and users of Tomcat. Well, when I try to connect them creating a new server in Eclipse and select Tomcat as server and relative folder of origin, the problems begin. When I try to run on server a JSF project(naturally I have imported all the necessary libraries) it give this error to me: Could not load the Tomcat incomplete serveur configuration at /Servers/Tomcat v5.5 serveur at localhost-config.The configurator mau be corrupt or. Reason: Could not load the Tomcat incomplete serveur configuration at /Servers/Tomcat v5.5 serveur at localhost-config.The configurator mau be corrupt or incomplete. On what it can depend? It is possible that is a JRE problem? I do not find the folder jre on my file system(are novice with the mac). Thanks to all.

    This seems like a question that would be better put to an Eclipse forum.

  • Datasource Configuration problem with Tomcat-4.0.3

    Hi All !
    When I trying to open connection to my DB2 database in tomcat -4.0.3,
    I have put db2java.jar in /usr/local/jakartha-tomcat-4.03/common/lib directory
    when I am trying to connect Database through my servlet getting expections
    java.lang.NullPointerException: at DataSource ds = (DataSource)envContext.lookup("jdbc/SmsDBDS");
    here is my dbconnection class
    package com.ebizon.util.jdbc;
    import java.sql.*;
    import java.util.*;
    import javax.naming.*;
    import javax.sql.*;
    public class DBUtil {
    /* Ebizon DB Connection for Tomcat */
    public static Connection getEbizDBConnection() throws NamingException, SQLException {
    Connection conn = null;
    try {
    InitialContext initCtx = new InitialContext();
    Context envContext = (Context)initContext.lookup("java:/comp/env");
    DataSource ds = (DataSource)envContext.lookup("jdbc/SmsDBDS");
    conn = ds.getConnection();
    } catch (NamingException ne) {
    throw ne;
    } catch (SQLException se) {
    throw se;
    return conn;
    And my resource definition in server.xml (/usr/local/jakartha-tomcat-4.0.3/conf/server.xml)
    <Context path="/DBTest" docBase="DBTest"
    debug="5" reloadable="true" crossContext="true">
    <Logger className="org.apache.catalina.logger.FileLogger"
    prefix="localhost_DBTest_log." suffix=".txt"
    timestamp="true"/>
    <Resource name="jdbc/SmsDBDS"
    auth="Container"
    type="javax.sql.DataSource"/>
    <ResourceParams name="jdbc/SmsDBDS">
    <parameter>
    <name>factory</name>
    <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
    </parameter>
    <parameter>
    <name>maxActive</name>
    <value>100</value>
    </parameter>
    <parameter>
    <name>maxIdle</name>
    <value>30</value>
    </parameter>
    <parameter>
    <name>maxWait</name>
    <value>10000</value>
    </parameter>
    <!-- DB2 dB username and password for dB connections -->
    <parameter>
    <name>username</name>
    <value>smsdb</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>smsdb</value>
    </parameter>
    <!-- Class name for mm.mysql JDBC driver -->
    <parameter>
    <name>driverClassName</name>
    <value>COM.ibm.db2.jdbc.app.DB2Driver</value>
    </parameter>
    <parameter>
    <name>url</name>
    <value>jdbc:db2:smsdb</value>
    </parameter>
    </ResourceParams>
    </Context>
    this is my Web Application descriptor /WEB-INF/web.xml
    <resource-ref>
    <description>
    Resource reference to a factory for java.sql.Connection
    instances that may be used for talking to a particular
    database that is configured in the server.xml file.
    </description>
    <res-ref-name>
    jdbc/EmployeDB
    </res-ref-name>
    <res-type>
    javax.sql.DataSource
    </res-type>
    <res-auth>
    Container
    </res-auth>
    </resource-ref>
    Please look at once above , Do i missing any thing?
    Anyhelp is greatly appreciate
    Many thanks in advance
    With Regards
    Madhu Reddy

    I don't see any problem with your files, so unfortunately I can't help. Since this forum is about the J2EE SDK, people may not have that much experience with standalone Tomcat. You may want to try the Tomcat user mailing list for a question about Tomcat: http://jakarta.apache.org/site/mail2.html

  • DB2 Configuration problem with Tomcat-4.0.3

    When I trying to open connection to my DB2 database in tomcat -4.0.3,
    I have put db2java.jar in /usr/local/jakartha-tomcat-4.03/common/lib directory
    when I am trying to connect Database through my servlet getting expections
    java.lang.NullPointerException: at DataSource ds = (DataSource)envContext.lookup("jdbc/SmsDBDS");
    here is my dbconnection class
    package com.ebizon.util.jdbc;
    import java.sql.*;
    import java.util.*;
    import javax.naming.*;
    import javax.sql.*;
    public class DBUtil {
    /* Ebizon DB Connection for Tomcat */
    public static Connection getEbizDBConnection() throws NamingException, SQLException {
    Connection conn = null;
    try {
    InitialContext initCtx = new InitialContext();
    Context envContext = (Context)initContext.lookup("java:/comp/env");
    DataSource ds = (DataSource)envContext.lookup("jdbc/SmsDBDS");
    conn = ds.getConnection();
    } catch (NamingException ne) {
    throw ne;
    } catch (SQLException se) {
    throw se;
    return conn;
    And my resource definition in server.xml (/usr/local/jakartha-tomcat-4.0.3/conf/server.xml)
    <Context path="/DBTest" docBase="DBTest"
    debug="5" reloadable="true" crossContext="true">
    <Logger className="org.apache.catalina.logger.FileLogger"
    prefix="localhost_DBTest_log." suffix=".txt"
    timestamp="true"/>
    <Resource name="jdbc/SmsDBDS"
    auth="Container"
    type="javax.sql.DataSource"/>
    <ResourceParams name="jdbc/SmsDBDS">
    <parameter>
    <name>factory</name>
    <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
    </parameter>
    <parameter>
    <name>maxActive</name>
    <value>100</value>
    </parameter>
    <parameter>
    <name>maxIdle</name>
    <value>30</value>
    </parameter>
    <parameter>
    <name>maxWait</name>
    <value>10000</value>
    </parameter>
    <!-- DB2 dB username and password for dB connections -->
    <parameter>
    <name>username</name>
    <value>smsdb</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>smsdb</value>
    </parameter>
    <!-- Class name for mm.mysql JDBC driver -->
    <parameter>
    <name>driverClassName</name>
    <value>COM.ibm.db2.jdbc.app.DB2Driver</value>
    </parameter>
    <parameter>
    <name>url</name>
    <value>jdbc:db2:smsdb</value>
    </parameter>
    </ResourceParams>
    </Context>
    this is my Web Application descriptor /WEB-INF/web.xml
    <resource-ref>
    <description>
    Resource reference to a factory for java.sql.Connection
    instances that may be used for talking to a particular
    database that is configured in the server.xml file.
    </description>
    <res-ref-name>
    jdbc/EmployeDB
    </res-ref-name>
    <res-type>
    javax.sql.DataSource
    </res-type>
    <res-auth>
    Container
    </res-auth>
    </resource-ref>
    Please look at once above , Do i missing any thing?
    Anyhelp is greatly appreciate
    Many thanks in advance
    With Regards
    Madhu Reddy

    Hi,
    I have same problem. But unfortunately there does not exist a solution.
    You can read the explanation of this topic at http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html#Non%20DBCP%20Solutions
    Non DBCP Solutions. I understand Tomcat supports only MySQL, PostgreSQL, and Oracle 8i but not DB2.
    DataSource ds = (DataSource)envContext.lookup("jdbc/SmsDBDS");
    Up to now everything is fine, ds is not null, but inside ds (password, url, username...) all of them are null
    So when you execute conn = ds.getConnection(); there will be exception.
    If you find any solution please inform me.
    [email protected]

  • Class loading problem with websphere 6.1

    Hello
    We have a jsf application that works fine with tomcat as well as jboss. Now we need to deploy on websphere 6.1 and encounter some problem.
    We followed the specifications of this link [regarding jsf and Weblogic|http://www-01.ibm.com/support/docview.wss?uid=swg21243668] , i.e. made the myfaces jars a shared library (left tomahawk libs in webapp though).
    Now i get java.lang.ClassCastException: javax.faces.component.UIViewRoot incompatible with com.opentext.docviewer.ui.component.toolbar.Toolbar
         at com.opentext.docviewer.ui.component.toolbar.ToolbarTag.setProperties(ToolbarTag.java:66)
         at javax.faces.webapp.UIComponentTag.findComponent(UIComponentTag.java:536)
         at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:312)
         at com.ibm._jsp._toolbar._jspx_meth_dv_toolBar_0(_toolbar.java:183)
         at com.ibm._jsp._toolbar._jspService(_toolbar.java:87)
         at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:85)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966)
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:907)
         at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:118)I wrote a small jsp page that showed me the clasloader order of the class javax.faces.component.UIViewRoot and got this:
    System path
    Webapp path
    * bundleresource://31/javax/faces/component/UIViewRoot.class
    * wsjar:file:/E:/shared/myfaces/myfaces-api-1.1.4.jar!/javax/faces/component/UIViewRoot.class
    So somehow there is a "bundleresource"?
    I changed the classloading mechanisms accoording to the link mentioned above, but now i run out of ideas :-(
    Regards
    Edited by: mark1971 on Sep 10, 2008 2:21 AM

    Hi Per,
    Is this a reproducible exception? Looking at the source code, it comes from an impossible place:
    try
        // commit logic
    catch (RuntimeException e)
        log("CoherenceRA: Commit failed:\n" + getStackTrace(e));
        rollback();
        LocalTransactionException lte = new LocalTransactionException(e.toString()); // line 37!!!
        lte.setLinkedException(e);
        throw lte;
        }As you can see, the NPE on line 37 could only come as a result of the "e == null" condition, which would be against the "catch" contract.
    I wonder if you run any profiling, debugging tool or AOP framework that "instruments" the resource adapter code and causes an NPE in a place that cannot throw it?
    Regards,
    Gene

  • Problem with Tomcat 6

    Hi guys,
    I am with a very strange problem with my job here.
    We had a server working with Tomcat 5 and it didn't have problem, but wanted to changed to Tomcat 6.
    So.. we changed and it ran normal and well.
    The problem is when we stress the server with one or more big queries, execptions is showed that didn't show with Tomcat 5:
    java.lang.Exception: [Microsoft][SQLServer 2000 Driver for JDBC]Object has been closed
    Using SQL Server 2000
    java.lang.Exception: The connection is closed.
    Using SQL Server 2005
    java.lang.Exception: I/O Error: socket closed.
    Using SQL Server 2005 with jTDS driver
    It happens with Oracle too.
    Can anybody help me?
    Thanks!

    hi i'm having a similar problem launching a servlet in eclipse. I did the above changes and still nothing:
    instead i keep getting :
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Wrapper cannot find servlet class DataServlet or a class it depends on

  • Problems with Tomcat 4.0 and jdk 1.3.1 (jsp:include) Help Gurus...

    Im running examples of the include:
    <jsp:include page="xxx.jsp" flush="true">
    and received error:
    org.apache.jasper.JasperException: No se puede compilar la clase para JSP
    An error occurred at line: 17 in the jsp file: /jsp/include/include.jsp
    Generated servlet error:
    /Programas/Tomcat4/work/localhost/examples/jsp/include/include$jsp.java:79: Method include(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, javax.servlet.jsp.JspWriter, boolean) not found in class org.apache.jasper.runtime.JspRuntimeLibrary.
    JspRuntimeLibrary.include(request, response, "/jsp/include/foo.html" + jspxqStr, out, true);
    ^
    Please Help me Im running this equal with:
    <%@ include file="xxx.jsp" %>
    and runnig fine....

    The two means of including files are different in their approach.
    Using <jsp:include .../> compilation of the included jsp is done at run -time not during compilation.
    Using <%@ include .../> compiles at compile time.
    Looking at the error it seems that the method JspRuntimeLibrary.include is not being found which suggests that you may have a classpath problem. Check that there is not a servlet.jar in the classpath that is from a earlier spec than the one provided with Tomcat.
    Dave

  • Eclipse problem with Tomcat when running jsp

    when I start tomcat from CMD, it starts normally and display http://localhost:8080/ properly
    but when I start tomcat from Eclipse, it starts the server normally,
    but it can't display http://localhost:8080/ properly,
    I guess that the problem with the java classpath isn't defined correctly in Eclipse
    but but I've tried it before, and it doesn't work
    here the error msg from Eclipse console:
    [INFO] Http11Protocol - -Initializing Coyote HTTP/1.1 on http-8080
    Starting service Tomcat-Standalone
    Apache Tomcat/4.1.31
    [INFO] PropertyMessageResources - -Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
    [INFO] PropertyMessageResources - -Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
    [INFO] PropertyMessageResources - -Initializing, config='org.apache.webapp.admin.ApplicationResources', returnNull=true
    [INFO] Http11Protocol - -Starting Coyote HTTP/1.1 on http-8080
    [INFO] ChannelSocket - -JK2: ajp13 listening on /0.0.0.0:8009
    [INFO] JkMain - -Jk running ID=0 time=0/120 config=C:\jakarta-tomcat-4.1.31\conf\jk2.properties
    Error compiling file: C:\jakarta-tomcat-4.1.31\work\Standalone\localhost\_\/index_jsp.java [javac] Compiling 1 source file
    [javac] Modern compiler not found - looking for classic compiler
    Info: Compile: javaFileName=C:\jakarta-tomcat-4.1.31\work\Standalone\localhost\_\/index_jsp.java
    classpath=C:/jakarta-tomcat-4.1.31/shared/classes/;C:/jakarta-tomcat-4.1.31/common/classes/;C:/jakarta-tomcat-4.1.31/common/endorsed/xercesImpl.jar;C:/jakarta-tomcat-4.1.31/common/endorsed/xmlParserAPIs.jar;C:/jakarta-tomcat-4.1.31/common/lib/activation.jar;C:/jakarta-tomcat-4.1.31/common/lib/ant-launcher.jar;C:/jakarta-tomcat-4.1.31/common/lib/ant.jar;C:/jakarta-tomcat-4.1.31/common/lib/commons-collections.jar;C:/jakarta-tomcat-4.1.31/common/lib/commons-dbcp-1.1.jar;C:/jakarta-tomcat-4.1.31/common/lib/commons-logging-api.jar;C:/jakarta-tomcat-4.1.31/common/lib/commons-pool-1.1.jar;C:/jakarta-tomcat-4.1.31/common/lib/jasper-compiler.jar;C:/jakarta-tomcat-4.1.31/common/lib/jasper-runtime.jar;C:/jakarta-tomcat-4.1.31/common/lib/jdbc2_0-stdext.jar;C:/jakarta-tomcat-4.1.31/common/lib/jndi.jar;C:/jakarta-tomcat-4.1.31/common/lib/jta.jar;C:/jakarta-tomcat-4.1.31/common/lib/mail.jar;C:/jakarta-tomcat-4.1.31/common/lib/naming-common.jar;C:/jakarta-tomcat-4.1.31/common/lib/naming-factory.jar;C:/jakarta-tomcat-4.1.31/common/lib/naming-resources.jar;C:/jakarta-tomcat-4.1.31/common/lib/servlet.jar
    cp=C:\jakarta-tomcat-4.1.31\shared\classes
    cp=C:\jakarta-tomcat-4.1.31\common\classes
    cp=C:\jakarta-tomcat-4.1.31\common\endorsed\xercesImpl.jar
    cp=C:\jakarta-tomcat-4.1.31\common\endorsed\xmlParserAPIs.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\activation.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\ant-launcher.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\ant.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\commons-collections.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\commons-dbcp-1.1.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\commons-logging-api.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\commons-pool-1.1.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\jasper-compiler.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\jasper-runtime.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\jdbc2_0-stdext.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\jndi.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\jta.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\mail.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\naming-common.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\naming-factory.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\naming-resources.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\servlet.jar
    work dir=C:\jakarta-tomcat-4.1.31\work\Standalone\localhost\_
    srcDir=C:\jakarta-tomcat-4.1.31\work\Standalone\localhost\_
    include=index_jsp.java
    Exception compiling Cannot use classic compiler, as it is not available. A common solution is to set the environment variable JAVA_HOME to your jdk directory.
    Exception:
    Cannot use classic compiler, as it is not available. A common solution is to set the environment variable JAVA_HOME to your jdk directory.
         at org.apache.tools.ant.taskdefs.compilers.Javac12.execute(Javac12.java:72)
         at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:942)
         at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:764)
         at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:282)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:328)
         at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:427)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:142)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         at java.lang.Thread.run(Thread.java:479)
    Cannot use classic compiler, as it is not available. A common solution is to set the environment variable JAVA_HOME to your jdk directory.
         at org.apache.tools.ant.taskdefs.compilers.Javac12.execute(Javac12.java:72)
         at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:942)
         at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:764)
         at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:282)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:328)
         at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:427)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:142)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         at java.lang.Thread.run(Thread.java:479)
    Here are my system settings :
    Eclipse 2.1.3
    plugin : tomcatPluginV21, lomboz.213
    Jakarta-tomcat-4.1.31
    JAVA_HOME      : C:\jdk1.3.1_15
    CATALINA_HOME : C:\jakarta-tomcat-4.1.31
    Here are my Eclipse settings :
    http://server2.uploadit.org/files/marvelousgame-01.JPG
    http://server3.uploadit.org/files/marvelousgame-02.JPG
    http://server2.uploadit.org/files/marvelousgame-03.JPG
    http://server3.uploadit.org/files/marvelousgame-04.JPG
    http://server2.uploadit.org/files/marvelousgame-05.JPG
    http://server3.uploadit.org/files/marvelousgame-06.JPG
    thx!!!

    I would suggest updating your software to the latest versions - java 1.4.2 or higher, tomcat 5 or higher, Eclipse 3. That should fix any incompatibilities you are experiencing.
    As to your problem, it seems the tomcat you are trying to run from Eclipse wants a newer Java version (1.4.2 most likely).

  • Problem with Tomcat 5.0

    Hi there,
    I have a .java file inside \WEB-INF\classes\ directory. This .java file has a "public static void main" method that calls al the other methods in the class.
    I want to know if its possible for me to create an JSP file to call this .java file. If so how can i do it?
    Thanks!!

    NerdVix wrote:
    Hi there,
    I have a .java file inside \WEB-INF\classes\ directory. Wrong. .java files do you no good in that directory. Only .class files belong there.
    This .java file has a "public static void main" method that calls al the other methods in the class.Fine - for testing on a command line.
    I want to know if its possible for me to create an JSP file to call this .java file. If so how can i do it?What part don't you understand? Writing JSPs? Calling methods? What is a person so ignorant doing with Tomcat anyway?
    It's possible to call main, but not a good idea.
    %

  • Problems with tomcat 4.0.1

    hello,
    i�ve written some servlets using forte 3.0 with tomcat 3.2.
    everything works fine as long as I don�t run the servlets with tomcat 4.0.1.
    i use the request dispatcher / forward method - which dosn�t work reliable.
    it�s a list on which the user has to select one topic. the strange thing about it is that it works when you choose "back" after the error (dispatcher = null) has occured and select a different topic on that list - only the first choice makes en error.
    running on tomcat 3.2 with forte it works fine. but i get the following message in the tomcat output window:
    java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key dispatcher.forwardException
    and
    2002-01-13 11:40:05 - Ctx( /lg002234 ): Exception in: R( /lg002234 + /eingaben + null) - javax.servlet.ServletException: cannot find message associated with key : dispatcher.forwardException
    can somebody help?
    is use the dispatcher three times in that post-method - ist that a problem?

    ...sorry
    it�s not a problem with the requestdispatcher,
    problem is, that with tomcat 4.0.1 a parameter
    sometimes gets lost - but not with tomcat 3.2
    critical code is:
    String tierartAuswahl = request.getParameter("tierartAuswahl");
    is that a known bug of tomcat 4.0.1??

  • Problem with Tomcat server

    Hi,
    I'm just writing to inform you about a problem with the Oracle 9i database I found out.
    I have downloaded and installed the release 2 enterprise/standard/personal edition for Windows NT/2000/XP.
    After doing that I could not start my Tomcat server any more. Although I have tested the situation with many different releases of the Apache Tomcat server it did not work.
    Then I've deleted the Oracle database and just installed the client release. And now it works!
    I'd be grateful if one of you could tell me what's the problem and how I can solve it.
    Thanks for your help.
    Best regards,
    Steffi

    the localhost.log file shows
    02-Jun-2008 13:57:36 org.apache.catalina.core.ApplicationContext log
    INFO: ContextListener: contextInitialized()
    02-Jun-2008 13:57:36 org.apache.catalina.core.ApplicationContext log
    INFO: SessionListener: contextInitialized()
    02-Jun-2008 13:58:23 org.apache.catalina.core.ApplicationContext log
    INFO: SessionListener: contextDestroyed()
    02-Jun-2008 13:58:23 org.apache.catalina.core.ApplicationContext log
    INFO: ContextListener: contextDestroyed()
    and the catalina.log file shows..
    02-Jun-2008 13:58:24 org.apache.coyote.http11.Http11Protocol destroy
    INFO: Stopping Coyote HTTP/1.1 on http-8080
    i couldnot understand anything..how to rectify that..
    thanks in advance

  • Packaging problem with Arial small capital

    Hi there,
    I'm busy with my first real grafic assignment and I'm having trouble with my InDesign cs5 document. The same document in CS3 (I skipped cs4) had no problem.
    The steps I make:
    - preflight check is ok
    - I open the package window, it's al ok
    - press the package button
    - then 'next' on the press instructions
    - I choose a folder and press ok
    - A warning appears. something about restrictions to copy or use a font software for a service provider and trouble with the copyright. (too bad I have no restricted font, I use only Arial regular and in small capital)
    - I press ok to ignore it
    - The package is made and it al looks good until I open the indesign document I just packed. The small capital text has changed in regular. The small capital button does not work anymore in this document, so I can't change it back to small capital again.
    When testing with an other document and more fonts the same problem occurs.
    The first version of my assignment (made in cs3) had no problem with the package tool.
    The only forum in the direction of this problem is here but I haven't got any idea what to do.
    Could anyone help me? Did I do something wrong or is it a cs5 bug?
    Thanks in advance.
    Marianne

    Yes, it's a bug. It was fixed in one of the updates. Current version of CS5 is 7.0.4 and you should install the patch if you haven't done it already.

  • Javabeans problem with Tomcat

    Hi!
    I�m using Tomcat 5.5 with jdk5.0. I�m trying to start using beans but can�t get my jsp-pages to read the beans. I have compiled the bean and keep the .class file in
    C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ROOT\WEB-INF\classes\Beans\test.class
    I keep the .jsp file in
    C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ROOT\kise\test.jsp
    It seems like the bean is not found. I�m thinking that I might need to set some paths but I don�t know which ones or how to set them.
    When trying to open the .jsp file that refers to the bean I get an internal server error message:
    org.apache.jasper.JasperException: /kise/test.jsp(8,6) The value for the useBean class attribute Beans.test is invalid.
         org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
         org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:405)
         org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:146)
         org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1223)
         org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1116)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
         org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
         org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
         org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
         org.apache.jasper.compiler.Generator.generate(Generator.java:3268)
         org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:189)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:296)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    Does anyone know what might be wrong? I would be very grateful for some help, I have been working on solving this for a day now.... /Malin

    Ok, here is the code for the bean:
    package Beans;
    import java.io.*;
    import java.beans.*;
    public class test implements java.io.Serializable {
         public String name;
         public String getName() {
              return name;
         public void setName(String value) {
              name=value;
    and here is the jsp-code:
    <HTML>
    <HEAD><TITLE>Test</TITLE>
    <BODY>
    <%@ page language="java" %>
    <%@ page import="Beans.test" %>
    <jsp:useBean id="malin" scope="session" class="Beans.test" />
    <jsp.setProperty name="malin" property="name" value="korv" />
    <jsp:getProperty name="malin" property="name" />
    </BODY>
    </HTML>
    Thanks for helping. /Malin

  • Problem with TOMCAT again !

    I�m trying to deploy to TOMCAT 5028. with .war that has no access to database no problem it works fine.
    but whem my .war has to access a database i got:
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: javax.faces.FacesException: Can't instantiate class: 'test.Page1'.. class test.Page1 : javax.faces.FacesException: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:209)
    root cause
    javax.faces.FacesException: javax.faces.FacesException: Can't instantiate class: 'test.Page1'.. class test.Page1 : javax.faces.FacesException: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'
         com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreManagedBeans(ApplicationAssociate.java:308)
         com.sun.faces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:78)
         com.sun.faces.el.impl.NamedValue.evaluate(NamedValue.java:125)
         com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:243)
         com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:173)
         com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154)
         com.sun.jsfcl.app.ViewHandlerImpl.setupPageBean(ViewHandlerImpl.java:271)
         com.sun.jsfcl.app.ViewHandlerImpl.createView(ViewHandlerImpl.java:126)
         com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:164)
         com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:221)
         com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.
    I deploy the .war to application server and it works just fine.
    and i configure the tomcat with:
    JNDI Name: jdbc/test
    Data Source URL: jdbc:mysql://192.168.0.2:3306/test
    JDBC Driver Class: org.gjt.mm.mysql.
    User Name: root
    Password: admin
    Max. Active Connections: 20     
    Max. Idle Connections: 20
    Max. Wait for Connection: 5000
    the only thing different in application server is the the Jdbc Driver Class.
    And I am using Creator update 7 to generate the .war
    am i missing something ????
    Regards
    Marlos Rodrigues

    I found a simple way to deploy on Tomcat.
    *** Copy standard.jar, jstl.jar and mysql-connector-xxx.jar (if you are using mysql otherwise the drivers jar for the DB you are using).
    *** Edit the Tomcat conf/context.xml config file and add a WatchedResource :
    <WatchedResource>META-INF/context.xml</WatchedResource>
    *** Add your context.xml to META-INF of your war :
    <Context path="/DBTest" docBase="DBTest"
            debug="5" reloadable="true" crossContext="true">
      <Resource name="jdbc/TestDB" auth="Container" type="javax.sql.DataSource"
                   maxActive="100" maxIdle="30" maxWait="10000"
                   username="javauser" password="javadude" driverClassName="com.mysql.jdbc.Driver"
                   url="jdbc:mysql://localhost:3306/javatest?autoReconnect=true"/>
    </Context>This will create a config file in conf/Catalina/localhost with the context path name, so in this case DBTest.xml
    Hope that helps! That's how I got it working...

  • Problem with tomcat 5 clustering

    Hi all,
    I am having one problem while performing tomcat clustering..
    its showing one exception while starting the tomcat... i would be grateful if somebody help me out....
    Feb 13, 2006 9:44:41 AM org.apache.catalina.cluster.tcp.SimpleTcpCluster start
    INFO: Cluster is about to start
    Feb 13, 2006 9:44:41 AM org.apache.catalina.cluster.tcp.SimpleTcpCluster start
    INFO: Sleeping for 2000 secs to establish cluster membership
    Feb 13, 2006 9:44:41 AM org.apache.catalina.cluster.tcp.SimpleTcpCluster start
    SEVERE: Unable to start cluster.
    java.lang.NullPointerException
    at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClas
    sLoader.java:804)
    at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClas
    sLoader.java:756)
    at org.apache.catalina.cluster.MembershipFactory.getMembershipService(Me
    mbershipFactory.java:93)
    at org.apache.catalina.cluster.tcp.SimpleTcpCluster.start(SimpleTcpClust
    er.java:517)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1115)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:832)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1125)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:518
    at org.apache.catalina.core.StandardService.start(StandardService.java:5
    19)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:234
    5)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:598)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398)
    Feb 13, 2006 9:44:41 AM org.apache.catalina.core.StandardHost getDeployer
    INFO: Create Host deployer for direct deployment ( non-jmx )
    Feb 13, 2006 9:44:41 AM org.apache.catalina.core.StandardHostDeployer install
    INFO: Processing Context configuration file URL file:D:\tomcat50\conf\Catalina\l
    ocalhost\admin.xml
    Feb 13, 2006 9:44:42 AM org.apache.struts.util.PropertyMessageResources <init>
    thanks and regards

    java.lang.NoSuchMethodError: org.apache.naming.resources.ProxyDirContext.lookupCache(Ljava/lang/String;)Lorg/apache/naming/resources/CacheEntry;     org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:663)
    Looks to me like you're running with a mix-n-match version of classes. The serveResource method is expecting that you have the correct version of the org.apache.naming.resources.ProxyDirContext class which has that lookupCache method with that signature, but it is not there. I don't know how to tell you to fix your installation, but it is goofed up.

Maybe you are looking for