My favorites | Sign in
Project Home Wiki Issues Source
Search
for
GettingStarted  
Installing and using the plug-in
Featured
Updated Aug 15, 2011 by tonylove...@gmail.com

Installing

Well, that's easy. Simply use Eclipse's update manager (Help -> Updates -> Find and install... -> Search for new features to install) to add a remote site and point it to http://run-jetty-run.googlecode.com/svn/trunk/updatesite. Click finish, select the plugin and finish again. Done.

Also you could use marketplace client to search RunJettyRun.

Using

1.Quick start

i.right click on the project
ii.select "debug as"
iii.click "Run Jetty"
System will build with a default run configuration. (As same as you new a run configuration manually.)

2.Run Configuration for more control and more details

The plugin provides a launch configuration. It will only work with Java projects (Scala and other Java VM languages should work as well if they have a Java nature) with a web application in them (i.e. the project has a folder that is the root of the web application, and in that folder is a WEB-INF folder containing a web.xml file). You can run such projects with Jetty using the launch configuration this plugin provides.

Here is a screen shot of the Jetty tab in the launch dialog:

These options are required:

We have a useful default setting for you, so usually you don't have to config it by default.

  • Project (must be a Java Project, default is the selected one.)
  • Web application directory (inside the Project,default will find the folder which contains "WEB-INF" )
  • Context (can just be "/", default is the project name)
  • A web server port , default is 8080.

