ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Armeanu, Christian" <Armea...@hsd.k12.or.us>
Subject RE: JNDI NameNotFoundException with Tomcat 5.5
Date Thu, 21 Dec 2006 17:21:10 GMT
Did the trick!  Thanks.  

 

Where can I find the info about this prefix?  

 

Thanks,

Chris

 

 

________________________________

From: Jeff Butler [mailto:jeffgbutler@gmail.com] 
Sent: Wednesday, December 20, 2006 4:58 PM
To: user-java@ibatis.apache.org
Subject: Re: JNDI NameNotFoundException with Tomcat 5.5

 

Try this:

 

<dataSource type="JNDI">  

  <property name="DataSource" value= "java:comp/env/jdbc/EIS" />

</dataSource 

 

Jeff Butler

 


 

On 12/20/06, Armeanu, Christian <ArmeanuC@hsd.k12.or.us> wrote: 

Hi,

 

I'd like to use tomcat JNDI as the datasource for my application and
don't seem to be able to find the right configuration. Have tried
everything I could think of: 

 

sqlMapConfig contains the following section:

...

<transactionManager type="JDBC" >

    <dataSource type= "JNDI"> 

      <property name= "DBJndiContext" value="jdbc/EIS" /> 

    </dataSource> 

</transactionManager>

...

 

context.xml:

 

<?xml version="1.0" encoding="UTF-8"?> 

<Context docBase="eis" debug= "5" path="" reloadable= "true"> 

      <Resource name= "jdbc/EIS" auth="Container" type=
"javax.sql.DataSource" 

                    maxActive= "100" maxIdle="30" maxWait= "1000" 

                    username= "webuser" password="somepwd"
driverClassName= "net.sourceforge.jtds.jdbc.Driver" 

                    url= "jdbc:jtds:sqlserver://localhost:1433/EIS" />

</Context>

 

Where am I wrong?

 

Here's the end of the stack trace:

 

Caused by: java.lang.RuntimeException : Error parsing XPath
'/sqlMapConfig/transactionManager/dataSource/end()'.  Cause:
com.ibatis.sqlmap.client.SqlMapException: There was an error configuring
JndiDataSourceDaoTransactionPool. Cause:
javax.naming.NameNotFoundException : Name jdbc is not bound in this
Context

      at com.ibatis.common.xml.NodeletParser.processNodelet(
NodeletParser.java:113) 

      at com.ibatis.common.xml.NodeletParser.process(
NodeletParser.java:95) 

      at com.ibatis.common.xml.NodeletParser.process(
NodeletParser.java:92) 

      at com.ibatis.common.xml.NodeletParser.process(
NodeletParser.java:92) 

      at com.ibatis.common.xml.NodeletParser.parse(
NodeletParser.java:62) 

      at com.ibatis.common.xml.NodeletParser.parse(
NodeletParser.java:50) 

      ... 41 more

Caused by: com.ibatis.sqlmap.client.SqlMapException : There was an error
configuring JndiDataSourceDaoTransactionPool. Cause:
javax.naming.NameNotFoundException: Name jdbc is not bound in this
Context 

      at
com.ibatis.sqlmap.engine.datasource.JndiDataSourceFactory.initialize(
JndiDataSourceFactory.java:60) 

      at
com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser$9.process(
SqlMapConfigParser.java:318) 

      at com.ibatis.common.xml.NodeletParser.processNodelet(
NodeletParser.java:111) 

      ... 46 more

Caused by: javax.naming.NameNotFoundException : Name jdbc is not bound
in this Context 

      at org.apache.naming.NamingContext.lookup( NamingContext.java:769)


      at org.apache.naming.NamingContext.lookup( NamingContext.java:139)


      at org.apache.naming.NamingContext.lookup( NamingContext.java:780)


      at org.apache.naming.NamingContext.lookup( NamingContext.java:139)


      at org.apache.naming.NamingContext.lookup( NamingContext.java:780)


      at org.apache.naming.NamingContext.lookup( NamingContext.java:152)


      at org.apache.naming.SelectorContext.lookup(
SelectorContext.java:136) 

      at javax.naming.InitialContext.lookup(Unknown Source) 

      at
com.ibatis.sqlmap.engine.datasource.JndiDataSourceFactory.initialize(
JndiDataSourceFactory.java:48) 

      ... 48 more

 

Thanks,

Chris

 

 


Mime
View raw message