bugGNU Octave - Bugs: bug #58266, Error "An illegal reflective...

 
 

bug #58266: Error "An illegal reflective access operation has occurred" in Java subsystem

Submitted by:  Philip Nienhuis <philipnienhuis>
Submitted on:  Tue 28 Apr 2020 07:12:00 PM UTC  
 
Category:  Libraries Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error
Status:  Patch Submitted Assigned to:  None
Originator Name:  Philip Nienhuis Open/Closed:  Open
Release:  dev Operating System:  Any

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 30 Apr 2020 10:52:11 AM UTC, comment #2: 

While investigating (note: my Java and C++ proficiency is meager) and after some reading up it turned out that there are separate bugs here.

The one Olaf mentioned in the package release tracker and mentioned as 2nd here:

OpenJDK 64-Bit Server VM warning: Archived non-system classes are disabled because the java.system.class.loader property is specified (value = "org.octave.OctClassLoader"). To use archived non-system classes, this property must be not be set

is probably solved using the attached patch (I never got that message on my systems so I'm not sure).
I tried this patch and I see no difference in Java behavior in Linux and Windows. Octave's test suite passes all Java-related checks and all Java methods in the io package (quite lot actually) work as before.

The other (original) "reflective access operation has occurred" warning is beyond me. It provokes a bug but only the first time, when the warning is emitted, next times the offending Java operation proceeds w/o issue.

(file #48972)

Philip Nienhuis <philipnienhuis>
Project Member
Tue 28 Apr 2020 07:15:43 PM UTC, comment #1: 

Bug #58004 is (probably) depending on this bug.

Philip Nienhuis <philipnienhuis>
Project Member
Tue 28 Apr 2020 07:12:00 PM UTC, original submission:  

With some Java operations a warning is emitted as follows:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.octave.ClassHelper (file:/C:/Programs/Octave/Octave-7.0.0_20200423D/mingw64/share/octave/7.0.0/m/java/octave.jar) to method com.sun.org.apache.xpath.internal.jaxp.XPathImpl.evaluate(java.lang.String,java.lang.Object,javax.xml.namespace.QName)
WARNING: Please consider reporting this to the maintainers of org.octave.ClassHelper
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operati
ons
WARNING: All illegal access operations will be denied in a future release

I saw this warning appear after I upgraded Java from 8 to 10 on my Windows boxes.
But in the mean time other have noted AFAICS similar issues in Octave's Java subsystem, e.g., the thread about the io-2.6.0 release [1] where Olaf mentioned it when processing the XML I/O functions:
<quote>

OpenJDK 64-Bit Server VM warning: Archived non-system classes are disabled because the java.system.class.loader property is specified (value = "org.octave.OctClassLoader"). To use archived non-system classes, this property must be not be set

</quote.

(I think the Java issue reports itself differently in Linux than in Windows.)

Another example:
A thread about a perceived Named ranges bug in LibreOffice's UNO-Java bridge [2] from 5 years ago where I now conclude that this bug really must be in Octave itself.  A deceiving issue there is that the bug occurs only the first time when Java detects the error, but next times the Octave code seems to function properly.

I have very limited knowledge of the Java subsystem, I can only hope this can be solved w/o too much trouble.

[1] https://sourceforge.net/p/octave/package-releases/405/#78a4ad following posts
[2] https://bugs.documentfoundation.org/show_bug.cgi?id=94423

Philip Nienhuis <philipnienhuis>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #48972:  Java_system_loader.patch added by philipnienhuis (872B - application/octet-stream)

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -email is unavailable- added by saturn
  • -email is unavailable- added by philipnienhuis (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-05-06 saturn Carbon-Copy- => Added saturn
    2020-04-30 philipnienhuis Attached File- => Added Java_system_loader.patch, #48972
        StatusNone => Patch Submitted
    2020-04-28 philipnienhuis Dependencies- => bugs #58004 is dependent

    Back to the top


    Powered by Savane 3.5