Circling back around to this, I've gotten farther but I suspect I still
have some setup errors with Geronimo.
1) I created the "ArchivaDS" in Geronimo web console and pointed it at a
PostgreSQL database. This seems to work fine as I can run queries
against the database using the Geronimo console.
- Create the login role in pgsql 9.1 (i.e. "archiva"), assign it a
random password
- Create a group role (i.e. "archiva_app")
- Assign the login role to the group role as a member
- Create the archiva database as UTF-8
- Set the default privileges for the group role to all
- Also allow the group role create/temp/connect permissions
- Fix your pg_hba.conf file (since this is user/database specific, put
it in front of the other, more general, entries)
host archiva archiva 127.0.0.1/32 md5
- Create the data pool in Geronimo's console and verify that you can run
queries against it (create a temporary table like "geronimo_test" and do
a test SELECT)
2) Load the downloaded WAR file into the Geronimo plan creator (under
Navigator(Advanced), Applications, Plan Creator). You will need to fill
in the name of the datasource/datapool that you configured. I changed
the context path to be "archiva" instead of the default. For everything
else, I just used the defaults.
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1">
<dep:environment
xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
<dep:moduleId>
<dep:groupId>default</dep:groupId>
<dep:artifactId>apache-archiva-js-1.4-M3</dep:artifactId>
<dep:version>1351030291765</dep:version>
<dep:type>war</dep:type>
</dep:moduleId>
<dep:dependencies>
<dep:dependency>
<dep:groupId>console.dbpool</dep:groupId>
<dep:artifactId>ArchivaDS</dep:artifactId>
<dep:version>1.0</dep:version>
<dep:type>car</dep:type>
</dep:dependency>
<dep:dependency>
<dep:groupId>org.apache.geronimo.configs</dep:groupId>
<dep:artifactId>javamail</dep:artifactId>
<dep:version>3.0.0</dep:version>
<dep:type>car</dep:type>
</dep:dependency>
</dep:dependencies>
</dep:environment>
<context-root>archiva</context-root>
<nam:resource-ref
xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.2">
<nam:ref-name>jdbc/users</nam:ref-name>
<nam:pattern>
<nam:groupId>console.dbpool</nam:groupId>
<nam:artifactId>ArchivaDS</nam:artifactId>
<nam:version>1.0</nam:version>
<nam:name>ArchivaDS</nam:name>
</nam:pattern>
</nam:resource-ref>
<nam:resource-ref
xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.2">
<nam:ref-name>mail/Session</nam:ref-name>
<nam:pattern>
<nam:groupId>org.apache.geronimo.configs</nam:groupId>
<nam:artifactId>javamail</nam:artifactId>
<nam:version>3.0.0</nam:version>
<nam:name>mail/MailSession</nam:name>
</nam:pattern>
</nam:resource-ref>
</web-app>
3) At this point, the application deploys properly into Geronimo, but
will not start up. The error I'm now stuck on is:
25339: 2012-10-23 18:54:41,880 ERROR [ContextLoader] Context
initialization failed
25432: 2012-10-23 18:54:41,885 ERROR [[/archiva]] Exception sending
context initialized event to listener instance of class
org.springframework.web.context.ContextLoaderListener
25525: 2012-10-23 18:54:41,886 ERROR [[/archiva]] Exception sending
context initialized event to listener instance of class
org.apache.archiva.web.startup.ArchivaStartup
25618: 2012-10-23 18:54:41,888 ERROR [StandardContext] Error listenerStart
25619: 2012-10-23 18:54:41,888 ERROR [StandardContext] Context
[/archiva] startup failed due to previous errors
25620: 2012-10-23 18:54:41,888 ERROR [ContainerBase]
ContainerBase.addChild: start:
25707: 2012-10-23 18:54:41,892 ERROR [[/archiva]] Exception sending
context destroyed event to listener instance of class
org.apache.archiva.web.startup.ArchivaStartup
25801: 2012-10-23 18:54:41,895 WARN [TomcatWebAppContext]
TomcatWebAppContext failed
25802: 2012-10-23 18:54:41,895 ERROR [GBeanInstanceState] Error while
starting; GBean is now in the FAILED state:
abstractName="default/apache-archiva-js-1.4-M3/1351030291765/war?J2EEApplication=null,j2eeType=WebModule,name=default/apache-archiva-js-1.4-M3/1351030291765/war"
Since this is a brand new instance of Geronimo, it's possible that I've
forgotten to configure something.