Simply said: debugging. Within e.g Eclipse write a test case that calls
the source generator with your files, and try to catch an NPE. Once that
NPE has been caught and the debugger suspends execution, you should be
able to access all relevant information available at that time.

Werner

Kannan Goundan (JIRA) wrote:
>     [ 
> http://jira.codehaus.org/browse/CASTOR-1907?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_90039
>  ] 
> 
> Kannan Goundan commented on CASTOR-1907:
> ----------------------------------------
> 
> I tried inserting print statements but couldn't really get any useful 
> information.  I'll look at this some more when I have more time.  I'd 
> appreciate any suggestions you have on how to pinpoint the particular field 
> that is causing problems.
> 
>> NullPointerException in SourceFactory.handleField
>> -------------------------------------------------
>>
>>                 Key: CASTOR-1907
>>                 URL: http://jira.codehaus.org/browse/CASTOR-1907
>>             Project: castor
>>          Issue Type: Bug
>>          Components: XML code generator
>>    Affects Versions: 1.1
>>            Reporter: Kannan Goundan
>>
>> I'm trying to generate Java code from an XSD.  No binding file involved.
>> Castor 0.9.5.4 works.  With Castor 1.1 and trunk[14-March-2007], I get a 
>> NullPointerException.  The stack trace from trunk:
>> java.lang.NullPointerException
>>         at 
>> org.exolab.castor.builder.SourceFactory.handleField(SourceFactory.java:1969)
>>         at 
>> org.exolab.castor.builder.SourceFactory.processContentModel(SourceFactory.java:1860)
>>         at 
>> org.exolab.castor.builder.SourceFactory.processContentModel(SourceFactory.java:1828)
>>         at 
>> org.exolab.castor.builder.SourceFactory.processComplexType(SourceFactory.java:1747)
>>         at 
>> org.exolab.castor.builder.SourceFactory.processComplexType(SourceFactory.java:667)
>>         at 
>> org.exolab.castor.builder.SourceFactory.createSourceCode(SourceFactory.java:363)
>>         at 
>> org.exolab.castor.builder.SourceGenerator.createClasses(SourceGenerator.java:841)
>>         at 
>> org.exolab.castor.builder.SourceGenerator.generateAllClassFiles(SourceGenerator.java:705)
>>         at 
>> org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenerator.java:661)
>>         at 
>> org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenerator.java:604)
>>         at 
>> org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenerator.java:509)
>>         at 
>> org.exolab.castor.builder.SourceGeneratorMain.main(SourceGeneratorMain.java:295)
>> Unfortunately, I can't provide the full XSD and I haven't been able to 
>> narrow the problem down.  I tried inserting print statements at various 
>> spots in the code but it that hasn't really gotten me any more information.
>> Is there anything else I can try?
> 


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to