It looks like you're missing an "upload" step or something. On OC4J, there are 2 commands you need to execute to deploy an EAR remotely: the first actually copies the EAR file into the remote app server; the second tells the remote app server to please deploy that EAR file.
From the error message below, it looks like JBoss works similarly, and I gather that you are only performing the second half of the deployment process. > org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112) > at java.lang.Thread.run(Unknown Source) > Caused by: org.jboss.deployment.DeploymentException: url > file:/opt/jboss403SP1/bin/C:\Mvn\Sample/Sample.ear could not be opened, does > it exist? Wayne On 4/23/06, RobJac <[EMAIL PROTECTED]> wrote: > > I need to deploy an EAR from my Local PC to a remote JBoss server. I tried > using the distributionManagement tag as shown below<distributionManagement> > <repository> > <id>10.231.81.122</id> > <name>lunar21</name> > > <url>scp://10.231.81.122/opt/jboss403SP1/server/default/deploy</url> > </repository> > </distributionManagement> > > But it was trying to upload the EAR from my local repository and upload the > entire folder structure (groupId/artifactId/version/SampleEAR-version.ear) > into the remote server which I dont want. I just want the EAR to be taken > from my ${basedir} and uploaded into the specified location into the server. > Could some one please advice on how this can be achieved?. > > I also tried using the jboss:deploy plugin which uses the JMX to deploy to > remote server and my pom xml for the plugin looks like this > <plugin> > <groupId>org.codehaus.mojo</groupId> > <artifactId>jboss-maven-plugin</artifactId> > <configuration> > <fileName> > ${project.build.directory}/${project.build.finalName}.${project.packaging} > </fileName> > <hostName>10.231.81.122</hostName> > <port>8080</port> > </configuration> > </plugin> > This was again throwing me an error when i executes mvn jboss:deploy > > Exception > [INFO] Mojo error occurred: Server returned HTTP response code: 500 for URL: > htt > p://10.231.81.122:8080/jmx-console/HtmlAdaptor?action=invokeOpByName&name=jboss.s > ystem:service%3DMainDeployer&methodName=deploy&argType=java.net.URL&arg0=file:C: > \Mvn\Sample/Sample.ear > javax.management.MBeanException > at > org.jboss.mx.interceptor.ReflectedDispatcher.handleInvocationExceptions(ReflectedDispatcher.java:166) > at > org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:149) > at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80) > at > org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118) > at org.jboss.mx.server.Invocation.invoke(Invocation.java:74) > at > org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127) > at org.jboss.mx.server.Invocation.invoke(Invocation.java:74) > at > org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245) > at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644) > at org.jboss.jmx.adaptor.control.Server.invokeOpByName(Server.java:243) > at > org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.invokeOpByName(HtmlAdaptorServlet.java:272) > at > org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.processRequest(HtmlAdaptorServlet.java:87) > at > org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.doGet(HtmlAdaptorServlet.java:62) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:697) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) > at > org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) > at > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) > at > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) > at > org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39) > at > org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159) > at > org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59) > at > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) > at > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) > at > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) > at > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) > at > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) > at > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744) > at > org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) > at > org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112) > at java.lang.Thread.run(Unknown Source) > Caused by: org.jboss.deployment.DeploymentException: url > file:/opt/jboss403SP1/bin/C:\Mvn\Sample/Sample.ear could not be opened, does > it exist? > at org.jboss.deployment.DeploymentInfo.<init>(DeploymentInfo.java:191) > at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:752) > at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > at java.lang.reflect.Method.invoke(Unknown Source) > at > org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141) > -- > View this message in context: > http://www.nabble.com/Problem-in-Deploy-an-EAR-to-remote-server-t1494729.html#a4050930 > Sent from the Maven - Users forum at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >