i'm developing a new piece of our jdk 1.4.2, JSF + iBatis Web Application.
For the database thing i've added a new line in our SqlMapConfig.xml like this
<sqlMapConfig>
...
<sqlMap resource="com/example/properties/SqlMapLockOfferte.xml" />
</sqlMapConfig>
i've create a new SqlMapLockOfferte.xml file in that position with my query.
I've deploy it on my tomcat 4.1 and all seems to work fine.
I've packed it and deployed on our test environment, WebLogic 8.1, and on Bea startup i see the first strange error:
ERROR [IBatisSqlMapClientSingletonFactory] java.io.IOException: Could not find resource com/example/properties/SqlMapConfig.xml
but the config file is still here, i have not moved it. Next, in the application log i see another strange thing:
DEBUG com.example.ibatisimpl.IBatisSqlMapClientSingletonFactory - configuration successfully ended
DEBUG com.example.ibatisimpl.IBatisSqlMapClientSingletonFactory - configuration successfully ended
but, as the name suggest, this log is inside a public static method, so i'm whondering why i'm seeing this two time.
Finally, the most funny thing. The Web Application is up & running, and iBatis seems to work fine, except for the part that make use of the new query i've defined in the above XML.
In that case i receive a NullPointerException
when trying to use the SqlMapClient
object that i've tryed to instantiate trought the singleton.
Any idea?
Thanks, Piwakkio.
I figured out what originated this issue.
In my Web Application i make use of a HttpSessionListener
and in his constructor i putted the instantiation of my iBatis object.
In Tomcat 4.1 all works fine, in WebLogic 8.1 instead the session listener seems to be created at the startup of the Web Application, and that was causing the trouble. Apparently Tomcat instatiate the session listener only when requested by the Web Application.