Hi Armin,

Here is the code of the class and inner class in question.

Rob

package com.netcase.netspat.recordSystem.bo;

import com.netcase.bo.BaseObject;

public class Country extends BaseObject {
        
        /*
         * Fields
         */
        
        /**
         * @ojb.field jdbc-type="VARCHAR" length="254"
         */
        private String countryCode;
        
        /**
         * @ojb.field jdbc-type="VARCHAR" length="254"
         */
        private String name;
        
        /**
         * @ojb.field jdbc-type="INTEGER"
conversion="org.apache.ojb.broker.accesslayer.conversions.Boolean2IntFie
ldConversion"
         */
        private Boolean directFiling;
        
        /**
         * @ojb.field jdbc-type="VARCHAR" length="254"
conversion="com.netcase.ojb.conversions.Enum2VarcharFieldConversion"
         */
        private PCTMemberOptions pctMember;
        
        /**
         * @ojb.field jdbc-type="VARCHAR" length="254"
conversion="com.netcase.ojb.conversions.Enum2VarcharFieldConversion"
         */
        private EPMemberOptions epMember;
        
        /**
         * @ojb.field jdbc-type="VARCHAR" length="254"
conversion="com.netcase.ojb.conversions.Enum2VarcharFieldConversion"
         */
        private EPTranslationOptions epTranslations;
        
        /**
         * @ojb.field jdbc-type="INTEGER"
conversion="org.apache.ojb.broker.accesslayer.conversions.Boolean2IntFie
ldConversion"
         */
        private Boolean publicationOccurs;
        
        /**
         * @ojb.field jdbc-type="INTEGER"
conversion="org.apache.ojb.broker.accesslayer.conversions.Boolean2IntFie
ldConversion"
         */
        private Boolean searchOccurs;
        
        /**
         * @ojb.field jdbc-type="INTEGER"
conversion="org.apache.ojb.broker.accesslayer.conversions.Boolean2IntFie
ldConversion"
         */
        private Boolean examinationOccurs;
        
        /**
         * @ojb.field jdbc-type="INTEGER"
conversion="org.apache.ojb.broker.accesslayer.conversions.Boolean2IntFie
ldConversion"
         */
        private Boolean officialActionsOccur;
        
        /**
         * @ojb.field jdbc-type="INTEGER"
conversion="org.apache.ojb.broker.accesslayer.conversions.Boolean2IntFie
ldConversion"
         */
        private Boolean grantOccurs;
        
        /**
         * @ojb.field jdbc-type="VARCHAR" length="254"
conversion="com.netcase.ojb.conversions.Enum2VarcharFieldConversion"
         */
        private RenewalsOptions renewals;
        
        /**
         * @ojb.field jdbc-type="INTEGER"
         */
        private Integer patentTerm;
        
        /**
         * @ojb.field jdbc-type="INTEGER"
         */
        private Integer basePages;
        
        /**
         * @ojb.field jdbc-type="INTEGER"
         */
        private Integer baseClaims;
        
        
        /*
         * References
         */
        
        /**
         * @ojb.reference foreignkey="currencyId"
         */
        private Currency currency;
        
        /*
         * Nested
         */
        
        /**
         * @ojb.nested
         * @ojb.modify-nested name="id"
     *                    primarykey=""
         */
        private CountryDateSet publicationDates;
        
        /**
         * @ojb.nested
         * @ojb.modify-nested name="id"
     *                    primarykey=""
         */
        private CountryDateSet submitSearchRequestDates;
        
        /**
         * @ojb.nested
         * @ojb.modify-nested name="id"
     *                    primarykey=""
         */
        private CountryDateSet receiveSearchResultsDates;
        
        /**
         * @ojb.nested
         * @ojb.modify-nested name="id"
     *                    primarykey=""
         */
        private CountryDateSet requestExaminationDates;
        
        /**
         * @ojb.nested
         * @ojb.modify-nested name="id"
     *                    primarykey=""
         */
        private CountryDateSet captureAcceptanceDataDates;
        
