EJBC throws UndeclaredThrowableException during compiling ejbs in ear file

Hi all.
I have a problem that weblogic 6.1 sp1 throws UndeclaredThrowableException when
I try to deploy ear file from admin console.
I tried pre-compile these ejbs, then I can deploy this ear.
In ejb jar, I'm using manifest file to use outer jar file. But ejbc does not use class pathes specified in manifest.
Please help.
Thanks,
Watanabe

You should put the outer jars on the classpath when you do the ejbc. Here is
an example:
java -classpath \bea\wlserver6.1\lib\weblogic.jar;yourlib.jar
weblogic.ejbc -compiler javac std_ejb.jar ejb.jar
Regards
Arjuna Chala
"Toru Watanabe" <[email protected]> wrote in message
news:3c74db3d$[email protected]..
Hi all.
I have a problem that weblogic 6.1 sp1 throws UndeclaredThrowableExceptionwhen
I try to deploy ear file from admin console.
I tried pre-compile these ejbs, then I can deploy this ear.
In ejb jar, I'm using manifest file to use outer jar file. But ejbc doesnot use class pathes specified in manifest.
>
Please help.
Thanks,
Watanabe

Similar Messages

  • WL8.1 crashed during deployment of EJB from ear file

    Hello,
    WL8.1 crashed during deployment of EJB from ear file on SunOs 5.8:
    error: Invalid class file format in /export/home/bea/j2sdk1.4.1_03/jre/lib/rt.jar(java/lang/AssertionError.class).
    The major.minor version '48.0' is too recent for this tool to understand.
    /export/home/mydomain/./ep1/.wlnotdelete/EJBCompilerCache/1xd25ws3hwp86/mydomain/facade/payroll/PayrollFL_vww01c_HomeImpl.java:83:
    Class java.lang.AssertionError not found.
    throw new AssertionError("Unable to find expected "+
    Thanks,
    Oleg.

    Thank you Mark,
    It works now.
    Oleg.
    "Mark Griffith" <[email protected]> wrote:
    I don't think though that _03 is the problem, you should have compatability
    between minor versions of a VM release. How did you deploy the ear?
    Did
    you copy over from a 7.0 domain? It looks like the EJB was built on
    a
    previous version of WLS, or has not had "ejbc" run on it prior to
    deployment. Try running weblogic.appc foo.ear or fooExplodedEar. And
    then
    try redeploying. To be sure everything is clean rm -rf .wldonotdelete
    after
    you shut the server down.
    cheers
    mbg
    "Oleg" <[email protected]> wrote in message
    news:3ef54653$[email protected]..
    Hello,
    WL8.1 crashed during deployment of EJB from ear file on SunOs 5.8:
    error: Invalid class file format in/export/home/bea/j2sdk1.4.1_03/jre/lib/rt.jar(java/lang/AssertionError.class
    The major.minor version '48.0' is too recent for this tool to understand.
    /export/home/mydomain/./ep1/.wlnotdelete/EJBCompilerCache/1xd25ws3hwp86/mydo
    main/facade/payroll/PayrollFL_vww01c_HomeImpl.java:83:
    Class java.lang.AssertionError not found.
    throw new AssertionError("Unable to find expected "+
    Thanks,
    Oleg.

  • J2EE .class file compiling for jar, ear files.

    I know that using the former Sun/present Oracle .class java source code compiler,
    I create a platform independet class file which can be used by the java language
    on any OS environment with the appropriate Java Runtime Environment installed.
    I know that there are obfuscation tools available to prevent the .class file decompilation
    related issues.
    I have also been using the GNU gcj compiler with great success. However,
    I havn't been able to find a non-commercial purchase compiler that can create
    .class files, with the same platform independence, but that can't be easily decompiled
    based on the simple content in .class files. Can someone point me to someone on the net
    for a free for commercial development java compiler, past about 1.5.X ?

    If it were possible, don't you think Oracle would have built the compiler like that themselves?

  • Deploying application with EAR file: problems....

    Hello!
    We been working in a test environment for developing our application. When its done and ready to go in production, we did generate the deployed application archive (EAR) with the console. Then, we used the
    java -jar admin.jar -deploy command to deploy in the prod. env.
    Meanwhile, we always get this kind of error, as it seems that oc4j is not generating EJB wrapper correctly:
    GestionApplicationSBHome_StatelessSessionHomeWrapper120 was not an instance of interface sertir.portail.gap.GestionApplicationSBHome, the interface it implements is sertir.portail.gap.GestionApplicationSBHome
    at java.lang.Throwable.fillInStackTrace(Native Method)
    AND
    java.lang.ClassCastException: ApplicationEBHome_EntityHomeWrapper14 was not an instance of interface sertir.portail.gap.ApplicationEBHome, the interfaces it implements are sertir.portail.gap.ApplicationEBHome, com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].util.ExternalComparator, com.evermind[Oracle9iAS (1.0.2.2) Containers for J2EE].server.ejb.EntityContainer
    and other errors doing that with almost all EJBs.
    My question is, is there a special switch in the deploy command to force the compilation of the EAR file?
    Any help would be appreciated...
    Thanks!

    These are set of jar files that are placed in WEB-INF/lib folder
    jsf-api.jar
    commons-net-1.4.1.jar
    itext-1.4.2.jar
    javax.servlet_1.0.0.0_2-5.jar
    log4j-1.2.8.jar
    lucene-core-2.0.0.jar
    ojdbc5.jar
    ojdl.jar
    ojdl2.jar
    orai18n-lcsd.jar
    trinidad-api.jar
    I think adf-faces-impl.jar is doesn't require for my application because we have migrated our application from ADF Faces to Trinidad.
    Thanks
    Sukumar

  • Deploying web service ear file

    Hi,
    I've developed a simple web service using NetWeaver Developer studio 2.0.5 and created an .ear file for deployment to SAP WAS 6.2.  While trying to load ear file from the deploy tool it throws an error - "Unable to load ear file".  Has anyone seen this error before?  Any problems with the NetWeaver and SAP WAS versions? Any suggestions on how to deploy a web service on SAP J2EE 6.2?

    Hi Dipesh,
    well, if you are using J2EE Engine 6.20 you cannot deploy directly from the NetWeaver Developer Studio (as far as I know, this feature is available only after 6.30/6.40 versions).
    Also, web services are only partially implemented on J2EE Engine 6.20! So it is possible that the web service you've developed with the Developer studio depends on features that are not available on J2EE Engine 6.20. My recommendation is to give a try to the J2EE Engine 6.40, if possible for you at all.
    Finally, there is an alternative to Deploy Tool for deployment on the J2EE Engine 6.20. This is the DEPLOY shell command that you can execute in the server console. For more info about that, refer to the Shell Commands Reference section in the Administration Manual for J2EE Engine 6.20 located here: https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sapportals.km.docs/documents/a1-8-4/administration manual for sap j2ee engine 6.20.pdf
    Hope that helps!

  • Error while running ejbc. Fatal error from EJB Compiler ---- Error while pr

    Hi!
    I was deploying a test application for a session bean with sun 1 studio 5 and I started getting this message while deploying.
    I had tested the bean previously and I had no problems.
    I found this in the sun app server 7 release notes, but I don't understand what I'm supposed to do...
    "Deployment of CMP beans fails.
    The following error is thrown because there are no <query-params> entries in the container-managed persistence (CMP) bean in sun-ejb-jar.xml file:
    Error while running ejbc. Fatal error from EJB Compiler ---- Error while processing CMP beans.
    Solution
    Even if it isn't necessary for the CMP beans, add the query-params tag for finders in the sun-ejb-jar.xml file with the empty parameters."
    Here is my sun-ejb-jar.xml file:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 EJB 2.0//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_0-0.dtd">
    <sun-ejb-jar>
    <enterprise-beans>
    <name>GestorDoBanco_EJBModule</name>
    <ejb>
    <ejb-name>Cliente</ejb-name>
    <jndi-name>ejb/Cliente</jndi-name>
    <pass-by-reference>false</pass-by-reference>
    <cmp>
    <mapping-properties>pcImpl0/moduleComp1/Data/Cliente.mapping</mapping-properties>
    </cmp>
    <refresh-period-in-seconds>600</refresh-period-in-seconds>
    </ejb>
    <ejb>
    <ejb-name>ClienteAssociadoAConta</ejb-name>
    <jndi-name>ejb/ClienteAssociadoAConta</jndi-name>
    <pass-by-reference>false</pass-by-reference>
    <cmp>
    <mapping-properties>pcImpl0/moduleComp1/Data/ClienteAssociadoAConta.mapping</mapping-properties>
    </cmp>
    <refresh-period-in-seconds>600</refresh-period-in-seconds>
    </ejb>
    <ejb>
    <ejb-name>Conta</ejb-name>
    <jndi-name>ejb/Conta</jndi-name>
    <pass-by-reference>false</pass-by-reference>
    <cmp>
    <mapping-properties>pcImpl0/moduleComp1/Data/Conta.mapping</mapping-properties>
    </cmp>
    <refresh-period-in-seconds>600</refresh-period-in-seconds>
    </ejb>
    <ejb>
    <ejb-name>GestorDoBanco</ejb-name>
    <jndi-name>ejb/GestorDoBanco</jndi-name>
    <pass-by-reference>false</pass-by-reference>
    </ejb>
    <ejb>
    <ejb-name>MensagemM003</ejb-name>
    <jndi-name>ejb/MensagemM003</jndi-name>
    <pass-by-reference>false</pass-by-reference>
    <cmp>
    <mapping-properties>pcImpl0/moduleComp1/Data/MensagemM003.mapping</mapping-properties>
    </cmp>
    <refresh-period-in-seconds>600</refresh-period-in-seconds>
    </ejb>
    <ejb>
    <ejb-name>MensagemM003Rejeitada</ejb-name>
    <jndi-name>ejb/MensagemM003Rejeitada</jndi-name>
    <pass-by-reference>false</pass-by-reference>
    <cmp>
    <mapping-properties>pcImpl0/moduleComp1/Data/MensagemM003Rejeitada.mapping</mapping-properties>
    </cmp>
    <refresh-period-in-seconds>600</refresh-period-in-seconds>
    </ejb>
    <ejb>
    <ejb-name>MensagemM012</ejb-name>
    <jndi-name>ejb/MensagemM012</jndi-name>
    <pass-by-reference>false</pass-by-reference>
    <cmp>
    <mapping-properties>pcImpl0/moduleComp1/Data/MensagemM012.mapping</mapping-properties>
    </cmp>
    <refresh-period-in-seconds>600</refresh-period-in-seconds>
    </ejb>
    <ejb>
    <ejb-name>MensagemM012Rejeitada</ejb-name>
    <jndi-name>ejb/MensagemM012Rejeitada</jndi-name>
    <pass-by-reference>false</pass-by-reference>
    <cmp>
    <mapping-properties>pcImpl0/moduleComp1/Data/MensagemM012Rejeitada.mapping</mapping-properties>
    </cmp>
    <refresh-period-in-seconds>600</refresh-period-in-seconds>
    </ejb>
    <ejb>
    <ejb-name>MensagemM103</ejb-name>
    <jndi-name>ejb/MensagemM103</jndi-name>
    <pass-by-reference>false</pass-by-reference>
    <cmp>
    <mapping-properties>pcImpl0/moduleComp1/Data/MensagemM103.mapping</mapping-properties>
    </cmp>
    <refresh-period-in-seconds>600</refresh-period-in-seconds>
    </ejb>
    <ejb>
    <ejb-name>MensagemM112</ejb-name>
    <jndi-name>ejb/MensagemM112</jndi-name>
    <pass-by-reference>false</pass-by-reference>
    <cmp>
    <mapping-properties>pcImpl0/moduleComp1/Data/MensagemM112.mapping</mapping-properties>
    </cmp>
    <refresh-period-in-seconds>600</refresh-period-in-seconds>
    </ejb>
    <ejb>
    <ejb-name>Registo</ejb-name>
    <jndi-name>ejb/Registo</jndi-name>
    <pass-by-reference>false</pass-by-reference>
    <cmp>
    <mapping-properties>pcImpl0/moduleComp1/Data/Registo.mapping</mapping-properties>
    </cmp>
    <refresh-period-in-seconds>600</refresh-period-in-seconds>
    </ejb>
    <ejb>
    <ejb-name>TransaccaoConfirmada</ejb-name>
    <jndi-name>ejb/TransaccaoConfirmada</jndi-name>
    <pass-by-reference>false</pass-by-reference>
    <cmp>
    <mapping-properties>pcImpl0/moduleComp1/Data/TransaccaoConfirmada.mapping</mapping-properties>
    </cmp>
    <refresh-period-in-seconds>600</refresh-period-in-seconds>
    </ejb>
    <ejb>
    <ejb-name>TransaccaoFinalizada</ejb-name>
    <jndi-name>ejb/TransaccaoFinalizada</jndi-name>
    <pass-by-reference>false</pass-by-reference>
    <cmp>
    <mapping-properties>pcImpl0/moduleComp1/Data/TransaccaoFinalizada.mapping</mapping-properties>
    </cmp>
    <refresh-period-in-seconds>600</refresh-period-in-seconds>
    </ejb>
    <ejb>
    <ejb-name>TransaccaoIniciada</ejb-name>
    <jndi-name>ejb/TransaccaoIniciada</jndi-name>
    <pass-by-reference>false</pass-by-reference>
    <cmp>
    <mapping-properties>pcImpl0/moduleComp1/Data/TransaccaoIniciada.mapping</mapping-properties>
    </cmp>
    <refresh-period-in-seconds>600</refresh-period-in-seconds>
    </ejb>
    <pm-descriptors>
    <pm-descriptor>
    <pm-identifier>SunONE</pm-identifier>
    <pm-version>1.0</pm-version>
    <pm-class-generator>com.iplanet.ias.persistence.internal.ejb.ejbc.JDOCodeGenerator</pm-class-generator>
    <pm-mapping-factory>com.iplanet.ias.cmp.NullFactory</pm-mapping-factory>
    </pm-descriptor>
    <pm-inuse>
    <pm-identifier>SunONE</pm-identifier>
    <pm-version>1.0</pm-version>
    </pm-inuse>
    </pm-descriptors>
    <cmp-resource>
    <jndi-name>mysqlpmanager</jndi-name>
    <default-resource-principal>
    <name>bes</name>
    <password>besbes</password>
    </default-resource-principal>
    </cmp-resource>
    </enterprise-beans>
    </sun-ejb-jar>
    Thanks in advance for any help.
    Nuno

    http://docs.sun.com/source/817-2175-10/decmp.html
    Please go to the above docs and look thru the examples given in it.
    Example 2
    This query returns all products in a specified price range. It defines two query parameters which are the lower and upper bound for the price: double low, double high. The filter compares the query parameters with the price field:
    "low < price && price < high"
    The finder element of the sun-ejb-jar.xml file would look like this:
    <finder>
    <method-name>findInRange</method-name>
    <query-params>double low, double high</query-params>
    <query-filter>low < price && price &lt
    high</query-filter
    </finder>
    I hope this hepls. In your case u just have to make it null.

  • NoClassDefFoundError during deployment & accessing EJBs in ear

    Platform - Redhat Linux 7.2 weblogic6.0 ant 1.3 for compilation and creation of ear.
    I get a NoClassDefFoundError when I try to access some of the EJBs in my deployed
    ear file.
    Previously, I faced a NoClassDefFoundError problem in deployment and I put the jar
    containing
    the classes that it was asking for, in the classpath in startWeblogic.sh.
    The ear got deployed after that.
    Error I am getting now...
    2002-04-29 18-05-18 - bang - <INFO> - Type :Operation Groups
    2002-04-29 18-05-18 - bang - <INFO> - SELECT member FROM s_access_group WHERE site
    = ? AND facility
    = ? AND type = ? AND name in('null')
    2002-04-29 18-05-18 - bang - <DEBUG> - DB Connection closed
    2002-04-29 18-05-18 - bang - <DEBUG> - DB Connection closed
    2002-04-29 18-05-18 - bang - <ERROR> - Controller: createSessionForTheUser: Caught
    Remote exception
    while creating SessionMgrEJB
    java.rmi.RemoteException: EJB Exception:; nested exception is:
    java.lang.NoClassDefFoundError: com/seagate/edcs/server/system/sysmgr/GroupDetails
    java.lang.NoClassDefFoundError: com/seagate/edcs/server/system/sysmgr/GroupDetails
    at com.seagate.edcs.util.system.SecurityUtils.getMembersOfGroups(SecurityUtils.java:205)
    at com.seagate.edcs.util.system.SecurityUtils.getGuestPrivileges(SecurityUtils.java:376)
    at com.seagate.edcs.server.system.sessionmgr.SessionMgrEJB.ejbCreate(SessionMgrEJB.java:127)
    I have done the same compilation and creation of ear and deployment in a Solaris
    server, using the
    same source code and build.xml ( ant build file) and ant properties file; never saw
    any errors like this.
    I unjared the ear lying in the solaris machine that I was using previously and the
    ear that
    I created now in the linux server, and saw a difference in the manifest files...
    the manifest files remains same as what I decribe with the EJB source in the previous
    (solaris)
    case...
    Manifest-Version: 1.0
    Created-By: 1.3.0 (Sun Microsystems Inc.)
    Class-Path: edcs2000_utility.jar edcsreportmgr.jar wipgrpmgr.jar resourcegrpmgr.jar
    systemgrpmgr.jar
    notificationmgr.jar role.jar user.jar
    The manifest file in the ear created now in the linux machine is something like this;
    different
    from what I describe together with the EJB.
    Manifest-Version: 1.0
    Name: com/seagate/edcs/server/system/role/RoleEJBHomeImpl_WLStub.class
    Name: com/seagate/edcs/server/system/role/ACLDetails.class
    Name: WLGENERATED
    Name: com/seagate/edcs/server/system/role/RolePK.class
    Name: com/seagate/edcs/server/system/role/RoleEJBHomeImplAD.ser
    Name: com/seagate/edcs/server/system/role/RoleEJBEOImpl_WLStub.class
    Name: com/seagate/edcs/server/system/role/RoleEJBEOImpl.class
    Name: META-INF/ejb-jar.xml
    what might be the issue here ? Please do have a look and help!
    Thanks in advance
    Prabin.

    Hi Kevin,
    Use remote EJB method calls. For details, look for "Parent application" topic in this forum or Servlet development guide in Oracle Documentation Library. I know, it does not seem to be the right source when looking for EJB documentation, however, it is.
    Daniel.

  • WLS 5.1.0 SP 12 ejbc throws NoSuchMethodError on entity beans

    Greetings all,
    Due to a trashed hard disk, I'm in the middle of getting WebLogic
    server reinstalled. Because of some problems with Oracle 8.1.6 and
    WLS 5.1.0 SP9, I've been trying to get SP12 to run, with little luck.
    I suspect an installation / configuration problem, but I don't know
    what it is.
    The symptom is that I can't compile entity beans - ejbc throws a
    NoSuchMethodError exception. For the sake of simplicity, and to prove
    to myself it wasn't our code, I tried building one of the examples,
    and it has the same problem. Does anyone see anything I've done
    wrong in the configuration?
    Below is the captured output from build & wlconfig:
    C:\weblogic\examples\ejb\basic\containerManaged>build
    C:\weblogic\examples\ejb\basic\containerManaged>if "" == "c:\jdk1.3.1\jre"
    set JAVA_HOME=\java
    C:\weblogic\examples\ejb\basic\containerManaged>if "" == "c:\weblogic" set
    WL_HOME=\weblogic
    C:\weblogic\examples\ejb\basic\containerManaged>set
    MYSERVER=c:\weblogic\myserver
    C:\weblogic\examples\ejb\basic\containerManaged>set
    MYCLASSPATH=c:\jdk1.3.1\jre\lib\classes.zip;c:\weblogic\classes;c:\weblogi
    c\lib\weblogicaux.jar;c:\weblogic\
    myserver\clientclasses
    C:\weblogic\examples\ejb\basic\containerManaged>mkdir build build\META-INF
    A subdirectory or file build already exists.
    Error occurred while processing: build.
    A subdirectory or file build\META-INF already exists.
    Error occurred while processing: build\META-INF.
    C:\weblogic\examples\ejb\basic\containerManaged>copy *.xml build\META-INF
    ejb-jar.xml
    weblogic-cmp-rdbms-jar.xml
    weblogic-ejb-jar.xml
    3 file(s) copied.
    C:\weblogic\examples\ejb\basic\containerManaged>javac -d build -classpath
    c:\jdk1.3.1\jre\lib\classes.zip;c:\weblogic\classes;c:\weblogic\lib\weblog
    icaux.jar;c:\weblogic\myserver\clientclasses Account.java AccountHome.java
    ProcessingErrorException.java AccountBean.java
    C:\weblogic\examples\ejb\basic\containerManaged>cd build
    C:\weblogic\examples\ejb\basic\containerManaged\build>jar cv0f
    std_ejb_basic_containerManaged.jar META-INF examples
    added manifest
    ignoring entry META-INF/
    adding: META-INF/ejb-jar.xml(in = 1210) (out= 1210)(stored 0%)
    adding: META-INF/weblogic-cmp-rdbms-jar.xml(in = 1472) (out= 1472)(stored
    0%)
    adding: META-INF/weblogic-ejb-jar.xml(in = 975) (out= 975)(stored 0%)
    adding: examples/(in = 0) (out= 0)(stored 0%)
    adding: examples/ejb/(in = 0) (out= 0)(stored 0%)
    adding: examples/ejb/basic/(in = 0) (out= 0)(stored 0%)
    adding: examples/ejb/basic/containerManaged/(in = 0) (out= 0)(stored 0%)
    adding: examples/ejb/basic/containerManaged/Account.class(in = 422) (out=
    422)(stored 0%)
    adding: examples/ejb/basic/containerManaged/AccountBean.class(in = 3884)
    (out= 3884)(stored 0%)
    adding: examples/ejb/basic/containerManaged/AccountHome.class(in = 711)
    (out= 711)(stored 0%)
    adding:
    examples/ejb/basic/containerManaged/ProcessingErrorException.class(in
    =339) (out= 339)(stored 0%)
    C:\weblogic\examples\ejb\basic\containerManaged\build>cd ..
    C:\weblogic\examples\ejb\basic\containerManaged>java -classpath
    c:\jdk1.3.1\jre\lib\classes.zip;c:\weblogic\classes;c:\weblogic\lib\weblog
    icaux.jar;c:\weblogic\myserver\clientclasses -Dweblogic.home=c:\weblogic
    weblogic.ejbc -compiler javac build\std_ejb_basic_containerManaged.jar
    c:\weblogic\myserver\ejb_basic_containerManaged.jar
    java.lang.NoSuchMethodError
    at
    weblogic.cmp.rdbms.codegen.StoreGenerator.addPreparedStatementBinding(Stor
    eGenerator.java:839)
    at
    weblogic.cmp.rdbms.codegen.StoreGenerator.preparedStatementBindings(StoreG
    enerator.java:805)
    at
    weblogic.cmp.rdbms.codegen.StoreGenerator.setPrimaryKeyParams(StoreGenerat
    or.java:194)
    at java.lang.reflect.Method.invoke(Native Method)
    at
    weblogic.utils.compiler.CodeGenerator.processAt(CodeGenerator.java:619)
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:533)
    at
    weblogic.utils.compiler.CodeGenerator.processAt(CodeGenerator.java:607)
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:533)
    at
    weblogic.utils.compiler.CodeGenerator.generateCode(CodeGenerator.java:312)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:223)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:182)
    at
    weblogic.ejb.ejbc.EJBCompiler.generatePersistenceSources(EJBCompiler.java:
    403)
    at weblogic.ejb.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:180)
    at weblogic.ejbc.runBody(ejbc.java:307)
    at weblogic.utils.compiler.Tool.run(Tool.java:80)
    at weblogic.ejbc.main(ejbc.java:353)
    ERROR: Error from ejbc: java.lang.reflect.InvocationTargetException:
    java.lang.NoSuchMethodError
    at
    weblogic.cmp.rdbms.codegen.StoreGenerator.addPreparedStatementBinding(Stor
    eGenerator.java:839)
    at
    weblogic.cmp.rdbms.codegen.StoreGenerator.preparedStatementBindings(StoreG
    enerator.java:805)
    at
    weblogic.cmp.rdbms.codegen.StoreGenerator.setPrimaryKeyParams(StoreGenerat
    or.java:194)
    at java.lang.reflect.Method.invoke(Native Method)
    at
    weblogic.utils.compiler.CodeGenerator.processAt(CodeGenerator.java:619)
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:533)
    at
    weblogic.utils.compiler.CodeGenerator.processAt(CodeGenerator.java:607)
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:533)
    at
    weblogic.utils.compiler.CodeGenerator.generateCode(CodeGenerator.java:312)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:223)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:182)
    at
    weblogic.ejb.ejbc.EJBCompiler.generatePersistenceSources(EJBCompiler.java:
    403)
    at weblogic.ejb.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:180)
    at weblogic.ejbc.runBody(ejbc.java:307)
    at weblogic.utils.compiler.Tool.run(Tool.java:80)
    at weblogic.ejbc.main(ejbc.java:353)
    --------------- nested within: ------------------
    weblogic.utils.compiler.CodeGenerationException: Exception:
    'java.lang.NoSuchMethodError' while trying to invoke: setPrimaryKeyParams
    at line 22 - with nested exception:
    [java.lang.reflect.InvocationTargetException - with target
    exception:[java.lang.NoSuchMethodError]]
    at
    weblogic.utils.compiler.CodeGenerator.processAt(CodeGenerator.java:628)
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:533)
    at
    weblogic.utils.compiler.CodeGenerator.processAt(CodeGenerator.java:607)
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:533)
    at
    weblogic.utils.compiler.CodeGenerator.generateCode(CodeGenerator.java:312)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:223)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:182)
    at
    weblogic.ejb.ejbc.EJBCompiler.generatePersistenceSources(EJBCompiler.java:
    403)
    at weblogic.ejb.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:180)
    at weblogic.ejbc.runBody(ejbc.java:307)
    at weblogic.utils.compiler.Tool.run(Tool.java:80)
    at weblogic.ejbc.main(ejbc.java:353)
    --------------- nested within: ------------------
    weblogic.utils.compiler.CodeGenerationException - with nested exception:
    [weblogic.utils.compiler.CodeGenerationException: Exception:
    'java.lang.NoSuchMethodError' while trying to invoke: setPrimaryKeyParams
    at line 22 - with nested exception:
    [java.lang.reflect.InvocationTargetException - with target exception:
    [java.lang.NoSuchMethodError]]]
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:585)
    at
    weblogic.utils.compiler.CodeGenerator.processAt(CodeGenerator.java:607)
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:533)
    at
    weblogic.utils.compiler.CodeGenerator.generateCode(CodeGenerator.java:312)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:223)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:182)
    at
    weblogic.ejb.ejbc.EJBCompiler.generatePersistenceSources(EJBCompiler.java:
    403)
    at weblogic.ejb.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:180)
    at weblogic.ejbc.runBody(ejbc.java:307)
    at weblogic.utils.compiler.Tool.run(Tool.java:80)
    at weblogic.ejbc.main(ejbc.java:353)
    --------------- nested within: ------------------
    weblogic.utils.compiler.CodeGenerationException - with nested exception:
    [weblogic.utils.compiler.CodeGenerationException - with nested exception:
    [weblogic.utils.compiler.CodeGenerationException: Exception:
    'java.lang.NoSuchMethodError' while trying to invoke: setPrimaryKeyParams
    at line 22 - with nested exception:
    [java.lang.reflect.InvocationTargetException - with target exception:
    [java.lang.NoSuchMethodError]]]]
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:585)
    at
    weblogic.utils.compiler.CodeGenerator.generateCode(CodeGenerator.java:312)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:223)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:182)
    at
    weblogic.ejb.ejbc.EJBCompiler.generatePersistenceSources(EJBCompiler.java:
    403)
    at weblogic.ejb.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:180)
    at weblogic.ejbc.runBody(ejbc.java:307)
    at weblogic.utils.compiler.Tool.run(Tool.java:80)
    at weblogic.ejbc.main(ejbc.java:353)
    ERROR: ejbc found errors
    C:\weblogic\examples\ejb\basic\containerManaged>javac -d
    c:\weblogic\myserver\cl
    ientclasses -classpath
    c:\jdk1.3.1\jre\lib\classes.zip;c:\weblogic\classes;c:\we
    blogic\lib\weblogicaux.jar;c:\weblogic\myserver\clientclasses Account.java
    Accou
    ntHome.java ProcessingErrorException.java Client.java
    C:\weblogic\examples\ejb\basic\containerManaged>wlconfig
    WebLogic startup settings are presently:
    CLASSPATH Prefix C:\weblogic\myserver\serverclasses
    CLASSPATH
    C:\weblogic\myserver\serverclasses;c:\jdk1.3.1\jre\lib\tools
    .jar;c:\jdk1.3.1\jre\lib\rt.jar;c:\jdk1.3.1\jre\lib\i18n.jar;C:\weblogic\l
    icense
    ;C:\weblogic\lib\weblogic510sp11.jar;C:\weblogic\classes;C:\weblogic\lib\w
    eblogi
    caux.jar;C:\weblogic\eval\cloudscape\lib\cloudscape.jar
    JAVA_HOME c:\jdk1.3.1\jre
    WEBLOGIC_LICENSEDIR C:\weblogic\license
    WEBLOGIC_HOME C:\weblogic
    system properties:
    java.security.manager
    java.security.policy==C:\weblogic\weblogic.policy
    weblogic.system.home=C:\weblogic
    java.compiler=symcjit
    weblogic.class.path=C:\weblogic\license;C:\weblogic\lib\webl
    ogic510sp11.jar;C:\weblogic\classes;C:\weblogic\myserver\serverclasses;C:\
    weblog
    ic\lib\weblogicaux.jar
    INITIAL_HEAP 64 MB
    MAX_HEAP 64 MB
    SERVERCLASSPATH
    C:\weblogic\myserver\serverclasses;c:\jdk1.3.1\jre\lib\rt.ja
    r;c:\jdk1.3.1\jre\lib\i18n.jar;C:\weblogic\lib\weblogic510sp11boot.jar;C:\
    weblog
    ic\classes\boot;C:\weblogic\eval\cloudscape\lib\cloudscape.jar
    Type "wlconfig -help" for program usage.

    Do all the examples fail to build, or just the EJB CMP examples? I ask
    because in 5.1, there's a separate WebLogic_CMP_RDBMS.jar that's part of
    the install process, but it's only used for CMP. If the other examples
    work, then that's likely to be your problem.
    -- Rob
    Erik Horstkotte wrote:
    Greetings all,
    Due to a trashed hard disk, I'm in the middle of getting WebLogic
    server reinstalled. Because of some problems with Oracle 8.1.6 and
    WLS 5.1.0 SP9, I've been trying to get SP12 to run, with little luck.
    I suspect an installation / configuration problem, but I don't know
    what it is.
    The symptom is that I can't compile entity beans - ejbc throws a
    NoSuchMethodError exception. For the sake of simplicity, and to prove
    to myself it wasn't our code, I tried building one of the examples,
    and it has the same problem. Does anyone see anything I've done
    wrong in the configuration?
    Below is the captured output from build & wlconfig:
    C:\weblogic\examples\ejb\basic\containerManaged>build
    C:\weblogic\examples\ejb\basic\containerManaged>if "" == "c:\jdk1.3.1\jre"
    set JAVA_HOME=\java
    C:\weblogic\examples\ejb\basic\containerManaged>if "" == "c:\weblogic" set
    WL_HOME=\weblogic
    C:\weblogic\examples\ejb\basic\containerManaged>set
    MYSERVER=c:\weblogic\myserver
    C:\weblogic\examples\ejb\basic\containerManaged>set
    MYCLASSPATH=c:\jdk1.3.1\jre\lib\classes.zip;c:\weblogic\classes;c:\weblogi
    c\lib\weblogicaux.jar;c:\weblogic\
    myserver\clientclasses
    C:\weblogic\examples\ejb\basic\containerManaged>mkdir build build\META-INF
    A subdirectory or file build already exists.
    Error occurred while processing: build.
    A subdirectory or file build\META-INF already exists.
    Error occurred while processing: build\META-INF.
    C:\weblogic\examples\ejb\basic\containerManaged>copy *.xml build\META-INF
    ejb-jar.xml
    weblogic-cmp-rdbms-jar.xml
    weblogic-ejb-jar.xml
    3 file(s) copied.
    C:\weblogic\examples\ejb\basic\containerManaged>javac -d build -classpath
    c:\jdk1.3.1\jre\lib\classes.zip;c:\weblogic\classes;c:\weblogic\lib\weblog
    icaux.jar;c:\weblogic\myserver\clientclasses Account.java AccountHome.java
    ProcessingErrorException.java AccountBean.java
    C:\weblogic\examples\ejb\basic\containerManaged>cd build
    C:\weblogic\examples\ejb\basic\containerManaged\build>jar cv0f
    std_ejb_basic_containerManaged.jar META-INF examples
    added manifest
    ignoring entry META-INF/
    adding: META-INF/ejb-jar.xml(in = 1210) (out= 1210)(stored 0%)
    adding: META-INF/weblogic-cmp-rdbms-jar.xml(in = 1472) (out= 1472)(stored
    0%)
    adding: META-INF/weblogic-ejb-jar.xml(in = 975) (out= 975)(stored 0%)
    adding: examples/(in = 0) (out= 0)(stored 0%)
    adding: examples/ejb/(in = 0) (out= 0)(stored 0%)
    adding: examples/ejb/basic/(in = 0) (out= 0)(stored 0%)
    adding: examples/ejb/basic/containerManaged/(in = 0) (out= 0)(stored 0%)
    adding: examples/ejb/basic/containerManaged/Account.class(in = 422) (out=
    422)(stored 0%)
    adding: examples/ejb/basic/containerManaged/AccountBean.class(in = 3884)
    (out= 3884)(stored 0%)
    adding: examples/ejb/basic/containerManaged/AccountHome.class(in = 711)
    (out= 711)(stored 0%)
    adding:
    examples/ejb/basic/containerManaged/ProcessingErrorException.class(in
    =339) (out= 339)(stored 0%)
    C:\weblogic\examples\ejb\basic\containerManaged\build>cd ..
    C:\weblogic\examples\ejb\basic\containerManaged>java -classpath
    c:\jdk1.3.1\jre\lib\classes.zip;c:\weblogic\classes;c:\weblogic\lib\weblog
    icaux.jar;c:\weblogic\myserver\clientclasses -Dweblogic.home=c:\weblogic
    weblogic.ejbc -compiler javac build\std_ejb_basic_containerManaged.jar
    c:\weblogic\myserver\ejb_basic_containerManaged.jar
    java.lang.NoSuchMethodError
    at
    weblogic.cmp.rdbms.codegen.StoreGenerator.addPreparedStatementBinding(Stor
    eGenerator.java:839)
    at
    weblogic.cmp.rdbms.codegen.StoreGenerator.preparedStatementBindings(StoreG
    enerator.java:805)
    at
    weblogic.cmp.rdbms.codegen.StoreGenerator.setPrimaryKeyParams(StoreGenerat
    or.java:194)
    at java.lang.reflect.Method.invoke(Native Method)
    at
    weblogic.utils.compiler.CodeGenerator.processAt(CodeGenerator.java:619)
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:533)
    at
    weblogic.utils.compiler.CodeGenerator.processAt(CodeGenerator.java:607)
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:533)
    at
    weblogic.utils.compiler.CodeGenerator.generateCode(CodeGenerator.java:312)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:223)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:182)
    at
    weblogic.ejb.ejbc.EJBCompiler.generatePersistenceSources(EJBCompiler.java:
    403)
    at weblogic.ejb.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:180)
    at weblogic.ejbc.runBody(ejbc.java:307)
    at weblogic.utils.compiler.Tool.run(Tool.java:80)
    at weblogic.ejbc.main(ejbc.java:353)
    ERROR: Error from ejbc: java.lang.reflect.InvocationTargetException:
    java.lang.NoSuchMethodError
    at
    weblogic.cmp.rdbms.codegen.StoreGenerator.addPreparedStatementBinding(Stor
    eGenerator.java:839)
    at
    weblogic.cmp.rdbms.codegen.StoreGenerator.preparedStatementBindings(StoreG
    enerator.java:805)
    at
    weblogic.cmp.rdbms.codegen.StoreGenerator.setPrimaryKeyParams(StoreGenerat
    or.java:194)
    at java.lang.reflect.Method.invoke(Native Method)
    at
    weblogic.utils.compiler.CodeGenerator.processAt(CodeGenerator.java:619)
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:533)
    at
    weblogic.utils.compiler.CodeGenerator.processAt(CodeGenerator.java:607)
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:533)
    at
    weblogic.utils.compiler.CodeGenerator.generateCode(CodeGenerator.java:312)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:223)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:182)
    at
    weblogic.ejb.ejbc.EJBCompiler.generatePersistenceSources(EJBCompiler.java:
    403)
    at weblogic.ejb.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:180)
    at weblogic.ejbc.runBody(ejbc.java:307)
    at weblogic.utils.compiler.Tool.run(Tool.java:80)
    at weblogic.ejbc.main(ejbc.java:353)
    --------------- nested within: ------------------
    weblogic.utils.compiler.CodeGenerationException: Exception:
    'java.lang.NoSuchMethodError' while trying to invoke: setPrimaryKeyParams
    at line 22 - with nested exception:
    [java.lang.reflect.InvocationTargetException - with target
    exception:[java.lang.NoSuchMethodError]]
    at
    weblogic.utils.compiler.CodeGenerator.processAt(CodeGenerator.java:628)
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:533)
    at
    weblogic.utils.compiler.CodeGenerator.processAt(CodeGenerator.java:607)
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:533)
    at
    weblogic.utils.compiler.CodeGenerator.generateCode(CodeGenerator.java:312)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:223)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:182)
    at
    weblogic.ejb.ejbc.EJBCompiler.generatePersistenceSources(EJBCompiler.java:
    403)
    at weblogic.ejb.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:180)
    at weblogic.ejbc.runBody(ejbc.java:307)
    at weblogic.utils.compiler.Tool.run(Tool.java:80)
    at weblogic.ejbc.main(ejbc.java:353)
    --------------- nested within: ------------------
    weblogic.utils.compiler.CodeGenerationException - with nested exception:
    [weblogic.utils.compiler.CodeGenerationException: Exception:
    'java.lang.NoSuchMethodError' while trying to invoke: setPrimaryKeyParams
    at line 22 - with nested exception:
    [java.lang.reflect.InvocationTargetException - with target exception:
    [java.lang.NoSuchMethodError]]]
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:585)
    at
    weblogic.utils.compiler.CodeGenerator.processAt(CodeGenerator.java:607)
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:533)
    at
    weblogic.utils.compiler.CodeGenerator.generateCode(CodeGenerator.java:312)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:223)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:182)
    at
    weblogic.ejb.ejbc.EJBCompiler.generatePersistenceSources(EJBCompiler.java:
    403)
    at weblogic.ejb.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:180)
    at weblogic.ejbc.runBody(ejbc.java:307)
    at weblogic.utils.compiler.Tool.run(Tool.java:80)
    at weblogic.ejbc.main(ejbc.java:353)
    --------------- nested within: ------------------
    weblogic.utils.compiler.CodeGenerationException - with nested exception:
    [weblogic.utils.compiler.CodeGenerationException - with nested exception:
    [weblogic.utils.compiler.CodeGenerationException: Exception:
    'java.lang.NoSuchMethodError' while trying to invoke: setPrimaryKeyParams
    at line 22 - with nested exception:
    [java.lang.reflect.InvocationTargetException - with target exception:
    [java.lang.NoSuchMethodError]]]]
    at
    weblogic.utils.compiler.CodeGenerator.parse(CodeGenerator.java:585)
    at
    weblogic.utils.compiler.CodeGenerator.generateCode(CodeGenerator.java:312)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:223)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:182)
    at
    weblogic.ejb.ejbc.EJBCompiler.generatePersistenceSources(EJBCompiler.java:
    403)
    at weblogic.ejb.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:180)
    at weblogic.ejbc.runBody(ejbc.java:307)
    at weblogic.utils.compiler.Tool.run(Tool.java:80)
    at weblogic.ejbc.main(ejbc.java:353)
    ERROR: ejbc found errors
    C:\weblogic\examples\ejb\basic\containerManaged>javac -d
    c:\weblogic\myserver\cl
    ientclasses -classpath
    c:\jdk1.3.1\jre\lib\classes.zip;c:\weblogic\classes;c:\we
    blogic\lib\weblogicaux.jar;c:\weblogic\myserver\clientclasses Account.java
    Accou
    ntHome.java ProcessingErrorException.java Client.java
    C:\weblogic\examples\ejb\basic\containerManaged>wlconfig
    WebLogic startup settings are presently:
    CLASSPATH Prefix C:\weblogic\myserver\serverclasses
    CLASSPATH
    C:\weblogic\myserver\serverclasses;c:\jdk1.3.1\jre\lib\tools
    .jar;c:\jdk1.3.1\jre\lib\rt.jar;c:\jdk1.3.1\jre\lib\i18n.jar;C:\weblogic\l
    icense
    ;C:\weblogic\lib\weblogic510sp11.jar;C:\weblogic\classes;C:\weblogic\lib\w
    eblogi
    caux.jar;C:\weblogic\eval\cloudscape\lib\cloudscape.jar
    JAVA_HOME c:\jdk1.3.1\jre
    WEBLOGIC_LICENSEDIR C:\weblogic\license
    WEBLOGIC_HOME C:\weblogic
    system properties:
    java.security.manager
    java.security.policy==C:\weblogic\weblogic.policy
    weblogic.system.home=C:\weblogic
    java.compiler=symcjit
    weblogic.class.path=C:\weblogic\license;C:\weblogic\lib\webl
    ogic510sp11.jar;C:\weblogic\classes;C:\weblogic\myserver\serverclasses;C:\
    weblog
    ic\lib\weblogicaux.jar
    INITIAL_HEAP 64 MB
    MAX_HEAP 64 MB
    SERVERCLASSPATH
    C:\weblogic\myserver\serverclasses;c:\jdk1.3.1\jre\lib\rt.ja
    r;c:\jdk1.3.1\jre\lib\i18n.jar;C:\weblogic\lib\weblogic510sp11boot.jar;C:\
    weblog
    ic\classes\boot;C:\weblogic\eval\cloudscape\lib\cloudscape.jar
    Type "wlconfig -help" for program usage.

  • Appc: ArrayIndexOutOfBoundsException compiling ejbs

    For the past few years, we have been developing on Weblogic Server 6.1 and for
    our next release, we want to move to Weblogic Server 8.1. I have been working
    on updating our build process so our existing code will compile using WLS 8.1.
    Our build process is hand-crafted ant scripts for everything. The problem I have
    is when I am compiling our EJBs. We have one large EJB jar file which contains
    a mixture of session beans (local and remote), entity beans (BMP) and MDBs. Originally,
    we were using the ejbc ant task to compile our jar file, but I thought it would
    be nice to move off of the deprecated tool and use appc instead.
    For some reason, the original developer/designer decided to hand craft the ejb-jar.xml
    and weblogic-ejb-jar.xml files. This still exists in our code today rather than
    using something like xdoclet-type tags to have these files generated for us.
    (No, I don't like this, but it's the old 'momentum' problem right now)
    Each time I run appc through ant, I get the following error:
    java.lang.ArrayIndexOutOfBoundsException: 28
    at weblogic.ejb20.dd.xml.DDUtils.createDescriptorFromJarFile(DDUtils.java:222)
    at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:374)
    at weblogic.appc.compileEJB(appc.java:796)
    at weblogic.appc.compileModules(appc.java:615)
    at weblogic.appc.compileEAR(appc.java:727)
    at weblogic.appc.compileInput(appc.java:457)
    That's interesting, but unfortunately it doesn't tell me, personally very much.
    My ant task is defined as:
    <taskdef name="appc" classname="weblogic.ant.taskdefs.j2ee.Appc" classpathref="ejbc.class.path"/>
    <appc source="${jars.dir}/${appjar.ear}" verbose="true"/>
    In this scenario, I was attempting to compile the EJBs after the ear was assembled
    since from my reading of the appc documents (very lacking, btw) seem to indicate
    this would work. I originally tried to compile just the EJB jar file by itself,
    as our original build did, but I got the same error.
    I even tried to use the original ejbc command we had defined and I still ran into
    this same error. At this point, I have hit a block trying to progess. I tried
    to search the bea site to find good docs on appc and what kinda of errors could
    occur. Unfortunately, I was not able to find much more than just the basic usage
    of this command.
    Any advice on what to try next?
    Thanks.
    Josh Bonczkowski

    There are no CMP beans in this project, only BMP entites and stateless session.
    As far as I can tell, there are no duplicates.
    "Deepak Vohra" <[email protected]> wrote:
    >
    Are the cmp fields defined in the ejb-jar.xml as they are defined in
    the ejb classes
    without
    any duplicate declarations?
    "Josh Bonczkowski" <[email protected]> wrote:
    For the past few years, we have been developing on Weblogic Server 6.1
    and for
    our next release, we want to move to Weblogic Server 8.1. I have been
    working
    on updating our build process so our existing code will compile using
    WLS 8.1.
    Our build process is hand-crafted ant scripts for everything. The problem
    I have
    is when I am compiling our EJBs. We have one large EJB jar file which
    contains
    a mixture of session beans (local and remote), entity beans (BMP) and
    MDBs. Originally,
    we were using the ejbc ant task to compile our jar file, but I thought
    it would
    be nice to move off of the deprecated tool and use appc instead.
    For some reason, the original developer/designer decided to hand craft
    the ejb-jar.xml
    and weblogic-ejb-jar.xml files. This still exists in our code today
    rather than
    using something like xdoclet-type tags to have these files generated
    for us.
    (No, I don't like this, but it's the old 'momentum' problem right now)
    Each time I run appc through ant, I get the following error:
    java.lang.ArrayIndexOutOfBoundsException: 28
    at weblogic.ejb20.dd.xml.DDUtils.createDescriptorFromJarFile(DDUtils.java:222)
    at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:374)
    at weblogic.appc.compileEJB(appc.java:796)
    at weblogic.appc.compileModules(appc.java:615)
    at weblogic.appc.compileEAR(appc.java:727)
    at weblogic.appc.compileInput(appc.java:457)
    That's interesting, but unfortunately it doesn't tell me, personally
    very much.
    My ant task is defined as:
    <taskdef name="appc" classname="weblogic.ant.taskdefs.j2ee.Appc" classpathref="ejbc.class.path"/>
    <appc source="${jars.dir}/${appjar.ear}" verbose="true"/>
    In this scenario, I was attempting to compile the EJBs after the ear
    was assembled
    since from my reading of the appc documents (very lacking, btw) seem
    to indicate
    this would work. I originally tried to compile just the EJB jar file
    by itself,
    as our original build did, but I got the same error.
    I even tried to use the original ejbc command we had defined and I still
    ran into
    this same error. At this point, I have hit a block trying to progess.
    I tried
    to search the bea site to find good docs on appc and what kinda of errors
    could
    occur. Unfortunately, I was not able to find much more than just the
    basic usage
    of this command.
    Any advice on what to try next?
    Thanks.
    Josh Bonczkowski

  • Error during ear file deployment

    Hi,
    I am getting the error while trying to deploy ear file using SDM.
    The error log is
    Starting Deployment of MyzipBean
    Aborted: development component 'MyzipBean'/'sap.com'/'localhost'/'2008.06.13.17.44.31'/'0':
    Caught exception during application deployment from SAP J2EE Engine's deploy service:
    java.rmi.RemoteException: Cannot deploy application sap.com/MyzipBean.. Reason: Incorrect application sap.com/MyzipBean:Bean MyzipBean: can not find method ejbCreate()  in ejb-class myzip.MyzipBean. Each create method must be named create<METHOD>, and it must match one of the ejbCreate<METHOD> methods defined in the session bean class. The matching ejbCreate<METHOD> method must have the same number and types of arguments. EJB Specification 7.10.6.Bean MyzipBean: can not find method ejbCreate()  in ejb-class myzip.MyzipBean. Each create method must be named create<METHOD>, and it must match one of the ejbCreate<METHOD> methods defined in the session bean class. The matching ejbCreate<METHOD> method must have the same number and types of arguments. EJB Specification 7.10.8.; nested exception is:      com.sap.engine.services.deploy.container.DeploymentException: <--Localization failed: ResourceBundle='com.sap.engine.services.deploy.DeployResourceBundle', ID='com.sap.engine.services.ejb.exceptions.deployment.EJBDeploymentException: Incorrect application sap.com/MyzipBean:Bean MyzipBean: can not find method ejbCreate()  in ejb-class myzip.MyzipBean. Each create method must be named create<METHOD>, and it must match one of the ejbCreate<METHOD> methods defined in the session bean class. The matching ejbCreate<METHOD> method must have the same number and types of arguments. EJB Specification 7.10.6.Bean MyzipBean: can not find method ejbCreate()  in ejb-class myzip.MyzipBean. Each create method must be named create<METHOD>, and it must match one of the ejbCreate<METHOD> methods defined in the session bean class. The matching ejbCreate<METHOD> method must have the same number and types of arguments. EJB Specification 7.10.8.
    What could be the reason?
    Thanks,
    Jaishankar

    Hi,
    1. Restart the upgrade
    2. When it shows the error above open callSdmViaSapinst.log and search for the application that can't be deployed
    3. If application is STOPPED start it
    4. Undeploy the application if it is STARTED
    5. Press the "Retry" button in the error message dialog box from the
    upgrade
    6. If it fails again for another application go to 2.
    Please refer SAP NOte 851590. I don't know if it work for u, as i have given this , it seems for Upgrade as you are developing.
    Look into this thread also
    Unable to deploy a module into XI Server
    Regards
    Aashish Sinha
    Edited by: Aashish Sinha on Jun 13, 2008 3:20 PM
    Edited by: Aashish Sinha on Jun 13, 2008 3:28 PM

  • Compilation error when deploying EAR file on standalone OC4J...

    Hi All,
    I am getting the following error when trying to deploy an EAR File describing a web service from the Jdeveloper IDE to the stanalone OC4J server instance.
    ==========================================================
    Uploading file JavaWebServiceEmp-GetDates-WS.ear ...
    Application Deployer for JavaWebServiceEmp-GetDates-WS STARTS.
    Copy the archive to C:\Lester\Testing\JDev10.1.3\oc4j\j2ee\home\applications\JavaWebServiceEmp-GetDates-WS.ear
    Initialize C:\Lester\Testing\JDev10.1.3\oc4j\j2ee\home\applications\JavaWebServiceEmp-GetDates-WS.ear begins...
    Unpacking JavaWebServiceEmp-GetDates-WS.ear
    Done unpacking JavaWebServiceEmp-GetDates-WS.ear
    Unpacking WebServices.war
    Done unpacking WebServices.war
    Initialize C:\Lester\Testing\JDev10.1.3\oc4j\j2ee\home\applications\JavaWebServiceEmp-GetDates-WS.ear ends...
    Starting application : JavaWebServiceEmp-GetDates-WS
    Initializing ClassLoader(s)
    Initializing EJB container
    Loading connector(s)
    Starting up resource adapters
    Initializing EJB sessions
    Committing ClassLoader(s)
    Initialize WebServices begins...
    Initialize WebServices ends...
    Started application : JavaWebServiceEmp-GetDates-WS
    Binding web application(s) to site default-web-site begins...
    Binding WebServices web-module for application JavaWebServiceEmp-GetDates-WS to site default-web-site under context root JavaWebServiceEmp-GetDates-context-root
    Operation failed with error:
    Error compiling :C:\Lester\Testing\JDev10.1.3\oc4j\j2ee\home\applications\JavaWebServiceEmp-GetDates-WS\WebServices: compilation error occurred
    Deployment failed
    Elapsed time for deployment: 1 minute, 50 seconds
    ==========================================================
    Please could somebody help me out with this? Basically I am not able to understand how to deploy the EAR file created under the MyWork folder under jdeveloper\jdev to the applications folder of j2ee\home. I am new to both EAR deployment as well as web services and would like to get a good understanding of the working of a web service which includes SOAP components and the like.
    Any help with regards to building and deploying a web service on standalone OC4J would be appreciated. Thanks a lot.

    Initially I followed the following steps to start up OC4J:-
    Settings :-
    1) Jdeveloper is setup under C:\Lester\Testing as Jdev10.1.3 folder
    2) I downloaded the extended oc4j zip folder and unzipped it under a new folder oc4j at the location C:\Lester\Testing\Jdev10.1.3
    Steps followed to run oc4j and deploy application
    1) Setup a standalone oc4j from the jdeveloper ide giving C:\Lester\Testing\Jdev10.1.3\oc4j as the root folder for oc4j.
    2) While doing step 1 added password and deployed it. Changed server.xml under C:\Lester/Testing/JDev10.1.3/oc4j/j2ee/home/config
    to include the following:-
    <shared-library name="global.libraries" version="1.0" library-compatible="true">
    <code-source path="C:\Lester/Testing/JDev10.1.3/oc4j/j2ee/home/applib"/>
    </shared-library>
    AND
    <java-compiler name="javac" in-process="false" options="-J-Xmx1024m -encoding UTF8" bindir="C:\Jdeveloper\jdk" extdirs="C:\Jdeveloper/jdk" />
    3) Opened a command prompt and went to the location C:\Lester\Testing\JDev10.1.3\oc4j\j2ee\home and ran the following command:-
    --> java -jar oc4j.jar
    4) Deployment: Then I deployed my primewebservice application from command prompt at C:\Lester\Smart Cylinder\Example code\prime\PrimeNumberService>
    using:-
    --> java -jar C:\Lester/Testing/JDev10.1.3/oc4j/j2ee/home/admin.jar ormi://172.20.13.164:8888 oc4jadmin welcome -deploy -file PrimeNumberService.ear -deploymentName DocStyleWebService
    5) Web Binding: Then I bound my primewebservice application from command prompt at C:\Lester\Smart Cylinder\Example code\prime\PrimeNumberService>
    using:-
    --> java -jar C:\Lester/Testing/JDev10.1.3/oc4j/j2ee/home/admin.jar ormi://172.20.13.164:8888 oc4jadmin welcome -bindWebApp DocStyleWebService PrimeNumberService_web http-web-site /docws
    6) Steps 4 and 5 went through without error.
    7) However when trying to access the web service using the following link I get the standard HTTP 404 (Page not found) error:-
    http://localhost:8888/docws/prime
    This was before I tried deploying the web service through jdeveloper IDE.
    I had tried the document web service given at the following link:-
    http://www.oracle.com/technology/sample_code/tech/java/codesnippet/webservices/docservice/index.html
    from the web services how to links
    http://www.oracle.com/technology/sample_code/tech/java/codesnippet/webservices/index.html
    Please could somebody help me out? Also periodically I recieve the ojc.exe not found error when trying to deploy an application using jdeveloper ide. There are two conflicting jdeveloper versions one comes with this exe and one without.
    Message was edited by:
    Lester N

  • Compiling EJB files and Deployment Discriptor

    Hi,
    Could any body tell me step by step process of compiling EJB files and building deployment descriptor. I want to learn from scrap. I search on web but not found material that I need.
    Actually I've made a simple EJB example now I want to compile and want to write a deployment descriptor for that using ant or javac.
    You can also refer me tutorial describing the process form scrap.
    Looking forward,
    Regards,
    Abbasi

    Although you could deploy each bean in a different .jar file , deploying them
    together in an jar file produces a classloader arrangement that allows one ejb
    class to refer to another ejb class. Packaging ejb jar files in a ear file produces
    a common classloader for the ejb jar files.
    "Gary Gu" <[email protected]> wrote:
    >
    Hi,
    To build ejb jar files, we can include all beans (including bean class,
    home,
    inteface, and other java classes) of the application into one jar file.
    Or we
    can make ONE jar file for EACH bean (including only bean class, home
    and interface.
    NOT other dependent classes that will sit in weblogic server classpath).
    I would like to know any disadvantage for second method in terms of memory,
    class
    loading, etc. Or any advantage for the second method
    Thanks

  • ClassCastException calling EJB from EJB (diff  EARs) Urgent please help !!

    Hi,
    I�m trying to call a Remote EJB ( in jdev BBEAN.prj ) from another EJB (in jdev ABEAN.prj) located in a different EAR.
    In JDEVELOPER (oc4j 9.0.3) I also considered BBEAN as a libreary which is included in the ABEAN project.
    So that the ABEAN JAR contains the class definition for the Home and remote interface.
    From the ABEAN bean I call this code:
    DO ()
    private static Context getInitialContext() throws NamingException
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
    env.put(Context.SECURITY_PRINCIPAL, "admin");
    env.put(Context.SECURITY_CREDENTIALS, "manager");
    env.put(Context.PROVIDER_URL, "ormi://GSARNO-1/BBean");
    return new InitialContext(env);
    BBeanHome BBeanHome = (BBeanHome)PortableRemoteObject.narrow(context.lookup("BBean"), BBeanHome.class);
    BBean bBean;
    ������������..
    After having deployed both projects I then run a client (Calling the Do function).
    Doing so I keep receiving the following error when calling narrow.
    java.lang.ClassCastException
    java.lang.Object com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(java.lang.Object, java.lang.Class)
    PortableRemoteObject.java:296
    java.lang.Object javax.rmi.PortableRemoteObject.narrow(java.lang.Object, java.lang.Class)
    PortableRemoteObject.java:137
    java.lang.String mypackage1.impl.MySessionEJBBean.Do()
    MySessionEJBBean.java:39
    java.lang.String MySessionEJB_StatelessSessionBeanWrapper6.Do()
    MySessionEJB_StatelessSessionBeanWrapper6.java:85
    java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[])
    native code
    void com.evermind.server.rmi.RMICallHandler.run(java.lang.Thread)
    RMICallHandler.java:119
    void com.evermind.server.rmi.RMICallHandler.run()
    RMICallHandler.java:48
    void EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run()
    PooledExecutor.java:803
    void java.lang.Thread.run()
    Thread.java:484
    Can anyone help ?
    What should I do to call remote e/o local interfaces located on different EARs ?
    I�m using OC4J 9.0.3

    Hi Giuseppe,
    If both EAR files are in the same OC4J instance you do not have to use RMIInitialContextFactory to invoke the EJB. You have to do the following:
    In OC4J
    1) Make the BBEAN as the parent for ABEAN application defined in the server.xml as follows:
    application name="ABEAN" path="../applications/abean.ear" parent="BBEAN" auto-start="true" />
    2)
    You can define ejb-ref or ejb-local-ref in the deployment descriptor of your application
    3) You can use the default InitialContext to lookup your EJB as if both EJBs are in the same application
    regards
    Debu

  • Error compiling EJB.jar  + cannot resolve symbol+while deploying

    I am getting following
    Error compiling EJB.jar , cannot resolve symbol ,Syntax error in source, am getting around 17 errors while deploying EAR generated using Jdev905 into standalone oc4jContainers(10g).
    Can anyone please help me out where is the problem.
    Regards,
    Anup

    cannot resolve symbol ,Syntax error in source
    indicates some jar file is not in the Classpath. Is j2ee.jar in the Classpath?

  • Error while compiling the ejb java source files.................

    hi,
    i am new to ejb.......
    i have got error while compiling the ejb java source files............
    while compiling..........of this three i ahve got err in ejb home interface....
    ejb remote interface - succeded
    ejb bean class - succeded
    ejb home interface - error
    the error..............is in the return type of the ejb create() method in ejb home interface(which is the type of remote interface).
    the error message is cannot resolve symbol

    Hi,
    thanks for ur reply .....
    i have done enough searching in all sites including sun forum but in vain
    i have pasted my error below...
    can u plz predict anything from it
    D:\>path=%path%;c:\j2sdk1.4.2_12\bin;
    D:\>set classpath=%classpath%;d:\Sun\AppServer\lib\j2ee.jar;
    D:\>javac d:\Librarys\Library.java
    D:\>javac d:\Librarys\LibraryBean.java
    D:\>javac d:\Librarys\LibraryHome.java
    d:\Librarys\LibraryHome.java:8: cannot resolve symbol
    symbol : class Library
    location: interface Librarys.LibraryHome
    public Library create(String id, String name, String address, String phoneNo
    ) throws RemoteException, CreateException;
    ^
    d:\Librarys\LibraryHome.java:9: cannot resolve symbol
    symbol : class Library
    location: interface Librarys.LibraryHome
    public Library findByPrimaryKey(String id) throws FinderException, RemoteExc
    eption;
    ^
    2 errors
    thanks in advance...

