Hi I have been trying to deploy the latest version of the Archiva war to JBoss version 4.2.2 without success. Has anyone else been successful in deploying the latest version of Archiva to JBoss?
I would really like to get this working and appreciate any help anyone can offer! I have seen the following wiki page that contains instructions: http://docs.codehaus.org/display/MAVENUSER/Archiva+on+JBoss In addition to this I have looked at: http://docs.codehaus.org/display/MAVENUSER/Archiva+on+Tomcat What I have done: 1. I have added the following context.xml to the META-INF directory of the Archiva war file: <Context path="/archiva" docBase="/"> <Resource name="jdbc/users" auth="Container" type="javax.sql.DataSource" username="sa" password="" driverClassName="org.apache.derby.jdbc.EmbeddedDriver" url="jdbc:derby:database/users;create=true" /> <Resource name="jdbc/archiva" auth="Container" type="javax.sql.DataSource" username="sa" password="" driverClassName="org.apache.derby.jdbc.EmbeddedDriver" url="jdbc:derby:database/archiva;create=true" /> <Resource name="mail/Session" auth="Container" type="javax.mail.Session" mail.smtp.host="localhost"/> </Context> 2. I have added a jboss-web.xml file to the WEB-INF directory of the war: (as instructed on the wiki: Although it feels as though there should be more entries in this file as there are more resource-ref entries made in the web.xml file?) <?xml version="1.0" encoding="UTF-8"?> <jboss-web> <resource-ref> <res-ref-name>jdbc/users</res-ref-name> <jndi-name>java:/users</jndi-name> </resource-ref> </jboss-web> 3. I made sure that the following entry appears in the web.xml file: <resource-ref> <res-ref-name>jdbc/users</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref> This entry was already in web.xml along with the following two other entries: <resource-ref> <res-ref-name>jdbc/archiva</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> <res-sharing-scope>Shareable</res-sharing-scope> </resource-ref> <resource-ref> <res-ref-name>mail/Session</res-ref-name> <res-type>javax.mail.Session</res-type> <res-auth>Container</res-auth> <res-sharing-scope>Shareable</res-sharing-scope> </resource-ref> 4. I have coppied derby-10.1.3.1.jar, derby-tools-10.1.3.1.jar and mail-1.4.jar in to JBoss's default server's lib directory 5. I have added the following derby-ds.xml file to JBoss's default server's deploy directory. <?xml version="1.0" encoding="UTF-8"?> <datasources> <local-tx-datasource> <!-- The jndi name of the DataSource, it is prefixed with java:/ --> <!-- Datasources are not available outside the virtual machine --> <jndi-name>users</jndi-name> <!-- for in-process persistent db, saved when jboss stops. The org.jboss.jdbc.DerbyDatabase mbean is necessary for properly db shutdown --> <connection-url>jdbc:derby:database/archiva;create=true</connection-url> <!-- The driver class --> <driver-class>org.apache.derby.jdbc.EmbeddedDriver</driver-class> <!-- The login and password --> <user-name>sa</user-name> <password></password> <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use --> <min-pool-size>5</min-pool-size> <!-- The maximum connections in a pool/sub-pool --> <max-pool-size>20</max-pool-size> <!-- The time before an unused connection is destroyed --> <idle-timeout-minutes>5</idle-timeout-minutes> <!-- Whether to check all statements are closed when the connection is returned to the pool, this is a debugging feature that should be turned off in production --> <track-statements/> </local-tx-datasource> </datasources> The wiki says to include settings for appserver.base and appserver.home using the CATALINA_OPTS environment variable but I am not sure where I should be specifying this within the JBoss configuration? As a result I do see exceptions when the \log\logfiles can not be found. So What happens when loading JBoss?: On loading JBoss: I see the following: org.jboss.deployment.DeploymentException: Error during deploy; - nested throwable: (javax.naming.NamingException: resource-ref: mail/Session has no valid JNDI binding. Check the jboss-web/resource-ref.) Followed by a very long stack trace. The message mentions the resource-ref's in jboss-web.xml and I have tried adding JNDI bindings for both jdbc/archiva and mail/Session: (I am guessing what these are supposed to be) <?xml version="1.0" encoding="UTF-8"?> <jboss-web> <resource-ref> <res-ref-name>jdbc/users</res-ref-name> <jndi-name>java:/users</jndi-name> </resource-ref> <resource-ref> <res-ref-name>jdbc/archiva</res-ref-name> <jndi-name>java:/archiva</jndi-name> </resource-ref> <resource-ref> <res-ref-name>mail/Session</res-ref-name> <jndi-name>java:/mail</jndi-name> </resource-ref> </jboss-web> On doing so I get: 20:00:19,531 INFO [STDOUT] 2008-01-21 20:00:19,515 [main] ERROR org.apache.commons.configuration.JNDIConfiguration - Could not dereference objectjavax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NameNotFoundException: mail not bound] Once again many thanks for any help you might be able to give me. Many thanks, Leon Davis __________________________________________________________ Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com
