tony1223 / run-jetty-run

Automatically exported from code.google.com/p/run-jetty-run
0 stars 0 forks source link

RJR breaks with Jetty 7 #40

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Run jetty server.
2.Everything breaks.

It looks like in Jetty 7 mortbay is changed to eclipse, which prevents
execution.

Original issue reported on code.google.com by dolcra...@gmail.com on 31 Oct 2009 at 4:40

GoogleCodeExporter commented 9 years ago
I'm unclear on how Jetty 7 breaks things.  rjr includes its own copy of Jetty 
6, so the 
one in Eclipse shouldn't interfere.

Original comment by James.Sy...@gmail.com on 31 Oct 2009 at 9:57

GoogleCodeExporter commented 9 years ago
Please provide more information on this one.

Original comment by tonylovejava on 9 Mar 2011 at 10:31

GoogleCodeExporter commented 9 years ago
I'm at a loss to understand how/why org.mortbay.jetty is being used when I 
launch an app which uses org.eclipse.jetty class defn' and these are included 
in the classpath.

Context: Doesn't work: Ubuntu 10.04, Helios with JRJ 1.2.2.1 Works: Windows, 
Helios, JRJ 1.1.1

Extract
2011-06-01 16:04:53.852:INFO::jetty-6.1.26 2011-06-01 16:04:54.394:WARN::Failed 
startup of context 
org.mortbay.jetty.webapp.WebAppContext?@4d8ce14a{/test,/mnt/srcDrv/src/eclipsewo
rkspaces/prj/test/web} java.lang.IllegalArgumentException?: Object is not of 
type class org.eclipse.jetty.webapp.WebAppContext?

    at org.mortbay.xml.XmlConfiguration?.configure(XmlConfiguration?.java:189) at org.mortbay.jetty.webapp.JettyWebXmlConfiguration?.configureWebApp(JettyWebXmlConfiguration?.java:103) at org.mortbay.jetty.webapp.WebAppContext?.startContext(WebAppContext?.java:1279) at org.mortbay.jetty.handler.ContextHandler?.doStart(ContextHandler?.java:518) at org.mortbay.jetty.webapp.WebAppContext?.doStart(WebAppContext?.java:499) at org.mortbay.component.AbstractLifeCycle?.start(AbstractLifeCycle?.java:50) at org.mortbay.jetty.handler.HandlerWrapper?.doStart(HandlerWrapper?.java:130) at org.mortbay.jetty.Server.doStart(Server.java:224) at org.mortbay.component.AbstractLifeCycle?.start(AbstractLifeCycle?.java:50) at runjettyrun.Bootstrap.main(Bootstrap.java:86) 

2011-06-01 16:04:54.407:INFO::Started SelectChannelConnector?@0.0.0.0:8880

Any pointers on how to not use org.mortbay.jetty and instead use the 
org.eclipse environment as this has the functionality I wish to use that 
doesn't exist in mortbay jetty version? Thx!

Original comment by michael....@gmail.com on 1 Jun 2011 at 8:54

GoogleCodeExporter commented 9 years ago
Since we run it in a standalone jvm , that not counting on Eclipse environment ,
and the Eclipse Jetty is not a general Jetty Environment. 
(We use VM runner to handle it.)

About the org.mortbay.jetty.Server, it's coming from our built-in Jetty bundle,
you could take a look for "Jetty Classpath" section first.

http://code.google.com/p/run-jetty-run/wiki/Classpath

I am not sure why you need a Eclipse Jetty implementation ,
and we use org.mortbay.jetty.webapp.WebAppContext for a long long time.

http://code.google.com/p/run-jetty-run/source/browse/trunk/bootstrap/src/runjett
yrun/Bootstrap.java?spec=svn8&r=8

I wonder that we use org.mortbay.jetty.webapp.WebAppContext for every version ,
you could use the Eclipse one in RJR 1.1.1 but not 1.2.2.1 ? That doesn't make 
sense.