Maybe you are looking for

  • Export Excise invoice number in continuation with domestic

    Dear Friends Excise invoice number for export should be in continuation with domestic i.e if my last domestic excise number is 0000000050 & if i do the export excise transaction the system should pick up 0000000051 vipin

  • Printing for a binder in adobe reader

    I am trying to print a document. I am putting it into a binder so the margins on the side of the paper are going to be hole punched need to be wider. This mean that on the front side the margins on the left must be wider and on the back side the marg

  • Get my WAN IP

    I am behind a NAT router so if I ask java my IP adress I get my LAN ip, something like 192.168.... But in my Java app I need my internet/WAN IP, which is the IP of the router on the WAN side. I specifically told the router to The ip I get on www.what

  • FRM-40112 After converting to 10g

    Hi, We get a FRM-40112 (Cannot navigate to disabled item) after converting our Forms from 6i to 10g. When searching on the forum i found a reference to the variable FORMS90_REJECT_GO_ITEM_DISABLED_ITEM which was supposed to be documented in the Forms

  • Runtime.getRuntime().exec() problem while getting Mozilla version.

    Hi all, I've trying to get the current mozilla version in Java side using Runtime.getRuntime().exec(). The sample code is as below. I've tested two cases using exec(), as case# 1 and case# 2. The result is after the code. try Runtime rt = Runtime.get