tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rocco Scappatura" <Rocco.Scappat...@sttspa.it>
Subject Re: Problems with a web application running a PHP script
Date Tue, 06 Nov 2007 19:30:11 GMT
>> Thanks for you hints. I will disinstall all JDK/JRE versions from my PC.
>> I'm dowloading JDK 6 Update 3 and I will install it.
>
> No problem, you got me curious about scripting...
> I Tested with this
> ======================================
>     protected void processRequest(HttpServletRequest request,
> HttpServletResponse response)
>             throws ServletException, IOException {
>         response.setContentType("text/html;charset=UTF-8");
>         PrintWriter out = response.getWriter();
>
>
>         out.println("<html>");
>         out.println("<head>");
>         out.println("<title>Servlet NewServlet</title>");
>         out.println("</head>");
>         out.println("<body>");
>         out.println();
>         out.println("<p>Stand Back... Script running</p>");
>
>       ScriptEngineManager scriptMgr = new ScriptEngineManager();
>       ScriptEngine jsEngine = scriptMgr.getEngineByName("JavaScript");
>       try {
>         jsEngine.eval("var meJavaScript = 'Me-Java Script!';");
>         out.println("<p>" + jsEngine.get("meJavaScript") + "</p>");
>       }
>       catch (ScriptException ex) {
>         out.println("<p>Oh Damn! Script Crashed " + ex.getMessage() +
> "</p>");
>         ex.printStackTrace();
>       }
>
>         out.println("</body>");
>         out.println("</html>");
>         out.close();
>     }
>
> =======================================
>
> Hey it works....
> But in the process I discovered a few things....
>
> + Even if TC http://webmail.sttspa.it/src/webmail.php
Mail for rscappatis installed on 1.5..... if NB is using 1.6 and its run from
> the DEV enviroment... it will make TC use 1.6
> So... thats probably whats happening to you.
> Its easy to check because in NB system out it tells you which JRE is used.
> And  when you start TC from the BAT it will tell you... as well... in your
> case probably 1.5
>
> + The Source level makes no difference in a servlet.... ie if the JRE is
> 1.6, you cant bring it down, this is different to normal Java Programs
> that
> will do things like tell you it now doesnt understand a template... but in
> servlets it seems to ignore that.
>
> Anyway it works....

OK. I ve tried toaccomplish all the steps I sayd in my previous email. It
is a war! Before report you the output at TC starting, I would like to
best depict my environment:

- Two services:

   1) Catalina. With a connector listening on port 8080, with manager and
admin bundle application deploied)
   2) Rocsca. With a connector listening on port 80, with other two
application one of which I have developed (in part) and which I would
like to debug and to continue to develop. Moreover I would liketo setup
the other application and to setup both so that they can interact.

I get get a long series of errors at TC startup, some of which are obvious
(but I report as well because I'ld like to correct my trivial errors in
setting up my devel environment..):

Using CATALINA_BASE:   C:\Tomcat
Using CATALINA_HOME:   C:\Tomcat
Using CATALINA_TMPDIR: C:\Tomcat\temp
Using JRE_HOME:        C:\Programmi\Java\jdk1.6.0_03
6-nov-2007 20.14.23 org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance in
production environments was not found on the java.library.path:
C:\Programmi\Java\jdk1.6.0_03\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Perl\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programmi\PC-Doctor
for Windows\services;C:\Programmi\QuickTime\QTSystem\;C:\Programmi\IDM
Computer
Solutions\UltraEdit-32;C:\Programmi\WinSCP\;C:\Programmi\ZipGenius
6\;C:\php5;C:\Programmi\MySQL\MySQL Server
5.0\bin;C:\Programmi\Java\jdk1.5.0_13\bin
6-nov-2007 20.14.23 org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-80
6-nov-2007 20.14.23 org.apache.coyote.http11.Http11BaseProtocol init
GRAVE: Error initializing endpoint
java.net.BindException: Address already in use: JVM_Bind:80
        at
org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:298)
        at
org.apache.coyote.http11.Http11BaseProtocol.init(Http11BaseProtocol.java:139)
        at
org.apache.catalina.connector.Connector.initialize(Connector.java:1017)
        at
org.apache.catalina.core.StandardService.initialize(StandardService.java:578)
        at
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:782)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:504)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:524)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:267)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
6-nov-2007 20.14.23 org.apache.catalina.startup.Catalina load
GRAVE: Catalina.start
LifecycleException:  Protocol handler initialization failed:
java.net.BindException: Address already in use: JVM_Bind:80
        at
