Wednesday, March 20, 2019

Getting java.lang.ExceptionInInitializerError during OSB deployment

Problem

During the deployment of the OSB project from the command line, we get the following cryptic error:
Diagnostic XML Bean debug log file created: /tmp/xmlbeandebug5401068355720061527.log
* Unexpected error: java.lang.ExceptionInInitializerError
* Session discarded
* Unexpected error:  java.lang.ExceptionInInitializerError
No stack trace available.

Problem invoking WLST - Traceback (innermost last):
  File "/home/oracle/deploy/osb_import.py", line 277, in ?
  File "/home/oracle/deploy/osb_import.py", line 134, in importToALSBDomain
        at sun.misc.Unsafe.ensureClassInitialized(Native Method)
        at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:43)
        at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:140)
        at java.lang.reflect.Field.acquireFieldAccessor(Field.java:1057)
        at java.lang.reflect.Field.getFieldAccessor(Field.java:1038)
        .
        .
        .
java.lang.ExceptionInInitializerError: java.lang.ExceptionInInitializerError
Opening up the .log file in /tmp doesn't help much and only yields more cryptic information:
XML-BEANS compiled schema: Could not locate compiled schema resource schemaorg_apache_xmlbeans/system/resources_schema_xbtypes/index.xsb (schemaorg_apache_xmlbeans.system.resources_schema_xbtypes.index) - code 0
org.apache.xmlbeans.SchemaTypeLoaderException: XML-BEANS compiled schema: Could not locate compiled schema resource schemaorg_apache_xmlbeans/system/resources_schema_xbtypes/index.xsb (schemaorg_apache_xmlbeans.system.resources_schema_xbtypes.index) - code 0
        at org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl$XsbReader.<init>(SchemaTypeSystemImpl.java:1519)
        at org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.initFromHeader(SchemaTypeSystemImpl.java:273)
        at org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.<init>(SchemaTypeSystemImpl.java:185)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

Solution

1. Try importing the JAR through the OSB Console, and you will get a more accurate error as to why the deployment failed.

Applicable Versions
  • Oracle Service Bus (OSB) 11g (11.1.1.9.0)

3 comments:

  1. Helpful article! Which you have given such good and informative knowledge on OCB deployment. It's useful for me but also good for others who are searching for this information. Thanks for giving me information like this. oracle fusion financials online training

    ReplyDelete
  2. Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging.
    myspringisd

    ReplyDelete