[graalvm-users] XML parsing error with native-image

Ed Peters ed.peters at capitalone.com
Fri Apr 30 11:00:26 PDT 2021


Hi gang,

I generated an executable by following the following process:

   - Creating an executable JAR
   - Running it with the tracing agent to generate my reflection configs
   - Generating a native image using those configs

The build works fine, and the executable starts. One of the first things it
does is to parse an XML file from the filesystem, and I'm getting an NPE
from the XML parser inside the JVM. I've attached an exception stack trace,
and the offending XML file, in case that helps. Also ...

$ java -version

openjdk version "11.0.10" 2021-01-19

OpenJDK Runtime Environment GraalVM CE 21.0.0 (build
11.0.10+8-jvmci-21.0-b06)

OpenJDK 64-Bit Server VM GraalVM CE 21.0.0 (build 11.0.10+8-jvmci-21.0-b06,
mixed mode, sharing)

This is exactly the same codepath I ran using the tracing agent, so I don't
*think* the error should be reflection-related, but I'm open to
suggestions. Also, are there any known bugs in XML parsing?

Thanks,
Ed



-- 
Capital One
Senior Director, Architecture

______________________________________________________________________



The information contained in this e-mail is confidential and/or proprietary to Capital One and/or its affiliates and may only be used solely in performance of work or services for Capital One. The information transmitted herewith is intended only for use by the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.oracle.com/pipermail/graalvm-users/attachments/20210430/81430c78/attachment.html 
-------------- next part --------------
Exception in thread "main" java.lang.ExceptionInInitializerError
	at com.oracle.svm.core.classinitialization.ClassInitializationInfo.initialize(ClassInitializationInfo.java:315)
	at org.camunda.bpm.dmn.engine.impl.transform.DefaultDmnTransform.setModelInstance(DefaultDmnTransform.java:111)
	at org.camunda.bpm.dmn.engine.impl.transform.DefaultDmnTransform.modelInstance(DefaultDmnTransform.java:119)
	at org.camunda.bpm.dmn.engine.impl.DefaultDmnEngine.parseDecisions(DefaultDmnEngine.java:55)
	at com.capitalone.qbx490.graalambunda.ClasspathLoadingStrategy.loadDecision(ClasspathLoadingStrategy.java:79)
	at com.capitalone.qbx490.graalambunda.ClasspathLoadingStrategy.<init>(ClasspathLoadingStrategy.java:43)
	at com.capitalone.qbx490.graalambunda.ClasspathLoadingStrategy.<init>(ClasspathLoadingStrategy.java:33)
	at com.capitalone.qbx490.graalambunda.AbstractHandler.createLoadingStrategy(AbstractHandler.java:60)
	at com.capitalone.qbx490.graalambunda.AbstractHandler.<init>(AbstractHandler.java:34)
	at com.capitalone.qbx490.graalambunda.InvokeHandler.<init>(InvokeHandler.java:17)
	at com.capitalone.qbx490.graalambunda.Main.main(Main.java:66)
Caused by: java.lang.NullPointerException
	at com.sun.org.apache.xerces.internal.impl.XMLEntityManager$RewindableInputStream.readAndBuffer(XMLEntityManager.java:3026)
	at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:704)
	at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:150)
	at com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaParsingConfig.parse(SchemaParsingConfig.java:593)
	at com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaParsingConfig.parse(SchemaParsingConfig.java:696)
	at com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaDOMParser.parse(SchemaDOMParser.java:530)
	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchemaDocument(XSDHandler.java:2226)
	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.resolveSchema(XSDHandler.java:2128)
	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.constructTrees(XSDHandler.java:1049)
	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:652)
	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:617)
	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:576)
	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:542)
	at com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory.newSchema(XMLSchemaFactory.java:276)
	at javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:669)
	at javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:701)
	at org.camunda.bpm.model.xml.impl.parser.AbstractModelParser.createSchema(AbstractModelParser.java:187)
	at org.camunda.bpm.model.dmn.impl.DmnParser.<init>(DmnParser.java:50)
	at org.camunda.bpm.model.dmn.Dmn.<init>(Dmn.java:132)
	at org.camunda.bpm.model.dmn.Dmn.<clinit>(Dmn.java:129)
	at com.oracle.svm.core.classinitialization.ClassInitializationInfo.invokeClassInitializer(ClassInitializationInfo.java:375)
	at com.oracle.svm.core.classinitialization.ClassInitializationInfo.initialize(ClassInitializationInfo.java:295)
	... 10 more
-------------- next part --------------
A non-text attachment was scrubbed...
Name: decision-table.dmn
Type: application/octet-stream
Size: 3798 bytes
Desc: not available
Url : http://oss.oracle.com/pipermail/graalvm-users/attachments/20210430/81430c78/attachment.obj 


More information about the GraalVM-Users mailing list