I am not sure why you need to use a org.eclipse.jetty , 
if you could explain why you need it and provide a sample that how you access 
org.eclipse.jetty.webapp.WebAppContext in your project,

I could try to dig/fix some details for you.

Original comment by tonylovejava on 2 Jun 2011 at 4:28

GoogleCodeExporter commented 9 years ago
Thanks for your response.  I have some features available in
org.eclipse.jetty such as
org.eclipse.jetty.servlets.CrossOriginFilter and
org.eclipse.jetty.server.session.HashSessionManager which dont seem to
exist in mortbay implementation.  If I switch to org.mortbay.jetty
these two things then throw up an error.

I did try reading about the classpath RJR info but didn't quite
understand what was going on, let alone how to change things.

I 'think' I need the org.eclipse.jetty jars wrapped into RJR instead
of the mortbay ones.  Do you have instructions on how to do this with
RJR?  Its a bit of a mystery to me.

We were using mortbay jetty but recently have upgraded the servers to
use the latest, (Jetty 7?) org.eclipse.jetty libraries.  I was hoping
to use RJR in eclipse for some unit testing and ran into this problem.

I agree the RJR 1.1.1 working with Helios doesn't make sense so I'm
hoping its a classpath thing.  The only significant difference I can
see is Eclipse & Ubuntu vs Eclipse & Windows.

Mike.

Original comment by michael....@gmail.com on 2 Jun 2011 at 4:53

GoogleCodeExporter commented 9 years ago
Sorry , that's my bad , 
I have to say I am not aware of anything about Jetty 7 . lol

Just doing some survey just now , that seems it's a RJR issue with Jetty 7,
currently the Run-Jetty-Run is only tested with Jetty 6 and built-in Jetty 6 
jars as container.

I think I can't handle it quickly , I will try to use Jetty 7 to test the 
functionality you mentioned in next two week.

You could give it a quick try to remove the container and set jetty 7 jars , 
but to be honest , I am not sure if that will work or not since I haven't test 
Jetty 7 before.

