i'm using MybBatis and i'm getting a ClassNotFound error which is in an exnternal project, and i'm using that class in the resultMap in one Mapper.xml file.
This is my code:
-Mapper.xml: I will only put the resultMapAquí solo colocaré el resultMap, as is the place where i'm getting problems.
<resultMap id="BaseResultMapGeneralConfig" type="classpath:com.iecisa.tecdoc.sirene.common.types.GeneralConfig">
<id column="id" jdbcType="NUMERIC" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="value" jdbcType="VARCHAR" property="value" />
<result column="type" jdbcType="NUMERIC" property="type" />
</resultMap>
Note that "type=com.etc...." is the Class in external proyect.
-The error code i'm getting:
Struts has detected an unhandled exception:
Messages:
Cannot find class: classpath:com.iecisa.tecdoc.sirene.common.types.GeneralConfig
Could not resolve type alias 'classpath:com.iecisa.tecdoc.sirene.common.types.GeneralConfig'. Cause: java.lang.ClassNotFoundException: Cannot find class: classpath:com.iecisa.tecdoc.sirene.common.types.GeneralConfig
Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'classpath:com.iecisa.tecdoc.sirene.common.types.GeneralConfig'. Cause: java.lang.ClassNotFoundException: Cannot find class: classpath:com.iecisa.tecdoc.sirene.common.types.GeneralConfig
Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'classpath:com.iecisa.tecdoc.sirene.common.types.GeneralConfig'. Cause: java.lang.ClassNotFoundException: Cannot find class: classpath:com.iecisa.tecdoc.sirene.common.types.GeneralConfig
Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'classpath:com.iecisa.tecdoc.sirene.common.types.GeneralConfig'. Cause: java.lang.ClassNotFoundException: Cannot find class: classpath:com.iecisa.tecdoc.sirene.common.types.GeneralConfig
### Error building SqlSession. ### The error may exist in com/iecisa/tecdoc/sirene/db/map/SireneConfigMapper.xml ### The error occurred while processing mapper_resultMap[BaseResultMapGeneralConfig] ### Cause: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'classpath:com.iecisa.tecdoc.sirene.common.types.GeneralConfig'. Cause: java.lang.ClassNotFoundException: Cannot find class: classpath:com.iecisa.tecdoc.sirene.common.types.GeneralConfig
Error inicializando SqlSession. Causa: org.apache.ibatis.exceptions.PersistenceException: ### Error building SqlSession. ### The error may exist in com/iecisa/tecdoc/sirene/db/map/SireneConfigMapper.xml ### The error occurred while processing mapper_resultMap[BaseResultMapGeneralConfig] ### Cause: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'classpath:com.iecisa.tecdoc.sirene.common.types.GeneralConfig'. Cause: java.lang.ClassNotFoundException: Cannot find class: classpath:com.iecisa.tecdoc.sirene.common.types.GeneralConfig
Error creando SqlSession: java.lang.RuntimeException: Error inicializando SqlSession. Causa: org.apache.ibatis.exceptions.PersistenceException: ### Error building SqlSession. ### The error may exist in com/iecisa/tecdoc/sirene/db/map/SireneConfigMapper.xml ### The error occurred while processing mapper_resultMap[BaseResultMapGeneralConfig] ### Cause: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'classpath:com.iecisa.tecdoc.sirene.common.types.GeneralConfig'. Cause: java.lang.ClassNotFoundException: Cannot find class: classpath:com.iecisa.tecdoc.sirene.common.types.GeneralConfig
I already added the external proyect in my main proyect in the Projects tab on Java Build Path and i also checked the external project check on Order and Export tab.
I tried differents ways, like put the class without the "classpath:", i didn't find the way to solve it.
Any idea? I did some mistake?
Thanks for the help!