Hi all,

Hoping someone can help me with a JNLP issue which I am running into
via the portal.

We are retrieving a JNLP from the SDS via HttpUnit calls and then
parsing the response using JDom (ie.
org.jdom.input.SAXBuilder.builder.build(responseStream))

The body of the response is as follows (but I've removed the text
within the <body> element because it is really long.

<jnlp>
  <name>d fault</name>
  <last-modified>Fri Feb 23 10:40:02 -0500 2007</last-modified>
  <body></body>
  <portal-id>4</portal-id>
<url>http://www.encorewiki.org/download/attachments/2113/converted-
wise-dev.berkeley.edu-16704.jar</url>
  <id>528</id>
  <filename>converted-wise-dev.berkeley.edu-16704.jar</filename>
  <always-update nil="true"></always-update>
</jnlp>

The problem I am finding is that I'm getting a Parse Exception (see
below) due to invalid xml characters in the JNLP body. Does that mean
that there is a cntl-C (unicode: 0x3) in the JNLP and if so, how is it
getting there?

Any ideas how I can handle this?

Laurel

org.jdom.input.JDOMParseException: Error on line 5: An invalid XML
character (Unicode: 0x3) was found in the element content of the
document.
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:468)
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:770)
        at
net.sf.sail.webapp.junit.AbstractSpringHttpUnitTests.createDocumentFromResponse(AbstractSpringHttpUnitTests.java:
93)
        at
net.sf.sail.webapp.junit.AbstractSpringHttpUnitTests.getJnlpInSds(AbstractSpringHttpUnitTests.java:
193)
        at
net.sf.sail.webapp.dao.sds.impl.HttpRestSdsJnlpDaoTest.testUpdateJnlp(HttpRestSdsJnlpDaoTest.java:
102)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at junit.framework.TestCase.runTest(TestCase.java:164)
        at junit.framework.TestCase.runBare(TestCase.java:130)
        at
org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:
69)
        at junit.framework.TestResult$1.protect(TestResult.java:106)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.framework.TestResult.run(TestResult.java:109)
        at junit.framework.TestCase.run(TestCase.java:120)
        at junit.framework.TestSuite.runTest(TestSuite.java:230)
        at junit.framework.TestSuite.run(TestSuite.java:225)
        at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:
128)
        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: org.xml.sax.SAXParseException: An invalid XML character
(Unicode: 0x3) was found in the element content of the document.
        at
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:
1183)
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:453)
        ... 23 more
Caused by: org.xml.sax.SAXParseException: An invalid XML character
(Unicode: 0x3) was found in the element content of the document.
        at
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:
1183)
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:453)
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:770)
        at
net.sf.sail.webapp.junit.AbstractSpringHttpUnitTests.createDocumentFromResponse(AbstractSpringHttpUnitTests.java:
93)
        at
net.sf.sail.webapp.junit.AbstractSpringHttpUnitTests.getJnlpInSds(AbstractSpringHttpUnitTests.java:
193)
        at
net.sf.sail.webapp.dao.sds.impl.HttpRestSdsJnlpDaoTest.testUpdateJnlp(HttpRestSdsJnlpDaoTest.java:
102)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at junit.framework.TestCase.runTest(TestCase.java:164)
        at junit.framework.TestCase.runBare(TestCase.java:130)
        at
org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:
69)
        at junit.framework.TestResult$1.protect(TestResult.java:106)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.framework.TestResult.run(TestResult.java:109)
        at junit.framework.TestCase.run(TestCase.java:120)
        at junit.framework.TestSuite.runTest(TestSuite.java:230)
        at junit.framework.TestSuite.run(TestSuite.java:225)
        at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:
128)
        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)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SAIL-Dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/SAIL-Dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to