Syntax error on line 405 of /a2/conf/httpd.conf: Invalid command 'JkWorkersFile', perhaps mis-spelled or defined by a module not included in the server configuration
Пошарилась в Гугле, такая проблема у многих, вот только решения нигде нету :( Что делать?
Catalina.start: java.lang.ClassNotFoundException: org.apache.ajp.tomcat.Ajp13Connector java.lang.ClassNotFoundException: org.apache.ajp.tomcat.Ajp13Connector at org.apache.commons.digester.Digester.createSAXException(Digester.java:2540) at org.apache.commons.digester.Digester.createSAXException(Digester.java:2566) at org.apache.commons.digester.Digester.startElement(Digester.java:1276) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.commons.digester.Digester.parse(Digester.java:1548) at org.apache.catalina.startup.Catalina.load(Catalina.java:514) at org.apache.catalina.startup.Catalina.load(Catalina.java:552) 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:324) at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:396) Catalina.start: java.lang.ClassNotFoundException: org.apache.ajp.tomcat.Ajp13Connector java.lang.ClassNotFoundException: org.apache.ajp.tomcat.Ajp13Connector at org.apache.commons.digester.Digester.createSAXException(Digester.java:2540) at org.apache.commons.digester.Digester.createSAXException(Digester.java:2566) at org.apache.commons.digester.Digester.startElement(Digester.java:1276) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.commons.digester.Digester.parse(Digester.java:1548) at org.apache.catalina.startup.Catalina.load(Catalina.java:514) at org.apache.catalina.startup.Catalina.start(Catalina.java:572) 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:324) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:397)
A. Fig Lee wrote:A CLASSPATH pravil'nyj kogda Tomcat zapuskaetsja? est' v etom CLASSPATH org.apache.ajp.tomcat.Ajp13Connector ?
А что это за зверь, и где его проставить?
CLASSPATH=$CLASSPATH;/usr/local/jakarta-tomcat5.0/lib/ и дальше имена jar файлов.
можно набрать в консоли но прийдется делать каждый раз. Добавте с профайл себе его. Каким шеллом пользуетесь?
Бог создал людей разными, Линкольн дал людям свободу, а Кольт всех уравнял.
Using CATALINA_BASE: /usr/local/jakarta-tomcat5.0 Using CATALINA_HOME: /usr/local/jakarta-tomcat5.0 Using CATALINA_TMPDIR: /usr/local/jakarta-tomcat5.0/temp Using JAVA_HOME: /usr/local/jdk1.4.2 # # echo $CLASSPATH /usr/local/jakarta-tomcat5.0/lib/ # # /usr/local/bin/tomcat50ctl start >> Reading PID file (/var/run/tomcat50.pid)... [ DONE ] >> Starting Jakarta Tomcat 5.0.14... [ DONE ] >> Writing PID file... [ DONE ] # # # cat /usr/local/jakarta-tomcat5.0/logs/stdout.log
Catalina.start: java.lang.ClassNotFoundException: org.apache.ajp.tomcat.Ajp13Connector java.lang.ClassNotFoundException: org.apache.ajp.tomcat.Ajp13Connector at org.apache.commons.digester.Digester.createSAXException(Digester.java:2540) at org.apache.commons.digester.Digester.createSAXException(Digester.java:2566) at org.apache.commons.digester.Digester.startElement(Digester.java:1276) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.commons.digester.Digester.parse(Digester.java:1548) at org.apache.catalina.startup.Catalina.load(Catalina.java:514) at org.apache.catalina.startup.Catalina.load(Catalina.java:552) 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:324) at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:396) Catalina.start: java.lang.ClassNotFoundException: org.apache.ajp.tomcat.Ajp13Connector java.lang.ClassNotFoundException: org.apache.ajp.tomcat.Ajp13Connector at org.apache.commons.digester.Digester.createSAXException(Digester.java:2540) at org.apache.commons.digester.Digester.createSAXException(Digester.java:2566) at org.apache.commons.digester.Digester.startElement(Digester.java:1276) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.commons.digester.Digester.parse(Digester.java:1548) at org.apache.catalina.startup.Catalina.load(Catalina.java:514) at org.apache.catalina.startup.Catalina.start(Catalina.java:572) 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:324) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:397)
/usr/local/jakarta-tomcat5.0/conf/server.xml выглядит таким образом:
Catalina.start: java.lang.ClassNotFoundException: org.apache.ajp.tomcat.Ajp13Connector java.lang.ClassNotFoundException: org.apache.ajp.tomcat.Ajp13Connector at org.apache.commons.digester.Digester.createSAXException(Digester.java:2540)
Не находит Томкат вашей бибилотеки. А этот jar точно под этим путем сидит?
У меня например в томкатной папке напрямую нет никаких libs. Есть под common, под server.
И еще сам этот класс он не часть какого-нибудь extension пакета?
For Apache2 you can also use httpd.conf instead or in addition to workers2.properties. Other servers may support similar configuration - for example using registry or their native formats. This configuration mode is less tested - but provides some unique advantages (and disadvantages )
I'll describe the apache2 specifics, since this is the only one implemented. We use 2 directives - JkSet is a top-level directive is used to set global config options, and JkUriSet is used to set options for Location sections
JkSet takes 2 parameters, the property name ( including component name ) and the value. (Note: probably we should change it to 3 params, and separate the component name from property )
Each Location that has a JkUriSet will automatically create a jk2 [uri] object, using the Location path and the vhost. All JkUriSet directives will set attributes in this [uri] object, exactly like properties in a ini file section
You can mix workers2.properties and JkUriSet - for example workers and global options can be set in worker2.properties, but all uri properties in httpd.conf. Some people might preffer to have only one config file and use httpd.conf for all configuration.
The biggest benefit is that Apache2 mapping is used instead of jk2 to detect the requests that need to be sent to tomcat. Apache2 has been optimized and tuned to server huge number of servers and uris - if you have only few the diference may be hard to notice. Some people preffer to use the httpd.conf format and some tools could be better used in this mode.
One major problem is that reconfiguration is not supported if httpd.conf is used. You can still enable/disable/add workers if you use workers2.properties, and you could add or change uri properties in that file.