You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@archiva.apache.org by Frederik Himpe <fh...@vub.ac.be> on 2014/02/28 14:59:50 UTC

Installing archiva on Debian Tomcat 7

I'm trying to install Arhiva 2.0.0 on Tomcat 7 (installed from the Debian package).

However when Tomcat 7 is started, I get this error in catalina.out:

INFO: Deploying web application archive /var/lib/tomcat7/webapps/apache-archiva-2.0.0.war
Feb 28, 2014 10:32:20 AM org.apache.tomcat.jdbc.pool.ConnectionPool init
SEVERE: Unable to create initial connections of pool.
java.sql.SQLException
        at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:254)
        at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:182)
        at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:701)
        at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:635)
        at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:486)
        at org.apache.tomcat.jdbc.pool.ConnectionPool.<init>(ConnectionPool.java:144)
        at org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:116)
        at org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:103)
        at org.apache.tomcat.jdbc.pool.DataSourceFactory.createDataSource(DataSourceFactory.java:554)
        at org.apache.tomcat.jdbc.pool.DataSourceFactory.getObjectInstance(DataSourceFactory.java:242)
        at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:141)
        at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:321)
        at org.apache.naming.NamingContext.lookup(NamingContext.java:842)
        at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
        at org.apache.naming.NamingContext.lookup(NamingContext.java:830)
        at org.apache.naming.NamingContext.lookup(NamingContext.java:167)
        at org.apache.catalina.core.NamingContextListener.addResource(NamingContextListener.java:1091)
        at org.apache.catalina.core.NamingContextListener.createNamingContext(NamingContextListener.java:670)
        at org.apache.catalina.core.NamingContextListener.lifecycleEvent(NamingContextListener.java:269)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5355)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1073)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:724)
Caused by: java.lang.NullPointerException
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:270)
        at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:246)
        ... 33 more

My /etc/tomcat7/Catalina/localhost/archiva.xml looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/apache-archiva-2.0.0"
          docBase="/var/lib/tomcat7/webapps/apache-archiva-2.0.0">

<Resource name="jdbc/users" auth="Container" type="javax.sql.DataSource"
          username="sa"
          password=""
          driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
          url="jdbc:derby:/var/lib/archiva/users;create=true" />

<Resource name="mail/Session" auth="Container"
           type="javax.mail.Session"
           mail.smtp.host="localhost"/>
</Context>

I see that the derby database in /var/lib/archiva/users/ is created correctly.

I have placed my full catalina.out here:
http://artipc10.vub.ac.be/~frederik/archiva/catalina.out

and here is archiva.log:
http://artipc10.vub.ac.be/~frederik/archiva/archiva.log

Any idea what is going wrong?

Regards
-- 
Frederik Himpe


Re: Installing archiva on Debian Tomcat 7

Posted by Frederik Himpe <fh...@vub.ac.be>.
On Tue, 04 Mar 2014 12:03:38 +1100, Olivier Lamy wrote:

> uhm
> Can you rename /etc/tomcat7/Catalina/localhost/archiva.xml
> to
> /etc/tomcat7/Catalina/localhost/archiva-2.0.0.xml and remove path and
> docBase attributes.
> Your simply deploying the application twice with such config :-)

Yes indeed. I got that answer too on tomcat mailing list, and after 
fixing this, these errors are gone. Archiva is working now.

Thanks!
Frederik


Re: Installing archiva on Debian Tomcat 7

Posted by Olivier Lamy <ol...@apache.org>.
uhm
Can you rename /etc/tomcat7/Catalina/localhost/archiva.xml
to
/etc/tomcat7/Catalina/localhost/archiva-2.0.0.xml and remove path and
docBase attributes.
Your simply deploying the application twice with such config :-)

