SQLException when running test-jndi-webapp example with JOTM/Oracle

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

SQLException when running test-jndi-webapp example with JOTM/Oracle

gbie
I was trying to run the example test-jndi-webapp from jetty-6.1.11 distribution. I am using JOTM and Oracle. When I start the Jetty server I get the following SQLException. I have copied the Oracle drivers to Jetty/lib and copied the necessary JOTM jars to Jetty/lib/ext.

Am I missing something here?  


2008-06-30 08:09:09.014::WARN:  Nested in javax.servlet.ServletException: javax.
servlet.ServletException: java.sql.SQLException: SQLException in StandardPoolDat
aSource:getConnection exception: java.sql.SQLException: SQLException in Standard
PoolDataSource:getConnection no connection available java.sql.SQLException: Cann
ot get connection for URL jdbc:oracle:thin:@crimson:1521:XE : invalid arguments
in call:
javax.servlet.ServletException: java.sql.SQLException: SQLException in StandardP
oolDataSource:getConnection exception: java.sql.SQLException: SQLException in St
andardPoolDataSource:getConnection no connection available java.sql.SQLException
: Cannot get connection for URL jdbc:oracle:thin:@crimson:1521:XE : invalid argu
ments in call
        at com.acme.JNDITest.init(JNDITest.java:101)
        at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.jav
a:433)
        at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:25
6)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
39)
        at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.ja
va:616)
        at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
        at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.jav
a:1220)
        at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:
513)
        at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448
)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
39)
        at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection
.java:152)
        at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHan
dlerCollection.java:156)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
39)
        at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection
.java:152)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
39)
        at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:
130)
        at org.mortbay.jetty.Server.doStart(Server.java:222)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
39)
        at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:977)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.mortbay.start.Main.invokeMain(Main.java:194)
        at org.mortbay.start.Main.start(Main.java:512)
        at org.mortbay.start.Main.main(Main.java:119)
Caused by: java.sql.SQLException: SQLException in StandardPoolDataSource:getConn
ection exception: java.sql.SQLException: SQLException in StandardPoolDataSource:
getConnection no connection available java.sql.SQLException: Cannot get connecti
on for URL jdbc:oracle:thin:@crimson:1521:XE : invalid arguments in call
        at org.enhydra.jdbc.pool.StandardPoolDataSource.getConnection(StandardPo
olDataSource.java:213)
        at org.enhydra.jdbc.pool.StandardPoolDataSource.getConnection(StandardPo
olDataSource.java:164)
        at com.acme.JNDITest.doSetup(JNDITest.java:272)
        at com.acme.JNDITest.init(JNDITest.java:97)
        ... 25 more
Reply | Threaded
Open this post in threaded view
|

Re: SQLException when running test-jndi-webapp example with JOTM/Oracle

gbie
I found the cause of this problem. This is due to the JDBC URL missing user/pass for Oracle. After changing to jdbc:oracle:thin:scott/tiger@crimson:1521:XE solved the problem.

Thank you,
Arul

gbie wrote
I was trying to run the example test-jndi-webapp from jetty-6.1.11 distribution. I am using JOTM and Oracle. When I start the Jetty server I get the following SQLException. I have copied the Oracle drivers to Jetty/lib and copied the necessary JOTM jars to Jetty/lib/ext.

Am I missing something here?  


2008-06-30 08:09:09.014::WARN:  Nested in javax.servlet.ServletException: javax.
servlet.ServletException: java.sql.SQLException: SQLException in StandardPoolDat
aSource:getConnection exception: java.sql.SQLException: SQLException in Standard
PoolDataSource:getConnection no connection available java.sql.SQLException: Cann
ot get connection for URL jdbc:oracle:thin:@crimson:1521:XE : invalid arguments
in call:
javax.servlet.ServletException: java.sql.SQLException: SQLException in StandardP
oolDataSource:getConnection exception: java.sql.SQLException: SQLException in St
andardPoolDataSource:getConnection no connection available java.sql.SQLException
: Cannot get connection for URL jdbc:oracle:thin:@crimson:1521:XE : invalid argu
ments in call
        at com.acme.JNDITest.init(JNDITest.java:101)
        at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.jav
a:433)
        at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:25
6)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
39)
        at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.ja
va:616)
        at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
        at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.jav
a:1220)
        at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:
513)
        at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448
)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
39)
        at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection
.java:152)
        at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHan
dlerCollection.java:156)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
39)
        at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection
.java:152)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
39)
        at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:
130)
        at org.mortbay.jetty.Server.doStart(Server.java:222)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
39)
        at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:977)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.mortbay.start.Main.invokeMain(Main.java:194)
        at org.mortbay.start.Main.start(Main.java:512)
        at org.mortbay.start.Main.main(Main.java:119)
Caused by: java.sql.SQLException: SQLException in StandardPoolDataSource:getConn
ection exception: java.sql.SQLException: SQLException in StandardPoolDataSource:
getConnection no connection available java.sql.SQLException: Cannot get connecti
on for URL jdbc:oracle:thin:@crimson:1521:XE : invalid arguments in call
        at org.enhydra.jdbc.pool.StandardPoolDataSource.getConnection(StandardPo
olDataSource.java:213)
        at org.enhydra.jdbc.pool.StandardPoolDataSource.getConnection(StandardPo
olDataSource.java:164)
        at com.acme.JNDITest.doSetup(JNDITest.java:272)
        at com.acme.JNDITest.init(JNDITest.java:97)
        ... 25 more