I'm using the latest snapshot, 1.1.1-20070329.084439-9.
My test case does not use a binding file. When I run it, either through Maven, Ant, or a direct call to SourceGeneratorMain, it gets a NullPointerException. When I use SGM directly, I get the following stack trace:
java.lang.NullPointerException
at org.exolab.castor.builder.JClassRegistry.bind(JClassRegistry.java:140)
at org.exolab.castor.builder.FactoryState.<init>(FactoryState.java:138)
at org.exolab.castor.builder.SourceFactory.createSourceCode(SourceFactory.java:304)
at org.exolab.castor.builder.SourceGenerator.createClasses(SourceGenerator.java:876)
at org.exolab.castor.builder.SourceGenerator.generateAllClassFiles(SourceGenerator.java:740)
at org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenerator.java:691)
at org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenerator.java:634)
at org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenerator.java:532)
at org.exolab.castor.builder.SourceGeneratorMain.main(SourceGeneratorMain.java:295)
I looked at the code in JClassRegistry, and it wasn't checking to see whether a binding object was found, it just derefs it. I've attached a patch (not compiled) to resolve this.
Final patch for review.