[jira] Commented: (IBATIS-500) Failure when using maxRequests in settings and misleading error message

2008-04-07 Thread Clinton Begin (JIRA)

[ 
https://issues.apache.org/jira/browse/IBATIS-500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12586386#action_12586386
 ] 

Clinton Begin commented on IBATIS-500:
--

Actually changed my mind.  I will re-add them to the DTD for backward 
compatibility.  And I'll trap the usage and create warnings or possibly errors.

The errors you're seeing are general SAX parser errors.  They're complaining 
because the attributes aren't/weren't declared in the DTD.

I've found 3 minor things in 2.3.1 that together may warrant a 2.3.1.1 or 2.3.2 
release.

Cheers,
Clinton

> Failure when using maxRequests in settings and misleading error message
> ---
>
> Key: IBATIS-500
> URL: https://issues.apache.org/jira/browse/IBATIS-500
> Project: iBatis for Java
>  Issue Type: Bug
>Affects Versions: 2.3.1
>Reporter: Stephane Bailliez
>
> Putting that as major even though it is trivial since it affects migration 
> and I guess users would scratch their head a bit more than necessary.
> Upgrade from 2.1.7 which had a sqlmap config with settings:
> {noformat}
>  cacheModelsEnabled="true"
> enhancementEnabled="false"
> lazyLoadingEnabled="false"
> maxRequests="512"
> maxSessions="128"
> maxTransactions="32"
> useStatementNamespaces="true"
> errorTracingEnabled="true"
> />
> {noformat}
> And got an error message that led me scratching my head for a while until I 
> digged in the source code to figure out it was no more used. But the message 
> is terribly misleading ( 'Attribute "maxRequests" must be declared for 
> element type "settings".)
> Removing maxRequests, maxSession, maxTransactions from the settings solves 
> the problem.
> {noformat}
> Caused by: java.lang.RuntimeException: Error occurred.  Cause: 
> com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: 
> org.xml.sax.SAXParseException: Attribute "maxRequests" must be declared for 
> element type "settings".
>   at 
> com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:65)
>   at 
> com.ibatis.sqlmap.client.SqlMapClientBuilder.buildSqlMapClient(SqlMapClientBuilder.java:90)
>   at 
> org.springframework.orm.ibatis.SqlMapClientFactoryBean.buildSqlMapClient(SqlMapClientFactoryBean.java:326)
>   at 
> org.springframework.orm.ibatis.SqlMapClientFactoryBean.afterPropertiesSet(SqlMapClientFactoryBean.java:280)
>   at 
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1333)
>   at 
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1299)
>   ... 34 more
> Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: 
> org.xml.sax.SAXParseException: Attribute "maxRequests" must be declared for 
> element type "settings".
>   at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:62)
>   at 
> com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:62)
>   ... 39 more
> Caused by: org.xml.sax.SAXParseException: Attribute "maxRequests" must be 
> declared for element type "settings".
>   at 
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
>   at 
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:172)
>   at 
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:382)
>   at 
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
>   at 
> com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.addDTDDefaultAttrsAndValidate(XMLDTDValidator.java:1306)
>   at 
> com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.handleStartElement(XMLDTDValidator.java:1971)
>   at 
> com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.emptyElement(XMLDTDValidator.java:816)
>   at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:872)
>   at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1693)
>   at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
>   at 
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
>   at 
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
>  

[jira] Commented: (IBATIS-500) Failure when using maxRequests in settings and misleading error message

2008-04-07 Thread Stephane Bailliez (JIRA)

[ 
https://issues.apache.org/jira/browse/IBATIS-500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12586384#action_12586384
 ] 

Stephane Bailliez commented on IBATIS-500:
--

I agree with the 'remove' but the error message is a bit weird.

"Attribute "maxRequests" must be declared for element type "settings"."

Shouldn't it be something like "Attribute "maxRequests" is invalid for element 
type "settings"." ?