On 4 March 2014 09:57, Olivier Lamy <ol...@apache.org> wrote:
> I think no. Because the jndi resource is created at Tomcat core level.
> Anyway sounds weird as I don't have any issues using a downloaded
> Apache Tomcat 7.0.52
> @Frederik can you try with a "normal" Tomcat version (not the
> repackaged from Debian)
>
>
>
> On 3 March 2014 21:36, Eric Barboni <sk...@apache.org> wrote:
>> I'm not used to tomcat archiva.
>>
>> But in the libs present in archiva there is already a derby-10.10.1.1.jar,
>> can this conflict with the tomcat lib ?
>>
>> Regards
>> Eric
>>
>> -----Message d'origine-----
>> De : Brett Porter [mailto:brett@porterclan.net] De la part de Brett Porter
>> Envoyé : dimanche 2 mars 2014 04:58
>> À : users@archiva.apache.org
>> Objet : Re: Installing archiva on Debian Tomcat 7
>>
>> Sorry, I can't see anything wrong with your configuration, and haven't used
>> Debian's Java packaging. Perhaps you'll get more assistance from the Tomcat
>> users list?
>>
>> For Archiva specifically, have you considered using the stock Jetty
>> distribution to get started?
>>
>> Regards,
>> Brett
>>
>> On 1 Mar 2014, at 2:15 am, Frederik Himpe <fh...@vub.ac.be> wrote:
>>
>>> On Sat, 01 Mar 2014 01:30:28 +1100, Brett Porter wrote:
>>>
>>>> Do you have the derby driver in the Tomcat lib directory?
>>>
>>> Yes:
>>>
>>> $ ls -lh /usr/share/tomcat7/lib/
>>> total 0
>>> lrwxrwxrwx 1 root root 44 Feb 21 07:42 annotations-api.jar ->
>>> ../../java/tomcat-annotations-api-7.0.52.jar
>>> lrwxrwxrwx 1 root root 34 Feb 21 07:42 catalina-ant.jar ->
>>> ../../java/catalina-ant-7.0.52.jar
>>> lrwxrwxrwx 1 root root 40 Feb 21 07:42 catalina-ha.jar ->
>>> ../../java/tomcat-catalina-ha-7.0.52.jar
>>> lrwxrwxrwx 1 root root 37 Feb 21 07:42 catalina.jar ->
>>> ../../java/tomcat-catalina-7.0.52.jar
>>> lrwxrwxrwx 1 root root 37 Feb 21 07:42 catalina-tribes.jar ->
>>> ../../java/catalina-tribes-7.0.52.jar
>>> lrwxrwxrwx 1 root root 27 Feb 21 07:42 commons-dbcp.jar ->
>>> ../../java/commons-dbcp.jar lrwxrwxrwx 1 root root 27 Feb 21 07:42
>>> commons-pool.jar -> ../../java/commons-pool.jar lrwxrwxrwx 1 root root
>>> 20 Feb 26 14:06 derby.jar -> ../../java/derby.jar lrwxrwxrwx 1 root
>>> root 32 Feb 21 07:42 el-api.jar -> ../../java/tomcat-el-api-2.2.jar
>>> lrwxrwxrwx 1 root root 45 Feb 26 14:10
>>> geronimo-javamail-1.4-provider.jar ->
>>> ../../java/geronimo-javamail-1.4-provider.jar
>>> lrwxrwxrwx 1 root root 41 Feb 26 14:11 geronimo-javamail-1.4-spec.jar
>>> -> ../../java/geronimo-javamail-1.4-spec.jar
>>> lrwxrwxrwx 1 root root 36 Feb 26 14:11 geronimo-jpa-2.0-spec.jar ->
>>> ../../java/geronimo-jpa-2.0-spec.jar
>>> lrwxrwxrwx 1 root root 36 Feb 26 14:11 geronimo-osgi-locator.jar ->
>>> ../../java/geronimo-osgi-locator.jar
>>> lrwxrwxrwx 1 root root 37 Feb 26 14:11 geronimo-osgi-registry.jar ->
>>> ../../java/geronimo-osgi-registry.jar
>>> lrwxrwxrwx 1 root root 38 Feb 21 07:42 jasper-el.jar ->
>>> ../../java/tomcat-jasper-el-7.0.52.jar
>>> lrwxrwxrwx 1 root root 35 Feb 21 07:42 jasper.jar ->
>>> ../../java/tomcat-jasper-7.0.52.jar
>>> lrwxrwxrwx 1 root root 33 Feb 21 07:42 jsp-api.jar ->
>>> ../../java/tomcat-jsp-api-2.2.jar lrwxrwxrwx 1 root root 37 Feb 21
>>> 07:42 servlet-api.jar -> ../../java/tomcat-servlet-api-3.0.jar
>>> lrwxrwxrwx 1 root root 32 Feb 21 07:42 tomcat-api.jar ->
>>> ../../java/tomcat-api-7.0.52.jar lrwxrwxrwx 1 root root 35 Feb 21
>>> 07:42 tomcat-coyote.jar -> ../../java/tomcat-coyote-7.0.52.jar
>>> lrwxrwxrwx 1 root root 36 Feb 21 07:42 tomcat-i18n-es.jar ->
>>> ../../java/tomcat-i18n-es-7.0.52.jar
>>> lrwxrwxrwx 1 root root 36 Feb 21 07:42 tomcat-i18n-fr.jar ->
>>> ../../java/tomcat-i18n-fr-7.0.52.jar
>>> lrwxrwxrwx 1 root root 36 Feb 21 07:42 tomcat-i18n-ja.jar ->
>>> ../../java/tomcat-i18n-ja-7.0.52.jar
>>> lrwxrwxrwx 1 root root 33 Feb 21 07:42 tomcat-jdbc.jar ->
>>> ../../java/tomcat-jdbc-7.0.52.jar lrwxrwxrwx 1 root root 33 Feb 21
>>> 07:42 tomcat-util.jar -> ../../java/tomcat-util-7.0.52.jar
>>>
>>> /usr/share/java/derby.jar is provided by Debian's package
>>> libderby-java 10.10.1.1-1
>>>
>>> --
>>> Frederik Himpe
>>>
>>
>>
>
>
>
> --
> Olivier Lamy
> Ecetera: http://ecetera.com.au
> http://twitter.com/olamy | http://linkedin.com/in/olamy



