Bug 1170409
| Summary: | JAXBContext.newInstance() throws NullPointerException with org.drools.core.xml.jaxb.util.JaxbObjectObjectPair | ||
|---|---|---|---|
| Product: | [Retired] JBoss BPMS Platform 6 | Reporter: | Toshiya Kobayashi <tkobayas> |
| Component: | Business Central | Assignee: | Shelly McGowan <smcgowan> |
| Status: | CLOSED EOL | QA Contact: | Ivo Bek <ibek> |
| Severity: | low | Docs Contact: | |
| Priority: | medium | ||
| Version: | 6.0.3 | CC: | kverlaen, mbaluch |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-03-27 20:01:13 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Sorry about not sending a unit test. I'm not very confident if this is a bug. If needed, please let me know and I will send a unit test as PR. |
Description of problem: JAXBContext.newInstance(org.drools.core.xml.jaxb.util.JaxbObjectObjectPair.class) throws NullPointerException. You can simply check with this test code: ==== public void testJaxb() throws Exception { JAXBContext jaxbContext = JAXBContext.newInstance(org.drools.core.xml.jaxb.util.JaxbObjectObjectPair.class); System.out.println(jaxbContext); } ==== Actually, it was found when a user click "build&deploy" in business-central and the user happened to include org.drools.core.xml.jaxb.util.JaxbObjectObjectPair in their dependent pojo jar. ==== Caused by: java.lang.NullPointerException at com.sun.xml.bind.v2.runtime.reflect.TransducedAccessor.get(TransducedAccessor.java:169) [jaxb-impl-2.2.5-redhat-5.jar:2.2.5-redhat-5] at com.sun.xml.bind.v2.runtime.property.AttributeProperty.<init>(AttributeProperty.java:91) [jaxb-impl-2.2.5-redhat-5.jar:2.2.5-redhat-5] at com.sun.xml.bind.v2.runtime.property.PropertyFactory.create(PropertyFactory.java:108) [jaxb-impl-2.2.5-redhat-5.jar:2.2.5-redhat-5] at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.<init>(ClassBeanInfoImpl.java:181) [jaxb-impl-2.2.5-redhat-5.jar:2.2.5-redhat-5] at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getOrCreate(JAXBContextImpl.java:509) [jaxb-impl-2.2.5-redhat-5.jar:2.2.5-redhat-5] at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:326) [jaxb-impl-2.2.5-redhat-5.jar:2.2.5-redhat-5] at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:141) [jaxb-impl-2.2.5-redhat-5.jar:2.2.5-redhat-5] at com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1163) [jaxb-impl-2.2.5-redhat-5.jar:2.2.5-redhat-5] at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:145) [jaxb-impl-2.2.5-redhat-5.jar:2.2.5-redhat-5] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_71] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_71] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_71] at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_71] at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:211) [jboss-jaxb-api_2.2_spec-1.0.4.Final-redhat-2.jar:1.0.4.Final-redhat-2] at javax.xml.bind.ContextFinder.find(ContextFinder.java:392) [jboss-jaxb-api_2.2_spec-1.0.4.Final-redhat-2.jar:1.0.4.Final-redhat-2] at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:618) [jboss-jaxb-api_2.2_spec-1.0.4.Final-redhat-2.jar:1.0.4.Final-redhat-2] at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:565) [jboss-jaxb-api_2.2_spec-1.0.4.Final-redhat-2.jar:1.0.4.Final-redhat-2] at org.kie.remote.services.rest.jaxb.DynamicJaxbContext.setupDeploymentJaxbContext(DynamicJaxbContext.java:221) [kie-services-remote-6.0.3-redhat-6.jar:6.0.3-redhat-6] at org.kie.remote.services.rest.jaxb.DynamicJaxbContext.setupDeploymentJaxbContext(DynamicJaxbContext.java:152) [kie-services-remote-6.0.3-redhat-6.jar:6.0.3-redhat-6] at org.kie.remote.services.rest.jaxb.DynamicJaxbContext$Proxy$_$$_WeldClientProxy.setupDeploymentJaxbContext(DynamicJaxbContext$Proxy$_$$_WeldClientProxy.java) [kie-services-remote-6.0.3-redhat-6.jar:6.0.3-redhat-6] ... at org.jbpm.kie.services.impl.AbstractDeploymentService.commonDeploy(AbstractDeploymentService.java:106) [jbpm-kie-services-6.0.3-redhat-6.jar:6.0.3-redhat-6] at org.jbpm.kie.services.impl.KModuleDeploymentService.deploy(KModuleDeploymentService.java:110) [jbpm-kie-services-6.0.3-redhat-6.jar:6.0.3-redhat-6] at org.jbpm.kie.services.impl.KModuleDeploymentService$Proxy$_$$_WeldClientProxy.deploy(KModuleDeploymentService$Proxy$_$$_WeldClientProxy.java) [jbpm-kie-services-6.0.3-redhat-6.jar:6.0.3-redhat-6] at org.jbpm.console.ng.bd.backend.server.DeploymentManagerEntryPointImpl.deploy(DeploymentManagerEntryPointImpl.java:113) [jbpm-console-ng-business-domain-backend-6.0.3-redhat-6.jar:6.0.3-redhat-6] ... 50 more ==== The customer is fine to remove the class from the pojo jar so it's not an issue actually. But I think org.drools.core.xml.jaxb.util.JaxbObjectObjectPair is designed to be JAXB aware so I filed this BZ with low priority as a potential bug. Steps to Reproduce: 1. Run the test code public void testJaxb() throws Exception { JAXBContext jaxbContext = JAXBContext.newInstance(org.drools.core.xml.jaxb.util.JaxbObjectObjectPair.class); System.out.println(jaxbContext); } Actual results: Throws NullPointerException Expected results: Run successfully