        /**
         * @ojb.nested
         * @ojb.modify-nested name="id"
     *                    primarykey=""
         */
        private CountryDateSet receiveActualGrantDates;
        
        /**
         * @ojb.nested
         * @ojb.modify-nested name="id"
     *                    primarykey=""
         */
        private CountryDateSet officialActionsDates;
        
        
        /*
         * Constructors 
         */
        
        public Country() {
                super();
        }

        public Country(int id) {
                super(id);
        }
        
        /**
         * @return the baseClaims
         */
        public Integer getBaseClaims() {
                return baseClaims;
        }

        /**
         * @param baseClaims the baseClaims to set
         */
        public void setBaseClaims(Integer baseClaims) {
                this.baseClaims = baseClaims;
        }

        /**
         * @return the basePages
         */
        public int getBasePages() {
                return basePages;
        }

        /**
         * @param basePages the basePages to set
         */
        public void setBasePages(int basePages) {
                this.basePages = basePages;
        }

        /**
         * @return the captureAcceptanceDataDates
         */
        public CountryDateSet getCaptureAcceptanceDataDates() {
                return captureAcceptanceDataDates;
        }

        /**
         * @param captureAcceptanceDataDates the
captureAcceptanceDataDates to set
         */
        public void setCaptureAcceptanceDataDates(
                        CountryDateSet captureAcceptanceDataDates) {
                this.captureAcceptanceDataDates =
captureAcceptanceDataDates;
        }

        /**
         * @return the countryCode
         */
        public String getCountryCode() {
                return countryCode;
        }

        /**
         * @param countryCode the countryCode to set
         */
        public void setCountryCode(String countryCode) {
                this.countryCode = countryCode;
        }

        /**
         * @return the directFiling
         */
        public boolean isDirectFiling() {
                return directFiling;
        }

        /**
         * @param directFiling the directFiling to set
         */
        public void setDirectFiling(boolean directFiling) {
                this.directFiling = directFiling;
        }

        /**
         * @return the epMember
         */
        public EPMemberOptions getEpMember() {
                return epMember;
        }

        /**
         * @param epMember the epMember to set
         */
        public void setEpMember(EPMemberOptions epMember) {
                this.epMember = epMember;
        }

        /**
         * @return the epTranslations
         */
        public EPTranslationOptions getEpTranslations() {
                return epTranslations;
        }

        /**
         * @param epTranslations the epTranslations to set
         */
        public void setEpTranslations(EPTranslationOptions
epTranslations) {
                this.epTranslations = epTranslations;
        }

        /**
         * @return the examinationOccurs
         */
        public boolean isExaminationOccurs() {
                return examinationOccurs;
        }

        /**
         * @param examinationOccurs the examinationOccurs to set
         */
        public void setExaminationOccurs(boolean examinationOccurs) {
                this.examinationOccurs = examinationOccurs;
        }

        /**
         * @return the grantOccurs
         */
        public boolean isGrantOccurs() {
                return grantOccurs;
        }

        /**
         * @param grantOccurs the grantOccurs to set
         */
        public void setGrantOccurs(boolean grantOccurs) {
                this.grantOccurs = grantOccurs;
        }

        /**
         * @return the name
         */
        public String getName() {
                return name;
        }

        /**
         * @param name the name to set
         */
        public void setName(String name) {
                this.name = name;
        }

        /**
         * @return the currency
         */
        public Currency getCurrency() {
                return currency;
        }

        /**
         * @param currency the currency to set
         */
        public void setCurrency(Currency currency) {
                this.currency = currency;
        }

        /**
         * @return the officialActionsDates
         */
        public CountryDateSet getOfficialActionsDates() {
                return officialActionsDates;
        }

        /**
         * @param officialActionsDates the officialActionsDates to set
         */
        public void setOfficialActionsDates(CountryDateSet
officialActionsDates) {
                this.officialActionsDates = officialActionsDates;
        }

        /**
         * @return the officialActionsOccur
         */
        public boolean isOfficialActionsOccur() {
                return officialActionsOccur;
        }