-- 
Olivier Lamy
Ecetera: http://ecetera.com.au
http://twitter.com/olamy | http://linkedin.com/in/olamy

Re: Installing archiva on Debian Tomcat 7

Posted by Olivier Lamy <ol...@apache.org>.
I think no. Because the jndi resource is created at Tomcat core level.
Anyway sounds weird as I don't have any issues using a downloaded
Apache Tomcat 7.0.52
@Frederik can you try with a "normal" Tomcat version (not the
repackaged from Debian)



On 3 March 2014 21:36, Eric Barboni <sk...@apache.org> wrote:
> I'm not used to tomcat archiva.
>
> But in the libs present in archiva there is already a derby-10.10.1.1.jar,
> can this conflict with the tomcat lib ?
>
> Regards
> Eric
>
> -----Message d'origine-----
> De : Brett Porter [mailto:brett@porterclan.net] De la part de Brett Porter
> Envoyé : dimanche 2 mars 2014 04:58
> À : users@archiva.apache.org
> Objet : Re: Installing archiva on Debian Tomcat 7
>
> Sorry, I can't see anything wrong with your configuration, and haven't used
> Debian's Java packaging. Perhaps you'll get more assistance from the Tomcat
> users list?
>
> For Archiva specifically, have you considered using the stock Jetty
> distribution to get started?
>
> Regards,
> Brett
>
> On 1 Mar 2014, at 2:15 am, Frederik Himpe <fh...@vub.ac.be> wrote:
>
>> On Sat, 01 Mar 2014 01:30:28 +1100, Brett Porter wrote:
>>
>>> Do you have the derby driver in the Tomcat lib directory?
>>
>> Yes:
>>
>> $ ls -lh /usr/share/tomcat7/lib/
>> total 0
>> lrwxrwxrwx 1 root root 44 Feb 21 07:42 annotations-api.jar ->
>> ../../java/tomcat-annotations-api-7.0.52.jar
>> lrwxrwxrwx 1 root root 34 Feb 21 07:42 catalina-ant.jar ->
>> ../../java/catalina-ant-7.0.52.jar
>> lrwxrwxrwx 1 root root 40 Feb 21 07:42 catalina-ha.jar ->
>> ../../java/tomcat-catalina-ha-7.0.52.jar
>> lrwxrwxrwx 1 root root 37 Feb 21 07:42 catalina.jar ->
>> ../../java/tomcat-catalina-7.0.52.jar
>> lrwxrwxrwx 1 root root 37 Feb 21 07:42 catalina-tribes.jar ->
>> ../../java/catalina-tribes-7.0.52.jar
>> lrwxrwxrwx 1 root root 27 Feb 21 07:42 commons-dbcp.jar ->
>> ../../java/commons-dbcp.jar lrwxrwxrwx 1 root root 27 Feb 21 07:42
>> commons-pool.jar -> ../../java/commons-pool.jar lrwxrwxrwx 1 root root
>> 20 Feb 26 14:06 derby.jar -> ../../java/derby.jar lrwxrwxrwx 1 root
>> root 32 Feb 21 07:42 el-api.jar -> ../../java/tomcat-el-api-2.2.jar
>> lrwxrwxrwx 1 root root 45 Feb 26 14:10
>> geronimo-javamail-1.4-provider.jar ->
>> ../../java/geronimo-javamail-1.4-provider.jar
>> lrwxrwxrwx 1 root root 41 Feb 26 14:11 geronimo-javamail-1.4-spec.jar
>> -> ../../java/geronimo-javamail-1.4-spec.jar
>> lrwxrwxrwx 1 root root 36 Feb 26 14:11 geronimo-jpa-2.0-spec.jar ->
>> ../../java/geronimo-jpa-2.0-spec.jar
>> lrwxrwxrwx 1 root root 36 Feb 26 14:11 geronimo-osgi-locator.jar ->
>> ../../java/geronimo-osgi-locator.jar
>> lrwxrwxrwx 1 root root 37 Feb 26 14:11 geronimo-osgi-registry.jar ->
>> ../../java/geronimo-osgi-registry.jar
>> lrwxrwxrwx 1 root root 38 Feb 21 07:42 jasper-el.jar ->
>> ../../java/tomcat-jasper-el-7.0.52.jar
>> lrwxrwxrwx 1 root root 35 Feb 21 07:42 jasper.jar ->
>> ../../java/tomcat-jasper-7.0.52.jar
>> lrwxrwxrwx 1 root root 33 Feb 21 07:42 jsp-api.jar ->
>> ../../java/tomcat-jsp-api-2.2.jar lrwxrwxrwx 1 root root 37 Feb 21
>> 07:42 servlet-api.jar -> ../../java/tomcat-servlet-api-3.0.jar
>> lrwxrwxrwx 1 root root 32 Feb 21 07:42 tomcat-api.jar ->
>> ../../java/tomcat-api-7.0.52.jar lrwxrwxrwx 1 root root 35 Feb 21
>> 07:42 tomcat-coyote.jar -> ../../java/tomcat-coyote-7.0.52.jar
>> lrwxrwxrwx 1 root root 36 Feb 21 07:42 tomcat-i18n-es.jar ->
>> ../../java/tomcat-i18n-es-7.0.52.jar
>> lrwxrwxrwx 1 root root 36 Feb 21 07:42 tomcat-i18n-fr.jar ->
>> ../../java/tomcat-i18n-fr-7.0.52.jar
>> lrwxrwxrwx 1 root root 36 Feb 21 07:42 tomcat-i18n-ja.jar ->
>> ../../java/tomcat-i18n-ja-7.0.52.jar
>> lrwxrwxrwx 1 root root 33 Feb 21 07:42 tomcat-jdbc.jar ->
>> ../../java/tomcat-jdbc-7.0.52.jar lrwxrwxrwx 1 root root 33 Feb 21
>> 07:42 tomcat-util.jar -> ../../java/tomcat-util-7.0.52.jar
>>
>> /usr/share/java/derby.jar is provided by Debian's package
>> libderby-java 10.10.1.1-1
>>
>> --
>> Frederik Himpe
>>
>
>



