Menu

#2167 ReferenceError: "importPackage" is not defined in <eval> at line number 2

Next Release
fixed
normal
minor
Always
none
1.3.11
Windows
7
2019-01-01
2014-07-20
No

I could reproduce bug #2153, but did not know how to reopen it.

Freemind version: 1.3.11
Java version: 1.8.0_05
Mind you, not reproducible with older java versions, e.g. 1.7.0_65.

The actual error is:

"Error in Script"
"ReferenceError: "importPackage" is not defined in <eval> at line number 2"

There are two ways to reproduce this error:

1 Select a node or create a new node and type '=' to start a formula.
2 Select a node and choose from the menu: Tools -> Edit script...

As far as I can see the error has no impact on functionality, i.e. you can successfully enter your formula or add or edit your script.

Discussion

  • Henk van den Akker

    This error did not show up in the Freeplane log file.

     
  • Volker Börchers

    Ok, the Java version was the missing information - thanks for pointing that out. Unfortunately our new bug tracker has no field for the concerned Java version. Maybe we could add it.

    I tracked the error down to the JSyntaxPane library that we use for the editor. I describe it to some more detail since I don't know the best solution right now and maybe Dimitry or Felix could help.

    Our JSyntaxPane version includes the following script:

    jsyntaxpane/src/main/resources/META-INF/services/jsyntaxpane/scripts/insertdate.js
    

    which is configured in

    jsyntaxpane/src/main/resources/META-INF/services/jsyntaxpane/syntaxkits/javasyntaxkit/config.properties
    

    It contains the statement

    importPackage(java.util);
    

    Unfortunately this statement is only supported by the Rhino JavaScript engine that was included into Java 6 - 7 but not by the new Nashorn JavaScript engine in Java 8.

    See http://stackoverflow.com/questions/22502630/switching-from-rhino-to-nashorn

    We have to decide how to proceed with this problem in JSyntaxPane. We could fix it in our included library or switch to a newer JSyntaxPane version.

     
  • Volker Börchers

    • status: new --> confirmed
     
  • Henk van den Akker

    • status: confirmed --> fixed