(@see the image http://screencast.com/t/SBMHSwZj )

I will try to handle the jetty7 / jetty8 support ,
but it takes time to test it. 

Original comment by tonylovejava on 2 Jun 2011 at 5:34

GoogleCodeExporter commented 9 years ago

Original comment by tonylovejava on 2 Jun 2011 at 5:34

GoogleCodeExporter commented 9 years ago
I tried adding five of the container RJR jars (basically not the
jetty* ones) in
/mnt/wrkDrv/wrkDrv/eclipse/configuration/org.eclipse.osgi/bundles/1202/1/.cp/lib

I still get the same error as below, no-class-def.  So it feels like
the jetty6 stuff is hardwired into the jars responsible for launching
the Jetty environment.

Original comment by michael....@gmail.com on 2 Jun 2011 at 6:31

GoogleCodeExporter commented 9 years ago
ok , I will dig into it this weekend.
Thanks for your update.

Original comment by tonylovejava on 2 Jun 2011 at 6:43

GoogleCodeExporter commented 9 years ago
THanks!  Let me know if I can test things out for you... it would be
very much appreciated if this can be working... I have some
alternatives but they are more lengthy ones for testing.

Thanks!
Mike.

Original comment by michael....@gmail.com on 2 Jun 2011 at 6:47

GoogleCodeExporter commented 9 years ago
Sorry I got no chance to make it in my schedule this weekend, 
I was busy these days. :(

I will try to handle it soon as possible , 
at least we will get it ready this month , I promise.

Original comment by tonylovejava on 6 Jun 2011 at 4:56

GoogleCodeExporter commented 9 years ago
A quick update, I have done some code for Jetty 7/8 yesterday, 
will release a nightly build and will need your help to test in two days.

We will have three plug-in feature after that , 
1.run-jetty-run core , 
2.run-jetty-run jetty7 support( optional , require run-jetty-run core)
3.run-jetty-run jetty8 support( optional , require run-jetty-run core)

Original comment by tonylovejava on 9 Jun 2011 at 2:14

GoogleCodeExporter commented 9 years ago

Original comment by tonylovejava on 9 Jun 2011 at 2:14

GoogleCodeExporter commented 9 years ago

The Jetty7 / Jetty8 support is already done.

Please install the two RunJettyRun core/ RunJettyRun Jetty7 support feature,
it should be working now.

http://run-jetty-run.googlecode.com/svn/trunk/updatesite-nightly/

Original comment by tonylovejava on 10 Jun 2011 at 11:28

GoogleCodeExporter commented 9 years ago
I will try to use it for two weeks , and see if we found any issue , then move 
to official.

Original comment by tonylovejava on 10 Jun 2011 at 11:29

GoogleCodeExporter commented 9 years ago
For using Jetty 7 ,you have to select Jetty7 in Run Configuration .

http://screencast.com/t/rBsIQEmLj

Original comment by tonylovejava on 10 Jun 2011 at 11:39

GoogleCodeExporter commented 9 years ago

Original comment by tonylovejava on 10 Jun 2011 at 11:40

GoogleCodeExporter commented 9 years ago
Thanks very much!

Original comment by michael....@gmail.com on 10 Jun 2011 at 12:43

GoogleCodeExporter commented 9 years ago
If you have some feedback for it , I would really appreciate about that. ;)

Original comment by tonylovejava on 10 Jun 2011 at 3:55

GoogleCodeExporter commented 9 years ago
There's a knowing UI bug for Issue 73 and fixed just now.

Original comment by tonylovejava on 11 Jun 2011 at 12:40

GoogleCodeExporter commented 9 years ago
I installed RJR7 into eclipse.  It is complaining about bootstrap
missing.  I see in classpath (between the v6 and v7) that there is no
bootstrap entry (container) in RJR7.

Original comment by michael....@gmail.com on 16 Jun 2011 at 6:36

GoogleCodeExporter commented 9 years ago
Sorry, I got that backwards...

I installed RJR7 and created a new Run-Configuration using the v7 RJR.
 THis is the output... missing the servlet (class not found)

...
...
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in
[jar:file:/mnt/srcDrv/src/eclipseworkspaces/server/deplib/api-hbn/slf4j-log4j12-
1.4.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in
[jar:file:/mnt/srcDrv/src/eclipseworkspaces/integration/common/deplib/api/slf4j-
log4j12-1.4.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
2011-06-16 14:36:03.684:WARN::EXCEPTION
java.lang.ClassNotFoundException: <MY SERVLET (NAME REMOVED)>
    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
    at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:411)
    at runjettyrun.ProjectClassLoader.loadClass(ProjectClassLoader.java:79)
    at org.eclipse.jetty.util.Loader.loadClass(Loader.java:90)
    at org.eclipse.jetty.util.Loader.loadClass(Loader.java:70)
    at org.eclipse.jetty.servlet.Holder.doStart(Holder.java:81)
    at org.eclipse.jetty.servlet.ServletHolder.doStart(ServletHolder.java:239)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:58)
    at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:765)
    at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:245)
    at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1208)
    at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:586)
    at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:449)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:58)
    at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:89)
    at org.eclipse.jetty.server.Server.doStart(Server.java:258)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:58)
    at runjettyrun.Bootstrap.main(Bootstrap.java:58)
2011-06-16 14:36:03.685:WARN:/ocp:unavailable
javax.servlet.UnavailableException:  <MY SERVLET (NAME REMOVED)>
    at org.eclipse.jetty.servlet.Holder.doStart(Holder.java:87)
    at org.eclipse.jetty.servlet.ServletHolder.doStart(ServletHolder.java:239)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:58)
    at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:765)
    at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:245)
    at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1208)
    at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:586)
    at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:449)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:58)
    at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:89)
    at org.eclipse.jetty.server.Server.doStart(Server.java:258)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:58)
    at runjettyrun.Bootstrap.main(Bootstrap.java:58)
