tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Allistair Crossley" <Allistair.Cross...@QAS.com>
Subject RE: TC 5.5 - 4 issues (jasper, ROOT, jndi, logging)
Date Thu, 02 Sep 2004 16:29:38 GMT
:p cool, thanks Remy!

ADC

> -----Original Message-----
> From: Remy Maucherat [mailto:remy.maucherat@gmail.com]
> Sent: 02 September 2004 17:01
> To: tomcat-user@jakarta.apache.org
> Subject: Re: TC 5.5 - 4 issues (jasper, ROOT, jndi, logging)
> 
> 
> On Thu, 2 Sep 2004 16:41:14 +0100, Allistair Crossley
> <allistair.crossley@qas.com> wrote:
> > Hi Remy,
> > 
> > > > > > 1/ Jasper has an issue with JSP page imports where the
> > > > > imported packages are not used. This is throwing an exception.
> > > > >
> > > > > Did you look at the generated source ?
> > > >
> > > > No, I just removed the imports from my JSP that it was
> > > complaining about and it went away. Would you like me to put
> > > them back in and then look at the generated source for you?
> > >
> > > Were the imports not actually used if you were able to remove them
> > > without problems ? What was the error output ? (why do I 
> have to ask
> > > this question ?)
> > 
> > OK. The JSP in question is my error page (e.g 
> isErrorPage="true") which prints out the exception in a more 
> aesthetic manner. The reason this page was being thrown at me 
> is because of all the other issues with the JNDI 
> connectivity. Initially when I first started 5.5 the error 
> message was a JasperException telling me that various package 
> imports were not being used. Now, I never thought that was a 
> crime (just not very good programming) but 5.5 decided to 
> blow up because of these imports. Since the imports were not 
> actually used, I decided to remove them from the JSP and this 
> solved the error, and now I can see my nice error page - but 
> remember I am seeing it in the first place because all my 
> database connectivity is broken. I am guessing that as soon 
> as JNDI is fixed and my webapp can proceed to fully start up, 
> quite a number of my JSPs will break due to unused package 
> imports. I am guessing this must be a change in Jasper 
> because 5.0 was happy to render JSPs with unused package 
> imports (as is any Java application code).
> 
> I think the warnings are interpreted as errors then.
> 
> > > > > > 2/ Had the error mentioned earlier about ROOT child ''
> > > > > cannot be deployed because it was shared by another context.
> > > > > I just removed the ROOT folder from webapps to get rid of
> > > > > that problem.
> > > > >
> > > > > Does everyone really think it's a good idea to have
> > > Context elements
> > > > > in server.xml ?
> > > >
> > > > I don't and I have not. This error occurred with an out of
> > > the box server.xml with _no_ Context elements. All I did was
> > > have ROOT and my own webapp in the webapps folder and then
> > > add mywebapp.xml into the conf/C/l/ folder. I think the clash
> > > came because my webapp using a path of "" which seems to be
> > > what ROOT tries to do also. Just removing ROOT from webapps
> > > sorts this out.
> > >
> > > You really need to describe issues accurately (I always find your
> > > reports extremely weird, unfortunately). I think what you 
> did is that
> > > you copied over your existing configuration, which will cause
> > > problems.
> > 
> > I'm sorry you find my posts weird. I've been unlucky with 
> some of the problems I have had with TC I guess. I do try and 
> do everything properly.
> > 
> > Here is an exact description of what I did to cause this 
> problem including my stdout after starting TC.
> > 
> > 1. Downloaded 5.5 as zip, installed Java 5 SDK
> > 2. Unzipped to c:\jakarta-tomcat
> > 3. Copied 
> c:\jakarta-tomcat-5.0.25\conf\Catalina\localhost\iq.xml to 
> c:\jakarta-tomcat-5.5.0\conf\Catalina\localhost\iq.xml (this 
> iq.xml file is my web application. It contains my Context as 
> the following header + all my JNDI resources ...)
> > 
> > <Context path="" docBase="/iq" reloadable="true">
> > 
> > 4. Copied c:\jakarta-tomcat-5.0.25\webapps\iq to 
> c:\jakarta-tomcat\webapps\iq
> > 5. Copied my database jTDS JAR into 
> c:\jakarta-tomcat\common\lib\jtds.jar
> > 6. Ran c:\jakarta-tomcat\bin\service.bat ensuring use of 
> new Java 5 SDK
> > 7. Started TC service.
> > 8. Opened STDOUT log ...
> > 
> > 02-Sep-2004 16:34:55 org.apache.coyote.http11.Http11Protocol init
> > INFO: Initializing Coyote HTTP/1.1 on http-8080
> > 02-Sep-2004 16:34:55 org.apache.catalina.startup.Catalina load
> > INFO: Initialization processed in 1532 ms
> > 02-Sep-2004 16:34:56 org.apache.catalina.core.StandardService start
> > INFO: Starting service Catalina
> > 02-Sep-2004 16:34:56 org.apache.catalina.core.StandardEngine start
> > INFO: Starting Servlet Engine: Apache Tomcat/5.5.0
> > 02-Sep-2004 16:34:56 org.apache.catalina.core.StandardHost start
> > INFO: XML validation disabled
> > **Start of LogManager static initializer
> > *** configurationOptionStr=log4j.properties
> > log4j:INFO Using URL 
> [file:/C:/jakarta-tomcat/webapps/iq/WEB-INF/classes/log4j.prop
> erties] for automatic log4j configuration of repository named 
> [default].
> > log4j:ERROR Could not find value for key log4j.appender.CoreLogicA
> > log4j:ERROR Could not instantiate appender named "CoreLogicA".
> > log4j:WARN No such property [datePattern] in 
> org.apache.log4j.RollingFileAppender.
> > log4j:INFO fileane is c:/jakarta-tomcat/logs/iq2-sys-email.log
> > log4j:INFO sdf is java.text.SimpleDateFormat@5d32f220
> > log4j:INFO fileane is 
> c:/jakarta-tomcat/logs/iq2-stats-content-access.log
> > log4j:INFO sdf is java.text.SimpleDateFormat@5d32f220
> > log4j:WARN No such property [datePattern] in 
> org.apache.log4j.RollingFileAppender.
> > log4j:INFO fileane is c:/jakarta-tomcat/logs/iq2-app-admin.log
> > log4j:INFO sdf is java.text.SimpleDateFormat@5d32f220
> > log4j:INFO fileane is c:/jakarta-tomcat/logs/iq2-sys-dto.log
> > log4j:INFO sdf is java.text.SimpleDateFormat@5d32f220
> > log4j:WARN No such property [datePattern] in 
> org.apache.log4j.RollingFileAppender.
> > log4j:INFO fileane is 
> c:/jakarta-tomcat/logs/iq2-app-holiday-forms.log
> > log4j:INFO sdf is java.text.SimpleDateFormat@5d32f220
> > log4j:INFO fileane is c:/jakarta-tomcat/logs/iq2-sys-actions.log
> > log4j:INFO sdf is java.text.SimpleDateFormat@5d32f220
> > log4j:INFO fileane is c:/jakarta-tomcat/logs/iq2-sys-cms.log
> > log4j:INFO sdf is java.text.SimpleDateFormat@ab9f0bcd
> > log4j:INFO fileane is c:/jakarta-tomcat/logs/iq2-sys-application.log
> > log4j:INFO sdf is java.text.SimpleDateFormat@5d32f220
> > log4j:INFO fileane is 
> c:/jakarta-tomcat/logs/iq2-app-rewards-and-recog.log
> > log4j:INFO sdf is java.text.SimpleDateFormat@5d32f220
> > log4j:INFO fileane is c:/jakarta-tomcat/logs/iq2-sys-errors.log
> > log4j:INFO sdf is java.text.SimpleDateFormat@5d32f220
> > log4j:INFO fileane is 
> c:/jakarta-tomcat/logs/iq2-stats-search-access.log
> > log4j:INFO sdf is java.text.SimpleDateFormat@5d32f220
> > log4j:INFO fileane is 
> c:/jakarta-tomcat/logs/iq2-sys-authentication.log
> > log4j:INFO sdf is java.text.SimpleDateFormat@5d32f220
> > log4j:INFO fileane is c:/jakarta-tomcat/logs/iq2-sys-search.log
> > log4j:INFO sdf is java.text.SimpleDateFormat@5d32f220
> > log4j:INFO fileane is c:/jakarta-tomcat/logs/iq2-core-actions.log
> > log4j:INFO sdf is java.text.SimpleDateFormat@5d32f220
> > ** End of LogManager static initializer
> > 02-Sep-2004 16:35:01 org.apache.catalina.core.ApplicationContext log
> > INFO: org.apache.webapp.balancer.BalancerFilter: init(): 
> ruleChain: [org.apache.webapp.balancer.RuleChain: 
> [org.apache.webapp.balancer.rules.URLStringMatchRule: Target 
> string: News / Redirect URL: http://www.cnn.com], 
> [org.apache.webapp.balancer.rules.RequestParameterRule: 
> Target param name: paramName / Target param value: paramValue 
> / Redirect URL: http://www.yahoo.com], 
> [org.apache.webapp.balancer.rules.AcceptEverythingRule: 
> Redirect URL: http://jakarta.apache.org]]
> > 02-Sep-2004 16:35:02 org.apache.catalina.core.ApplicationContext log
> > INFO: ContextListener: contextInitialized()
> > 02-Sep-2004 16:35:02 org.apache.catalina.core.ApplicationContext log
> > INFO: SessionListener: contextInitialized()
> > 02-Sep-2004 16:35:03 org.apache.catalina.startup.HostConfig 
> deployDirectory
> > SEVERE: Error deploying web application directory ROOT
> > java.lang.IllegalArgumentException: addChild:  Child name 
> '' is not unique
> >         at 
> org.apache.catalina.core.ContainerBase.addChildInternal(Contai
> nerBase.java:749)
> >         at 
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.
> java:739)
> >         at 
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
> >         at 
> org.apache.catalina.startup.HostConfig.deployDirectory(HostCon
> fig.java:880)
> >         at 
> org.apache.catalina.startup.HostConfig.deployDirectories(HostC
> onfig.java:843)
> >         at 
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
> >         at 
> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1063)
> >         at 
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConf
> ig.java:310)
> >         at 
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(L
> ifecycleSupport.java:119)
> >         at 
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1011)
> >         at 
> org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
> >         at 
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1003)
> >         at 
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:420)
> >         at 
> org.apache.catalina.core.StandardService.start(StandardService
> .java:450)
> >         at 
> org.apache.catalina.core.StandardServer.start(StandardServer.j
> ava:1967)
> >         at 
> org.apache.catalina.startup.Catalina.start(Catalina.java:545)
> >         at 
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess
> orImpl.java:39)
> >         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth
> odAccessorImpl.java:25)
> >         at java.lang.reflect.Method.invoke(Method.java:582)
> >         at 
> org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
> >         at 
> org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
> > 02-Sep-2004 16:35:03 org.apache.catalina.core.ApplicationContext log
> > INFO: ContextListener: contextInitialized()
> > 02-Sep-2004 16:35:03 org.apache.catalina.core.ApplicationContext log
> > INFO: SessionListener: contextInitialized()
> > 02-Sep-2004 16:35:04 org.apache.coyote.http11.Http11Protocol start
> > INFO: Starting Coyote HTTP/1.1 on http-8080
> > 02-Sep-2004 16:35:04 org.apache.jk.common.ChannelSocket init
> > INFO: JK2: ajp13 listening on /0.0.0.0:8009
> > 02-Sep-2004 16:35:04 org.apache.jk.server.JkMain start
> > INFO: Jk running ID=0 time=0/32  
> config=C:\jakarta-tomcat\conf\jk2.properties
> > 02-Sep-2004 16:35:05 org.apache.catalina.startup.Catalina start
> > INFO: Server startup in 9234 ms
> > 
> > So you see, I have _not_copied any server configuration 
> from my old tomcat 5.0.25 and I am sure you _must_ be able to 
> generate this usecase simply by placing an empty webapp into 
> your webapps folder and then adding an xml config for it in 
> /conf/Catalina/localhost/ with attribute path=""
> > 
> > My point was that it appears from the exception that ROOT 
> owns path="" and so when my iq web application is started 
> which also wants to use path="" TC is falling over.
> 
> Right. This is a great description of what you're doing: without it,
> it would have been impossible to figure out what you were doing. This
> is fixed now, but the workaround (which allows working gracefully with
> the new deployer, so it's good) is to use an XML file named ROOT.xml,
> with:
> <Context docBase="/iq" reloadable="true" />
> 
> > My solution which proves this was to simply delete ROOT 
> folder from c:\jakarta-tomcat\webapps and restart TC. This 
> removes this exception.
> > 
> > I hope this clarifies my point on this matter. Please let 
> me know if I can help further.
> 
> Yes, it's clarified.
> 
> For JNDI, you need to make sure you're not using ResourceParams. The
> new syntax is in the docs.
> 
> -- 
> xxxxxxxxxxxxxxxxxxxxxxxxx
> Rémy Maucherat
> Developer & Consultant
> JBoss Group (Europe) SàRL
> xxxxxxxxxxxxxxxxxxxxxxxxx
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 


<FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLUE> 
-------------------------------------------------------
QAS Ltd.
Developers of QuickAddress Software
<a href="http://www.qas.com">www.qas.com</a>
Registered in England: No 2582055
Registered in Australia: No 082 851 474
-------------------------------------------------------
</FONT>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message