        /**
         * @param officialActionsOccur the officialActionsOccur to set
         */
        public void setOfficialActionsOccur(boolean
officialActionsOccur) {
                this.officialActionsOccur = officialActionsOccur;
        }

        /**
         * @return the patentTerm
         */
        public int getPatentTerm() {
                return patentTerm;
        }

        /**
         * @param patentTerm the patentTerm to set
         */
        public void setPatentTerm(int patentTerm) {
                this.patentTerm = patentTerm;
        }

        /**
         * @return the pctMember
         */
        public PCTMemberOptions getPctMember() {
                return pctMember;
        }

        /**
         * @param pctMember the pctMember to set
         */
        public void setPctMember(PCTMemberOptions pctMember) {
                this.pctMember = pctMember;
        }

        /**
         * @return the publicationDates
         */
        public CountryDateSet getPublicationDates() {
                return publicationDates;
        }

        /**
         * @param publicationDates the publicationDates to set
         */
        public void setPublicationDates(CountryDateSet publicationDates)
{
                this.publicationDates = publicationDates;
        }

        /**
         * @return the publicationOccurs
         */
        public boolean isPublicationOccurs() {
                return publicationOccurs;
        }

        /**
         * @param publicationOccurs the publicationOccurs to set
         */
        public void setPublicationOccurs(boolean publicationOccurs) {
                this.publicationOccurs = publicationOccurs;
        }

        /**
         * @return the receiveActualGrantDates
         */
        public CountryDateSet getReceiveActualGrantDates() {
                return receiveActualGrantDates;
        }

        /**
         * @param receiveActualGrantDates the receiveActualGrantDates to
set
         */
        public void setReceiveActualGrantDates(CountryDateSet
receiveActualGrantDates) {
                this.receiveActualGrantDates = receiveActualGrantDates;
        }

        /**
         * @return the receiveSearchResultsDates
         */
        public CountryDateSet getReceiveSearchResultsDates() {
                return receiveSearchResultsDates;
        }

        /**
         * @param receiveSearchResultsDates the
receiveSearchResultsDates to set
         */
        public void setReceiveSearchResultsDates(
                        CountryDateSet receiveSearchResultsDates) {
                this.receiveSearchResultsDates =
receiveSearchResultsDates;
        }

        /**
         * @return the renewals
         */
        public RenewalsOptions getRenewals() {
                return renewals;
        }

        /**
         * @param renewals the renewals to set
         */
        public void setRenewals(RenewalsOptions renewals) {
                this.renewals = renewals;
        }

        /**
         * @return the requestExaminationDates
         */
        public CountryDateSet getRequestExaminationDates() {
                return requestExaminationDates;
        }

        /**
         * @param requestExaminationDates the requestExaminationDates to
set
         */
        public void setRequestExaminationDates(CountryDateSet
requestExaminationDates) {
                this.requestExaminationDates = requestExaminationDates;
        }

        /**
         * @return the searchOccurs
         */
        public boolean isSearchOccurs() {
                return searchOccurs;
        }

        /**
         * @param searchOccurs the searchOccurs to set
         */
        public void setSearchOccurs(boolean searchOccurs) {
                this.searchOccurs = searchOccurs;
        }

        /**
         * @return the submitSearchRequestDates
         */
        public CountryDateSet getSubmitSearchRequestDates() {
                return submitSearchRequestDates;
        }

        /**
         * @param submitSearchRequestDates the submitSearchRequestDates
to set
         */
        public void setSubmitSearchRequestDates(CountryDateSet
submitSearchRequestDates) {
                this.submitSearchRequestDates =
submitSearchRequestDates;
        }
        
        public class CountryDateSet extends BaseObject {
                
                /*
                 * Fields
                 */
                
                /**
                 * @ojb.field jdbc-type="VARCHAR" length="254"
conversion="com.netcase.ojb.conversions.Enum2VarcharFieldConversion"
                 */
                private CountryDateOptions diariseAt;
                
