I am getting the following error when I deploy my Sequence Entity
Bean.... Has anyone ever seen this? (Bean class is listed below)
===============================================================


[java] In EJB Sequence, CMP fields must NOT be defined in the BeanClass.

     [java]     at
weblogic.ejb20.compliance.EJBComplianceChecker.check(EJBComplianceChecker.ja
va:268)
     [java]     at
weblogic.ejb20.compliance.EJBComplianceChecker.checkDeploymentInfo(EJBCompli
anceChecker.java:232)
     [java]     at
weblogic.ejb20.ejbc.EJBCompiler.complianceCheckJar(EJBCompiler.java:810)
     [java]     at
weblogic.ejb20.ejbc.EJBCompiler.checkCompliance(EJBCompiler.java:766)
     [java]     at
weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java:200)
     [java]     at
weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:476)
     [java]     at
weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:407)
     [java]     at
weblogic.ejb20.deployer.EJBDeployer.runEJBC(EJBDeployer.java:493)
     [java]     at
weblogic.ejb20.deployer.EJBDeployer.compileJar(EJBDeployer.java:763)
     [java]     at
weblogic.ejb20.deployer.EJBDeployer.compileIfNecessary(EJBDeployer.java:701)
     [java]     at
weblogic.ejb20.deployer.EJBDeployer.prepare(EJBDeployer.java:1277)
     [java]     at
weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:477)
     [java]     at
weblogic.j2ee.J2EEApplicationContainer.prepareModule(J2EEApplicationContaine
r.java:2962)
     [java]     at
weblogic.j2ee.J2EEApplicationContainer.prepareModules(J2EEApplicationContain
er.java:1534)
     [java]     at
weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java
:1188)
     [java]     at
weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java
:1031)
     [java]     at
weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.prepare
Container(SlaveDeployer.java:2602)
     [java]     at
weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer(
SlaveDeployer.java:2552)
     [java]     at
weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDep
loyer.java:2474)
     [java]     at
weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeplo
yer.java:798)
     [java]     at
weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.ja
va:507)
     [java]     at
weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.j
ava:465)
     [java]     at
weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.ja
va:25)
     [java]     at
weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
     [java]     at
weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)





Sequence:
=================================
package com.wf.bd.ice.sequence;

/**
 * The Entity bean represents a Sequence
 *
 * @ejb.bean name="Sequence"
 *           display-name="Sequence Generator Entity for ICE"
 *           cmp-version="2.x"
 *           type="CMP"
 *           view-type="local"
 *           local-jndi-name="local/com.wf.bd.ice.sequence.SequenceLocal"
 *           primkey-field="sequenceName"
 *           schema="Sequence"
 *
 * @ejb.pk class="java.lang.String"
 *
 * @ejb.finder signature="java.util.Collection findAll()"
 *
 * @ejb.transaction type="Required"
 *
 * @ejb.permission unchecked="true"
 *
 * @ejb.util generate="physical"
 *
 * @ejb.table-name table-name="T_PRIMARY_KEYS"
 *
 * @ejb.create-table create="false"
 *
 * @ejb.remove-table remove="false"
 *
 **/
public abstract class SequenceBean implements javax.ejb.EntityBean
{
        private javax.ejb.EntityContext myEntityCtx;

        /** Implemetation field for persistent attribute: sequenceName */
        public java.lang.String sequenceName;

        /** Implemetation field for persistent attribute: lastNumberUsed */
        public long lastNumberUsed;

        /** Implemetation field for persistent attribute: blockSize */
        public int blockSize;


    //
-------------------------------------------------------------------------
    // Properties (Getters/Setters)
    //
-------------------------------------------------------------------------

    /**
     * Retrieve the SequenceEntity's sequenceName for use as a primaryKey.
     *
     * No interface method for setSequenceName(..). See page 130 of the EJB
2.0 specification:
     * "Once the primary key for an entity bean has been set, the Bean
Provider must
     * not attempt to change it by use of set accessor methods on the
primary key
     * cmp-fields. The Bean provider should therefore not expose the set
accessor
     * methods for the primary key cmp-fields in the component interface of
the
     * entity bean.". A work around would be to remove and then an re-create
the bean.
     *
     * @ejb.pk-field
     * @ejb.persistent-field
     * @ejb.interface-method view-type="local"
     * @ejb.column-name name="sequence_name"
     */
    public abstract java.lang.String getSequenceName();
    public abstract void setSequenceName(java.lang.String pSequenceName);


        /**
         * Get next key
         *
       * @ejb.interface-method view-type="local"
         */
        public long getNextNumberBlock()
        {
                this.setLastNumberUsed( this.getLastNumberUsed() +
this.getBlockSize() );
                return this.getLastNumberUsed();
        }

    /**
     * Retrieve the SequenceEntity's number block size.
     *
     * @ejb.persistent-field
     * @ejb.interface-method view-type="local"
     * @ejb.column-name name="block_size"
     **/
        public abstract int getBlockSize();
        public abstract void setBlockSize(int pBlockSize);

    /**
     * Retrieve the SequenceEntity's last number used.
     *
     * @ejb.persistent-field
     * @ejb.interface-method view-type="local"
     * @ejb.column-name name="last_number_used"
     **/
        public abstract long getLastNumberUsed();
        public abstract void setLastNumberUsed(long pLastNumberUsed);





    //
-------------------------------------------------------------------------
    // EJB Callbacks
    //
-------------------------------------------------------------------------
    /**
     * Create a TestEntity based on the supplied TestEntity Value Object.
     *
     * @param pSequenceName The name used to create the SequenceEntity.
     *
     * @throws javax.ejb.EJBException If no new unique ID could be retrieved
this will
     *                      rollback the transaction because there is no
     *                      hope to try again
     * @throws javax.ejb.CreateException Because we have to do so (EJB
spec.)
     *
     * @ejb.interface-method view-type="local"
     * @ejb.create-method view-type="local"
     **/
    public java.lang.String ejbCreate(java.lang.String pSequenceName)
    throws javax.ejb.EJBException, javax.ejb.CreateException
    {
                setSequenceName(pSequenceName);
                setLastNumberUsed(1);
                setBlockSize(1);

        return null;
    }

    public void ejbPostCreate(java.lang.String pSequenceName)
    {}

    public void setEntityContext( javax.ejb.EntityContext lContext )
    {
        myEntityCtx = lContext;
    }

    public void unsetEntityContext()
    {
        myEntityCtx = null;
    }

    public void ejbActivate()
    {}

    public void ejbPassivate()
    {}

    public void ejbLoad()
    {}

    public void ejbStore()
    {}

    public void ejbRemove()
    throws javax.ejb.RemoveException
    {}

}






-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to