It is indeed set to package. One of the first things I checked. Didn't want to change it without understanding why it is failing for one application and working for dozens of others.
Guess I'll change it anyway. ed ______________________________________________________________________ Ed Szwedo Web Development Team Lead CSC 109 TW Alexander Drive, Building NCC, Mail Drop N176-05, Research Triangle Park, NC 27711 Information Technology Infrastructure Solutions | Office: (919)541-3955 | Fax: (919)541-3641 | [email protected] | www.csc.com From: Cameron Childress <[email protected]> To: [email protected] Date: 07/14/2009 12:25 PM Subject: Re: [ACFUG Discuss] Error with inherited method Try setting access="public" for the setIsNew() function in gov.epa.rtp.lang.bean It's probably set to access="package". -Cameron On Tue, Jul 14, 2009 at 10:06 AM, <[email protected]> wrote: > > Any help is appreciated. > > > The error is: The setIsNew package method in the > D:\public\data\intranet\gov\epa\rtp\OnlineTraining\Trainee\Trainee.cfc > component cannot be accessed from > D:\public\data\intranet\gov\epa\rtp\onlineTraining\Trainee \TraineeDao.cfc. > > I cannot reproduce this error. > > TraineeDao.cfc and Trainee.cfc both reside in > gov.epa.rtp.onLineTraining.Trainee > > Trainee.cfc inherits "setIsNew" from gov.epa.rtp.lang.bean > > > > Here is the code: > > <cffunction name="create" output="false" > returnType="gov.epa.rtp.OnlineTraining.Trainee.Trainee"> > <cfargument name="trainee" > type="gov.epa.rtp.OnlineTraining.Trainee.Trainee" required="true" > hint="Trainee Bean" /> > > <!--- create a local scope ---> > <cfset var local = structNew() /> > > <!--- Encase KEY_VALUE and INSERT Trainee SQL in a cftransaction > ---> > <cftransaction> > > <!--- Set Primary key to next available number ---> > <cfset arguments.trainee.setTraineeId( getNextKeyValue ('Trainee') ) > /> > > <!--- first lets validate this Trainee ---> > <cfif not arguments.Trainee.validate()> > <!--- if Trainee isn't valid, throw an error ---> > <cfthrow type="Trainee.InvalidTrainee" > message="The Trainee passed into TraineeDao.create() > is not a valid Trainee object." /> > </cfif> > > <cftry> > <cfquery name="local.createTrainee" > datasource="#getDatasource().getName()#"> > INSERT INTO TRAINEE > ( > TRAINEE_ID, > LOCATOR_ID > ) > VALUES > ( > <cfqueryparam > value="#arguments.trainee.getTraineeId()#" cfsqltype="CF_SQL_NUMERIC">, > > <cfqueryparam > value="#arguments.trainee.getLocatorId()#" cfsqltype="CF_SQL_NUMERIC"> > ) > </cfquery> > <cfcatch type="Any"> > <cfthrow type="Trainee.create" > detail="#cfcatch.detail#" > errorcode="#cfcatch.errorcode#" > message="#cfcatch.message#" > extendedinfo="#cfcatch.extendedInfo#"> > </cfcatch> > </cftry> > </cftransaction> > > <!--- update the isNew status to false ---> > <cfset arguments.trainee.setIsNew(false)> > > <cfreturn arguments.trainee /> > </cffunction> > > ______________________________________________________________________ > Ed Szwedo > Web Development Team Lead > CSC > > 109 TW Alexander Drive, Building NCC, Mail Drop N176-05, Research Triangle > Park, NC 27711 > Information Technology Infrastructure Solutions | Office: (919)541-3955 | > Fax: (919)541-3641 | [email protected] | www.csc.com > ------------------------------------------------------------- > To unsubscribe from this list, manage your profile @ > http://www.acfug.org?fa=login.edituserform > > For more info, see http://www.acfug.org/mailinglists > Archive @ http://www.mail-archive.com/discussion%40acfug.org/ > List hosted by FusionLink > ------------------------------------------------------------- -- Cameron Childress Sumo Consulting Inc http://www.sumoc.com --- cell: 678.637.5072 aim: cameroncf email: [email protected] ------------------------------------------------------------- To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by http://www.fusionlink.com ------------------------------------------------------------- ------------------------------------------------------------- To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by http://www.fusionlink.com -------------------------------------------------------------
