RE: Compilation errors in generated code (cannot resolve symbol)
[email protected] Wed, 09 Feb 2005 19:49:29 -0500
| Newsgroups | gmane.comp.java.ejb.middlegen.user |
|---|---|
| Message-ID | <[email protected]> |
This error seems to be a common Middlegen problem. I'm getting it on a class that's in a bidirectional 1:* relationship. The RDMS is Oracle. The relationship is: ~ build.xml ~ > <middlegen... > > <table name="MY_CLASSES" generate="true"> > <crossref fktable="MY_CLASS_SYM" pkcolumn="CLASS_INDEX" fkcolumn="CLASS_INDEX"/> > </table> > > <table name="MY_CLASS_SYM" generate="true"> > </table> > > </middlegen> The error is: > [ejbdoclet] Generating jbosscmp-jdbc.xml. > > compile-ejb: > [javac] Compiling 83 source files to C:\middlegen-2.1\samples\build\classes > [javac] C:\middlegen-2.1\samples\build\gen-src\mytree\ejb\myClassBean.j > ava:223: cannot find symbol > [javac] symbol : variable myClassSyms > [javac] location: class mytree.ejb.myClassBean > [javac] setMyClassSyms(myClassSyms); > [javac] ^ > [javac] Note: Some input files use unchecked or unsafe operations. > [javac] Note: Recompile with -Xlint:unchecked for details. > [javac] 1 error > > BUILD FAILED > C:\middlegen-2.1\samples\build.xml:717: Compile failed; see the compiler error o > utput for details. Thanks, Mighty M reply to: [email protected] -----Original Message----- From: Kyle Burke <fnbastard@gm...> Compilation errors in generated code (cannot resolve symbol) 2004-11-02 14:26 I am getting the following errors when running middlegen 2.1. Here are the errors and the code, respectively. It appears that the method is ignoring all of the params and passing a Collection, that doesn"t exist in the generated source code, to another method. Has anyone run into this? I found very limited information regarding anything along these lines. Any help is appreciated. Regards Errors: ------------------------------------------------------------------- [javac] C:\~download\MI-Config App\middlegen\middlegen-2.1\samples\build\gen-src\com\workscape\testproj\ejb\CpPlanCfgBean.java:773: cannot resolve symbol [javac] symbol : variable cpPlanYearXrefs [javac] location: class com.workscape.testproj.ejb.CpPlanCfgBean [javac] setCpPlanYearXrefs(cpPlanYearXrefs); [javac] ^ [javac] C:\~download\MI-Config App\middlegen\middlegen-2.1\samples\build\gen-src\com\workscape\testproj\ejb\CpYearCfgBean.java:533: cannot resolve symbol [javac] symbol : variable cpPlanYearXrefs [javac] location: class com.workscape.testproj.ejb.CpYearCfgBean [javac] setCpPlanYearXrefs(cpPlanYearXrefs); [javac] ^ [javac] 2 errors ------------------------------------------------------------------- Code: ------------------------------------------------------------------- public void ejbPostCreate( java.lang.String cpPlanId, java.lang.String cpPlanName, java.lang.String cpPlanDesc, int sortOrder, java.lang.String custom1, java.lang.String custom2, java.lang.String custom3, java.lang.String custom4, java.lang.String custom5, java.lang.String custom6, java.lang.String custom7, java.lang.String custom8, java.lang.String custom9, java.lang.String custom10, java.sql.Timestamp ctlInsDttm, java.sql.Timestamp ctlUpdDttm, java.math.BigDecimal ctlTransSeqnum, int ctlUpdSeq, java.lang.String ctlDeletedInd ) throws javax.ejb.CreateException { // Set CMR fields setCpPlanYearXrefs(cpPlanYearXrefs); } ------------------------------------------------------------------- ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click