gpt4 book ai didi

apache - Apache 和 Tomcat 之间的集成 - mod_jk

转载 作者:行者123 更新时间:2023-11-28 22:20:55 24 4
gpt4 key购买 nike

无法启动服务器。服务器实例未配置。 (这是tomcat服务器告诉我的)

完成 Apache 和 Tomcat 之间的集成任务,我得到了 50%。我的意思是,我在配置后启动并运行了 Apache(因为当我加载浏览器时浏览正常),但是当我启动 Tomcat 时出现错误,如下所示:

我的产品版本是:

  • Apache 2.2.25 (win32)
  • Tomcat 7.0.47(w x86)
  • mod_jk.so 1.2.37

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 Info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
ServerName localhost
JkMount /examples ajp13
JkMount /examples/* ajp13

Tomcat 服务器.xml:

<Listener className="org.apache.jk.config.ApacheConfig" modJk="C:\Program Files\Apache Software Foundation\Apache2.2\modules\mod_jk.so" />
</Engine>

转储文件:

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.

最佳答案

下载tomcat-jk2.jar文件并将其放入Tomcat的lib文件夹中。这将解决您的问题。您可以从here 下载tomcat-jk2.jar。 .

关于apache - Apache 和 Tomcat 之间的集成 - mod_jk,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20207130/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com