EJB : ANT WEBLOGIC 8

Hi Friends,
I am new to EJB, ANT and Weblogic - so need a help from you.
I want to run a simple session bean on weblogic 8 but want to deploy using ant along with my other servlets and jsp's, please point to simple tutorials.
I have some basic questions.
1. So far I am deploying my application as .ear file just by typing "ant copyEar" and happy to see my changes, so question is can I deploy my EJBS as part of this ".ear" file ?
2. If so can I go and see my deployed EJB's thro' weblogic console just like my application ?
3. If I can deploy the EJB as part of ".ear" (which I believe) please send me the build.xml contents (Now my build.xml compiles all java, jsp files and deployes automatically) - so what I try to ask is do I need to change the build.xml to accomodate EJB's ??
4. Please if possible give a simple example which I can try myself.
Thanks,
~Deepa
[email protected]

Thanks seeteshh,
I did try one, but not succeeded.
Can any one tell me what I need to add to my build.xml to include EJB as part of my application. ".ear file"
1. My "build.xml" looks like this
<!-- Ant build script -->
<project name="SOWIC" default="makeEar" basedir=".">
<target name="help">
<echo>fig\platform\demo.properties
Sample config\platform\*.properties files are included with this
build environment. </echo>
</target>
<!-- The location of the App Server jar file. Used for compiling servlets, etc. -->
<property name="appServerJar" location="c:\bea\weblogic81\server\lib\weblogic.jar"/>
<!-- The directories of the "build" tree -->
<property name="buildDir" location="build"/>
<property name="warDir" location="${buildDir}\war_tmp"/>
<property name="warConfigDir" location="${warDir}\WEB-INF"/>
<property name="jspCompileDir" location="${buildDir}\jsp_compile_tmp"/>
<property name="jarDir" location="${buildDir}\jar_tmp\"/>
<property name="jarConfigDir" location="${jarDir}\META-INF"/>
<property name="earDir" location="${buildDir}\ear_tmp"/>
<property name="earConfigDir" location="${earDir}\META-INF"/>
<property name="earLibDir" location="${earDir}\lib"/>
<!-- CopyEar Target -->
<target name="copyEar" depends="makeEar">
<echo message="Copying ear file to ${copyEarToFile}"/>
<copy file="${buildDir}\${earFile}" tofile="${copyEarToFile}"/>
</target>
<!-- MakeEar Target -->
<target name="makeEar" depends="makeWar,init">
<mkdir dir="${earConfigDir}"/>
<copy todir="${earConfigDir}" filtering="true">
<fileset dir="config\app\META-INF\"/>
</copy>
<mkdir dir="${earLibDir}"/>
<copy todir="${earLibDir}">
<fileset refid="project.classpath.fileset"/>
</copy>
<jar destfile="${buildDir}\${earFile}" basedir="${earDir}">
<manifest>
<attribute name="Built-By" value="${user.name}"/>
</manifest>
</jar>
<echo message="Ear file built."/>
</target>
<!-- MakeWar Target -->
<target name="makeWar" depends="makeJar,init">
<mkdir dir="${earDir}"/>
<mkdir dir="${warConfigDir}"/>
<mkdir dir="${jspCompileDir}"/>
<copy todir="${warConfigDir}" filtering="true" overwrite="true">
<fileset dir="config\web\WEB-INF\"/>
</copy>
<copy todir="${warDir}">
<fileset dir="web\"/>
</copy>
<echo message="Compiling JSP files (to check syntax)"/>
<java classname="weblogic.jspc" failonerror="true" fork="true">
<arg line="-d ${jspCompileDir}"/>
<arg line="-webapp ${warDir}"/>
<arg line="-depend"/>
<arg line="-k"/>
<arg line="-keepgenerated"/>
<arg line="-compileAll"/>
<classpath>
<path refid="project.classpath"/>
<pathelement location="${appServerJar}"/>
     <pathelement location="${jarDir}"/>
</classpath>
</java>
<jar destfile="${earDir}\${appName}.war" basedir="${warDir}">
<manifest>
<attribute name="Built-By" value="${user.name}"/>
     <attribute name="Class-Path"
value="${appName}.jar ${project.classpath.spacedelim}"/>
</manifest>
</jar>
<echo message="War file built."/>
</target>
<!-- MakeJar Target -->
<target name="makeJar" depends="init">
<mkdir dir="${earDir}"/>
<mkdir dir="${jarConfigDir}"/>
<copy todir="${jarConfigDir}" filtering="true">
<fileset dir="config\classes\META-INF\"/>
</copy>
<javac srcdir = "classes" destdir = "${jarDir}" debug = "on">
<classpath>
<path refid="project.classpath"/>
<pathelement location="${appServerJar}"/>
</classpath>
</javac>
<!-- HEY I AM ADDING THIS TO TRY MY EJB EXAMPLE -->
     <ejbjar srcdir="classes" descriptordir="config\classes\META-INF\">
