Return-Path: Delivered-To: apmail-ibatis-dev-archive@www.apache.org Received: (qmail 25995 invoked from network); 7 Apr 2008 13:17:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Apr 2008 13:17:10 -0000 Received: (qmail 60839 invoked by uid 500); 7 Apr 2008 13:17:09 -0000 Delivered-To: apmail-ibatis-dev-archive@ibatis.apache.org Received: (qmail 60825 invoked by uid 500); 7 Apr 2008 13:17:09 -0000 Mailing-List: contact dev-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ibatis.apache.org Delivered-To: mailing list dev@ibatis.apache.org Received: (qmail 60809 invoked by uid 99); 7 Apr 2008 13:17:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Apr 2008 06:17:09 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Apr 2008 13:16:25 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id AB10D234C0C0 for ; Mon, 7 Apr 2008 06:14:24 -0700 (PDT) Message-ID: <1537682329.1207574064699.JavaMail.jira@brutus> Date: Mon, 7 Apr 2008 06:14:24 -0700 (PDT) From: "Clinton Begin (JIRA)" To: dev@ibatis.apache.org Subject: [jira] Closed: (IBATIS-500) Failure when using maxRequests in settings and misleading error message In-Reply-To: <883270615.1207563624820.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/IBATIS-500?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Clinton Begin closed IBATIS-500. -------------------------------- Resolution: Won't Fix while unintentional, it is a good thing. > 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.DOMParser.parse(DOMParser.java:250) > at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:292) > at com.ibatis.common.xml.NodeletParser.createDocument(NodeletParser.java:189) > at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:59) > ... 40 more > {noformat} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.