12 Replies Latest reply: Nov 2, 2010 7:11 PM by Karl Philipp RSS

JBoss AS 6 - Eclipse Integration - Server Adapter

Anthony P Newbie

Hi,

 

Does an Eclipse JBOSS 6 server adapter exist or is being developed ?

I'm using WTP Galileo 3.5 SR1 and the most recent adapter is only managing JBOSS 5.

There's a link in the Eclipse server adapter selector wizard to get additional adapters.. but nothing for JBOSS 6.

 

Thanks,

  • 1. Re: JBoss AS 6 - Eclipse Integration - Server Adapter
    Peter Johnson Master

    Did you try using "JBoss 5" and did it not work? If not, the app server configuration files are kept at eclipse/plugins/org.eclipse.jst.server.generic.jboss_1.6.1.v200904151730/servers (version number if directory name might vary). Copy the jboss5.serverdef as jboss6.serverdef and modify the contents as appropriate. At minimum you need to change the "name" and "version" values in the <tns:ServerRuntime> enty. Also, further down there will be locations of key JAR files, you will have to adjust those.

     

    I did the above when the betas for 5.0 came out, modifying the jboss42.serverdef file; I have not yet tried it for AS 6 but it should work.

  • 2. Re: JBoss AS 6 - Eclipse Integration - Server Adapter
    Wolfgang Knauf Master

    The 5.0 adapter works fine for 6.0, too. I think the only issue is that the WebBeans jars are not in the classpath.

     

    Best regards

     

    Wolfgang

  • 3. Re: JBoss AS 6 - Eclipse Integration - Server Adapter
    Anthony P Newbie

    Thanks for your answers.

    I'm going to drive tests and to post some feedback.

  • 4. Re: JBoss AS 6 - Eclipse Integration - Server Adapter
    Manimaran Malaichamy Newbie

    In Eclipse Galileo, eventhough the Jboss server adapter upto version 5.0 is displayed, i just connect the Jboss AS 6.0 and its working fine. Im not sure what type of problem will come. If anyone knows about any issue in using like this, kindly let me know.

     

    Regards,

    Mani

  • 5. Re: JBoss AS 6 - Eclipse Integration - Server Adapter
    tomi m Newbie

    HI,

     

    I have problems when deploying web apps based on servlet 3.0 facet to JBoss6 with jboss 5 adapter so I have changed config files of standard Eclipse Helios plugin. Now it  is working perfectly.

     

    If this can help anyone ,here is modified plugin ,just  backup & replace original one.

  • 6. Re: JBoss AS 6 - Eclipse Integration - Server Adapter
    Wolfgang Knauf Master

    You are not the only one who did this stuff ;-): http://www.cs.hs-rm.de/~knauf/public/

     

    Best regards

     

    Wolfgang

  • 7. Re: JBoss AS 6 - Eclipse Integration - Server Adapter
    tomi m Newbie

    I didn't create new plugin like you have, just modified config files of original Eclipse server adapter plugin to get support for JB6
    and share it here for anyone who want to use it until official version is released.
    After waiting for a long time (as many other) for standard adapter support
    and after couldn't find any fix on the net I resolve change it by my self :))
    Wasn't aware of your plugin in that moment.
    I have also tried your adapter today, nice work, but I got an error deploying on Jboss 6 M5 (see below).
    I don't know is it jboss related or this plugin related?!
    Is there any difference (advantages) between your and standard JBoss/Eclipse adapter?
    (sorry if I didn't read your manual throughly )

    I have tried your adapter today, nice work, but I got an error deploying on Jboss 6 M5 (see below).

    I don't know is it jboss related or this plugin related?!

     

    Is there any difference (advantages) between your and standard JBoss/Eclipse adapter plugin?

    (sorry if I didn't read your manual throughly )

    I am asking this because I didn't create a new plugin, just changed original config files to get support for JB6 and Servlet 3.0 facet

     


    Buildfile: D:\Java\eclipse-jee-helios-win32\plugins\jboss6\buildfiles\jbossjsr88.xml

    deploy.j2ee.web:

         [jar] Building jar: D:\Java\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp3\async.war

         [java] Undeploying file 'D:/Java/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp3/async.war'

         [java] log4j:ERROR Could not instantiate class [org.jboss.logging.util.OnlyOnceErrorHandler].

         [java] java.lang.ClassNotFoundException: org.jboss.logging.util.OnlyOnceErrorHandler

         [java] at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1400)

         [java] at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1341)

         [java] at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1094)

         [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:252)

         [java] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)

         [java] at java.lang.Class.forName0(Native Method)

         [java] at java.lang.Class.forName(Class.java:169)

         [java] at org.apache.log4j.helpers.Loader.loadClass(Loader.java:178)

         [java] at org.apache.log4j.helpers.OptionConverter.instantiateByClassName(OptionConverter.java:319)

         [java] at org.apache.log4j.xml.DOMConfigurator.parseErrorHandler(DOMConfigurator.java:237)

         [java] at org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:203)

         [java] at org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:150)

         [java] at org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:163)

         [java] at org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:425)

         [java] at org.apache.log4j.xml.DOMConfigurator.parseRoot(DOMConfigurator.java:394)

         [java] at org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:829)

         [java] at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:712)

         [java] at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:618)

         [java] at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:470)

         [java] at org.apache.log4j.LogManager.<clinit>(LogManager.java:122)

         [java] at java.lang.Class.forName0(Native Method)

         [java] at java.lang.Class.forName(Class.java:247)

         [java] at org.jboss.logging.LoggerProviders.findProvider(LoggerProviders.java:37)

         [java] at org.jboss.logging.LoggerProviders.<clinit>(LoggerProviders.java:28)

         [java] at org.jboss.logging.Logger.getLogger(Logger.java:2164)

         [java] at org.jboss.logging.Logger.getLogger(Logger.java:2189)

         [java] at org.jboss.deployment.spi.factories.DeploymentFactoryImpl.<clinit>(DeploymentFactoryImpl.java:60)

         [java] at de.knauf.eclipse.jbossdeployer.jsr88.JSR88DeployerUtil.getDeploymentManager(JSR88DeployerUtil.java:50)

         [java] at de.knauf.eclipse.jbossdeployer.jsr88.JSR88Undeployer.main(JSR88Undeployer.java:43)

         [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

         [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

         [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

         [java] at java.lang.reflect.Method.invoke(Method.java:597)

         [java] at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:217)

         [java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:152)

         [java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:764)

         [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:218)

         [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:132)

         [java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:105)

         [java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)

         [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

         [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

         [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

         [java] at java.lang.reflect.Method.invoke(Method.java:597)

         [java] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)

         [java] at org.apache.tools.ant.Task.perform(Task.java:348)

         [java] at org.apache.tools.ant.Target.execute(Target.java:357)

         [java] at org.apache.tools.ant.Target.performTasks(Target.java:385)

         [java] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)

         [java] at org.apache.tools.ant.Project.executeTarget(Project.java:1306)

         [java] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)

         [java] at org.eclipse.ant.internal.launching.remote.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)

         [java] at org.apache.tools.ant.Project.executeTargets(Project.java:1189)

         [java] at org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:423)

         [java] at org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:137)

         [java] File async.war not deployed

         [java] Deploying file 'D:/Java/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp3/async.war'

         [java] log4j:ERROR Could not instantiate class [org.jboss.logging.util.OnlyOnceErrorHandler].

         [java] java.lang.ClassNotFoundException: org.jboss.logging.util.OnlyOnceErrorHandler

         [java] at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1400)

         [java] at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1341)

         [java] at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1094)

         [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:252)

         [java] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)

         [java] at java.lang.Class.forName0(Native Method)

         [java] at java.lang.Class.forName(Class.java:169)

         [java] at org.apache.log4j.helpers.Loader.loadClass(Loader.java:178)

         [java] at org.apache.log4j.helpers.OptionConverter.instantiateByClassName(OptionConverter.java:319)

         [java] at org.apache.log4j.xml.DOMConfigurator.parseErrorHandler(DOMConfigurator.java:237)

         [java] at org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:203)

         [java] at org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:150)

         [java] at org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:163)

         [java] at org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:425)

         [java] at org.apache.log4j.xml.DOMConfigurator.parseRoot(DOMConfigurator.java:394)

         [java] at org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:829)

         [java] at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:712)

         [java] at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:618)

         [java] at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:470)

         [java] at org.apache.log4j.LogManager.<clinit>(LogManager.java:122)

         [java] at java.lang.Class.forName0(Native Method)

         [java] at java.lang.Class.forName(Class.java:247)

         [java] at org.jboss.logging.LoggerProviders.findProvider(LoggerProviders.java:37)

         [java] at org.jboss.logging.LoggerProviders.<clinit>(LoggerProviders.java:28)

         [java] at org.jboss.logging.Logger.getLogger(Logger.java:2164)

         [java] at org.jboss.logging.Logger.getLogger(Logger.java:2189)

         [java] at org.jboss.deployment.spi.factories.DeploymentFactoryImpl.<clinit>(DeploymentFactoryImpl.java:60)

         [java] at de.knauf.eclipse.jbossdeployer.jsr88.JSR88DeployerUtil.getDeploymentManager(JSR88DeployerUtil.java:50)

         [java] at de.knauf.eclipse.jbossdeployer.jsr88.JSR88Deployer.main(JSR88Deployer.java:50)

         [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

         [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

         [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

         [java] at java.lang.reflect.Method.invoke(Method.java:597)

         [java] at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:217)

         [java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:152)

         [java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:764)

         [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:218)

         [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:132)

         [java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:105)

         [java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)

         [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

         [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

         [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

         [java] at java.lang.reflect.Method.invoke(Method.java:597)

         [java] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)

         [java] at org.apache.tools.ant.Task.perform(Task.java:348)

         [java] at org.apache.tools.ant.Target.execute(Target.java:357)

         [java] at org.apache.tools.ant.Target.performTasks(Target.java:385)

         [java] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)

         [java] at org.apache.tools.ant.Project.executeTarget(Project.java:1306)

         [java] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)

         [java] at org.eclipse.ant.internal.launching.remote.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)

         [java] at org.apache.tools.ant.Project.executeTargets(Project.java:1189)

         [java] at org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:423)

         [java] at org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:137)

    BUILD SUCCESSFUL

    Total time: 4 seconds

  • 8. Re: JBoss AS 6 - Eclipse Integration - Server Adapter
    Wolfgang Knauf Master

    Hi Tomi,

     

    I did not test my plugin with JBpss 6.0M5, my last version was M4. Maybe there was some classpath change which broke something. I will take a look at it the next  few days.

     

    It seems  JSR-88 deployment failed for you. By using the "standard" JBoss 6 server definition (which performs file copy the same way as the eclipse default plugin does it), it should hopefully work.

     

    Differences of my own plugin to the one provided by Eclipse/WTP:

    -support for JavaEE6 facets

    -better support for non-default JBoss ports

    -remote deployment through JSR-88 (I only tested it for local JBOss servers, but I hope it works also for remote servers)

    -exploded deployment (using the trick of exploding the Eclipse create archives once again ;-) )

    -libraries in lib/endorsed are added to the classpath

    -WebBeans libraries of JBoss 6 are on the classpath

     

    Best regards

     

    Wolfgang

  • 9. Re: JBoss AS 6 - Eclipse Integration - Server Adapter
    tomi m Newbie

    Thank's for the answer.

    Please let me know when you fix it, I'm eager to try exploded deployment.

    This looks much better option than constantly deploying war/ear files just to test jsp or js changes etc...

     

    As I understand, exploded deployment works also for remote deployment?

    If that's the case then this is great  .

    I will look into that a bit more.

     

    Thank's

  • 10. Re: JBoss AS 6 - Eclipse Integration - Server Adapter
    Wolfgang Knauf Master

    Hi Tomi,

     

    I think I found the error, but did find the time not update my plugin.

    As a workaround: delete the file eclipse\plugins\org.eclipse.jst.server.generic.jboss.jsr88ant171_1.2.0.201009032221\buildfiles\log4j.xml

     

    Instead of deleteing, you might also want to "repair" it: Replace this

      <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>


    with that:

         <errorHandler class="org.apache.log4j.helpers.OnlyOnceErrorHandler"/>

    (JBoss 6 seems to have changed their log4j wrapper).

     

    I have to disappoint you: my exploded deployment does not bring any benefits compare to WAR deployment, because I just pick the eclipse generated archive file, unzip it and move those files to JBoss. So, the same number of files is copied and JBoss will undeploy/deploy the app.

    But by taking a look at my buildfile you might find a way to e.g. perform an incremental file copy.

     

    Remote deployment does not work with exploded deployment, but it *might* work for "JSR-88" deployment (as I wrote, I never tested it for remote servers, so you might be the first one ;-). And the big drawback of this way of deployment: JBoss has the limitation that the app will be lost after a server restart. So it is usable only for development cycles.

     

    Best regards

     

    Wolfgang

  • 11. Re: JBoss AS 6 - Eclipse Integration - Server Adapter
    Wolfgang Knauf Master

    New plugin version is online. You should get it by letting Eclipse search for updates.

  • 12. Re: JBoss AS 6 - Eclipse Integration - Server Adapter
    Karl Philipp Newbie

    To be more precise you must install JBoss AS Tools as part of the JBoss Tools. The details can be found here:

     

    http://www.jboss.org/tools/download/dev.html