When I change the test case to use an empty binding file, it all generates fine.
> -----Original Message----- > From: Karr, David > Sent: Sunday, April 01, 2007 10:02 AM > To: [email protected] > Subject: RE: [castor-user] Updated snapshot release for 1.1.1 > > From JClassRegistry: > > --------------- > // deal with explicit exclusions > ExtendedBinding binding = component.getBinding(); > if (binding.existsExclusion(typedLocalName)) { // Line 140 > Exclude exclusion = binding.getExclusion(typedLocalName); > if (exclusion.getClassName() != null) { > LOG.info("Dealing with exclusion for local > element " + xPath > + " as per binding file."); > jClass.changeLocalName(exclusion.getClassName()); > } > return; > } > --------------- > > So, I'm guessing this needs to verify first whether a binding > for that component exists, or should it be impossible that a > binding does not exist? > > > -----Original Message----- > > From: Karr, David > > Sent: Sunday, April 01, 2007 9:54 AM > > To: [email protected] > > Subject: RE: [castor-user] Updated snapshot release for 1.1.1 > > > > Maybe this will be useful. My Ant task uses either the task or > > SourceGeneratorMain directly. When I used the class directly, I got > > this: > > > > generate-from-sgm: > > Created dir: C:\cygwin\home\u166705\work\castorbug2\gen\java > > -- The generated classes will use a case insensitive method for > > looking up enumerated type values.informViaLog > > 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(Sourc > > eFactory.j > > ava:304) > > at > > org.exolab.castor.builder.SourceGenerator.createClasses(Source > > Generator. > > java:876) > > at > > org.exolab.castor.builder.SourceGenerator.generateAllClassFile > > s(SourceGe > > nerator.java:740) > > at > > org.exolab.castor.builder.SourceGenerator.generateSource(Sourc > > eGenerator > > .java:691) > > at > > org.exolab.castor.builder.SourceGenerator.generateSource(Sourc > > eGenerator > > .java:634) > > at > > org.exolab.castor.builder.SourceGenerator.generateSource(Sourc > > eGenerator > > .java:532) > > at > > org.exolab.castor.builder.SourceGeneratorMain.main(SourceGener > > atorMain.j > > ava:295) > > > > > -----Original Message----- > > > From: Karr, David > > > Sent: Sunday, April 01, 2007 9:50 AM > > > To: [email protected] > > > Subject: RE: [castor-user] Updated snapshot release for 1.1.1 > > > > > > The Junit test might be useful. I set up my plain Ant > testbed for > > > this, using my latest schemas and the 1.1.1 snapshot, and it did > > > almost exactly what the Maven test did. > > > A NPE without any information. > > > > > > > -----Original Message----- > > > > From: Werner Guttmann [mailto:[EMAIL PROTECTED] > > > > Sent: Sunday, April 01, 2007 9:34 AM > > > > To: [email protected] > > > > Subject: Re: [castor-user] Updated snapshot release for 1.1.1 > > > > > > > > Switch away from the Maven plugin for a second, and use > > > Castor's code > > > > gen programmatically. I can send you a JUnit test case, if > > > you wanted > > > > ? > > > > > > > > Werner > > > > > > > > Karr, David wrote: > > > > > Just in case it's useful, here's the output I get > when I run it: > > > > > > > > > > -------------- > > > > > [castor-codegen] Processing > > > > > > > > > > > > > > > C:\p4ws\WS_u166705_AIS_2\EAI_weblogic\uia2_7.0\resources\xmlschema\COM > > > > > MO > > > > > N\1.0\common.xsd > > > > > Creating classes for: SendEmailRequest > > > > > > > > > > BUILD FAILED > > > > > File...... > > > > > > > > > > > > > > > c:\p4ws\WS_u166705_AIS_2\EAI_weblogic\uia2_7.0\subprojects\xmlbinding\ > > > > > ma > > > > > ven.xml > > > > > Element... ant:castor-codegen > > > > > Line...... 81 > > > > > Column.... 172 > > > > > java.lang.NullPointerException > > > > > Total time: 3 seconds > > > > > Finished at: Sun Apr 01 09:20:53 PDT 2007 > > > > > -------------- > > > > > > > > > > (Line 81 is that first call to castor-codegen. Column 172 > > > > is the "=" > > > > > on > > > > > 'types="j2"'.) > > > > > > > > > >> -----Original Message----- > > > > >> From: Karr, David > > > > >> Sent: Sunday, April 01, 2007 9:24 AM > > > > >> To: [email protected] > > > > >> Subject: RE: [castor-user] Updated snapshot release for 1.1.1 > > > > >> > > > > >> Not far. All I get when I run it now is a > > > > NullPointerException, with > > > > >> no stack trace. > > > > >> > > > > >> I have the following code in my my maven.xml for a > subproject: > > > > >> > > > > >> ---------------- > > > > >> <ant:taskdef name="castor-codegen" > > > > >> > > > > classname="org.castor.anttask.CastorCodeGenTask"> > > > > >> <ant:classpath> > > > > >> <ant:path refid="maven.castor.classpath"/> > > > > >> </ant:classpath> > > > > >> </ant:taskdef> > > > > >> <ant:castor-codegen nameConflictStrategy="informViaLog" > > > > >> verbose="true" > > > > >> file="${maven.resources.dir}/xmlschema/COMMON/1.0/common.xsd" > > > > >> package="wamu.common.services" types="j2" > > > > >> todir="${maven.castor.dest}"/> > > > > >> > > > > >> ---------------- > > > > >> > > > > >> That call to "castor-codegen" is just the first of many. > > > > It fails on > > > > >> the first one. > > > > >> > > > > >> I tried adding 'verbose="true"' and also removing the > > > > >> "nameConflictStrategy" attribute, but it still fails > > > > immediately with > > > > >> the NPE. > > > > >> > > > > >> Can I make it give me more information? > > > > >> > > > > >>> -----Original Message----- > > > > >>> From: Werner Guttmann [mailto:[EMAIL PROTECTED] > > > > >>> Sent: Sunday, April 01, 2007 9:08 AM > > > > >>> To: [email protected] > > > > >>> Subject: Re: [castor-user] Updated snapshot release > for 1.1.1 > > > > >>> > > > > >>> No, not really, though I agree that you could have seen > > > > it that way. > > > > >>> Basically, I push out short notifications if really new > > > > >> functionality > > > > >>> is added or existing (albeit experimental) changed. > > > > >>> > > > > >>> Let me know how far you get ... > > > > >>> > > > > >>> Werner > > > > >>> > > > > >>> Karr, David wrote: > > > > >>>> CASTOR-1900. It says it's resolved (apparently on 3/19), > > > > >> and there > > > > >>>> was a patch provided by Matthias Epheser on 3/16. > > > I'll give the > > > > >>>> latest snapshot a try, then. I was used to the pattern of > > > > >>> you writing > > > > >>>> a note in here noting the availability of a snapshot, so > > > > I wasn't > > > > >>>> checking the directory. > > > > >>>> > > > > >>>>> -----Original Message----- > > > > >>>>> From: Werner Guttmann [mailto:[EMAIL PROTECTED] > > > > >>>>> Sent: Sunday, April 01, 2007 3:00 AM > > > > >>>>> To: [email protected] > > > > >>>>> Subject: Re: [castor-user] Updated snapshot release > > for 1.1.1 > > > > >>>>> > > > > >>>>> David, > > > > >>>>> > > > > >>>>> any snapshot released to the snapshot repository at > > > > >> Codehaus is a > > > > >>>>> viable snapshot release. Have a look at > > > > >>>>> > > > > >>>>> > > http://svn.castor.codehaus.org/browse/castor/castor/trunk/src/ > > > > >>>>> doc/release-notes.xml > > > > >>>>> > > > > >>>>> to get an idea what's been committed since 1.1. > > > > >>>>> > > > > >>>>> Regards > > > > >>>>> Werner > > > > >>>>> > > > > >>>>> PS What Jira issue are you referring to in particular ? > > > > >>>>> > > > > >>>>> Karr, David wrote: > > > > >>>>>> Is this release from 3/5 the last released (deemed > > > > >>> viable) snapshot? > > > > >>>>>> Looking in this directory, I see several > releases that came > > > > >>>>> after this > > > > >>>>>> date. I've been waiting for another snapshot to fix > > > > the latest > > > > >>>>>> blocking problem I had with the 1.1.1 snapshots. > > > > >>>>>> > > > > >>>>>>> -----Original Message----- > > > > >>>>>>> From: Werner Guttmann [mailto:[EMAIL PROTECTED] > > > > >>>>>>> Sent: Monday, March 05, 2007 12:37 PM > > > > >>>>>>> To: [EMAIL PROTECTED]; > > [email protected]; > > > > >>>>>>> [email protected] > > > > >>>>>>> Subject: [castor-user] Updated snapshot release > for 1.1.1 > > > > >>>>>>> > > > > >>>>>>> Hi, > > > > >>>>>>> > > > > >>>>>>> I have just made available an updated snapshot release > > > > >> of Castor > > > > >>>>>>> 1.1.1 at > > > > >>>>>>> > > > > >>>>>>> > > > http://snapshots.repository.codehaus.org/org/codehaus/castor/ > > > > >>>>>>> > > > > >>>>>>> As part of this release, the following features have > > > > >> been added: > > > > >>>>>>> - Support for 'substitution groups' > > > > >>>>>>> - Validation of <xs:sequence> order during > unmarshalling. > > > > >>>>>>> - An 'automatic' mode for resolving class name > conflicts. > > > > >>>>>>> > > > > >>>>>>> In addition, we have added .... > > > > >>>>>>> > > > > >>>>>>> - an Ant task for the DDL generator. > > > > >>>>>>> > > > > >>>>>>> In addition to the features outlined below, a few > > > > >>>>> regression issues > > > > >>>>>>> of > > > > >>>>>>> 1.1 have been fixed > > > > >>>>>>> > > > > >>>>>>> With all these features, please note that source code > > > > >>>>> (re)generation > > > > >>>>>>> is required. > > > > >>>>>>> > > > > >>>>>>> We currently consider these features stable enough to > > > > >> warrant a > > > > >>>>>>> snapshot release, but would appreciate some (heavy) > > > > >>>>> testing for the > > > > >>>>>>> community, so that we are able to spot any regression > > > > >>>>> issues before > > > > >>>>>>> making this new functionality available as part of > > > > Castor 1.1.1 > > > > >>>>>>> > > > > >>>>>>> Regards > > > > >>>>>>> Werner > > > > >>>>>>> > > > > >>>>>>> > > > > >>>>>>> > > > > >> > > > > > > > > > > --------------------------------------------------------------------- > > > > >>>>>>> To unsubscribe from this list please visit: > > > > >>>>>>> > > > > >>>>>>> http://xircles.codehaus.org/manage_email > > > > >>>>>>> > > > > >>>>>>> > > > > >> > > > > > > > > > > --------------------------------------------------------------------- > > > > >>>>>> To unsubscribe from this list please visit: > > > > >>>>>> > > > > >>>>>> http://xircles.codehaus.org/manage_email > > > > >>>>>> > > > > >>>>> > > > > >> > > > > > > > > > > --------------------------------------------------------------------- > > > > >>>>> To unsubscribe from this list please visit: > > > > >>>>> > > > > >>>>> http://xircles.codehaus.org/manage_email > > > > >>>>> > > > > >>>>> > > > > >>>> > > > > >> > > > > > > > > > > --------------------------------------------------------------------- > > > > >>>> To unsubscribe from this list please visit: > > > > >>>> > > > > >>>> http://xircles.codehaus.org/manage_email > > > > >>>> > > > > >>> > > > > >>> > > > > >> > > > > > > > > > > --------------------------------------------------------------------- > > > > >>> To unsubscribe from this list please visit: > > > > >>> > > > > >>> http://xircles.codehaus.org/manage_email > > > > >>> > > > > >>> > > > > >> > > > > > > > > > > --------------------------------------------------------------------- > > > > >> To unsubscribe from this list please visit: > > > > >> > > > > >> http://xircles.codehaus.org/manage_email > > > > >> > > > > >> > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > To unsubscribe from this list please visit: > > > > > > > > > > http://xircles.codehaus.org/manage_email > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe from this list please visit: > > > > > > > > http://xircles.codehaus.org/manage_email > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe from this list please visit: > > > > > > http://xircles.codehaus.org/manage_email > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe from this list please visit: > > > > http://xircles.codehaus.org/manage_email > > > > > > --------------------------------------------------------------------- > To unsubscribe from this list please visit: > > http://xircles.codehaus.org/manage_email > > --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email

