6 Replies Latest reply on Apr 5, 2013 10:24 AM by peterj

    mvn Jboss:deploy plugin issue

    gyan_kush

      I get a server response as http 500 error code while executing mvn jboss:deploy .
      The output of mnv -e is pasted below.Pls advise
      [INFO] Trace
      org.apache.maven.lifecycle.LifecycleExecutionException: Mojo error occurred: Server returned HTTP response code: 500 for URL: http://209.135.157.212:8080/
      jmx-console/HtmlAdaptor?action=invokeOpByName&name=jboss.system:service%3DMainDeployer&methodName=deploy&argType=java.net.URL&arg0=file:C:\mysystems-app\c
      ollaboration\trunk\mysystems-earapp\target/mysystems-earapp-1.0.ear
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:583)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:512)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:482)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
      Caused by: org.apache.maven.plugin.MojoExecutionException: Mojo error occurred: Server returned HTTP response code: 500 for URL: http://209.135.157.212:80
      80/jmx-console/HtmlAdaptor?action=invokeOpByName&name=jboss.system:service%3DMainDeployer&methodName=deploy&argType=java.net.URL&arg0=file:C:\mysystems-ap
      p\collaboration\trunk\mysystems-earapp\target/mysystems-earapp-1.0.ear
      at org.codehaus.mojo.jboss.AbstractDeployerMojo.doURL(AbstractDeployerMojo.java:101)
      at org.codehaus.mojo.jboss.DeployMojo.execute(DeployMojo.java:40)
      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
      ... 16 more
      Caused by: java.io.IOException: Server returned HTTP response code: 500 for URL: http://209.135.157.212:8080/jmx-console/HtmlAdaptor?action=invokeOpByName
      &name=jboss.system:service%3DMainDeployer&methodName=deploy&argType=java.net.URL&arg0=file:C:\mysystems-app\collaboration\trunk\mysystems-earapp\target/my
      systems-earapp-1.0.ear
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1241)
      at org.codehaus.mojo.jboss.AbstractDeployerMojo.doURL(AbstractDeployerMojo.java:96)
      ... 19 more

        • 1. Re: mvn Jboss:deploy plugin issue
          peterj

          A 500 error means something went wrong on the server. You need to look at the app server console log and to find out what the error is.

          Also, please provide the JDK version, JBoss AS version, and operating system type and version.

          • 2. Re: mvn Jboss:deploy plugin issue
            gyan_kush

            I have jdk1.5.0_15, jboss-4.2.2.GA,GNU Linux 2.6.20.13-RH220.
            The issue seems to be prefixing of CATALINA_HOME/bin to to the file path by jboss plugin. Pls advise

            Server output log is pasted below.

            org.jboss.deployment.DeploymentException: url file:/usr/etc/jboss/jboss-4.2.2.GA/bin/C:\mysystems-app\collaboration\trunk\mysystems-earapp\target/mysystems-earapp-1.0.ear could not be opened, does it exist?
            at org.jboss.deployment.DeploymentInfo.(DeploymentInfo.java:214)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:781)
            at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)

            • 3. Re: mvn Jboss:deploy plugin issue
              peterj

              Look at this file name:

              /usr/etc/jboss/jboss-4.2.2.GA/bin/C:\mysystems-app\collaboration\trunk\mysystems-earapp\target/mysystems-earapp-1.0.ear

              Notice that a Windows path got appended to a Linux path.

              I do not think that the plugin is behaving in the way you want. You think that the plugin will transfer the ear file to the app server and then the app server will deploy it. Instead, what the plugin is doing is passing the path of the ear to the app server, and then the app sever is attempting to deploy the ear based on that path.

              Because the path passed to the app server is not recognized as an absolute path (on Linux, absolute paths start with "/"), the app server is appending the path to the working directory, which is jboss_home/bin. Of course, the resulting file does not exists on the file server.

              Other people have asked the question "how can I deploy an application to a remote server" in the forums. You might want to look up those discussions.

              • 4. Re: mvn Jboss:deploy plugin issue
                gyan_kush

                Thanks a lot Peter!!.you hit it right there.

                • 5. Re: mvn Jboss:deploy plugin issue
                  swathis.swathis

                  Hi Peter,

                   

                   

                  Please find the issue which i m facing in jboss below:

                   

                  I m trying launch an web application through my local.I have an separate war to generate PDF.When i hit my application and try to create an PDF of the report for my application information,while the action is forwarded from my application war to the PDF generator war i m getting the error:

                   

                   

                  SEVERE: Servlet.service() for servlet livexpactionservlet threw exception

                  java.lang.IllegalStateException

                   

                   

                  Due to this everything is failing.I m using jboss.4.0.3

                   

                  JDK 1.5.0_22

                   

                  Please let me know how to proceed

                  • 6. Re: mvn Jboss:deploy plugin issue
                    peterj

                    The servlet "livexpactionservlet" is not part of Jboss AS. You need to contact the person who wrote that servlet and ask them why it would throw an IllegalStateException.