<weblogic destdir="${jarDir}"
classpath="${project.classpath}"/>
<include name="**/*-ejb-jar.xml"/>
<exclude name="**/*weblogic*.xml"/>
</ejbjar>
<copy todir="${jarDir}">
<fileset dir="classes">
<include name="**\*.properties"/>
</fileset>
</copy>
<jar destfile="${earDir}\${appName}.jar" basedir="${jarDir}">
<manifest>
<attribute name="Built-By" value="${user.name}"/>
     <attribute name="Class-Path" value="${project.classpath.spacedelim}"/>
</manifest>
</jar>
</target>
<!-- Make Classpath Target -->
<target name = "init">
<!-- Set the timestamp of the build -->
<tstamp>
<format property="buildTimestamp" pattern="d-MMM-yyyy HH:mm:ss z"/>
<format property="filenameTimestamp" pattern="dMMMyy-HH-mm-ss-z"/>
</tstamp>
<echo message="Timestamp: ${buildTimestamp}"/>
<!-- Check if all required properties were set. If so, fail. -->
<condition property="propertySet">
<or>
<isset property="appName"/>
<isset property="copyEarToFile"/>
<isset property="precompile"/>
<isset property="sessionTimeout"/>
<isset property="production"/>
</or>
</condition>
<fail if="propertySet">
Some required properties that can only be set via a platform properties
file, were set via the command line to Ant.
Property
appName
copyEarToFile
precompile
sessionTimeout
production
</fail>
<!-- First load in the appropriate properties file -->
<property name="platform" value="dev"/>
<echo message="Reading config config\platform\${platform}.properties"/>
<loadproperties srcFile="config\platform\${platform}.properties">
<filterchain>
<expandproperties/>
</filterchain>
</loadproperties>
<!-- Check if all required properties are set. -->
<condition property="propertyNotSet">
<not>
<and>
<isset property="appName"/>
<isset property="copyEarToFile"/>
<isset property="precompile"/>
<isset property="sessionTimeout"/>
<isset property="production"/>
</and>
</not>
</condition>
<!-- If properties have not been set by now, fill in a 'null' value -->
<property name="appName" value="NOT SET"/>
<property name="copyEarToFile" value="NOT SET"/>
<property name="precompile" value="NOT SET"/>
<property name="sessionTimeout" value="NOT SET"/>
<property name="production" value="NOT SET"/>
<!-- Fail the build process if we do not have all the required properties-->
<fail if="propertyNotSet">
Some required properties were not set. To set these properties specify
a platform target file that contains all the required properties
(eg. ant -Dplatform='platform name'. Files are read from
config\platform\*.properties
Property Value
appName ${appName}
copyEarToFile ${copyEarToFile}
precompile ${precompile}
sessionTimeout ${sessionTimeout}
production ${production}
Run 'ant help' for more info.
</fail>
<echo>
Property Value
appName ${appName}
copyEarToFile ${copyEarToFile}
precompile ${precompile}
sessionTimeout ${sessionTimeout}
production ${production}
</echo>
<property name="earFile" value="${appName}.ear"/>
<!-- Generate the classpath -->
<path id="project.classpath">
<fileset id="project.classpath.fileset" dir="lib">
<include name="*.jar"/>
<include name="*.zip"/>
</fileset>
</path>
<!--
Now create a space seperated string classpath list. First
read the current directory into 'project.currentDir' -->
<pathconvert property = "project.currentDir" pathsep = "">
<path path="."/>
</pathconvert>
<!-- Now convert the classpath into a relative space delimited classpath -->
<pathconvert property = "project.classpath.spacedelim"
pathsep = " "
refid = "project.classpath">
<map from="${project.currentDir}" to=""/>
</pathconvert>
<echo message="Space delimited classpath:${project.classpath.spacedelim}"/>
<!--
For any file copied by this ant project, replace the
string "@appName@" with the actual value of ${appName} -->
<filter token="appName" value="${appName}"/>
<filter token="buildTimestamp" value="${buildTimestamp}"/>
<filter token="precompile" value="${precompile}"/>
<filter token="sessionTimeout" value="${sessionTimeout}"/>
<filter token="production" value="${production}"/>
</target>
<!-- Clean Target -->
<target name="clean">
<delete dir="${buildDir}"/>
</target>
<!-- Clean Temp Files Target -->
<target name="cleanTempFiles">
<delete>
<fileset dir="." includes="**\*~" defaultexcludes="false"/>
</delete>
</target>
<!-- DeployEar Target -->
<target name="deployEar">
<echo message="This target is no longer used. Use copyEar instead."/>
</target>
</project>
2. My java files are under "classes" directories (from ant base directory)
3. ejb-jar.xml & weblogic-ejb-jar.xml are under "config\classes\META-INF" directory
4. With above build.xml ant runs SUCCESSFULLY but when I try to run the EJB Client get the following error
:::::::::::::: Error :::::::::::::::::
javax.naming.NameNotFoundException: Unable to resolve 'stateless-session-demo' Resolved [Root exception is javax.naming.NameNotFoundException: Unable to resolve 'stateless-session-demo' Resolved ]; remaining name 'stateless-session-demo' at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.j
ava:108)
5. Thank you so much for your time.
~Deepa