-- 
Olivier Lamy
Ecetera: http://ecetera.com.au
http://twitter.com/olamy | http://linkedin.com/in/olamy

RE: Installing archiva on Debian Tomcat 7

Posted by Eric Barboni <sk...@apache.org>.
I'm not used to tomcat archiva. 

But in the libs present in archiva there is already a derby-10.10.1.1.jar,
can this conflict with the tomcat lib ?

Regards
Eric

-----Message d'origine-----
De : Brett Porter [mailto:brett@porterclan.net] De la part de Brett Porter
Envoyé : dimanche 2 mars 2014 04:58
À : users@archiva.apache.org
Objet : Re: Installing archiva on Debian Tomcat 7

Sorry, I can't see anything wrong with your configuration, and haven't used
Debian's Java packaging. Perhaps you'll get more assistance from the Tomcat
users list?

For Archiva specifically, have you considered using the stock Jetty
distribution to get started?

Regards,
Brett

On 1 Mar 2014, at 2:15 am, Frederik Himpe <fh...@vub.ac.be> wrote:

> On Sat, 01 Mar 2014 01:30:28 +1100, Brett Porter wrote:
> 
>> Do you have the derby driver in the Tomcat lib directory?
> 
> Yes:
> 
> $ ls -lh /usr/share/tomcat7/lib/
> total 0
> lrwxrwxrwx 1 root root 44 Feb 21 07:42 annotations-api.jar -> 
> ../../java/tomcat-annotations-api-7.0.52.jar
> lrwxrwxrwx 1 root root 34 Feb 21 07:42 catalina-ant.jar -> 
> ../../java/catalina-ant-7.0.52.jar
> lrwxrwxrwx 1 root root 40 Feb 21 07:42 catalina-ha.jar -> 
> ../../java/tomcat-catalina-ha-7.0.52.jar
> lrwxrwxrwx 1 root root 37 Feb 21 07:42 catalina.jar -> 
> ../../java/tomcat-catalina-7.0.52.jar
> lrwxrwxrwx 1 root root 37 Feb 21 07:42 catalina-tribes.jar -> 
> ../../java/catalina-tribes-7.0.52.jar
> lrwxrwxrwx 1 root root 27 Feb 21 07:42 commons-dbcp.jar -> 
> ../../java/commons-dbcp.jar lrwxrwxrwx 1 root root 27 Feb 21 07:42 
> commons-pool.jar -> ../../java/commons-pool.jar lrwxrwxrwx 1 root root 
> 20 Feb 26 14:06 derby.jar -> ../../java/derby.jar lrwxrwxrwx 1 root 
> root 32 Feb 21 07:42 el-api.jar -> ../../java/tomcat-el-api-2.2.jar 
> lrwxrwxrwx 1 root root 45 Feb 26 14:10 
> geronimo-javamail-1.4-provider.jar -> 
> ../../java/geronimo-javamail-1.4-provider.jar
> lrwxrwxrwx 1 root root 41 Feb 26 14:11 geronimo-javamail-1.4-spec.jar 
> -> ../../java/geronimo-javamail-1.4-spec.jar
> lrwxrwxrwx 1 root root 36 Feb 26 14:11 geronimo-jpa-2.0-spec.jar -> 
> ../../java/geronimo-jpa-2.0-spec.jar
> lrwxrwxrwx 1 root root 36 Feb 26 14:11 geronimo-osgi-locator.jar -> 
> ../../java/geronimo-osgi-locator.jar
> lrwxrwxrwx 1 root root 37 Feb 26 14:11 geronimo-osgi-registry.jar -> 
> ../../java/geronimo-osgi-registry.jar
> lrwxrwxrwx 1 root root 38 Feb 21 07:42 jasper-el.jar -> 
> ../../java/tomcat-jasper-el-7.0.52.jar
> lrwxrwxrwx 1 root root 35 Feb 21 07:42 jasper.jar -> 
> ../../java/tomcat-jasper-7.0.52.jar
> lrwxrwxrwx 1 root root 33 Feb 21 07:42 jsp-api.jar -> 
> ../../java/tomcat-jsp-api-2.2.jar lrwxrwxrwx 1 root root 37 Feb 21 
> 07:42 servlet-api.jar -> ../../java/tomcat-servlet-api-3.0.jar
> lrwxrwxrwx 1 root root 32 Feb 21 07:42 tomcat-api.jar -> 
> ../../java/tomcat-api-7.0.52.jar lrwxrwxrwx 1 root root 35 Feb 21 
> 07:42 tomcat-coyote.jar -> ../../java/tomcat-coyote-7.0.52.jar
> lrwxrwxrwx 1 root root 36 Feb 21 07:42 tomcat-i18n-es.jar -> 
> ../../java/tomcat-i18n-es-7.0.52.jar
> lrwxrwxrwx 1 root root 36 Feb 21 07:42 tomcat-i18n-fr.jar -> 
> ../../java/tomcat-i18n-fr-7.0.52.jar
> lrwxrwxrwx 1 root root 36 Feb 21 07:42 tomcat-i18n-ja.jar -> 
> ../../java/tomcat-i18n-ja-7.0.52.jar
> lrwxrwxrwx 1 root root 33 Feb 21 07:42 tomcat-jdbc.jar -> 
> ../../java/tomcat-jdbc-7.0.52.jar lrwxrwxrwx 1 root root 33 Feb 21 
> 07:42 tomcat-util.jar -> ../../java/tomcat-util-7.0.52.jar
> 
> /usr/share/java/derby.jar is provided by Debian's package 
> libderby-java 10.10.1.1-1
> 
> --
> Frederik Himpe
> 



