com.ibatis.common.xml.NodeletException:
---------------------------------------
Key: IBATIS-248
URL: http://issues.apache.org/jira/browse/IBATIS-248
Project: iBatis for Java
Type: Bug
Components: SQL Maps
Reporter: Ajay
Hi, I'm getiing this error while working with Ibatis
Error occurred. Cause: com.ibatis.common.xml.NodeletException: Error parsing
XML. Cause: org.xml.sax.SAXParseException: Premature end of file.
Caused by: org.xml.sax.SAXParseException: Premature end of file.
Exception in thread "main" java.lang.ExceptionInInitializerError
at
au.com.rejectshop.tp.database.TRSROSEngineDatabase.<clinit>(TRSROSEngineDatabase.java:40)
at
au.com.rejectshop.tp.TRSTPPayCalculator.getWagesByRosterId(TRSTPPayCalculator.java:43)
at
au.com.rejectshop.tp.TestPayCalculator.main(TestPayCalculator.java:22)
Caused by: java.lang.RuntimeException
at
au.com.rejectshop.tp.database.TRSTPSQLConfigGeneral.<clinit>(TRSTPSQLConfigGeneral.java:48)
... 3 more
My SQL MAP xml file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN"
"http://www.ibatis.com/dtd/sql-map-config-2.dtd">
<sqlMapConfig>
<transactionManager type="JDBC">
<dataSource type="SIMPLE">
<property name="JDBC.Driver"
value="net.sourceforge.jtds.jdbc.Driver"/>
<property name="JDBC.ConnectionURL"
value="jdbc:jtds:sqlserver://SSC-IBM-IT-03:1433/TRSROSGeneral"/>
<property name="JDBC.Username" value="*****"/>
<property name="JDBC.Password" value="******"/>
</dataSource>
</transactionManager>
<sqlMap resource="TRSROS/ROSRoster/config/DB/sqlMap.xml" />
</sqlMapConfig>
sqlMap.xml is
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN"
"http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="Roster">
<!-- Select Roster for the given Roster Id -->
<select id="selectRoster"
resultClass="au.com.rejectshop.tp.model.TRSTPRosterInstance">
SELECT roster.locationId, roster.weekEndingCalendarId
FROM TRSPortal.dbo.roster
WHERE roster.rosterId = #id#
</select>
<!-- Select RosterShifts for the given Roster Id -->
<select id="selectRosterShiftIds"
resultClass="au.com.rejectshop.tp.model.TRSTPRosterShiftInstance">
SELECT rosterShiftId, employeeId, rosterDayId,
shiftType, startTime, endTime, startHour,
startMinute, endHour, endMinute, activityCode, cost
FROM TRSPortal.dbo.rosterShift
WHERE rosterShift.rosterId = #id#
</select>
<!-- Select Employee for the given EmployeeId -->
<select id = "selectEmployeeId"
resultClass="au.com.rejectshop.tp.model.TRSTPEmployeeInstance">
SELECT employeeCode, homeStoreCode, templateCode,
gradeCode, stdRate, terminatedInd
FROM TRSPortal.dbo.employee
WHERE employee.employeeId = #id#
</select>
</sqlMap>
Its been now long that I'm trying to solve this issue but no result.
Please help
Thanks a ton.
Ajay
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira