Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Tomcat republishing does not work
Tomcat republishing does not work [message #184589] Wed, 13 December 2006 16:05 Go to next message
Andy Pahne is currently offline Andy Pahne
Messages: 17
Registered: July 2009
Junior Member
Hi,

I am trying WTP for the first time. (Eclipse 3.2, WTP 1.5.2, Tomcat
5.5.20 on WinXP). Publishing a project to the server works fine, both in
debug and normal mode.

But whenever I change a *.java file then republishing does not work. I
get a "HTTP Status 503 - This application is not currently available"
error message.

I have no idea, but maybe somebody on the list knows how to fix this.

Thanks,
Andy






The stack trace is:

3.12.2006 16:59:03 org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]]
(ApplicationContext.java:646) - Shutting down Log4J
log4j:WARN No appenders could be found for logger
(org.apache.catalina.core.ContainerBase.[Catalina].[localhos t].[/oos]).
log4j:WARN Please initialize the log4j system properly.
13.12.2006 16:59:17 org.apache.catalina.startup.ContextConfig
applicationWebConfig
SCHWERWIEGEND: Parse error in application web.xml file at
jndi:/localhost/oos/WEB-INF/web.xml
java.lang.NullPointerException
at
org.apache.xerces.impl.dtd.models.DFAContentModel.buildDFA(D FAContentModel.java:538)
at
org.apache.xerces.impl.dtd.models.DFAContentModel.<init>(DFAContentModel.java:253)
at
org.apache.xerces.impl.dtd.DTDGrammar.createChildModel(DTDGr ammar.java:2279)
at
org.apache.xerces.impl.dtd.DTDGrammar.getElementContentModel Validator(DTDGrammar.java:1735)
at
org.apache.xerces.impl.dtd.DTDGrammar.getElementDecl(DTDGram mar.java:1279)
at
org.apache.xerces.impl.dtd.XMLDTDValidator.getContentSpecTyp e(XMLDTDValidator.java:1672)
at
org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElemen t(XMLDTDValidator.java:1866)
at
org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(XMLD TDValidator.java:752)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanSt artElement(XMLDocumentFragmentScannerImpl.java:752)
at
org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatc her.scanRootElementHook(XMLDocumentScannerImpl.java:942)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$Fragme ntContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl. java:1520)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDo cument(XMLDocumentFragmentScannerImpl.java:333)
at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfigur ation.java:524)
at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfigur ation.java:580)
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152 )
at
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSA XParser.java:1169)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java :1561)
at
org.apache.catalina.startup.ContextConfig.applicationWebConf ig(ContextConfig.java:351)
at org.apache.catalina.startup.ContextConfig.start(ContextConfi g.java:1041)
at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(Con textConfig.java:260)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent (LifecycleSupport.java:119)
at
org.apache.catalina.core.StandardContext.start(StandardConte xt.java:4143)
at
org.apache.catalina.core.StandardContext.reload(StandardCont ext.java:3024)
at
org.apache.catalina.loader.WebappLoader.backgroundProcess(We bappLoader.java:432)
at
org.apache.catalina.core.ContainerBase.backgroundProcess(Con tainerBase.java:1277)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundPr ocessor.processChildren(ContainerBase.java:1569)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundPr ocessor.processChildren(ContainerBase.java:1578)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundPr ocessor.processChildren(ContainerBase.java:1578)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundPr ocessor.run(ContainerBase.java:1558)
at java.lang.Thread.run(Unknown Source)
13.12.2006 16:59:17 org.apache.catalina.startup.ContextConfig start
SCHWERWIEGEND: Marking this application unavailable due to previous error(s)
13.12.2006 16:59:17 org.apache.catalina.core.StandardContext start
SCHWERWIEGEND: Error getConfigured
13.12.2006 16:59:17 org.apache.catalina.core.StandardContext start
SCHWERWIEGEND: Context [/oos] startup failed due to previous errors
Re: Tomcat republishing does not work [message #184622 is a reply to message #184589] Wed, 13 December 2006 23:08 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1305
Registered: July 2009
Senior Member
If you deploy this webapp to Tomcat outside of Eclipse and trigger a
reload (by "touching" the web.xml or a jar), does the same error occur?

Cheers,
Larry

Andy Pahne wrote:
>
> Hi,
>
> I am trying WTP for the first time. (Eclipse 3.2, WTP 1.5.2, Tomcat
> 5.5.20 on WinXP). Publishing a project to the server works fine, both in
> debug and normal mode.
>
> But whenever I change a *.java file then republishing does not work. I
> get a "HTTP Status 503 - This application is not currently available"
> error message.
>
> I have no idea, but maybe somebody on the list knows how to fix this.
>
> Thanks,
> Andy
>
>
>
>
>
>
> The stack trace is:
>
> 3.12.2006 16:59:03 org.apache.catalina.core.StandardContext reload
> INFO: Reloading this Context has started
> INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]]
> (ApplicationContext.java:646) - Shutting down Log4J
> log4j:WARN No appenders could be found for logger
> (org.apache.catalina.core.ContainerBase.[Catalina].[localhos t].[/oos]).
> log4j:WARN Please initialize the log4j system properly.
> 13.12.2006 16:59:17 org.apache.catalina.startup.ContextConfig
> applicationWebConfig
> SCHWERWIEGEND: Parse error in application web.xml file at
> jndi:/localhost/oos/WEB-INF/web.xml
> java.lang.NullPointerException
> at
> org.apache.xerces.impl.dtd.models.DFAContentModel.buildDFA(D FAContentModel.java:538)
>
> at
> org.apache.xerces.impl.dtd.models.DFAContentModel.<init>(DFAContentModel.java:253)
>
> at
> org.apache.xerces.impl.dtd.DTDGrammar.createChildModel(DTDGr ammar.java:2279)
>
> at
> org.apache.xerces.impl.dtd.DTDGrammar.getElementContentModel Validator(DTDGrammar.java:1735)
>
> at
> org.apache.xerces.impl.dtd.DTDGrammar.getElementDecl(DTDGram mar.java:1279)
> at
> org.apache.xerces.impl.dtd.XMLDTDValidator.getContentSpecTyp e(XMLDTDValidator.java:1672)
>
> at
> org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElemen t(XMLDTDValidator.java:1866)
>
> at
> org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(XMLD TDValidator.java:752)
>
> at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanSt artElement(XMLDocumentFragmentScannerImpl.java:752)
>
> at
> org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatc her.scanRootElementHook(XMLDocumentScannerImpl.java:942)
>
> at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$Fragme ntContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl. java:1520)
>
> at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDo cument(XMLDocumentFragmentScannerImpl.java:333)
>
> at
> org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfigur ation.java:524)
> at
> org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfigur ation.java:580)
> at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152 )
> at
> org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSA XParser.java:1169)
>
> at org.apache.tomcat.util.digester.Digester.parse(Digester.java :1561)
> at
> org.apache.catalina.startup.ContextConfig.applicationWebConf ig(ContextConfig.java:351)
>
> at
> org.apache.catalina.startup.ContextConfig.start(ContextConfi g.java:1041)
> at
> org.apache.catalina.startup.ContextConfig.lifecycleEvent(Con textConfig.java:260)
>
> at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent (LifecycleSupport.java:119)
>
> at
> org.apache.catalina.core.StandardContext.start(StandardConte xt.java:4143)
> at
> org.apache.catalina.core.StandardContext.reload(StandardCont ext.java:3024)
> at
> org.apache.catalina.loader.WebappLoader.backgroundProcess(We bappLoader.java:432)
>
> at
> org.apache.catalina.core.ContainerBase.backgroundProcess(Con tainerBase.java:1277)
>
> at
> org.apache.catalina.core.ContainerBase$ContainerBackgroundPr ocessor.processChildren(ContainerBase.java:1569)
>
> at
> org.apache.catalina.core.ContainerBase$ContainerBackgroundPr ocessor.processChildren(ContainerBase.java:1578)
>
> at
> org.apache.catalina.core.ContainerBase$ContainerBackgroundPr ocessor.processChildren(ContainerBase.java:1578)
>
> at
> org.apache.catalina.core.ContainerBase$ContainerBackgroundPr ocessor.run(ContainerBase.java:1558)
>
> at java.lang.Thread.run(Unknown Source)
> 13.12.2006 16:59:17 org.apache.catalina.startup.ContextConfig start
> SCHWERWIEGEND: Marking this application unavailable due to previous
> error(s)
> 13.12.2006 16:59:17 org.apache.catalina.core.StandardContext start
> SCHWERWIEGEND: Error getConfigured
> 13.12.2006 16:59:17 org.apache.catalina.core.StandardContext start
> SCHWERWIEGEND: Context [/oos] startup failed due to previous errors
Re: Tomcat republishing does not work [message #184631 is a reply to message #184622] Thu, 14 December 2006 01:44 Go to previous messageGo to next message
Andy Pahne is currently offline Andy Pahne
Messages: 17
Registered: July 2009
Junior Member
Larry Isaacs schrieb:
> If you deploy this webapp to Tomcat outside of Eclipse and trigger a
> reload (by "touching" the web.xml or a jar), does the same error occur?
>
> Cheers,
> Larry



Outside of Eclipse it works as expected.

Bye,
Andy
Re: Tomcat republishing does not work [message #184703 is a reply to message #184631] Thu, 14 December 2006 13:48 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1305
Registered: July 2009
Senior Member
Andy,

This would appear to be a problem in Xerces/Tomcat and not anything that
Eclipse needs to do differently. Odd is the fact that Tomcat 5.5.20
uses Xerces 2.8.0, yet the stack trace line:

org.apache.xerces.impl.dtd.models.DFAContentModel.<init>(DFAContentModel.java:253)

corresponds to the middle of a comment in Xerces 2.8.0 source. Can you
open the launch configuration for this server and check the
"java.endorsed.dirs" system property. I would be curious about the
dates in the xercesImpl.jar found in the directory at the
"java.endorsed.dirs" location.

Cheers,
Larry

You could
Andy Pahne wrote:
> Larry Isaacs schrieb:
>> If you deploy this webapp to Tomcat outside of Eclipse and trigger a
>> reload (by "touching" the web.xml or a jar), does the same error occur?
>>
>> Cheers,
>> Larry
>
>
>
> Outside of Eclipse it works as expected.
>
> Bye,
> Andy
Re: Tomcat republishing does not work [message #184765 is a reply to message #184703] Thu, 14 December 2006 15:50 Go to previous messageGo to next message
Andy Pahne is currently offline Andy Pahne
Messages: 17
Registered: July 2009
Junior Member
Hi Larry,

The launch config says:
-Djava.endorsed.dirs="C:\data\javasoft\tomcat-5.5.20\common\endorsed "

And inside this dir there is: nothing at all.

In fact I searched the whole CATALINA_HOME dir and there's no xerces
besides xercesImpl-2.0.2.jar inside the application's WEB-INF/lib.
That's a dependency of I don't know what. (I am using maven2 for
dependency resolution).

Should I give it a try and replace this webapp's dependency with a newer
version, 2.8.0 for instance?

Andy





Larry Isaacs schrieb:
> Andy,
>
> This would appear to be a problem in Xerces/Tomcat and not anything that
> Eclipse needs to do differently. Odd is the fact that Tomcat 5.5.20
> uses Xerces 2.8.0, yet the stack trace line:
>
> org.apache.xerces.impl.dtd.models.DFAContentModel.<init>(DFAContentModel.java:253)
>
>
> corresponds to the middle of a comment in Xerces 2.8.0 source. Can you
> open the launch configuration for this server and check the
> "java.endorsed.dirs" system property. I would be curious about the
> dates in the xercesImpl.jar found in the directory at the
> "java.endorsed.dirs" location.
>
> Cheers,
> Larry
>
> You could
> Andy Pahne wrote:
>> Larry Isaacs schrieb:
>>> If you deploy this webapp to Tomcat outside of Eclipse and trigger a
>>> reload (by "touching" the web.xml or a jar), does the same error occur?
>>>
>>> Cheers,
>>> Larry
>>
>>
>>
>> Outside of Eclipse it works as expected.
>>
>> Bye,
>> Andy
Re: Tomcat republishing does not work [message #184788 is a reply to message #184765] Thu, 14 December 2006 16:06 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1305
Registered: July 2009
Senior Member
I thought I had not applied the "JDK 1.4 Compatibility Package" to that
Tomcat 5.5.20, but it appears I was wrong as I now recall that Xerces
along with JMX is part of that package. You might try a newer version
of Xerces to see if that helps. I believe Xerces 2.9.0 is available.

Since the xeb.xml is being parsed by the server as part of a context
reload, you may have to put the xercesImp.jar and xml-apis.jar in the
"C:\data\javasoft\tomcat-5.5.20\common\endorsed" directory to make it
available to the server.

Cheers,
Larry

Andy Pahne wrote:
>
> Hi Larry,
>
> The launch config says:
> -Djava.endorsed.dirs="C:\data\javasoft\tomcat-5.5.20\common\endorsed "
>
> And inside this dir there is: nothing at all.
>
> In fact I searched the whole CATALINA_HOME dir and there's no xerces
> besides xercesImpl-2.0.2.jar inside the application's WEB-INF/lib.
> That's a dependency of I don't know what. (I am using maven2 for
> dependency resolution).
>
> Should I give it a try and replace this webapp's dependency with a newer
> version, 2.8.0 for instance?
>
> Andy
>
>
>
>
>
> Larry Isaacs schrieb:
>> Andy,
>>
>> This would appear to be a problem in Xerces/Tomcat and not anything
>> that Eclipse needs to do differently. Odd is the fact that Tomcat
>> 5.5.20 uses Xerces 2.8.0, yet the stack trace line:
>>
>> org.apache.xerces.impl.dtd.models.DFAContentModel.<init>(DFAContentModel.java:253)
>>
>>
>> corresponds to the middle of a comment in Xerces 2.8.0 source. Can
>> you open the launch configuration for this server and check the
>> "java.endorsed.dirs" system property. I would be curious about the
>> dates in the xercesImpl.jar found in the directory at the
>> "java.endorsed.dirs" location.
>>
>> Cheers,
>> Larry
>>
>> You could
>> Andy Pahne wrote:
>>> Larry Isaacs schrieb:
>>>> If you deploy this webapp to Tomcat outside of Eclipse and trigger a
>>>> reload (by "touching" the web.xml or a jar), does the same error occur?
>>>>
>>>> Cheers,
>>>> Larry
>>>
>>>
>>>
>>> Outside of Eclipse it works as expected.
>>>
>>> Bye,
>>> Andy
Re: Tomcat republishing does not work [message #184838 is a reply to message #184788] Thu, 14 December 2006 17:01 Go to previous messageGo to next message
Andy Pahne is currently offline Andy Pahne
Messages: 17
Registered: July 2009
Junior Member
Hi Larry,

Putting bith jars in the endorsed dir solved the reloading problem.

Now I have another strange issue: the Eclipse project once was called
netx-oos. I renamed it to simply oos but that was really long ago.

When I create the Server configuration, netx-oos is filled in as
deployment path. No matter if I change it, when I start the server it
deploys under the old path. The configured path is changed by WTP.

Thanks for your help,
Andy



Larry Isaacs schrieb:
> I thought I had not applied the "JDK 1.4 Compatibility Package" to that
> Tomcat 5.5.20, but it appears I was wrong as I now recall that Xerces
> along with JMX is part of that package. You might try a newer version
> of Xerces to see if that helps. I believe Xerces 2.9.0 is available.
>
> Since the xeb.xml is being parsed by the server as part of a context
> reload, you may have to put the xercesImp.jar and xml-apis.jar in the
> "C:\data\javasoft\tomcat-5.5.20\common\endorsed" directory to make it
> available to the server.
>
> Cheers,
> Larry
>
Re: Tomcat republishing does not work [message #184850 is a reply to message #184838] Thu, 14 December 2006 21:20 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1305
Registered: July 2009
Senior Member
When you create a Dynamic Web Project, the "name" will appear in three
places. The project name obviously. It also appears as the
context-root, which you may have already found in project Properties.
The another place it appears is in the
".settings/org.eclipse.wst.common.component" file as the deploy-name on
the <web-module> element. I believe this is the one that determines the
name of the context in Tomcat. Make sure all three are the same and
what you want. You might also need to remove and re-add the project to
the server in case things got out of sync with the rename.

Cheers,
Larry

Andy Pahne wrote:
>
>
> Hi Larry,
>
> Putting bith jars in the endorsed dir solved the reloading problem.
>
> Now I have another strange issue: the Eclipse project once was called
> netx-oos. I renamed it to simply oos but that was really long ago.
>
> When I create the Server configuration, netx-oos is filled in as
> deployment path. No matter if I change it, when I start the server it
> deploys under the old path. The configured path is changed by WTP.
>
> Thanks for your help,
> Andy
>
>
>
> Larry Isaacs schrieb:
>> I thought I had not applied the "JDK 1.4 Compatibility Package" to
>> that Tomcat 5.5.20, but it appears I was wrong as I now recall that
>> Xerces along with JMX is part of that package. You might try a newer
>> version of Xerces to see if that helps. I believe Xerces 2.9.0 is
>> available.
>>
>> Since the xeb.xml is being parsed by the server as part of a context
>> reload, you may have to put the xercesImp.jar and xml-apis.jar in the
>> "C:\data\javasoft\tomcat-5.5.20\common\endorsed" directory to make it
>> available to the server.
>>
>> Cheers,
>> Larry
>>
Re: Tomcat republishing does not work [message #184958 is a reply to message #184850] Fri, 15 December 2006 12:53 Go to previous message
Andy Pahne is currently offline Andy Pahne
Messages: 17
Registered: July 2009
Junior Member
That was more of a maven problem. I changed the articatId in my pom.xml
to oos, had maven recreate the config files, recreated the server and
everything went fine from there...

andy

Larry Isaacs schrieb:
> When you create a Dynamic Web Project, the "name" will appear in three
> places. The project name obviously. It also appears as the
> context-root, which you may have already found in project Properties.
> The another place it appears is in the
> ".settings/org.eclipse.wst.common.component" file as the deploy-name on
> the <web-module> element. I believe this is the one that determines the
> name of the context in Tomcat. Make sure all three are the same and
> what you want. You might also need to remove and re-add the project to
> the server in case things got out of sync with the rename.
Previous Topic:How to properly include external projects/jars in Dynamic Web Project
Next Topic:the xdoclet integration needs serious re-factoring or at least enhancement
Goto Forum:
  


Current Time: Tue Sep 16 21:41:21 GMT 2014

Powered by FUDForum. Page generated in 0.02860 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software