Re: Installing archiva on Debian Tomcat 7

Posted by Brett Porter <br...@apache.org>.
Sorry, I can't see anything wrong with your configuration, and haven't used Debian's Java packaging. Perhaps you'll get more assistance from the Tomcat users list?

For Archiva specifically, have you considered using the stock Jetty distribution to get started?

Regards,
Brett

On 1 Mar 2014, at 2:15 am, Frederik Himpe <fh...@vub.ac.be> wrote:

> On Sat, 01 Mar 2014 01:30:28 +1100, Brett Porter wrote:
> 
>> Do you have the derby driver in the Tomcat lib directory?
> 
> Yes:
> 
> $ ls -lh /usr/share/tomcat7/lib/
> total 0
> lrwxrwxrwx 1 root root 44 Feb 21 07:42 annotations-api.jar -> ../../java/tomcat-annotations-api-7.0.52.jar
> lrwxrwxrwx 1 root root 34 Feb 21 07:42 catalina-ant.jar -> ../../java/catalina-ant-7.0.52.jar
> lrwxrwxrwx 1 root root 40 Feb 21 07:42 catalina-ha.jar -> ../../java/tomcat-catalina-ha-7.0.52.jar
> lrwxrwxrwx 1 root root 37 Feb 21 07:42 catalina.jar -> ../../java/tomcat-catalina-7.0.52.jar
> lrwxrwxrwx 1 root root 37 Feb 21 07:42 catalina-tribes.jar -> ../../java/catalina-tribes-7.0.52.jar
> lrwxrwxrwx 1 root root 27 Feb 21 07:42 commons-dbcp.jar -> ../../java/commons-dbcp.jar
> lrwxrwxrwx 1 root root 27 Feb 21 07:42 commons-pool.jar -> ../../java/commons-pool.jar
> lrwxrwxrwx 1 root root 20 Feb 26 14:06 derby.jar -> ../../java/derby.jar
> lrwxrwxrwx 1 root root 32 Feb 21 07:42 el-api.jar -> ../../java/tomcat-el-api-2.2.jar
> lrwxrwxrwx 1 root root 45 Feb 26 14:10 geronimo-javamail-1.4-provider.jar -> ../../java/geronimo-javamail-1.4-provider.jar
> lrwxrwxrwx 1 root root 41 Feb 26 14:11 geronimo-javamail-1.4-spec.jar -> ../../java/geronimo-javamail-1.4-spec.jar
> lrwxrwxrwx 1 root root 36 Feb 26 14:11 geronimo-jpa-2.0-spec.jar -> ../../java/geronimo-jpa-2.0-spec.jar
> lrwxrwxrwx 1 root root 36 Feb 26 14:11 geronimo-osgi-locator.jar -> ../../java/geronimo-osgi-locator.jar
> lrwxrwxrwx 1 root root 37 Feb 26 14:11 geronimo-osgi-registry.jar -> ../../java/geronimo-osgi-registry.jar
> lrwxrwxrwx 1 root root 38 Feb 21 07:42 jasper-el.jar -> ../../java/tomcat-jasper-el-7.0.52.jar
> lrwxrwxrwx 1 root root 35 Feb 21 07:42 jasper.jar -> ../../java/tomcat-jasper-7.0.52.jar
> lrwxrwxrwx 1 root root 33 Feb 21 07:42 jsp-api.jar -> ../../java/tomcat-jsp-api-2.2.jar
> lrwxrwxrwx 1 root root 37 Feb 21 07:42 servlet-api.jar -> ../../java/tomcat-servlet-api-3.0.jar
> lrwxrwxrwx 1 root root 32 Feb 21 07:42 tomcat-api.jar -> ../../java/tomcat-api-7.0.52.jar
> lrwxrwxrwx 1 root root 35 Feb 21 07:42 tomcat-coyote.jar -> ../../java/tomcat-coyote-7.0.52.jar
> lrwxrwxrwx 1 root root 36 Feb 21 07:42 tomcat-i18n-es.jar -> ../../java/tomcat-i18n-es-7.0.52.jar
> lrwxrwxrwx 1 root root 36 Feb 21 07:42 tomcat-i18n-fr.jar -> ../../java/tomcat-i18n-fr-7.0.52.jar
> lrwxrwxrwx 1 root root 36 Feb 21 07:42 tomcat-i18n-ja.jar -> ../../java/tomcat-i18n-ja-7.0.52.jar
> lrwxrwxrwx 1 root root 33 Feb 21 07:42 tomcat-jdbc.jar -> ../../java/tomcat-jdbc-7.0.52.jar
> lrwxrwxrwx 1 root root 33 Feb 21 07:42 tomcat-util.jar -> ../../java/tomcat-util-7.0.52.jar
> 
> /usr/share/java/derby.jar is provided by Debian's package libderby-java 10.10.1.1-1
> 
> -- 
> Frederik Himpe
> 


