You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 9, 2017. It is now read-only.
Is it expected that JNDI datasources should work using the Multiple Datasources
configuration advice given at
http://mybatis.github.com/guice/core.html
??
We spent a great deal of time reading doc and forums - both before and after we
encountered the problem described below - but could find nothing related.
We needed to add an additional datasource to the application that has been
running fine with a single JNDI connection configured using the MyBatisModule
directly.
When we used a PrivateModule to wrap each of our MyBatisModules for the two
datasources we get the message:
null returned by binding at org.mybatis.guice.MyBatisModule.bindDataSourceProviderType(MyBatisModule.java:215) ... while locating javax.sql.DataSource
After tracing and checking for hours, we finally got this to work by using
direct JDBC with the PooledDataSourceProvider.class.
I've attached three files:
- the log from Tomcat showing the detailed exceptions we get.
- The AppListener module configured with JNDI that fails.
- The AppListener module configured with direct JDBC
The two modules are identical except for the lines I've commented out by each.
A quick diff will show.
Thank you.
Original issue reported on code.google.com by [email protected] on 23 Mar 2013 at 7:33