RuntimeException from xmlbeans - can't find compiled schema RuntimeException from xmlbeans - can't find compiled schema xml xml

RuntimeException from xmlbeans - can't find compiled schema


The answer of John was a good hint for me. I generated Java classes with xmlBeans and copied the source files out of the "noNamespace" manually in my project to modify them. unfortunately I did not recognize that there were also generated class files in the "schemaorg_apache_xmlbeans" folder and did not copy them.
After switching to the usage of the generated jar-file everything worked fine for me.


I've never used the library before but I can kind of guess at what's going on.With that qualifier (i.e., I'm just making this up, but it's been 7 hours and no one else has made anything up)...

Stating the obvious: something has been compiled somewhere and can't be loaded. I don't think this something is in the jar file; I'm guessing it's one of your resources that's been compiled/cached to some location.

I would guess either:

  • it's compiled in a place it's not loadable from (messed up classpath/config)
  • the versioning is wrong between what's been compiled and what wants to be loaded

Did you change something (e.g. schema version?) between the compilation and loading/running?

Can you remove the compiled version and recompile and then try a reload?

Can you locate the compiled version in the file system?

To do this, you might try

grep "s2B8331230CBD98F4933B0B025B6BF726" `find .`

from some suitable directory.

Can you do an an md5 on the class/resource causing problems in both compile and runtime environments? Do they match?

Hope something in there helps or triggers a thought.


I have seen this problem often when there was a script (ant, maven, ...) that would handle the XMLBeans compilation and another mechanism was used for compiling and running the rest of the code. Sometimes one piece will delete the generated files that XMLBeans is looking for in your stack trace, but will leave the generated XMLBeans Java files so everything will compile and look fine.

I have also seen this when using the option to output the source files, but not the class files. The non-Java source files are only generated directly into the class folder or jar file generated by XMLBeans.