ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Jardin <jeremy.jar...@gmail.com>
Subject Re: AW: unexpected ExceptionInInitializerError
Date Thu, 08 Nov 2007 16:01:33 GMT

Well, the pc from which I start the web application don't have any web
connection.
So, I put the dtds into my web-inf directory... not very sexy, but it works
;-)

I wrote a DaoConfLoader class, used ton init the ibatis configuration,
parsing the dao.xml file.
That classe is invoked by the authentication servlet, when the server is up.

I unfortunatly can't use the ibatis.apache.org's dtd... but my solution
worked 'til today !!

 



Larry Meadors-2 wrote:
> 
> What's with that DTD?
> 
> Your server won't be up when that request is made, and if you use the
> ibatis.apache.org DTD, it'll be resolved from the JAR, not over the
> net.
> 
> Larry
> 
> 
> On Nov 8, 2007 8:34 AM, Jeremy Jardin <jeremy.jardin@gmail.com> wrote:
>>
>>
>> so, the sql map config :
>>
>> <?xml version="1.0" encoding="utf-8" ?>
>> <!DOCTYPE sqlMapConfig
>>   PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN"
>>   " http://localhost:8888/oci/sql-map-config-2.dtd">
>>
>> <sqlMapConfig>
>>     <properties resource="conf/oci.properties" />
>>     <settings cacheModelsEnabled="true" enhancementEnabled="true"
>>         lazyLoadingEnabled="true" maxRequests="32" maxSessions="10"
>>         maxTransactions="5" useStatementNamespaces="true" />
>>     <typeAlias alias="order" type=" testdomain.Order" />
>>
>>     <transactionManager type="JDBC">
>>         <dataSource type="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" />
>>         </dataSource>
>>     </transactionManager>
>>
>>     <sqlMap
>>
>> resource="fr/gouv/finances/douane/dnsce/oci/business/ibatis/sql/DOSSIERS_SqlMap.xml"
>> />
>>     <sqlMap
>>
>> resource="fr/gouv/finances/douane/dnsce/oci/business/ibatis/sql/AGENTS_SqlMap.xml"
>> />
>>     <sqlMap
>>
>> resource="fr/gouv/finances/douane/dnsce/oci/business/ibatis/sql/CARTES01_SqlMap.xml"
>> />
>>     <sqlMap
>>
>> resource="fr/gouv/finances/douane/dnsce/oci/business/ibatis/sql/CARTES02_SqlMap.xml"
>> />
>>     <sqlMap
>>
>> resource="fr/gouv/finances/douane/dnsce/oci/business/ibatis/sql/CARTES03_SqlMap.xml"
>> />
>>     <sqlMap
>>
>> resource="fr/gouv/finances/douane/dnsce/oci/business/ibatis/sql/CARTES05_SqlMap.xml"
>> />
>>     <sqlMap
>>
>> resource="fr/gouv/finances/douane/dnsce/oci/business/ibatis/sql/CARTES20_SqlMap.xml"
>> />
>>     <sqlMap
>>
>> resource="fr/gouv/finances/douane/dnsce/oci/business/ibatis/sql/CARTES21_SqlMap.xml"
>> />
>>     <sqlMap
>>
>> resource="fr/gouv/finances/douane/dnsce/oci/business/ibatis/sql/CARTES22_SqlMap.xml"
>> />
>>     <sqlMap
>>
>> resource="fr/gouv/finances/douane/dnsce/oci/business/ibatis/sql/CARTES4N_SqlMap.xml"
>> />
>>     <sqlMap
>>
>> resource="fr/gouv/finances/douane/dnsce/oci/business/ibatis/sql/CARTES9C_SqlMap.xml"
>> />
>>     <sqlMap
>>
>> resource="fr/gouv/finances/douane/dnsce/oci/business/ibatis/sql/CARTES9G_SqlMap.xml"
>> />
>>     <sqlMap
>>
>> resource="fr/gouv/finances/douane/dnsce/oci/business/ibatis/sql/INDEMNITES_SqlMap.xml"
>> />
>>     <sqlMap
>>
>> resource="fr/gouv/finances/douane/dnsce/oci/business/ibatis/sql/ECHELONS_SqlMap.xml"
>> />
>>     <sqlMap
>>
>> resource="fr/gouv/finances/douane/dnsce/oci/business/ibatis/sql/GRADES_SqlMap.xml"
>> />
>>     <sqlMap
>>
>> resource="fr/gouv/finances/douane/dnsce/oci/business/ibatis/sql/DIVISION_SqlMap.xml"
>> />
>>     <sqlMap
>>
>> resource="fr/gouv/finances/douane/dnsce/oci/business/ibatis/sql/UTILISATEURS_SqlMap.xml"
>> />
>>     <sqlMap
>>
>> resource="fr/gouv/finances/douane/dnsce/oci/business/ibatis/sql/HABILITATIONS_SqlMap.xml"
>> />
>>     <sqlMap
>>
>> resource="fr/gouv/finances/douane/dnsce/oci/business/ibatis/sql/GESTIONNAIRES_SqlMap.xml"
>> />
>>     <sqlMap
>>
>> resource="fr/gouv/finances/douane/dnsce/oci/business/ibatis/sql/LIBELLES_SqlMap.xml"
>> />
>>     <sqlMap
>>
>> resource="fr/gouv/finances/douane/dnsce/oci/business/ibatis/sql/POSTES_SqlMap.xml"
>> />
>>     <sqlMap
>>
>> resource="fr/gouv/finances/douane/dnsce/oci/business/ibatis/sql/MEMOMODIFS_SqlMap.xml"
>> />
>>     <sqlMap
>>
>> resource="fr/gouv/finances/douane/dnsce/oci/business/ibatis/sql/BATCHS_SqlMap.xml"
>> />
>> </sqlMapConfig>
>>
>>
>> ===============
>>
>> and there, the dao.xml file..
>> <!DOCTYPE daoConfig
>> PUBLIC "-//ibatis.apache.org//DTD DAO Configuration 2.0//EN"
>> "http://localhost:8888/oci/dao-2.dtd">
>> <daoConfig>
>>     <context>
>>         <transactionManager type="SQLMAP">
>>             <property name="SqlMapConfigResource"
>>                 value="conf/SqlMapConfig.xml" />
>>         </transactionManager>
>>
>>                                          <!-- DOSSIERS-->
>>         <dao
>>
>> interface="fr.gouv.finances.douane.dnsce.oci.business.ibatis.dao.DossiersDAO
>> "
>>
>> implementation="fr.gouv.finances.douane.dnsce.oci.business.ibatis.dao.DossiersDAOImpl"
>> />
>>
>>                                         <!-- AGENTS -->
>>
>>         <dao
>>
>> interface="fr.gouv.finances.douane.dnsce.oci.business.ibatis.dao.AgentsDAO"
>>
>> implementation="fr.gouv.finances.douane.dnsce.oci.business.ibatis.dao.AgentsDAOImpl
>> " />
>>
>>                                         <!-- CARTES -->
>>         <dao
>>
>> interface="fr.gouv.finances.douane.dnsce.oci.business.ibatis.dao.Cartes01DAO
>> "
>>
>> implementation="fr.gouv.finances.douane.dnsce.oci.business.ibatis.dao.Cartes01DAOImpl"
>> />
>>         <dao
>>
>> interface="fr.gouv.finances.douane.dnsce.oci.business.ibatis.dao.Cartes02DAO
>> "
>>
>> implementation="fr.gouv.finances.douane.dnsce.oci.business.ibatis.dao.Cartes02DAOImpl"
>> />
>>         <dao
>>
>> interface="fr.gouv.finances.douane.dnsce.oci.business.ibatis.dao.Cartes03DAO
>> "
>>
>> implementation="fr.gouv.finances.douane.dnsce.oci.business.ibatis.dao.Cartes03DAOImpl"
>> />
>>         <dao
>>
>> interface="fr.gouv.finances.douane.dnsce.oci.business.ibatis.dao.Cartes05DAO
>> "
>>
>> implementation="fr.gouv.finances.douane.dnsce.oci.business.ibatis.dao.Cartes05DAOImpl"
>> />
>>         <dao
>>
>> interface="fr.gouv.finances.douane.dnsce.oci.business.ibatis.dao.Cartes20DAO
>> "
>>
>> implementation="fr.gouv.finances.douane.dnsce.oci.business.ibatis.dao.Cartes20DAOImpl"
>> />
>>         <dao
>>
>> interface="fr.gouv.finances.douane.dnsce.oci.business.ibatis.dao.Cartes21DAO
>> "
>>
>> implementation="fr.gouv.finances.douane.dnsce.oci.business.ibatis.dao.Cartes21DAOImpl"
>> />
>>         <dao
>>
>> interface="fr.gouv.finances.douane.dnsce.oci.business.ibatis.dao.Cartes22DAO
>> "
>>
>> implementation="fr.gouv.finances.douane.dnsce.oci.business.ibatis.dao.Cartes22DAOImpl"
>> />
>>         <dao
>>
>> interface="fr.gouv.finances.douane.dnsce.oci.business.ibatis.dao.Cartes4nDAO
>> "
>>
>> implementation="fr.gouv.finances.douane.dnsce.oci.business.ibatis.dao.Cartes4nDAOImpl"
>> />
>>         <dao
>>
>> interface="fr.gouv.finances.douane.dnsce.oci.business.ibatis.dao.Cartes9cDAO
>> "
>>
>> implementation="fr.gouv.finances.douane.dnsce.oci.business.ibatis.dao.Cartes9cDAOImpl"
>> />
>>         <dao
>>
>> interface="fr.gouv.finances.douane.dnsce.oci.business.ibatis.dao.Cartes9gDAO
>> "
>>
>> implementation="fr.gouv.finances.douane.dnsce.oci.business.ibatis.dao.Cartes9gDAOImpl"
>> />
>>
>>                                     <!-- INDEMNITES -->
>>         <dao
>>
>> interface="fr.gouv.finances.douane.dnsce.oci.business.ibatis.dao.IndemnitesDAO"
>>
>> implementation="fr.gouv.finances.douane.dnsce.oci.business.ibatis.dao.IndemnitesDAOImpl
>> " />
>>
>>                                     <!-- ECHELONS -->
>>         <dao
>>
>> interface="fr.gouv.finances.douane.dnsce.oci.business.ibatis.dao.EchelonsDAO"
>>
>> implementation="fr.gouv.finances.douane.dnsce.oci.business.ibatis.dao.EchelonsDAOImpl"
>> />
>>
>>                                     <!-- GRADES -->
>>         <dao
>>
>> interface="fr.gouv.finances.douane.dnsce.oci.business.ibatis.dao.GradesDAO"
>>
>> implementation="fr.gouv.finances.douane.dnsce.oci.business.ibatis.dao.GradesDAOImpl"
>> />
>>
>>                                     <!-- DIVISION -->
>>         <dao
>>
>> interface="fr.gouv.finances.douane.dnsce.oci.business.ibatis.dao.DivisionDAO"
>>
>> implementation="fr.gouv.finances.douane.dnsce.oci.business.ibatis.dao.DivisionDAOImpl"
>> />
>>
>>                                     <!-- UTILISATEURS -->
>>         <dao
>>
>> interface="fr.gouv.finances.douane.dnsce.oci.business.ibatis.dao.UtilisateursDAO"
>>
>> implementation="fr.gouv.finances.douane.dnsce.oci.business.ibatis.dao.UtilisateursDAOImpl
>> " />
>>
>>                                     <!-- HABILITATIONS -->
>>         <dao
>>
>> interface="fr.gouv.finances.douane.dnsce.oci.business.ibatis.dao.HabilitationsDAO
>> "
>>
>> implementation="fr.gouv.finances.douane.dnsce.oci.business.ibatis.dao.HabilitationsDAOImpl"
>> />
>>
>>                                         <!-- GESTIONNAIRES  -->
>>         <dao
>>
>> interface="fr.gouv.finances.douane.dnsce.oci.business.ibatis.dao.GestionnairesDAO"
>>
>> implementation="fr.gouv.finances.douane.dnsce.oci.business.ibatis.dao.GestionnairesDAOImpl
>> " />
>>
>>                                         <!-- LIBELLES   -->
>>         <dao
>>
>> interface="fr.gouv.finances.douane.dnsce.oci.business.ibatis.dao.LibellesDAO
>> "
>>
>> implementation="fr.gouv.finances.douane.dnsce.oci.business.ibatis.dao.LibellesDAOImpl"
>> />
>>                                         <!-- POSTES    -->
>>         <dao
>>
>> interface="fr.gouv.finances.douane.dnsce.oci.business.ibatis.dao.PostesDAO"
>>
>> implementation="fr.gouv.finances.douane.dnsce.oci.business.ibatis.dao.PostesDAOImpl"
>> />
>>                                         <!-- MEMOMODIFS    -->
>>         <dao
>>
>> interface="fr.gouv.finances.douane.dnsce.oci.business.ibatis.dao.MemoModifsDAO"
>>             implementation="
>> fr.gouv.finances.douane.dnsce.oci.business.ibatis.dao.MemoModifsDAOImpl"
>> />
>>                                         <!-- BATCHS -->
>>         <dao
>>
>> interface="fr.gouv.finances.douane.dnsce.oci.business.ibatis.dao.BatchsDAO
>> "
>>
>> implementation="fr.gouv.finances.douane.dnsce.oci.business.ibatis.dao.BatchsDAOImpl"
>> />
>>     </context>
>> </daoConfig>
>>
>>
>>
>>
>>
>> Leucht, Axel wrote:
>> >
>> > Looks like a syntax error to mw in one of you're XML files. Could you
>> post
>> > them here, especially your dao.xml?
>> >
>> > I often verify the syntax by opening it with Internet Explorer. Perhaps
>> > there is a simple typo in it?
>> >
>> > /Axel
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/unexpected-ExceptionInInitializerError-tf4771224.html#a13649180
>>
>> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/unexpected-ExceptionInInitializerError-tf4771224.html#a13649924
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


Mime
View raw message