Start tomcat with ovjm
I have read all the help. I cannot figure out how to start tomcat such that it is using the ovjm. Please help.
Hi All,
I have changes the code to this:
try
Runtime rt = Runtime.getRuntime();
Process proc = rt.exec("C:\\apache-tomcat-5.5.27\\bin\\startup.bat");
InputStream stderr = proc.getErrorStream();
InputStreamReader isr = new InputStreamReader(stderr);
BufferedReader br = new BufferedReader(isr);
String line = null;
System.out.println("<ERROR>");
Thread.sleep(3000);
System.exit(0);
while ( (line = br.readLine()) != null)
System.out.println(line);
System.out.println("</ERROR>");
int exitVal = proc.waitFor();
System.out.println("Process exitValue: " + exitVal);
} catch (Throwable t)
t.printStackTrace();
}What is happening is that this piece of code is running perfectly on my machine but not on production server. JDK, Apache Tomcat are of same version (same replica) and also I am the administrator of both machines. On production server this does not throw any exception also. The path to startup.bat is same in both my machine and production. If I go on Start > Run > C:\apache-tomcat-5.5.27\bin\startup.bat it works but not with Java Application.
Completely perplexed. Please help me out for possible solution.
Thanks and Regards,
Vikash Anand
Similar Messages
-
Starting tomcat with bootstrap.jar
I want to start Tomcat 4.1 with bootstrap.jar and calling the main function from my simple java program. How can I do it and what all parameters are required by the main function so that it can start the Tomcat?
Can I supply the catalina.policy file while starting it up?Thanks for the reply. I downloaded the tar.qz and move it to /usr/local/
with apache-tomcat-6.0.18 at the root
I've always done things without netbeans IDE. I just like the netbeans because it came with tomcat.
I get the following error when I start tomcat
tma apache-tomcat-6.0.18 # /usr/local/apache-tomcat-6.0.18/bin/startup.sh
Using CATALINA_BASE: /usr/local/apache-tomcat-6.0.18
Using CATALINA_HOME: /usr/local/apache-tomcat-6.0.18
Using CATALINA_TMPDIR: /usr/local/apache-tomcat-6.0.18/temp
Using JRE_HOME: /etc/java-config-2/current-system-vm
touch: cannot touch `/usr/local/apache-tomcat-6.0.18/logs/catalina.out': No such file or directory
/usr/local/apache-tomcat-6.0.18/bin/catalina.sh: line 292: /usr/local/apache-tomcat-6.0.18/logs/catalina.out: No such file or directory
#cwc 090129
export CATALINA_HOME=/usr/local/apache-tomcat-6.0.18
export PATH=$PATH:$CATALINA_HOME/bin
Edited by: cwcoleman on Jan 30, 2009 5:38 AM
Edited by: cwcoleman on Jan 31, 2009 8:02 AM -
Start Tomcat 5.5 with Security Manager
Recently, i have installed Tomcat version 5.5.8 but i have problem to start tomcat with a Securiy manager.
For Tomcat version 4.xx we could start Tomcat with SecurityManager by using the "-security" option at "%CATALINA_HOME%\bin\startup.bat" after configured the catalina.policy file.
But i couldn't do so at Tomcat 5.5.8. Any idea? Many Thanks.Start it yourself with
java -Dcatalina.home=$CATALINA_HOME -Djava.security.manager -Djava.security.policy=="your.policy" -cp your.classpath org.apache.catalina.startup.Bootstrap
Cheers,
Arnaud -
Problem with starting Tomcat in debug Mode, Win XP
Hi,
if i go to cmd and C:\Program Files\Apache Software Foundation\Tomcat 5.0\bin
and write: catalina jpda start, it says
C:\Documents and Settings\bartek>cd C:\Program Files\Apache Software Founda
C:\Program Files\Apache Software Foundation\Tomcat 5.0\bin>catalina jpda start
Using CATALINA_BASE: C:\Program Files\Apache Software Foundation\Tomcat 5
Using CATALINA_HOME: C:\Program Files\Apache Software Foundation\Tomcat 5
Using CATALINA_TMPDIR: C:\Program Files\Apache Software Foundation\Tomcat 5
Using JAVA_HOME: C:\j2sdk1.4.2_09
C:\Program Files\Apache Software Foundation\Tomcat 5.0\bin>
And it finishes.... Server is off
If i write: catalina start , new Tomcat window opens and the server starts
This is my catalina.bat
@echo off
if "%OS%" == "Windows_NT" setlocal
rem ---------------------------------------------------------------------------
rem Start/Stop Script for the CATALINA Server
rem
rem Environment Variable Prequisites
rem
rem CATALINA_HOME May point at your Catalina "build" directory.
rem
rem CATALINA_BASE (Optional) Base directory for resolving dynamic portions
rem of a Catalina installation. If not present, resolves to
rem the same directory that CATALINA_HOME points to.
rem
rem CATALINA_OPTS (Optional) Java runtime options used when the "start",
rem "stop", or "run" command is executed.
rem
rem CATALINA_TMPDIR (Optional) Directory path location of temporary directory
rem the JVM should use (java.io.tmpdir). Defaults to
rem %CATALINA_BASE%\temp.
rem
rem JAVA_HOME Must point at your Java Development Kit installation.
rem
rem JAVA_OPTS (Optional) Java runtime options used when the "start",
rem "stop", or "run" command is executed.
rem
rem JSSE_HOME (Optional) May point at your Java Secure Sockets Extension
rem (JSSE) installation, whose JAR files will be added to the
rem system class path used to start Tomcat.
rem
rem JPDA_TRANSPORT (Optional) JPDA transport used when the "jpda start"
rem command is executed. The default is "dt_shmem".
rem
rem JPDA_ADDRESS (Optional) Java runtime options used when the "jpda start"
rem command is executed. The default is "jdbconn".
rem
rem $Id: catalina.bat,v 1.9.2.1 2004/08/21 15:49:47 yoavs Exp $
rem ---------------------------------------------------------------------------
rem Guess CATALINA_HOME if not defined
set CURRENT_DIR=%cd%
if not "%CATALINA_HOME%" == "" goto gotHome
set CATALINA_HOME=%CURRENT_DIR%
if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
cd ..
set CATALINA_HOME=%cd%
cd %CURRENT_DIR%
:gotHome
if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
echo The CATALINA_HOME environment variable is not defined correctly
echo This environment variable is needed to run this program
goto end
:okHome
rem Get standard environment variables
if exist "%CATALINA_HOME%\bin\setenv.bat" call "%CATALINA_HOME%\bin\setenv.bat"
rem Get standard Java environment variables
if exist "%CATALINA_HOME%\bin\setclasspath.bat" goto okSetclasspath
echo Cannot find %CATALINA_HOME%\bin\setclasspath.bat
echo This file is needed to run this program
goto end
:okSetclasspath
set BASEDIR=%CATALINA_HOME%
call "%CATALINA_HOME%\bin\setclasspath.bat"
rem Add on extra jar files to CLASSPATH
if "%JSSE_HOME%" == "" goto noJsse
set CLASSPATH=%CLASSPATH%;%JSSE_HOME%\lib\jcert.jar;%JSSE_HOME%\lib\jnet.jar;%JSSE_HOME%\lib\jsse.jar
:noJsse
set CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\bin\bootstrap.jar
if not "%CATALINA_BASE%" == "" goto gotBase
set CATALINA_BASE=%CATALINA_HOME%
:gotBase
if not "%CATALINA_TMPDIR%" == "" goto gotTmpdir
set CATALINA_TMPDIR=%CATALINA_BASE%\temp
:gotTmpdir
rem ----- Execute The Requested Command ---------------------------------------
echo Using CATALINA_BASE: %CATALINA_BASE%
echo Using CATALINA_HOME: %CATALINA_HOME%
echo Using CATALINA_TMPDIR: %CATALINA_TMPDIR%
echo Using JAVA_HOME: %JAVA_HOME%
set _EXECJAVA=%_RUNJAVA%
set MAINCLASS=org.apache.catalina.startup.Bootstrap
set ACTION=start
set SECURITY_POLICY_FILE=
set DEBUG_OPTS=
set JPDA=
if not ""%1"" == ""jpda"" goto noJpda
set JPDA=jpda
if not "%JPDA_TRANSPORT%" == "" goto gotJpdaTransport
set JPDA_TRANSPORT=dt_socked
:gotJpdaTransport
if not "%JPDA_ADDRESS%" == "" goto gotJpdaAddress
set JPDA_ADDRESS=8000
:gotJpdaAddress
shift
:noJpda
if ""%1"" == ""debug"" goto doDebug
if ""%1"" == ""run"" goto doRun
if ""%1"" == ""start"" goto doStart
if ""%1"" == ""stop"" goto doStop
if ""%1"" == ""version"" goto doVersion
echo Usage: catalina ( commands ... )
echo commands:
echo debug Start Catalina in a debugger
echo debug -security Debug Catalina with a security manager
echo jpda start Start Catalina under JPDA debugger
echo run Start Catalina in the current window
echo run -security Start in the current window with security manager
echo start Start Catalina in a separate window
echo start -security Start in a separate window with security manager
echo stop Stop Catalina
echo version What version of tomcat are you running?
goto end
:doDebug
shift
set _EXECJAVA=%_RUNJDB%
set DEBUG_OPTS=-sourcepath "%CATALINA_HOME%\..\..\jakarta-tomcat-catalina\catalina\src\share"
if not ""%1"" == ""-security"" goto execCmd
shift
echo Using Security Manager
set SECURITY_POLICY_FILE=%CATALINA_BASE%\conf\catalina.policy
goto execCmd
:doRun
shift
if not ""%1"" == ""-security"" goto execCmd
shift
echo Using Security Manager
set SECURITY_POLICY_FILE=%CATALINA_BASE%\conf\catalina.policy
goto execCmd
:doStart
shift
if not "%OS%" == "Windows_NT" goto noTitle
set _EXECJAVA=start "Tomcat" %_RUNJAVA%
goto gotTitle
:noTitle
set _EXECJAVA=start %_RUNJAVA%
:gotTitle
if not ""%1"" == ""-security"" goto execCmd
shift
echo Using Security Manager
set SECURITY_POLICY_FILE=%CATALINA_BASE%\conf\catalina.policy
goto execCmd
:doStop
shift
set ACTION=stop
goto execCmd
:doVersion
%_EXECJAVA% -classpath "%CATALINA_HOME%\server\lib\catalina.jar" org.apache.catalina.util.ServerInfo
goto end
:execCmd
rem Get remaining unshifted command line arguments and save them in the
set CMD_LINE_ARGS=
:setArgs
if ""%1""=="""" goto doneSetArgs
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
shift
goto setArgs
:doneSetArgs
rem Execute Java with the applicable properties
if not "%JPDA%" == "" goto doJpda
if not "%SECURITY_POLICY_FILE%" == "" goto doSecurity
%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
goto end
:doSecurity
%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
goto end
:doJpda
if not "%SECURITY_POLICY_FILE%" == "" goto doSecurityJpda
%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% -Xdebug -Xrunjdwp:transport=%JPDA_TRANSPORT%,address=%JPDA_ADDRESS%,server=y,suspend=n %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
goto end
:doSecurityJpda
%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% -Xrunjdwp:transport=%JPDA_TRANSPORT%,address=%JPDA_ADDRESS%,server=y,suspend=n %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
goto end
:endpaths with spaces in them are a problem. surround them with quotes and see if that helps.
why does the Java /bin appear twice?
why don't you use the JAVA_HOME variable that you set? don't repeat yourself.
% -
Hi,
This may be a very basic question on tomcat server:
What is the difference between creating a server (through the server View provided in eclipse) and using the three icons (at the top, just below the main menu) to start tomcat? I am new to Tomcat and am developing a web appln on tomcat.
Another question that i have is,
1. To which folder is my application deployed in Tomcat? For.e.g in Jboss the application as a war file can be fond in Jboss/server/default(or all)/deploy.
2. In Jboss i have an option to publish the project, if i start Tomcat by the 3 icon buttons provided at the top, how can i ensure that my latest code is published to the tomcat server.
3. What is this Tomcat manager screen for? How can i make use of this?
Apart from these, i am getting a few exceptions when i start tomcat (both by the 3 buttons and by creating a server in the server view), here is the list (from the console);
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'service-name': Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: Le Nom service-name n'est pas li� � ce Contexte
Caused by: javax.naming.NameNotFoundException: Le Nom service-name n'est pas li� � ce Contexte
at org.apache.naming.NamingContext.lookup(NamingContext.java:768)
at org.apache.naming.NamingContext.lookup(NamingContext.java:138)
at org.apache.naming.NamingContext.lookup(NamingContext.java:779)
at org.apache.naming.NamingContext.lookup(NamingContext.java:138)
at org.apache.naming.NamingContext.lookup(NamingContext.java:779)
at org.apache.naming.NamingContext.lookup(NamingContext.java:151)
at org.apache.naming.SelectorContext.lookup(SelectorContext.java:136)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:124)
at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:86)
at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:122)
at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:147)
at org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:90)
at org.springframework.jndi.JndiObjectLocator.lookup(JndiObjectLocator.java:101)
at org.springframework.jndi.JndiObjectFactoryBean.lookupWithFallback(JndiObjectFactoryBean.java:164)
at org.springframework.jndi.JndiObjectFactoryBean.afterPropertiesSet(JndiObjectFactoryBean.java:151)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1062)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1029)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:420)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:287)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:348)
at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:308)
at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:252)
at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:221)
at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:115)
at javax.servlet.GenericServlet.init(GenericServlet.java:211)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1029)
2007-11-22 13:59:16 StandardContext[/directory-prod]La servlet /directory-prod a g�n�r� une exception "load()"
javax.servlet.ServletException: "Servlet.init()" pour la servlet ws a g�n�r� une exception
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1071)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:862)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4013)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4357)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:277)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:832)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:701)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:432)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
at org.apache.catalina.core.StandardService.start(StandardService.java:480)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
----- Root Cause -----
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'service-name': Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: Le Nom service-name n'est pas li� � ce Contexte
Caused by: javax.naming.NameNotFoundException: Le Nom service-name n'est pas li� � ce Contexte
at org.apache.naming.NamingContext.lookup(NamingContext.java:768)
at org.apache.naming.NamingContext.lookup(NamingContext.java:138)
at org.apache.naming.NamingContext.lookup(NamingContext.java:779)
at org.apache.naming.NamingContext.lookup(NamingContext.java:138)
at org.apache.naming.NamingContext.lookup(NamingContext.java:779)
at org.apache.naming.NamingContext.lookup(NamingContext.java:151)
at org.apache.naming.SelectorContext.lookup(SelectorContext.java:136)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:124)
at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:86)
at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:122)
at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:147)
at org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:90)
at org.springframework.jndi.JndiObjectLocator.lookup(JndiObjectLocator.java:101)
at org.springframework.jndi.JndiObjectFactoryBean.lookupWithFallback(JndiObjectFactoryBean.java:164)
at org.springframework.jndi.JndiObjectFactoryBean.afterPropertiesSet(JndiObjectFactoryBean.java:151)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1062)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1029)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:420)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:287)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:348)
at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:308)
at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:252)
at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:221)
at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:115)
at javax.servlet.GenericServlet.init(GenericServlet.java:211)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1029)Hi.
In order to run a web project, you have first to create a server in eclipse. Normally, this is done only the first time: you don't have to do it for every project and/or run.
To run your project in aserver, you hava to select the project in the package explorer, pick the middle-button :(green circle, play without overlays), and select Run As -> Run on server.
There, you should select a server if you already configured one or create a new one.
Now, I think that the error you're getting has nothing to do with JSF. It's more likely a Spring configuration error. You may have declared a JNDI DataSource for example named "service-name" in applicationContext.xml but not in your Container (Tomcat, JBoss, etc.).
Regards. -
Starting tomcat 3.3 - win nt 4.0
Iam Starting Tomcat 3.3 in command prompt
"tomcat start".
A new window opens with tomcat running
Now I type "tomcat stop"
The New window closes and tomcat stops
once again I type "tomcat start".
Now the new window opens , but tomcat does not start. Its throwing the following execption
ThreadPool: Caught exception executing org.apache.tomcat.util.net.TcpWorkerThrea
d@1b9f5390, terminating thread
java.lang.LinkageError: Class java/util/Locale violates loader constraints
at org.apache.tomcat.modules.server.HttpResponse.init(Http10Interceptor.
java:430)
at org.apache.tomcat.core.ContextManager.initRequest(ContextManager.java
:816)
at org.apache.tomcat.modules.server.Http10Interceptor.init(Http10Interce
ptor.java:145)
at org.apache.tomcat.util.net.TcpWorkerThread.getInitData(PoolTcpEndpoin
t.java:452)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java, Compiled Code)
at java.lang.Thread.run(Thread.java:479)
can anyone solve thisI had the same problem reported to me. The error appeared when trying to debug a web application in JBuilder and was caused by trying to use debug features with JDK 1.2.2 without JPDA being available. Either change to use a later JDK (JPDA Is included from 1.3 on) or download JPDA from Sun and install it to clear the problem.
-
Problem in ant script (starting tomcat)...
Hi,
in my ant script (build.xml) I have some targets to start/stop tomcat:
<!-- ================================ -->
<!-- start/stop tomcat servlet engine -->
<!-- ================================ -->
<!-- check whether server is already running -->
<target name="-started">
<condition property="server.started">
<and>
<socket port="${tomcat.port}" server="${tomcat.server}"/>
</and>
</condition>
</target>
<!-- start tomcat -->
<target name="start" depends="-started" description="start tomcat server"
unless="server.started">
<echo message="Starting tomcat servlet engine..."/>
<java classname="org.apache.catalina.startup.Bootstrap" fork="yes">
<jvmarg value="-Djava.endorsed.dirs=${catalina.dir}/common/endorsed"/>
<jvmarg value="-Dcatalina.base=${catalina.dir}"/>
<jvmarg value="-Dcatalina.home=${catalina.dir}"/>
<jvmarg value="-Djava.io.tmpdir=${catalina.dir}/temp"/>
<arg value="start"/>
<classpath>
<pathelement location="${java.home}/../lib/tools.jar"/>
<pathelement location="${catalina.dir}/bin/bootstrap.jar"/>
</classpath>
</java>
</target>
<!-- check whether server is still running -->
<target name="-stopped">
<condition property="server.stopped">
<and>
<socket port="${tomcat.port}" server="${tomcat.server}"/>
<not>
<isset property="server.started"/>
</not>
</and>
</condition>
</target>
<!-- stop tomcat -->
<target name="stop" depends="-stopped" description="stop tomcat server"
if="server.stopped">
<echo message="Stopping tomcat servlet engine..."/>
<java classname="org.apache.catalina.startup.Bootstrap" fork="yes">
<jvmarg value="-Djava.endorsed.dirs=${catalina.dir}/common/endorsed"/>
<jvmarg value="-Dcatalina.base=${catalina.dir}"/>
<jvmarg value="-Dcatalina.home=${catalina.dir}"/>
<jvmarg value="-Djava.io.tmpdir=${catalina.dir}/temp"/>
<arg value="stop"/>
<classpath>
<pathelement location="${java.home}/../lib/tools.jar"/>
<pathelement location="${catalina.dir}/bin/bootstrap.jar"/>
</classpath>
</java>
</target>The problem I have is, when using another target which depends on the tomcat start target, for example my list target:
<target name="list" depends="start" description="list installed web applications">
<list url="${url}" username="${username}"
password="${password}"/>
</target>When executing the list target, tomcat starts up correctly but the list target is not executed.
Any help would be greatly appreciated.
Best regards
- StephanNo, I don't think that's the problem.
In my opinion, the problem has something to do with
fork="yes"in the start target.
But how can I tell ant to first execute another target (the target that starts tomcat) and then execute for example the list target (which lists all the installed web apps)? When using the depends attribute it doesn't work:
<target name="list" depends="start">
<list url=.../>
</target>When executing the list target, tomcat starts automatically (start target) but the list target is not executed after that :-(
Any ideas?
Best regards
- Stephan -
Eclipse 3.0 can't start Tomcat 5.0...
Hi,
I've installed Tomcat 5.0, Eclipse 3.0 and Sysdeo-Plugin ( com.sysdeo.eclipse.tomcat_3.0.0).
After opening Eclipse I've tried to start Tomcat within Eclipse.
I got the following error-message:
java.lang.NoClassDefFoundError: org/apache/catalina/startup/Bootstrap
Next a pop-up-alert was displayed with the following content:
Java Virtual Machine Launcher: Could not find the main class. Program will exit.
After trying to start Tomcat agin, errLog showed the following 2 errors:
1.
Message: Start Tomcat...
Exception Stack Trace: An exception stack trace could not be found.
Session Data:
eclipse.buildId=M200409161125
java.version=1.4.2_01
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_DE
2.
Message: Stop Tomcat...
Exception Stack Trace: An exception stack trace could not be found.
Session Data:
eclipse.buildId=M200409161125
java.version=1.4.2_01
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_DE
After closing Eclipse, the error-message (Java Virtual Machine Launcher: Could not find the main class. Program will exit.) was shown, again...
Do you have any idea, in order to fix the bug...?
bye
ChrisNow I've installed Tomcat 5.5.7 and set CATALINA_HOME and PATH.
The ErrorLogs by starting and stopping Tomcat were still displayed.
By starting Tomcat 5.5.7 wihin Eclipse 3.0.1., the Console shows this:
13.02.2005 14:33:07 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
13.02.2005 14:33:07 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1201 ms
13.02.2005 14:33:08 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
13.02.2005 14:33:08 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.7
13.02.2005 14:33:08 org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
13.02.2005 14:33:10 org.apache.catalina.startup.ContextConfig applicationWebConfig
INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[/Lomb]
13.02.2005 14:33:11 org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(C:\Tomcat_5_5_7\webapps\ZT\WEB-INF\lib\servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
13.02.2005 14:33:11 org.apache.catalina.startup.ContextConfig applicationWebConfig
INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[/ZT]
13.02.2005 14:33:11 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
13.02.2005 14:33:11 org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
13.02.2005 14:33:12 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/120 config=null
13.02.2005 14:33:12 org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
13.02.2005 14:33:12 org.apache.catalina.startup.Catalina start
INFO: Server startup in 4517 msSome INFO's look strange:
INFO: validateJarFile(C:\Tomcat_5_5_7\webapps\ZT\WEB-INF\lib\servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offendingor
INFO: Missing application web.xml, using defaults onlyor
INFO: XML validation disabledDo you know, what's the reason for it?
bye
Chris -
How to use JDBC to connect Tomcat with database server?(Urgent!)
I try to deploy the tomcat and make it connect with databaser server.
I am using mysql connector J 3.0. I added the CLASSPATH of mysql-connector-java-3.0.7-stable-bin.jar in the tomcat.sh .
I also add the web application in server.xml.
When I start tomcat, I can see using Classpath including mysql-connector-java-3.0.7-stable-bin.jar .
But when i browse my jsp including the jdbc, wait for a while, I get a message as following: Timeout on server localhost. My web server and database server is same computer.
Could you tell me what's wrong?Did you check to see that the MySQL database was indeed up and running, and accepting connections when you started Tomcat? Did you make sure that your firewall permits connections to the database?
Timeout errors generally occur when you send a request to a server and the server does nothing with it - i.e., it doesn't respond to it in any way. Most firewalls are configured this way. If I telnet to your machine and I get "connection refused", I know your machine exists and I can try hacking into it. If I telnet and get nothing at all, then I will either assume either there's no actual machine at that address or it's unresponsive. -
I m facing a problem starting tomcat server in winxp.every time i run startup from the command window,it gives the message "windows cannot find 'c:\sun\appserver\bin\java'.I have set the following environment variables:
CATALINA_HOME=C:\tomcat
TOMCAT_HOME=C:\tomcat
CLASSPATH=c:\Sun\AppServer\lib\j2ee.jar
JAVA_HOME=C:\Sun\AppServer
Path=c:\Sun\AppServer\bin
I have installed tomcat in c:\tomcat.Whats the thing i m doing wrong.
Pls reply asap.Thanx in advance.Get rid of that CLASSPATH environment variable for one thing. You don't need it, and Tomcat ignores it.
Open a command shell and type "java -version". Make sure that the version that comes back is the one you think you should have.
If the OS can't find the java.exe, it means you've got a PATH problem.
Your PATH in WinXP should have a lot more than that in it. Where exactly did you set these values? Using the Control Panel, or in the command shell itself? I have mine set with the Control Panel. - MOD -
Can't start Tomcat after installing Bea WorkShop for JSP
Hi,
I have been using Eclipse SDK Version: 3.1.2 Build id: M20060118-1600 and Web Tools Project 1.0.2 and Tomcat 5.0 and Tomcat 5.5 for about 2 months with no problems. But now I Can't start Tomcat after installing Bea WorkShop for JSP plug-in. I get "Server Tomcat v5.0 @ localhost failed to start". Any help would be greatly appreciated.I installed BEA Workshop for JSP Version: 3.1.0
Build id: 536. I only wanted to install the plug-in to my existng Eclipse 3.1 / WTP application. The only option that I saw was to download the entire FullWorkshopFreeInstall-536.zip, which is 192,496 KB. During the installation, there is a screen that you can specify to only install the plug-in - and I selected that option. Today, I chose to uninstall the BEA Workshop for JSP and then I was again able to start Tomcat server. I then did a complete install of BEA Workshop for JSP into a totally separate location. My original Eclipse installation still works fine, but my Workshop for JSP Version (which is now a completely new installation) has the same problem with Tomcat that I reported with the plug-in. I am using j2sdk1.4.2_08 and have tried both Tomcat 5.0 and Tomcat 5.5. I have the same problem with both Windows XP Home Edition and Windows XP Professional.
Thanks for your assistance.
Ron -
Problems in starting tomcat server
Hi,
I installed jdk 1.4 and tomcat 5.0.19 which are running successfully.
Installed jdk1.5 on same PC.Not able to start tomcat now.
The tomcat sttings are with jdk1.4 only.
Thanks,
MKPYes, if your TomCat is running, right click on the trayicon -> configure -> java tab and go to
'Java Virtual Machine' and change it to something like:
C:\Arquivos de programas\Java\jre1.6.0_07\bin\client\jvm.dll
It will solve the problem -
Starting tomcat server after setting classpath for java
Sorry if this is nothing to do with java, it is more to do with starting tomcat server.
Tomcat server has been working totally fine, but when I wanted to compile a java servlet I wrote for it, I needed to run a BAT file called gojava in MS-DOS that had the classpath for java to work properly. I then attempted to run Tomcat, but just got 'bad command'. As long as I don't start up java by setting the classpath, tomcat will work, but as I need java to write servlets and then to test them without restarting my PC each time, how do I get tomcat to work?
Thanks
HannahSounds like your batch file is changing your path, not your classpath. If you're getting "Bad command or filename" when attempting to run Tomcat, it can't find the executable. Check out the .bat file and see what it's doing (maybe even post it here for further clarity). If it's changing your path at all, make sure it includes a %path% to indicate that it simply wants to append items to the path, not overwrite it completely. Sorry if i'm way off base with my suggestions, but it sounds like that's where the problem's going to be, especially if rebooting resolves the problem.
-
Problem to start tomcat in Business Objects Edge 3.1
I can not start Tomcat 5.5 installed and deployed from the Business Objects BI Edge 3.1.
BO installs normally, but Tomcat does not start.
I tried to start tomcat from the control panel -> administrative tools -> services. But also not start.
You receive the following message: Windows could start in Apache Tomcat 5.5.20 on the local computer.
The log is:
[06/05/2011 10:22:37] [409 javajni.c] [error] Failed CreateJavaVM
[06/05/2011 10:22:37] [930 prunsrv.c] [error] Failed initializing java C: \ Program Files \ Business Objects \ Tomcat55 \ bin \ bootstrap.jar; C: \ Program Files \ Business Objects \ javasdk \ lib \ tools.jar
[06/05/2011 10:22:37] [prunsrv.c 1179] [error] ServiceStart returned 2
[06/05/2011 10:28:42] [409 javajni.c] [error] Failed CreateJavaVM
[06/05/2011 10:28:42] [930 prunsrv.c] [error] Failed initializing java C: \ Program Files \ Business Objects \ Tomcat55 \ bin \ bootstrap.jar; C: \ Program Files \ Business Objects \ javasdk \ lib \ tools.jar
[06/05/2011 10:28:42] [prunsrv.c 1179] [error] ServiceStart returned 2
[06/05/2011 10:30:40] [409 javajni.c] [error] Failed CreateJavaVM
[06/05/2011 10:30:40] [930 prunsrv.c] [error] Failed initializing java C: \ Program Files \ Business Objects \ Tomcat55 \ bin \ bootstrap.jar; C: \ Program Files \ Business Objects \ javasdk \ lib \ tools.jar
[06/05/2011 10:30:40] [prunsrv.c 1179] [error] ServiceStart returned 2
[06/05/2011 13:43:16] [409 javajni.c] [error] Failed CreateJavaVM
[06/05/2011 13:43:16] [930 prunsrv.c] [error] Failed initializing java C: \ Program Files \ Business Objects \ Tomcat55 \ bin \ bootstrap.jar; C: \ Program Files \ Business Objects \ javasdk \ lib \ tools.jar
[06/05/2011 13:43:16] [prunsrv.c 1179] [error] ServiceStart returned 2
[06/05/2011 13:43:20] [409 javajni.c] [error] Failed CreateJavaVM
[06/05/2011 13:43:20] [930 prunsrv.c] [error] Failed initializing java C: \ Program Files \ Business Objects \ Tomcat55 \ bin \ bootstrap.jar; C: \ Program Files \ Business Objects \ javasdk \ lib \ tools.jar
[06/05/2011 13:43:20] [prunsrv.c 1179] [error] ServiceStart returned 2
[06/05/2011 13:53:58] [409 javajni.c] [error] Failed CreateJavaVM
[06/05/2011 13:53:58] [930 prunsrv.c] [error] Failed initializing java C: \ Program Files \ Business Objects \ Tomcat55 \ bin \ bootstrap.jar; C: \ Program Files \ Business Objects \ javasdk \ lib \ tools.jar
[06/05/2011 13:53:58] [prunsrv.c 1179] [error] ServiceStart returned 2
[06/05/2011 14:00:16] [409 javajni.c] [error] Failed CreateJavaVM
[06/05/2011 14:00:16] [930 prunsrv.c] [error] Failed initializing java C: \ Program Files \ Business Objects \ Tomcat55 \ bin \ bootstrap.jar; C: \ Program Files \ Business Objects \ javasdk \ lib \ tools.jar
[06/05/2011 14:00:16] [prunsrv.c 1179] [error] ServiceStart returned 2
[06/05/2011 14:00:45] [409 javajni.c] [error] Failed CreateJavaVM
[06/05/2011 14:00:45] [930 prunsrv.c] [error] Failed initializing java C: \ Program Files \ Business Objects \ Tomcat55 \ bin \ bootstrap.jar; C: \ Program Files \ Business Objects \ javasdk \ lib \ tools.jar
[06/05/2011 14:00:45] [prunsrv.c 1179] [error] ServiceStart returned 2
Help me, what should I do?Hi
By default the BO install tomcat with:
Initial memory pool: 0 and
Maximum memory pool: 1024
I changed the settings in the Tomcat to:
Tomcat -> Tomcat configuration -> java>
Initial memory pool: 128 and
Maximum memory pool: 256
Then I accessed services.msc and start the Apache Tomcat. -
How to create a webservice in Tomcat with the use of Axis
I am very new to webservices. I am suppose to create a webservice in Tomcat with the use of Axis. I have downloaded all the required jars.
Please help me how to start.
Thanx in advance.
[email protected]Check out the Axis user's guide at: http://ws.apache.org/axis/java/user-guide.html
Maybe you are looking for
-
Hi, according to Oracle® Fusion Middleware System Requirements and Specifications 11g Release 1 (11.1.1) I wiill not be able to run the RCU from AIX because as it states"RCU is available only on 32-bit x86 Linux and 32-bit Microsoft Windows operating
-
About monitors and LCD displays
I want give you some directrices about the display sub system. Like you all know there are CRT monitors and LCD displays. CRT CRT monitors are based upon electron beams hitting Electroluminescent phosphorus. In these monitors the most important param
-
Hi Team, We have 2 node ORACLE 10g RAC setup on RHEL4 We have to prepare a Load Balancing Scenario 1. How and on what basis Client Requests/load balancing are done on the oracle 10g RAC nodes 2. How to Moniotor on which node client request/tasks are
-
Charge An iPod Touch On A Windows 98se
I have a 98se desktop computer with USB 1, I know the requirements are USB 2, BUT, I read here that people were having problems with syncing with USB 1 and worked perfectly with USB 2. So the above tells me that it WILL work with USB 1 but it transfe
-
One of my apps is stuck in limbo
So my Clash of clans game has been crashing a lot lately. I decided to finally uninstall and reinstall it in the hopes that would fix it. That's not the real problem though. When I tried to delete it, i got an option whether to keep or remove it and