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.
Similar Messages
-
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). -
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 -
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 ReddyI 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
-
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?? -
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 -
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,
Steffithe 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 -
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.
% -
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 ReddyHi,
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] -
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 RodriguesI 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... -
Migration problems with Tomcat 4.1.10. Please help.
Product: Java Web Application
Operating system: Redhat Linux 7.3
Web Server: Apache 1.3.x
Application server: Tomcat 4.1.10
Database server: MySQL 3.23.x
Java Architecture: JSP (presentation) + Java Bean (Business logic)
JDK version: 1.3.1_04
Hi,
When we tried to migrate our application from Tomcat 4.0.4 to Tomcat 4.1.10, we found that the relative path references like ../xyz/ab.jsp are not properly interpreted by Netscape and the url seen on the address bar is something like this (http://www.sww.com/../xyz/ab.jsp. Also dynamic jsp forwarding support seems to have changed. While forwarding, the dynamic parameters attached are automatically url encoded. We have tested our application on Tomcat 4.0.4, there were no such issues. Since we have used these sort of things in many places in our application it will be difficult for us to change in all those places. Can anybody tell us what we can do about it?
thanks in advance,
Srikanth. S.Hi,
http://www.xyz.com/swiz/test.jsp:
<%
response.sendRedirect("../sebase/common_login.jsp");
%>
When I run http://www.xyz.com/swiz/test.jsp with the above code, the url is displayed http://www.xyz.com/swiz/../sebase/common_login.jsp in Netscape address bar when the application is run on tomcat 4.1.10. With Internet explorer and opera, it reads http://www.xyz.com/sebase/common_login.jsp. But on Tomcat 4.0.4, there is no problem even with Netscape. Since we are tracking the urls in many places in our application, we are having problem because of the above said type of url interpretation.
thanks in advance,
Srikanth. S. -
J2SE 1.4 Logger configuration problems with Tomcat 4.0
I'm using Tomcat 4.0 as a servlet container and I'm trying out the new J2SE 1.4 logging API.
Its working fine with the standard settings, which sets the level to INFO on the console handler.
I would like to set the level to FINER to show some debugging info, but can't seem to get it going.
I have tried setting the default level in my %JAVA_HOME%\jre\lib\logging.properties file, but it doesn't want to display log records of level FINER.
I have also change the console handler to FINER by setting java.util.logging.ConsoleHandler.level = FINER
I have also specified the config file parameter to point to a config file explicitly using the -Djava.util.logging.config.file=%CATALINA_HOME%\conf\logging.properties parameter in the catalina.bat script.
Anyone got this working?
--KimSolved it. Isn't that always the way, you get frustrated enough to post a message, then you solve it 5 minutes later.
It was a simple problem of the higher level overriding the lower levels.
--Kim -
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 regardsjava.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. -
Security problem with tomcat and Ms Access
Hi there,
I have read some other posts about this problem but I still do know what the solution is... I am using Tomcat 5.5 and Java 1.5 with Windows Vista Beta
I have a class to connect de a Ms access, using ODBC. If I test it with a console main it works fine but when I try to connect using a servlet it does not work and I got this error trace:
java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.jdbc.odbc)
java.security.AccessControlContext.checkPermission(Unknown Source)
java.security.AccessController.checkPermission(Unknown Source)
java.lang.SecurityManager.checkPermission(Unknown Source)
java.lang.SecurityManager.checkPackageAccess(Unknown Source)
sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
java.lang.ClassLoader.loadClass(Unknown Source)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1267)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
java.lang.ClassLoader.loadClassInternal(Unknown Source)
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Unknown Source)
model.Conect.GeneraConexion(Conect.java:17)
model.Mediador.creaConexion(Mediador.java:12)
model.TestServlet.processRequest(TestServlet.java:23)
model.TestServlet.doGet(TestServlet.java:35)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Unknown Source)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
Any ideas? Thanks a lot in advanced.
LJHi there,
I have read some other posts about this problem but I still do know what the solution is... I am using Tomcat 5.5 and Java 1.5 with Windows Vista Beta
I have a class to connect de a Ms access, using ODBC. If I test it with a console main it works fine but when I try to connect using a servlet it does not work and I got this error trace:
java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.jdbc.odbc)
java.security.AccessControlContext.checkPermission(Unknown Source)
java.security.AccessController.checkPermission(Unknown Source)
java.lang.SecurityManager.checkPermission(Unknown Source)
java.lang.SecurityManager.checkPackageAccess(Unknown Source)
sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
java.lang.ClassLoader.loadClass(Unknown Source)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1267)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
java.lang.ClassLoader.loadClassInternal(Unknown Source)
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Unknown Source)
model.Conect.GeneraConexion(Conect.java:17)
model.Mediador.creaConexion(Mediador.java:12)
model.TestServlet.processRequest(TestServlet.java:23)
model.TestServlet.doGet(TestServlet.java:35)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Unknown Source)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
Any ideas? Thanks a lot in advanced.
LJ -
A problem with Tomcat (Can't run tomcat as a service.).
Hi
May be you can help me (please).
I do the following steps, as described in many documents I've found.
1. Downloaded the jk_nt_service.exe and put it into jdk1.3.1jre\bin\classic
2. configured wrapper.properties:
wrapper.tomcat_home=C:\tomcat324 wrapper.java_home=C:\work\jdk1.3.1
3. Run:
C:\>jk_nt_service.exe -i tomcat C:\tomcat324conf\wrapper.properties
C:\>jk_nt_service.exe -s tomcat
C:\>net start tomcat
In this step I get the following error:
A system error has occurred.
System error 1067 has occurred.
The process terminated unexpectedly.
I've got the same error on other computers and using Alexandria's program.. As I understood it's not only my problem, others have it too.
Thanks in advance.Hi,
First U should check if IIS and Tomcat are running together then Tomcat won't start coz both use the 80 port. u have shut down IIS and use Tomcat and enable Tomcat to start with the services, If shutting down IIS is not a problem.
If u need both IIS and Tomcat to run together then u have change the server http port u can do it in the following manner
drive:\Apache Tomcat 4.0\conf directory.
Edit the sever.xml file
In the server.xml file u will have to change the port in the following piece
<!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
<Connector className="org.apache.catalina.connector.http.HttpConnector"
port="8080" minProcessors="5" maxProcessors="75"
enableLookups="true" redirectPort="8443"
acceptCount="10" debug="0" connectionTimeout="60000"/>
<!-- Note : To disable connection timeouts, set connectionTimeout value
to -1 -->
Change the port 8080 to 808x where x is any number between 0 to 9
Restart the machine and this should work
Good Luck
Bye,
MAX
Maybe you are looking for
-
There exist some vulnerability in Yosemite.. The last 5 months i have had to remove Superfish 5 times, and Ransomeware 15 times.. Only browser i use is safari, closed source. I have 2 ext Web of Trust, Blur.. Whenever i would sign off from internet
-
How to export single object of LSMW to already existing project
I want to export one object of LSMW project to another project which is already exists and conatins some subprojects and objects. Menas I want to export one object to already exsiting project. How can I do this?
-
ADE doesn't seem to recognize my Google Nexus (2013) tablet. Is it not a supported device?
-
Preview: What happened to highlighting function?
I have been using Preview since I've had my Macbook Black because I could highlight using all the colours of the rainbow and more. When my Macbook black died and I switched to a Macbook Pro, changing colours became more complicated, but it was still
-
Hi Javaties I have a doubt in xml. Can we use & in a xml element i.e <root> <child&parent>Data</child&parent> <root>