Hi
This actually more of a Resin 3 question than a DBForms question, but
I take the chance of asking it here anyway, because if anyone of you
are using Resin, you will quickly be able to answer it.
I am trying to enable enable database lookup through JNDI, so in
dbforms-config.xml, I have the following:
<dbconnection
name = "java:/comp/env/jdbc/DBASOL"
isJndi = "true"
/>
In resin.conf I have:
database>
<jndi-name>jdbc/DBASOL</jndi-name>
<driver type="oracle.jdbc.driver.OracleDriver">
<url>jdbc:oracle:thin:@overlord:1521:PROD</url>
<user>website</user>
<password>secret</password>
</driver>
<prepared-statement-cache-size>10</prepared-statement-cache-size>
<max-connections>20</max-connections>
<max-idle-time>30s</max-idle-time>
</database>
However, when running an application I get the following exception:
03 jun 2005 14:51:05,328 ERROR
org.dbforms.taglib.DbFormTag.doCatch(DbFormTag.java:1094)
DbFormTag.doCatch called - java.lang.IllegalArgumentException:
JDBC-Troubles: was not able to create connection from DbConnection =
id=null, name=java:/comp/env/jdbc/DBASOL, jndi=true, conClass=null,
username=null, default=true
java.lang.IllegalArgumentException: JDBC-Troubles: was not able to
create connection from DbConnection = id=null,
name=java:/comp/env/jdbc/DBASOL, jndi=true, conClass=null,
username=null, default=true
at
org.dbforms.config.DbFormsConfig.getConnection(DbFormsConfig.java:130)
at org.dbforms.taglib.DbFormTag.doStartTag(DbFormTag.java:1222)
at _jsp._index__jsp._jspService(_index__jsp.java:72)
at com.caucho.jsp.JavaPage.service(JavaPage.java:63)
at com.caucho.jsp.Page.pageservice(Page.java:570)
at
com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:159)
at
com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:163)
at
com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:208)
at
com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:259)
at com.caucho.server.port.TcpConnection.run(TcpConnection.java:341)
at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:490)
at com.caucho.util.ThreadPool.run(ThreadPool.java:423)
at java.lang.Thread.run(Thread.java:534)
I might be missing something in web.xml ?
When I set up database lookup through JNDI in Tomcat, I had to add the
following to web.xml:
<resource-ref>
<description>Oracle Datasource</description>
<res-ref-name>jdbc/DBASOL</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
But the same text in web.xml doesn't work with Resin, and the Resin
docs are pretty limited on this area I think, so I am stuck.
best regards
Audun
-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
DbForms Mailing List
http://www.wap-force.net/dbforms