tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: Archiva fails to deploy on Tomcat with "SEVERE: Unable to create initial connections of pool."
Date Mon, 03 Mar 2014 13:31:48 GMT
2014-03-03 16:37 GMT+04:00 Frederik Himpe <fhimpe@vub.ac.be>:
> I'm trying to install Apache Archiva 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 have derby.jar in /usr/share/tomcat7/libs and
> 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
>

>From your catalina.out:
[[[
Feb 28, 2014 10:32:05 AM org.apache.catalina.startup.HostConfig deployDescriptor
WARNING: A docBase /var/lib/tomcat7/webapps/apache-archiva-2.0.0
inside the host appBase has been specified, and will be ignored
]]]

You deployed your web application twice:
1. as "archiva" (thanks to archiva.xml),
2. as "apache-archiva-2.0.0" (thanks to a subdirectory in webapps).

There is no context file for "2." thus configuration will be empty and
you have empty driverClassName.

Rename  archiva.xml -> apache-archiva-2.0.0.xml and remove "path" and
"docBase" attributes.


Configuration reference:
http://tomcat.apache.org/tomcat-7.0-doc/config/context.html

> and here is archiva.log:
> http://artipc10.vub.ac.be/~frederik/archiva/archiva.log
>
> Any idea what is going wrong?

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message