2011-06-16 14:36:03.685:WARN:/ocp:unavailable
java.lang.NullPointerException
    at org.eclipse.jetty.servlet.ServletContextHandler$Context.createServlet(ServletContextHandler.java:606)
    at org.eclipse.jetty.servlet.ServletHolder.newInstance(ServletHolder.java:748)
    at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:426)
    at org.eclipse.jetty.servlet.ServletHolder.doStart(ServletHolder.java:260)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:58)
    at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:765)
    at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:245)
    at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1208)
    at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:586)
    at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:449)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:58)
    at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:89)
    at org.eclipse.jetty.server.Server.doStart(Server.java:258)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:58)
    at runjettyrun.Bootstrap.main(Bootstrap.java:58)
2011-06-16 14:36:03.704:INFO::Started
SelectChannelConnector@0.0.0.0:8880 STARTING

I did nothing to the RJR6 Run Configuration but now see:

Exception in thread "main" java.lang.NoClassDefFoundError: runjettyrun/Bootstrap
Caused by: java.lang.ClassNotFoundException: runjettyrun.Bootstrap
    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: runjettyrun.Bootstrap. Program will exit.

Original comment by michael....@gmail.com on 16 Jun 2011 at 6:40

GoogleCodeExporter commented 9 years ago
Ok, so the RJR7 error (missing class) was actually due to missing the
class (it hadn't built, doh!).
RJR6 is still busted.  Probably less important now I have RJR7 working.

Original comment by michael....@gmail.com on 16 Jun 2011 at 6:57

GoogleCodeExporter commented 9 years ago
Sorry , have to double check ,
so the Jetty 7 is working now or not?

I will test the Jetty 6 part more , that seems it got wrong classpath with RJR 
Core, 
If you don't mind , I would like to know what's your OS , it might be a OS 
dependent issue.

And great thanks for your report!

Original comment by tonylovejava on 17 Jun 2011 at 2:38

GoogleCodeExporter commented 9 years ago
Ubuntu 10.04.  RJR7 or 8 works.  Not sure what I did to break RJR6,
maybe config problem in Eclipse as I'm not an Eclipse Power User ;o)

In my RJR7 I dont see a bootstrap container in the classpath tab.  I
do see this container in RJR6, but it is the one complaining about
bootstrapping.

Maybe if you provided some more screen shots of what I should see in
Eclipse would be useful if there are any differences?

Original comment by michael....@gmail.com on 17 Jun 2011 at 12:26

GoogleCodeExporter commented 9 years ago
That's ok , I will double check with Ubuntu.

Thanks!

Original comment by tonylovejava on 17 Jun 2011 at 2:35

GoogleCodeExporter commented 9 years ago
I've installed RJR from the nightly update site and can successfully swap 
between Jetty 6 and Jetty 7 for my runtime. 

However, when I switch to Jetty 7, hot reloading of the classes on change stop 
working. If I swap back to Jetty 6 it detects changes as normal and restarts 
the web application context. 

The only difference is the Jetty runtime option in the Run Configuration 
screen. 

Can you demonstrate this bug locally?

Original comment by jthomas...@gmail.com on 28 Jun 2011 at 1:13

GoogleCodeExporter commented 9 years ago
Yes, that seems I could reproduce it in my local.

Since this is a important feature, 
will try to fix it and release a newer nightly soon.(maybe few days...)

Please reference to this thread for more details.
http://code.google.com/p/run-jetty-run/issues/detail?id=75

Original comment by tonylovejava on 29 Jun 2011 at 5:03

GoogleCodeExporter commented 9 years ago
@jthomas , we fixed Issue 75 just now .

Would you mind to install the latest nightly version and test for the source 
scanner is working for you or not?

And great thank to your bug report.

Original comment by tonylovejava on 29 Jun 2011 at 11:01

GoogleCodeExporter commented 9 years ago
I can confirm that the issue is fixed in my environment using the latest 
nightly version. 

Thanks for the quick response and fix!

Original comment by jthomas...@gmail.com on 29 Jun 2011 at 1:17