MATLAB: Do I receive “R6025 – pure virtual function call” when attempting to call an abstract Java method in MATLAB 7.4 (R2007a)

MATLAB

I am trying to call an abstract Java method — one that has not been implemented, as shown by METHODS output:
factory = javax.xml.parsers.DocumentBuilderFactory.newInstance
methods('-full', factory)
abstract boolean getFeature(java.lang.String) throws javax.xml.parsers.ParserConfigurationException % Inherited from javax.xml.parsers.DocumentBuilderFactory
When I attempt to call this method:
factory = javax.xml.parsers.DocumentBuilderFactory.newInstance
factory.getFeature('fred')
I receive a dialog box with the following message:
Title: Microsoft Visual C++ Runtime Library
Icon: white X in red circle
Message:
Runtime Error!
Program: C:\MATLAB_R2007A\bin\win32\MATLAB.exe
R6025
- pure virtual function call
After that MATLAB exits.
Alternatively, if the setFeature() method is call, no error dialog box is displayed.
factory.setFeature('<http://apache.org/xml/features/validation/schema',true>)
Instead MATLAB crashes silenty and produces a java log file with a stack trace similar to this
j java.lang.Throwable.<init>()V+10
j java.lang.Error.<init>()V+1
j java.lang.LinkageError.<init>()V+1
j java.lang.IncompatibleClassChangeError.<init>()V+1
j java.lang.AbstractMethodError.<init>()V+1
v ~StubRoutines::call_stub

Best Answer

This is the expected functionality from the MATLAB Java interface.
To work around this behavior, resolve the bug in the underlying class.
In the example above, this would mean implementing the getFeature() method.