Re: Installing archiva on Debian Tomcat 7

Posted by Frederik Himpe <fh...@vub.ac.be>.
On Sat, 01 Mar 2014 01:30:28 +1100, Brett Porter wrote:

> Do you have the derby driver in the Tomcat lib directory?

Yes:

$ ls -lh /usr/share/tomcat7/lib/
total 0
lrwxrwxrwx 1 root root 44 Feb 21 07:42 annotations-api.jar -> ../../java/tomcat-annotations-api-7.0.52.jar
lrwxrwxrwx 1 root root 34 Feb 21 07:42 catalina-ant.jar -> ../../java/catalina-ant-7.0.52.jar
lrwxrwxrwx 1 root root 40 Feb 21 07:42 catalina-ha.jar -> ../../java/tomcat-catalina-ha-7.0.52.jar
lrwxrwxrwx 1 root root 37 Feb 21 07:42 catalina.jar -> ../../java/tomcat-catalina-7.0.52.jar
lrwxrwxrwx 1 root root 37 Feb 21 07:42 catalina-tribes.jar -> ../../java/catalina-tribes-7.0.52.jar
lrwxrwxrwx 1 root root 27 Feb 21 07:42 commons-dbcp.jar -> ../../java/commons-dbcp.jar
lrwxrwxrwx 1 root root 27 Feb 21 07:42 commons-pool.jar -> ../../java/commons-pool.jar
lrwxrwxrwx 1 root root 20 Feb 26 14:06 derby.jar -> ../../java/derby.jar
lrwxrwxrwx 1 root root 32 Feb 21 07:42 el-api.jar -> ../../java/tomcat-el-api-2.2.jar
lrwxrwxrwx 1 root root 45 Feb 26 14:10 geronimo-javamail-1.4-provider.jar -> ../../java/geronimo-javamail-1.4-provider.jar
lrwxrwxrwx 1 root root 41 Feb 26 14:11 geronimo-javamail-1.4-spec.jar -> ../../java/geronimo-javamail-1.4-spec.jar
lrwxrwxrwx 1 root root 36 Feb 26 14:11 geronimo-jpa-2.0-spec.jar -> ../../java/geronimo-jpa-2.0-spec.jar
lrwxrwxrwx 1 root root 36 Feb 26 14:11 geronimo-osgi-locator.jar -> ../../java/geronimo-osgi-locator.jar
lrwxrwxrwx 1 root root 37 Feb 26 14:11 geronimo-osgi-registry.jar -> ../../java/geronimo-osgi-registry.jar
lrwxrwxrwx 1 root root 38 Feb 21 07:42 jasper-el.jar -> ../../java/tomcat-jasper-el-7.0.52.jar
lrwxrwxrwx 1 root root 35 Feb 21 07:42 jasper.jar -> ../../java/tomcat-jasper-7.0.52.jar
lrwxrwxrwx 1 root root 33 Feb 21 07:42 jsp-api.jar -> ../../java/tomcat-jsp-api-2.2.jar
lrwxrwxrwx 1 root root 37 Feb 21 07:42 servlet-api.jar -> ../../java/tomcat-servlet-api-3.0.jar
lrwxrwxrwx 1 root root 32 Feb 21 07:42 tomcat-api.jar -> ../../java/tomcat-api-7.0.52.jar
lrwxrwxrwx 1 root root 35 Feb 21 07:42 tomcat-coyote.jar -> ../../java/tomcat-coyote-7.0.52.jar
lrwxrwxrwx 1 root root 36 Feb 21 07:42 tomcat-i18n-es.jar -> ../../java/tomcat-i18n-es-7.0.52.jar
lrwxrwxrwx 1 root root 36 Feb 21 07:42 tomcat-i18n-fr.jar -> ../../java/tomcat-i18n-fr-7.0.52.jar
lrwxrwxrwx 1 root root 36 Feb 21 07:42 tomcat-i18n-ja.jar -> ../../java/tomcat-i18n-ja-7.0.52.jar
lrwxrwxrwx 1 root root 33 Feb 21 07:42 tomcat-jdbc.jar -> ../../java/tomcat-jdbc-7.0.52.jar
lrwxrwxrwx 1 root root 33 Feb 21 07:42 tomcat-util.jar -> ../../java/tomcat-util-7.0.52.jar