If SSL is enabled, the options below are also required:

  • HTTPS port , default is 8443.
  • Keystore file (typically .keystore in the user's home directory)
  • The keystore password (used to check the integrity of the keystore)
  • The key password (required to unlock the key)

For all functionality, please reference to RunJettyRun Configurations .

For the classpath tab , you could find more detail in Classpath.

If you need more control than Run Jetty Run provides, you have choices:

  • Post a new issue directly to let us know.
  • Use another plug-in that provides you with more control
  • Write your own main method that starts Jetty (see the Bootstrap class in Run Jetty Run, or the various projects of that are part of the Wicket family.
  • Extend Run Jetty Run, and feed your changes back so that others can benefit

Have fun with it!

Comment by fredrik....@gmail.com, Dec 23, 2007

Thank you for the update of Jetty launcher! One small thing though, shouldn't the update address be: "http://run-jetty-run.googlecode.com/svn/trunk/updatesite/"?

Comment by project member eelco.hillenius, Dec 23, 2007

Yes, indeed. Thanks, it is fixed now.

Comment by christia...@gmail.com, Jan 1, 2008

Love this plugin, thanks. A question, how can I configure jetty to autoreload a webapp when I change java code? Is that possible through this plugin? I am developing through wicket, and being able to save and test directly would speed up development considerably...

Comment by project member eelco.hillenius, Jan 1, 2008

Hi Christian,

This plugin doesn't do any magic, so there are no special reloading facilities is exposes. However, it plays well with Java's hotswap functionality (see http://java.sun.com/j2se/1.4.2/docs/guide/jpda/enhancements.html), so you shouldn't have to reload many smaller changes. How well that works depends on the JDK version you are using.

Comment by angelo.m...@gmail.com, Jan 2, 2008

When I try to launch it, I get the following error: 2008-01-02 10:11:55.191::INFO: Logging to STDERR via org.mortbay.log.StdErrLog? 2008-01-02 10:11:55.300::INFO: jetty-6.1.6 2008-01-02 10:11:55.441::INFO: NO JSP Support for /, did not find org.apache.jasper.servlet.JspServlet? 2008-01-02 10:11:55.659:/:INFO: default: init 2008-01-02 10:11:55.659:/:INFO: jsp: init 2008-01-02 10:11:55.691::INFO: Started SelectChannelConnector?@0.0.0.0:8080

and then I am not able to compile jsp. Do you know how to solve this problem? Thank you

Comment by project member eelco.hillenius, Jan 2, 2008

Ah, I probably have to include the appropriate libs to turn JSP support on. Could you please file a ticket? I'll get to it shortly.

Comment by mshillin...@gmail.com, Jan 4, 2008

I am currently using a hacked version of the Jetty Launcher so I can use Jetty 6. Would like to switch to this plugin, but I need the ability to read the jetty xml configuration file instead of defining the Context and WebApp? dir. Do you think this feature will be available in the future?

Comment by project member eelco.hillenius, Jan 4, 2008

I'm not anxious to add any other functionality than it has now, but if you give me a good patch I guess it would be OK. Or you could help out with this project as a committer if you are interested (and promise to do a decent job and keep things simple) :-)

Comment by otis.gos...@gmail.com, Jan 5, 2008

Eelco: Does this plugin support webapps whose URLs are rewritten? Here is an example of what I mean by that.

Imagine a foo.war webapp. Say the webapp uses Struts, so I may have Struts Action such as /foo/Login.do. Imagine that the webapp uses JSPs and that there is normally a link to this Login.do page, such as href="/foo/Login.do" type of thing. But this is one ugly URL, so imagine a situation where a developer decides to make use of Apache's URL rewriting capabilities and instead uses the following in his JSP: a href="/login" . This /login is a URL that the Apache server fronting the servlet container knows how to rewrite to /foo/Login.do under the hood.

So now I have JSPs with nice URLs, but those URLs are not /foo/xxx URLs. I could not get JettyLauncher? to work with this setup. Will r-j-r work with this setup?

Thanks!

Comment by project member eelco.hillenius, Jan 6, 2008

This plugin just supports Jetty. If you know a way to configure Jetty to use URL rewriting and configure that via a Jetty XML configuration file and we implement support for the Jetty XML file in the future (shouldn't be too difficult, though I'm still extremely short in time... in fact I'm writing this from a shop in Bangkok while finalizing the wedding cards for my upcoming wedding), you should be good. Jetty is very configurable, so I can imagine that it can be done.

Comment by otis.gos...@gmail.com, Jan 6, 2008

Good luck with the wedding and what follows! :)

As for Jetty and URL rewriting, Jetty is really 100% unaware of the fact that requests to it come from prettier URLs (e.g. /login) that the Apache that fronts it rewrites to webapp-specific URLs (e.g. /foo/Login.do). So, there is no telling Jetty about URL rewriting.

Comment by project member eelco.hillenius, Jan 7, 2008

Thanks Otis! If you want to follow our wedding adventures, check out http://kayandeelco.weddingwindow.com/

> As for Jetty and URL rewriting, Jetty is really 100% unaware of the fact that requests to it come from prettier URLs (e.g. /login) that the Apache that fronts it rewrites to webapp-specific URLs (e.g. /foo/Login.do). So, there is no telling Jetty about URL rewriting.

In that case, I see no reason for you to get into trouble with this plugin. Just keep apache running and you should be fine, right? I'd say try it and let me know if you run into trouble :-)

Comment by andrew.l...@gmail.com, Jan 15, 2008

I get the same error message as Angelo (from 1/2/08) - I'm a Tapestry user and was looking to move to this. Any clue where I should start?

Comment by andrew.l...@gmail.com, Jan 15, 2008

oh - and I understand you're busy ... I got jettylauncher working w/ 3.3 for now, just wanted to make the switch in the long-term... congratz

Comment by eman.nollase@gmail.com, Jan 17, 2008

Does the support for auto reloading of wicket html pages?I downloaded the plugin and run it w/ europa 3.3. It seems that the debugger and java files only can be auto-reload w/ just goin back-fort w/ the pages.What i want is that when i just press F5 the changes i made in html will take effect w/out further restarting the jetty server. Thanks a lot. Cheers.. nwei, happy weeding to eelco :)

Comment by project member eelco.hillenius, Jan 17, 2008

The plugin does nothing special here, so it works like it works elsewhere :-)

Markup reloading will work if you turn it on. For instance, when you start up Wicket in development mode (provide -Dwicket.configuration=development in the VM arguments block, and I believe it is even still the default for Wicket)

Comment by troy.kin...@gmail.com, Jan 22, 2008

Nice work. I had been itching to run jetty from eclipse using Java 1.6. (Jetty launcher can't do that, apparently).

Do you plan on supporting multiple simultaneous web applications?

Comment by project member eelco.hillenius, Jan 22, 2008

First and foremost, I plan to keep things simple. How would you configure multiple web apps for instance? If you need specific things that are not supported, it is probably better to create a class with a main function that starts up Jetty exactly the way you want it (that's what the wicket-examples project does for instance, and what I'm using for my day job).

But hey, if you have a good patch, we can always discuss it :-)

Comment by sop...@gmail.com, Jan 31, 2008

This plugin does not seem to be working for me on Eclipse 3.2.2, Clicking "New" does not produce a new configuration.

Comment by project member eelco.hillenius, Jan 31, 2008

Damn. You have an error log for me?

Comment by chris.ma...@gmail.com, Feb 1, 2008

Using this plugin my application appears to initialize successfully, including MyFaces?. But when I access the URL an exception is thrown:

sun.misc.InvalidJarIndexException?: Invalid index

at sun.misc.URLClassPath$JarLoader?.getResource(URLClassPath.java:769) at sun.misc.URLClassPath$JarLoader?.getResource(URLClassPath.java:682) at sun.misc.URLClassPath$JarLoader?.findResource(URLClassPath.java:663)

Further down the stack trace I see: 12:44:32,989 [btpool0-1] ,log ? Nested in org.apache.jasper.JasperException?: Unable to compile class for JSP: org.apache.jasper.JasperException?: Unable to compile class for JSP

at org.apache.jasper.JspCompilationContext?.compile(JspCompilationContext?.java:572)

Any ideas as to why I am seeing this type of behavior?

Comment by project member eelco.hillenius, Feb 1, 2008

Yeah, it looks like I need to package the plugin with Jasper (JSP compile) dependencies. I hope to find a little bit of time this weekend to look at it.

Comment by chris.ma...@gmail.com, Feb 3, 2008

I'm not certain if it helps but I also followed a document on "Debugging Cocoon in Eclipse" which sets up a project to allow for debugging in Eclipse with Jetty 6. I followed it exactly as outlined and I received the same error. I don't know if the two are related or if it will lead you into a direction for resolution but here is the link.

http://cocoon.apache.org/1301_1_1.html

Comment by project member eelco.hillenius, Feb 3, 2008

I created a new version of the plugin. Could you test with that please? Unfortunately, you first have to deinstall the first one; the update manager won't find updates. See the front page of this project.

Comment by leandro....@gmail.com, Feb 5, 2008

I´m having problems with file locking on windows. I know I can configure jetty to "fix" this. but I can´t configure the plugin with the same settings.

Any ideas? See: http://docs.codehaus.org/display/JETTY/Files+locked+on+Windows

Comment by chris.ma...@gmail.com, Feb 5, 2008

I uninstalled the old plugin and installed the new one, started the server and hit the application URL but received the following exception again:

sun.misc.InvalidJarIndexException?: Invalid index

at sun.misc.URLClassPath$JarLoader?.getResource(URLClassPath.java:769)

Further down the stack shows: 12:15:20,185 [btpool0-1] ,log ? Nested in org.apache.jasper.JasperException?: Unable to compile class for JSP: org.apache.jasper.JasperException?: Unable to compile class for JSP

at org.apache.jasper.JspCompilationContext?.compile(JspCompilationContext?.java:572)

Comment by project member eelco.hillenius, Feb 5, 2008

Chris. I tested starting up a web app with a JSP and that worked fine. Anything special you're doing by any chance? What kind of web app are you trying to run?

Comment by chris.ma...@gmail.com, Feb 5, 2008

The project uses MyFaces?. Nothing to extravagant. It's actually very simple what I am trying to do. The page that I am hitting is a login page that is very simplistic. It does a little song and dance with checking variables contained within the Request and/or Session. If it doesn't find them it simply directs the user to a login page to gather the info. The page is tied to a backing bean for binding the data elements.

I'll set some break points to see if I can hit any of my code or if it is failing before I even get that far.

Comment by project member eelco.hillenius, Feb 5, 2008

Or you could see whether you can give patching the plugin a try. Shouldn't be too hard if you're comfortable with Java and Eclipse.

Comment by denisgeo...@gmail.com, Feb 6, 2008

When I try to launch my app, I get this error : org.apache.xerces.parsers.XIncludeAwareParserConfiguration cannot be cast to org.apache.xerces.xni.parser.XMLParserConfiguration

The launch is working fine on Tomcatv5.5 though.

Comment by denisgeo...@gmail.com, Feb 6, 2008

Also, when I launch my application with Jetty only (without eclipse and the plugin), everything is fine, I don't get this xerces/parser error. Any idea?

Comment by project member eelco.hillenius, Feb 6, 2008

Not really. Do you have a stacktrace?

Comment by denisgeo...@gmail.com, Feb 6, 2008

Ok, here is the stacktrace :

java.lang.ClassCastException?: org.apache.xerces.parsers.XIncludeAwareParserConfiguration cannot be cast to org.apache.xerces.xni.parser.XMLParserConfiguration

at org.apache.xerces.parsers.SAXParser.<init>(Unknown Source) at org.apache.xerces.parsers.SAXParser.<init>(Unknown Source) at jenova.core.kernel.plugins.internal.plugins.PluginParser?.initializeParser(PluginParser?.java:116) at jenova.core.kernel.plugins.internal.plugins.PluginParser?.<clinit>(PluginParser?.java:64) at jenova.core.kernel.plugins.internal.plugins.RegistryLoader?.processManifestFile(RegistryLoader?.java:99) at jenova.core.kernel.plugins.internal.plugins.RegistryLoader?.processPluginPathFile(RegistryLoader?.java:146) at jenova.core.kernel.plugins.internal.plugins.RegistryLoader?.processPluginPathEntry(RegistryLoader?.java:137) at jenova.core.kernel.plugins.internal.plugins.RegistryLoader?.processManifestFiles(RegistryLoader?.java:114) at jenova.core.kernel.plugins.internal.plugins.RegistryLoader?.parseRegistry(RegistryLoader?.java:73) at jenova.core.kernel.plugins.internal.plugins.RegistryLoader?.parseRegistry(RegistryLoader?.java:81) at jenova.core.kernel.plugins.internal.runtime.InternalPlatform?.parsePlugins(InternalPlatform?.java:458) at jenova.core.kernel.plugins.internal.runtime.InternalPlatform?.parsePlugins(InternalPlatform?.java:451) at jenova.core.kernel.implem.plugins.PluginService?.serviceStartup(PluginService?.java:118) at jenova.core.kernel.startup.Startup.init(Startup.java:70) at jenova.core.kernel.startup.Startup.startup(Startup.java:192) at jenova.core.kernel.startup.ServletStartup?.init(ServletStartup?.java:85) at org.mortbay.jetty.servlet.ServletHolder?.initServlet(ServletHolder?.java:433) at org.mortbay.jetty.servlet.ServletHolder?.doStart(ServletHolder?.java:256) at org.mortbay.component.AbstractLifeCycle?.start(AbstractLifeCycle?.java:40) at org.mortbay.jetty.servlet.ServletHandler?.initialize(ServletHandler?.java:612) at org.mortbay.jetty.servlet.Context.startContext(Context.java:139) at org.mortbay.jetty.webapp.WebAppContext?.startContext(WebAppContext?.java:1216) at org.mortbay.jetty.handler.ContextHandler?.doStart(ContextHandler?.java:509) at org.mortbay.jetty.webapp.WebAppContext?.doStart(WebAppContext?.java:447) at org.mortbay.component.AbstractLifeCycle?.start(AbstractLifeCycle?.java:40) at org.mortbay.jetty.handler.HandlerWrapper?.doStart(HandlerWrapper?.java:117) at org.mortbay.jetty.Server.doStart(Server.java:222) at org.mortbay.component.AbstractLifeCycle?.start(AbstractLifeCycle?.java:40) at runjettyrun.Bootstrap.main(Bootstrap.java:76)

What PluginParser? does is simply : parser = new SAXParser(); Could it be a conflict with xerces implementations provided by run-jetty-run?

Comment by project member eelco.hillenius, Feb 6, 2008

Pfff. I have no idea.

Would you be able to patch the dependencies of run-jetty-run and see how that works out? If you want to try, you need to check out run-jetty-run and run-jetty-run-bootstrap and tweak dependencies in these projects (var places, including in the build.xml, which produces a jar that i used in run-jetty-run).

Btw, are you using Java 5 or Java 4? If 4, could you try switching to 5 just for the test? I'm just now reading Jetty's docs and see that the JSP libs they are including depend on the version of Java in use. Currently, I just include the JSP libs for 5, but if I look at the libs for 4, they also include an xerces lib. So the solution to your problem and the JSP problems mentioned before might be to let the inclusion of jars depend on the java version or just include the ones for 4.

Comment by chris.ma...@gmail.com, Feb 6, 2008

Eelco,

I need more time to investigate my issue. I'm begining to think that this is a ClassPath? issue. My project works when I run it from within Eclipse using Tomcat with the server plugin. To be able to compile my app successfully I need to include the server runtime libraries, without them the application will not compile. I think that when launching Jetty these libraries may be causing some complications which is resulting in the exceptions that I am seeing. I think I need to create a System Library variable which includes only those libraries that I need for compilation and the runtime libraries (like log4j). This may resolve the issue but will take me some time to configure.

Comment by rtier...@gmail.com, Feb 6, 2008

I also get an issue with Hibernate that only occurs when using this plugin. I too believe this to be a class path issue, as it seems as though /META-INF/orm.xml isn't being added to the classpath for some reason. Is there support for META-INF class pathing?

Comment by project member eelco.hillenius, Feb 6, 2008

That should work like it normally does. I don't think there's anything special I can do for this.

Comment by rtier...@gmail.com, Feb 7, 2008

Okay, so I found the root cause of my problem when launching with runjettyrun. It appears as though in hibernate the following function:

private <T extends Annotation> boolean isJavaAnnotationPresent(Class<T> annotationType) {
return element.isAnnotationPresent( annotationType );
}

will always return null. When I run in Tomcat, it does not. The funny thing about it is that the annotation is present in the debugger. I have not idea why this might be. Maybe someone could shed some light if they have had similar experiences

Comment by rtier...@gmail.com, Feb 7, 2008

Please note that element.isAnnotationPresent is coming from rt.jar. Thus if something special is going on with that jar inside the plugin (a special local jar perhaps?), that maybe causing an issue.

Comment by project member eelco.hillenius, Feb 7, 2008

And which JDK do you run it with in Eclipse?

Comment by rtier...@gmail.com, Feb 7, 2008

jre1.6.0_02

Also, I get some weird reflection issues with Spring, Struts2, etc.

For example: com.cit.linkory.web.struts.converter.ThemeTypeConverter? cannot be cast to ognl.TypeConverter?

But it extends it. I notice the same thing if I remove hibernate and spring from the equation. So something is fundamentally wrong in my setup.

Comment by rtier...@gmail.com, Feb 7, 2008

But if I remove struts from the picture, at least the app will load. Sorry for all the posts. If there is a better place for this discussion, let me know.

Comment by cfmdob...@gmail.com, Feb 8, 2008

I don't know how to fix your problem (just posting while run-jetty-run installs!) but it may be helpful to know that class cast issues where you know the cast should work are usually down to the classloader - given class A extends B, if A and B are loaded in different ClassLoaders? then A instanceof B will be false.

Don't know whether that's of any use to you!

Comment by rtier...@gmail.com, Feb 8, 2008

That's what I was thinking hmm... classloaders.... fun

Comment by nikolaos...@gmail.com, Feb 14, 2008

I'm getting this error from eclipse any ideas why? Plug-in runjettyrun was unable to load class runjettyrun.JettyLaunchConfigurationTabGroup?. runjettyrun/JettyLaunchConfigurationTabGroup? (Unsupported major.minor version 49.0)

I assume I have some odd eclipse version from the error. This is what I'm running

Version: 3.3.1.1 Build id: M20071023-1652

Comment by project member eelco.hillenius, Feb 14, 2008

What JDK are you running Eclipse on?

Comment by nikolaos...@gmail.com, Feb 14, 2008

I upgraded from 1.4.2 to 5 today

Comment by project member eelco.hillenius, Feb 14, 2008

And does it still fail after upgrading? I guess I should compile the starter using 1.4 (something I forgot to do I think).

Comment by nikolaos...@gmail.com, Feb 14, 2008

it still fails email me 2 ncesitz@hotmail.com when the starter is ready

Comment by project member eelco.hillenius, Feb 14, 2008

I'll post news on this site, and it should pop up as updates in Eclipse from now on. It might be a while before I have time to work on this again though.

Comment by mshillin...@gmail.com, Feb 21, 2008

I am using eclipse 3.3,Java 6, run-jetty-run ver. 1.0 , If I cannot resolve/connect to java.sun.com, startup time is slow. Something is attempting to open an http connection to java.sun.com. The timeout is 20 - 30 seconds. I would guess that something is attempting to locate a DTD or XSD on Jetty startup. Are there jetty dtd or xsd files missing from the plugin. After the delay, Jetty will start. Even when I can resolve java.sun.com run-jetty-run is 10 - 15 seconds slower on startup than a standalone version of jetty.

Comment by Nyghtf...@gmail.com, Feb 22, 2008

Trying to download the plugin for Eclipse 3.3 and receiving the following error:

Network connection problems encountered during search.

Unable to access "http://run-jetty-run.googlecode.com/svn/trunk/updatesite/".
Error parsing site stream. end of file.? Premature end of file. Error parsing site stream. end of file.? Premature end of file.

I can get to the site but not sure what's needed to download or where to install /config the plugin. Any suggestions?

Comment by rtier...@gmail.com, Feb 24, 2008

Is there any way to hook into jetty.xml from the plugin?

I want to be able to set:

<Set name="classLoaderJava2Compliant">true</Set>

as described here:

http://jetty.mortbay.org/jetty5/faq/faq_s_250-Configuration_t_200classloading.html

Comment by zimowsk...@gmail.com, Feb 27, 2008

The plugin will not accept WEB-INF directly under Eclipse project dir. Trying to enter ../ causes the plugin to freeze and throws error when selecting a Jetty webapp.

Comment by mshillin...@gmail.com, Mar 6, 2008

rtiernay,

I assume you mean using an alternate configuration file.

If you put your jetty.xml in a file named jetty-web.xml or web-jetty.xml in your WEB-INF/ directory, Jetty will use. In jetty-web.xml you can also define an alternate webdefault.xml which allows you to modify other server settings.

See: http://jetty.mortbay.org/jetty5/faq/faq_s_250-Configuration_t_150xmljettyweb.html

Comment by freddy....@gmail.com, Mar 10, 2008

Thank you

I still have a question. Is it possible to enable the https too?

Comment by jeromebr...@gmail.com, Mar 11, 2008

I am also having the same problem as zimowski74; I want to have a different output folder than the base of the project. When I do this, it cannot find the web.xml that I specify. Is there a different way to do this other than using ../src/webapp/WEB-INF?

Comment by project member eelco.hillenius, Mar 11, 2008

I'm always using a different output folder myself. If you use src/webapp for your web app (like I always do in fact), put src/webapp in the WebApp? dir field.

Comment by project member eelco.hillenius, Mar 11, 2008

zimowski74 did you try ./?

Comment by techie.p...@gmail.com, Mar 16, 2008

What about the plugin::

http://www.webtide.com/eclipse

Comment by project member eelco.hillenius, Mar 16, 2008

That's a fine plugin as well, but it requires WTP and Jetty to be installed first.

Comment by janne.hu...@iki.fi, Mar 19, 2008

Hello everybody,

I have also had some small troubles with run-jetty-run plugin. When I am deploying (using the plugin) a simple tapestry application (type of HelloWorld?) I get the following stack trace:

javax.servlet.ServletException?: Unable to initialize application servlet: Error: Module hivemind is duplicated! Definition in jar:file:/C:/source/workspaces/foobar/demo/WebRoot?/WEB-INF/lib/hivemind-1.1.1.jar!/META-INF/hivemodule.xml has been ignored in favor of existing definition from jar:file:/C:/source/workspaces/foobar/demo/WebRoot?/WEB-INF/lib/hivemind-1.1.1.jar!/META-INF/hivemodule.xml.

at org.apache.tapestry.ApplicationServlet?.init(ApplicationServlet?.java:209) at org.mortbay.jetty.servlet.ServletHolder?.initServlet(ServletHolder?.java:433) at org.mortbay.jetty.servlet.ServletHolder?.getServlet(ServletHolder?.java:342) at org.mortbay.jetty.servlet.ServletHolder?.handle(ServletHolder?.java:463) at org.mortbay.jetty.servlet.ServletHandler?.handle(ServletHandler?.java:362) at org.mortbay.jetty.security.SecurityHandler?.handle(SecurityHandler?.java:216) at org.mortbay.jetty.servlet.SessionHandler?.handle(SessionHandler?.java:181) at org.mortbay.jetty.handler.ContextHandler?.handle(ContextHandler?.java:722) at org.mortbay.jetty.webapp.WebAppContext?.handle(WebAppContext?.java:404) at org.mortbay.jetty.handler.HandlerWrapper?.handle(HandlerWrapper?.java:139) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection?.handleRequest(HttpConnection?.java:505) at org.mortbay.jetty.HttpConnection?$RequestHandler?.headerComplete(HttpConnection?.java:828) at org.mortbay.jetty.HttpParser?.parseNext(HttpParser?.java:514) at org.mortbay.jetty.HttpParser?.parseAvailable(HttpParser?.java:211) at org.mortbay.jetty.HttpConnection?.handle(HttpConnection?.java:380) at org.mortbay.io.nio.SelectChannelEndPoint?.run(SelectChannelEndPoint?.java:395) at org.mortbay.thread.BoundedThreadPool?$PoolThread?.run(BoundedThreadPool?.java:450)

I have been searching for an answer from the web and I think this is an classloader issue. When I package the application as WAR -file and deploy it to Jetty 6.1.7 standalone (not using the eclipse plugin) or Tomcat 5.5 standalone it works just fine.

My environment as follows: Eclipse 3.3.2 Run-jetty-run plugin 1.0.1 (including Jetty 6.1.6) JRE 1.6.0_01 Tapestry 4.1.5 (packaged into the app)

Any ideas how to tackle this issue?

Comment by pmeis...@gmail.com, Apr 4, 2008

Great plugin! But how can I get it to log to log4j instead of stderr?

Comment by ngocdaot...@gmail.com, Apr 9, 2008

For newbie like me:

  • Right click the project name
  • Run As -> Open Run Dialog, the dialog as shown in the above screenshot will appear

Comment by Marco.M...@gmail.com, Apr 14, 2008

Hi!

My webapp needs a userrealm. I add this using the following in the jetty config:

    <Call class="java.lang.System" name="setProperty">
      <Arg>java.security.auth.login.config</Arg>
      <Arg><SystemProperty name="jetty.home" default="." />/etc/login.conf</Arg>
    </Call>

    <Set name="UserRealms">
      <Array type="org.mortbay.jetty.security.UserRealm">
        <Item>
          <New class="org.mortbay.jetty.plus.jaas.JAASUserRealm">
           <Set name="Name">EMCSREALM</Set>
           <Set name="LoginModuleName">EMCSLogin</Set>
          </New>
        </Item>
      </Array>
    </Set>

How can I do this with in eclipse???

Thanks in advanced.

Marco

Comment by kin.k....@gmail.com, Apr 22, 2008

I successfully installed this plugin in Eclipse 3.3.2, but can't seem to find the icon/link to launch the screen shown above. Where is the icon/link supposed to be located?

Comment by kin.k....@gmail.com, Apr 22, 2008

Never mind. I found the run link.

Comment by soeren...@gmail.com, Apr 23, 2008

I have also got the problem with classpath/classloader. Most notable is Hibernate:

java.lang.IllegalArgumentException?: Cannot convert value of type [org.hibernate.impl.SessionFactoryImpl?] to required type [org.hibernate.SessionFactory?] for property 'sessionFactory': no matching editors or conversion strategy found

Even though one is an implementation of the other. I have checked and double checked to make sure that the project only contains one reference to the hibernate library.

When I run the application in normal Jetty 6.x or Tomcat x it works like a charm, so I'm backing up the classpath/classloader issue.

Added an issue on this as well, anyone got any luck on solving this?

Comment by m.zd...@gmail.com, May 16, 2008

Hello

I also have problems with classloader. http://code.google.com/p/run-jetty-run/issues/detail?id=15

Comment by oliver.daily@gmail.com, Jul 9, 2008

hi~!

i got a lot of ClassCastException?,after i move all jars from WEB-INF/lib to ${WebAppRoot?}/lib these problem solved,the project can run successfully. but it still get ClassCastException? when i try to login,any one got these exception also?

Comment by davidj.j...@gmail.com, Jul 14, 2008

I setup my projects so that the project folder IS the webapp folder so it's <project/WEB-INF/web.xml> when i try and create a launch config, it tells me web directory is not set? I can't say project root?

Comment by gunrock1...@gmail.com, Aug 27, 2008

Hi Eelco,

Congrats on the 6 month wedding anniversary!

Just installed this and have the following issue. In my Eclipse log, I get this:

!ENTRY org.eclipse.debug.core 4 5020 2008-08-27 15:04:35.174 !MESSAGE Launch configuration type id "com.iw.plugins.jettylauncher.webApp" does not exist. Possible causes:

Missing specification of a launch type (missing plug-in) Incorrect launch configuration XML

Now, my webapp seems to startup correctly (according to the logs) but I can't reach it, i.e I always get a 404. Is it possible that this is related?

Comment by tdili...@gmail.com, Aug 30, 2008

Installed on 3.4 on OSX and get : Exception in thread "main" java.lang.NoClassDefFoundError?: javax/servlet/http/HttpServletRequest?

at runjettyrun.Bootstrap.main(Bootstrap.java:60)

Comment by Krishnan...@gmail.com, Sep 3, 2008

How do you see the logs for this? I am able to redirect the page to a url but I don't see the pages.

Comment by danilo.t...@gmail.com, Sep 11, 2008

Unfortunately run-jetty-run does not play nice with m2eclipse plugin because m2eclipse does some magic with the runtime classpath (described at http://docs.codehaus.org/display/M2ECLIPSE/Runtime+classpath).

Comment by ppetr...@gmail.com, Sep 21, 2008

I am trying to use the plugin but I am getting this exception every time I run the plugin I get this exception Caused by: java.lang.ClassNotFoundException?: javax.servlet.ServletRequestListener?

when I explicitly put the servlet-api.jar in the classpath I then get this exception java.lang.ClassNotFoundException?: org.slf4j.Logger

Has anyone see this before ?

Petros

Comment by pad...@gmail.com, Sep 24, 2008

Great work! Installation without any problems, works like a charm! Thanks!

Comment by trent.at...@gmail.com, Sep 30, 2008

Great plugin! Thank you.

Comment by mar...@gmail.com, Oct 12, 2008

Hi,

I'm using the "plus" features of Jetty - my servlet seems to blow fail as soon as I try calling any method in it. Is there a way to use this plugin with the "plus" features enabled?

Thanks

Comment by blackn...@gmail.com, Oct 13, 2008

tdilinux said:

- Installed on 3.4 on OSX and get : Exception in thread "main" java.lang.NoClassDefFoundError?: javax/servlet/http/HttpServletRequest?

I had the same issue. I had a Jetty 6 download from a while back and added the servlet-api-2.5-6.0.2.jar file that came with it to the classpath and it worked.

Comment by zakiakh...@gmail.com, Oct 20, 2008

Is it work with Eclipse 3.4? I face this error when trying to install:

An error occurred during provisioning.

Failed to prepare partial IU: R?runjettyrun 1.0.1.

Comment by judiant...@gmail.com, Oct 23, 2008

Just installed r-j-r version 1.0.1 on eclipse 3.4.0(Build id: I20080617-2000)

Able to create run configuration, but when try to launch got exception java.lang.NoClassDefFoundError?: org/apache/juli/logging/LogFactory? in console

manually add tomcat-juli.jar from tomcat installation in run configuration classpath solve the problem

Comment by suni...@gmail.com, Nov 13, 2008

How can we remote debug with plugin?

Comment by nicholas...@gmail.com, Dec 13, 2008

Hi!

Why does it only work the first time. Second time I want to build after changes I get: 13:43:08.329 WARN!! Failed to start: SocketListener0?@0.0.0.0:8081 FATAL - Start - Could not start the Jetty server: org.mortbay.util.MultiException?[java.net.BindException?: Address already in use]

Comment by swyi...@hotmail.com, Jan 26, 2009

anyone figure out the slf4j logger issue from above?

Comment by m.brink...@gmail.com, Feb 4, 2009

The slf4j issue was fixed for me when I added the following VM argument in the debug configuration

-Dorg.mortbay.jetty.webapp.parentLoaderPriority=true

Martijn Brinkers

Comment by hariharkumar.k, Mar 5, 2009

is there an updated version available for jetty-6.1.15,

because the mvn jetty:run was plugin was taking this version and

jetty-webapp plugin is still starting the application with 6.1.4 version itself

and giving some context not loaded errors while i try to start the debug of my application from eclipse?

Comment by karlkode...@gmail.com, Mar 18, 2009

Hi!

How do I reload the servlet? If i start the Jetty server from ecplise using the run configuration it works fine. When making changes in the code and updating the .class file the servlet isnt redeployed. I have to change the context or use another port. Isnt there a way to reaload the servlet when i launch it from this plugin?

Cheers!

Comment by karl.gol...@gmail.com, Aug 15, 2009

Works great, thanks very much!

Comment by sebastia...@gmail.com, Sep 2, 2009

Hey, 1st of all, thanks for your work! works great!

i have a question: where are the compiled JSP during the runtime?

thx!

Comment by project member James.Sy...@gmail.com, Sep 2, 2009

Sebastian, I think you're asking where the JSP compiler puts the generated Java files. I'm not certain, but you might read the following:

http://jetty.mortbay.org/jetty5/faq/faq_s_950-JSP_t_JSP.html

I suspect it will be difficult with run-jetty-run to control the location of the generated Java files.

James

Comment by sebastia...@gmail.com, Sep 3, 2009

Thx for your answer James!

The page didn't helped me. I think, RunJettyRun? holds the compiled JSPs in the RAM. I'm asking because of an Exception in a JSP, and the stacktrace just links to the compiled JSP...

Comment by jem...@gmail.com, Sep 8, 2009

Could you package this as a .zip file so that I could just drop everything into p2's dropins/ directory? This saves us from reinstalling this wonderful plugin from update site everytime I upgraded my Eclipse.

Thanks.

Comment by project member James.Sy...@gmail.com, Sep 8, 2009

Please submit an enhancement request for this. I'm thinking of automating the build with Maven (it is currently quite manual), and could include this idea if you'll help me remember it.

Comment by harishma...@gmail.com, Oct 13, 2009

while double clicking Jetty from Run,Conf I am getting an error stating "An error has occurred. See error log for more details. org.eclipse.jdt.internal.debug.ui.launcher.WorkingDirectoryBlock?: method <init>()V not found" Version using -->eclipse 3.4.2 Jetty plugin ->1.4.1 machine -> Windows Xp

Please help me to proceed.

Comment by project member James.Sy...@gmail.com, Oct 17, 2009

@harishmatrix

Do you mean you're using Java 1.4.1? If so, you'll need to use Java 1.5 or greater (I don't recall if I've tried running it with Java 1.6).

Comment by choong...@gmail.com, Nov 17, 2009

Good plugin.. It's working very well.

Comment by zhiyang.googl, Jan 18, 2010

How to create the configuration tab in our java project.We need to use the JDK1.5 or higher to run this HTTP server in our project!

Comment by project member James.Sy...@gmail.com, Mar 20, 2010

It must have been a transient problem with googlecode.com as the update site is now working.

Comment by alex.win...@gmail.com, May 14, 2010

Just wanted to let you guys know that I have forked this project and created a new version on GitHub? that supports supplying a VM Argument to specify a jetty.xml file. I have created a new update site and plan to maintain this project moving forward. Any feedback would be appreciated, as well as whether it even works for anyone else. I have also migrated this new version to use Maven which should allow anyone to build the plugin out of the box.

http://github.com/alexwinston/RunJettyRun

Comment by project member eelco.hillenius, May 30, 2010

Cool Alex. Maybe we should shut this project down. It's not being maintained currently.

Comment by hu.h...@gmail.com, Aug 9, 2010

How to bind my ip,excmple 192.168.0.23 ?

Comment by paul.sta...@gmail.com, Nov 6, 2010

is it possible to gracefully shutdown the container via this plugin?

hitting the 'stop' button (in eclipse debug/console panels) simply terminates the process therefore not calling application shutdown procedures...

am i missing something?

Comment by qiaojunw...@gmail.com, Mar 15, 2011

I have an http proxy based on Jetty API 7.3.When I deploy it manually and start Jetty through command line.It works well.But if I run it by RJR as shown above, I got HTTP ERROR: 404. Did I miss something? Thanks.

Comment by project member tonylove...@gmail.com, Mar 15, 2011

Would you check your context path first? When you got a 404 , it could means : 1.your request wrong resource for the server (check your resource , context path ,webapp dir first) 2.the webapp failed when startup. (check your console and see if there any error message.)

Comment by project member tonylove...@gmail.com, Mar 15, 2011

And currently RJR works with Jetty 6.1.26 , if you are trying to make RJR work with Jetty 7.3 .

You might need to update the classpath in run configuration , to replace all the jetty bundle with Jetty7 in Classpath.

If you could provide a simple project to reproduce it and post a bug in our issue tracker, I will fix it soon.

Comment by michael....@gmail.com, Jun 1, 2011

Re: 15th March 2011... does that mean RJR with Jetty 7 doesn't work?

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/eclipseworkspaces/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!

Comment by project member tonylove...@gmail.com, Jul 8, 2011

Just left a note here, Jetty support is already in nightly build , and it will be in next official release. ( 1.3 )

Comment by project member tonylove...@gmail.com, Jul 8, 2011

About gracefull shutdown issue , please reference to  Issue 64  , we provide a workaround now. Also in nightly build and will get in next official release.(1.3)

Comment by zksnowdr...@gmail.com, Aug 10, 2011

How to config that,modify the class without restart the server? And now ,it doesn't reload the app anymore.

Comment by project member tonylove...@gmail.com, Aug 11, 2011

1.use debug mode to run RJR 2.uncheck the scanner . (it's in the advanced option of run configuration)

There's still some imitation , like if you add a static field , the hot deploy feature will fail.

It depends how JVM/JDT handle the hot deploy .

Comment by christin...@gmail.com, Sep 13, 2011

Does RunJettyRun? still work? I've used it a long time, but I can't seem to get it installed in Eclipse Indigo:

Cannot complete the install because one or more required items could not be found.

Software being installed: RunJettyRun? Jetty7 Support (Optional) 1.3.0.1 (runjettyrun_feature_support_jetty7.feature.group 1.3.0.1) Missing requirement: Run-jetty-run-jetty7-support 1.3.0.1 (runjettyrun.jetty7 1.3.0.1) requires 'bundle runjettyrun 1.2.2' but it could not be found Cannot satisfy dependency:
From: RunJettyRun? Jetty7 Support (Optional) 1.3.0.1 (runjettyrun_feature_support_jetty7.feature.group 1.3.0.1) To: runjettyrun.jetty7 [1.3.0.1]

Comment by project member tonylove...@gmail.com, Sep 13, 2011

That seems our update-site got some troubles ,will double check and clear the issues ASAP. Sorry for the inconvenient.

Comment by project member tonylove...@gmail.com, Sep 13, 2011

RJR update-site is back now.

Comment by aliasgha...@gmail.com, Sep 15, 2011

update site doesn't work!

Comment by project member tonylove...@gmail.com, Sep 15, 2011

According to our marketplace record , it's not getting install error after 17:13 09/13/2011 , maybe it's googlecode temporary hosting issue for you, would you mind to try it again ?

http://marketplace.eclipse.org/content/run-jetty-run/error_reports

Comment by aliasgha...@gmail.com, Sep 15, 2011

Hi. You're right. It works! Thanks.

Comment by wasw...@gmail.com, Oct 16, 2011

hi - does the plugin provide an option to 'embedd' jetty vm into the webapp ? (for standalone deployment of webapp alongwith embedded jetty server )

Comment by project member tonylove...@gmail.com, Oct 16, 2011

A web application is already running on a standalone Jetty , do you mean you want to run multiple Jetty instance (or multiple context) when you launch the project?

I think I am not getting your request well. :)

Comment by juan.t...@gmail.com, Nov 23, 2011
Comment by xwj1003@gmail.com, Nov 28, 2011

Whether to support the STS springsource tool suite2.8.1?

Comment by project member tonylove...@gmail.com, Nov 29, 2011

To be honest ,I didn't test with STS springsource tool suite2.8.1 , and also I didn't test with Eclipse 3.7 so far.

So I don't know the answer , but I will try to support them if there's any reported issue as possible as I could. :)

Comment by hristija...@gmail.com, Jan 16, 2012

There is no option under advanced options (run configuration) to uncheck the "Enable scanner" option. What could be, and how can i disable the scanner. Eclipse version 3.7.1, RJR 1.3.2 version

Comment by hristija...@gmail.com, Jan 16, 2012

whoops, its now replaced under Source monitor list since v1.3.2

Comment by project member tonylove...@gmail.com, Jan 16, 2012

Yes , sorry for the inconvenience, I will write a new GettingStart? for 1.3.2 soon.


Sign in to add a comment
Powered by Google Project Hosting