                /**
                 * @ojb.field jdbc-type="VARCHAR" length="254"
conversion="com.netcase.ojb.conversions.Enum2VarcharFieldConversion"
                 */
                private CountryDateOptions earliestDate;
                
                /**
                 * @ojb.field jdbc-type="INTEGER"
                 */
                private Integer earliestDateDelayInMonths;
                
                /**
                 * @ojb.field jdbc-type="VARCHAR" length="254"
conversion="com.netcase.ojb.conversions.Enum2VarcharFieldConversion"
                 */
                private CountryDateOptions dueDate;
                
                /**
                 * @ojb.field jdbc-type="INTEGER"
                 */
                private Integer dueDateDelayInMonths;
                
                /**
                 * @ojb.field jdbc-type="VARCHAR" length="254"
conversion="com.netcase.ojb.conversions.Enum2VarcharFieldConversion"
                 */
                private CountryDateOptions latestDate;
                
                /**
                 * @ojb.field jdbc-type="INTEGER"
                 */
                private Integer latestDateDelayInMonths;
                
                /**
                 * @ojb.field jdbc-type="INTEGER"
                 */
                private Integer additionalPCTDelayInMonths;
                
                
                /*
                 * Constructors
                 */
                
                public CountryDateSet() {
                        super();
                }

                public CountryDateSet(int id) {
                        super(id);
                }
                
                /**
                 * @return the additionalPCTDelayInMonths
                 */
                public int getAdditionalPCTDelayInMonths() {
                        return additionalPCTDelayInMonths;
                }

                /**
                 * @param additionalPCTDelayInMonths the
additionalPCTDelayInMonths to set
                 */
                public void setAdditionalPCTDelayInMonths(int
additionalPCTDelayInMonths) {
                        this.additionalPCTDelayInMonths =
additionalPCTDelayInMonths;
                }

                /**
                 * @return the diariseAt
                 */
                public CountryDateOptions getDiariseAt() {
                        return diariseAt;
                }

                /**
                 * @param diariseAt the diariseAt to set
                 */
                public void setDiariseAt(CountryDateOptions diariseAt) {
                        this.diariseAt = diariseAt;
                }

                /**
                 * @return the dueDate
                 */
                public CountryDateOptions getDueDate() {
                        return dueDate;
                }

                /**
                 * @param dueDate the dueDate to set
                 */
                public void setDueDate(CountryDateOptions dueDate) {
                        this.dueDate = dueDate;
                }

                /**
                 * @return the dueDateDelayInMonths
                 */
                public int getDueDateDelayInMonths() {
                        return dueDateDelayInMonths;
                }

                /**
                 * @param dueDateDelayInMonths the dueDateDelayInMonths
to set
                 */
                public void setDueDateDelayInMonths(int
dueDateDelayInMonths) {
                        this.dueDateDelayInMonths =
dueDateDelayInMonths;
                }

                /**
                 * @return the earliestDate
                 */
                public CountryDateOptions getEarliestDate() {
                        return earliestDate;
                }

                /**
                 * @param earliestDate the earliestDate to set
                 */
                public void setEarliestDate(CountryDateOptions
earliestDate) {
                        this.earliestDate = earliestDate;
                }

                /**
                 * @return the earliestDateDelayInMonths
                 */
                public int getEarliestDateDelayInMonths() {
                        return earliestDateDelayInMonths;
                }

                /**
                 * @param earliestDateDelayInMonths the
earliestDateDelayInMonths to set
                 */
                public void setEarliestDateDelayInMonths(int
earliestDateDelayInMonths) {
                        this.earliestDateDelayInMonths =
earliestDateDelayInMonths;
                }

                /**
                 * @return the latestDateDelayInMonths
                 */
                public int getLatestDateDelayInMonths() {
                        return latestDateDelayInMonths;
                }

                /**
                 * @param latestDateDelayInMonths the
latestDateDelayInMonths to set
                 */
                public void setLatestDateDelayInMonths(int
latestDateDelayInMonths) {
                        this.latestDateDelayInMonths =
latestDateDelayInMonths;
                }