/usr/share/java/derby.jar is provided by Debian's package libderby-java 10.10.1.1-1

-- 
Frederik Himpe


Re: Installing archiva on Debian Tomcat 7

Posted by Brett Porter <br...@apache.org>.
Do you have the derby driver in the Tomcat lib directory?

On 1 Mar 2014, at 12:59 am, Frederik Himpe <fh...@vub.ac.be> wrote:

> I'm trying to install Arhiva 2.0.0 on Tomcat 7 (installed from the Debian package).
> 
> However when Tomcat 7 is started, I get this error in catalina.out:
> 
> INFO: Deploying web application archive /var/lib/tomcat7/webapps/apache-archiva-2.0.0.war
> Feb 28, 2014 10:32:20 AM org.apache.tomcat.jdbc.pool.ConnectionPool init
> SEVERE: Unable to create initial connections of pool.
> java.sql.SQLException
>        at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:254)
>        at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:182)
>        at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:701)
>        at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:635)
>        at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:486)
>        at org.apache.tomcat.jdbc.pool.ConnectionPool.<init>(ConnectionPool.java:144)
>        at org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:116)
>        at org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:103)
>        at org.apache.tomcat.jdbc.pool.DataSourceFactory.createDataSource(DataSourceFactory.java:554)
>        at org.apache.tomcat.jdbc.pool.DataSourceFactory.getObjectInstance(DataSourceFactory.java:242)
>        at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:141)
>        at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:321)
>        at org.apache.naming.NamingContext.lookup(NamingContext.java:842)
>        at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
>        at org.apache.naming.NamingContext.lookup(NamingContext.java:830)
>        at org.apache.naming.NamingContext.lookup(NamingContext.java:167)
>        at org.apache.catalina.core.NamingContextListener.addResource(NamingContextListener.java:1091)
>        at org.apache.catalina.core.NamingContextListener.createNamingContext(NamingContextListener.java:670)
>        at org.apache.catalina.core.NamingContextListener.lifecycleEvent(NamingContextListener.java:269)
>        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
>        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
>        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5355)
>        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
>        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
>        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
>        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1073)
>        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857)
>        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
>        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
>        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>        at java.lang.Thread.run(Thread.java:724)
> Caused by: java.lang.NullPointerException
>        at java.lang.Class.forName0(Native Method)
>        at java.lang.Class.forName(Class.java:270)
>        at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:246)
>        ... 33 more
> 
> My /etc/tomcat7/Catalina/localhost/archiva.xml looks like this:
> <?xml version="1.0" encoding="UTF-8"?>
> <Context path="/apache-archiva-2.0.0"
>          docBase="/var/lib/tomcat7/webapps/apache-archiva-2.0.0">
> 
> <Resource name="jdbc/users" auth="Container" type="javax.sql.DataSource"
>          username="sa"
>          password=""
>          driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
>          url="jdbc:derby:/var/lib/archiva/users;create=true" />
> 
> <Resource name="mail/Session" auth="Container"
>           type="javax.mail.Session"
>           mail.smtp.host="localhost"/>
> </Context>
> 
> I see that the derby database in /var/lib/archiva/users/ is created correctly.
> 
> I have placed my full catalina.out here:
> http://artipc10.vub.ac.be/~frederik/archiva/catalina.out
> 
> and here is archiva.log:
> http://artipc10.vub.ac.be/~frederik/archiva/archiva.log
> 
> Any idea what is going wrong?
> 
> Regards
> -- 
> Frederik Himpe
> 

--
Brett Porter   @brettporter
http://brettporter.wordpress.com/
http://au.linkedin.com/in/brettporter