|
[xstream-dev] [jira] Commented: (XSTR-71) xstream.fromXML() requires XPP3 w: msg#00016java.xstream.devel
The following comment has been added to this issue: Author: Gr?gory Joseph Created: Thu, 22 Jul 2004 7:15 PM Body: Well, the exception tells you what to do, doesn't it? I think optional means just that, you have the option not to use. (I personnaly prefer that over a failover scenario where xstream would use the DomDriver if it doesn't find xpp) --------------------------------------------------------------------- View this comment: http://jira.codehaus.org/browse/XSTR-71?page=comments#action_22121 --------------------------------------------------------------------- View the issue: http://jira.codehaus.org/browse/XSTR-71 Here is an overview of the issue: --------------------------------------------------------------------- Key: XSTR-71 Summary: xstream.fromXML() requires XPP3 where xstream.toXML doesn't Type: Bug Status: Unassigned Priority: Major Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: XStream Versions: 1.0 Assignee: Reporter: Jacob Kjome Created: Sun, 16 May 2004 3:40 AM Updated: Thu, 22 Jul 2004 7:15 PM Description: Now that the default driver for new XStream() is the XppDriver, there seems to be a dependency on the XPP3 library in the xstream.fromXML(String) method. However, according to the commit comment of XStream.java, revision 1.42, XPP3 should still be optional... "Default XStream constructor uses XPP3. Updated docs to recommend including this jar (although it is still optional)" The dependency is apparent in the XStreamSerializationTestCase.java, revision 1.1, in the Picocontainer CVS. http://cvs.picocontainer.codehaus.org/java/picocontainer/src/test/org/picocontainer/defaults/XStreamSerialisationTestCase.java In it, new XStream() is used, implicitly using the XppDriver (although an explicit DomDriver has been used in revision 1.2 to avoid this problem). Here's the error... Testcase: testShouldBeAbleToSerialiseEmptyPico(org.picocontainer.defaults.XStreamSerialisationTestCase): Caused an ERROR XPP3 pull parser library not present. Specify another driver. For example: new XStream(new DomDriver()) java.lang.IllegalArgumentException: XPP3 pull parser library not present. Specify another driver. For example: new XStream(new DomDriver()) at com.thoughtworks.xstream.io.xml.XppDriver.createReader(Unknown Source) at com.thoughtworks.xstream.XStream.fromXML(Unknown Source) at com.thoughtworks.xstream.XStream.fromXML(Unknown Source) at org.picocontainer.defaults.XStreamSerialisationTestCase.testShouldBeAbleToSerialiseEmptyPico(XStreamSerialisationTestCase.java:20) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) So, it looks as if the XPP3 library is required. I would think that XStream would fall back to the DomDriver if XPP3 doesn't exist in the classpath. Jake --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [xstream-dev] [jira] Closed: (XSTR-87) Field names cannot contain $ chars, jira-yCVjj/EcxBJg9hUCZPvPmw |
|---|---|
| Next by Date: | [xstream-dev] [jira] Closed: (XSTR-100) Cannot deserialize DefaultStyledDocument, jira-yCVjj/EcxBJg9hUCZPvPmw |
| Previous by Thread: | [xstream-dev] [jira] Closed: (XSTR-87) Field names cannot contain $ chars, jira-yCVjj/EcxBJg9hUCZPvPmw |
| Next by Thread: | [xstream-dev] Re: was : [xstream-user] DefaultStyledDocument deserialization problem, greg_greg-HLx8PRj2pn30Br+ELjv3iA@xxxxxxxxxxxxxxxx |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |