Hello!
I installed Tomcat 5.0.25 i noticed that tomcat won't start unless i first make "service install" command? under catalina_home/bin/service.bat
also, after running tomcat service... my previous error (org.apache.commons.dbcp.DbcpException: java.sql.SQLException: General) was converted to
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory, cause: General error
I see you are using the sun.jdbc.odbc.JdbcOdbcDriver driver. This is a bad idea. What Database are you connecting to? You should use the driver made for that database.
However, I think the error is coming from not having tools.jar in the classpath. You'll have to add this to service.bat. You might also notice that JSP's don't compile for the same reason. I have asked the Tomcat developers to add tools.jar to classpath in service.bat, but it never seems to get done. I have created my own copy of service.bat that works better for me and brings it more in line with starting from the startup.bat file. I'll attach it.
Jake
but when i run startup.bat, no error occured...
what's the difference then? running tomcat as a service and running tomcat using startup.bat...??? i need to run my application as a service.. so that it will keep on running eventhough i'm not logged-in...
-----Original Message----- From: Aris Javier Sent: Wednesday, June 30, 2004 8:22 AM To: Tomcat Users List Subject: RE: Please Help!
My current tomcat version is tomcat5.0.7 also, i dont see service.bat under catalina_home/bin folder...
do i have to download latest tomcat version?
-----Original Message----- From: Jacob Kjome [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 29, 2004 11:46 PM To: Tomcat Users List Subject: RE: Please Help!
You specify Tomcat5.0. If that's true, you are using a pre-release version of Tomcat5. Update to the latest official version (or Tomcat-5.0.27beta) and retest. Make sure your driver is in common/lib as well. Note that CATALINA_HOME/bin/service.bat can be used to install/remove the service. Make sure to set your CATALINA_HOME variable before you run service.bat.
Jake
Quoting Aris Javier <[EMAIL PROTECTED]>:
> Thanks! > > My system works fine when i run tomcat5.0 in console... > but when i run tomcat5.0 in service, this error occurs... > > org.apache.commons.dbcp.DbcpException: java.sql.SQLException: General > error > > I already declared my enviroment variables.. > i declared bootstrap.jar and tools.jar in classpath... > > anyway, here's my system info... > > OS: Windows 2000 > Database: MS Access 2000 > System DSN: EZX_DS > Technology: Java Servlet/JSP MVC > Tomcat Folder: D:\Tomcat_5.0 > > Server.xml context... > <Context path="/tees" docBase="tees" debug="5" > reloadable="true" crossContext="true"> > <Logger className="org.apache.catalina.logger.FileLogger" > prefix="localhost_tees_log." suffix=".txt" > timestamp="true"/> > <Resource name="jdbc/EZX_DS" > auth="Container" > type="javax.sql.DataSource"/> > <ResourceParams name="jdbc/EZX_DS"> > <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> > <parameter> > <name>driverClassName</name> > <value>sun.jdbc.odbc.JdbcOdbcDriver</value> > </parameter> > <parameter> > <name>url</name> > <value>jdbc:odbc:EZX_DS</value> > </parameter> > </ResourceParams> > </Context> > > Web.xml contains... > <web-app> > <display-name>EAZIX TEES Tomcat to Access</display-name> > <resource-ref> > <description>DB Connection</description> > <res-ref-name>jdbc/EZX_DS</res-ref-name> > <res-type>javax.sql.DataSource</res-type> > <res-auth>Container</res-auth> > </resource-ref> > <context-param> > <param-name>configFile</param-name> > > <param-value>d:\\eazixprojects\\tees\\xml\\mapping.xml</param-value> > </context-param> > <servlet> > <servlet-name>EazixServlet</servlet-name> > <servlet-class>tees.main.util.EazixServlet</servlet-class> > </servlet> > <servlet-mapping> > <servlet-name>EazixServlet</servlet-name> > <url-pattern>*.ezx</url-pattern> > </servlet-mapping> > > <servlet> > <servlet-name>CewolfServlet</servlet-name> > <servlet-class>de.laures.cewolf.CewolfRenderer</servlet-class> > <!-- sets overlib.js location relative to webapp --> > <init-param> > <param-name>overliburl</param-name> > > <param-value>D:\\eazixprojects\\tees\\js\\etc\\overlib.js</param-value> > </init-param> > <!-- turn on or off debugging logging --> > <init-param> > <param-name>debug</param-name> > <param-value>true</param-value> > </init-param> > <load-on-startup>1</load-on-startup> > </servlet> > <servlet-mapping> > <servlet-name>CewolfServlet</servlet-name> > <url-pattern>/cewolf/*</url-pattern> > </servlet-mapping> > <welcome-file-list> > <welcome-file>welcome.jsp</welcome-file> > </welcome-file-list> > <error-page> > <location>msewFailed.jsp</location> > </error-page> > </web-app> > > -----Original Message----- > From: Kunthar [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 29, 2004 3:41 PM > To: Tomcat Users List > Subject: Re: Please Help! > > > Hello, > > Please give us more detail. > Your OS and database to connect to, > Send your server.xml and web.xml definitions. > Then we can have clear idea... > > Take care.... > Gokhan > > > > > Aris Javier wrote: > > >Please Help! > > > >This error kept on bugging me everytime i run tomcat5 as service... > >My environment variables are already declared as well as my system > >dsn... but still... > > > >org.apache.commons.dbcp.DbcpException: java.sql.SQLException: General
> >error > > > > > >Please Help! > > > >Thanks! > > > > > >--------------------------------------------------------------------- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
@echo off if "%OS%" == "Windows_NT" setlocal rem --------------------------------------------------------------------------- rem NT Service Install/Uninstall script rem rem Options rem install Install the service using Tomcat5 as service name. rem Service is installed using default settings. rem remove Remove the service from the System. rem rem name (optional) If the second argument is present it is considered rem to be new service name rem rem $Id: service.bat,v 1.5 2004/04/08 16:49:37 mturk Exp $ rem ---------------------------------------------------------------------------
rem Guess CATALINA_HOME if not defined set CURRENT_DIR=%cd% if not "%CATALINA_HOME%" == "" goto gotHome set CATALINA_HOME=%cd% if exist "%CATALINA_HOME%\bin\tomcat5.exe" goto okHome rem CD to the upper dir cd .. set CATALINA_HOME=%cd% :gotHome if exist "%CATALINA_HOME%\bin\tomcat5.exe" goto okHome echo The tomcat.exe was not found... echo The CATALINA_HOME environment variable is not defined correctly. echo This environment variable is needed to run this program goto end :okHome if not "%CATALINA_BASE%" == "" goto gotBase set CATALINA_BASE=%CATALINA_HOME% :gotBase set EXECUTABLE=%CATALINA_HOME%\bin\tomcat5.exe rem Set default Service name set SERVICE_NAME=Tomcat5 if "%1" == "" goto displayUsage if "%2" == "" goto setServiceName set SERVICE_NAME=%2 :setServiceName if %1 == install goto doInstall if %1 == remove goto doRemove echo Unknown parameter "%1" :displayUsage echo echo Usage: service.bat install/remove [service_name] goto end :doRemove rem Remove the service "%EXECUTABLE%" //DS//%SERVICE_NAME% echo The service '%SERVICE_NAME%' has been removed goto end :doInstall rem Install the service rem Use the environment variables as an exaple rem Each command line option is prefixed with PR_ set PR_DISPLAYNAME=Apache Tomcat set PR_DESCRIPTION=Apache Tomcat Server - http://jakarta.apache.org/tomcat set PR_INSTALL=%EXECUTABLE% set PR_LOGPATH=%CATALINA_HOME%\logs set PR_CLASSPATH=%JAVA_HOME%\lib\tools.jar;%CATALINA_HOME%\bin\bootstrap.jar "%EXECUTABLE%" //IS//%SERVICE_NAME% --Jvm auto --StartClass org.apache.catalina.startup.Bootstrap --StopClass org.apache.catalina.startup.Bootstrap --StartParams start --StopParams stop rem Clear the environment variables. They are not needed any more. set PR_DISPLAYNAME= set PR_DESCRIPTION= set PR_INSTALL= set PR_LOGPATH= set PR_CLASSPATH= rem Set extra parameters "%EXECUTABLE%" //US//%SERVICE_NAME% --JvmOptions "-Dcatalina.base=%CATALINA_BASE%;-Dcatalina.home=%CATALINA_HOME%;-Djava.endorsed.dirs=%CATALINA_HOME%\common\endorsed" --StartMode jvm --StopMode jvm rem More extra parameters set PR_STDOUTPUT=%CATALINA_HOME%\logs\stdout.log set PR_STDERROR=%CATALINA_HOME%\logs\stderr.log set PR_STARTPATH=%CATALINA_HOME%\bin set PR_STOPPATH=%CATALINA_HOME%\bin "%EXECUTABLE%" //US//%SERVICE_NAME% ++JvmOptions "-Djava.io.tmpdir=%CATALINA_BASE%\temp;-Dbuild.compiler.emacs=true;-Xrs" echo The service '%SERVICE_NAME%' has been installed :end cd %CURRENT_DIR%
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]