ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Maves <Nathan.Ma...@Sun.COM>
Subject Type Handler Exception in xml parser
Date Tue, 04 Jan 2005 16:49:05 GMT
Here is the error..

Exception in thread "main" java.lang.ExceptionInInitializerError
     at  
reporting.viewer.service.ReportService.<init>(ReportService.java:30)
     at  
reporting.viewer.service.ReportService.<clinit>(ReportService.java:26)
     at reporting.viewer.util.DataBaseLoader.main(DataBaseLoader.java:27)
Caused by: com.ibatis.dao.client.DaoException: Error while configuring  
DaoManager.  Cause: java.lang.RuntimeException: Error occurred.  Cause:  
com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:  
org.xml.sax.SAXParseException: Element "sqlMapConfig" does not allow  
"typeHandler" here.
Caused by: org.xml.sax.SAXParseException: Element "sqlMapConfig" does  
not allow "typeHandler" here.
Caused by: java.lang.RuntimeException: Error occurred.  Cause:  
com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:  
org.xml.sax.SAXParseException: Element "sqlMapConfig" does not allow  
"typeHandler" here.
Caused by: org.xml.sax.SAXParseException: Element "sqlMapConfig" does  
not allow "typeHandler" here.
     at  
com.ibatis.dao.engine.builder.xml.XmlDaoManagerBuilder.buildDaoManager(X 
mlDaoManagerBuilder.java:126)
     at  
com.ibatis.dao.client.DaoManagerBuilder.buildDaoManager(DaoManagerBuilde 
r.java:59)
     at reporting.viewer.dao.DaoConfig.<clinit>(DaoConfig.java:35)
     ... 3 more
Caused by: java.lang.RuntimeException: Error occurred.  Cause:  
com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:  
org.xml.sax.SAXParseException: Element "sqlMapConfig" does not allow  
"typeHandler" here.
Caused by: org.xml.sax.SAXParseException: Element "sqlMapConfig" does  
not allow "typeHandler" here.
     at  
com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConf 
igParser.java:80)
     at  
com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConf 
igParser.java:68)
     at  
com.ibatis.sqlmap.client.SqlMapClientBuilder.buildSqlMapClient(SqlMapCli 
entBuilder.java:78)
     at  
com.ibatis.dao.engine.transaction.sqlmap.SqlMapDaoTransactionManager.con 
figure(SqlMapDaoTransactionManager.java:52)
     at  
com.ibatis.dao.engine.builder.xml.XmlDaoManagerBuilder.parseTransactionM 
anager(XmlDaoManagerBuilder.java:190)
     at  
com.ibatis.dao.engine.builder.xml.XmlDaoManagerBuilder.parseContext(XmlD 
aoManagerBuilder.java:154)
     at  
com.ibatis.dao.engine.builder.xml.XmlDaoManagerBuilder.buildDaoManager(X 
mlDaoManagerBuilder.java:99)
     ... 5 more
Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML.   
Cause: org.xml.sax.SAXParseException: Element "sqlMapConfig" does not  
allow "typeHandler" here.
Caused by: org.xml.sax.SAXParseException: Element "sqlMapConfig" does  
not allow "typeHandler" here.
     at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:51)
     at  
com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConf 
igParser.java:77)
     ... 11 more
Caused by: org.xml.sax.SAXParseException: Element "sqlMapConfig" does  
not allow "typeHandler" here.
     at org.apache.crimson.parser.Parser2.error(Parser2.java:3354)
     at  
org.apache.crimson.parser.ValidatingParser$ChildrenValidator.consume(Val 
idatingParser.java:349)
     at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1497)
     at org.apache.crimson.parser.Parser2.content(Parser2.java:1963)
     at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1691)
     at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:667)
     at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)
     at  
org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
     at  
org.apache.crimson.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.ja 
va:185)
     at  
com.ibatis.common.xml.NodeletParser.createDocument(NodeletParser.java: 
148)
     at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:48)
     ... 12 more
Java Result: 1
BUILD SUCCESSFUL (total time: 1 second)

here is the sqlMapConfig file...

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config  
2.0//EN" "http://www.ibatis.com/dtd/sql-map-config-2.dtd">

<sqlMapConfig>
   <settings
     cacheModelsEnabled="true"
     enhancementEnabled="true"
     maxSessions="64"
     maxTransactions="8"
     maxRequests="128"
     useStatementNamespaces="false"/>

   <transactionManager type="JDBC">
     <dataSource type="SIMPLE">
             <property name="JDBC.Driver"  
value="oracle.jdbc.driver.OracleDriver"/>
             <property name="JDBC.ConnectionURL"  
value="jdbc:oracle:thin:@oradevdb1.central.sun.com:1541:DEVLAM"/>
             <!--<property name="JDBC.ConnectionURL"  
value="jdbc:oracle:thin:@datastore.central.sun.com:1525:UBRRPTAM"/>-->
             <property name="JDBC.Username" value="WEBAPPS_APP"/>
             <property name="JDBC.Password" value="WEBAPPS_APP"/>
             <!--Optional Properties -->
             <property name="Pool.MaximumActiveConnections" value="20"/>
             <property name="Pool.MaximumIdleConnections" value="3"/>
         </dataSource>
   </transactionManager>

   <typeHandler javaType="reporting.viewer.domain.Frequency"  
callback="reporting.viewer.dao.ibatis.FrequencyTypeHandler"/>

   <sqlMap  
resource="reporting/viewer/dao/ibatis/mapping/View_History.xml"/>
   <sqlMap resource="reporting/viewer/dao/ibatis/mapping/Viewer.xml"/>
   <sqlMap resource="reporting/viewer/dao/ibatis/mapping/Report.xml"/>
   <sqlMap  
resource="reporting/viewer/dao/ibatis/mapping/ArchiveReport.xml"/>
   <sqlMap resource="reporting/viewer/dao/ibatis/mapping/User.xml"/>

</sqlMapConfig>


Mime
View raw message