Caucho Forums  

This forum is permanently closed because of spam. For free community support, please visit Google Groups:


Go Back   Caucho Forums > Quercus

Reply
 
Thread Tools Display Modes
  #1  
Old 10-29-2009, 09:41 PM
andjarnic andjarnic is offline
Junior Member
 
Join Date: Oct 2009
Location: Sacramento area
Posts: 3
Default Quercus 3.2.1, 4.0, 4.0.1 problems with Jetty

Hi all,

New to the forum. I am trying to get quercus to run in jetty 7. The only examples I find show one of two ways to do this. Either I drop the quercus war file into webapps, and then I am to add php files to the expanded quercus web app... or I copy the contents of the quercos.war/WEB-INF/lib into the jetty/lib location. Either way, trying to access the localhost:8080/quercos throws a nice exception in the server console, or when I try to access a php page in my own web app that I deploy and use the approach of putting the quercos lib files into the jetty/lib location, I get exception saying the QuercosServlet can't be found. I also tried putting the quercos/WEB-INF/lib files into my own WAR/WEB-INF/lib files, and when I start jetty, it gives the same exception. Without displaying the full exception stack trace its:

com.caucho.quercus.QuercusRuntimeException: java.lang.ClassNotFoundException: 'org.eclipse.jetty.server.AsyncContext' is not a known Java class: java.lang.ClassNotFoundException: org.eclipse.jetty.server.AsyncContext

I am lost as to how to make use of PHP pages in my own web app while using quercos. I originally thought I could put the quercos.war file into the jetty/webapps folder, deploy my own app and somehow it would magically work.. of course knowing that webapps are separate contexts, I was unclear what magic was done to make my app see the quercos app and work. lol.

I also want to get this working in glassfish v3 and tomcat 5 and/or 6. Is there a "general" way regardless of app server to deploy quercos, be it as part of my own web app in the web-inf/lib location, OR by putting the necessary files in the tomcat/jetty/glassfish global lib path so it can find quercos? Do I need to configure a file other than the web.xml for my web-app to make it work?

Thank you.
Reply With Quote
  #2  
Old 10-30-2009, 12:51 AM
nam nam is offline
Administrator
 
Join Date: Aug 2009
Posts: 337
Default

It should work either way, by dropping in the war or adding the jars. We have tested Quercus on Tomcat and it works, but we haven't tested it on Jetty. Can you post the full exception stack trace? That'll help me to track down the issue.
Reply With Quote
  #3  
Old 10-30-2009, 02:13 AM
nam nam is offline
Administrator
 
Join Date: Aug 2009
Posts: 337
Default

Nevermind, got it. I've filed a bug report at:

http://bugs.caucho.com/view.php?id=3733
Reply With Quote
  #4  
Old 10-30-2009, 06:58 AM
andjarnic andjarnic is offline
Junior Member
 
Join Date: Oct 2009
Location: Sacramento area
Posts: 3
Default

Yup..that's the one.

I also noticed something else strange. If I hit refresh a couple times, usually the 3rd time I was suddenly seeing the page show up. Even when I put just quercus.war and tried the localhost:8080/quercus, I'd see the stack trace show up in the web page, hit refresh, same thing, hit it again, and then it would be the php page that said something like "Your PHP is working". I don't know why it would do this. Not sure you tried that out, but thought I'd let you know that this happened. Hope this helps in some way.
Reply With Quote
  #5  
Old 10-30-2009, 07:01 AM
andjarnic andjarnic is offline
Junior Member
 
Join Date: Oct 2009
Location: Sacramento area
Posts: 3
Default

Incidentally, are you saying that if I drop the quercus.war, which deploys as a separate app, and then drop my own .war in, I don't need to do any other setup to have php pages in my war work? If so, in this particular case, how does the quercus servlet in the quercus.war get set up to process php pages from other .war files? I thought each .war was it's own secure web application. Even if the web.xml in quercus.war indicates *.php to go to the quercus servlet, I thought that rule would apply only to anything within the context path of quercus?
Reply With Quote
  #6  
Old 10-30-2009, 06:46 PM
nam nam is offline
Administrator
 
Join Date: Aug 2009
Posts: 337
Default

wars are indeed independent. To use Quercus in your war, you will need to either package its jars into your war or place them in your jetty/lib folder. And you will need to add the Quercus servlet to your WEB-INF/web.xml:

<servlet>
<servlet-name>Quercus Servlet</servlet-name>
<servlet-class>com.caucho.quercus.servlet.QuercusServlet</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>Quercus Servlet</servlet-name>
<url-pattern>*.php</url-pattern>
</servlet-mapping>
Reply With Quote
  #7  
Old 10-30-2009, 07:39 PM
nam nam is offline
Administrator
 
Join Date: Aug 2009
Posts: 337
Default

We've fixed this for 4.0.2. The problem was that Jetty hides server classes from the webapp and Quercus couldn't introspect the HttpServletRequest object.
Reply With Quote
  #8  
Old 11-02-2009, 09:08 AM
sblommers sblommers is offline
Member
 
Join Date: Nov 2009
Location: Almere, The Netherlands
Posts: 32
Default Never had this

Hi, currently I have a app running on Quercus libs that never gave this problems before. I use both Jetty and Tomcat and I used all those versions (except 4.0.2 - when is release?).

We are running drupal 6.13 + 6.14 with all kinds of modules successfully and at full speed,.. question me when you have any problems. We also run the drupal script from within a java application to do login, get data, loadNodes etc.

I use the maven repo to build my projects.

Best regards,
Sebastiaan
Reply With Quote
  #9  
Old 11-03-2009, 04:49 PM
nam nam is offline
Administrator
 
Join Date: Aug 2009
Posts: 337
Default

I think the problem only occurs with Jetty version 7.
Reply With Quote
  #10  
Old 11-04-2009, 03:13 PM
sblommers sblommers is offline
Member
 
Join Date: Nov 2009
Location: Almere, The Netherlands
Posts: 32
Default Confirmed

I can confirm that, .. jetty6 runs perfectly (apart from the classloader leak, permgen space error when using redeploy) .. see http://blogs.sun.com/fkieviet/entry/...e_dreaded_java

Regards,
Sebastiaan
Reply With Quote
Reply

Tags
deploy, jetty, not working, quercus

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:31 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.