Précédent   Forum des professionnels en informatique > Général Développement > Conception > Usine Logicielle > Intégration Continue
Intégration Continue Forum d'entraide sur les outils d'intégration continue (Continuum, CruiseControl, Hudson, TeamCity, etc.)
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 20/10/2011, 12h56   #1
Invité régulier
 
Homme Florent
Développeur Java
Inscription : octobre 2011
Messages : 16
Détails du profil
Informations personnelles :
Nom : Homme Florent
Localisation : France

Informations professionnelles :
Activité : Développeur Java

Informations forums :
Inscription : octobre 2011
Messages : 16
Points : 9
Points : 9
Par défaut [Jenkins] Deploy Plugin et JBoss EAP 5.1

Bonjour,

Je souhaiterai déployer un fichier .war (après l'avoir buildé sous Jenkins) sur un serveur JBoss local.
Le plugin "Deploy plugin" semble correspondre à mes attentes mais, malheureusement, je n'arrive pas à déployer le .war !!

Voici l'erreur :

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 minute 52 seconds
[INFO] Finished at: Thu Oct 20 12:37:04 CEST 2011
[INFO] Final Memory: 100M/247M
[INFO] ------------------------------------------------------------------------
channel stopped
ERROR: Publisher hudson.plugins.deploy.DeployPublisher aborted due to exception
org.codehaus.cargo.container.ContainerException: Failed to create deployer with implementation class org.codehaus.cargo.container.jboss.JBoss5xRemoteDeployer for the parameters (container [id = [jboss5x]], deployer type [remote]).
	at org.codehaus.cargo.generic.spi.AbstractGenericHintFactory.createImplementation(AbstractGenericHintFactory.java:157)
	at org.codehaus.cargo.generic.spi.AbstractIntrospectionGenericHintFactory.createImplementation(AbstractIntrospectionGenericHintFactory.java:87)
	at org.codehaus.cargo.generic.deployer.DefaultDeployerFactory.createDeployer(DefaultDeployerFactory.java:135)
	at org.codehaus.cargo.generic.deployer.DefaultDeployerFactory.createDeployer(DefaultDeployerFactory.java:153)
	at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:55)
	at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:86)
	at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:73)
	at hudson.FilePath.act(FilePath.java:758)
	at hudson.FilePath.act(FilePath.java:740)
	at hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:73)
	at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:45)
	at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
	at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:693)
	at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:668)
	at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:953)
	at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:615)
	at hudson.model.Run.run(Run.java:1401)
	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:474)
	at hudson.model.ResourceController.execute(ResourceController.java:88)
	at hudson.model.Executor.run(Executor.java:230)
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at org.codehaus.cargo.generic.deployer.DefaultDeployerFactory.createInstance(DefaultDeployerFactory.java:206)
	at org.codehaus.cargo.generic.spi.AbstractGenericHintFactory.createImplementation(AbstractGenericHintFactory.java:153)
	... 19 more
Caused by: org.codehaus.cargo.util.CargoException: Cannot locate the JBoss deployer class! Make sure the jboss-deployer for your
JBoss version as well as all required JBoss JARs are in CARGO's classpath.
More information on: http://cargo.codehaus.org/JBoss+Remote+Deployer
	at org.codehaus.cargo.container.jboss.JBoss5xRemoteDeployer.<init>(JBoss5xRemoteDeployer.java:91)
	... 25 more
Caused by: java.lang.ClassNotFoundException: org.codehaus.cargo.tools.jboss.JBossDeployer
	at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
	at org.codehaus.cargo.container.jboss.JBoss5xRemoteDeployer.<init>(JBoss5xRemoteDeployer.java:81)
	... 25 more
java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at org.codehaus.cargo.generic.deployer.DefaultDeployerFactory.createInstance(DefaultDeployerFactory.java:206)
	at org.codehaus.cargo.generic.spi.AbstractGenericHintFactory.createImplementation(AbstractGenericHintFactory.java:153)
	at org.codehaus.cargo.generic.spi.AbstractIntrospectionGenericHintFactory.createImplementation(AbstractIntrospectionGenericHintFactory.java:87)
	at org.codehaus.cargo.generic.deployer.DefaultDeployerFactory.createDeployer(DefaultDeployerFactory.java:135)
	at org.codehaus.cargo.generic.deployer.DefaultDeployerFactory.createDeployer(DefaultDeployerFactory.java:153)
	at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:55)
	at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:86)
	at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:73)
	at hudson.FilePath.act(FilePath.java:758)
	at hudson.FilePath.act(FilePath.java:740)
	at hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:73)
	at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:45)
	at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
	at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:693)
	at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:668)
	at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:953)
	at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:615)
	at hudson.model.Run.run(Run.java:1401)
	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:474)
	at hudson.model.ResourceController.execute(ResourceController.java:88)
	at hudson.model.Executor.run(Executor.java:230)
Caused by: org.codehaus.cargo.util.CargoException: Cannot locate the JBoss deployer class! Make sure the jboss-deployer for your
JBoss version as well as all required JBoss JARs are in CARGO's classpath.
More information on: http://cargo.codehaus.org/JBoss+Remote+Deployer
	at org.codehaus.cargo.container.jboss.JBoss5xRemoteDeployer.<init>(JBoss5xRemoteDeployer.java:91)
	... 25 more
Caused by: java.lang.ClassNotFoundException: org.codehaus.cargo.tools.jboss.JBossDeployer
	at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
	at org.codehaus.cargo.container.jboss.JBoss5xRemoteDeployer.<init>(JBoss5xRemoteDeployer.java:81)
	... 25 more
Je connais pas du tout Cargo et même en tentant de m'informer je n'y comprend pas grand chose. Je suis débutant avec Jenkins.

