无法启动服务器。未配置服务器实例。 (这是tomcat服务器告诉我的)
完成Apache和Tomcat之间的集成任务我得到了50%。我的意思是,我在配置完成后启动并运行了Apache(因为当我加载浏览器时很好)但是当我启动Tomcat时,我得到了一个错误,如下所示:
我的产品版本是:
Apache httpd.conf:
LoadModule jk_module“C:\ Program Files \ Apache Software Foundation \ Apache2.2 \ modules \ mod_jk.so”
JkWorkersFile“C:\ Program Files \ apache-tomcat-7.0.47 \ conf \ workers.properties”
JkLogFile“C:\ Program Files \ apache-tomcat-7.0.47 \ conf \ from_apache_mod_jk.log”
JkLogLevel信息
JkLogStampFormat“[%a%b%d%H:%M:%S%Y]”
ServerName localhost
JkMount /示例ajp13
JkMount / examples / * ajp13
Tomcat server.xml:
< Listener className =“org.apache.jk.config.ApacheConfig”modJk =“C:\ Program Files \ Apache Software Foundation \ Apache2.2 \ modules \ mod_jk.so”/>
< /发动机>
转储文件:
Nov 25, 2013 11:35:24 PM org.apache.catalina.core.AprLifecycleListener init
Informações: Loaded APR based Apache Tomcat Native library 1.1.29 using APR version 1.4.8.
Nov 25, 2013 11:35:25 PM org.apache.catalina.core.AprLifecycleListener init
Informações: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
Nov 25, 2013 11:35:25 PM org.apache.tomcat.util.digester.Digester startElement
Grave: Begin event threw exception
java.lang.ClassNotFoundException: org.apache.jk.config.ApacheConfig
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:144)
at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1276)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1537)
at org.apache.catalina.startup.Catalina.load(Catalina.java:617)
at org.apache.catalina.startup.Catalina.load(Catalina.java:665)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:281)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)
Nov 25, 2013 11:35:25 PM org.apache.catalina.startup.Catalina load
Advertência: Catalina.start using conf/server.xml: Error at (141, 143) : org.apache.jk.config.ApacheConfig
Nov 25, 2013 11:35:25 PM org.apache.tomcat.util.digester.Digester startElement
Grave: Begin event threw exception
java.lang.ClassNotFoundException: org.apache.jk.config.ApacheConfig
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:144)
at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1276)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1537)
at org.apache.catalina.startup.Catalina.load(Catalina.java:617)
at org.apache.catalina.startup.Catalina.start(Catalina.java:679)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:456)
Nov 25, 2013 11:35:25 PM org.apache.catalina.startup.Catalina load
Advertência: Catalina.start using conf/server.xml: Error at (141, 143) : org.apache.jk.config.ApacheConfig
Nov 25, 2013 11:35:25 PM org.apache.catalina.startup.Catalina start
Grave: Cannot start server. Server instance is not configured.
答案 0 :(得分:1)
下载tomcat-jk2.jar文件并将其放入Tomcat的lib文件夹中。这将解决您的问题。 您可以从here下载tomcat-jk2.jar。
答案 1 :(得分:0)
马科斯,
您阅读的消息位于tomcat用户邮件列表中。他们说已经从tomcat7中删除了ApacheConfig
类,因此尝试在server.xml中配置一个侦听器会抛出ClassNotFoundException
。因此,您必须从Listener
中删除server.xml
配置。
你必须把'mod_jk.conf'文件(如果你已经有)放在Apache配置目录中 - 我不确定windows,但是在linux中有一个'conf.d'或者有一个mods-available
目录(如果你把它放在后者中,你必须使用a2enmod
启用模块)
如果没有,您可以将其添加到主Apache配置文件的底部。
如果要在配置中输入内容,请查看configuring tomat's server.xml file with auto generating mod_jk.conf