PM74699: Modifying HTML or JSP file that contains javascript code results in sporadic org.eclipse.jface.text.BadLocationException

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • Abstract:
    
    Attempts to hover on a link inside a JSP or HTML while pressing
    the CRTL key results in the following error appearing in the
    workspace log file.
    
    Problem:
    
    If you have a simple project with a web page which has the
    following contents:
    
    ?!DOCTYPE HTML?
    ?html?
    ?head?
    ?title?page2?/title?
    ?meta http-equiv='Content-Type' content='text/html;
    charset=ISO-8859-1'?
    ?/head?
    ?body?
        ?button?My button?/button??br?
            ?button?My button?/button?
            ?button?My button?/button?
            ?button?My button?/button?
        ?table?
            ?tbody?
                ?tr?
                    ?td??/td?
                    ?td??/td?
                ?/tr?
                ?tr?
                    ?td??/td?
                    ?td??/td?
                ?/tr?
            ?/tbody?
        ?/table?
    ?script type='text/javascript'?
    document.body.style.background = 'green';
    ?/script?
    ?/body?
    ?/html?
    
    If you hover over the the final button node and press the CTRL
    key, it activates the Javascript tooling hyperlink.
    
    In the log you will see the following error:
    org.eclipse.jface.text.BadLocationException: Translated offset
    requested but not found for: 257
        at
    org.eclipse.wst.jsdt.web.core.javascript.JsTranslator.getJavaScr
    iptOffset(Unknown
    Source)
        at
    org.eclipse.wst.jsdt.web.core.javascript.JsTranslation.getJavaSc
    riptOffset(Unknown
    Source)
        at
    org.eclipse.wst.jsdt.web.ui.internal.hyperlink.JSDTHyperlinkDete
    ctor.detectHyperlinks(Unknown
    Source)
        at
    org.eclipse.ui.texteditor.HyperlinkDetectorRegistry$HyperlinkDet
    ectorDelegate.detectHyperlinks(Unknown
    Source)
        at
    org.eclipse.jface.text.hyperlink.HyperlinkManager.findHyperlinks
    (Unknown
    Source)
        at
    org.eclipse.jface.text.hyperlink.HyperlinkManager.mouseMove(Unkn
    own
    Source)
        at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown
    Source)
        at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown
    Source)
        at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown
    Source)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown
    Source)
        at org.eclipse.ui.internal.Workbench.runEventLoop(Unknown
    Source)
        at org.eclipse.ui.internal.Workbench.runUI(Unknown Source)
        at org.eclipse.ui.internal.Workbench.access$4(Unknown
    Source)
        at org.eclipse.ui.internal.Workbench$7.run(Unknown Source)
        at
    org.eclipse.core.databinding.observable.Realm.runWithDefault(Unk
    nown
    Source)
        at
    org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Unknown
    Source)
        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(Unknown
    Source)
        at
    org.eclipse.ui.internal.ide.application.IDEApplication.start(Unk
    nown
    Source)
        at
    org.eclipse.equinox.internal.app.EclipseAppHandle.run(Unknown
    Source)
        at
    org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.run
    Application(Unknown
    Source)
        at
    org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.sta
    rt(Unknown
    Source)
        at
    org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown
    Source)
        at
    org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown
    Source)
        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.eclipse.equinox.launcher.Main.invokeFramework(Unknown
    Source)
        at org.eclipse.equinox.launcher.Main.basicRun(Unknown
    Source)
        at org.eclipse.equinox.launcher.Main.run(Unknown Source)
        at org.eclipse.equinox.launcher.Main.main(Unknown Source)
    
    Local fix:
    
    Go the the Window-?Preferences-? General-?Editors-?Text
    Editors-?Hyperlinking and disable the 'JavaScript Element'
    hyperlinks everywhere but the JavaScript Editor
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    This exception should not be written to the log file as it
    is not an exceptional condition.
    

Problem conclusion

  • This exception will no longer be written to the log file.
    
    The fix for this APAR is included in Rational Application
    Developer v8.5.1.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PM74699

  • Reported component name

    RATL APP DEV WI

  • Reported component ID

    5724J1901

  • Reported release

    850

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2012-10-10

  • Closed date

    2012-12-15

  • Last modified date

    2012-12-15

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    RATL APP DEV WI

  • Fixed component ID

    5724J1901

Applicable component levels

  • R850 PSN

       UP



Rate this page:

(0 users)Average rating

Document information


More support for:

Rational Application Developer for WebSphere Software

Software version:

8.5

Reference #:

PM74699

Modified date:

2012-12-15

Translate my page

Machine Translation

Content navigation