-
1. Re: 5.1: Programmatically redeploy
jaikiran Sep 21, 2009 9:06 AM (in response to juergen.zimmermann)What happens? Does it throw any exceptions? Or does it not do anything? Any hints in the server.log?
-
2. Re: 5.1: Programmatically redeploy
juergen.zimmermann Sep 21, 2009 9:29 AM (in response to juergen.zimmermann)This is the stacktrace:
15:27:32,749 INFO [DeployHandler] Stop, [vfsfile:/C:/Users/Public/Documents/eclipse-workspace-swe2/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_5.1_Runtime_Server/deploy/hska.ear/] 15:27:32,750 INFO [DeployHandler] Failed to complete command: [redeploy] for deployment: names=[vfsfile:/C:/Users/Public/Documents/eclipse-workspace-swe2/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_5.1_Runtime_Server/deploy/hska.ear/], copyContent=true org.jboss.profileservice.spi.NoSuchDeploymentException: Failed to find deployment in file: vfsfile:/C:/Users/Public/Documents/eclipse-workspace-swe2/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_5.1_Runtime_Server/deploy/hska.ear/ at org.jboss.system.server.profileservice.repository.AbstractDeploymentRepository.getDeployment(AbstractDeploymentRepository.java:134) at org.jboss.profileservice.management.upload.remoting.DeployHandler.scheduleStop(DeployHandler.java:156) at org.jboss.profileservice.management.upload.remoting.AbstractDeployHandler.stop(AbstractDeployHandler.java:308) at org.jboss.profileservice.management.upload.remoting.AbstractDeployHandler.stop(AbstractDeployHandler.java:297) at org.jboss.profileservice.management.upload.remoting.AbstractDeployHandler.redeploy(AbstractDeployHandler.java:348) at org.jboss.profileservice.management.upload.remoting.AbstractDeployHandler.invoke(AbstractDeployHandler.java:194) at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:891) at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:744) at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:697) at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:524) at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:232)
-
3. Re: 5.1: Programmatically redeploy
emuckenhuber Sep 21, 2009 9:43 AM (in response to juergen.zimmermann)So i guess you are not using DeploymentManager to deploy the application?
-
4. Re: 5.1: Programmatically redeploy
juergen.zimmermann Sep 21, 2009 10:15 AM (in response to juergen.zimmermann)Hmm, I don't know how JBossTools deploy the EAR app in the beginning. The JMX-Console shows that the EAR app was successfully deployed. How should I proceed?
-
5. Re: 5.1: Programmatically redeploy
jaikiran Sep 21, 2009 10:29 AM (in response to juergen.zimmermann)As a workaround try adding
file:///C:/Users/Public/Documents/eclipse-workspace-swe2/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_5.1_Runtime_Server/deploy
as an external deployment folder as explained here http://www.jboss.org/community/wiki/HowtodeploymyapplicationinanexternaldirectoryinJBoss-5
That might probably explain why it used to work earlier, since the deploy folder is already picked up by deployment manager (i guess). Give it a try, although i am not completely sure whether it's going to work - haven't looked at profileservice/deployment manager yet.Hmm, I don't know how JBossTools deploy the EAR app in the beginning
I think it uses the JMX MainDeployer APIs. -
6. Re: 5.1: Programmatically redeploy
emuckenhuber Sep 21, 2009 10:46 AM (in response to juergen.zimmermann)Hmm yeah the workaround could work - this should allow you to use DeploymentManager, although it might pick up the deployment twice.
JBossTools uses a JMX facade to add deployments to ProfileService and it seems that those are not exposed to the DeploymentManager properly - so i will have to add a testcase to make sure this is handled in a better way. -
7. Re: 5.1: Programmatically redeploy
juergen.zimmermann Sep 21, 2009 11:21 AM (in response to juergen.zimmermann)Switching back to JMX MainDeployer makes redeploy working.
It's a pitty that the really nice DeploymentManager cannot be used with JBossTools :-( -
8. Re: 5.1: Programmatically redeploy
emuckenhuber Sep 24, 2009 5:00 AM (in response to juergen.zimmermann)"Juergen.Zimmermann" wrote:
Switching back to JMX MainDeployer makes redeploy working.
It's a pitty that the really nice DeploymentManager cannot be used with JBossTools :-(
This should be fixed for 5.2.0.Beta1 - So the deployments added by JBossTools can also be redeployed with DeploymentManager.
There is one thing which needs to be done though, as you have to declare a specific profile when using DeploymentManager like:DeploymentManager deployMgr = getDeploymentManager(); deployMgr.loadProfile(new ProfileKey("deployment-scanner-profile")); try { DeploymentProgress progress = deployMgr.redeploy(deploymentName); progress.run(); assertTrue(progress.getDeploymentStatus().isCompleted()); } finally { deployMgr.releaseProfile(); }
I'll see that we can remove the need to call loadProfile() part for existing deployments in future.