ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simone Chiucchi" <s.chiuc...@gmail.com>
Subject java.net.UnknownHostException: www.ibatis.com
Date Tue, 25 Apr 2006 00:00:43 GMT
I'm using iBatis 2.1.5 in a 1.3 J2EE project, and is is activated by Spring

The iBatis and Spring jars are placed in a lib folder of the ear project,
visible to all the modules.
The J2EE project also contains a web module, an ejb module and a java
utility jar.
The war classloader policy is set to APPLICATION, so there is the same
classloader for all the modules of the ear.

It happens that when the Spring/iBatis initialization is triggered by the
web module (via the web application user interface) it's alright.
Instead, if the frameworks are initialized by the ejb module, by starting a
listener port of an MDB, I get the exception in the subject:

IOException parsing XML document from class path resource [
geeg-data-orm-sqlmap.xml]; nested exception is java.net.UnknownHostException:

That's just the from the URI (http://www.ibatis.com/dtd/sql-map-config-2.dtd)
referencing the DTD used by iBatis for XML validation.

Since iBatis is version 2.1.5, it should be able to resolve that DTD URI.

The problem happens both from the IDE (WSAD) Unit Test Environment and
deploying the ear file on WebSphere

The only workaround I found to make the application to run correctly
under the WSAD unit test environment have been to modify:

 <!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN" "
http://www.ibatis.com/dtd/sql-map-config-2.dtd" >


 <!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN" "

and putting the DTD file in the WSAD installation directory.

But it can't be the solution when finally deploying to a production
applicatione server !!!

Why the DTD inside the iBatis jar is not read? It is possible that the
classloader I'm using at the moment of the problem is a parent to the one
that loads the iBatis jar?

I've tryed to follow the advices posted to questions similar to mine, but I
didn't get results.

Hence, any help would be greatly appreciated.

Thanks, Simone.

View raw message