> Failure when using maxRequests in settings and misleading error message
> ---
>
> Key: IBATIS-500
> URL: https://issues.apache.org/jira/browse/IBATIS-500
> Project: iBatis for Java
>  Issue Type: Bug
>Affects Versions: 2.3.1
>Reporter: Stephane Bailliez
>
> Putting that as major even though it is trivial since it affects migration 
> and I guess users would scratch their head a bit more than necessary.
> Upgrade from 2.1.7 which had a sqlmap config with settings:
> {noformat}
>  cacheModelsEnabled="true"
> enhancementEnabled="false"
> lazyLoadingEnabled="false"
> maxRequests="512"
> maxSessions="128"
> maxTransactions="32"
> useStatementNamespaces="true"
> errorTracingEnabled="true"
> />
> {noformat}
> And got an error message that led me scratching my head for a while until I 
> digged in the source code to figure out it was no more used. But the message 
> is terribly misleading ( 'Attribute "maxRequests" must be declared for 
> element type "settings".)
> Removing maxRequests, maxSession, maxTransactions from the settings solves 
> the problem.
> {noformat}
> Caused by: java.lang.RuntimeException: Error occurred.  Cause: 
> com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: 
> org.xml.sax.SAXParseException: Attribute "maxRequests" must be declared for 
> element type "settings".
>   at 
> com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:65)
>   at 
> com.ibatis.sqlmap.client.SqlMapClientBuilder.buildSqlMapClient(SqlMapClientBuilder.java:90)
>   at 
> org.springframework.orm.ibatis.SqlMapClientFactoryBean.buildSqlMapClient(SqlMapClientFactoryBean.java:326)
>   at 
> org.springframework.orm.ibatis.SqlMapClientFactoryBean.afterPropertiesSet(SqlMapClientFactoryBean.java:280)
>   at 
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1333)
>   at 
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1299)
>   ... 34 more
> Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: 
> org.xml.sax.SAXParseException: Attribute "maxRequests" must be declared for 
> element type "settings".
>   at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:62)
>   at 
> com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:62)
>   ... 39 more
> Caused by: org.xml.sax.SAXParseException: Attribute "maxRequests" must be 
> declared for element type "settings".
>   at 
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
>   at 
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:172)
>   at 
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:382)
>   at 
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
>   at 
> com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.addDTDDefaultAttrsAndValidate(XMLDTDValidator.java:1306)
>   at 
> com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.handleStartElement(XMLDTDValidator.java:1971)
>   at 
> com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.emptyElement(XMLDTDValidator.java:816)
>   at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:872)
>   at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1693)
>   at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
>   at 
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
>   at 
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
>   at 
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
>   at 
> com.sun.org.apache.xerces.internal.parsers.

[jira] Commented: (IBATIS-500) Failure when using maxRequests in settings and misleading error message

2008-04-07 Thread Clinton Begin (JIRA)

[ 
https://issues.apache.org/jira/browse/IBATIS-500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12586378#action_12586378
 ] 

Clinton Begin commented on IBATIS-500:
--

That's a really weird error... all three of those settings have been deprecated 
and no longer do anything.  I thought I left them in the DTD for backward 
compatibility, but looking through the logs, I did indeed remove them.  While 
harsh, this is actually a good thing... :-/

I'll send a note to the list and close this issue.

> Failure when using maxRequests in settings and misleading error message
> ---
>
> Key: IBATIS-500
> URL: https://issues.apache.org/jira/browse/IBATIS-500
> Project: iBatis for Java
>  Issue Type: Bug
>Affects Versions: 2.3.1
>Reporter: Stephane Bailliez
>
> Putting that as major even though it is trivial since it affects migration 
> and I guess users would scratch their head a bit more than necessary.
> Upgrade from 2.1.7 which had a sqlmap config with settings:
> {noformat}
>  cacheModelsEnabled="true"
> enhancementEnabled="false"
> lazyLoadingEnabled="false"
> maxRequests="512"
> maxSessions="128"
> maxTransactions="32"
> useStatementNamespaces="true"
> errorTracingEnabled="true"
> />
> {noformat}
> And got an error message that led me scratching my head for a while until I 
> digged in the source code to figure out it was no more used. But the message 
> is terribly misleading ( 'Attribute "maxRequests" must be declared for 
> element type "settings".)
> Removing maxRequests, maxSession, maxTransactions from the settings solves 
> the problem.
> {noformat}
> Caused by: java.lang.RuntimeException: Error occurred.  Cause: 
> com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: 
> org.xml.sax.SAXParseException: Attribute "maxRequests" must be declared for 
> element type "settings".
>   at 
> com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:65)
>   at 
> com.ibatis.sqlmap.client.SqlMapClientBuilder.buildSqlMapClient(SqlMapClientBuilder.java:90)
>   at 
> org.springframework.orm.ibatis.SqlMapClientFactoryBean.buildSqlMapClient(SqlMapClientFactoryBean.java:326)
>   at 
> org.springframework.orm.ibatis.SqlMapClientFactoryBean.afterPropertiesSet(SqlMapClientFactoryBean.java:280)
>   at 
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1333)
>   at 
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1299)
>   ... 34 more
> Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: 
> org.xml.sax.SAXParseException: Attribute "maxRequests" must be declared for 
> element type "settings".
>   at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:62)
>   at 
> com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:62)
>   ... 39 more
> Caused by: org.xml.sax.SAXParseException: Attribute "maxRequests" must be 
> declared for element type "settings".
>   at 
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
>   at 
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:172)
>   at 
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:382)
>   at 
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
>   at 
> com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.addDTDDefaultAttrsAndValidate(XMLDTDValidator.java:1306)
>   at 
> com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.handleStartElement(XMLDTDValidator.java:1971)
>   at 
> com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.emptyElement(XMLDTDValidator.java:816)
>   at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:872)
>   at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1693)
>   at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
>   at 
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
>   at 
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
>   at 
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(