Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 25631 invoked from network); 24 Jul 2007 16:38:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Jul 2007 16:38:15 -0000 Received: (qmail 73287 invoked by uid 500); 24 Jul 2007 16:38:14 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 73273 invoked by uid 500); 24 Jul 2007 16:38:14 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 73262 invoked by uid 99); 24 Jul 2007 16:38:14 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Jul 2007 09:38:14 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Jul 2007 09:38:12 -0700 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1IDNOR-0004BT-Os for user-java@ibatis.apache.org; Tue, 24 Jul 2007 09:37:51 -0700 Message-ID: <11767145.post@talk.nabble.com> Date: Tue, 24 Jul 2007 09:37:51 -0700 (PDT) From: coolfire To: user-java@ibatis.apache.org Subject: Re: jUnit test, NodeletException In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: Marco_KE@web.de References: <11759754.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org Ok, thanks. I changed the SqlMapConfig.xml to this: but I still get this error. Do you have further ideas? Marco Larry Meadors-2 wrote: > > 9 times out of 10, that is due to weird errors in your XML file - line > feeds, etc. > > You can either start with a bare-bones file and build it back up, or > trying to remove (by deleting content, not commenting it out) until it > works, then add stuff back in until it either works, or you have > isolated the issue. Comments will most likely just make more of a > mess. > > Larry > > > On 7/24/07, coolfire wrote: >> >> Hi all, >> i' trying to perform a simple JUnit Test, but without success. >> I'm using Eclipse 3.2, iBatis 2.3.0, jre 1.5.0_09 and jUnit 4.3.1. >> The error occurs in SqlMapClientBuilder.buildSqlMapClient(reader); >> >> java.lang.RuntimeException: Error occurred. Cause: >> com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: >> org.xml.sax.SAXParseException: Content is not allowed in prolog. >> at >> com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:89) >> at >> com.ibatis.sqlmap.client.SqlMapClientBuilder.buildSqlMapClient(SqlMapClientBuilder.java:63) >> at >> com.eternity.bugtracking.IBatisConnection.(IBatisConnection.java:16) >> at >> com.eternity.bugtracking.src.business.persister.JUnitProjects.insertProject(JUnitProjects.java:17) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) >> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) >> at java.lang.reflect.Method.invoke(Unknown Source) >> at >> org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99) >> at >> org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81) >> at >> org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34) >> at >> org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75) >> at >> org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45) >> at >> org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66) >> at >> org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35) >> at >> org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42) >> at >> org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34) >> at >> org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52) >> at >> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38) >> at >> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) >> at >> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) >> at >> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) >> at >> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) >> at >> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) >> Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML. >> Cause: >> org.xml.sax.SAXParseException: Content is not allowed in prolog. >> at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:53) >> at >> com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:86) >> ... 23 more >> Caused by: org.xml.sax.SAXParseException: Content is not allowed in >> prolog. >> at >> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown >> Source) >> at >> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown >> Source) >> at >> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown >> Source) >> at >> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown >> Source) >> at >> com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown >> Source) >> at >> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(Unknown >> Source) >> at >> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown >> Source) >> at >> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown >> Source) >> at >> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown >> Source) >> at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown >> Source) >> at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown >> Source) >> at >> com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown >> Source) >> at >> com.ibatis.common.xml.NodeletParser.createDocument(NodeletParser.java:157) >> at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:50) >> ... 24 more >> >> ---------------------------------- >> >> here my SqlMap config file: >> >> >> >> > PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN" >> "http://ibatis.apache.org/dtd/sql-map-config-2.dtd"> >> >> >> >> >> >> >> >> >> >> >> >> >> > cacheModelsEnabled="true" >> enhancementEnabled="true" >> lazyLoadingEnabled="true" >> maxRequests="32" >> maxSessions="10" >> maxTransactions="5" >> useStatementNamespaces="false" >> /> >> >> > type="com.eternity.bugtracking.src.business.bean.Projects"/> >> > type="com.eternity.bugtracking.src.business.bean.ProjectsModules"/> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> thanks for your help >> Marco >> >> -- >> View this message in context: >> http://www.nabble.com/jUnit-test%2C-NodeletException-tf4134769.html#a11759754 >> Sent from the iBATIS - User - Java mailing list archive at Nabble.com. >> >> > > -- View this message in context: http://www.nabble.com/jUnit-test%2C-NodeletException-tf4134769.html#a11767145 Sent from the iBATIS - User - Java mailing list archive at Nabble.com.