I have an EAR (PRDApp) containing several EJB's & a single WAR file.
I have a prd.system.properties file that currently contains the data source
name iBatis use's to get a connection from a Weblogic connection pool.
i.e
datasourcename=PRDDataSource
So my sql-map-config.xml file looks something like this -
<sqlMapConfig>
<properties resource = "prd.system.properties" />
.
.
<transactionManager type="EXTERNAL">
<dataSource type="JNDI">
<property name="DBFullJndiContext"
value="${datasourcename}"/>
</dataSource>
</transactionManager>
This works fine but I want to use this file to contain other settings used
by other modules. So I've placed it in the App directory but changing the
line to -
<properties resource = "./applications/PRDApp/system.properties" />
but this produces -
javax.ejb.EJBException: Error in ejbCreate::
java.lang.ExceptionInInitializerError
.
Caused by: java.lang.RuntimeException: Could not initialize
DaoConfig. Cause: com.ibatis.dao.client.DaoException: Error while
configuring DaoManager. Cause:
com.ibatis.sqlmap.client.SqlMapException: There was an error while building
the SqlMap instance.
--- The error occurred in
./applications/PRDApp/prd.system.properties.
--- The error occurred while loading global properties.
--- Cause: com.ibatis.sqlmap.client.SqlMapException: Error loading
properties. Cause: java.io.IOException: Could not find resource
./applications/PRDApp/prd.system.properties
.
Is it possible to get iBatis to use this file? if so any ideas what the
resource line should be?
Many thanks
harry