[jboss-user] [JNDI/Naming/Network] - Re: JNDI lookup of DataSource failed
braca
do-not-reply at jboss.com
Fri Sep 5 14:59:47 EDT 2008
Thanks for advice! The deployment is now alright for the war, no exception is thrown. Unfortunately connecting to the dataSource still doesn't work. When requesting the page index.jspx with the sql:query, this exception is thrown:
20:28:10,462 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "java.lang.NullPointerE
xception"
at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(QueryTagSupport.j
ava:285)
at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(QueryTagSupport.java
:168)
at org.apache.taglibs.standard.tag.el.sql.QueryTag.doStartTag(QueryTag.java:94)
However, if I place "OracleDS" directly into the jsp-Page:
<sql:query var="queryResults" dataSource="OracleDS">
SELECT kat1, kat2,
it works. But only if there is a jboss-web.xml as well as you posted it.
How can I get it to work without referencing for each jsp-Page the dataSource?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4174711#4174711
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4174711
More information about the jboss-user
mailing list