Error occurred while loading SqlMap

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Error occurred while loading SqlMap

jmsandy
       
Good afternoon everyone!

I'm having problem with iBATIS. I am using reflection to create the assembly objects. But going on an error. It happens only in one class.

The error is as follows:

"\r\n- The error occurred while loading SqlMap.\r\n- loading type alias\r\n- The error occurred in <sqlMap resource=\"${root}Informix\\Configuration\\ElementType.xml\" xmlns=\"http://ibatis.apache.org/dataMapper\" />."}

Here is my sqlmap. What could be.

  <sqlMaps>
     ......
    <sqlMap resource="${root}Informix\Configuration\ElementType.xml" />
     ......
   </sqlMaps>

This my xml file(ElementType.XML):

<sqlMap namespace="ElementTypeEO" xmlns="http://ibatis.apache.org/mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <alias>
    <typeAlias alias="Base.EO.ConfigurationEO.ElementTypeEO.ElementTypeEO, Base" />
  </alias>
  <resultMaps>
    <resultMap id="MapElementTypeEO" class="ElementTypeEO">
      <result property="Id" column="id" />
      <result property="OtherObj.ID" column="id_other/>
    </resultMap>
  </resultMaps>


Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Error occurred while loading SqlMap

Michael McCurrey-3
A few things I see wrong.
1.  It looks like your putting the path to the type in the alias attribute, it should be in the type attribute
2.  It looks like you have a namespace & class the same (ie, ElementTypeEO is in there twice)?

3.  Something to change... is the class public with an parameter-less constructor?

"Base.EO.
ConfigurationEO.ElementTypeEO.ElementTypeEO,
Base"




On Tue, Oct 13, 2009 at 9:16 AM, jmsandy <[hidden email]> wrote:


Good afternoon everyone!

I'm having problem with iBATIS. I am using reflection to create the assembly
objects. But going on an error. It happens only in one class.

The error is as follows:

"\r\n- The error occurred while loading SqlMap.\r\n- loading type alias\r\n-
The error occurred in <sqlMap
resource=\"${root}Informix\\Configuration\\ElementType.xml\"
xmlns=\"http://ibatis.apache.org/dataMapper\" />."}

Here is my sqlmap. What could be.

 <sqlMaps>
    ......
   <sqlMap resource="${root}Informix\Configuration\ElementType.xml" />
    ......
  </sqlMaps>

This my xml file(ElementType.XML):

<sqlMap namespace="ElementTypeEO" xmlns="http://ibatis.apache.org/mapping"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <alias>
   <typeAlias alias="Base.EO.ConfigurationEO.ElementTypeEO.ElementTypeEO,
Base" />
 </alias>
 <resultMaps>
   <resultMap id="MapElementTypeEO" class="ElementTypeEO">
     <result property="Id" column="id" />
     <result property="OtherObj.ID" column="id_other/>
   </resultMap>
 </resultMaps>


Thanks.

--
View this message in context: http://www.nabble.com/Error-occurred-while-loading-SqlMap-tp25876018p25876018.html
Sent from the iBATIS - User - Cs mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]




--
Michael J. McCurrey
Read with me at http://www.mccurrey.com
http://chaoticmindramblings.blogspot.com/