WebLogic.ejbc vs weblogic.rmic

[att1.html]

Aseem Rastogi <[email protected]> writes:
See examples/iiop/ejb/stateless/cppclient for an example of how to get
this to work. You have to jump through hoops with VisiBroker.
   I have deployed a stateless EJB in WLS6.1sp1 / NT and I am trying to write a CPP
Visibroker 4.5 client to acces it...
The steps i took:
While doing the ejbc i have given the option -idl by using
java weblogic.ejbc -iiop -idl -idlDirectory d:\idls -idlVerbose -compiler javac
d:\lib\my.jar -d d:\testjava\my.jar
This file generates two IDL files xHome.idl and x.idl, x.idl contains the business method
of my bean
and xHome contains the ejbCreate method...
According to documentation i can use weblogic.rmic to get these same idls however when i
run
java weblogic.rmic -idl -idlVerbose -idlDirectory .\idls xBean
It creates an idl which has no business method in it but has all private variables
defined in my bean....
I am confused which idl file i should be using....??? as i understand if there is no
business method in IDL my client can't call those methods on EJB..The first two are the right ones.
I thought of going another step and try using both the idls one by one and see but
while compiling the idl by command
idl2cpp -I . -namespace -gen_included_files -root_dir .\corba x.idl
i get
idl2cpp: (warning)::CORBA::Environment declared ("orb.idl", line 28) but never defined
idl2cpp: (warning)(references to it will be permitted, but no code will be generated for
this definition)
idl2cpp:IDL native type ::CORBA::AbstractBase has no known translation; generated code
will not be valid
******************This is a VisiBroker bug - but I think you can safely ignore them.
The orb.idl i am using is from VisibrokerFor C++ 4.5
i tried compiling the orb.idl alone but got the same things..
has anyone else seen this behaviour or i am doing smthg wrong.???andy

