I'm upgrading from iBatis 2.x to myBatis 3.0.6 and I have a mapper file which includes an external entity as follows:
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"
[
<!ENTITY rating_analysis_state_cases SYSTEM "classpath://ibatis/includes/rating_analysis_state_cases.sql">
]>
Under iBatis this used to work fine.
The only structural change I've made is that I changed the ibatis folder to mybatis.
However when I now run it I get the following exception/stacktrace:
Caused By: java.net.MalformedURLException: unknown protocol: classpath
at java.net.URL.<init>(URL.java:574)
at java.net.URL.<init>(URL.java:464)
at java.net.URL.<init>(URL.java:413)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:650)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:1315)
Has anyone got any idea as to whether something's changed that I might not know about?
Is classpath then not a known protocol? If not, what protocol could I use and how?