开发者

How to configure tomcat 7 in Eclipse 3.6 with jdk 1.6.0_20?

I'm having some problems configure tomcat 7 on Eclipse 3.6 . The enviroment is a notebook with o.s. Windows 7 Home Premium 64 bit. Before this upgrade i work succesfully with tomcat 6 on Eclipse 3.6 but my switch on the newer tomcat is an evil! I repeat every instructions that I use to configure tomcat 6, but it doesn't works!

If I launch tomcat inside eclipse without monitored applications installed it works, as I add one application, it crashes.What I'm missing?

Here's tomcat log :

26-set-2010 2.02.24 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.6.0_20\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files\Java\jdk1.6.0_20\jre\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Common Files\Roxio Shared\10.0\DLLShared\;C:\Program Files (x86)\putty;C:\Program Files\SlikSvn\bin\;C:\Program Files (x86)\OpenLDAP\kfw\Binary;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\IDM Computer Solutions\UltraEdit\;C:\Program Files\SlikSvn
26-set-2010 2.02.25 org.apache.tomcat.util.digester.SetPropertiesRule begin
AVVERTENZA: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:DocSourcesProject' did not find a matching property.
26-set-2010 2.02.25 org.apache.tomcat.util.digester.Digester endElement
GRAVE: End event threw exception
java.lang.NullPointerException
    at org.apache.catalina.core.StandardContext.getObjectNameKeyProperties(StandardContext.java:5551)
    at org.apache.catalina.core.StandardContext.setNamingResources(StandardContext.java:1757)
    at org.apache.catalina.core.StandardContext.getNamingResources(StandardContext.java:1735)
    at org.apache.catalina.startup.SetNextNamingRule.end(SetNextNamingRule.java:99)
    at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1058)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:601)
    at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:180)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1343)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2755)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
    at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1544)
    at org.apache.catalina.startup.Catalina.load(Catalina.java:515)
    at org.apache.catalina.startup.Catalina.load(Catalina.java:551)
    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:260)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
26-set-2010 2.02.25 org.apache.catalina.startup.Catalina load
AVVERTENZA: Catalina.start using conf/server.xml: 
java.lang.NullPointerException
    at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2688)
    at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2714)
    at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1061)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:601)
    at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:180)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1343)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2755)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
    at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1544)
    at org.apache.catalina.startup.Catalina.load(Catalina.java:515)
    at org.apache.catalina.startup.Catalina.load(Catalina.java:551)
    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:260)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.lang.NullPointerException
    at org.apache.catalina.core.StandardContext.getObjectNameKeyProperties(StandardContext.java:5551)
    at org.apache.catalina.core.StandardContext.setNamingResources(StandardContext.java:1757)
    at org.apache.catalina.core.StandardContext.getNamingResources(StandardContext.java:1735)
    at org.apache.catalina.startup.SetNextNamingRule.end(SetNextNamingRule.java:99)
    at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1058)
    ... 20 more
26-set-2010 2.02.25 org.apache.tomcat.util.digester.SetPropertiesRule begin
AVVERTENZA: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:DocSourcesProject' did not find a matching property.
26-set-2010 2.02.25 org.apache.tomcat.util.digester.Digester endElement
GRAVE: End event threw exception
java.lang.NullPointerException
    at org.apache.catalina.core.StandardContext.getObjectNameKeyProperties(StandardContext.java:5551)
    at org.apache.catalina.core.StandardContext.setNamingResources(StandardContext.java:1757)
    at org.apache.catalina.core.StandardContext.getNamingResources(StandardContext.java:1735)
    at org.apache.catalina.startup.SetNextNamingRule.end(SetNextNamingRule.java:99)
    at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1058)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:601)
    at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:180)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1343)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2755)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configurat开发者_如何学Goion.parse(XML11Configuration.java:808)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
    at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1544)
    at org.apache.catalina.startup.Catalina.load(Catalina.java:515)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:564)
    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:288)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:415)
26-set-2010 2.02.25 org.apache.catalina.startup.Catalina load
AVVERTENZA: Catalina.start using conf/server.xml: 
java.lang.NullPointerException
    at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2688)
    at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2714)
    at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1061)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:601)
    at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:180)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1343)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2755)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
    at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1544)
    at org.apache.catalina.startup.Catalina.load(Catalina.java:515)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:564)
    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:288)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:415)
Caused by: java.lang.NullPointerException
    at org.apache.catalina.core.StandardContext.getObjectNameKeyProperties(StandardContext.java:5551)
    at org.apache.catalina.core.StandardContext.setNamingResources(StandardContext.java:1757)
    at org.apache.catalina.core.StandardContext.getNamingResources(StandardContext.java:1735)
    at org.apache.catalina.startup.SetNextNamingRule.end(SetNextNamingRule.java:99)
    at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1058)
    ... 20 more
26-set-2010 2.02.25 org.apache.catalina.startup.Catalina start
GRAVE: Cannot start server. Server instance is not configured.


There seems to be an issue in WTP 3.2 in combination with Tomcat 7. This issue is also discussed in this topic at the Eclipse forum. The cause and workaround is described as follows:

It appears the startup process has changed in Tomcat 7 such that the <ResourceLink>, when part of a <context> in server.xml, gets processed before the server is sufficiently initialized. If you open the server editor in Eclipse and enable the "Publish module contexts to separate XML files" option, I believe you will avoid this issue. I'll see about force enabling this option for Tomcat 7 servers in WTP 3.2.1.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