Bonjour à tous,
Après lecture de plusieurs posts sur le net, j'ai toujours un problème pour déployer un JCA sur JBoss, j'ai l'erreur suivante :
Le fichier rar est inclus dans le fichier ear, si je les sépare, j'ai une autre erreur :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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 ERROR [URLDeploymentScanner] Incomplete Deployment listing: --- MBeans waiting for other MBeans --- ObjectName: jboss.jca:service=NoTxCM,name=eis/S3kJCA State: CONFIGURED I Depend On: jboss.jca:service=ManagedConnectionPool,name=eis/S3kJCA jboss.jca:service=CachedConnectionManager Depends On Me: jboss.jca:service=ConnectionFactoryBinding,name=eis/S3kJCA ObjectName: jboss.jca:service=ManagedConnectionPool,name=eis/S3kJCA State: CONFIGURED I Depend On: jboss.jca:service=ManagedConnectionFactory,name=eis/S3kJCA Depends On Me: jboss.jca:service=NoTxCM,name=eis/S3kJCA ObjectName: jboss.jca:service=ManagedConnectionFactory,name=eis/S3kJCA State: CONFIGURED I Depend On: jboss.jca:service=RARDeployment,name='S3kTestEAR#S3kJCA.rar' Depends On Me: jboss.jca:service=ManagedConnectionPool,name=eis/S3kJCA ObjectName: jboss.jca:service=ConnectionFactoryBinding,name=eis/S3kJCA State: CONFIGURED I Depend On: jboss.jca:service=NoTxCM,name=eis/S3kJCA --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM --- ObjectName: jboss.jca:service=RARDeployment,name='S3kTestEAR#S3kJCA.rar' State: NOTYETINSTALLED Depends On Me: jboss.jca:service=ManagedConnectionFactory,name=eis/S3kJCA
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 14:29:35,731 WARN [NestedThrowable] Duplicate throwable nesting of same base type: class org.jboss.deployment .DeploymentException is assignable from: class org.jboss.deployment.DeploymentException 14:29:35,731 WARN [ServiceController] Problem starting service jboss.jca:service=ManagedConnectionFactory,nam e=eis/S3kJCA org.jboss.deployment.DeploymentException: couldn't get oldRarDeployment! jboss.jca:service=RARDeployment,name= 'S3kJCA.rar'; - nested throwable: (org.jboss.deployment.DeploymentException: ConnectionDefinition 'com.test.cci.S3kConnectionFactory' not found in rar 'S3kJCA.rar') at org.jboss.resource.connectionmanager.RARDeployment.startService(RARDeployment.java:317) at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289) at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245) at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) ... Caused by: org.jboss.deployment.DeploymentException: ConnectionDefinition 'com.test.cci.S3kConnectionFactory' not found in rar 'S3kJCA.rar' at org.jboss.resource.connectionmanager.RARDeployment.startService(RARDeployment.java:311) ... 60 more
Mon environnement de travail est le suivant : WindowsXP, JDK 1.5.0_07, JBoss 4.0.4, Eclipse 3.1.2 avec le plugin WTP qui génère mon application comme suit :
S3KTestEAR
....| _ META-INF
....|....|_ application.xml
....| _ S3kJCA.rar
....|....|_ META-INF
....|....|....|_ ra.xml
....|....|_ com
....|........|_ test
....|............|_ cci
....|............|....|_ S3kConnectionFactory.class
....|............|....|_ [remaining cci classes]
....|............|_ spi
....|................|_ [my spi classes]
....| _ S3kWebTest.war
........|_ test.jsp
........|_ WEB-INF
............|_ jboss-web.xml
............|_ web.xml
............|_ lib [empty]
............|_ classes
................|_ [my servlet classes]
J'ai déployé un fichier S3kJCA-ds.xml sur jboss (cf. contenu plus bas).
Voici les contenus des fichiers de déploiement :
S3kJCA-ds.xml :
application.xml :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE connection-factories PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN" "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd"> <connection-factories> <no-tx-connection-factory> <jndi-name>eis/S3kJCA</jndi-name> <rar-name>S3kTestEAR#S3kJCA.rar</rar-name> <!-- ou juste S3kJCA.rar s'il est séparé du ear --> <connection-definition>com.test.cci.S3kConnectionFactory</connection-definition> </no-tx-connection-factory> </connection-factories>
ra.xml :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14 <?xml version="1.0" encoding="UTF-8"?> <application id="Application_ID" version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd"> <display-name>S3kTestEAR</display-name> <module id="ConnectorModule_1150879410098"> <connector>S3kJCA.rar</connector> </module> <module id="WebModule_1150731758353"> <web> <web-uri>S3kWebTest.war</web-uri> <context-root>S3kWebTest</context-root> </web> </module> </application>
jboss-web.xml :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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 <?xml version="1.0" encoding="UTF-8"?> <connector id="Connector_ID" version="1.5" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd"> <display-name>S3kJCA</display-name> <vendor-name>Vendor</vendor-name> <eis-type>EisType</eis-type> <resourceadapter-version>4.0</resourceadapter-version> <license> <description>Description</description> <license-required>false</license-required> </license> <resourceadapter> <resourceadapter-class>com.test.spi.S3kResourceAdapter</resourceadapter-class> <config-property> <config-property-name>Host</config-property-name> <config-property-type>java.lang.String</config-property-type> <config-property-value>localhost</config-property-value> </config-property> <config-property> <config-property-name>Port</config-property-name> <config-property-type>java.lang.Integer</config-property-type> <config-property-value>7480</config-property-value> </config-property> <outbound-resourceadapter> <connection-definition> <managedconnectionfactory-class>com.test.spi.S3kManagedConnectionFactory</managedconnectionfactory-class> <connectionfactory-interface>javax.resource.cci.ConnectionFactory</connectionfactory-interface> <connectionfactory-impl-class>com.test.cci.S3kConnectionFactory</connectionfactory-impl-class> <connection-interface>javax.resource.cci.Connection</connection-interface> <connection-impl-class>com.test.cci.S3kConnection</connection-impl-class> </connection-definition> <transaction-support>NoTransaction</transaction-support> <reauthentication-support>false</reauthentication-support> </outbound-resourceadapter> </resourceadapter> </connector>
last part of web.xml :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.3//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_3_2.dtd"> <jboss-web> <context-root>/S3kWebTest</context-root> <resource-ref> <res-ref-name>eis/S3kJCA</res-ref-name> <jndi-name>java:/S3kJCA</jndi-name> </resource-ref> </jboss-web>
Quelqu'un a-t-il une idée ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6 <resource-ref> <res-ref-name>eis/S3kJCA</res-ref-name> <res-type>com.test.cci.S3kConnectionFactory</res-type> <res-auth>Container</res-auth> </resource-ref>
Merci.
Partager