Hi, I am currently using iBatis 2.1 and I am having trouble connecting to different dbs. In my DAOMap.xml, I created to connections to 2 different databases -- when I tested each of the queries in Junit, it works fine, however when I call via the DaoManager, it keeps throwing this error:
javax.servlet.ServletException: Servlet execution threw an exception root cause java.lang.ExceptionInInitializerError com.ze.security.service.ServiceManagerProxy.<init>(ServiceManagerProxy.java:54) com.ze.security.service.ServiceManagerProxy.<clinit>(ServiceManagerProxy.java:29) This is my DAOMap.xml: <context id="sqlmap"> <transactionManager type="SQLMAP"> <property name="SqlMapConfigResource" value="com/ze/security/config/sql-map-config.xml"/> </transactionManager> <dao interface="com.ze.security.dao.IApplicationDao" implementation="com.ze.security.dao.sqlmap.SqlMapApplicationDao" /> </context> <context id="sqlmapUtl"> <transactionManager type="SQLMAP"> <property name="SqlMapConfigResource" value="com/ze/security/config/utl_sql-map-config.xml"/> </transactionManager> <dao interface="com.ze.security.dao.IHolidayDao" implementation="com.ze.security.dao.sqlmap.SqlMapHolidayDao" /> </context> This is where it throws the exception: final Reader reader = Resources .getResourceAsReader("com/ze/security/config/DAOMap.xml"); daoManager = DaoManagerBuilder.buildDaoManager(reader); If I remove one of the context, it works. Can anyone help? Thanks. ____________________________________________________________________________________ Bored stiff? Loosen up... Download and play hundreds of games for free on Yahoo! Games. http://games.yahoo.com/games/front