IllegalAccessError while parsing PMML File
See original GitHub issueHello,
I’m trying to build a RapidMiner extension to read PMML models. However I’m getting the following exception when unmarshaling a pmml file:
java.lang.IllegalAccessError: Class com.sun.xml.internal.bind.v2.runtime.reflect.Accessor$FieldReflection can not access a member of class org.dmg.pmml.PMML with modifiers "private"
at com.sun.xml.internal.bind.v2.runtime.reflect.Accessor$FieldReflection.set(Accessor.java:262)
at com.sun.xml.internal.bind.v2.runtime.reflect.TransducedAccessor$CompositeTransducedAccessorImpl.parse(TransducedAccessor.java:230)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.StructureLoader.startElement(StructureLoader.java:195)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:559)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:538)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.SAXConnector.startElement(SAXConnector.java:153)
at org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:551)
at org.jpmml.model.PMMLFilter.startElement(PMMLFilter.java:69)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:374)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(XMLNSDocumentScannerImpl.java:613)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3132)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:852)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:841)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:770)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:357)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:243)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:214)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:140)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:123)
at org.jpmml.model.JAXBUtil.unmarshal(JAXBUtil.java:78)
at org.jpmml.model.JAXBUtil.unmarshalPMML(JAXBUtil.java:64)
at org.jpmml.model.PMMLUtil.unmarshal(PMMLUtil.java:34)
at de.woistbier.rapidminer.pmml.operator.PMMLEvaluator.read(PMMLEvaluator.java:118)
at de.woistbier.rapidminer.pmml.operator.PMMLEvaluator.read(PMMLEvaluator.java:34)
at com.rapidminer.operator.io.AbstractReader.doWork(AbstractReader.java:126)
at com.rapidminer.operator.Operator.execute(Operator.java:1005)
at com.rapidminer.operator.execution.SimpleUnitExecutor.execute(SimpleUnitExecutor.java:77)
at com.rapidminer.operator.ExecutionUnit$3.run(ExecutionUnit.java:812)
at com.rapidminer.operator.ExecutionUnit$3.run(ExecutionUnit.java:807)
at java.security.AccessController.doPrivileged(Native Method)
at com.rapidminer.operator.ExecutionUnit.execute(ExecutionUnit.java:807)
at com.rapidminer.operator.OperatorChain.doWork(OperatorChain.java:428)
at com.rapidminer.operator.Operator.execute(Operator.java:1005)
at com.rapidminer.Process.run(Process.java:1205)
at com.rapidminer.Process.run(Process.java:1101)
at com.rapidminer.Process.run(Process.java:1054)
at com.rapidminer.Process.run(Process.java:1049)
at com.rapidminer.Process.run(Process.java:1039)
at com.rapidminer.gui.ProcessThread.run(ProcessThread.java:65)
This might be general problem when having restrictive security managers. So maybe making some fields in class org.dmg.pmml.PMML
public could help.
Any other ideas?
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
PMML document parsing - java - Stack Overflow
I'm using jpmml library to parse the PMML document(xml document with root element PMML). I'm able to parse some of the elements but...
Read more >Get fields of a PMML model without loading the entire model ...
I'm on the latest version of JPMML, and I need to get the signature of the PMML model without loading the entire XML...
Read more >chore(deps): update dependency io.quarkus:quarkus ... - GitLab
Something went wrong while fetching comments. Please try again. chore(deps): update dependency io.quarkus:quarkus- ...
Read more >【从零开始写MapReduce】四处是坑 - CSDN博客
又报错了. Exception in thread "main" java.lang.IllegalAccessError: tried to access method com.google.common.base.Stopwatch.
Read more >Troubleshooting PMML documents - Openscoring.IO
Open the PMML document for inspection in an XML-aware text editor. ... which reads/parses a PMML file into an in-memory class model object, ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@0xcfe4f1 Apache Maven plugins can declare their own “locally scoped” dependencies. For example, see https://github.com/jpmml/jpmml-model/blob/master/pmml-model/pom.xml#L195-L201
Another idea - maybe there is some Apache Maven plugin that can rewrite JPMML-Model classes (during the packaging phase of the build) by changing all field access modifiers from
private
topublic
.This way the JPMML-Model library could stay as it is, and you could still have your “tweaked” variant of it.