com.caucho.quercus.lib.dom
Submitted by dlx on Tue, 05/27/2008 - 07:39
hi,
I cannot find the package com.caucho.quercus.lib.dom. Where is it? I can find API docs for it but I cannot find it anywhere in the quercus.war/jar or resin downloads.
Without DOM the current mediawiki release doesn't work. I would appreciate it if someone could point me to a location where I can find that package.
XML Supporting
My php program generate XML file, and I have imported com.caucho.quercus.lib.dom but it failed (DomDocument --> unknown class). Is XML supporting function released?
got it
I found the package in the resin-release in the resin.jar. However if I add that jar to my servers lib directory I get the following exception:
javax.servlet.ServletException: Servlet.init() for servlet quercus threw exception
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
java.lang.Thread.run(Thread.java:619)
Root cause:
-----------
java.lang.ClassCastException: org.apache.catalina.core.ApplicationContextFacade cannot be cast to com.caucho.server.webapp.WebApp
com.caucho.quercus.servlet.ResinQuercusServlet.init(ResinQuercusServlet.java:74)
com.caucho.quercus.servlet.QuercusServlet.initImpl(QuercusServlet.java:345)
com.caucho.quercus.servlet.QuercusServlet.init(QuercusServlet.java:271)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
java.lang.Thread.run(Thread.java:619)
My application server is tomcat5.5 running on debian etch with quercus 3.1.6.
What am I missing?
well...
I managed to get it to work. But i needed to add the following packages to the quercus.jar:
com.caucho.loader
com.caucho.log
com.caucho.make
com.caucho.management
com.caucho.server
com.caucho.vfs
com.caucho.xml
com.caucho.quercus.lib.dom
Additionally I didn't have the classes/META-INF/services/ directory and it's configuration files in my WEB-INF directory. It seems those are necessary as well.
PHP and Tomcat 6
you may end up with classnotfound exceptions using the above approach. here's a better alternative:
1. copy the following jars from resin-3.1.8/lib dir to your web apps' web-inf/lib directory: resin.jar, javamail-141.jar, resin-util.jar, quercus.jar and script-10.jar.
2. copy quercus servlet and servlet-mapping elements from resin-3.1.8/php/quercus-war/WEB-INF/web.xml to your web.xml
3. open the resin.jar you extracted in step one and delete the com/caucho/quercus/servlet/ResinQuercusServlet class.
4. deploy your web app along with its bundled php scripts to tomcat.
5. cross your fingers.
thanks caucho!
tww
http://alakai.org
doesn't seem to work
I tried this and couldn't get it to work. I added the packages above to quercus.jar with WinRAR, then put the META-INF/services directory (from resin.jar) into my webapp's WEB-INF dir but class_exists("DOMDocument") is still returning false. Any ideas?
Just in case it is not clear this is with Quercus standalone on vanilla Tomcat. I think a lot of people would be interested in seeing better support for using Quercus without Resin.