|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
about the remote war deployment to tomcat 5hi,
I have been using the cargo api in our project, however the resource on the specific area is not found on the web, would you please help me to provide the sample code snippet on how to remotely deploy the war archive to tomcat5 or jboss4 using java api? Waiting for your reply.thanks regards george --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
RE: about the remote war deployment to tomcat 5Hi George,
Can you please provide your code and a stacktrace? Regards Magnus Grimsell >-----Original Message----- >From: zhiwen,liu [mailto:liuz7@...] >Sent: Friday, July 31, 2009 8:06 PM >To: user@... >Subject: [cargo-user] about the remote war deployment to tomcat 5 > >hi, > >I have been using the cargo api in our project, however the resource on >the specific area is not found on the web, would you please help me to >provide the sample code snippet on how to remotely deploy the war >archive to tomcat5 or jboss4 using java api? Waiting for your >reply.thanks > > > >regards >george > >--------------------------------------------------------------------- >To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
RE: about the remote war deployment to tomcat 5hi, The below is is code with exception, would you kindly help me on this issue? /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package deployment; import javax.security.auth.login.Configuration; import org.codehaus.cargo.container.*; import org.codehaus.cargo.container.configuration.ConfigurationType; import org.codehaus.cargo.container.deployable.Deployable; import org.codehaus.cargo.container.deployable.DeployableType; import org.codehaus.cargo.container.deployable.WAR; import org.codehaus.cargo.container.deployer.Deployer; import org.codehaus.cargo.container.property.RemotePropertySet; import org.codehaus.cargo.container.tomcat.Tomcat5xRemoteDeployer; import org.codehaus.cargo.generic.configuration.ConfigurationFactory; import org.codehaus.cargo.generic.configuration.DefaultConfigurationFactory; import org.codehaus.cargo.generic.deployable.DefaultDeployableFactory; import org.codehaus.cargo.generic.deployable.DeployableFactory; /** * * @author bh2 */ public class Main { /** * @param args the command line arguments */ public static void main(String[] args) { //DeployableFactory factory = new DefaultDeployableFactory(); //WAR war = (WAR) factory.createDeployable("tomcat5x", "/mybuild/indexserver.war",DeployableType.WAR); Deployable war = new DefaultDeployableFactory().createDeployable("tomcat5x", "/mybuild/indexserver.war", DeployableType.WAR); ConfigurationFactory cfactory = new DefaultConfigurationFactory(); Configuration configuration = (Configuration) cfactory.createConfiguration("tomcat5x", ContainerType.REMOTE, ConfigurationType.RUNTIME); configuration.setProperty(RemotePropertySet.USERNAME, "admin"); configuration.setProperty(RemotePropertySet.PASSWORD, "admin"); //configuration.addDeployable(war); Deployer deployer = new Tomcat5xRemoteDeployer(); deployer.deploy(war); //RemoteContainer container = (RemoteContainer) new DefaultContainerFactory().createContainer("tomcat5x", ContainerType.REMOTE,(org.codehaus.cargo.container.configuration.Configuration) configuration); } } run: Exception in thread "main" org.codehaus.cargo.container.ContainerException: Failed to create deployable for the parameters (container [id = [tomcat5x]], deployable type [war]). at org.codehaus.cargo.generic.spi.AbstractGenericHintFactory.createImplementation(AbstractGenericHintFactory.java:157) at org.codehaus.cargo.generic.spi.AbstractIntrospectionGenericHintFactory.createImplementation(AbstractIntrospectionGenericHintFactory.java:86) at org.codehaus.cargo.generic.deployable.DefaultDeployableFactory.createDeployable(DefaultDeployableFactory.java:163) at deployment.Main.main(Main.java:33) thanks george |
|
|
RE: about the remote war deployment to tomcat 5hi,
The below is is code with exception, would you kindly help me on this issue? /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package deployment; import javax.security.auth.login.Configuration; import org.codehaus.cargo.container.*; import org.codehaus.cargo.container.configuration.ConfigurationType; import org.codehaus.cargo.container.deployable.Deployable; import org.codehaus.cargo.container.deployable.DeployableType; import org.codehaus.cargo.container.deployable.WAR; import org.codehaus.cargo.container.deployer.Deployer; import org.codehaus.cargo.container.property.RemotePropertySet; import org.codehaus.cargo.container.tomcat.Tomcat5xRemoteDeployer; import org.codehaus.cargo.generic.configuration.ConfigurationFactory; import org.codehaus.cargo.generic.configuration.DefaultConfigurationFactory; import org.codehaus.cargo.generic.deployable.DefaultDeployableFactory; import org.codehaus.cargo.generic.deployable.DeployableFactory; /** * * @author bh2 */ public class Main { /** * @param args the command line arguments */ public static void main(String[] args) { //DeployableFactory factory = new DefaultDeployableFactory(); //WAR war = (WAR) factory.createDeployable("tomcat5x", "/mybuild/indexserver.war",DeployableType.WAR); Deployable war = new DefaultDeployableFactory().createDeployable("tomcat5x", "/mybuild/indexserver.war", DeployableType.WAR); ConfigurationFactory cfactory = new DefaultConfigurationFactory(); Configuration configuration = (Configuration) cfactory.createConfiguration("tomcat5x", ContainerType.REMOTE, ConfigurationType.RUNTIME); configuration.setProperty(RemotePropertySet.USERNAME, "admin"); configuration.setProperty(RemotePropertySet.PASSWORD, "admin"); //configuration.addDeployable(war); Deployer deployer = new Tomcat5xRemoteDeployer(); deployer.deploy(war); //RemoteContainer container = (RemoteContainer) new DefaultContainerFactory().createContainer("tomcat5x", ContainerType.REMOTE,(org.codehaus.cargo.container.configuration.Configuration) configuration); } } run: Exception in thread "main" org.codehaus.cargo.container.ContainerException: Failed to create deployable for the parameters (container [id = [tomcat5x]], deployable type [war]). at org.codehaus.cargo.generic.spi.AbstractGenericHintFactory.createImplementation(AbstractGenericHintFactory.java:157) at org.codehaus.cargo.generic.spi.AbstractIntrospectionGenericHintFactory.createImplementation(AbstractIntrospectionGenericHintFactory.java:86) at org.codehaus.cargo.generic.deployable.DefaultDeployableFactory.createDeployable(DefaultDeployableFactory.java:163) at deployment.Main.main(Main.java:33) thanks george
|
| Free embeddable forum powered by Nabble | Forum Help |