7 Replies Latest reply on Jun 16, 2004 2:24 PM by robin2

    Erroneous Error Msg. When Hot-Deploying

    robin2 Newbie

      hello i added a couple new cmp fields to a couple EJB's, updated all appropriate .xml and .java files, etc ... recompiled and deployed. everything works great. however when i HOT DEPLOY, for some reason the container manager hiccups on these recent changes i made ... but only when i hot deploy. i've double and triple checked all my ejbs, cmp.xml files etc ... but like i said everything works fine on startup.

      here is the STDERR output:

      15:37:09,126 WARN [verifier] EJB spec violation:
      Bean : VendorContactEJB
      Section: 10.6.2
      Warning: The entity bean class must define a get accessor for each CMP field.
      Info : Field: licenseType

      15:37:09,126 WARN [verifier] EJB spec violation:
      Bean : VendorContactEJB
      Section: 10.6.2
      Warning: The entity bean class must define a set accessor for each CMP field.
      Info : Field: licenseType

      15:37:09,136 WARN [verifier] EJB spec violation:
      Bean : TrxnEJB
      Section: 10.6.2
      Warning: The entity bean class must define a get accessor for each CMP field.
      Info : Field: checkNumber

      15:37:09,187 WARN [verifier] EJB spec violation:
      Bean : TrxnEJB
      Section: 10.6.2
      Warning: The entity bean class must define a set accessor for each CMP field.
      Info : Field: checkNumber

      15:37:09,217 ERROR [MainDeployer] could not create deployment: file:/C:/java/jboss/server/default/tmp/deploy/tmp19834eventLogic.ear-contents/eventLogic.jar
      org.jboss.deployment.DeploymentException: Verification of Enterprise Beans failed, see above for error messages.
      at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:491)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:786)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:778)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:641)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
      at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy6.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:458)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:212)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)
      15:37:09,317 ERROR [MainDeployer] could not create deployment: file:/C:/java/jboss/server/default/deploy/eventLogic.ear
      org.jboss.deployment.DeploymentException: Verification of Enterprise Beans failed, see above for error messages.
      at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:491)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:786)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:778)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:641)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
      at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy6.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:458)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:212)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)




      i'm using 3.2.3, postgres 7.4.2, windows xp, jdk 1.4.1.

      anyone seen anything like this?

      thanks,

      -robin

        • 1. Re: Erroneous Error Msg. When Hot-Deploying
          dannyyates Newbie

          At the risk of sounding stupid, have you read the error message? Have you definied get and set methods for the CMP fields mentioned? If so, show the bean's code (including the interfaces, etc.)

          • 2. Re: Erroneous Error Msg. When Hot-Deploying
            robin2 Newbie

            yes, i have read the error message ;-) i don't see an option to attach files to posts, so i guess i'm just going to be pasting it here. there are two EJB's in question according to the error message - i'll just paste source code for the first one in order to keep things a bit more managable.

            as far as i can tell, the CMP field it's complaining about, "licenseType", is implemented properly.

            thank you for your interest.

            -robin

            VendorContactBean.java:

            //BEGIN

            package com.eventlogic.ejb.vendor.contact;

            import java.util.*;
            import javax.ejb.*;

            public abstract class VendorContactBean implements EntityBean {

            public Long ejbCreate(Long guid) throws CreateException {

            setGUID(guid);
            return null;
            }

            public void ejbPostCreate(Long guid) {}

            // relationship fields
            public abstract Collection getVendorContactNumbers();
            public abstract void setVendorContactNumbers(Collection contactNumbers);

            // persistence fields
            public abstract Long getGUID();
            public abstract void setGUID(Long guid);

            public abstract long getVendorGUID();
            public abstract void setVendorGUID(long vendorGUID);

            public abstract String getLastName();
            public abstract void setLastName(String lastName);

            public abstract String getFirstName();
            public abstract void setFirstName(String firstName);

            public abstract String getMiddleInitial();
            public abstract void setMiddleInitial(String middleInitial);

            public abstract String getAddress1();
            public abstract void setAddress1(String address1);

            public abstract String getAddress2();
            public abstract void setAddress2(String address2);

            public abstract String getCity();
            public abstract void setCity(String city);

            public abstract String getState();
            public abstract void setState(String state);

            public abstract String getCountry();
            public abstract void setCountry(String country);

            public abstract String getZip();
            public abstract void setZip(String zip);

            public abstract String getEmail();
            public abstract void setEmail(String email);

            public abstract String getSSN();
            public abstract void setSSN(String ssn);

            public abstract String getDriversLicenseNumber();
            public abstract void setDriversLicenseNumber(String driversLicenseNumber);

            public abstract java.util.Date getDriversLicenseExpiration();
            public abstract void setDriversLicenseExpiration(java.util.Date aDate);

            public abstract String getDriversLicenseState();
            public abstract void setDriversLicenseState(String driversLicenseState);

            public abstract String getLicenseType();
            public abstract void setLicenseType(String driversLicenseState);

            public abstract String getNotes();
            public abstract void setNotes(String notes);

            public abstract java.sql.Timestamp getDateAdded();
            public abstract void setDateAdded(java.sql.Timestamp ts);

            public abstract java.sql.Timestamp getDateUpdated();
            public abstract void setDateUpdated(java.sql.Timestamp ts);

            // standard callback methods
            public void setEntityContext(EntityContext ctx) {}
            public void unsetEntityContext() {}
            public void ejbActivate() {}
            public void ejbPassivate() {}
            public void ejbLoad() {}
            public void ejbStore() {}
            public void ejbRemove() {}
            }

            //END


            VendorContactHomeLocal.java:

            //BEGIN

            package com.eventlogic.ejb.vendor.contact;

            import javax.ejb.*;

            public interface VendorContactHomeLocal extends javax.ejb.EJBLocalHome {

            public VendorContactLocal create(Long guid) throws EJBException, CreateException;
            public VendorContactLocal findByPrimaryKey(Long pk) throws EJBException, FinderException;
            }

            //END

            VendorLocal.java:

            //BEGIN

            package com.eventlogic.ejb.vendor;

            import com.eventlogic.ejb.vendor.contact.*;
            import javax.ejb.*;
            import java.util.*;

            public interface VendorLocal extends EJBLocalObject {

            // relationship fields
            public abstract VendorContactLocal getPrimaryContact() throws EJBException;
            public abstract void setPrimaryContact(VendorContactLocal contact) throws EJBException;

            public abstract Collection getVendorServices() throws EJBException;
            public abstract void setVendorServices(Collection vendorServices) throws EJBException;

            public abstract Collection getVendorLicenses() throws EJBException;
            public abstract void setVendorLicenses(Collection vendorLicenses) throws EJBException;

            public abstract Collection getVendorContainers() throws EJBException;
            public abstract void setVendorContainers(Collection collContainers) throws EJBException;

            public abstract Collection getVendorVehicles() throws EJBException;
            public abstract void setVendorVehicles(Collection vendorVehicles) throws EJBException;

            public abstract Collection getVendorContacts() throws EJBException;
            public abstract void setVendorContacts(Collection vendorContacts) throws EJBException;

            // persistence fields
            public abstract Long getGUID() throws EJBException;
            public abstract void setGUID(Long guid) throws EJBException;

            public abstract Long getPrimaryContactGUID() throws EJBException;
            public abstract void setPrimaryContactGUID(Long vendorCntactGUID) throws EJBException;

            public abstract int getId() throws EJBException;
            public abstract void setId(int id) throws EJBException;

            public abstract String getName() throws EJBException;
            public abstract void setName(String str) throws EJBException;

            public abstract String getAddress1() throws EJBException;
            public abstract void setAddress1(String str) throws EJBException;

            public abstract String getAddress2() throws EJBException;
            public abstract void setAddress2(String str) throws EJBException;

            public abstract String getCity() throws EJBException;
            public abstract void setCity(String str) throws EJBException;

            public abstract String getState() throws EJBException;
            public abstract void setState(String str) throws EJBException;

            public abstract String getCountry() throws EJBException;
            public abstract void setCountry(String str) throws EJBException;

            public abstract String getZip() throws EJBException;
            public abstract void setZip(String str) throws EJBException;

            public abstract String getUrl() throws EJBException;
            public abstract void setUrl(String str) throws EJBException;

            public abstract String getEmail() throws EJBException;
            public abstract void setEmail(String str) throws EJBException;

            public abstract boolean getAcceptsChecks() throws EJBException;
            public abstract void setAcceptsChecks(boolean bool) throws EJBException;

            public abstract String getPaymentSchedule() throws EJBException;
            public abstract void setPaymentSchedule(String str) throws EJBException;

            public abstract String getContainerPaymentSchedule() throws EJBException;
            public abstract void setContainerPaymentSchedule(String str) throws EJBException;

            public abstract String getDealerStatus() throws EJBException;
            public abstract void setDealerStatus(String str) throws EJBException;

            public abstract String getNotes() throws EJBException;
            public abstract void setNotes(String str) throws EJBException;

            public abstract String getInitials() throws EJBException;
            public abstract void setInitials(String str) throws EJBException;

            public abstract java.sql.Timestamp getDateAdded() throws EJBException;
            public abstract void setDateAdded(java.sql.Timestamp ts) throws EJBException;

            public abstract java.sql.Timestamp getDateUpdated() throws EJBException;
            public abstract void setDateUpdated(java.sql.Timestamp ts) throws EJBException;
            }

            //END

            • 3. Re: Erroneous Error Msg. When Hot-Deploying
              Alexey Loubyansky Master

              Make sure you do deploy the correct bean class version and the correct class name is used for VendorContactEJB as ejb-class in ejb-jar.xml.

              • 4. Re: Erroneous Error Msg. When Hot-Deploying
                robin2 Newbie

                alexey, thank you for your interest.

                i quadruple-checked and quintuple-checked my two CMP related xml files, and here is an excerpt from both pertaining to one of the fields generating an error message, "licenseType":

                ejb-jar.xml:


                <ejb-name>VendorContactEJB</ejb-name>
                <cmp-version>2.x</cmp-version>
                <local-home>com.eventlogic.ejb.vendor.contact.VendorContactHomeLocal</local-home>
                com.eventlogic.ejb.vendor.contact.VendorContactLocal
                <ejb-class>com.eventlogic.ejb.vendor.contact.VendorContactBean</ejb-class>
                <persistence-type>Container</persistence-type>
                <prim-key-class>java.lang.Long</prim-key-class>
                False
                <abstract-schema-name>vendorcontact</abstract-schema-name>
                <cmp-field><field-name>GUID</field-name></cmp-field>
                <cmp-field><field-name>vendorGUID</field-name></cmp-field>
                <cmp-field><field-name>firstName</field-name></cmp-field>
                <cmp-field><field-name>lastName</field-name></cmp-field>
                <cmp-field><field-name>middleInitial</field-name></cmp-field>
                <cmp-field><field-name>address1</field-name></cmp-field>
                <cmp-field><field-name>address2</field-name></cmp-field>
                <cmp-field><field-name>city</field-name></cmp-field>
                <cmp-field><field-name>state</field-name></cmp-field>
                <cmp-field><field-name>country</field-name></cmp-field>
                <cmp-field><field-name>zip</field-name></cmp-field>
                <cmp-field><field-name>email</field-name></cmp-field>
                <cmp-field><field-name>SSN</field-name></cmp-field>
                <cmp-field><field-name>notes</field-name></cmp-field>
                <cmp-field><field-name>driversLicenseNumber</field-name></cmp-field>
                <cmp-field><field-name>driversLicenseState</field-name></cmp-field>
                <cmp-field><field-name>licenseType</field-name></cmp-field>
                <cmp-field><field-name>driversLicenseExpiration</field-name></cmp-field>
                <cmp-field><field-name>dateAdded</field-name></cmp-field>
                <cmp-field><field-name>dateUpdated</field-name></cmp-field>
                <primkey-field>GUID</primkey-field>
                <security-identity><use-caller-identity/></security-identity>
                <ejb-local-ref>
                <ejb-ref-name>ejb/VendorContactNumberEJB</ejb-ref-name>
                <ejb-ref-type>Entity</ejb-ref-type>
                <local-home>com.eventlogic.ejb.vendor.contactnumber.VendorContactNumberHomeLocal</local-home>
                com.eventlogic.ejb.vendor.contactnumber.VendorContactNumberLocal
                <ejb-link>VendorContactNumberEJB</ejb-link>
                </ejb-local-ref>




                jboss-jdbc.xml:


                <ejb-name>VendorContactEJB</ejb-name>
                <table-name>vendor_contacts</table-name>

                <cmp-field><field-name>GUID</field-name><column-name>guid</column-name></cmp-field>
                <cmp-field><field-name>vendorGUID</field-name><column-name>vendor_guid</column-name></cmp-field>
                <cmp-field><field-name>firstName</field-name><column-name>first_name</column-name></cmp-field>
                <cmp-field><field-name>lastName</field-name><column-name>last_name</column-name></cmp-field>
                <cmp-field><field-name>middleInitial</field-name><column-name>middle_initial</column-name></cmp-field>
                <cmp-field><field-name>address1</field-name><column-name>address1</column-name></cmp-field>
                <cmp-field><field-name>address2</field-name><column-name>address2</column-name></cmp-field>
                <cmp-field><field-name>city</field-name><column-name>city</column-name></cmp-field>
                <cmp-field><field-name>state</field-name><column-name>state</column-name></cmp-field>
                <cmp-field><field-name>country</field-name><column-name>country</column-name></cmp-field>
                <cmp-field><field-name>zip</field-name><column-name>zip</column-name></cmp-field>
                <cmp-field><field-name>email</field-name><column-name>email</column-name></cmp-field>
                <cmp-field><field-name>SSN</field-name><column-name>ssn</column-name></cmp-field>
                <cmp-field><field-name>notes</field-name>notes</cmp-field>
                <cmp-field><field-name>driversLicenseNumber</field-name><column-name>drivers_license_number</column-name></cmp-field>
                <cmp-field><field-name>driversLicenseState</field-name><column-name>drivers_license_state</column-name></cmp-field>
                <cmp-field><field-name>licenseType</field-name><column-name>license_type</column-name></cmp-field>
                <cmp-field><field-name>driversLicenseExpiration</field-name><column-name>drivers_license_expiration</column-name></cmp-field>
                <cmp-field><field-name>dateAdded</field-name><column-name>date_added</column-name></cmp-field>
                <cmp-field><field-name>dateUpdated</field-name><column-name>date_updated</column-name></cmp-field>



                the thing that is REALLY perplexing me here, causing great suspicion on my part, is the fact that on initial startup of jboss, everything works great, every time. no problem at all with those two fields. however on HOT DEPLOY, and hot deploy only, when building a new .ear from Eclipse and dropping it into ~jboss/server/default/deploy, jboss tries to restart the app associated with that .ear and craps out on those two fields. and the only thing that sets apart those two fields from all the others in my application is that they are the only two which were recently added.

                on another note, i just noticed that when posting source code before for my EJB's and interfaces associated with this field, i accicentally posted the local interface for VendorEJB and not VendorLocalEJB. at the risk of going copy/paste crazy on this thread, i'm going to paste VendorLocal.java to eliminate any possibility for prior confusion.

                in addition, i changed this line in VendorLocal.java which i found to be a mistake:

                public abstract void setLicenseType(String driversLicenseState);

                to this:

                public abstract void setLicenseType(String licenseType);

                although i don't think that would have affected my problem. indeed, subsequent builds have produced the exact same exception report when hot deploying.

                i'm totally at a loss for a next step with this problem.

                regards,

                -robin

                VendorContactLocal.java:

                package com.eventlogic.ejb.vendor.contact;

                import javax.ejb.EJBException;
                import java.util.Collection;

                public interface VendorContactLocal extends javax.ejb.EJBLocalObject {

                // relationship fields
                public abstract Collection getVendorContactNumbers() throws EJBException;
                public abstract void setVendorContactNumbers(Collection contactNumbers) throws EJBException;

                // persistence fields
                public abstract Long getGUID() throws EJBException;
                public abstract void setGUID(Long guid) throws EJBException;

                public abstract long getVendorGUID() throws EJBException;
                public abstract void setVendorGUID(long vendorGUID) throws EJBException;

                public abstract String getLastName() throws EJBException;
                public abstract void setLastName(String lastName) throws EJBException;

                public abstract String getFirstName() throws EJBException;
                public abstract void setFirstName(String firstName) throws EJBException;

                public abstract String getMiddleInitial() throws EJBException;
                public abstract void setMiddleInitial(String middleInitial) throws EJBException;

                public abstract String getAddress1() throws EJBException;
                public abstract void setAddress1(String address1) throws EJBException;

                public abstract String getAddress2() throws EJBException;
                public abstract void setAddress2(String address2) throws EJBException;

                public abstract String getCity() throws EJBException;
                public abstract void setCity(String city) throws EJBException;

                public abstract String getState() throws EJBException;
                public abstract void setState(String state) throws EJBException;

                public abstract String getCountry() throws EJBException;
                public abstract void setCountry(String country) throws EJBException;

                public abstract String getZip() throws EJBException;
                public abstract void setZip(String zip) throws EJBException;

                public abstract String getEmail() throws EJBException;
                public abstract void setEmail(String email) throws EJBException;

                public abstract String getSSN() throws EJBException;
                public abstract void setSSN(String ssn) throws EJBException;

                public abstract String getDriversLicenseNumber() throws EJBException;
                public abstract void setDriversLicenseNumber(String driversLicenseNumber) throws EJBException;

                public abstract java.util.Date getDriversLicenseExpiration() throws EJBException;
                public abstract void setDriversLicenseExpiration(java.util.Date aDate) throws EJBException;

                public abstract String getDriversLicenseState() throws EJBException;
                public abstract void setDriversLicenseState(String driversLicenseState) throws EJBException;

                public abstract String getLicenseType() throws EJBException;
                public abstract void setLicenseType(String licenseType) throws EJBException;

                public abstract String getNotes() throws EJBException;
                public abstract void setNotes(String notes) throws EJBException;

                public abstract java.sql.Timestamp getDateAdded() throws EJBException;
                public abstract void setDateAdded(java.sql.Timestamp ts) throws EJBException;

                public abstract java.sql.Timestamp getDateUpdated() throws EJBException;
                public abstract void setDateUpdated(java.sql.Timestamp ts) throws EJBException;
                }

                • 5. Re: Erroneous Error Msg. When Hot-Deploying
                  robin2 Newbie

                  minor correction: when i said:

                  "in addition, i changed this line in VendorLocal.java which i found to be a mistake: "

                  i mean to say that:

                  "in addition, i changed this line in VendorContactLocal.java which i found to be a mistake: "

                  • 6. Re: Erroneous Error Msg. When Hot-Deploying
                    Alexey Loubyansky Master

                    Maybe you have another version of the bean class in the classpath?

                    • 7. Re: Erroneous Error Msg. When Hot-Deploying
                      robin2 Newbie

                      BINGO! thank you for your help, alexey. i had an old .ear from when i had used this project as a template/start for a new project ... and when i deleted that .ear file (which included old versions of VendorContactXXX.java), this particular problem of mine with hot deployment was resolved. now i can move on to my next problem with hot deployment. THANKS!!!

                      -robin