Skip to Main Content

Java Programming

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.

807589Dec 5 2008 — edited Dec 7 2008
Hello Group,

I have been receiving below such org.xml.sax.SAXParseException exceptions.

Could you anyone please advise me what could be the reason for these issues and any probable solution thereby.

NOTE:

Eg1: Below string is causing error:

USER Given: funnicity is funny. isn't it. true. well go to "funnicity" today.

Escaped String : funnicity is funny. isn't it. true. well go to "funnicity" today.

Eg2: Below string successfully generated spell suggestions:

USER Given: funnicity is funny. isn ' t it. true. well go to " funnicity " today.

Escaped String : funnicity is funny. isn ' t it. true. well go to " funnicity " today.

The difference between above two example strings is, characters to be escaped were separated from other chars with a single whitespace.

In the below notes "TEXT:" is the string sent by ERXGoogleSpell to org.w3c.dom.Document.parse(InputStream) method and "ERROR:" is the error received from ERXGoogleSpell:
--------------------------------------------------------
TEXT:

funnicity is funny. isn't it. true. well go to " funnicity " today.

ERROR:

The entity name must immediately follow the '&' in the entity reference.

00:43 DEBUG text is : funnicity is funny. isn t it. true. well go to "funnicity" today.
[Fatal Error] :1:244: The reference to entity "quot" must end with the ';' delimiter.
er.extensions.ERXGoogleSpell$CorrectionException: Failed to correct spelling of 'funnicity is funny. isn t it. true. well go to "funnicity" today.'.
at er.extensions.ERXGoogleSpell.suggestions(ERXGoogleSpell.java:172)
at er.extensions.ERXGoogleSpell.suggestions(ERXGoogleSpell.java:114)
at er.extensions.ERXGoogleSpell.suggestions(ERXGoogleSpell.java:99)
at com.mtj.DirectAction.checkSpellingAction(DirectAction.java:1872)
at sun.reflect.GeneratedMethodAccessor68.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.webobjects.appserver.WODirectAction.performActionNamed(WODirectAction.java:128)
at com.webobjects.appserver._private.WOActionRequestHandler._handleRequest(WOActionRequestHandler.java:240)
at com.webobjects.appserver._private.WOActionRequestHandler.handleRequest(WOActionRequestHandler.java:145)
at com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1306)
at com.mtj.Application.dispatchRequest(Application.java:669)
at com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:173)
at com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java:254)
at java.lang.Thread.run(Thread.java:613)
Caused by: org.xml.sax.SAXParseException: The reference to entity "quot" must end with the ';' delimiter.
at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:267)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:201)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:98)
at er.extensions.ERXGoogleSpell.suggestions(ERXGoogleSpell.java:148)
... 14 more

--------------------------------------------------------
TEXT:

funnicity is funny. tell me isn't it true.

ERROR:

07:29 DEBUG text is : funnicity is funny. tell me isn't it true.
[Fatal Error] :1:187: The entity name must immediately follow the '&' in the entity reference.
er.extensions.ERXGoogleSpell$CorrectionException: Failed to correct spelling of 'funnicity is funny. tell me isn't it true.'.
at er.extensions.ERXGoogleSpell.suggestions(ERXGoogleSpell.java:172)
at er.extensions.ERXGoogleSpell.suggestions(ERXGoogleSpell.java:114)
at er.extensions.ERXGoogleSpell.suggestions(ERXGoogleSpell.java:99)
at com.mtj.DirectAction.checkSpellingAction(DirectAction.java:1872)
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 com.webobjects.appserver.WODirectAction.performActionNamed(WODirectAction.java:128)
at com.webobjects.appserver._private.WOActionRequestHandler._handleRequest(WOActionRequestHandler.java:240)
at com.webobjects.appserver._private.WOActionRequestHandler.handleRequest(WOActionRequestHandler.java:145)
at com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1306)
at com.mtj.Application.dispatchRequest(Application.java:669)
at com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:173)
at com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java:254)
at java.lang.Thread.run(Thread.java:613)
Caused by: org.xml.sax.SAXParseException: The entity name must immediately follow the '&' in the entity reference.
at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:267)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:201)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:98)
at er.extensions.ERXGoogleSpell.suggestions(ERXGoogleSpell.java:148)
... 15 more

--------------------------------------------------------


Please let me know, if this email is not clear or need any information.
Thanks in advance.

Thank You,
Shravan
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 4 2009
Added on Dec 5 2008
7 comments
2,070 views