Similar Messages

  • Weblogic.ejbc wants weblogic.home sysproperty in ant - why

    I found that I had to add the following 'sysproperty' line to an ant target which
    runs weblogic.ejbc:
    <target name="ejbjar" depends="jar">
    <mkdir dir="${java.class.dir}/${package.dir}/tmp"/>
    <java classname="weblogic.ejbc" fork="true" failonerror="true">
    <sysproperty key="weblogic.home" value="c:/bea70/weblogic700/server"/>
    <classpath>
    <path refid="classpathWL"/>
    </classpath>
    <arg line="${java.class.dir}/${archive}.jar ${java.class.dir}/ejb-${archive}.jar"/>
    </java>
    </target>
    If the line is not there I get an error:
    [java] ERROR: Error from ejbc: error in finding weblogic.Home
    If the line is there and points to an invalid weblogic.home directory the error is:
    [java] ERROR: Error from ejbc: Installation file c:\temp\lib\persistence\persistence.install
    does not exist. Could not initialize EJB container managed persistence.
    However the file contains only one line:
    WebLogic_CMP_RDBMS.xml.
    Question: is there a way to specify this value directly to weblogic.ejbc without
    the look-up to the file? In my case I would like to do a build on a machine where
    weblogic is not installed (but of course weblogic.jar is available). It is trivial
    to add the file to the FS somewhere but why bother?

    here is my Ant target looks like...
    <property name="classpath" value="${lib.ext.dir}/j2ee12.jar;${lib.ext.dir}/weblogic.jar;${lib.ext.dir}/log4j-1.2.9.jar;${lib.ext.dir}/struts.jar;${dest.dir}/${ant.project.name}.jar"/>
    <target name="testjar">
    <javac srcdir="${src.dir}" destdir="${ejbc.dir}" classpath="${classpath}"/>
    <ejbjar srcdir="${dest.dir}" descriptordir="${desc.dir}" basejarname="test" classpath="${classpath}">
    <weblogic destdir="${lib.dir}" classpath="${classpath}" oldCMP="false"/>
    <include name="**/ejb-jar.xml" />
    <exclude name="**/weblogic*.xml" />
    <dtd publicid="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" location="${lib.dir}/dtd/ejb20-jar.dtd"/>
    <dtd publicid="-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN" location="${lib.dir}/dtd/weblogic-ejb-jar.dtd"/>
    </ejbjar>
    </target>
    I a not sure where to specify <sysproperty....>
    Please revert back if u know the answer.

  • Auto deploy, weblogic.ejbc, -iiop automatically?

    Hi;
    I am using WLS 6.1sp2 and I don't like to run weblogic.ejbc manually. I
    let the server do it when I deploy when EAR file. Is there a way to make
    the server specify the "-iiop" option when the server automatically runs
    ejbc?
    Paul Rowe

    I guess that's what 'ExtraRmicOptions' property in the ServerConfig is for:
    Returns the extra options passed to rmic during server-side generation.
    in the console it is in the Server -> ... -> compilers tab.
    (or it can be set per-EJB: Return the extra options passed to rmic during
    server-side generation. Note: the default for this attribute must be null.
    If no ExtraRmicOptions are specified on the EJBComponent, the default will
    be pulled from Server.ExtraRmicOptions).
    In weblogic.developer.interest.ejb Paul Rowe <[email protected]> wrote:
    Hi;
    I am using WLS 6.1sp2 and I don't like to run weblogic.ejbc manually. I
    let the server do it when I deploy when EAR file. Is there a way to make
    the server specify the "-iiop" option when the server automatically runs
    ejbc?
    Paul Rowe--
    Dimitri

  • Error in weblogic.ejbc while deploying the CMP entity bean.!!!

    Tried to deploy the entity bean[CMP] with the following folder structure.
    examples [package]
    Product.class
    productBean.class
    etc.
    META-INF
    ejb-jar.xml
    weblogic-ejb-jar.xml.
    weblogic-cmp-rdbms-jar.xml
    created a jar..with the following command
    1.jar cvf rgegcmp.jar examples META-INF
    tried to create the stubs and skeletons using weblogic.ejbc command.
    2. java weblogic.ejbc rgegcmp.jar rgegcmp1.jar
    C:\btcomprj\BTCOMPRJ\classes>java weblogic.ejbc rgegcmp.jar rgegcmp1.jar
    <Oct 11, 2004 4:29:29 PM IST> <Warning> <EJB> <010054> <EJB Deployment: Product has a
    class examples.ProductBean which is in
    the classpath. This class should only be located in the ejb-jar file.>
    <Oct 11, 2004 4:29:29 PM IST> <Warning> <EJB> <010054> <EJB Deployment: Product has a
    class examples.ProductHome which is in
    the classpath. This class should only be located in the ejb-jar file.>
    <Oct 11, 2004 4:29:29 PM IST> <Warning> <EJB> <010054> <EJB Deployment: Product has a
    class examples.Product which is in the
    classpath. This class should only be located in the ejb-jar file.>
    <Oct 11, 2004 4:29:29 PM IST> <Warning> <EJB> <010054> <EJB Deployment: Product has a
    class examples.ProductLocalHome which i
    s in the classpath. This class should only be located in the ejb-jar file.>
    <Oct 11, 2004 4:29:29 PM IST> <Warning> <EJB> <010054> <EJB Deployment: Product has a
    class examples.ProductLocal which is in
    the classpath. This class should only be located in the ejb-jar file.>
    <Oct 11, 2004 4:29:29 PM IST> <Warning> <EJB> <010054> <EJB Deployment: Product has a
    class examples.ProductPK which is in th
    e classpath. This class should only be located in the ejb-jar file.>
    ERROR: Error from ejbc: null
    java.lang.NullPointerException
    at
    weblogic.ejb20.deployer.CompositeMBeanDescriptor.getPersistenceUseIdentifier(Composite
    MBeanDescriptor.java:1484)
    at weblogic.ejb20.deployer.CMPInfoImpl.<init>(CMPInfoImpl.java:104)
    at
    weblogic.ejb20.deployer.EntityBeanInfoImpl.<init>(EntityBeanInfoImpl.java:135)
    at
    weblogic.ejb20.deployer.BeanInfoImpl.createBeanInfoImpl(BeanInfoImpl.java:349)
    at
    weblogic.ejb20.deployer.MBeanDeploymentInfoImpl.initializeBeanInfos(MBeanDeploymentInf
    oImpl.java:438)
    at
    weblogic.ejb20.deployer.MBeanDeploymentInfoImpl.<init>(MBeanDeploymentInfoImpl.java:16
    5)
    at weblogic.ejb20.ejbc.EJBCompiler.setupEJB(EJBCompiler.java:151)
    at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:332)
    at weblogic.ejbc20.runBody(ejbc20.java:479)
    at weblogic.utils.compiler.Tool.run(Tool.java:126)
    at weblogic.ejbc.main(ejbc.java:29)
    ERROR: ejbc found errors
    1. want to know why Null pointer exception is thrown by 'weblogic.ejbc'...
    is it indicating an error in my code(bean); .....
    i dont know how to fix the error.
    find the deployments descriptors which i have written for deployment.
    weblogic-ejb-jar.xml
    <?xml version="1.0"?>
    <!DOCTYPE weblogic-ejb-jar PUBLIC
    '-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB//EN'
    'http://www.bea.com/servers/wls700/dtd/weblogic-ejb-jar.dtd'>
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>Product</ejb-name>
    <jndi-name>rgexample</jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    ejb-jar.xml
    <?xml version="1.0"?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
    "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar>
    <enterprise-beans>
    <entity>
    <ejb-name>Product</ejb-name>
    <home>examples.ProductHome</home>
    <remote>examples.Product</remote>
    <local-home>examples.ProductLocalHome</local-home>
    <local>examples.ProductLocal</local>
    <ejb-class>examples.ProductBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>examples.ProductPK</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>ProductBean</abstract-schema-name>
    <cmp-field>
    <field-name>productID</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>name</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>description</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>basePrice</field-name>
    </cmp-field>
    <query>
    <query-method>
    <method-name>findByName</method-name>
    <method-params>
    <method-param>java.lang.String</method-param>
    </method-params>
    </query-method>
    <ejb-ql>
    <![CDATA[SELECT OBJECT(a) FROM ProductBean AS a WHERE name =
    ?1]]>
    </ejb-ql>
    </query>
    <query>
    <query-method>
    <method-name>findByDescription</method-name>
    <method-params>
    <method-param>java.lang.String</method-param>
    </method-params>
    </query-method>
    <ejb-ql>
    <![CDATA[SELECT OBJECT(a) FROM ProductBean AS a WHERE description
    = ?1]]>
    </ejb-ql>
    </query>
    <query>
    <query-method>
    <method-name>findByBasePrice</method-name>
    <method-params>
    <method-param>double</method-param>
    </method-params>
    </query-method>
    <ejb-ql>
    <![CDATA[SELECT OBJECT(a) FROM ProductBean AS a WHERE basePrice =
    ?1]]>
    </ejb-ql>
    </query>
    <query>
    <query-method>
    <method-name>findExpensiveProducts</method-name>
    <method-params>
    <method-param>double</method-param>
    </method-params>
    </query-method>
    <ejb-ql>
    <![CDATA[SELECT OBJECT(a) FROM ProductBean AS a WHERE basePrice >
    ?1]]>
    </ejb-ql>
    </query>
    <query>
    <query-method>
    <method-name>findCheapProducts</method-name>
    <method-params>
    <method-param>double</method-param>
    </method-params>
    </query-method>
    <ejb-ql>
    <![CDATA[SELECT OBJECT(a) FROM ProductBean AS a WHERE basePrice < ?1]]>
    </ejb-ql>
    </query>
    <query>
    <query-method>
    <method-name>findAllProducts</method-name>
    <method-params>
    </method-params>
    </query-method>
    <ejb-ql>
    <![CDATA[SELECT OBJECT(a) FROM ProductBean AS a WHERE productID
    IS NOT NULL]]>
    </ejb-ql>
    </query>
    </entity>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>Product</ejb-name>
    <method-intf>Remote</method-intf>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    weblogic-cmp-rdbms-jar.xml
    <!DOCTYPE weblogic-rdbms-jar PUBLIC
    '-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB RDBMS Persistence//EN'
    'http://www.bea.com/servers/wls700/dtd/weblogic-rdbms20-persistence-700.dtd'>
    <weblogic-rdbms-jar>
    <weblogic-rdbms-bean>
    <ejb-name>Product</ejb-name>
    <data-source-name>examples-dataSource-demoPool</data-source-name>
    <table-map>
    <table-name>TORDER</table-name>
    <field-map>
    <cmp-field>productID</cmp-field>
    <dbms-column>PRODUCTID</dbms-column>
    </field-map>
    <field-map>
    <cmp-field>name</cmp-field>
    <dbms-column>NAME</dbms-column>
    </field-map>
    <field-map>
    <cmp-field>description</cmp-field>
    <dbms-column>DESCRIPTION</dbms-column>
    </field-map>
    <field-map>
    <cmp-field>basePrice</cmp-field>
    <dbms-column>BASEPRICE</dbms-column>
    </field-map>
    </table-map>
    </weblogic-rdbms-bean>
    <create-default-dbms-tables>True</create-default-dbms-tables>
    </weblogic-rdbms-jar>

    If you can have a look at a cmp example in the samples that ship with the server. My guess is that the weblogic-ejb-jar.xml file is missing the <persistence-use> element which for 810 would look like:
    <persistence>
    <persistence-use>
    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
    <type-version>7.0</type-version>
    <type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
    </persistence-use>
    </persistence>
    I seem to recall that the elements might be slightly different in structure for the wls700 version of the DTD, so please check that (I cannot, I'm at home and don't have everything here).
    Give that a try and see if it doesn't solve your compilation failure.
    Also, the compilation should not be throwing a null pointer exception in a case like that, I consider that to be a bug.
    -thorick

  • Weblogic.ejbc compiler

    Hi, i've a problem with the boot of the entity beans.
    My entity beans extends a class in which there is a definition of a public variable Long which there isn't defined in the bean but it is in the ejb-jar.xml as cmp-field and in the weblogic-ejb-extensions as attribute map.
    The weblogic.ejbc -i ejb-jar.xml -x weblogic-ejb-extensions.xml doesn't give me exception, but when i boot the application (tmboot -y) i've this log :
    ERROR: While deploying bean it.sella.anagrafe.evento.EventoEJB
    java.lang.NoSuchFieldException: id
    174943.dcsv01!JavaServer.7981: main: EJB_CAT:28: ERROR: While deploying bean it.sella.anagrafe.evento.EventoEJB
    : The EJB Container received weblogic.ejb.common.DeploymentException: EJB_CAT:28: ERROR: While deploying bean
    it.sella.anagrafe.evento.EventoEJB :
    java.lang.NoSuchFieldException: id while setting container managed persistence.
    Could you help me?
    Regards

    Mary Ann Slavin <[email protected]> wrote:
    Error 28 indicates that there is a problem with the deployment descriptor. Check that -- ERROR 28: Make sure the deployable JAR contains a compliant deployment descriptor.
    There are following the two xml files, The EventoBean class, the EntityBeanAdapter class extended by EventoBean and the primary key class DefaultPK
    This is, i think,the better way to an help.
    The problem is in the boot of the application( the same works fine with WLS5.1)
    ejb-jar.xml
    <?xml version="1.0"?>
    <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'>
    <ejb-jar>
    <enterprise-beans>
    <entity>
         <ejb-name>it.sella.anagrafe.evento.EventoEJB</ejb-name>
         <home>it.sella.anagrafe.evento.EventoHome</home>
         <remote>it.sella.anagrafe.evento.Evento</remote>
         <ejb-class>it.sella.anagrafe.evento.EventoBean</ejb-class>
         <persistence-type>Container</persistence-type>
         <prim-key-class>it.sella.ejb.DefaultPK</prim-key-class>
         <reentrant>False</reentrant>
         <cmp-field>
         <field-name>id</field-name>
         </cmp-field>
         <cmp-field>
         <field-name>soggettoId</field-name>
         </cmp-field>
         <cmp-field>
         <field-name>compatibleInstanceId</field-name>
         </cmp-field>
         <cmp-field>
         <field-name>compatibleTypeId</field-name>
         </cmp-field>
    <cmp-field>
         <field-name>rightPk</field-name>
         </cmp-field>
         <cmp-field>
         <field-name>value</field-name>
         </cmp-field>
         <cmp-field>
         <field-name>dateValue</field-name>
         </cmp-field>
         <env-entry>
              <env-entry-name>counterHomeName</env-entry-name>
              <env-entry-type>java.lang.String</env-entry-type>
              <env-entry-value>it.sella.counter.CounterHome</env-entry-value>
         </env-entry>
         <resource-ref>
              <res-ref-name>jdbc/clientPool</res-ref-name>
         <res-type>javax.sql.DataSource</res-type>
         <res-auth>Container</res-auth>
         </resource-ref>
    </entity>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
         <method>
         <ejb-name>it.sella.anagrafe.evento.EventoEJB</ejb-name>
         <method-intf>Remote</method-intf>
         <method-name>*</method-name>
         </method>
         <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    weblogic-ejb-extensions.xml
    <!DOCTYPE weblogic-ejb-extensions SYSTEM "weblogic-ejb-extensions.dtd" >
    <weblogic-ejb-extensions>
    <weblogic-enterprise-bean>
    <ejb-name>it.sella.anagrafe.evento.EventoEJB</ejb-name>
    <weblogic-deployment-params>
    <!-- <max-beans-in-free-pool>20</max-beans-in-free-pool>-->
    <!-- <max-beans-in-cache>1000</max-beans-in-cache>-->
    <!--<idle-timeout-seconds>5</idle-timeout-seconds>-->
    <!-- JNDI name that is associated with this EJB;used for lookup -->
    <jndi-name>it.sella.anagrafe.evento.EventoHome</jndi-name>
    <!-- This is CMP EJB. Specify persistence information -->
    <persistence-store-descriptor>
    <is-modified-method-name>isModified</is-modified-method-name>
         <!--<delay-updates-until-end-of-tx>false</delay-updates-until-end-of-tx>-->
    <!--<db-is-shared>false</db-is-shared>-->
    <persistence-store-jdbc>
    <!-- Pool name is looked up by the EJB source -->
    <pool-name>jdbc/clientPool</pool-name>
    <!-- *** DATABASE INFORMATION SPECIFIC TO INSTALLATION SITE *** -->
    <user>ssil</user>
    <!-- Default password URL is for Oracle 8i-->
    <password>ssil</password>
    <!-- Default driver URL is for Oracle 8i,
    and default instance Beq-Local is used
    -->
    <driver-url>jdbc:oracle:thin:@171.97.1.5:1521:th2o</driver-url>
    <table-name>an_tr_evento</table-name>
    <!-- Default user URL is for Oracle 8i-->
    <!-- CMP Fields and database table column mapping-->
    <attribute-map>
    <attribute-map-entry>
    <bean-field-name>id</bean-field-name>
    <table-column-name>ev_evento_id</table-column-name>
    </attribute-map-entry>
    <attribute-map-entry>
    <bean-field-name>soggettoId</bean-field-name>
    <table-column-name>ev_soggetto_id</table-column-name>
    </attribute-map-entry>
    <attribute-map-entry>
    <bean-field-name>compatibleInstanceId</bean-field-name>
    <table-column-name>ev_compatible_instance_id</table-column-name>
    </attribute-map-entry>
    <attribute-map-entry>
    <bean-field-name>compatibleTypeId</bean-field-name>
    <table-column-name>ev_compatible_type_id</table-column-name>
    </attribute-map-entry>
    <attribute-map-entry>
    <bean-field-name>value</bean-field-name>
    <table-column-name>ev_value</table-column-name>
    </attribute-map-entry>
    <attribute-map-entry>
    <bean-field-name>dateValue</bean-field-name>
    <table-column-name>ev_date_value</table-column-name>
    </attribute-map-entry>
    <attribute-map-entry>
    <bean-field-name>rightPk</bean-field-name>
    <table-column-name>ev_right_pk</table-column-name>
    </attribute-map-entry>
    </attribute-map>
    <!-- Finder Specifications -->
    <finder-descriptor>
    <description>
    Find method to get accounts with balance over the parameter.
    </description>
    <method>
    <ejb-name>
    it.sella.anagrafe.documento.DocumentoHome
    </ejb-name>
    <method-name>
    findBySoggettoId(Long long1)
    </method-name>
    </method>
    <query-grammar>
    (= soggettoId $long1)
    </query-grammar>
    </finder-descriptor>
    </persistence-store-jdbc>
    </persistence-store-descriptor>
    </weblogic-deployment-params>
    </weblogic-enterprise-bean>
    </weblogic-ejb-extensions>
    EventoBean class
    package it.sella.anagrafe.evento;
    import it.sella.ejb.EntityBeanAdapter;
    import java.rmi.RemoteException;
    import java.sql.Timestamp;
    public class EventoBean extends EntityBeanAdapter
    public Long soggettoId;
    public Long compatibleInstanceId;
    public Long compatibleTypeId;
    public String value;
    public Timestamp dateValue;
    public Long rightPk;
    public EventoBean()
    protected Long getCounterInitVal()
    return new Long(1000L);
    public Timestamp getDateValue()
    throws RemoteException
    return dateValue;
    public Long getInstanceId()
    throws RemoteException
    return compatibleInstanceId;
    public Long getRightPk()
    throws RemoteException
    return rightPk;
    public Long getSoggettoId()
    throws RemoteException
    return soggettoId;
    public Long getTypeId()
    throws RemoteException
    return compatibleTypeId;
    public String getValue()
    throws RemoteException
    return value;
    public void setDateValue(Timestamp timestamp)
    throws RemoteException
    dateValue = timestamp;
    setModified(true);
    public void setInstanceId(Long long1)
    throws RemoteException
    compatibleInstanceId = long1;
    setModified(true);
    public void setRightPk(Long long1)
    throws RemoteException
    rightPk = long1;
    setModified(true);
    public void setSoggettoId(Long long1)
    throws RemoteException
    soggettoId = long1;
    setModified(true);
    public void setTypeId(Long long1)
    throws RemoteException
    compatibleTypeId = long1;
    setModified(true);
    public void setValue(String s)
    throws RemoteException
    value = s;
    setModified(true);
    EntityBeanAdapter class
    package it.sella.ejb;
    import it.sella.ejb.counter.Counter;
    import it.sella.ejb.counter.CounterGenerationException;
    import it.sella.ejb.counter.CounterHome;
    import it.sella.ejb.counter.CounterPK;
    import it.sella.ejb.link.ILink;
    import java.beans.*;
    import java.io.PrintStream;
    import java.lang.reflect.InvocationTargetException;
    import java.lang.reflect.Method;
    import java.rmi.RemoteException;
    import java.util.*;
    import javax.ejb.*;
    import javax.naming.*;
    import javax.rmi.PortableRemoteObject;
    // Referenced classes of package it.sella.ejb:
    // EnterpriseBeanAdapter, IEJBView, IEJBEntityObject, DefaultPK,
    // IEntityBean, IPrimaryKey
    public abstract class EntityBeanAdapter extends EnterpriseBeanAdapter
    implements IEntityBean
    public Long id;
    private EntityContext entityContext;
    private transient boolean isModified;
    private static transient String counterHomeName = "CounterHome";
    private static transient CounterHome counterHome;
    private transient boolean beanRemovable;
    private transient Counter counter;
    private Class ejbViewClass;
    public EntityBeanAdapter()
    beanRemovable = false;
    protected Long getCounterInitVal()
    return new Long(-1L);
    public void ejbActivate()
    throws RemoteException
    log(3, "ejbActivate (" + this + ")");
    public void ejbLoad()
    throws RemoteException
    log(3, "ejbLoad: (" + this + ")");
    setModified(false);
    public IPrimaryKey ejbCreate(IEJBView ejbView)
    throws RemoteException, CreateException
    log(3, "ejbCreate: (" + this + ") from (" + ejbView + ")");
    ejbCreate();
    setAttributesFromEJBView(ejbView);
    setModified(false);
    return getPrimaryKey();
    public void ejbPostCreate(IEJBView ejbView)
    throws RemoteException, CreateException
    log(3, "ejbPostCreate: (" + this + ") from (" + ejbView + ")");
    public IPrimaryKey ejbCreate()
    throws RemoteException, CreateException
    System.out.println("inside ejbCreate");
    log(3, "ejbCreate: (" + this + ")");
    setPrimaryKeyID(getNextId());
    System.out.println("After setPrimaryKeyID in EBA");
    System.out.println("before defaultvalue setting in EBA with pk val" + getPrimaryKeyID().toString());
    setAttributesWithDefaultValues();
    setModified(false);
    System.out.println("before return in ejbCreate() in EBA with pk val" + getPrimaryKeyID().toString());
    return getPrimaryKey();
    public void ejbPostCreate()
    throws RemoteException, CreateException
    log(3, "ejbPostCreate: (" + this + ")");
    public void setAttributesWithDefaultValues()
    throws CreateException
    public void setAttributesFromEJBView(IEJBView ejbView)
    throws CreateException
    try
    setEJBEntityPropertiesFromEJBView(ejbView);
    catch(InvocationTargetException e)
    e.printStackTrace();
    throw new CreateException(e.getMessage());
    catch(IntrospectionException e)
    e.printStackTrace();
    throw new CreateException(e.getMessage());
    catch(IllegalAccessException e)
    e.printStackTrace();
    throw new CreateException(e.getMessage());
    protected void setEJBEntityPropertiesFromEJBView(IEJBView ejbView)
    throws IllegalAccessException, IntrospectionException, InvocationTargetException
    Class ejbViewClass = ejbView.getClass();
    BeanInfo ejbViewInfo = Introspector.getBeanInfo(ejbViewClass);
    PropertyDescriptor ejbViewProps[] = ejbViewInfo.getPropertyDescriptors();
    for(int n = 0; n < ejbViewProps.length; n++)
    Method ejbViewGetMethod = ejbViewProps[n].getReadMethod();
    if(ejbViewGetMethod == null)
    continue;
    try
    StringBuffer setMethodName = (new StringBuffer("set")).append(ejbViewProps[n].getName());
    setMethodName.setCharAt(3, Character.toUpperCase(setMethodName.charAt(3)));
    Method ejbEntityObjectSetMethod = getClass().getMethod(setMethodName.toString(), new Class[] {
    ejbViewProps[n].getPropertyType()
    Object args[] = new Object[1];
    args[0] = ejbViewGetMethod.invoke(ejbView, new Object[0]);
    ejbEntityObjectSetMethod.invoke(this, args);
    log(3, "method " + setMethodName);
    catch(NoSuchMethodException e)
    log(3, "NoSuchMethodException: " + e.getMessage());
    protected void setEJBViewPropertiesFromEJBEntity(IEJBView ejbView)
    throws IllegalAccessException, IntrospectionException, InvocationTargetException
    Class ejbViewClass = ejbView.getClass();
    BeanInfo ejbViewInfo = Introspector.getBeanInfo(ejbViewClass);
    PropertyDescriptor ejbViewProps[] = ejbViewInfo.getPropertyDescriptors();
    for(int n = 0; n < ejbViewProps.length; n++)
    Method ejbViewSetMethod = ejbViewProps[n].getWriteMethod();
    if(ejbViewSetMethod == null)
    continue;
    try
    StringBuffer getMethodName = (new StringBuffer("get")).append(ejbViewProps[n].getName());
    getMethodName.setCharAt(3, Character.toUpperCase(getMethodName.charAt(3)));
    Method ejbEntityObjectGetMethod = getClass().getMethod(getMethodName.toString(), new Class[0]);
    Object args[] = new Object[1];
    args[0] = ejbEntityObjectGetMethod.invoke(this, new Object[0]);
    ejbViewSetMethod.invoke(ejbView, args);
    log(3, "method " + getMethodName);
    catch(NoSuchMethodException e)
    log(3, e.getMessage());
    public void ejbPassivate()
    throws RemoteException
    log(3, "ejbPassivate (" + this + ")");
    public void ejbRemove()
    throws RemoveException, RemoteException
    log(3, "ejbRemove (" + this + ")");
    if(isBeanRemovable())
    log(3, "<EBA>In ejbRemove : Bean is removable -> going to remove the linked beans(if any)");
    removeLinks();
    log(3, "<EBA>In ejbRemove : links are removed(if any)");
    } else
    throw new RemoveException("Could not Remove EJBean. Possible Cause -> IsBeanRemovable env-entry Property for this bean or its linked beans(Aggregated) in their ejb-jar xml file not set or set as False");
    public void ejbStore()
    throws RemoteException
    log(3, "ejbStore (" + this + ")");
    setModified(false);
    public final boolean isModified()
    return isModified;
    public final void setModified(boolean modified)
    isModified = modified;
    protected final EntityContext getEntityContext()
    return entityContext;
    public final void setEntityContext(EntityContext context)
    throws RemoteException
    InitialContext ctx = null;
    log(3, "setEntityContext (" + this + ")");
    entityContext = context;
    log(3, "In setEntityContext - context set and = " + entityContext.toString());
    try
    ctx = new InitialContext();
    setCounterHomeName((String)ctx.lookup("java:comp/env/counterHomeName"));
    String beanRemovableFlag = (String)ctx.lookup("java:comp/env/isBeanRemovable");
    if(beanRemovableFlag.equalsIgnoreCase("true"))
    setBeanRemovable(Boolean.TRUE.booleanValue());
    else
    if(beanRemovableFlag.equalsIgnoreCase("false"))
    setBeanRemovable(Boolean.FALSE.booleanValue());
    else
    throw new IllegalArgumentException("Could not take the environment entry for IsBeanRemovable ");
    catch(NamingException ne)
    setCounterHomeName("it.sella.counter.CounterHome");
    setBeanRemovable(Boolean.FALSE.booleanValue());
    log(3, "Naming Exception Default Exception");
    finally
    try
    ctx.close();
    catch(Exception exception1) { }
    public final void unsetEntityContext()
    throws RemoteException
    log(3, "unsetEntityContext (" + this + ")");
    entityContext = null;
    protected String getEJBViewClassName(IEntityBean entity)
    String ejbEntityClassName = entity.getClass().getName();
    StringBuffer tmp = new StringBuffer(ejbEntityClassName);
    tmp.replace(ejbEntityClassName.lastIndexOf("Bean"), ejbEntityClassName.length(), "View");
    return tmp.toString();
    private Class getEJBViewClass(IEntityBean entity)
    throws ClassNotFoundException
    if(ejbViewClass == null)
    ejbViewClass = Class.forName(getEJBViewClassName(entity), true, entity.getClass().getClassLoader());
    return ejbViewClass;
    public final IEJBView getEJBView()
    IEJBView ejbView;
    try
    ejbView = (IEJBView)getEJBViewClass(this).newInstance();
    setEJBViewPropertiesFromEJBEntity(ejbView);
    catch(Exception e)
    e.printStackTrace();
    throw new RuntimeException(e.getMessage());
    return ejbView;
    public final String getEJBViewString()
    return getEJBView().toString();
    public String toString()
    return super.toString();
    public final IEJBEntityObject getEJBObject()
    return (IEJBEntityObject)getEntityContext().getEJBObject();
    private Counter getCounter()
    throws CounterGenerationException
    if(counter == null)
    try
    counter = (Counter)PortableRemoteObject.narrow(getCounterHome().findByPrimaryKey(new CounterPK(getHomeInterfaceClassName())), Class.forName("it.sella.ejb.counter.Counter"));
    catch(RemoteException nex)
    throw new CounterGenerationException("Remote exception in getCounter() during findByPrimaryKey" + nex.getLocalizedMessage());
    catch(NamingException nex)
    throw new CounterGenerationException("Naming exception in getCounter() during findByPrimaryKey" + nex.getLocalizedMessage());
    catch(FinderException fex)
    try
    counter = (Counter)PortableRemoteObject.narrow(getCounterHome().create(getHomeInterfaceClassName(), getCounterInitVal()), Class.forName("it.sella.ejb.counter.Counter"));
    catch(CreateException cex)
    throw new CounterGenerationException("Create exception in getCounter() during create - Counter could not be created!!!" + cex.getLocalizedMessage());
    catch(RemoteException nex)
    throw new CounterGenerationException("Remote exception in getCounter() during create - Counter could not be created!!!" + nex.getLocalizedMessage());
    catch(NamingException nex)
    throw new CounterGenerationException("Naming exception in getCounter() - during create - Counter could not be created!!!" + nex.getLocalizedMessage());
    return counter;
    private static CounterHome getCounterHome()
    throws NamingException
    if(counterHome == null)
    Context ctx = new InitialContext();
    counterHome = (CounterHome)ctx.lookup(counterHomeName);
    return counterHome;
    private Long getNextId()
    throws CounterGenerationException
    try
    Long long1 = getCounter().getNextId();
    return long1;
    catch(RemoteException nex)
    nex.printStackTrace();
    throw new CounterGenerationException("Remote exception while calling counter.getNextId()" + nex.getLocalizedMessage());
    public IPrimaryKey getPrimaryKey()
    System.out.println("in getPrimaryKey():" + getPrimaryKeyID());
    return new DefaultPK(getPrimaryKeyID());
    private void setPrimaryKey(IPrimaryKey pk)
    throws IllegalAccessException
    throw new IllegalAccessException("This method cannot be called directly.");
    private String getHomeInterfaceClassName()
    throws RemoteException
    return getEntityContext().getEJBHome().getEJBMetaData().getHomeInterfaceClass().getName();
    public Long getPrimaryKeyID()
    System.out.println("id in getPrimaryKeyId :" + id);
    return id;
    private void setPrimaryKeyID(Long id)
    System.out.println("<<Eba>>setPrimaryKeyID:" + id.toString());
    this.id = id;
    public String getCounterHomeName()
    return counterHomeName;
    private void setCounterHomeName(String newCounterHomeName)
    counterHomeName = newCounterHomeName;
    private Collection getLinks()
    throws RemoveException
    String prefix = "get";
    String suffix = "Link";
    Vector links = new Vector();
    Method beanMethods[] = null;
    try
    beanMethods = getClass().getMethods();
    for(int i = 0; i < beanMethods.length; i++)
    log(3, "<EBA> beanMethods: " + beanMethods.getName());
    if(beanMethods[i].getName().endsWith(suffix) && beanMethods[i].getName().startsWith(prefix))
    ILink curLink = (ILink)beanMethods[i].invoke(this, null);
    links.add(curLink);
    log(3, "<EBA> ILink object " + curLink);
    catch(Exception e)
    log(3, "<EBA> Error in in getLinks()-> " + e.getMessage());
    throw new RemoveException("Error in in getLinks()" + e.getMessage());
    return links;
    protected boolean isBeanRemovable()
    return beanRemovable;
    private void setBeanRemovable(boolean removeFlag)
    beanRemovable = removeFlag;
    private void removeLinks()
    throws RemoveException
    log(3, "<EBA> in removeLinks() -> before getLinks()");
    Collection links = getLinks();
    if(!links.isEmpty())
    log(3, "<EBA> in removeLinks() -> linked objects exists");
    ILink linkToDestroy;
    for(Iterator it = links.iterator(); it.hasNext(); linkToDestroy.destroyLink())
    linkToDestroy = (ILink)it.next();
    DefaultPK class
    package it.sella.ejb;
    // Referenced classes of package it.sella.ejb:
    // IPrimaryKey
    public class DefaultPK
    implements IPrimaryKey
    public Long id;
    public DefaultPK()
    public DefaultPK(Long id)
    setId(id);
    public Long getId()
    return id;
    protected void setId(Long id)
    this.id = id;
    public String toString()
    return "Id=" + getId();
    public int hashCode()
    return getId() == null ? 0 : getId().hashCode();
    public boolean equals(Object obj)
    if(obj != null && (obj instanceof DefaultPK))
    return getId() != null && getId().equals(((DefaultPK)obj).getId());
    else
    return false;

  • Confused about the role of ejbc in Weblogic 7

    Howdy All
    Here is my understanding of the role of ejbc in Weblogic 7:
    * Let's assume I have a JAR containing an EJB (let's say a stateless session bean).
    Let's call this the no-ejbc-JAR.
    1. I run the no-ejbc-JAR through ejbc to create the container-ejbc-JAR which can
    now be deployed in Weblogic.
    2. I can run ejbc against the no-ejbc-JAR to create a client-ejbc-JAR for use
    by clients wishing to access and use the EJB.
    Questions...
    MUST I run the no-ejbc-JAR through ejbc (to create the container-ejbc-JAR) before
    it can be deployed in Weblogic 7?
    If so, why?
    I can sort of see why this may be necessary from the containers perspective, although
    I would have thought the ejbc process could have been automatically applied by
    Weblogic to no-ejbc-JARs being deployed.
    But I am confused as to why ejbc would need to be used to create a client-ejbc-JAR.
    From the client's perspective, isn't it simply enough to have the no-ejbc-JAR
    (or a subset of the no-ejb-JAR) containing the EJB home and remote interfaces
    (along with any non-ejbc generated support classes)? For use by the client, why
    would it be necessary to run the no-ejbc-JAR through ejbc to create a client-ejbc-JAR?
    Or do I have an incorrect understanding of the role of ejbc?
    Thanks,
    Rob

    Hello Rob,
    I will try to clarify a couple of your concerns. First of all, if your EJB jar
    contains CMP 2.0 entity beans, the underlying JDBC implementations must be generated
    for your respective abstract classes of the entity beans. EJBC will generate this
    for you automatically. Also, the EJBC utility generates all of the other necessary
    server classes that WebLogic requires for deploying your EJBs (such as custom
    code for handling transactions, security, and other EJB services). When your EJB
    utilizes remote home/component interfaces, the utility will also generate all
    of the necessary client-side proxy and server-side byte code by running the RMI
    compiler on your EJBs. In addition to the above code generation that takes place,
    EJBC also checks all of your EJBs and makes sure that they are written according
    to the EJB specification. This way you will always be sure that your EJBs will
    be deployable on BEA WebLogic if EJBC returns with no error messages. You also
    asked if EJBC must be run manually before deploying the EJBs. If you run your
    application in exploded directory format, WebLogic will automatically invoke the
    EJBC utility prior to deploying your EJBs. Please refer to the links below for
    more information about the EJBC utility as well as deploying your application
    in exploded directory format:
    http://edocs.bea.com/wls/docs70/ejb/EJB_utilities.html#1075296
    http://edocs.bea.com/wls/docs70/programming/deploying.html#1125152
    Also, feel free to examine the code that EJBC generates to gain a better feel
    for what's happening behind the scenes. Also, please be aware that ejbc has been
    deprecated in WebLogic 8.1, in favor of the appc utility:
    http://edocs.bea.com/wls/docs81/ejb/EJB_tools.html#1096936
    Best regards,
    Ryan LeCompte
    [email protected]
    http://www.louisiana.edu/~rml7669
    "Rob Young" <[email protected]> wrote:
    >
    Howdy All
    Here is my understanding of the role of ejbc in Weblogic 7:
    * Let's assume I have a JAR containing an EJB (let's say a stateless
    session bean).
    Let's call this the no-ejbc-JAR.
    1. I run the no-ejbc-JAR through ejbc to create the container-ejbc-JAR
    which can
    now be deployed in Weblogic.
    2. I can run ejbc against the no-ejbc-JAR to create a client-ejbc-JAR
    for use
    by clients wishing to access and use the EJB.
    Questions...
    MUST I run the no-ejbc-JAR through ejbc (to create the container-ejbc-JAR)
    before
    it can be deployed in Weblogic 7?
    If so, why?
    I can sort of see why this may be necessary from the containers perspective,
    although
    I would have thought the ejbc process could have been automatically applied
    by
    Weblogic to no-ejbc-JARs being deployed.
    But I am confused as to why ejbc would need to be used to create a client-ejbc-JAR.
    From the client's perspective, isn't it simply enough to have the no-ejbc-JAR
    (or a subset of the no-ejb-JAR) containing the EJB home and remote interfaces
    (along with any non-ejbc generated support classes)? For use by the client,
    why
    would it be necessary to run the no-ejbc-JAR through ejbc to create a
    client-ejbc-JAR?
    Or do I have an incorrect understanding of the role of ejbc?
    Thanks,
    Rob

  • The code generated by EJBC in Weblogic 5.1 is wrong!

    I have a container managed bean that has a primary key named
    productLicenseId as follows:
    public class ProductLicenseBean implements EntityBean
    public int productLicenseId;
    I had this code running in Weblogic 4.5.1 and converted it to EJB 1.1
    (now I use java.lang.Integer for the primary key class) and attempted to
    build it using WebLogic 5.1. I built your container managed example
    (AccountBean), which built fine (it is clear why your example did not
    have the problem mine did- the primary key is java.lang.String). After
    that, I tried to build my container managed bean, but without success.
    Here is a description of my problem:
    After trying to compile my simple container-managed program using EJBC
    in Weblogic 5.1, I get the following error:
    ProductLicenseBeanEOImpl.java:56: Incompatible type for =. Can't convert
    int to java.lang.Integer
    pk = bean.productLicenseId;
    ProductLicenseBeanEOImpl.java is a class that was generated by EJBC. It
    is clear that this code is incorrect! The generated code (pk =
    bean.productLicenseId) attempts to assign the primary key in the
    ProductLicenseBean (an int) to a java.lang.Integer (pk is of type
    java.lang.Integer), which is wrong! The source code generated by EJBC is
    wrong!
    Do you have a bug fix for this, or is there something I'm just not
    getting?? !!
    I should be able to use a java.lang.Integer as a primary key.
    Thanks much for your help.
    Tim Kimmet, [email protected]
    [timk.vcf]

    I had the same problem. I had used the deployer tool and had specified a
    primary key class AND a primary key field "ID".
    This had put an extra tag in the ejb-jar.xml file <persistence field> which
    I hadn't seen before.
    Changing the primary key field to "none" fixed caused other problems to show
    up in the deployer tool (finders). I had to redo the
    deployer project from scratch, this time keeping the primary key field to
    "none" and it worked.
    Tim Kimmet <[email protected]> wrote in message
    news:[email protected]..
    I have a container managed bean that has a primary key named
    productLicenseId as follows:
    public class ProductLicenseBean implements EntityBean
    public int productLicenseId;
    I had this code running in Weblogic 4.5.1 and converted it to EJB 1.1
    (now I use java.lang.Integer for the primary key class) and attempted to
    build it using WebLogic 5.1. I built your container managed example
    (AccountBean), which built fine (it is clear why your example did not
    have the problem mine did- the primary key is java.lang.String). After
    that, I tried to build my container managed bean, but without success.
    Here is a description of my problem:
    After trying to compile my simple container-managed program using EJBC
    in Weblogic 5.1, I get the following error:
    ProductLicenseBeanEOImpl.java:56: Incompatible type for =. Can't convert
    int to java.lang.Integer
    pk = bean.productLicenseId;
    ProductLicenseBeanEOImpl.java is a class that was generated by EJBC. It
    is clear that this code is incorrect! The generated code (pk =
    bean.productLicenseId) attempts to assign the primary key in the
    ProductLicenseBean (an int) to a java.lang.Integer (pk is of type
    java.lang.Integer), which is wrong! The source code generated by EJBC is
    wrong!
    Do you have a bug fix for this, or is there something I'm just not
    getting?? !!
    I should be able to use a java.lang.Integer as a primary key.
    Thanks much for your help.
    Tim Kimmet, [email protected]

  • Urgent pls ! Error during Container code generation using weblogic.ejbc

    HI all,
    Iam using weblogic6.1 and EJB 2.0. I have to communicate session and entity ejb's and iam using local interfaces for entity beans and access the entity beans thru session ejb's. After creating my programs and jar files, when i use java weblogic.ejbc code.jar Containercode.jar, i get the following error....
    --------- Error -------------
    C:\Sathish\Ejb\wl6.1\LocalInterfaces\Code\ejbcgen\CodeBean_tvm2r0_ELOImpl.java:34
    0: cannot resolve symbol
    symbol : constructor EJBException (java.lang.String,java.lang.Exception)
    location: class javax.ejb.EJBException
    throw new javax.ejb.EJBException("Unexpected exception in " +
    ^
    1 errors
    Exec failed .. exiting
    Can anyone say why this error is occuring......
    regards
    sathish

    In J2EE 1.3, EJBException added a third constructor of the form:
    EJBException(java.lang.String, java.lang.Exception)
    WebLogic contains a file called j2ee12.jar in the lib directory that when placed in front of the classpath, disables J2EE 1.3 features and replaces them with J2EE 1.2. In J2EE 1.2 this constructor did not exist.
    So in order to compile using J2EE 1.3 features, you must make sure that j2ee12.jar is not in your classpath.

  • Usage of weblogic.ejbc

    Hi Guys,
    Well i am trying to use weblogic.ejbc to generate the ejb container specific code and create a new jar file which i can deploy.
    But this command is throwing the following error shown below
    The jar file contains the ejb class files and the 2 xml files [ejb-jar.xml and weblogic-ejb-jar.xml].
    ERROR: ejb-jar file: /opt/.../frbom.jar could not be opened
    Could anyone please let me know the possible reason for this error....
    Thanking you
    regards
    richi
    .

    Hey,
    Thanks for the immediate reply
    I used the weblogic.ejbc command on a jar file containing my ejb classes[home,remote,bean],other classes and the required descriptors[ejb-jar.xml,weblogic-ejb-jar.xml]
    to be precise i used the following command
    prompt> java weblogic.ejbc /opt/.../frbom.jar output.jar
    but this is throwing me an error
    ERROR: ejb-jar file: /opt/.../frbom.jar could not be opened
    What could be the possible reason??
    Thank you
    Regards
    Richi

  • Error running weblogic.ejbc with Toplink 10G

    Hi.
    I'm making some tests in order to move to Weblogic 8.1 and Toplink 10g in the near future, but I'm having some problems with my tests:
    I have built a simple entity bean based on the AccountBean used in the singlebean example from Oracle and I'm seeing this error:
    java.lang.RuntimeException: Exception [EJB - 10036]: Error during code generation: [Exception [TOPLINK-14016] (TopLink (WLS CMP) - 10g (10.0.3) Developer Preview (Build 030902.1548)): oracle.toplink.ejb.DeploymentException
    Exception Description: An error occurred while setting up the project: [Exception [TOPLINK-43] (TopLink (WLS CMP) - 10g (10.0.3) Developer Preview (Build 030902.1548)): oracle.toplink.exceptions.DescriptorException
    Exception Description: Missing class for indicator field value [toplink:ejbql-call] of type [class java.lang.String].
    Descriptor: XMLDescriptor(oracle.toplink.queryframework.Call --> [DatabaseTable(call)])]
    Internal Exception: Exception [TOPLINK-43] (TopLink (WLS CMP) - 10g (10.0.3) Developer Preview (Build 030902.1548)): oracle.toplink.exceptions.DescriptorException
    Exception Description: Missing class for indicator field value [toplink:ejbql-call] of type [class java.lang.String].
    Descriptor: XMLDescriptor(oracle.toplink.queryframework.Call --> [DatabaseTable(call)])]
    server stacktrace is:
    Local Exception Stack:
    Exception [TOPLINK-14016] (TopLink (WLS CMP) - 10g (10.0.3) Developer Preview (Build 030902.1548)): oracle.toplink.ejb.DeploymentException
    Exception Description: An error occurred while setting up the project: [Exception [TOPLINK-43] (TopLink (WLS CMP) - 10g (10.0.3) Developer Preview (Build 030902.1548)): oracle.toplink.exceptions.DescriptorException
    Exception Description: Missing class for indicator field value [toplink:ejbql-call] of type [class java.lang.String].
    Descriptor: XMLDescriptor(oracle.toplink.queryframework.Call --> [DatabaseTable(call)])]
    Internal Exception: Exception [TOPLINK-43] (TopLink (WLS CMP) - 10g (10.0.3) Developer Preview (Build 030902.1548)): oracle.toplink.exceptions.DescriptorException
    Exception Description: Missing class for indicator field value [toplink:ejbql-call] of type [class java.lang.String].
    Descriptor: XMLDescriptor(oracle.toplink.queryframework.Call --> [DatabaseTable(call)])
    at oracle.toplink.ejb.DeploymentException.errorCreatingProject(DeploymentException.java:111)
    at oracle.toplink.internal.ejb.cmp.CmpProjectReader.readProject(CmpProjectReader.java:76)
    at oracle.toplink.internal.ejb.cmp.ProjectDeployment.readProject(ProjectDeployment.java:219)
    at oracle.toplink.internal.ejb.cmp.ProjectDeployment.getProject(ProjectDeployment.java:208)
    at oracle.toplink.internal.ejb.cmp.PersistenceManagerBase.generateBeanSubclass(PersistenceManagerBase.java:176)
    at oracle.toplink.internal.ejb.cmp.wls.WlsCMPCodeGenerator.codeGenSubclass(WlsCMPCodeGenerator.java:51)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at weblogic.utils.compiler.CodeGenerator.processAt(CodeGenerator.java:648)
    at weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:587)
    at weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:519)
    at weblogic.utils.compiler.CodeGenerator.generateCode(CodeGenerator.java:336)
    at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:238)
    at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:197)
    at weblogic.ejb20.ejbc.EJB20CMPCompiler.generatePersistenceSources(EJB20CMPCompiler.java:88)
    at weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java:245)
    at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:476)
    at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:397)
    at weblogic.ejbc20.runBody(ejbc20.java:519)
    at weblogic.utils.compiler.Tool.run(Tool.java:146)
    at weblogic.utils.compiler.Tool.run(Tool.java:103)
    at weblogic.ejbc.main(ejbc.java:29)
    This is the part of the XML that I think causes the problem:
    <opm:query name="findMessageByMessageKey" xsi:type="toplink:read-object-query">
    <opm:arguments>
    <opm:argument name="1">
    <opm:type>java.lang.Integer</opm:type>
    </opm:argument>
    <opm:argument name="2">
    <opm:type>java.lang.Integer</opm:type>
    </opm:argument>
    </opm:arguments>
    <toplink:bind-all-parameters>false</toplink:bind-all-parameters>
    <toplink:cache-statement>false</toplink:cache-statement>
    <toplink:call xsi:type="toplink:ejbql-call">
    <toplink:ejbql>SELECT OBJECT(menssage) FROM MessageBean message WHERE menssage.codMessage = ?1 AND mensaje.codIdiom = ?2</toplink:ejbql>
    </toplink:call>
    <toplink:reference-class>test.data.MessgeBean</toplink:reference-class>
    <toplink:cache-usage>conform</toplink:cache-usage>
    </opm:query>
    Of course I don't see any problem with it.
    After that I tried to run the examples but I'm seing the same error.
    I must say that I'm not using the ANT scripts but doing it "by hand" building classes and making the naked jar for the bean in order to run ejbc on it, I'm pretty confident I am not missing anything.
    I would like to know where the "ejbql-call" definition is as I have tried to find it with a grep in all the Toplink structure tree with no success. It is not clear to me how the xsd processor would find it's definition with just the: xmlns:toplink="http://xmlns.oracle.com/ias/xsds/toplink" instruction present in the header of my Message.xml file (modified based on the Account.xml of the examples).
    I'm using Sun's JDK 1.4.2 and my $CLASSPATH is:
    /opt/oracle/toplink10g/toplink/jlib/toplink.jar:/opt/oracle/toplink10g/lib/xmlparserv2.jar:/opt/oracle/toplink10g/jdbc/lib/classes12.zip:/opt/bea/wlserver8.1sp1/weblogic8.1/server/lib/weblogic.jar
    Any idea?
    Thanks in advance.
    Ignacio.

    Hi.
    Thanks I tried it and I don't get no more that message. Instead I get this stack trace:
    java.lang.RuntimeException: Exception [EJB - 10036]: Error during code generation: [Exception [TOPLINK-14016] (TopLink (WLS CMP) - 10g (10.0.3) Developer Preview (Build 030902.1548)): oracle.toplink.ejb.DeploymentException
    Exception Description: An error occurred while setting up the project: [Exception [TOPLINK-106] (TopLink (WLS CMP) - 10g (10.0.3) Developer Preview (Build 030902.1548)): oracle.toplink.exceptions.DescriptorException
    Exception Description: The method [setAllQueries] on the object is throwing an exception.
    Argument: [[ReadObjectQuery(test.datos.MensajeBean), ReadObjectQuery(test.datos.MensajeBean)]]
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: java.lang.NullPointerException
    Mapping: oracle.toplink.ox.CompositeCollectionMapping[queries]
    Descriptor: XMLDescriptor(oracle.toplink.publicinterface.DescriptorQueryManager --> [DatabaseTable(query-policy)])]
    Internal Exception: Exception [TOPLINK-106] (TopLink (WLS CMP) - 10g (10.0.3) Developer Preview (Build 030902.1548)): oracle.toplink.exceptions.DescriptorException
    Exception Description: The method [setAllQueries] on the object is throwing an exception.
    Argument: [[ReadObjectQuery(test.datos.MensajeBean), ReadObjectQuery(test.datos.MensajeBean)]]
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: java.lang.NullPointerException
    Mapping: oracle.toplink.ox.CompositeCollectionMapping[queries]
    Descriptor: XMLDescriptor(oracle.toplink.publicinterface.DescriptorQueryManager --> [DatabaseTable(query-policy)])]
    server stacktrace is:
    Local Exception Stack:
    Exception [TOPLINK-14016] (TopLink (WLS CMP) - 10g (10.0.3) Developer Preview (Build 030902.1548)): oracle.toplink.ejb.DeploymentException
    Exception Description: An error occurred while setting up the project: [Exception [TOPLINK-106] (TopLink (WLS CMP) - 10g (10.0.3) Developer Preview (Build 030902.1548)): oracle.toplink.exceptions.DescriptorException
    Exception Description: The method [setAllQueries] on the object is throwing an exception.
    Argument: [[ReadObjectQuery(test.datos.MensajeBean), ReadObjectQuery(test.datos.MensajeBean)]]
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: java.lang.NullPointerException
    Mapping: oracle.toplink.ox.CompositeCollectionMapping[queries]
    Descriptor: XMLDescriptor(oracle.toplink.publicinterface.DescriptorQueryManager --> [DatabaseTable(query-policy)])]
    Internal Exception: Exception [TOPLINK-106] (TopLink (WLS CMP) - 10g (10.0.3) Developer Preview (Build 030902.1548)): oracle.toplink.exceptions.DescriptorException
    Exception Description: The method [setAllQueries] on the object is throwing an exception.
    Argument: [[ReadObjectQuery(test.datos.MensajeBean), ReadObjectQuery(test.datos.MensajeBean)]]
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: java.lang.NullPointerException
    Mapping: oracle.toplink.ox.CompositeCollectionMapping[queries]
    Descriptor: XMLDescriptor(oracle.toplink.publicinterface.DescriptorQueryManager --> [DatabaseTable(query-policy)])
    at oracle.toplink.ejb.DeploymentException.errorCreatingProject(DeploymentException.java:111)
    at oracle.toplink.internal.ejb.cmp.CmpProjectReader.readProject(CmpProjectReader.java:76)
    at oracle.toplink.internal.ejb.cmp.ProjectDeployment.readProject(ProjectDeployment.java:219)
    at oracle.toplink.internal.ejb.cmp.ProjectDeployment.getProject(ProjectDeployment.java:208)
    at oracle.toplink.internal.ejb.cmp.PersistenceManagerBase.generateBeanSubclass(PersistenceManagerBase.java:176)
    at oracle.toplink.internal.ejb.cmp.wls.WlsCMPCodeGenerator.codeGenSubclass(WlsCMPCodeGenerator.java:51)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at weblogic.utils.compiler.CodeGenerator.processAt(CodeGenerator.java:648)
    at weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:587)
    at weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:519)
    at weblogic.utils.compiler.CodeGenerator.generateCode(CodeGenerator.java:336)
    at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:238)
    at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:197)
    at weblogic.ejb20.ejbc.EJB20CMPCompiler.generatePersistenceSources(EJB20CMPCompiler.java:88)
    at weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java:245)
    at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:476)
    at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:397)
    at weblogic.ejbc20.runBody(ejbc20.java:519)
    at weblogic.utils.compiler.Tool.run(Tool.java:146)
    at weblogic.utils.compiler.Tool.run(Tool.java:103)
    at weblogic.ejbc.main(ejbc.java:29)
    What I don't understand is: if examples include that toplink:ejbql-call it should be declared into the xsd isn't it? It will be included in the future (final) release then?
    Thanks again.
    Ignacio.

  • Error while creating stub and skel for bean using ejbc from weblogic

    I had created a sample ejb , home remote and bean every thing is ok.....i have generated the configuration xml files using the marathon tool in weblogic.....but when i perform ejbc ...
    d:\>java weblogic.ejbc temp.jar sample.jar
    During the compilation the compiler is raising an error stating :
    ERROR: Error creating descriptor from jar file temp.jar:
    ERROR: Error from ejbc: [EJB:010120]Error: The deployment descriptor 'META-INF/ejb-jar.xml' was not found in 'temp.jar'. Please add this file to the JAR and try again
    it produces the above error........in linux fedora......
    can any body solve my problem..........

    its solved ......
    actually linux os is very much case sencitve........asi was trying command on the fat file system which i am accesing from linux is the culprit over here......
    i copied the same thing to the linux ext system it worked..............

  • Weblogic.ejbc - ClassNotFoundException

    Executing the following
    1. cd c:\weblogic
    2. setenv
    3. java weblogic.ejbc -classpath
    C:\VisualCafeEE\Projects\Util\CLASSES;%classpath%;
    C:\VisualCafeEE\Projects\JspBO\_JspBO.jar
    C:\VisualCafeEE\Projects\JspBO\JspBO.jar
    and getting ClassNotFoundException when trying to generate deployment JAR if
    I put all classes from the C:\VisualCafeEE\Projects\Util\CLASSES in to the
    _JspBO.jar then it works fine.
    The stdErr is attached
    What am I doing wrong? Please help.
    [error.txt]

    Yes, it works fine with wlfullclient.jar. But I am trying to avoid forcing the user to get a 60MB jar file to run 10 lines of code. Since my other client/ejb works fine with only wlthint3client.jar, I'm trying to figure out what is different with this client/ejb.

  • Weblogic.ejbc client.jar

    weblogic.ejbc creates a client.jar when run from command prompt but when called from ant tool it does not create client.jar

    Hi Arvind,
    Do you get any errors when calling ejbc from ant?
    Regards,
    Slava Imeshev
    "Arvind Naik" <[email protected]> wrote in message
    news:[email protected]..
    weblogic.ejbc creates a client.jar when run from command prompt but whencalled from ant tool it does not create client.jar

  • Regarding weblogic.ejbc

    hi,
    i tried to do java weblogic.ejbc temp.jar new.jar in weblogic 8.1
    Follwoing is the error what i am getting ,while doing above one
    C:\ramana>java weblogic.ejbc raman.jar nnn.jar
    ERROR: Error creating descriptor from jar file raman.jar:
    ERROR: Error from ejbc: [EJB:010120]Error: The deployment descriptor 'META-INF/e
    jb-jar.xml' was not found in 'raman.jar'. Please add this file to the JAR and tr
    y again.
    ERROR: ejbc couldn't load descriptor from jar
    Could you help me out from this problem.My mail id is:[email protected]
    Thanks in advance

    Come guys be Mentally present while posting a response,Its not that somebody forgets and raises a question.Its that they encounter that while deploying, Even i am getting hte same error when i am using ddconverter to upgrade from one version to other Some one please Hellp me

  • Weblogic.ejbc issue in 5.1

    Hi,I use weblogic 5.1I tried to generate the server skels and stubs with weblogic.ejbc.its giving me an exception "File not found weblogic.ejb20..."But this package comes with weblogic.jar in 6.0 not in 5.1.Do i miss something in classpath for 5.1Please help me out of this.Thanks,Jegan G Karunakaran

    I believe the solution is to ignore the message. It's looks nasty but it is harmless.
    Probably got left in the release code by accident. I think SP9 does not print
    the message.
    Mike
    "Steve Wanhella" <[email protected]> wrote:
    >
    What is the proper way to cross link EJB entity beans in 5.1? Ive
    tried
    every possible combination of (ejb-ref) in the ejb-jar.xml and
    (ejb-resource-ref) in weblogic-ejb-jar.xml and when i deploy the beans.
    Linked references fail and i get : **** not in archive $$$. It doesnt
    crash
    however and the beans seem to deploy, but i really want to stabalize
    this.
    Is there some way to force ONE classloader to deploy all the beans,
    or
    do i simply need to dump more of these ejb-ref ' s everywhere??
    thank you for any assistance.
    Steve Wanhella

Maybe you are looking for

  • Thanko vibrating bracelet and push notifications

    Friend of mine recently received a Thanko bluetooth bracelet that vibrates when a paired iPhone receives a phone call. She had a problem with it, however, and we've been e-mailing back and forth trying to figure out why it wasn't vibrating. Turns out

  • Canon CR2 raw images are forcibly cropped by Camera Raw

    I posted this on the Photoshop Discussion as I did not realise that Camera Raw has its own - sorry folks! Camera raw is cropping my cr2 images even after I have removed the crop in DPP (Digital Photo Professional - Canon's own raw editing software).

  • Error in Creating Outgoing Inovice

    Dear All While saving the general billing dcoument by VF01 for excise invoice to be carried out; the system gives the follwoing message: "Print Excise Invoice in Series grp D1 using J1IP for billing document #...." while trying to retrieve the billin

  • Printing LOGIN ID, DATE, TIME in PDF

    How to automatically print login ID, date, time in PDF

  • Installing CS3 on a Quad core with Raid 5

    I recently bought a new computer and tried installing CS3 Master collection on it and I'm having some problems. The new computer has an AMD quad core processor, 4GB of ram, 3 hard drives set up in a RAID 5, and a high end Nvidia graphics card. I'm us