Did you try customizing hibernate.reveng.xml and ignoring the "All" table? If
you search the archives of this mailing list, you should find out how to do
this. The following issue may help too:

http://issues.appfuse.org/browse/APF-902

Matt


hkadejo wrote:
> 
> That solution does not work I have he himself problem
> 
> ..............
> 
> 11:13:12,092  WARN org.hibernate.cfg.reveng.JDBCReader - Rev.eng. strategy
> did n
> ot report any primary key columns for WM$VERSIONS_IN_LIVE_VIEW
> 11:13:12,107  WARN org.hibernate.cfg.reveng.JDBCReader - The JDBC driver
> didn't
> report any primary key columns in PATH_VIEW. Asking rev.eng. strategy
> 11:13:12,107  WARN org.hibernate.cfg.reveng.JDBCReader - Rev.eng. strategy
> did n
> ot report any primary key columns for PATH_VIEW
> 11:13:12,123  WARN org.hibernate.cfg.reveng.JDBCReader - The JDBC driver
> didn't
> report any primary key columns in RESOURCE_VIEW. Asking rev.eng. strategy
> 11:13:12,123  WARN org.hibernate.cfg.reveng.JDBCReader - Rev.eng. strategy
> did n
> ot report any primary key columns for RESOURCE_VIEW
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Duplicate class name 'xzero.com.model.AllRepcolumn' generated for
> 'org.hi
> bernate.mapping.Table(SYS._ALL_REPCOLUMN)'. Same name where generated for
> 'org.h
> ibernate.mapping.Table(SYS._ALL_REPCOLUMN)'
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Trace
> org.hibernate.cfg.JDBCBinderException: Duplicate class name
> 'xzero.com.model.All
> Repcolumn' generated for
> 'org.hibernate.mapping.Table(SYS._ALL_REPCOLUMN)'. Same
>  name where generated for
> 'org.hibernate.mapping.Table(SYS._ALL_REPCOLUMN)'
>         at
> org.hibernate.cfg.JDBCBinder.createPersistentClasses(JDBCBinder.java:
> 168)
>         at
> org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:91)
>         at
> org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaData
> Configuration.java:40)
>         at
> org.codehaus.mojo.hibernate3.configuration.JDBCComponentConfiguration
> .doConfiguration(JDBCComponentConfiguration.java:67)
>         at
> org.codehaus.mojo.hibernate3.configuration.AbstractComponentConfigura
> tion.getConfiguration(AbstractComponentConfiguration.java:37)
>         at
> org.appfuse.mojo.HibernateExporterMojo.configureExporter(HibernateExp
> orterMojo.java:180)
>         at
> org.appfuse.mojo.exporter.ModelGeneratorMojo.configureExporter(ModelG
> eneratorMojo.java:185)
>         at
> org.appfuse.mojo.HibernateExporterMojo.doExecute(HibernateExporterMoj
> o.java:228)
>         at
> org.appfuse.mojo.exporter.ModelGeneratorMojo.execute(ModelGeneratorMo
> jo.java:153)
>         at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
> nManager.java:443)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
> ultLifecycleExecutor.java:539)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
> Goal(DefaultLifecycleExecutor.java:493)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
> ltLifecycleExecutor.java:463)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
> dleFailures(DefaultLifecycleExecutor.java:311)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
> ts(DefaultLifecycleExecutor.java:278)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
> fecycleExecutor.java:143)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at
> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at
> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> 
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 1 minute 31 seconds
> [INFO] Finished at: Tue Sep 25 11:14:11 CST 2007
> [INFO] Final Memory: 9M/40M
> [INFO]
> ------------------------------------------------------------------------
> 
> 
> 
> 
> 
> 
> mraible wrote:
>> 
>> Here's the solution to specifying where your hibernate.reveng.xml is:
>> 
>>                <configuration>
>>                     <componentProperties>
>>                        
>> <revengfile>src/test/resources/hibernate.reveng.xml</revengfile>
>>                     </componentProperties>
>>                     <genericCore>${amp.genericCore}</genericCore>
>>                     <fullSource>${amp.fullSource}</fullSource>
>>                 </configuration>
>> 
>> Matt
>> 
>> mraible wrote:
>>> 
>>> Can you please enter an issue for this in JIRA? Even if it's possible
>>> to do this w/o changing any code, we should document how to do it.
>>> 
>>> I'll try to look into how to do it later today.
>>> 
>>> Thanks,
>>> 
>>> Matt
>>> 
>>> On 9/19/07, tnsilver <[EMAIL PROTECTED]> wrote:
>>>>
>>>> Thank you. I have been trying to do just that almost all day. It seems
>>>> to me
>>>> that either AMP 2.0 ignores the <revengfile> property (with or without
>>>> path), or my plugin configuration is wrong. I tried several options.
>>>> The
>>>> latest being:
>>>>
>>>>             <plugin>
>>>>                 <groupId>org.codehaus.mojo</groupId>
>>>>                 <artifactId>appfuse-maven-plugin</artifactId>
>>>>                 <version>2.0</version>
>>>>                 <configuration>
>>>>                     <genericCore>${amp.genericCore}</genericCore>
>>>>                     <fullSource>${amp.fullSource}</fullSource>
>>>>
>>>> <revengfile>src/main/resources/hibernate.reveng.xml</revengfile>
>>>>                 </configuration>
>>>>                 <dependencies>
>>>>                     <dependency>
>>>>                         <groupId>${jdbc.groupId}</groupId>
>>>>                         <artifactId>${jdbc.artifactId}</artifactId>
>>>>                         <version>${jdbc.version}</version>
>>>>                     </dependency>
>>>>                 </dependencies>
>>>>             </plugin>
>>>>
>>>> This yeilds a 'appfuse:gen-model' log message saying "Writing
>>>> 'hibernate.reveng.xml' to target\test-classes\hibernate.reveng.xml" but
>>>> unlike the feedback for hibernate.cfg.xml and jdbc.properties it does
>>>> not
>>>> show a "Configuration xxx file loaded:  ...' and there is no evidence
>>>> the
>>>> reveng file is being taken into account.
>>>>
>>>> The other option I tried is wrapping the <revengfile> in
>>>> <componentProperties>. This result in an error "Parameter 'directory'
>>>> is not
>>>> a directory" so I played around more with the first configurations.
>>>> Still,
>>>> even after running "mvn resources:testResources" there is no sign of
>>>> the
>>>> file being read or influencing the process. Is there anything I did
>>>> wrong?
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> mraible wrote:
>>>> >
>>>> > On 9/19/07, tnsilver <[EMAIL PROTECTED]> wrote:
>>>> >>
>>>> >> I'm using Appfuse 2.0-rc1 Struts 2 Basic against Oracle 9. I am
>>>> using
>>>> >> appfuse-maven-plugin version 2.0.
>>>> >> When I run appfuse:gen-model it seems to me the tool is fetching
>>>> records
>>>> >> from Oracle's ALL_TABLES data dictionary. It finally fails on a
>>>> >> 'Duplicate
>>>> >> class name' because my ALL_TABLES contains duplicate table names
>>>> owned by
>>>> >> different schema owners.
>>>> >>
>>>> >> I followed some threads (including here
>>>> >>
>>>> http://www.nabble.com/Error-with-appfuse:gen-model-on-oracle-9-(Appfuse-2.0-rc1-Struts-2-Basic)-t4421565s2369.html)
>>>> >> and followed Matt's advice regarding the hibernate.reveng.xml under
>>>> >> src/main/resources. It has no effect. I'm still getting log messages
>>>> from
>>>> >> org.hibernate.cfg.reveng.JDBCReader attempting to poll different
>>>> schema's
>>>> >> tables, some of which names go against the patterns I defined.
>>>> >
>>>> > Sorry, I gave you bad advice before - digging into the code a bit
>>>> > more, here's the logic:
>>>> >
>>>> > 1. If you specify a <revengfile> in the <configuration> of the
>>>> > appfuse-maven-plugin, it will use that.
>>>> > 2. If you don't specify a path, it looks in
>>>> > target/test-classes/hibernate.reveng.xml
>>>> >
>>>> > Based on #2, I *believe* you can put it in src/test/resources and it
>>>> > will work. If not, you might have to run "mvn
>>>> resources:testResources"
>>>> > to get the file moved into the target directory.
>>>> >
>>>> > Hope this helps,
>>>> >
>>>> > Matt
>>>> >
>>>> >>
>>>> >> I then tried to down grade AMP to 2.0-m3-SNAPSHOT which is suppose
>>>> to
>>>> >> take
>>>> >> hibernate.reveng.xml into account (based on David L.Whitehurst's
>>>> blog on
>>>> >> http://www.jroller.com/dlwhitehurst/entry/maven_mojo_love_for_the)
>>>> but
>>>> >> when
>>>> >> I ran it, it could not find the Oracle driver  and failed. I gave up
>>>> >> then.
>>>> >>
>>>> >> In fact, the more I look into this issue, the more confused I get.
>>>> What's
>>>> >> the verdict? is AMP 2.0 gem-model working for Oracle? Can I some how
>>>> >> control
>>>> >> the reverse engineering process when generating models from DB?
>>>> >>
>>>> >> This is a crucial feature for me. Please help. Thanks.
>>>> >> --
>>>> >> View this message in context:
>>>> >>
>>>> http://www.nabble.com/Is-hibernate.reveng.xml-ignored-by-AMP--How-to-control-reverse-eng--tf4480248s2369.html#a12775143
>>>> >> Sent from the AppFuse - User mailing list archive at Nabble.com.
>>>> >>
>>>> >>
>>>> ---------------------------------------------------------------------
>>>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>> >> For additional commands, e-mail: [EMAIL PROTECTED]
>>>> >>
>>>> >>
>>>> >
>>>> >
>>>> > --
>>>> > http://raibledesigns.com
>>>> >
>>>> > ---------------------------------------------------------------------
>>>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>> > For additional commands, e-mail: [EMAIL PROTECTED]
>>>> >
>>>> >
>>>> >
>>>>
>>>> --
>>>>
>>>> View this message in context:
>>>> http://www.nabble.com/Is-hibernate.reveng.xml-ignored-by-AMP--How-to-control-reverse-eng--tf4480248s2369.html#a12780444
>>>>
>>>> Sent from the AppFuse - User mailing list archive at Nabble.com.
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>
>>>>
>>> 
>>> 
>>> -- 
>>> http://raibledesigns.com
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>> 
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Is-hibernate.reveng.xml-ignored-by-AMP--How-to-control-reverse-eng--tf4480248s2369.html#a12884821
Sent from the AppFuse - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to