Weblogic ejbc generating strange bean code

Ok, i solved my previous problem, u can read all about it in my last post. Now I have another issue. It seems that when ejbc is being done, toplink generates some code before the actual compile. What doesn't make sense is that its inserting a create method that itsn't correct, according to my original bean code....
This is what gets generated:
public com.bp.afe.ejb.cmp.attvolumehistory.interfaces.ATTVolumeHistoryPK ejbCreate(com.bp.afe.ejb.cmp.attvolumehistory.interfaces.ATTVolumeHistoryData arg0) throws javax.ejb.CreateException {
     return super.ejbCreate(arg0);
This is my beans create method:
* @ejb:create-method
public Object ejbCreate(ATTVolumeHistoryData data) throws CreateException {
setData(data);
return null;
Then i get the following error while ejbc:
[java] D:\java\working\afe\build\dwalin\jar\ejbcgen\com\bp\afe\ejb\cmp\attvolumehistory\beans\ATTVolumeHistory_yv5h
n__TopLink_CMP_1_1.java:80: ejbCreate(com.bp.afe.ejb.cmp.attvolumehistory.interfaces.ATTVolumeHistoryData) in com.bp.af
.ejb.cmp.attvolumehistory.beans.ATTVolumeHistory_yv5hwn__TopLink_CMP_1_1 cannot override ejbCreate(com.bp.afe.ejb.cmp.a
tvolumehistory.interfaces.ATTVolumeHistoryData) in com.bp.afe.ejb.cmp.attvolumehistory.beans.ATTVolumeHistoryBean; atte
pting to use incompatible return type
[java] found : com.bp.afe.ejb.cmp.attvolumehistory.interfaces.ATTVolumeHistoryPK
[java] required: java.lang.Object

Ok, i solved my previous problem, u can read all about it in my last post. Now I have another issue. It seems that when ejbc is being done, toplink generates some code before the actual compile. What doesn't make sense is that its inserting a create method that itsn't correct, according to my original bean code....
This is what gets generated:
public com.bp.afe.ejb.cmp.attvolumehistory.interfaces.ATTVolumeHistoryPK ejbCreate(com.bp.afe.ejb.cmp.attvolumehistory.interfaces.ATTVolumeHistoryData arg0) throws javax.ejb.CreateException {
     return super.ejbCreate(arg0);
This is my beans create method:
* @ejb:create-method
public Object ejbCreate(ATTVolumeHistoryData data) throws CreateException {
setData(data);
return null;
Then i get the following error while ejbc:
[java] D:\java\working\afe\build\dwalin\jar\ejbcgen\com\bp\afe\ejb\cmp\attvolumehistory\beans\ATTVolumeHistory_yv5h
n__TopLink_CMP_1_1.java:80: ejbCreate(com.bp.afe.ejb.cmp.attvolumehistory.interfaces.ATTVolumeHistoryData) in com.bp.af
.ejb.cmp.attvolumehistory.beans.ATTVolumeHistory_yv5hwn__TopLink_CMP_1_1 cannot override ejbCreate(com.bp.afe.ejb.cmp.a
tvolumehistory.interfaces.ATTVolumeHistoryData) in com.bp.afe.ejb.cmp.attvolumehistory.beans.ATTVolumeHistoryBean; atte
pting to use incompatible return type
[java] found : com.bp.afe.ejb.cmp.attvolumehistory.interfaces.ATTVolumeHistoryPK
[java] required: java.lang.Object

Similar Messages

  • 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

  • NoSuchMethodError in findMethodInfo(__methodSig) in ejbc generated code

    Hi All,
    Happy new year!
    Does anyone know when weblogic.ejbc calls "findMethodInfo(__methodSig)" in its
    generated "*HomeImpl.java" classes?
    This is causing my code to end in a NoSuchMethodError exception.
    The generated code for the included beanManaged.AccountHome does not include this
    call, while the code generated for my code does.
    Can anyone tell me why?
    Anyone from the Weblogic people?
    Thanks,
    Boogie

    boogie wrote:
    Rob Woollen <[email protected]> wrote:
    boogie wrote:
    Thanks for the reply, Rob.
    So the "findMethodInfo()" is caused by the presence of multiple interfacesat
    compile time.It's probably caused because ejbc generates code for version 1 of your
    interface
    but you then deploy a jar that loads version 2 of your interface.
    <boogie>
    i'm using the same interface. however, at compile time, the interface is both
    on the classpath (since i've just compiled it) and in the pre-ejbc jar file (which
    i'm passing to weblogic.ejbc).If it's in the classpath and in the ejb.jar, then ejbc finds the version in the classpath and
    generates code against it.
    from what you've said, i gather this is why ejbc
    puts in a "findMethodInfo()" call in the --HomeImpl.java files that it generates.
    </boogie>
    <boogie>
    SCENARIO 1: I use my build script.
    condition: the home interface is found and compiled, the EJB classes placed in
    a temporary jar file, then passed to EJBC (with -keepgenerated flag)
    output: the generated MyBeanHomeImpl.java calls "findMethodInfo()" and i get NoSuchMethodError
    exception at runtime
    If the version in the classpath and the version in the jar file were exactly the same, then ejbc
    would run fine. It fails when they are different. ejbc is generating code for a method that
    appears in the version that it is loading.
    -- Rob
    >
    SCENARIO 2: I manually build.
    condition: i jar the files manually, pass the jar to weblogic.ejbc (with -keepgenerated)
    without specifying a classpath; the current classpath doesn't include the compiled
    home interface;
    output: the generated MyBeanHomeImpl.java doesn't call "findMethodInfo()", code
    runs as expected
    SO, i need to build with scenario 1 AND still make it run at runtime. i don't
    have multiple copies of the EJB classes/interfaces at deployed or in the classpath
    runtime, but i keep getting the NoSuchMethodError exception because of the "findMethodInfo()"
    call that weblogic.ejbc insists on making. what can I do to solve this problem?
    thanks!
    really appreciate the help!
    </boogie>
    -- Rob
    Rob Woollen <[email protected]> wrote:
    There's some sort of mis-match between the interfaces that ejbc is
    finding
    (and
    generating code for) and the interfaces being deployed.
    I would check your classpath and remove all occurrences of the homeinterface
    class. It should only be in the jar file. Then re-run weblogic.ejbc
    -- Rob
    Boogie wrote:
    Hi All,
    Happy new year!
    Does anyone know when weblogic.ejbc calls "findMethodInfo(__methodSig)"in its
    generated "*HomeImpl.java" classes?
    This is causing my code to end in a NoSuchMethodError exception.
    The generated code for the included beanManaged.AccountHome does
    not
    include this
    call, while the code generated for my code does.
    Can anyone tell me why?
    Anyone from the Weblogic people?
    Thanks,
    Boogie

  • 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.

  • 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

  • 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

  • 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.

  • Problem in moving the java beans code from computer to other

    Hi,
    I am working on building a webservice. I started building the EJB teir compnents like (Entity beans, Sessions beans, data base schemas) using the SUN ONE STUDIO 5 and SUN ONE App Server 7.0.
    The problem, if I want to move the same entity beans code from one computer to other computer.
    I am using same platform except the operating system (XP, and Windows 2000), apart from this every thing is same (Sun one studio 5, sun one app server 7.0). The Entity beans are working on the source computer and tested the beans. But When I moved the code to other computer, I compiled the entity beans code and it compiled perfectly. Then I tested the entity bean, I generated the test client, and deployed it. Till now no problem. When I tried to excute it and invoke the functions then it giving the following error:
    Is there any solution, so that I can avoid coding from scrath again when I want to use same on other computer.
    [22/Sep/2003:10:29:39] SEVERE ( 1616):
    javax.ejb.EJBException: nested exception is: com.sun.jdo.api.persistence.support.JDOUserException: Object not found for this ObjectId.
    NestedException: java.lang.ClassCastException: java.lang.String
    com.sun.jdo.api.persistence.support.JDOUserException: Object not found for this ObjectId.
    NestedException: java.lang.ClassCastException: java.lang.String
    at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl.getObjectById(PersistenceManagerImpl.java:615)
    at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerWrapper.getObjectById(PersistenceManagerWrapper.java:247)
    at Data.AppNumInfoBean_535499553_ConcreteImpl.jdoGetInstance(AppNumInfoBean_535499553_ConcreteImpl.java:905)
    at Data.AppNumInfoBean_535499553_ConcreteImpl.ejbLoad(AppNumInfoBean_535499553_ConcreteImpl.java:693)
    at com.sun.ejb.containers.EntityContainer.callEJBLoad(EntityContainer.java:2372)
    at com.sun.ejb.containers.EntityContainer.afterBegin(EntityContainer.java:1362)
    at com.sun.ejb.containers.BaseContainer.startNewTx(BaseContainer.java:1405)
    at com.sun.ejb.containers.BaseContainer.preInvokeTx(BaseContainer.java:1313)
    at com.sun.ejb.containers.BaseContainer.preInvoke(BaseContainer.java:462)
    at Data.AppNumInfoBean_535499553_ConcreteImpl_EJBObjectImpl.getDatelastapp(AppNumInfoBean_535499553_ConcreteImpl_EJBObjectImpl.java:113)
    at Data._AppNumInfo_Stub.getDatelastapp(Unknown Source)
    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 com.sun.forte4j.j2ee.ejbtest.webtest.InvocableMethod$MethodIM.invoke(InvocableMethod.java:231)
    at com.sun.forte4j.j2ee.ejbtest.webtest.EjbInvoker.getInvocationResults(EjbInvoker.java:96)
    at com.sun.forte4j.j2ee.ejbtest.webtest.DispatchHelper.getForward(DispatchHelper.java:189)
    at jasper.dispatch_jsp._jspService(_dispatch_jsp.java:136)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:552)
    at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:368)
    at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:287)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
    at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
    at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:157)
    at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)
    javax.ejb.EJBException: nested exception is: com.sun.jdo.api.persistence.support.JDOUserException: Object not found for this ObjectId.
    NestedException: java.lang.ClassCastException: java.lang.String
    at com.sun.ejb.containers.EntityContainer.afterBegin(EntityContainer.java:1378)
    at com.sun.ejb.containers.BaseContainer.startNewTx(BaseContainer.java:1405)
    at com.sun.ejb.containers.BaseContainer.preInvokeTx(BaseContainer.java:1313)
    at com.sun.ejb.containers.BaseContainer.preInvoke(BaseContainer.java:462)
    at Data.AppNumInfoBean_53
    [22/Sep/2003:10:32:00] INFO ( 1616): Bean AppNumInfo method ejbLoad:
    com.sun.jdo.api.persistence.support.JDOUserException: Object not found for this ObjectId.
    NestedException: java.lang.ClassCastException: java.lang.String
    at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl.getObjectById(PersistenceManagerImpl.java:615)
    at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerWrapper.getObjectById(PersistenceManagerWrapper.java:247)
    at Data.AppNumInfoBean_535499553_ConcreteImpl.jdoGetInstance(AppNumInfoBean_535499553_ConcreteImpl.java:905)
    at Data.AppNumInfoBean_535499553_ConcreteImpl.ejbLoad(AppNumInfoBean_535499553_ConcreteImpl.java:693)
    at com.sun.ejb.containers.EntityContainer.callEJBLoad(EntityContainer.java:2372)
    at com.sun.ejb.containers.EntityContainer.afterBegin(EntityContainer.java:1362)
    at com.sun.ejb.containers.BaseContainer.startNewTx(BaseContainer.java:1405)
    at com.sun.ejb.containers.BaseContainer.preInvokeTx(BaseContainer.java:1313)
    at com.sun.ejb.containers.BaseContainer.preInvoke(BaseContainer.java:462)
    at Data.AppNumInfoBean_535499553_ConcreteImpl_EJBObjectImpl.setDatelastapp(AppNumInfoBean_535499553_ConcreteImpl_EJBObjectImpl.java:138)
    at Data._AppNumInfo_Stub.setDatelastapp(Unknown Source)
    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 com.sun.forte4j.j2ee.ejbtest.webtest.InvocableMethod$MethodIM.invoke(InvocableMethod.java:231)
    at com.sun.forte4j.j2ee.ejbtest.webtest.EjbInvoker.getInvocationResults(EjbInvoker.java:96)
    at com.sun.forte4j.j2ee.ejbtest.webtest.DispatchHelper.getForward(DispatchHelper.java:189)
    at jasper.dispatch_jsp._jspService(_dispatch_jsp.java:136)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:552)
    at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:368)
    at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:287)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
    at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
    at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:157)
    at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)
    [22/Sep/2003:10:32:00] SEVERE ( 1616): EJB5017: Exception while running preinvoke : ejbName = [AppNumInfo]
    [22/Sep/2003:10:32:00] SEVERE ( 1616):
    javax.ejb.EJBException: nested exception is: com.sun.jdo.api.persistence.support.JDOUserException: Object not found for this ObjectId.
    NestedException: java.lang.ClassCastException: java.lang.String
    com.sun.jdo.api.persistence.support.JDOUserException: Object not found for this ObjectId.
    NestedException: java.lang.ClassCastException: java.lang.String
    at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl.getObjectById(PersistenceManagerImpl.java:615)
    at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerWrapper.getObjectById(PersistenceManagerWrapper.java:247)
    at Data.AppNumInfoBean_535499553_ConcreteImpl.jdoGetInstance(AppNumInfoBean_535499553_ConcreteImpl.java:905)
    at Data.AppNumInfoBean_535499553_ConcreteImpl.ejbLoad(AppNumInfoBean_535499553_ConcreteImpl.java:693)
    at com.sun.ejb.containers.EntityContainer.callEJBLoad(EntityContainer.java:2372)
    at com.sun.ejb.containers.EntityContainer.afterBegin(EntityContainer.java:1362)
    at com.sun.ejb.containers.BaseContainer.startNewTx(BaseContainer.java:1405)
    at com.sun.ejb.containers.BaseContainer.preInvokeTx(BaseContainer.java:1313)
    at com.sun.ejb.containers.BaseContainer.preInvoke(BaseContainer.java:462)
    at Data.AppNumInfoBean_535499553_ConcreteImpl_EJBObjectImpl.setDatelastapp(AppNumInfoBean_535499553_ConcreteImpl_EJBObjectImpl.java:138)
    at Data._AppNumInfo_Stub.setDatelastapp(Unknown Source)
    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 com.sun.forte4j.j2ee.ejbtest.webtest.InvocableMethod$MethodIM.invoke(InvocableMethod.java:231)
    at com.sun.forte4j.j2ee.ejbtest.webtest.EjbInvoker.getInvocationResults(EjbInvoker.java:96)
    at com.sun.forte4j.j2ee.ejbtest.webtest.DispatchHelper.getForward(DispatchHelper.java:189)
    at jasper.dispatch_jsp._jspService(_dispatch_jsp.java:136)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:552)
    at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:368)
    at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:287)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
    at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
    at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:157)
    at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)
    javax.ejb.EJBException: nested exception is: com.sun.jdo.api.persistence.support.JDOUserException: Object not found for this ObjectId.
    NestedException: java.lang.ClassCastException: java.lang.String
    at com.sun.ejb.containers.EntityContainer.afterBegin(EntityContainer.java:1378)
    at com.sun.ejb.containers.BaseContainer.startNewTx(BaseContainer.java:1405)
    at com.sun.ejb.containers.BaseContainer.preInvokeTx(BaseContainer.java:1313)
    at com.sun.ejb.containers.BaseContainer.preInvoke(BaseContainer.java:462)
    at Data.AppNumInfoBean_53

    There appears to be either a portion that didn't get recompiled, or perhaps a hard-coded GUID-type number within the application. Carefully go over the elements in the application that were hard-coded to run on the other machine -- were they have all been migrated?

  • 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;

  • Urgent How to generate a random code such as registration code?

    I would like to ask that how to generate a random code?
    For example, when you register a E-mail account, you need to enter the code for activation. I would like to create a java Bean to do this job. Would you help me?

    In fact, I would like to set a 10 digi codes randomly (such as FH654CS081, MKO624VG9f) for user input when they register the forum account. This random code will be sent to the user's email. User have to input this code to a JSP web site. Also, the code which is inputed by user will be matched with the database. If user input success, the forum account will be activated.
    By generating this 10 digi codes, I want to handle this generation by using java bean.
    1) Any thing else i need to import ? (such as <% page import="java.......?")
    2) Any functions can handle this task?
    3) Any example can be my reference?
    Thank you very much

  • Generating of QR code in offline mode

    Hello everyone. I want help to generate QR code in the offline mode. I did
    try to generate QR code using labview but when am online. i am able to generate
    the qr code. I will attach my VI below for the online.
    Can some1 help me please.
    Solved!
    Go to Solution.
    Attachments:
    name.vi ‏19 KB
    1q.JPG ‏67 KB
    1q2.JPG ‏31 KB

    Zahkay wrote:
    Hello again sir
    Yeah i am new in labview and with the specific term you used make me like i have to check it out.
    i will try my best to understand.
    Thank you very much
    In case you find easier and more direct Vi, i will grateful to hear from you
    Regards
    This is one of those times that you just say thank you and keep learning.
    There is nothing "Basic" in that code. not the code and not the math.  And the correct honorific in this case would be "Doctor"  As in "more degrees than most thermometers" (Not that he doesn't play with large numbers of negative degrees that don't appear on most thermometers)
    The strange thing is he probably coded that up "just for fun"  Some days his examples just make me want to go play with a frisbee.
    Jeff

  • Dynamically generate JSF Source code in a JSP

    Hi,
    I have a JSP and instead of writing the JSF source Code like:
    <h:inputText
    styleClass="entryInput"
    id="textNumberOfServerMachinesInput"
    value="#{DataAccess.value}"
    valueChangeListener="#{InputValueChanged.processValueChange}">
    </h:inputText>
    manually in the jsp I want the JSF source code to be added dynamically to the jsp.
    So what I want is including a tag in the jsp and this tag generates JSF source code like seen above.
    This source code should then be treated just the way it would be if I had written it manually in the JSP. This means that the dynamically generated JSF code must be interpreted and all Listeners and Beans work just fine.
    How can I make this???

    Hi,
    I have a smiliar problem:
    JSP:
    <h:panelGrid binding="#{fileUploadGrid.panelGrid}">
       <%-- emty in jsp --%>
    </h:panelGrid>The panel should be populated with items the backing bean creates in source code:
    FileUploadGrid.java
    public void setUploadFieldNumber(int uploadFieldNumber) {
        this.uploadFieldNumber = uploadFieldNumber;
        this.refresh();
    private void refresh() {
        if (this.panelGrid == null)
          this.createPanelGrid();
        List children = this.panelGrid.getChildren();
        children.clear();
        for (int i = 0; i < this.uploadFieldNumber; i++) {
          HtmlOutputText out = new HtmlOutputText();
          out.setTitle("Image " + i);
          out.setRendered(true);
          HtmlInputText in = new HtmlInputText();
          children.add(out);
          children.add(in);   
    private void createPanelGrid() {
        this.panelGrid = new HtmlPanelGrid();
        this.panelGrid.setColumns(2);
        this.panelGrid.setCellpadding("1");
        this.panelGrid.setBorder(1);
        this.panelGrid.setWidth("50%");
        this.panelGrid.setRendered(this.isRendered());
    public void setPanelGrid(HtmlPanelGrid panelGrid) {
        this.panelGrid = panelGrid;
      public HtmlPanelGrid getPanelGrid() {
        return this.panelGrid;
    }The backing bean is initialized in faces-config.xml:
    <managed-bean>
      <managed-bean-name>fileUploadGrid</managed-bean-name>
      <managed-bean-class>org.smi.pte.isf.FileUploadGrid</managed-bean-class>
      <managed-bean-scope>request</managed-bean-scope>
      <managed-property>
        <property-name>rendered</property-name>
        <value>true</value>
      </managed-property>
      <managed-property>
         <property-name>uploadFieldNumber</property-name>
         <value>6</value>
      </managed-property>
    </managed-bean>The problem is: although the debug output of the faces framework (I use it along with Tomcat) shows that the in- and output fields are added correctly to the panel, the page remains empty at display.
    Thanks in advance for any help.
    F. Eckhardt

  • SUN AS generates wrong WS code very often !

    Hi
    I am using NB 4.1 and SUN AS 8.1 to create some WEB services. I am using JSR 109 compatible WS stub generation. Application server generates them when a WS is being deployed.
    There are several cases when it generates wrong java code that cannot be compiled.
    I have created a very simple WS that returns an array of custom class objects (DTOs).
    package lv.test;
    import lv.test.dto.OneDTO;
    public class BugTestWebServiceImpl implements BugTestWebServiceSEI
        public OneDTO[] test()
            return new OneDTO[] {};
    }And here is my DTO class.
    package lv.test.dto;
    import java.io.Serializable;
    public class OneDTO implements Serializable
        private String tx3dstatus;
        public OneDTO()
        public String getTx3dstatus()
            return tx3dstatus;
        public void setTx3dstatus(String tx3dstatus)
            this.tx3dstatus = tx3dstatus;
    }Quite simple, isn't it ? Now you can get very stupid code out from SUN AS just by changing some simple WS settings.
    Let's disable documentliteral and enable rpcliteral. After all it should be RPC style WebService, not Document-style. And behold , you will get some stupid java code that doesn't even compile !
    [#|2005-06-01T18:33:29.390+0300|WARNING|sun-appserver-pe8.1_01|javax.enterprise.system.tools.deployment|_ThreadID=21;|DPL5035:Error while running ejbc
    com.sun.enterprise.deployment.backend.IASDeploymentException: Fatal Error from EJB Compiler -- jaxrpc compilation exception
    C:\Sun\AppServer\domains\domain1\generated\ejb\j2ee-modules\RPCBug\lv\test\BugTestWebServiceSEI_Tie.java:56: incompatible types
    found : lv.test.dto.OneDTO[]
    required: lv.test.OneDTO[]
    ((lv.test.BugTestWebServiceSEI) getTarget()).test();
    ^
    Why it assumes that DTO should be in the same package where WS implementation is ?
    Another interesting thing happens if you disable both documentliteral and rpcliteral:
    [#|2005-06-01T18:59:44.578+0300|SEVERE|sun-appserver-pe8.1_01|javax.enterprise.system.tools.deployment|_ThreadID=13;|Exception occured in J2EEC Phase
    com.sun.enterprise.deployment.backend.IASDeploymentException: Error while running ejbc -- Fatal Error from EJB Compiler -- jaxrpc compilation exception
    C:\Sun\AppServer\domains\domain1\generated\ejb\j2ee-modules\RPCBug\lv\test\dto\OneDTO_SOAPSerializer.java:51: cannot resolve symbol
    symbol : method setTx3Dstatus (java.lang.String)
    location: class lv.test.dto.OneDTO
    instance.setTx3Dstatus((java.lang.String)member);
    ^
    |#]
    [#|2005-06-01T18:59:44.312+0300|INFO|sun-appserver-pe8.1_01|javax.enterprise.system.stream.out|_ThreadID=13;|C:\Sun\AppServer\domains\domain1\generated\ejb\j2ee-modules\RPCBug\lv\test\dto\OneDTO_SOAPSerializer.java:69: cannot resolve symbol
    symbol : method getTx3Dstatus ()
    location: class lv.test.dto.OneDTO
    ns3_myns3_string__java_lang_String_String_Serializer.serialize(instance.getTx3Dstatus(), ns1_tx3dstatus_QNAME, null, writer, context);
    ^
    |#]
    [#|2005-06-01T18:59:44.312+0300|INFO|sun-appserver-pe8.1_01|javax.enterprise.system.stream.out|_ThreadID=13;|C:\Sun\AppServer\domains\domain1\generated\ejb\j2ee-modules\RPCBug\lv\test\dto\OneDTO_SOAPBuilder.java:39: cannot resolve symbol
    symbol : method setTx3Dstatus (java.lang.String)
    location: class lv.test.dto.OneDTO
    _instance.setTx3Dstatus((java.lang.String)memberValue);
    ^
    |#]
    Now it has generated code that tries to use non-existing method !
    Why it's so buggy ?
    If you don't believe me you can get whole NB 4.1project from http://maris.site.lv/RPCBug.zip and try it yourself.

    I think there are some known restrictions and bugs - check with JAXRPC folks : http://forums.java.net/jive/forum.jspa?forumID=46;

Maybe you are looking for

  • Open data set / code page

    Hello , I am sending file to print server  and i am accounting problems with  special characters In first version of  program  ( please see the code below ) "OPEN DATASET g_filename  FOR OUTPUT IN TEXT MODE ENCODING DEFAULT." The special characters l

  • IDOC to File Mapping problem.

    Hi all, I am working on IDOC to file scenario. Here I need to create CSV file for some fields of the IDOC. Actually flat file should contain around 65 comma separated fields irrespective (independent of the segment presence in the IDOC) of the existe

  • ADDRESS_INTO_PRINTFORM - Is it possible to chose the order of line output ?

    Hello, I use this FM  - ADDRESS_INTO_PRINTFORM, that provide me am output format for address. The output is: lineo line1 line2 line3 etc etc Is it possible to chose the order output ? I mean, first line0, after line1, after line4, after line3, etc et

  • Problems installing Project Server 2013 SP1

    Hi, I have an issue installing Project Server SP1 (KB2880553). The history of this installation is as follows below: I have one App Server and one Web Server (test environment) On February I installed the mistaken SharePoint 2013 SP1, Project Server

  • Need help deleting newly created folder...

    So, I'm using an iCal alarm to download a folder of files (.jpgs) using fetch. I then have a folder action set up to move the newly downloaded images to another folder, then they are separated by a "move by EXIF data" action. This all works well, but