Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

The entity name must immediately follow the '&' in the entity reference (?)

843834Apr 2 2003 — edited Apr 4 2003
            JAXBContext jc = JAXBContext.newInstance( "my.package.jaxb" );
            Unmarshaller u = jc.createUnmarshaller();

            rs = (ResultSet)u.unmarshal(url);
The code above works fine if I try to unmarshal my servlet http://mydomain.com/servlet/q=blabla

but when I add another parameter, like this;
http://mydomain.com/servlet/q=blabla&p=blbabla
I get this error:
DefaultValidationEventHandler: [FATAL_ERROR]: The entity name must immediately follow the '&' in the entity reference.
org.xml.sax.SAXParseException: The entity name must immediately follow the '&' in the entity reference.
	at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1162)
	at com.sun.xml.bind.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:139)
	at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:129)
	at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:134)
	at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:138)
DefaultValidationEventHandler: [FATAL_ERROR]: The entity name must immediately follow the '&' in the entity reference.
org.xml.sax.SAXParseException: The entity name must immediately follow the '&' in the entity reference.
	at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1162)
	at com.sun.xml.bind.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:139)
	at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:129)
	at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:134)
	at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:138)
(...)
Any clues?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 2 2003
Added on Apr 2 2003
4 comments
722 views