Similar Messages

  • EJB and WebLogic

    I am quite new to weblogic. I created very simple application, stockonline using ejb in weblogic. The compilation and package were OK. But when I deploy ejb jar name stockonline-core-1.0.jar in weblogic, I always got the same error
    Exception:weblogic.management.ApplicationException: prepare failed for stockonline-core-1.0 Module: stockonline-core-1.0 Error: Exception preparing module: EJBModule(stockonline-core-1.0,status=NEW) Unable to deploy EJB: Account from stockonline-core-1.0.jar: java.lang.AssertionError: Unable to find expected methods. Please check your classpath for stale versions of your ejb classes and re-run weblogic.ejbc at stockonline.bean.ejb.Account_hzbwy8_LocalHomeImpl.<clinit>(Account_hzbwy8_LocalHomeImpl.java:65) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:274) at java.lang.Class.newInstance0(Class.java:308) at java.lang.Class.newInstance(Class.java:261) at weblogic.ejb20.deployer.ClientDrivenBeanInfoImpl.prepare(ClientDrivenBeanInfoImpl.java:1026) at weblogic.ejb20.deployer.EJBDeployer.setupBeanInfos(EJBDeployer.java:1004) at weblogic.ejb20.deployer.EJBDeployer.prepare(EJBDeployer.java:1345) at weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:498) at weblogic.j2ee.J2EEApplicationContainer.prepareModule(J2EEApplicationContainer.java:3142) at weblogic.j2ee.J2EEApplicationContainer.prepareModules(J2EEApplicationContainer.java:1583) at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1227) at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1070) at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.prepareContainer(SlaveDeployer.java:2513) at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer(SlaveDeployer.java:2463) at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2379) at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:866) at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:594) at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:508) at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    * [Deployer:149033]preparing application stockonline-core-1.0 on myserver
    * [Deployer:149033]failed application stockonline-core-1.0 on myserver
    * [Deployer:149034]An exception occurred for task [Deployer:149026]Deploy application stockonline-core-1.0 on myserver.: Exception:weblogic.management.ApplicationException: prepare failed for stockonline-core-1.0 Module: stockonline-core-1.0 Error: Exception preparing module: EJBModule(stockonline-core-1.0,status=NEW) Unable to deploy EJB: Account from stockonline-core-1.0.jar: java.lang.AssertionError: Unable to find expected methods. Please check your classpath for stale versions of your ejb classes and re-run weblogic.ejbc at stockonline.bean.ejb.Account_hzbwy8_LocalHomeImpl.<clinit>(Account_hzbwy8_LocalHomeImpl.java:65) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:274) at java.lang.Class.newInstance0(Class.java:308) at java.lang.Class.newInstance(Class.java:261) at weblogic.ejb20.deployer.ClientDrivenBeanInfoImpl.prepare(ClientDrivenBeanInfoImpl.java:1026) at weblogic.ejb20.deployer.EJBDeployer.setupBeanInfos(EJBDeployer.java:1004) at weblogic.ejb20.deployer.EJBDeployer.prepare(EJBDeployer.java:1345) at weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:498) at weblogic.j2ee.J2EEApplicationContainer.prepareModule(J2EEApplicationContainer.java:3142) at weblogic.j2ee.J2EEApplicationContainer.prepareModules(J2EEApplicationContainer.java:1583) at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1227) at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1070) at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.prepareContainer(SlaveDeployer.java:2513) at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer(SlaveDeployer.java:2463) at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2379) at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:866) at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:594) at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:508) at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178) .
    When I looked at the come of Account_hzbwy8_LocalHomeImpl.java, the error was with create method. I don't why. I don't think any problem with the application logic since I deployed the same code in JBoss and it worked. Could anyone help me? I really appreciate. I use weblogic with oracle in a remote machine.
    I used maven to package.
    <postGoal name="ejb:ejb">
    <ant:java classname="weblogic.ejbc" fork="yes" failonerror="yes">
    <!--ant:sysproperty key="weblogic.home" value="${WL_HOME}/server"/-->
    <ant:arg line="-compiler javac ${maven.build.dir}/${maven.final.name}.jar" />
    <ant:classpath>
    <ant:pathelement path="${WL_HOME}/server/lib/weblogic.jar" />
    <ant:pathelement location="${env.JAVA_HOME}/lib/tools.jar"/>
    <ant:pathelement location="${USER_MAVEN}/stockonline/jars/stockonline-common-1.0.jar"/>
    </ant:classpath>
    </ant:java>
    </postGoal>     
    Thanks
    Betty

    Hi,guys, I am new to EJB. when i want to deploy the EJB,I got the problem,which is similar yours:
    Exception:weblogic.management.ApplicationException: prepare failed for HelloEJB Module: HelloEJB Error: Exception preparing module: EJBModule(HelloEJB,status=NEW) Unable to deploy EJB: HelloWorld from HelloEJB.jar: java.lang.AssertionError: Unable to find expected methods. Please check your classpath for stale versions of your ejb classes and re-run weblogic.ejbc at hello.HelloWorld_ap17lf_HomeImpl.<clinit>(HelloWorld_ap17lf_HomeImpl.java:55) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:274) at java.lang.Class.newInstance0(Class.java:306) at java.lang.Class.newInstance(Class.java:259) at weblogic.ejb20.deployer.ClientDrivenBeanInfoImpl.prepare(ClientDrivenBeanInfoImpl.java:921) at weblogic.ejb20.deployer.EJBDeployer.setupBeanInfos(EJBDeployer.java:983) at weblogic.ejb20.deployer.EJBDeployer.prepare(EJBDeployer.java:1283) at weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:477) at weblogic.j2ee.J2EEApplicationContainer.prepareModule(J2EEApplicationContainer.java:2847) at weblogic.j2ee.J2EEApplicationContainer.prepareModules(J2EEApplicationContainer.java:1534) at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1188) at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1031) at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.prepareContainer(SlaveDeployer.java:2634) at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer(SlaveDeployer.java:2584) at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2506) at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:833) at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:542) at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:500) at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    [Deployer:149033]preparing application HelloEJB on admin
    [Deployer:149033]failed application HelloEJB on admin
    [Deployer:149034]An exception occurred for task [Deployer:149026]Deploy application HelloEJB on admin.: Exception:weblogic.management.ApplicationException: prepare failed for HelloEJB Module: HelloEJB Error: Exception preparing module: EJBModule(HelloEJB,status=NEW) Unable to deploy EJB: HelloWorld from HelloEJB.jar: java.lang.AssertionError: Unable to find expected methods. Please check your classpath for stale versions of your ejb classes and re-run weblogic.ejbc at hello.HelloWorld_ap17lf_HomeImpl.<clinit>(HelloWorld_ap17lf_HomeImpl.java:55) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:274) at java.lang.Class.newInstance0(Class.java:306) at java.lang.Class.newInstance(Class.java:259) at weblogic.ejb20.deployer.ClientDrivenBeanInfoImpl.prepare(ClientDrivenBeanInfoImpl.java:921) at weblogic.ejb20.deployer.EJBDeployer.setupBeanInfos(EJBDeployer.java:983) at weblogic.ejb20.deployer.EJBDeployer.prepare(EJBDeployer.java:1283) at weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:477) at weblogic.j2ee.J2EEApplicationContainer.prepareModule(J2EEApplicationContainer.java:2847) at weblogic.j2ee.J2EEApplicationContainer.prepareModules(J2EEApplicationContainer.java:1534) at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1188) at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1031) at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.prepareContainer(SlaveDeployer.java:2634) at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer(SlaveDeployer.java:2584) at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2506) at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:833) at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:542) at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:500) at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    Is somebody can help me to fix , thanks !!

  • Error deploying EJB in weblogic 7.0

    Hello
    I am trying to deploy EJB 2.0, to Weblogic 7.0 server on IBM machine and i am
    getting this following error. Previously I have tested deploying the same EJB
    to weblogic 7.0 server on my local PC which based on Windows, and everything seems
    Ok.
    Unable to deploy EJB: DACEJB.jar from DACEJB.jar:
    Compiler failed executable.exec(java.lang.String[javac, -nowarn, -classpath, /bea/weblogic700/server/bin/tmp_ejbsmeap01ibm7001myserver/-1spvbzuqlvq3z:/bea/weblogic700/server/bin/DACEJB.jar:/usr/java131/jre/lib/rt.jar:/usr/java131/jre/lib/i18n.jar:/usr/java131/jre/classes:/CMS/CORP/config/:/bea/weblogic700:/bea/weblogic700/server/lib/crack.jar:/bea/weblogic700/server/lib/classes12_g.jar:/bea/weblogic700/server/lib/HostMsgDriverV2.1_oracle.jar:/bea/weblogic700/server/lib/aal2wrap.jar:/bea/weblogic
    700/server/lib/log4j.jar:/bea/weblogic700/server/lib/Opta2000.jar:/bea/weblogic700/server/lib/xmlx.jar:/bea/weblogic700/server/lib/VelisAuth.jar:/bea/weblogic700/server/lib/jython.jar:/usr/java131/lib/tools.jar:/bea/weblogic700/server:/bea/weblogic700/server/lib/weblogic_sp.jar:/bea/weblogic700/server/lib/weblogic.jar:,
    -d, tmp_ejbsmeap01ibm7001myserver/-
            at weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java(Compiled
    Code))
            at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:396)
            at weblogic.ejb20.deployer.EJBDeployer.runEJBC(EJBDeployer.java:490)
            at weblogic.ejb20.deployer.EJBDeployer.compileEJB(EJBDeployer.java:793)
            at weblogic.ejb20.deployer.EJBDeployer.prepare(EJBDeployer.java:1242)
            at weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:242)
            at weblogic.j2ee.J2EEApplicationContainer.prepareModule(J2EEApplicationContainer.java(Compiled
    Code))
            at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java(Compiled
    Code))
            at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java(Compiled
    Code))
            at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java(Compiled
    Code))
            at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java(Compiled
    Code))
            at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:24)
            at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java(Compiled Code))
            at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    This may happen because javac is not available to weblogic.
    Make sure that PATH environment variable used to start the server includes path to Java SDK bin dir with javac in it.
    Regards,
    Slava Imeshev
    "Jennifer" <[email protected]> wrote in message news:[email protected]...
    >
    Hello
    I am trying to deploy EJB 2.0, to Weblogic 7.0 server on IBM machine and i am
    getting this following error. Previously I have tested deploying the same EJB
    to weblogic 7.0 server on my local PC which based on Windows, and everything seems
    Ok.
    Unable to deploy EJB: DACEJB.jar from DACEJB.jar:
    Compiler failed executable.exec(java.lang.String[javac, -nowarn, -classpath,
    /bea/weblogic700/server/bin/tmp_ejbsmeap01ibm7001myserver/-1spvbzuqlvq3z:/bea/weblogic700/server/bin/DACEJB.jar:/usr/java131/jre/lib/rt.jar:/usr/java131/jre/lib/i18n.jar:/usr/java131/jre/classes:/CMS/CORP/config/:/bea/weblogic700:/bea/weblogic700/server/lib/crack.jar:/bea/weblogic700/server/lib/classes12_g.jar:/bea/weblogic700/server/lib/HostMsgDriverV2.1_oracle.jar:/bea/weblogic700/server/lib/aal2wrap.jar:/bea/weblogic>700/server/lib/log4j.jar:/bea/weblogic700/server/lib/Opta2000.jar:/bea/weblogic700/server/lib/xmlx.jar:/bea/weblogic700/server/lib/VelisAuth.jar:/bea/weblogic700/server/lib/jython.jar:/usr/java131/lib/tools.jar:/bea/weblogic700/server:/bea/weblogic700/server/lib/weblogic_sp.jar:/bea/weblogic700/server/lib/weblogic.jar:,> -d, tmp_ejbsmeap01ibm7001myserver/->>>         at weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java(Compiled> Code))>         at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:396)>         at weblogic.ejb20.deployer.EJBDeployer.runEJBC(EJBDeployer.java:490)>         at weblogic.ejb20.deployer.EJBDeployer.compileEJB(EJBDeployer.java:793)>         at weblogic.ejb20.deployer.EJBDeployer.prepare(EJBDeployer.java:1242)>         at weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:242)>         at weblogic.j2ee.J2EEApplicationContainer.prepareModule(J2EEApplicationContainer.java(Compiled> Code))>         at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java(Compiled> Code))>         at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java(Compiled> Code))>         at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java(Compiled> Code))>         at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java(Compiled> Code))>         at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:24)>         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java(Compiled Code))>         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Urgent!!!!How to deploy only an EJB from Weblogic to oc4j.

    Hi
    How can i deploy only EJB from Weblogic into oc4j without any web application or client coming into pitcture as my client access bean remotely....
    regards,
    Sapthapathi

    If you are migrating from ejb1.1->ejb1.1 you shouldn't have many changes - your ejb-jar.xml file should be the same (I assume you are still talking about ejbs). Once you pull over the base ejb - then if you want to, mess around with the automatically generated orion-ejb-jar.xml file. Obviously - those are all app server specific. I go back and forth between wls6.1 and oc4j all the time. When going from wls5.1 to oc4j - what particular issues do you run into. What do you mean, in particular, by configuration changes?
    Curious -
    Ray
    hi,
    EJBs and other applications can be migrated from weblogic to oc4j but many changes are required.These changes are mainly configuration changes rather than code changes.Infact there are many problems in effect while migrating and delloyment.Hope oracle is a bit more attentive to this issue.
    regards,
    chennai

  • Ejb-jar.xml中的EJB QL和weblogic-cmp-rdbms-jar.xml中的WLQL

    我想问一下,在ejb-jar.xml文件中用EJB QL查询语言定义了相应的EJB QL查询语句后,在weblogic-cmp-rdbms-jar.xml文件中还需不需要用wlql语言来定义相应的查询语句呀?

    在Weblogic6.0中,如果你需要利用EJB2.0的EJBQL语言所不提供的
    ORDERBY排序功能,那么这时候可以在weblogic-cmp-rdbms-jar.xml中用WLQL覆盖它,一般情况下,在ejb-jar.xml中声明一个EJBQL方法就可以了,WLQL可有可无。

  • EJB in weblogic

    Can anyone tell me how to run EJB in weblogic.Or can we run in Tomcat.

    javatolearn wrote:
    Can anyone tell me how to run EJB in weblogic.Yes.
    Create an EJB, package it into an EAR file, and deploy it to your WebLogic domain.
    Or can we run in Tomcat.No.
    %

  • Error deploying EJB on weblogic: Unable to set the transaction attribute

    Hi,
    I'm trying to deploy an application in WL10.3.2 and an error occurred during activation of changes.
    Here is the error message from the log file:
    <Jun 6, 2011 1:28:27 PM MDT> <Error> <Deployer> <BEA-149205> <Failed to initialize the application 'serverEAR-2' due to error weblogic.application.ModuleException: Exception preparing module: EJBModule(serverEJB-2.8.0.jar)
    Unable to deploy EJB: C:\oracle\Middleware\user_projects\domains\base_domain\servers\Server_3\tmp\_WL_user\serverEAR-2\1zw7ao\serverEJB-2.8.0.jar from serverEJB-2.8.0.jar:
    Unable to set the transaction attribute for method 'saveActionGroup(EditableActionGroup)' on EJB 'ViewBean'. No matching method could be found. Please verify the method signature specified in the ejb-jar.xml file matches that of your Remote interface for this EJB.
    weblogic.application.ModuleException: Exception preparing module: EJBModule(serverEJB-2.8.0.jar)
    Unable to deploy EJB: C:\oracle\Middleware\user_projects\domains\base_domain\servers\Server_3\tmp\_WL_user\serverEAR-2\1zw7ao\serverEJB-2.8.0.jar from serverEJB-2.8.0.jar:
    Unable to set the transaction attribute for method 'saveActionGroup(EditableActionGroup)' on EJB 'ViewBean'. No matching method could be found. Please verify the method signature specified in the ejb-jar.xml file matches that of your Remote interface for this EJB.
         at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:454)
         at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)
         at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:391)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:59)
         Truncated. see log file for complete stacktrace
    Caused By: weblogic.ejb.container.deployer.DeploymentDescriptorException: Unable to set the transaction attribute for method 'saveActionGroup(EditableActionGroup)' on EJB 'ViewBean'. No matching method could be found. Please verify the method signature specified in the ejb-jar.xml file matches that of your Remote interface for this EJB.
         at weblogic.ejb.container.deployer.MBeanDeploymentInfoImpl.processCTs(MBeanDeploymentInfoImpl.java:1502)
         at weblogic.ejb.container.deployer.MBeanDeploymentInfoImpl.processSpecificMethodCTs(MBeanDeploymentInfoImpl.java:1472)
         at weblogic.ejb.container.deployer.MBeanDeploymentInfoImpl.initializeTransactionAttribute(MBeanDeploymentInfoImpl.java:773)
         at weblogic.ejb.container.deployer.MBeanDeploymentInfoImpl.<init>(MBeanDeploymentInfoImpl.java:259)
         at weblogic.ejb.container.deployer.EJBDeployer.prepare(EJBDeployer.java:1190)
         Truncated. see log file for complete stacktrace
    Please help me...Thanks.

    In your ejb-jar.xml you are referring to a method saveActionGroup(EditableActionGroup) which is not defined in your remote interface.
    Maybe you have made some typo in the configuration. Check your transaction section, i.e.,
    <container-transaction>
                <method>
                    <ejb-name>ViewBean</ejb-name>
                    <method-name>saveActionGroup</method-name>
                    <method-params>
                        <method-param>package.EditableActionGroup</method-param>
                    </method-params>
                </method>
                <trans-attribute>Required</trans-attribute>
    </container-transaction>or something similar. See if the defined methods are corresponding to the methods defined in the remote interface.

  • Message EJB using Weblogic JMS Server

    Hi,
              I trying get some working logic about using JMS with weblogic. I have created a JMS Server instance with all the necessary Connection Factories and Destinations. I am able to connect to from a normal Java class, but i want to deploy a message driven ejb in weblogic and connect to the same JMS Server instance. When i deploy my EJB i get an error about unable to connect to the JMS Server in the weblogic.log . Could any please refer me to any resourcce that may help me.
              

              Thanks, i got it sorted out.
              Tom Barnes <[email protected]> wrote:
              >Unless you're descriptors make use of the weblogic extensions to specify
              >the jndi URL, make sure that the MDB and the JMS Server instance are
              >either
              >both located on the same WL server or are both in the same cluster.
              >
              >If this doesn't help, please post the stack trace for you're error
              >and attach your config.xml and MDB descriptor xml.
              >
              >Tom
              >
              >Riaan Minne wrote:
              >
              >> Hi,
              >>
              >> I trying get some working logic about using JMS with weblogic. I have
              >created a JMS Server instance with all the necessary Connection Factories
              >and Destinations. I am able to connect to from a normal Java class,
              >but i want to deploy a message driven ejb in weblogic and connect to
              >the same JMS Server instance. When i deploy my EJB i get an error about
              >unable to connect to the JMS Server in the weblogic.log . Could any
              >please refer me to any resourcce that may help me.
              >
              

  • How can I connect JSP in IPlanet that access to EJB in Weblogic?

    Hi:
    I have a JSP in IPlanet that access to EJB in Weblogic.
    IPlanet and Weblogic are installed in different machines.
    I don't know what code source and deployment actions to do to connect jsp and ejb. Can anybody guide me?
    Thanks in advance,
    David B.

    Hi,
    now only i am initiating the combination of iplanet webserver 4.1 and weblogic 5.1 application server for my project. I can able to execute jsps through iplanet webserver.
    Can u explain clearly jsps calls over to ejb which is stored in weblogic? How i will handle this combination in single machine?
    thanks in advance
    vijay.

  • Deploy the EJB in Weblogic server

    Hi all
    How do deploy the EJB In WebLogic server ?
    How do call the Deployed EJB from your client Program?
    Plz...Help Me.........

    How do deploy the EJB In WebLogic server ?first create ejb-jar.
    then package ur ejb-jar inside an ear.
    deploy this ear in weblogic. (i hope u know how to create a domain in weblogic. if not, refer weblogic online help)
    How do call the Deployed EJB from your client
    Program?while packaging the ejb-jar, u would have given some jndi names to ur APIs. use this jndi name to do a lookup on the context of ur server. u will get home interface. call create method on this interface. u get remote interface. now u can call the business methods.
    in case u r clueless on wht i m talking abt, u got a long way to go. understanding the weblogic, ejbs, packaging, deployment, JNDIs is quite involving to say the least.
    regards

  • I have deploy an EJB in weblogic 6.1,but how to use jsp to invoke the EJB's method?

    i have deploy an EJB in weblogic 6.1,but how to use jsp to invoke the EJB's method?
    thanks!

    You'd do something like:
    <%
    //vvv this part can potentially be done in initialization
    Context ctx = getInitialContext();
    BeanHome home =
    (BeanHome)PortableRemoteObject.narrow(ctx.lookup("the.jndi.name"),
    BeanHome.class);
    Bean b = home.create();
    //^^^
    Result r = b.invokeMethod();
    %>
    "toxin" <[email protected]> wrote in message
    news:3d2e95e5$[email protected]..
    >
    i have deploy an EJB in weblogic 6.1,but how to use jsp to invoke theEJB's method?
    thanks!

  • Deploying EJB on Weblogic

    Hi,
    Can anyone please send the step by step detailed instructions for deploying EJBs on Weblogic 6.1 app server. Please send it to my email id [email protected]
    Any supporting code will be greatly appreciated.
    Thanks.

    Why don't you check out the excellent instructions that BEA makes available from their support site:
    Specific to your current question:
    http://edocs.bea.com/wls/docs61/ejb/index.html
    and even more specific:
    http://edocs.bea.com/wls/docs61/ejb/deploy.html#1050867
    And more general info:
    http://edocs.bea.com/wls/docs61/index.html

  • Please give step by step details how can I deploy an EJB on weblogic 7

    Hi,
    I was working on Blazix Server for EJB.It is very esay to deploy bean on blazix
    server.Now I have to use weblogic 7. So please explain me step by step of deployment
    of EJB on weblogic. I don't know abcd of Weblogic Server.
    Thanking You,
    waiting for ur postive response,
    Mahendra Mahajan

    Hello Mahendra,
    There is no need to copy and paste all of the WebLogic documentation here. Just
    follow the steps in the documentation and you should be fine. If you run into
    a specific problem, we would be happy to assist you. Begin with the following
    EJB programming guide:
    http://edocs.bea.com/wls/docs81/ejb/index.html
    Best regards,
    Ryan LeCompte
    [email protected]
    http://www.louisiana.edu/~rml7669
    "Mahendra Mahajan" <[email protected]> wrote:
    >
    Hi,
    I was working on Blazix Server for EJB.It is very esay to deploy
    bean on blazix
    server.Now I have to use weblogic 7. So please explain me step by step
    of deployment
    of EJB on weblogic. I don't know abcd of Weblogic Server.
    Thanking You,
    waiting for ur postive response,
    Mahendra Mahajan

  • Deploying EJB in Weblogic 8.1 very very urgent

    Hi
    I had followed the logic Mr Mark has told me. But it did not work. Please
    the attached files.
    1. I had copied all of my class files into META-INF directory.
    my SampleObject.jar file contains as follows.
    jar -tvf SampleObject.jar gives
    .META-INF
    .Sample.class, SampleHome.class, SampleBean.class, SampleClient.class and
    ejb-jar.xml,
    weblogic-ejb-jar.xml files.
    I did not package my class files. instead i had deployed it in META-INF.
    Further I made one more attempt as follows.
    My server is called myserver.
    so I copied all of my class files, SampleObject.jar files into the following
    directory.
    C:\bea\user_projects\domains\mydomain\myserver\upload directory. This is the
    directory
    where weblogic copies the SampleObject.jar files.
    It did not work at all.
    Please help me.
    I am failing for the past five days . Treat this as very urgent.
    Thanks in advance.

    Murali:
    I suggest you start with something simple that works. And then go from
    there, modifing it one bit at a time and ensuring that it still works. Your
    jar tf output is all munched up so it is hard to follow. I suggest you
    start with
    $WL_HOME/samples/server/examples/src/examples/splitdir/helloWorldEar/
    See how it builds the ear and the ejb jars and go from there.
    You can do:
    ant ear
    and
    examine the contents from there.
    Alternatively you can use Workshop to build an EJB as well.
    PS. Your classes dont go into META-INF. But rather than go through the
    entire exercise of getting your app working I suggest as noted above you
    start from a known and modify.
    cheers
    mbg
    "Murali" <[email protected]> wrote in message
    news:3fc08518$[email protected]..
    >
    Hi
    I had followed the logic Mr Mark has told me. But it did not work.Please
    the attached files.
    1. I had copied all of my class files into META-INF directory.
    my SampleObject.jar file contains as follows.
    jar -tvf SampleObject.jar gives
    .META-INF
    .Sample.class, SampleHome.class, SampleBean.class, SampleClient.classand
    ejb-jar.xml,
    weblogic-ejb-jar.xml files.
    I did not package my class files. instead i had deployed it in META-INF.
    Further I made one more attempt as follows.
    My server is called myserver.
    so I copied all of my class files, SampleObject.jar files into thefollowing
    directory.
    C:\bea\user_projects\domains\mydomain\myserver\upload directory. This isthe
    directory
    where weblogic copies the SampleObject.jar files.
    It did not work at all.
    Please help me.
    I am failing for the past five days . Treat this as very urgent.
    Thanks in advance.

  • Challenge: call local ejb from remote ejb on weblogic 9.2

    Hi ALL,
    How do I call to local ejb from remote ejb object. The jar file is deployed on weblogic server 9.2, if you want get it http://geocities.yahoo.com.br/lindembe/BEAProject.jar and the source code are http://geocities.yahoo.com.br/lindembe/BEAProject.zip. It is a sample app with two ejb that works so good on JBOSS, JOnAS, but BEA Weblogic.....
    The complete problem you watch http://forum.java.sun.com/thread.jspa?threadID=768718&messageID=4387570#4387570
    or
    http://forums.bea.com/bea/message.jspa?messageID=600043148&tstart=0

    Your code in SigemFacadeBean should just do:
    InitialContext ctx = new InitialContext();
    when you lookup the local EJB. (This will work on all app servers. There's no need to put an app-server specific intial context factory in your code.)
    Also, you can remove the jndi-name setting for the local ejb from your weblogic-ejb-jar.xml. jndi-name is only applied to remote ejbs.
    -- Rob
    WLS Blog http://dev2dev.bea.com/blog/rwoollen/

Maybe you are looking for

  • CAN'T OPEN iTunes, get message "can't open Error (-50)?

    Can't open iTunes, get error message (-50)?

  • Can't use bind variable in a function

    This is a repost from my earlier post at URGENT: Problem creating the report using Procedure The problem is when I bind a variable in a function, I get REP-0002. Please look at the following steps to reproduce === set serveroutput on create or replac

  • Tooltips sometimes don't dissappear

    Tooltips occasionally don't dissappear when you move the mousepointer away from them. Most of the time it is possible to let them dissappear anyway by clicking the mouse on them, but sometimes even that doesn't work. I noticed this on a number of Win

  • Oracle Article ID

    Hi, Can anyone give me the oracle article ID in which it is mentioned as that if we write fast formula for validating hours in element and give any message then it will give message in log file while running 'validate for BEE' or ' Transfer to BEE' p

  • Scanner can't read CTRL-I?

    Hi All, I'm trying to read input in from the command line using Scanner. I need to be able to read both Strings and control characters. I'm only expecting certain kinds of input so I have an array of Strings and control characters that correspond to