Building weblogic ejbs with ant...

Hi, it may be not the proper place, but I haven't found a better one...
Here comes my question:
I have an ant build.xml file where I have the following tasks defined:
<property name="ejb.dtd.location" value="weblogic/ejb/deployment/xml/ejb-jar.dtd"/>
    <condition property="ejb.dtd.location" value="weblogic/ejb20/dd/xml/ejb11-jar.dtd">
      <equals arg1="${weblogic.major.version}" arg2="6"/>
    </condition>
    <property name="weblogic.ejb.dtd.location" value="weblogic/ejb/deployment/xml/weblogic-ejb-jar.dtd"/>
    <condition property="ejb.dtd.location" value="weblogic/ejb20/dd/xml/weblogic510-ejb-jar.dtd">
      <equals arg1="${weblogic.major.version}" arg2="6"/>
    </condition>
<!-- compiles EJBs -->
  <target name="compile.ejb" depends="init">
    <javac srcdir="${srcDir.ejb}"
          destdir="${srcDir.ejb}"
            debug="${npm.debug}">
      <classpath id="ejb.cpath">
         <pathelement path="${weblogic.sp.path}"/>
         <pathelement path="${weblogic.core.path}"/>
         <pathelement location="${outDir.core}${file.separator}npm.jar"/>
         <pathelement location="${srcDir.ejb}"/>
       </classpath>
    </javac>
  </target>
  <!-- delivers EJBs -->
  <target name="make.ejb" depends="prepare, compile.ejb">
    <!-- ejbc 'n jar 'em -->
    <ejbjar srcdir="${srcDir.ejb}">
       <weblogic destdir="${outDir.ejb}"
                 compiler="${compiler.ejb}"
                 keepgeneric="false"
                 suffix=".jar"
                 args="-g -nowarn"
                 oldCMP="false">
         <classpath refid="ejb.cpath"/>
       </weblogic>
       <include name="**/*-ejb-jar.xml"/>
       <exclude name="**/*-weblogic-ejb-jar.xml"/>
       <!-- WLS v5 DTDs!!! -->
       <dtd publicId="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN"
            location="${ejb.dtd.location}"/>
       <dtd publicId="-//BEA Systems, Inc.//DTD WebLogic 5.1.0 EJB//EN"
            location="${weblogic.ejb.dtd.location}"/>
    </ejbjar>
  </target>This should build my ejbs with either the wls61 ejbc or the wls51 one. Anyway ant seems to have problems finding the local dtds in the classpath, although this is specified in the documentation. When I set both location attributes to point to files it works perfect. The problem is that these are in weblogic.jar for the wls61 release. This has two solutions, but either are bad in my opinion:
1. extract the needed dtds to a temp dir with a jar task and then delete em...
2. put the proper wls.jar in the classpath so ejbc could automatically resolve the dtds
Can anyone help or may be send his ant build file, where a <dtd> nested element is used for <ejbjar> for wls61?
Thank you in advance
Anton

Anton,
Your second solution is the correct one. If you look at dtd element description under ejbjar task in the Ant manual, you'll see that vendors jars are required in Ant's classpath in order for ejbjar task to resolve DTD dependencies, in which case you don't need to specify dtd elements. I don't particularly like it either. If you find a better way to solve this problem, let me know.
-Dmitry

