org.apache.axiom.om.OMException when running a built jar file
Answered
Hello, I have a small application using axis2 lib. When running the main class using Run->Run, the appl runs fine, no error occurs. When I build a jar application using an artifact build and use a configuration to run the jar, there is the following error:
"org.apache.axiom.om.OMException: No meta factory found for feature 'default'; this usually means that axiom-impl.jar is not in the classpath or that the META-INF/axiom.xml resource can't be read"
Any ideas? Did I miss something regarding the build?
Please sign in to leave a comment.
See Packaging a Module into a JAR File and Package the application in a JAR for the steps.
Verify the jar artifact has correct format and contains all needed libraries. You can explore the artifact's content on Artifacts configuration page.
Check also threads for this error for solutions
https://stackoverflow.com/questions/33099823/no-meta-factory-found-for-feature-default-this-usually-means-that-axiom-impl
https://developer.jboss.org/thread/274088?_sscc=t
I followed the steps in the "packaging" guidelines of the idea help pages before. So there is nothing I could do anymore. Two questions here: Where can I see how the classpath is set and which META-INF\axiom.xml is referred to in the error message?
>Where can I see how the classpath is set
You see it in the very 1st line when you launch Run Configuration. Basically there are two ways of adding an external jar into a jar: How to Add Libraries to a JAR.
>which META-INF\axiom.xml is referred to in the error message
I can not know this, this looks like library-specific error. Double check the libraries you use in project. Make sure they are correctly packaged into the jar artifact. Check also this thread.