org.apache.catalina.connector.Connector.initialize(Connector.java:1019)
        at
org.apache.catalina.core.StandardService.initialize(StandardService.java:578)
        at
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:782)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:504)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:524)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:267)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
6-nov-2007 20.14.24 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 971 ms
6-nov-2007 20.14.24 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
6-nov-2007 20.14.24 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.25
6-nov-2007 20.14.24 org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
6-nov-2007 20.14.25 org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-80
6-nov-2007 20.14.26 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
6-nov-2007 20.14.26 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/161  config=null
6-nov-2007 20.14.26 org.apache.catalina.core.StandardService start
INFO: Starting service Rocsca
6-nov-2007 20.14.26 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.25
6-nov-2007 20.14.26 org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
6-nov-2007 20.14.26 org.apache.catalina.startup.HostConfig deployDescriptor
AVVERTENZA: A docBase C:\Tomcat\webapps-80\roller inside the host appBase
has been specified, and will be ignored
6-nov-2007 20.14.26 org.apache.catalina.core.StandardContext resourcesStart
GRAVE: Error starting static Resources
java.lang.IllegalArgumentException: Document base
C:\Tomcat\webapps-80\roller does not exist or is not a readable directory
        at
org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:141)
        at
org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:3855)
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4024)
        at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
        at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
        at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
        at
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
        at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
        at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
        at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
        at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
        at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
        at
org.apache.catalina.core.StandardService.start(StandardService.java:448)
        at
org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
6-nov-2007 20.14.26 org.apache.catalina.core.StandardContext start
GRAVE: Error in resourceStart()
6-nov-2007 20.14.26 org.apache.catalina.core.StandardContext start
GRAVE: Error getConfigured
6-nov-2007 20.14.26 org.apache.catalina.core.StandardContext start
GRAVE: Context [/roller] startup failed due to previous errors
6-nov-2007 20.14.26 org.apache.catalina.core.StandardContext stop
INFO: Container
org.apache.catalina.core.ContainerBase.[Rocsca].[www.rocsca.it].[/roller]
has not been started
6-nov-2007 20.14.27 org.apache.catalina.core.StandardContext resourcesStart
GRAVE: Error starting static Resources
java.lang.IllegalArgumentException: Document base
C:\Tomcat\webapps-80\ROOT does not exist or is not a readable directory
        at
org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:141)
        at
org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:3855)
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4024)
        at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
        at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
        at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
        at
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
        at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
        at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
        at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
        at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
        at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
        at
org.apache.catalina.core.StandardService.start(StandardService.java:448)
        at
org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
6-nov-2007 20.14.27 org.apache.catalina.core.StandardContext start
GRAVE: Error in resourceStart()
6-nov-2007 20.14.27 org.apache.catalina.core.StandardContext start
GRAVE: Error getConfigured
6-nov-2007 20.14.27 org.apache.catalina.core.StandardContext start
GRAVE: Context [] startup failed due to previous errors
6-nov-2007 20.14.27 org.apache.catalina.core.StandardContext stop
INFO: Container
org.apache.catalina.core.ContainerBase.[Rocsca].[www.rocsca.it].[/] has
not been started
6-nov-2007 20.14.27 org.apache.coyote.http11.Http11BaseProtocol start
GRAVE: Error starting endpoint
java.net.BindException: Address already in use: JVM_Bind:80
        at
org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:298)
        at
org.apache.tomcat.util.net.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoint.java:313)
        at
org.apache.coyote.http11.Http11BaseProtocol.start(Http11BaseProtocol.java:151)
        at
org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:76)
        at org.apache.catalina.connector.Connector.start(Connector.java:1090)
        at
org.apache.catalina.core.StandardService.start(StandardService.java:457)
        at
org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
6-nov-2007 20.14.27 org.apache.catalina.startup.Catalina start
GRAVE: Catalina.start:
LifecycleException:  service.getName(): "Rocsca";  Protocol handler start
failed: java.net.BindException: Address already in use: JVM_Bind:80
        at org.apache.catalina.connector.Connector.start(Connector.java:1097)
        at
org.apache.catalina.core.StandardService.start(StandardService.java:457)
        at
org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
6-nov-2007 20.14.27 org.apache.catalina.startup.Catalina start
INFO: Server startup in 3042 ms
6-nov-2007 20.14.28 org.apache.catalina.startup.HostConfig checkResources
INFO: Undeploying context []
20:14:29.487 EVENT  Loading JettyPage Index

Thanks,

rocsca


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message