J'ai besoin de votre aide !

Merci d'avance.

Cordialement,

F.JOUATTE
fjouatte est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 20/10/2011, 14h23   #2
Rédacteur/Modérateur
 
Avatar de romaintaz
 
Homme Romain Linsolas
Java craftsman
Inscription : juillet 2005
Messages : 3 425
Détails du profil
Informations personnelles :
Nom : Homme Romain Linsolas
Âge : 33
Localisation : France, Yvelines (Île de France)

Informations professionnelles :
Activité : Java craftsman
Secteur : Finance

Informations forums :
Inscription : juillet 2005
Messages : 3 425
Points : 5 411
Points : 5 411
Bonjour,

As-tu suivi les conseils présentés ici : http://cargo.codehaus.org/JBoss+Remote+Deployer ?
__________________
Nous sommes tous semblables, alors acceptons nos différences !
--------------------------------------------------------------
Mes liens : Blog | Page DVP | Suivez-moi sur Twitter
Mes articles : Hudson | Sonar | Outils de builds Java Maven 3 | TeamCity| CitConf 2009
Mes critiques : Apache Maven
romaintaz est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 20/10/2011, 14h40   #3
Invité régulier
 
Homme Florent
Développeur Java
Inscription : octobre 2011
Messages : 16
Détails du profil
Informations personnelles :
Nom : Homme Florent
Localisation : France

Informations professionnelles :
Activité : Développeur Java

Informations forums :
Inscription : octobre 2011
Messages : 16
Points : 9
Points : 9
Bonjour et merci de me répondre,

Effectivement, j'ai déjà lu cette page mais il y a plusieurs choses (qui peuvent paraitre triviales) que je ne comprend pas :

- "For the connection to succeed, the following JARs need to be in the container classpath or in the current Java Thread's context classloader:

JBoss deployment manager JARs
JBoss remoting client JARs"

Quels sont ces JARs ?

- "If you only want to remotely deploy applications using CARGO to your JBoss server, you can of course ignore that document."

Peut on considérer qu'un déploiement sur un serveur JBoss local équivaut a un déploiement "remotely" ?

PS : Je suis apprenti donc ne me blâmer pas si je ne comprend pas certaines choses

Merci !
fjouatte est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 21/10/2011, 10h40   #4
Invité régulier
 
Homme Florent
Développeur Java
Inscription : octobre 2011
Messages : 16
Détails du profil
Informations personnelles :
Nom : Homme Florent
Localisation : France

Informations professionnelles :
Activité : Développeur Java

Informations forums :
Inscription : octobre 2011
Messages : 16
Points : 9
Points : 9
Bonjour,

Je m'excuse d'avance pour ce "double" post mais il y a quelques avancés à mon problème.

J'ai ajouté ceci au POM racine du projet que je souhaite déployer :

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<plugin>
				<groupId>org.codehaus.cargo</groupId>
				<artifactId>cargo-maven2-plugin</artifactId>
				<version>1.1.3</version>
				
				<configuration>
			<!-- Container configuration -->
					<container>
						<containerId>jboss5x</containerId>
						<home>D:/jtb/servers/jboss-eap-5.1/jboss-as</home>
					</container>
					<configuration>
						<type>existing</type>
						<home>D:/jtb/servers/jboss-eap-5.1/jboss-as/server/mezzo</home>
					</configuration>
				</configuration>
			</plugin>
Lorsque j'exécute un mvn cargo:start le .ear est bien ajouté dans le répertoire deploy mais le serveur n'est pas lancé correctement.

Mais le problème est toujours le même : je souhaite que le déploiement se fasse automatiquement à la fin du build (grâce au plugin deploy) et que je n'ai pas à exécuter de commande par moi même.

Avez vous une idée de ce qu'il est possible de faire ? Quelqu'un a t-il déjà réussi à faire fonctionner ce plugin avec JBoss EAP 5.1 ?


[ EDIT ] : Je viens de remarquer la création de certains dossiers, dans le répertoire jboss-eap-5.1/jboss-as/server/nomdemonserveur/tmp/, contenant mon fichier .war incomplet.

Merci d'avance.

Cordialement,

F. Jouatte
fjouatte est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 25/10/2011, 14h28   #5
Invité régulier
 
Homme Florent
Développeur Java
Inscription : octobre 2011
Messages : 16
Détails du profil
Informations personnelles :
Nom : Homme Florent
Localisation : France

Informations professionnelles :
Activité : Développeur Java

Informations forums :
Inscription : octobre 2011
Messages : 16
Points : 9
Points : 9
Bonjour,

Mon problème est résolu.

Pour ceux que ça intéresse, je vais expliquer ce que j'ai fais :

Pour déployer mon war/ear sur un serveur JBoss local, le plugin "Deploy plugin" n'est d'aucune utilité puisqu'il fonctionne uniquement pour les container de type remote (distant).

J'ai donc utilisé le plugin "cargo-maven2-plugin".

Il "suffit" de configurer le pom.xml à la racine du projet que vous souhaitez déployer et de copier les JARs suivants (toujours à la racine de ce projet) :

cargo-maven2-plugin-x.x.x.jar & cargo-core-container-jboss-x.x.x.jar

Pour configurer le pom j'ai d’abord tenté de suivre la doc de cargo mais cette dernière n'est pas vraiment explicite ... heureusement j'ai trouvé un petit tutorial bien utile : http://dpillay.wordpress.com/2009/04...to-deployment/

Je vous laisse y jeter un oeil.

Cordialement,

F. Jouatte
fjouatte est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité Cette discussion est résolue.
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 16h29.


 
 
 
 
Partenaires

Hébergement Web