                /**
                 * @return the latestDate
                 */
                public CountryDateOptions getLatestDate() {
                        return latestDate;
                }

                /**
                 * @param latestDate the latestDate to set
                 */
                public void setLatestDate(CountryDateOptions latestDate)
{
                        this.latestDate = latestDate;
                }
        }
        
        public enum CountryDateOptions {
                PRIORITY,
                SUBSTANTIVE_FILING,
                ACTUAL_FILING_DATE,
                SUBMIT_SEARCH_REQUEST,
                SUBMIT_EXAMINATION_REQUEST,
                GRANT_ACCEPTANCE,
                ACTUAL_GRANT;
        }
        
        public enum EPMemberOptions {
                NO,
                NORMAL,
                EXTENSION;
        }
        
        public enum EPTranslationOptions {
                ALL_PAGES,
                CLAIMS_PAGES_ONLY;
        }
        
        public enum PCTMemberOptions {
                YES,
                NO,
                YES_BUT_NO_FILING_ALLOWED;
        }
        
        public enum RenewalsOptions {
                NO_RENEWALS,
                ANNIVERSARIES_FROM_SF,
                ANNIVERSARIES_FROM_SF_CATCH_UP_FROM_GRANT,
                MONTHS_FROM_GRANT,
                ANNIVERSARIES_FROM_GRANT,
                CLAIMS_BASED_RENEWALS;
        }
        
}

-----Original Message-----
From: Armin Waibel [mailto:[EMAIL PROTECTED] 
Sent: 10 September 2007 10:34
To: OJB Users List
Subject: Re: Error with nested class

Hi Robert,

could you please post the mapping and java source for class Country (I 
expect that this is the class which declares field 'publicationDates'?)
too.

regards,
Armin

Robert Giddings wrote:
> Hi,
>  
> Can anyone tell me why I get this runtime exception when using OJB as
> the inner class is neither abstract nor an interface and has a no
> parameter default constructor. The inner class does extend an abstract
> class, but that doesn't seem to be a problem.
>  
> Thanks,
>  
> Robert Giddings
>  
> Caused by: org.apache.ojb.broker.metadata.MetadataException: Can't
> create nested
>  object of type 'class
> com.netcase.netspat.recordSystem.bo.Country$CountryDateSe
> t' for field 'publicationDates'
>         at
> org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldDirectImpl.
> set(Unknown Source)
>         at
> org.apache.ojb.broker.accesslayer.RowReaderDefaultImpl.buildOrRefresh
> Object(Unknown Source)
>         at
> org.apache.ojb.broker.accesslayer.RowReaderDefaultImpl.readObjectFrom
> (Unknown Source)
>         at
> org.apache.ojb.broker.accesslayer.RsIterator.getObjectFromResultSet(U
> nknown Source)
>         at org.apache.ojb.broker.accesslayer.RsIterator.next(Unknown
> Source)
>         at
> org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(
> Unknown Source)
>         at
> org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(
> Unknown Source)
>         at
> org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(
> Unknown Source)
>         at
> org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollectionByQuery
> (Unknown Source)
>         at
> org.apache.ojb.broker.core.DelegatingPersistenceBroker.getCollectionB
> yQuery(Unknown Source)
>         at
> org.apache.ojb.broker.core.DelegatingPersistenceBroker.getCollectionB
> yQuery(Unknown Source)
>         at
> com.netcase.database.DAOService.getObjectsByType(DAOService.java:41)
>         ... 21 more
> Caused by: java.lang.InstantiationException:
> com.netcase.netspat.recordSystem.bo
> .Country$CountryDateSet
>         at java.lang.Class.newInstance0(Class.java:335)
>         at java.lang.Class.newInstance(Class.java:303)
>         at org.apache.ojb.broker.util.ClassHelper.newInstance(Unknown
> Source)
>         ... 33 more
> 

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




-- 
No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.485 / Virus Database: 269.13.12/997 - Release Date:
09/09/2007 10:17



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

Reply via email to