I believe that I found the cause.

My deployment descriptor had these two fields that pointed to the same column.

  <entity>
    <ejb-name>Foo_BarEJB</ejb-name>
    <local-home>test.BarHome </local-home>
    <local>test.Bar</local>
    <ejb-class>test.BarBean</ejb-class>

    <prim-key-class>int</prim-key-class>
    <primkey-field>foundInId</primkey-field>

    <persistence-type>Container</persistence-type>
    <reentrant>False</reentrant>

    <abstract-schema-name>Bar</abstract-schema-name>
    <sql-table>BAR</sql-table>

    <cmp-field><field-name>clusterFoundOnId</field-name><sql-column>found_in_id</sql-column></cmp-field>
    ...
</entity>

Commenting out the second definition, and replacing it with an implementation in the BarBean class has allowed the class to compile.

Rob sent me down the path that led to this.

Thanks so much to all.

         Bryan

On 10/30/06, Leland, Robert < [EMAIL PROTECTED]> wrote:
We hit this on another project with 3.0.12/3.0.14 eons ago.
It may have been that Resin 3.X didn't like overloaded methods,
where as resin 2.X it worked ok.
Renaming the overloaded methods so there were no overloads solved the
problem.

-Rob

_________________________________________
Robert Leland                 INTEGRITYOne (Formerly PRIZUM)
P: (703) 581-6522                       1900 Campus Commons Drive
F: (703) 476-7405                        Reston, VA 20191
[EMAIL PROTECTED]


BUSINESS CONSULTING | TECHNOLOGY SOLUTIONS | INNOVATION R&D



> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]] On Behalf Of Scott Ferguson
> Sent: Monday, October 30, 2006 2:10 PM
> To: General Discussion for the Resin application server
> Subject: Re: [Resin-interest] Code generated for CMP with
> Resin 3.0.21 won'tcompile
>
>
> On Oct 30, 2006, at 7:47 AM, Bryan May wrote:
>
> > We've been using Resin 2.1.x for ages now and I thought I
> would try to
> > bite the bullet and upgrade to Resin 3.  Things have been moving
> > swimmingly until I ran into the big stack trace below.
> >
> > The only configuration file that I have changed so far is
> web.xml to
> > use the <database> element and the <ejb-server> element.
> >
> > I have made no modifications to the EJB deployment descriptor.
> >
> > It seems that Amber is creating two member variables with the same
> > name.  Has anybody run into this before?
>
> I've added this as a bug report:
> http://bugs.caucho.com/view.php?id=1429
>
> Do you have any idea why Amber might generate two fields?
> For example, having a super class declare the found_in_id
> field/method.
>
> -- Scott
>
> >
> > Thanks in advance,
> >
> >        Bryan
> >
> > [14:41:36.764] Initializing ejb-server :
> java:comp/env/batproblems_cmp
> > [14:41:37.188] Compiling _ejb/BaT_ArchitectureEJB/
> > ArchitectureBean__Amber.java
> > [14:41:37.188 ] Compiling _ejb/BaT_ArchitectureEJB/
> > ArchitectureBean__EJB.java [14:41:37.188] Compiling
> > _ejb/BaT_AttributeEJB/ AttributeBean__Amber.java [14:41:37.188]
> > Compiling _ejb/BaT_AttributeEJB/AttributeBean__EJB.java
> > [14:41: 37.188] Compiling
> _ejb/BaT_ClusterEJB/ClusterBean__Amber.java
> > [14:41:37.188] Compiling _ejb/BaT_ClusterEJB/ClusterBean__EJB.java
> > [14:41:37.188] Compiling _ejb/BaT_ClusterFoundOnEJB/
> > ClusterFoundOnBean__Amber.java [14:41:37.188] Compiling
> > _ejb/BaT_ClusterFoundOnEJB/ ClusterFoundOnBean__EJB.java
> > [14:41:37.188] Compiling _ejb/BaT_ErrorEJB/BaTErrorBean__Amber.java
> > [14:41:37.188] Compiling _ejb/BaT_ErrorEJB/BaTErrorBean__EJB.java
> > [14:41:37.188] Compiling _ejb/BaT_ErrorSessionEJB/
> > BaTErrorSessionBean__EJB.java [14:41:37.188] Compiling
> > _ejb/BaT_StageEJB/StageBean__Amber.java
> > [14:41:37.188] Compiling _ejb/BaT_StageEJB/StageBean__EJB.java
> > [14:41: 37.902] com.caucho.config.ConfigException:
> > com.caucho.java.JavaCompileException: /export/local/resin/webapps/
> > main/WEB-INF/work/ejb/_ejb/BaT_ClusterFoundOnEJB/
> > ClusterFoundOnBean__Amber.java:58: __amber_found_in_id is already
> > defined in _ejb.BaT_ClusterFoundOnEJB.ClusterFoundOnBean__Amber
> > [14:41: 37.902]   public int __amber_found_in_id;
> > [14:41:37.902]              ^
> > [14:41:37.902] 1 error
> > [14:41:37.902]  at com.caucho.ejb.cfg.EjbConfig.configure
> > (EjbConfig.java:411)
> > [14:41:37.902]  at com.caucho.ejb.EjbServerManager.build
> > (EjbServerManager.java:552)
> > [14:41:37.902]  at com.caucho.ejb.EjbServerManager.init
> > (EjbServerManager.java:540)
> > [14:41:37.902]  at com.caucho.ejb.EJBServer.manualInit
> > (EJBServer.java:669)
> > [14:41:37.902]  at com.caucho.ejb.EJBServer.init
> (EJBServer.java:598)
> > [14:41:37.902]  at sun.reflect.GeneratedMethodAccessor136.invoke
> > (Unknown Source)
> > [14:41:37.902]  at sun.reflect.DelegatingMethodAccessorImpl.invoke
> > (DelegatingMethodAccessorImpl.java:25)
> > [14:41: 37.902]  at java.lang.reflect.Method.invoke(Method.java:324)
> > [14:41:37.902]  at com.caucho.config.BeanTypeStrategy.init
> > (BeanTypeStrategy.java:318)
> > [14:41:37.902]  at com.caucho.config.NodeBuilder.configureImpl
> > (NodeBuilder.java :259)
> > [14:41:37.902]  at com.caucho.config.NodeBuilder.configureChildImpl
> > (NodeBuilder.java:303)
> > [14:41:37.902]  at
> > com.caucho.config.EnvironmentAttributeStrategy.configure
> > (EnvironmentAttributeStrategy.java:56)
> > [14:41: 37.902]  at
> > com.caucho.config.NodeBuilder.configureAttributeImpl
> > (NodeBuilder.java:381)
> > [14:41:37.902]  at com.caucho.config.NodeBuilder.configureBeanImpl
> > (NodeBuilder.java:341)
> > [14:41:37.902]  at com.caucho.config.TypeStrategy.configureBean
> > (TypeStrategy.java:103)
> > [14:41:37.902]  at com.caucho.config.BeanTypeStrategy.configureBean
> > (BeanTypeStrategy.java:228)
> > [14:41:37.902]  at
> > com.caucho.config.EnvironmentTypeStrategy.configureBean
> > (EnvironmentTypeStrategy.java :70)
> > [14:41:37.902]  at com.caucho.config.NodeBuilder.configureBean
> > (NodeBuilder.java:197)
> > [14:41:37.902]  at com.caucho.config.Config.configureBean
> > (Config.java:291)
> > [14:41:37.902]  at com.caucho.config.Config.configureBean
> > (Config.java:262)
> > [14:41:37.902]  at com.caucho.config.core.ResinImport.init
> > (ResinImport.java:142)
> > [14:41:37.902]  at sun.reflect.GeneratedMethodAccessor89.invoke
> > (Unknown Source)
> > [14:41:37.902]  at sun.reflect.DelegatingMethodAccessorImpl.invoke
> > (DelegatingMethodAccessorImpl.java:25)
> > [14:41:37.902]  at java.lang.reflect.Method.invoke(Method.java:324)
> > [14:41: 37.902]  at com.caucho.config.BeanTypeStrategy.init
> > (BeanTypeStrategy.java:318)
> > [14:41:37.902]  at com.caucho.config.NodeBuilder.configureImpl
> > (NodeBuilder.java:259)
> > [14:41: 37.902]  at com.caucho.config.NodeBuilder.configureChildImpl
> > (NodeBuilder.java:303)
> > [14:41:37.902]  at
> > com.caucho.config.EnvironmentAttributeStrategy.configure
> > (EnvironmentAttributeStrategy.java :56)
> > [14:41:37.902]  at
> > com.caucho.config.NodeBuilder.configureAttributeImpl
> > (NodeBuilder.java:381)
> > [14:41:37.902]  at com.caucho.config.TypeStrategy.configureAttribute
> > (TypeStrategy.java :112)
> > [14:41:37.902]  at
> > com.caucho.config.EnvironmentTypeStrategy.configureAttribute
> > (EnvironmentTypeStrategy.java:89)
> > [14:41:37.902]  at com.caucho.config.NodeBuilder.configureAttribute
> > (NodeBuilder.java:230)
> > [14:41: 37.902]  at
> > com.caucho.config.NodeBuilderChildProgram.configureImpl
> > (NodeBuilderChildProgram.java:54)
> > [14:41:37.902]  at
> > com.caucho.config.BuilderProgramContainer.configureImpl
> > (BuilderProgramContainer.java:62)
> > [14:41: 37.902]  at com.caucho.config.BuilderProgram.configure
> > (BuilderProgram.java :60)
> > [14:41:37.902]  at
> >
> com.caucho.server.deploy.EnvironmentDeployController.configureInstance
> > (EnvironmentDeployController.java:377)
> > [14:41: 37.902 ]  at
> >
> com.caucho.server.deploy.EnvironmentDeployController.configureInstance
> > (EnvironmentDeployController.java:61)
> > [14:41:37.902]  at
> > com.caucho.server.deploy.DeployController.startImpl
> > (DeployController.java:619)
> > [14:41: 37.902]  at
> > com.caucho.server.deploy.DeployController.restartImpl
> > (DeployController.java:584)
> > [14:41:37.902]  at
> > com.caucho.server.deploy.StartAutoRedeployAutoStrategy.alarm
> > (StartAutoRedeployAutoStrategy.java:176)
> > [14:41: 37.902]  at
> > com.caucho.server.deploy.DeployController.handleAlarm
> > ( DeployController.java:742)
> > [14:41:37.902]  at com.caucho.util.Alarm.handleAlarm(Alarm.java:339)
> > [14:41:37.902]  at com.caucho.util.Alarm.run(Alarm.java :309)
> > [14:41:37.902]  at com.caucho.util.ThreadPool.runTasks
> > (ThreadPool.java:516)
> > [14:41:37.902]  at
> com.caucho.util.ThreadPool.run(ThreadPool.java:442)
> > [14:41:37.902]  at java.lang.Thread.run(Thread.java:534)
> > [14:41:37.902 ] Caused by: com.caucho.java.JavaCompileException: /
> > export/local/resin/webapps/main/WEB-INF/work/ejb/_ejb/
> > BaT_ClusterFoundOnEJB/ClusterFoundOnBean__Amber.java:58:
> > __amber_found_in_id is already defined in
> > _ejb.BaT_ClusterFoundOnEJB.ClusterFoundOnBean__Amber
> > [14:41:37.902]   public int __amber_found_in_id;
> > [14:41:37.902]              ^
> > [14:41:37.902] 1 error
> > [14:41: 37.902]  at com.caucho.java.InternalCompiler.executeInt
> > (InternalCompiler.java)
> > [14:41:37.902]  at com.caucho.java.InternalCompiler.compileInt
> > (InternalCompiler.java:81)
> > [14:41: 37.902]  at com.caucho.java.AbstractJavaCompiler.run
> > (AbstractJavaCompiler.java:101)
> > [14:41:37.902]  ... 1 more
> > [14:41:37.903] com.caucho.config.LineConfigException : WEB-INF/
> > web.xml:404: com.caucho.java.JavaCompileException: /export/local/
> > resin/webapps/main/WEB-INF/work/ejb/_ejb/BaT_ClusterFoundOnEJB/
> > ClusterFoundOnBean__Amber.java:58: __amber_found_in_id is already
> > defined in _ejb.BaT_ClusterFoundOnEJB.ClusterFoundOnBean__Amber
> > [14:41:37.903]   public int __amber_found_in_id;
> > [14:41:37.903]              ^
> > [14:41:37.903] 1 error
> >
> > _______________________________________________
> > resin-interest mailing list
> > resin-interest@caucho.com
> > http://maillist.caucho.com/mailman/listinfo/resin-interest
>
>
> _______________________________________________
> resin-interest mailing list
> resin-interest@caucho.com
> http://maillist.caucho.com/mailman/listinfo/resin-interest
>

_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to