Hi all let me see if I can explain my problem and how I have
things setup… First, my problem is having difficulty converting one of my
working and deployed applications to using iBatis Dao. I basically yanged out
my Dao factory and try to replace it with iBatis version in hopes to use
SQLMAP.
Where it fails… ============================ It fails right here in the dao.xml file, see dao.xml below. <snip> Reader reader =
Resources.getResourceAsReader(resource); </snip> Question: Do I still need to define my transactionManager even thou I have
my own connectionManager class – See dao.xml below Any help will be appreciated. Package Structure ============================ net.package1.package2
|
| MyExtendedActionServlet.java : ============================ // load the countires ArrayList countires = new
ArrayList(); countires = api.loadDropDownMenu(Constants.DROP_MENU_COUNTRY,
false);
getServletContext().setAttribute(appProp.getValue("lookup.country"),
countires); logger.debug("COUNTRIES
LOADED..."); MysqlSelectionObjectDAO.java: ============================ <snip/>
- the program is not even getting to this point….. dao.xml ============================ <daoConfig> <properties resource=" net/package1/package2/properties/database_local.properties"/> <context> <transactionManager
type="JDBC"> <property
name="DataSource" value="SIMPLE"/> <property
name="JDBC.Driver" value="${driver}"/> <property
name="JDBC.ConnectionURL" value="${url}"/> <property
name="JDBC.Username" value="${username}"/> <property
name="JDBC.Password" value="${password}"/> <property
name="JDBC.DefaultAutoCommit" value="true"/> <property
name="Pool.MaximumActiveConnections" value="10"/> <property
name="Pool.MaximumIdleConnections" value="5"/> <property
name="Pool.MaximumCheckoutTime" value="120000"/> </transactionManager> <dao interface=" net.package1.package2.persistence.iface.SelectionObjectDAO"
implementation=" net.package1.package2.persistence.mysql.MysqlSelectionObjectDAO"/> </context> </daoConfig> DaoConfig.java ============================ public class DaoConfig { private static final DaoManager DAO_MANAGER; static { try { String resource = " net/package1/package2/persistence/dao.xml"; Reader reader =
Resources.getResourceAsReader(resource); DAO_MANAGER = DaoManagerBuilder.buildDaoManager(reader);
System.out.println("Finished getting the DAO_MANAGER..."); } catch (Exception e) { throw new
RuntimeException("Could not initialize DaoConfig. Cause: " +
e); } } public static DaoManager getDaomanager() { return DAO_MANAGER; } } ---------- ERROR – start --------------- <snip> DEBUG[2005-Apr-25 13:17:49] -
jdbc.SimpleDataSource(SimpleDataSource.java:407) - SimpleDataSource forcefully
closed/removed all connections. ApplicationDispatcher[/myContext]: Servlet.service() for
servlet debugjsp threw exception java.lang.NoClassDefFoundError at
net. package1. package2.domain.impl.MyServiceImpl.<init>(MyServiceImpl.java:34) at
net. package1. package2.framework.taglib.BuildBirthdayListTag.<init>(BuildBirthdayListTag.java:73) </snip> ---------- ERROR – start --------------- |
- Re: iBatis Dao Setup Folashade Adeyosoye
- Re: iBatis Dao Setup Brandon Goodin
- RE: iBatis Dao Setup Folashade Adeyosoye
- Re: iBatis Dao Setup Larry Meadors
- Output parameters with optional resul... David Whipple
- Re: Output parameters with optio... Clinton Begin
- Re: Output parameters with o... David Whipple
- Re: Output parameters wi... Clinton Begin
- Re: Output parameters wi... David Whipple
- RE: iBatis Dao Setup Folashade Adeyosoye
- Re: iBatis Dao Setup Richard Yee