Thank you, but I did not change
org.exolab.castor.builder.nameConflictStrategies.

There was no org.exolab.castor.builder.nameConflictStrategies entry in
my castorbuilder.properties file.

But when the errors persisted, I tried setting
org.exolab.castor.builder.nameConflictStrategy (not
org.exolab.castor.builder.nameConflictStrategies), but that did not help
either.

The org.exolab.castor.builder.nameConflictStrategies entry is in the
default castorbuilder.properties file that is in the castor 1.1.1 jar
file.

Any other ideas?

-----------------------
Warren L. Brown | Senior Consultant | BT INS | BT Global Services |
Tel:+1 412 220 7765 | Fax:+1 412 220 8230 |
412 Darby Way, Suite 2 | Bridgeville, PA 15017 USA |
E:[EMAIL PROTECTED] | www.bt.com/globalservices
 

> -----Original Message-----
> From: Werner Guttmann [mailto:[EMAIL PROTECTED] 
> Sent: Friday, June 15, 2007 5:59 AM
> To: [email protected]
> Subject: Re: [castor-user] castor 1.1.1 warnViaConsoleDialog 
> error continues
> 
> Warren,
> 
> You have basically done everything in the correct way.
> 
> 1) Rename SourceGenerator to SourceGeneratorMain (had you used teh
> proper Ant task for Castor code generation), this would have 
> been hidden
> from you.
> 
> 2) Add the '-nameConflictStrategy informViaLog' parameter to 
> the call to
> SourceGeneratorMain.
> 
> Your mistake was that you changed ...
> 
> org.exolab.castor.builder.nameConflictStrategies=\
> org.exolab.castor.builder.conflictresolution.WarningViaDialogC
> lassNameCRStrategy,\
> org.exolab.castor.builder.conflictresolution.InformViaLogClass
> NameCRStrategy
> 
> to
> 
> org.exolab.castor.builder.nameConflictStrategies=\
> informViaLog
> 
> which obviously is wrong, as the
> 'org.exolab.castor.builder.nameConflictStrategies' strategy 
> enlists the
> available strategy implementations. In other words, drop this property
> from your custom builder property file, and everything should work.
> 
> Werner
> 
> 
> [EMAIL PROTECTED] wrote:
> > Thank you for your response.
> > 
> > I had hoped that I could drop in castor 1.1.1 without 
> hassling with any
> > existing castor.properties files or ant build procedures.  
> I found that
> > the entry point name had changed to
> > org.exolab.castor.builder.SourceGeneratorMain, and so made 
> that change
> > to something like:
> > 
> > <java classname="org.exolab.castor.builder.SourceGeneratorMain"
> > fork="Yes" dir="." failonerror="true">
> >   <arg line="-dest src -i codegen/cmi-classes.xsd -f 
> -verbose -types j2
> > -package com.syntegra.cmi.interfaces />
> > 
> > Then I got the warnViaConsoleDialog errors, and after 
> poking around a
> > number of sites, eventually concluded based on the sketchy 
> information I
> > found that perhaps I could just add a new option to the 
> command line.
> > Ergo, something like:
> > 
> > <java classname="org.exolab.castor.builder.SourceGeneratorMain"
> > fork="Yes" dir="." failonerror="true">
> >   <arg line="-dest src -i codegen/cmi-classes.xsd -f 
> -verbose -types j2
> > -package com.syntegra.cmi.interfaces -nameConflictStrategy
> > informViaLog/>
> > 
> > When the warnViaConsoleDialog errors persisted, I tried 
> modifying the
> > castor.properties file, first adding 
> >   org.exolab.castor.builder.automaticConflictResolution=true
> > then trying
> >   
> org.exolab.castor.builder.nameConflictStrategy=warnViaConsoleDialog
> > then trying
> >   org.exolab.castor.builder.nameConflictStrategy=informViaLog
> > 
> > But there was no change to the warnViaConsoleDialog errors.
> > 
> >> is there any specific reason as to why you are not using 
> the Ant task
> >> definition as documented at
> >>
> >> http://castor.org/srcgen-binding.html#Class-generation-conflicts
> > 
> > I had not seen it, and even if I had, I would have figured 
> I could just
> > expand the current command line args that were in use 
> (which is what I
> > did) as noted above. So I have just now tried defining the 
> following per
> > your note (and the above url):
> > 
> >     <target name="codegen-cmi" description="generates classes from
> > xml">
> >         <taskdef name="castor-srcgen"
> > classname="org.castor.anttask.CastorCodeGenTask">
> >             <classpath refid="castor.srcgen.class.path" />
> >         </taskdef>
> >         <castor-srcgen file="codegen/cmi-classes.xsd"
> >                        todir="src"
> >                        package="com.syntegra.cmi.interfaces"
> >                        types="j2"
> >                        warnings="true"
> >                              verbose="true"/>
> >     </target>
> > 
> > and still get an error:
> > 
> > [castor-srcgen] Jun 14, 2007 5:02:13 PM
> > 
> org.exolab.castor.builder.conflictresolution.ClassNameCRStrate
> gyRegistry
> > getClassNameConflictResolutionStrategy
> > [castor-srcgen] SEVERE: The ClassNameConflictResolutionStrategy
> > 'warnViaConsoleDialog' does not exist in the Castor builder 
> properties
> > file and is therefore not supported.
> > 
> > So it seems like no essential difference from the command 
> line argument
> > approach I had originally used.
> > 
> > So apparently I can't just use defaults, and I cannot change the
> > behavior
> >>from the args or castorbuilder.properties file, and have to call/set
> > something else, such as perhaps calling setNameConflictStrategy in
> > org.exolab.castor.builder.SourceGenerator.  Forgive my 
> ignorance, but
> > how do I do that within the above ant target/taskdef construct?
> > 
> >> Having said that, selecting a name conflict resolution 
> strategy is not
> >> done via the castorbuilder.properties, but by various 
> other means as
> >> documented on that page.
> >>
> >> In any way, please do *not* change the
> >>
> >> org.exolab.castor.builder.nameConflictStrategy
> >>
> >> property as defined in the default castorbuilder.properties, as it
> >> *enlists* the available strategies. To select one of the 
> >> available ones,
> >> please follow the instructions give above.
> > 
> > I thought I had seen 
> org.exolab.castor.builder.nameConflictStrategies
> > defined in castorbuilder.properties, not
> > org.exolab.castor.builder.nameConflictStrategy. And the docs sure 
> > sounded like setting org.exolab.castor.builder.nameConflictStrategy
> > was a normal kind of thing to do.
> > 
> > Many thanks you for your response and assistance.
> > 
> > btw:
> > - on the org.exolab.castor.builder.SourceGeneratorMain" 
> link has a bogus
> > trailing ".
> > - 
> org.exolab.castor.builder.automaticConflictResolutionTypeSuffix=ByBy
> > has a redundant By?
> > 
> > 
> ---------------------------------------------------------------------
> > 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

Reply via email to