Similar Messages

  • Building J2EE examples with Ant 1.3 on WinXP

    I just installed J2EE 1.3.1 and set all environment variables according to J2EE/Ant documentation. I am trying to build the examples with Ant 1.3 and just before it tries to compile the first example, I get a "NTVDM.EXE Error while setting up environment" error window. This occurs every time I try this examples build. After I close this error window, the compiles fail mostly because the javax.ejb package classes cannot be found.
    Have I overlooked something here? Can anyone shed some insight on this problem?
    -Ryan

    Didn't think I'd be replying to so many of my own messages :-) ..., but anyway the problem with the NTVDM.EXE error message does not go away. I found that it's happens when Ant reads the system environment in the "property" task in build.xml under examples directory:
    <property environment="myenv" />
    <!--
    references to ${myenv.J2EE_HOME} and so on
    -->
    So I replaced occurences of ${myenv.<J2EE_HOME>} with the literal value, in my case, "C:\j2sdkee1.3.1" and now it works. Hope this helps.
    Cheers,
    Lakshmi.

  • Build SAP EAR with ant

    Hi,
    Im using Netweaver 7.1 DS and want to automate the building of my ejb jar and sap specific ear file.
    I can write the ant script for the ejb jar, but I normally build hte ear by selecting 'Export -> SAP EAR File' in the DS.
    Is there a way to automate this through ant?
    Im not really worried about deploying it through ant, as we will be using JSPM, and I can create the sda's and sca's from the ear files already.
    Is there also a list of all sap related ant tasks?
    Many thanks.
    Regards,
    Andrew

    Hi Andrew,
    i am facing the same problem, would you share your solution?
    thanks in advance,
    Rene

  • Building web project with ANT

    Hi,
    I am using jdeveloper 11g TP4 , and for building my web application i am using Jdev,
    but now for some extra work i am using ANT, so my requirement is when i am doing make(build) of my web project it should run that Ant file (build.xml)
    i have checked the run/debug configuration but not able to run the ant implicitly..
    can anybody knows ..
    Thanks in advance
    Edited by: 982899 on Jan 29, 2013 3:59 AM

    Hi,
    I am not sure if this is the only answer but when I want to run an ANT file for my project I do right click on my build.xml and simply run the target I want to run. On the other hand, you can configure your RUN profile and play a bit to see if its possible to configure in there ANT to be run automatically when you run your project by using JDeveloper itself.

  • Ant build & deploy script with CEP

    Hi,
    I want to create a build & deploy script with ant for our application that runs on CEP. I succeeded on creating one that is working well. I had one problem, which is that I now assume that the server is up when the script is running. I wanted to add a target to the script that will start the server if it's not running. The problem is that startwlevs script start the server and remain open. This effectivily pause the build script indefinitely. Does anyone have any idea how to overcome this?
    Thanks

    Just fork the execution of the script. Alternatively call java directly (that's all the script does) and fork that.

  • How to use Weblogic Server 6.1 build.xml with ant

    Hi Java's
    I have downloaded the latest version of BEA Weblogic server 6.1,they have changed the build.cmd to build.xml for compiling and building the ejb applications.they are telling that we have use $ant to run the build.xml but i couldn't able to do that.i'm getting "command not found error"..i'm using winnt.please help me how to use $ ant.Is it a seperate exe or batch file that i have to download ?if so where to download it.how to use it.please help.
    Regards
    Balaji

    To use it after installation, set your path to your
    <ant_installation_dir>\bin, then navigate to the diectory containing the build.xml. then follow the instructions in the weblogic documentation for running ant.

  • Build a EJB/ Application with Sun One Studio and deploy to Weblogic

    Dear all,
    My boss require me to use Sun One Studio 4 update 1 to do the development, but
    I find it's a nightmare to deploy the EJB/ application to the WebLogic 6.1.
    I've already installed the weblogic plug-in in the Sun One Studio.
    During deploying I could not find any setting that ask me for the weblogic-ejb-jar.xml.
    So I think the deployment will fail.
    Is there any others tutorial or e-book that can help me to familiar with the deployment
    process?
    Many Thanks for all of you.
    Ivan

    where do you get the weblogic plugin from ?
    i am intrested in doing the same thing
    thanx
    prem
    "Ivan" <[email protected]> wrote in message
    news:[email protected]..
    >
    Dear all,
    My boss require me to use Sun One Studio 4 update 1 to do the development,but
    I find it's a nightmare to deploy the EJB/ application to the WebLogic6.1.
    >
    I've already installed the weblogic plug-in in the Sun One Studio.
    During deploying I could not find any setting that ask me for theweblogic-ejb-jar.xml.
    So I think the deployment will fail.
    Is there any others tutorial or e-book that can help me to familiar withthe deployment
    process?
    Many Thanks for all of you.
    Ivan

  • Build with ant in a new way

    Hello everyone,
    I'm not sure if the title is proper, but I have a project to upgrade to weblogic 10, along with the upgrade I'm going to enhance the build files. Currently we have 450 ant file. There are many dependencies and all build files have hardcoded paths such "c:\sourcecode ...". Our application is about 6000000 lOC. Anyway, my job is to replace these paths with properties and change some old ant tasks.
    You now imagine what I'm going to go through. Obviously, I need to edit 450 (can build tool for that) and do check in and out. Then test to make sure I didn't missed up with the dependency.
    I'm no expert in ANT but we did some evaluation to ANT, Maven, Jam and we found ANT is the best fit for our environment because we have some structuring issues.
    While working I have got this idea, however I'm not sure if it's the best, so I hope you can help here and give me your advice.
    I will create a utilityBuild.xml. This ant file will contain the entire tasks we perform in all the 450. Rest of 450 ant will perform call to this utilityBuild.xml whenever it needs to do something e.g .
    {color:#008000}<!-- Create Jar file of the classes in the ${tempdir} and then apply appc compilation on them-->{color}
    <ant inheritAll="true" dir="${ROOT}" antfile="${UTILITYBUILD}" target="appc"/>
    Note: UTILITYBUILD = utilityBuild.xml
    UtilityBuild.xml has this task as
    {color:#008000}<!-- Perform weblogic.appc on the given Jar file to generate the Skeleton files -->{color}
    <target name="appc" depends="jar.ejb" >
    <java classname="weblogic.appc" fork="yes">
    <sysproperty key="weblogic.home" value="${WL_HOME}"/>
    <arg line="-compiler javac ${appdir}/${jarfile}"/>
    <classpath>
    <pathelement path="$classpath"/>
    </classpath>
    </java>
    </target>
    The {color:#ff0000}*benefit*{color} of doing this is {color:#ff0000}*if we decide to use wlcompile and wlappc instead of the above we only need to change one place utilityBuild.xml*{color} . I understand that I can make a custom ant task instead of relying on the properties that's passed when calling the child ant task.
    {color:#0000ff}*For complete Source file* {color}
    UtilityBuild.xml
    <project name="SIMIS" basedir=".">
    <!-- set global properties for this build -->
    <property environment="env"/>
    <property file="gosi.properties"/>
    <target name="maketempdir" description="Create ${tempdir} directory">
    <echo message="#### S T A R T B U I L D I N G ####"/>
    <echo message="Started on ${TODAY} at ${TSTAMP}"/>
    <mkdir dir="${tempdir}"/>
    <mkdir dir="${tempdir}/META-INF"/>
    <copy todir="${tempdir}/META-INF">
    <fileset dir="${xmldir}">
    <include name="*.xml"/>
    </fileset>
    </copy>
    </target>
    <!-- Clean all build related dirs, jars and xmls -->
    <target name="cleantemp" description="Deletes ${build.dir}/** and ${dist.dir}/**." >
    <delete includeEmptyDirs="true" failonerror="false">
    <fileset dir="${clientclasses}" includes="**/*EJB.class"/>
    <fileset dir="${tempdir}" includes="**/*"/>
    </delete>
    <delete dir="${tempdir}"/>
    <echo message="#### E N D B U I L D I N G ####"/>
    </target>
    <!-- Perform weblogic.appc on the given Jar file to generate the Skeleton files -->
    <target name="appc" depends="jar.ejb" >
    <java classname="weblogic.appc" fork="yes">
    <sysproperty key="weblogic.home" value="${WL_HOME}"/>
    <arg line="-compiler javac ${appdir}/${jarfile}"/>
    <classpath>
    <pathelement path="$classpath"/>
    </classpath>
    </java>
    </target>
    <target name="jar.ejb" >
    <jar jarfile="${appdir}/${jarfile}"
    basedir="${tempdir}" update="yes">
    </jar>
    </target>
    <target name="javac">
    <javac srcdir="${sourcedir}" destdir="${destinationdir}" includes="${include}" excludes="${exclude}" classpath="${classpath}" />
    </target>
    <target name="copy" description="copy contents to directory">
    <copy todir="${todir}">
    <fileset dir="${fromdir}">
    <include name="${include}"/>
    <exnclude name="${exclude}"/>
    </fileset>
    </copy>
    </target>
    <target name="clean" description="clean contents of directory">
    <delete includeEmptyDirs="true" failonerror="false">
    <fileset dir="${cleandir}" includes="${include}" excludes="${exclude}"/>
    </delete>
    </target>
    <target name="delete" description="delete entire directory">
    <delete dir="${deletedir}"/>
    </target>
    <!-- deploy split directory application -->
    <target name="deploy"
    description="Deploy ear to WebLogic on ${wls.hostname}:${wls.port}.">
    <wldeploy
    user="${wls.username}"
    password="${wls.password}"
    adminurl="t3://${wls.hostname}:${wls.port}"
    debug="true"
    action="deploy"
    source="${appdir}/${jarfile}"
    failonerror="${failondeploy}"/>
    </target>
    </project>
    CMN_Core_Session.xml (one of the 450 files)
    <project name="default" default="build">
    <!-- Specific Properties to this file. Please don't change these names, because it has been used by the ${UTILITYBUILD} -->
    <property file="../gosi.properties"/>
    <property name="srcdir" value="${SOURCE_CODE}/gosi/core"/>
    <property name="xmldir" value="${SOURCE_CODE}/gosi/core/projects/session"/>
    <property name="jarfile" value="CMN_Session.jar"/>
    <!-- Main build task for this ant file -->
    <target name="build" description="Builds components.">
    <!-- Create Temp folders and copy the deployment descriptor their -->
    <ant inheritAll="true" dir="${ROOT}" antfile="${UTILITYBUILD}" target="maketempdir"/>
    <!-- Compile the java classes in to ${clientclasses} -->
    <ant inheritAll="true" dir="${ROOT}" antfile="${UTILITYBUILD}" target="javac">
    <property name="sourcedir" value="${srcdir}"/>
    <property name="destinationdir" value="${clientclasses}"/>
    <property name="include" value="**/*Session.java,**/*SessionHome.java"/>
    <property name="exclude" value="**/*MaintainDateChangeSession.java,**/*MaintainDateChangeSessionEJB.java,**/*MaintainDateChangeSessionHome.java,**/*MaintainHolidaysSession.java,**/*MaintainHolidaysSessionEJB.java,**/*MaintainHolidaysSessionHome.java,**/*StartupUtilitySession.java,**/*StartupUtilitySessionEJB.java,**/*StartupUtilitySessionHome.java,**/UserSession.java"/>
    </ant>
    <!-- Compile the java classes again in to ${tempdir} this folder will be used to create the Jar file -->
    <ant inheritAll="true" dir="${ROOT}" antfile="${UTILITYBUILD}" target="javac">
    <property name="sourcedir" value="${srcdir}"/>
    <property name="destinationdir" value="${tempdir}"/>
    <property name="include" value="**/*Session.java,**/*SessionHome.java,**/*SessionEJB.java"/>
    <property name="exclude" value="**/*MaintainDateChangeSession.java,**/*MaintainDateChangeSessionEJB.java,**/*MaintainDateChangeSessionHome.java,**/*MaintainHolidaysSession.java,**/*MaintainHolidaysSessionEJB.java,**/*MaintainHolidaysSessionHome.java,**/*StartupUtilitySession.java,**/*StartupUtilitySessionEJB.java,**/*StartupUtilitySessionHome.java,**/UserSession.java"/>
    </ant>
    <!-- Create Jar file of the classes in the ${tempdir} and then apply appc compilation on them-->
    <ant inheritAll="true" dir="${ROOT}" antfile="${UTILITYBUILD}" target="appc"/>
    <!-- Remove all file in ${tempdir} -->
    <ant inheritAll="true" dir="${ROOT}" antfile="${UTILITYBUILD}" target="cleantemp"/>
    </ant>
    </target>
    <!-- Main deploy task for this ant file -->
    <target name="deploy" description="Deploy the components">
    <ant inheritAll="true" dir="${ROOT}" antfile="${UTILITYBUILD}" target="deploy"/>
    </ant>
    </target>
    </project>
    gosiProperties file
    ### Build Files Properties File ###
    -- Configure the global properties for the ant build files
    -- You may need to change this section to match your machine
    BEA_HOME=C:/bea
    SIMIS_DOMAIN=${BEA_HOME}/gosiprojects/server/simis
    WL_HOME=${BEA_HOME}/wlserver_10.0/server
    JAVA_HOME=${BEA_HOME}/jdk150_06
    SOURCE_CODE=C:/sourcecode
    ROOT=${SOURCE_CODE}/build_files
    UTILITYBUILD=UtilityBuild.xml
    -- Here we set the JARs directory and server and client classes
    appdir=${SIMIS_DOMAIN}/applications
    tempdir=${SIMIS_DOMAIN}/classes
    clientclasses=${SIMIS_DOMAIN}/clientclasses
    serverclasses=${SIMIS_DOMAIN}/serverclasses
    web-inf=${appdir}/GOSI/WEB-INF/classes
    startup=${appdir}/StartUp/WEB-INF/classes
    -- Set the ClassPath for the ant tool
    classpath=${JAVA_HOME}/lib/tools.jar;${WL_HOME}/lib/weblogic.jar;${WL_HOME};${SIMIS_DOMAIN}/APP-INF/lib/CMN_DMS_WS_RequestClient.jar;
    Thanks and regards
    Edited by: Nawaf on Mar 9, 2008 8:18 AM

    Any idea, I'm looking for your opinion, what do you think of the above

  • Building EJB with properties file

    I have a EJB project with a properties file in BEA Weblogic Workshop. After building
    the project, the properties file is not included in the resulting JAR file. As
    a result, the resource bundle cannot get the property file and an exception is
    thrown. Is there any method to solve this problem? Thanks.

    I had similar problem. We were using ANT so all I did was to copy all the properties
    file to each
    ejbJar files and war files as well.
    copy the properties file into the top level dir of your ejb jar file. If you do
    jar tvf adsfEJB.jar you will see :
    weblogic-ejb-jar.xml in meta-inf
    wjb-jar.xml in meta-inf
    Mainifest.mf in meta-inf
    ad.java in com/.../.../....
    xxx.java in com/../...
    abc.properties in . (at the top level of the jar file)
    "Neville" <[email protected]> wrote:
    >
    I have a EJB project with a properties file in BEA Weblogic Workshop.
    After building
    the project, the properties file is not included in the resulting JAR
    file. As
    a result, the resource bundle cannot get the property file and an exception
    is
    thrown. Is there any method to solve this problem? Thanks.

  • Problem building with ant

    Hi all,
    For some reason i get the following error message when trying to build any of the code in the j2ee tutorial.
    C:\WINDOWS\system32\ntvdm.exe
    Error while setting up environment for the application. Choose 'close' to terminate the application
    If anyone has any ideas as to why this happens, any help would be much appreciated.
    thanks

    i'm using windows xp pro. i have actually sorted that problem out by replacing ant 1.3 with ant 1.5
    I now have another error message. When i try to run the application client with the foolowing command:
    C:\forte4j\j2sdkee1.3\bin>runclient client \examples\ears\SavingsAccountApp.ear -name SavingsAccountClient -textauth
    I get the following
    Initiating login ...
    Username = null
    Enter Username:guest
    Enter Password:guest123
    Binding name:`java:comp/env/ejb/SimpleSavingsAccount`
    Application threw an exception:java.lang.NoClassDefFoundError: SavingsAccountHome
    Unbinding name:`java:comp/env/ejb/SimpleSavingsAccount`
    Not sure why i am getting the exception.

  • Problem with building EJB with inheritance

    I've created a EJB project in my workshop 8.1.4 application.
    Since all my tables contains a common subset of columns, I'd like to create a superclass for all CMP entity beans which contains the handful of CMP fields and business methods pertaining to them.
    I tried to do it in Workshop by creating a new superclass (BaseEB.java) which extends GenericEntityBean class.
    When building, the script tries to run ejbgen on BaseEB.java, which obviously fails because BaseEB does not contain all the required @ejbgen tags, as it is not meant to be used by itself.
    I think the solution is a matter of making the build script bypass BaseEB.java, but how can that be done?.

    This is my base EJB. There are some @ejbgen tags defined, but it does not have all required ejbgen tags, especially in the class javadoc. The classes that extends from this are expected to define them.
    package occ;
    import java.util.*;
    import weblogic.ejb.GenericEntityBean;
    public abstract class BaseEB extends GenericEntityBean
          * @ejbgen:local-method
         public void touch(String username){
              java.util.Date currDate = new Date();
              setUpdateDateTime(currDate);
              setUpdateUsername(username);
              setUpdateTimeID(new Long(getUpdateTimeID().longValue() + 1));
          * @ejbgen:local-method
         public void setCreateBy(String username){
              java.util.Date curr = new Date();
              setCreateUsername(username);
              setCreateDateTime(curr);
              setUpdateUsername(username);
              setUpdateDateTime(curr);
              setUpdateTimeID(new Long(1));
          * @ejbgen:cmp-field column = "UPDATEDATETIME"
          * @ejbgen:local-method
         public abstract void setUpdateDateTime(Date val);
          * @ejbgen:local-method
         public abstract Date getUpdateDateTime();
          * @ejbgen:cmp-field column = "UPDATEUSERNAME"
          * @ejbgen:local-method
         public abstract void setUpdateUsername(String val);
          * @ejbgen:local-method
         public abstract String getUpdateUsername();
          * @ejbgen:cmp-field column = "CREATEDATETIME"
          * @ejbgen:local-method
         public abstract void setCreateDateTime(Date val);
          * @ejbgen:local-method
         public abstract Date getCreateDateTime();
          * @ejbgen:cmp-field column = "CREATEUSERNAME"
          * @ejbgen:local-method
         public abstract void setCreateUsername(String val);
          * @ejbgen:local-method
         public abstract String getCreateUsername();
          * @ejbgen:cmp-field column = "UPDATETIMEID"
          * @ejbgen:local-method
         public abstract void setUpdateTimeID(Long val);
          * @ejbgen:local-method
         public abstract Long getUpdateTimeID();
    }Errors while building in workshop.
    EJBGen 2.16
    Error: Couldn't determine the type of the EJB 'occ.BaseEB'.  Please make sure that:
      - It is an Enterprise Java Bean
      - Its superclass is in your classpath or that its type is specified
        with an @ejbgen:entity|session|message-driven attribute.
    1 error.
    ERROR: Java returned: 1
    BUILD FAILED
    ERROR: Java returned: 1

  • Help with Workshop tutorial : building an ejb

    Hi, I've been trying to compile a project, with no luck.
    Please help!
    I have an entity bean and a session bean that references the entity bean. I can compile the entity bean by itself, but when I add the session bean, I'm not able to compile :-( I'm really new to ejbs & java. Please help!
    Thanks,
    Meera
    Here is the error log:
    Build project MyEJBProject started.
    BUILD STARTED
    build:
    check-env:
    WARNING: Checking to see if there is anything new to build...
    no-ejbgen:
    run-build:
    clean-modules:
    removed module 'MyEJBProject.jar'
    WARNING: Running EJBGen...
    Loading source file C:\Temp\/wlw_MyEJBProject_build/../wlw_ejb_crc//ejbgentemp/Hello\HelloBean.java...
    Loading source file C:\Temp\/wlw_MyEJBProject_build/../wlw_ejb_crc//ejbgentemp/Hello\VisitBean.java...
    Constructing Javadoc information...
    EJBGen 2.16
    [Info:] Creating C:\Temp\/wlw_MyEJBProject_build/../wlw_ejb_crc//ejbgentemp\Hello\HelloHome.java
    [Info:] Creating C:\Temp\/wlw_MyEJBProject_build/../wlw_ejb_crc//ejbgentemp\Hello\Hello.java
    [Info:] Creating C:\Temp\/wlw_MyEJBProject_build/../wlw_ejb_crc//ejbgentemp\Hello\Visit.java
    [Info:] Creating C:\Temp\/wlw_MyEJBProject_build/../wlw_ejb_crc//ejbgentemp\Hello\VisitHome.java
    [Info:] Creating C:\Temp\/wlw_MyEJBProject_build/../wlw_ejb_crc//ejbgentemp\META-INF\ejb-jar.xml
    [Info:] null [Bean] MAKE CLASS NAME G:HelloHome P:Hello N:HelloHome
    [Info:] null [Bean] MAKE CLASS NAME G:Hello P:Hello N:Hello
    [Info:] null [Bean] MAKE CLASS NAME G:VisitHome P:Hello N:VisitHome
    [Info:] null [Bean] MAKE CLASS NAME G:Visit P:Hello N:Visit
    [Info:] Creating C:\Temp\/wlw_MyEJBProject_build/../wlw_ejb_crc//ejbgentemp\META-INF\weblogic-ejb-jar.xml
    [Info:] Creating C:\Temp\/wlw_MyEJBProject_build/../wlw_ejb_crc//ejbgentemp\META-INF\weblogic-cmp-rdbms-jar.xml
    [Info:] Creating C:\Temp\/wlw_MyEJBProject_build/../wlw_ejb_crc//ejbgentemp\ejbgen-build.xml
    post-ejbgen:
    clean-ejbc:
    Copying 10 files to C:\Temp\wlw_MyEJBProject_build
    WARNING: EJBGen ok. Compiling...
    runjavac:
    Compiling 14 source files to C:\Temp\wlw_MyEJBProject_build
    C:\Temp\wlw_MyEJBProject_build\Hello\Hello_oztp1s_EOImpl.java:15: cannot resolve symbol
    symbol : class Hello
    location: interface Hello.Hello
    implements Hello.Hello, weblogic.utils.PlatformConstants
    ^
    C:\Temp\wlw_MyEJBProject_build\Hello\Hello_oztp1s_HomeImpl.java:13: cannot resolve symbol
    symbol : class HelloHome
    location: interface Hello.Hello
    implements Hello.HelloHome, weblogic.utils.PlatformConstants
    ^
    C:\Temp\wlw_MyEJBProject_build\Hello\Hello_oztp1s_HomeImpl.java:68: cannot resolve symbol
    symbol : class Hello
    location: interface Hello.Hello
    public Hello.Hello create ()
    ^
    C:\Temp\wlw_MyEJBProject_build\Hello\Visit_cbnl1s_ELOImpl.java:15: cannot resolve symbol
    symbol : class Visit
    location: interface Hello.Hello
    implements Hello.Visit, weblogic.utils.PlatformConstants, java.io.Serializable
    ^
    C:\Temp\wlw_MyEJBProject_build\Hello\Visit_cbnl1s_Intf.java:33: cannot resolve symbol
    symbol : class Visit_cbnl1s_Intf
    location: interface Hello.Hello
    (java.sql.ResultSet rs, java.lang.Integer offset, Object __WL_pk, Hello.Visit_cbnl1s_Intf var)
    ^
    C:\Temp\wlw_MyEJBProject_build\Hello\Visit_cbnl1s_LocalHomeImpl.java:13: cannot resolve symbol
    symbol : class VisitHome
    location: interface Hello.Hello
    implements Hello.VisitHome, weblogic.utils.PlatformConstants
    ^
    C:\Temp\wlw_MyEJBProject_build\Hello\Visit_cbnl1s_LocalHomeImpl.java:70: cannot resolve symbol
    symbol : class Visit
    location: interface Hello.Hello
    public Hello.Visit create (java.lang.String arg0)
    ^
    C:\Temp\wlw_MyEJBProject_build\Hello\Visit_cbnl1s_LocalHomeImpl.java:95: cannot resolve symbol
    symbol : class Visit
    location: interface Hello.Hello
    public Hello.Visit findByPrimaryKey(java.lang.String arg0)
    ^
    C:\Temp\wlw_MyEJBProject_build\Hello\Visit_cbnl1s__WebLogic_CMP_RDBMS.java:76: cannot resolve symbol
    symbol : class VisitBean
    location: interface Hello.Hello
    public final class Visit_cbnl1s__WebLogic_CMP_RDBMS extends Hello.VisitBean
    ^
    C:\Temp\wlw_MyEJBProject_build\Hello\Visit_cbnl1s__WebLogic_CMP_RDBMS.java:604: cannot resolve symbol
    symbol : class Visit_cbnl1s_Intf
    location: interface Hello.Hello
    Hello.Visit_cbnl1s_Intf beanIntf)
    ^
    C:\Temp\wlw_MyEJBProject_build\Hello\Hello_oztp1s_HomeImpl.java:72: cannot resolve symbol
    symbol : class Hello
    location: interface Hello.Hello
    return (Hello.Hello) super.create(md_ejbCreate);
    ^
    C:\Temp\wlw_MyEJBProject_build\Hello\Visit_cbnl1s_LocalHomeImpl.java:74: cannot resolve symbol
    symbol : class Visit
    location: interface Hello.Hello
    return (Hello.Visit) super.create(md_ejbCreate_S,
    ^
    C:\Temp\wlw_MyEJBProject_build\Hello\Visit_cbnl1s_LocalHomeImpl.java:99: cannot resolve symbol
    symbol : class Visit
    location: interface Hello.Hello
    return (Hello.Visit)
    ^
    C:\Temp\wlw_MyEJBProject_build\Hello\Visit_cbnl1s__WebLogic_CMP_RDBMS.java:238: cannot resolve symbol
    symbol : variable super
    location: class Hello.Visit_cbnl1s__WebLogic_CMP_RDBMS
    super.setEntityContext(arg0);
    ^
    C:\Temp\wlw_MyEJBProject_build\Hello\Visit_cbnl1s__WebLogic_CMP_RDBMS.java:251: cannot resolve symbol
    symbol : variable super
    location: class Hello.Visit_cbnl1s__WebLogic_CMP_RDBMS
    super.unsetEntityContext();
    ^
    C:\Temp\wlw_MyEJBProject_build\Hello\Visit_cbnl1s__WebLogic_CMP_RDBMS.java:263: cannot resolve symbol
    symbol : variable super
    location: class Hello.Visit_cbnl1s__WebLogic_CMP_RDBMS
    super.ejbActivate();
    ^
    C:\Temp\wlw_MyEJBProject_build\Hello\Visit_cbnl1s__WebLogic_CMP_RDBMS.java:367: cannot resolve symbol
    symbol : class Visit_cbnl1s__WebLogic_CMP_RDBMS
    location: interface Hello.Hello
    Hello.Visit_cbnl1s__WebLogic_CMP_RDBMS __WL_bean = null;
    ^
    C:\Temp\wlw_MyEJBProject_build\Hello\Visit_cbnl1s__WebLogic_CMP_RDBMS.java:443: cannot resolve symbol
    symbol : class Visit_cbnl1s__WebLogic_CMP_RDBMS
    location: interface Hello.Hello
    __WL_bean = (Hello.Visit_cbnl1s__WebLogic_CMP_RDBMS)__WL_pm.getBeanFromRS(__WL_pk, __WL_rsInfo);
    ^
    C:\Temp\wlw_MyEJBProject_build\Hello\Visit_cbnl1s__WebLogic_CMP_RDBMS.java:607: cannot resolve symbol
    symbol : class Visit_cbnl1s__WebLogic_CMP_RDBMS
    location: interface Hello.Hello
    Hello.Visit_cbnl1s__WebLogic_CMP_RDBMS __WL_bean = (Hello.Visit_cbnl1s__WebLogic_CMP_RDBMS)beanIntf;
    ^
    C:\Temp\wlw_MyEJBProject_build\Hello\Visit_cbnl1s__WebLogic_CMP_RDBMS.java:607: cannot resolve symbol
    symbol : class Visit_cbnl1s__WebLogic_CMP_RDBMS
    location: interface Hello.Hello
    Hello.Visit_cbnl1s__WebLogic_CMP_RDBMS __WL_bean = (Hello.Visit_cbnl1s__WebLogic_CMP_RDBMS)beanIntf;
    ^
    C:\Temp\wlw_MyEJBProject_build\Hello\Visit_cbnl1s__WebLogic_CMP_RDBMS.java:733: cannot resolve symbol
    symbol : variable super
    location: class Hello.Visit_cbnl1s__WebLogic_CMP_RDBMS
    super.ejbLoad();
    ^
    C:\Temp\wlw_MyEJBProject_build\Hello\Visit_cbnl1s__WebLogic_CMP_RDBMS.java:747: cannot resolve symbol
    symbol : variable super
    location: class Hello.Visit_cbnl1s__WebLogic_CMP_RDBMS
    super.ejbStore();
    ^
    C:\Temp\wlw_MyEJBProject_build\Hello\Visit_cbnl1s__WebLogic_CMP_RDBMS.java:761: cannot resolve symbol
    symbol : variable super
    location: class Hello.Visit_cbnl1s__WebLogic_CMP_RDBMS
    super.ejbRemove();
    ^
    C:\Temp\wlw_MyEJBProject_build\Hello\Visit_cbnl1s__WebLogic_CMP_RDBMS.java:826: cannot resolve symbol
    symbol : class Visit_cbnl1s__WebLogic_CMP_RDBMS
    location: interface Hello.Hello
    case 0: __WL_loadGroup0FromRS(rs, offset, __WL_pk, (Hello.Visit_cbnl1s__WebLogic_CMP_RDBMS)eb); break;
    ^
    C:\Temp\wlw_MyEJBProject_build\Hello\Visit_cbnl1s__WebLogic_CMP_RDBMS.java:919: reference to + is ambiguous, both method +(java.lang.String,java.lang.String) in and method +(java.lang.String,int) in match
    if(__WL_verbose) Debug.say("setting("+this+") 'visitNumber' using column " __WL_num ". Value is " + this.visitNumber);
    ^
    C:\Temp\wlw_MyEJBProject_build\Hello\Visit_cbnl1s__WebLogic_CMP_RDBMS.java:1359: cannot resolve symbol
    symbol : variable super
    location: class Hello.Visit_cbnl1s__WebLogic_CMP_RDBMS
    super.ejbCreate( arg0);
    ^
    C:\Temp\wlw_MyEJBProject_build\Hello\Visit_cbnl1s__WebLogic_CMP_RDBMS.java:1398: cannot resolve symbol
    symbol : variable super
    location: class Hello.Visit_cbnl1s__WebLogic_CMP_RDBMS
    super.ejbPostCreate( arg0);
    ^
    C:\Temp\wlw_MyEJBProject_build\Hello\Visit_cbnl1s__WebLogic_CMP_RDBMS.java:1543: cannot resolve symbol
    symbol : variable super
    location: class Hello.Visit_cbnl1s__WebLogic_CMP_RDBMS
    super.ejbRemove();
    ^
    C:\Temp\wlw_MyEJBProject_build\Hello\Visit_cbnl1s__WebLogic_CMP_RDBMS.java:1603: cannot resolve symbol
    symbol : variable super
    location: class Hello.Visit_cbnl1s__WebLogic_CMP_RDBMS
    super.ejbLoad();
    ^
    C:\Temp\wlw_MyEJBProject_build\Hello\Visit_cbnl1s__WebLogic_CMP_RDBMS.java:1634: cannot resolve symbol
    symbol : variable super
    location: class Hello.Visit_cbnl1s__WebLogic_CMP_RDBMS
    super.ejbStore();
    ^
    C:\Temp\wlw_MyEJBProject_build\Hello\Visit_cbnl1s__WebLogic_CMP_RDBMS.java:1750: cannot resolve symbol
    symbol : variable super
    location: class Hello.Visit_cbnl1s__WebLogic_CMP_RDBMS
    super.ejbPassivate();
    ^
    31 errors
    BUILD FAILED
    ERROR: Compile failed; see the compiler error output for details.

    It seems that the example provided (in the link) requires a web serverNo it doesn't. It requires an HTTP server.
    tomcat will be a better option which you can useThe Apache HTTP server might be more to the point.
    But If you are new to RMI and need to understand the exact flow of RMI I think this will not be a better exercise to start withI agree. I would get it running without the codebase feature. This isn't as widely used as you might think, and anyway it is a deployment option not something you need to engage with much when developing.
    @OP: ignore the HTTP stuff and the codebase feature and build 3 JAR files:
    (a) the common stuff (remote interface, stubs if any, and any classes referecned by the remote interface)
    (b) the server (the remote object itself and anything server-side it uses)
    (c) the client.
    The common JAR file should be deployed to both the server and the client, and both the other JARs should name it in their Class-Path entry in the manifest.

  • Application deployment order with weblogic-ejb-jar.xml and jndi-name

    I have two applicatation working on Weblogic server v. 10.3.6.
    First of them creating one ejb stateless bean and creates JNDI maping for it (in weblogic-ejb-jar.xml file):
    <weblogic-enterprise-bean>
         <ejb-name>ConfigMenegerBean</ejb-name>
         <stateless-session-descriptor>
         <stateless-session-descriptor>
              <business-interface-jndi-name-map>
              <business-remote>package.ConfigurationSessionRemote</business-remote>
              <jndi-name>ConfigMeneger</jndi-name>
              </business-interface-jndi-name-map>
         </stateless-session-descriptor>
         <enable-call-by-reference>true</enable-call-by-reference>
         <jndi-name>ConfigMeneger</jndi-name>
    </weblogic-enterprise-bean>
    Second appication have to refer for this bean by JNDI using spring been lookup :
    <jee:jndi-lookup id="configManager" jndi-name="ConfigMeneger"/>
    I changed deployment order parameter for both apllication(first=100 and second=500) in order to first app start first and share bean by jndi to another application. Unfortuantelly I got an error :
    javax.naming.NameNotFoundException: Unable to resolve 'ConfigMeneger'. Resolved ''; remaining name 'ConfigMeneger'
    How can I configure deployment order that first application make jndi mapping for bean, before the second application will use it ?

    Ok in a way I have solved my problem (even if I am not completely satisfied by the way on how to proceed...). So thanks to message "JBuilder7.0 and Weblogic6.1" on EJB sun forum :
    http://forum.java.sun.com/thread.jsp?thread=285735&forum=13&message=1255488
    I have tried the following actions (mentionned in the other forum messages):
    - To preserve changes to weblogic*.xml, the safest way is to change the ejb-borland.xml.
    (I am not sure that I have applied this advice correctly, because I suppose that syntax is not similar in weblogic file or borland file).
    And you can MANUALLY update the weblogic file in your JAR archive.
    1. Open the EJB JAR file in Winzip and extract the weblogic-ejb-jar.xml file, so that a copy exists in your
    project directory.
    2. Open this file (in Notepad), add the WebLogic specific information, and then save the file.
    3. Now, when you are finished with the build cycle and are ready to deploy, you may open the EJB jar file
    and swap in the weblogic-ejb-jar.xml file."
    Good Luck.

  • Weblogic.ejb20.locks.LockTimedOutException and pb with weblogic-ejb-jar.xml

    Hello All,
    I get a strange problem when I try to log in to the J2EE application based on EJBs:
    weblogic.ejb20.locks.LockTimedOutException
    I see that I can add an option to the weblogic-ejb-jar.xml file, and I hope that can help for my previous problem:
    <weblogic-enterprise-bean><stateful-session-descriptor>
    <allow-concurrent-calls>true</allow-concurrent-calls>
    </stateful-session-descriptor></weblogic-enterprise-bean>
    But I can not edit the weblogic-ejb-jar.xml file under JBuilder ! the file is probably read-only, but I do not know how to change the property. I can not find this file directly under JBuilder directories.
    So I have tried to open the module.jar that contained this file. I have checked: the file is not read-only. I have modified directly manually the weblogic-ejb-jar.xml file, but now I get this error in Jbuilder when I open the weblogic-ejb-jar.xml file:
    URL: Transformation requires a XSL StyleSheetThe Node does not have a style sheet associated with itEither add a style sheet using the Add stylesheets button on the toolbar or add a valid XSL Processing instruction to the document directly
    In conclusion, what should I do to be able to modify the weblogic-ejb-jar.xml file properly ??

    Ok in a way I have solved my problem (even if I am not completely satisfied by the way on how to proceed...). So thanks to message "JBuilder7.0 and Weblogic6.1" on EJB sun forum :
    http://forum.java.sun.com/thread.jsp?thread=285735&forum=13&message=1255488
    I have tried the following actions (mentionned in the other forum messages):
    - To preserve changes to weblogic*.xml, the safest way is to change the ejb-borland.xml.
    (I am not sure that I have applied this advice correctly, because I suppose that syntax is not similar in weblogic file or borland file).
    And you can MANUALLY update the weblogic file in your JAR archive.
    1. Open the EJB JAR file in Winzip and extract the weblogic-ejb-jar.xml file, so that a copy exists in your
    project directory.
    2. Open this file (in Notepad), add the WebLogic specific information, and then save the file.
    3. Now, when you are finished with the build cycle and are ready to deploy, you may open the EJB jar file
    and swap in the weblogic-ejb-jar.xml file."
    Good Luck.

  • Error while building Web Services for Invoking PL/SQL with ANT

    Hello,
    i tried to build the demo- webservice for plsql- stored procedure, but while i want to run the demo with ant i get the following error:
    The same Error occures while Run the Demo with seperate commands: Step 5a(1) Assembly:
    env-check:
    init:
    [mkdir] Created dir: D:\ORAWebServices\webservices_demos\webservices_demos\db\plsql\build\classes\service
    wsa:
    [java] Fehler: oracle.j2ee.ws.tools.wsa.cli.CommandLineMessageBundle_de
    BUILD FAILED
    D:\ORAWebServices\webservices_demos\webservices_demos\db\plsql\build.xml:45: The following error occurred while executing this line:
    D:\ORAWebServices\webservices_demos\webservices_demos\common.xml:74: Java returned: 1
    Total time: 3 seconds
    The Database runs on a remote system and the service-connfig.xml is updated.
    Thanks for Help.

    I assume you have OC4J 10.1.3 webservices installed. Then you should not be using service-config.xml. Check out the 10.1.3 documentation about WebServiceAssembler. I am afraid, you are using 10.1.2 style service-config.xml along with 10.1.3 style WebServiceAssembler.

Maybe you are looking for