EJBs in classpath
Hi!
Is it possible to make the JEE container deploy EJBs in JARs available in the classpath of an EJB module? For example:
common.jar
- /com/mycompany/MyEJB1.class
- /com/mycompany/MyEJB2.class
myejbmodule.jar (references stuff in common.jar)
- /com/mycompany/MyEJB3.class
- /com/mycompany/MyEJB4.class
In this instance, I'd like to include "myejbmodule.jar" as an EJB-module in the app, but I'd like to avoid deploying "common.jar" as an EJB-module. Still, I'd like all EJBs to be deployed. Is this possible? Using JBoss 4.2.2.
Thanks in advance,
Nille
Copy the Ejb jar file to the applications dir.
Similar Messages
-
Redeployment - EJBs on Classpath
I'm using wls 8.1. I have an EAR in which several EJB are loaded from the system
classpath. After redeployment, these EJB's are not available.
java.rmi.NoSuchObjectException: Bean is already undeployed
I would have expected not to be able to affect any change in such EJBs via redeployment,
but that redeployment would be successful. The console shows that redeployment
for these EJBs is successful (i.e., status: active). Do these classes have to
be off the classpath for redeployment to work properly? Why doesn't the console
report their status correctly? Thanks...
..BrianRob Woollen <[email protected]> wrote:
Brian wrote:
Rob Woollen <[email protected]> wrote:
I believe you are right. Unfortunately the calling application isnot really
a client but the security provider. So, I've put everything our realmcode needs
on the server's classpath. I've also tried taking it off the classpathand putting
it in the providers.jar, but no joy. In that case, a ClassCast exceptionis thrown
on the narrow. So, my problem seems to be that I don't know how tohandle the
situation where my login module makes EJB calls. Is there any wayto refresh
the providers.jar?Does your security provider cache the EJB stub? I believe if you
re-lookup the home in JNDI and get a new stub that it should work fine
without refreshing the providers.jar (assuming the new EJB didn't change
the interface.)
Yes, I am (was) caching the stub. Yes, re-looking up the home cures the problem.
Thanks.
-- Rob
Thanks...
..Brian
-- Rob
I would have expected not to be able to affect any change in such
EJBs
via redeployment,
but that redeployment would be successful. The console shows that
redeployment
for these EJBs is successful (i.e., status: active). Do these classeshave to
be off the classpath for redeployment to work properly? Why doesn'tthe console
report their status correctly? Thanks...
..Brian -
Hi,
I have a burning question regarding EJBs and classpaths.
Here is my situation:
- My application uses EJBs, Servlets and JSP pages
- My EJB remote interfaces and implementation classes extend common,
abstract base classes
- My EJB implementation classes use several utility classes, which are
also used by my servlets.
- Each EJB is deployed in a separate JAR file
The question I have is which classes should be included in the EJB JAR
files.
I'd like to put just the EJB implementation class in the EJB JAR, and
put everything else in a common JAR that is placed in my WEB-INF/lib
folder and shared by the rest of the application. However, if I do
that, Weblogic won't load the EJBs because it tries to do so before it
deploys my web app, and hence before it adds the JARs in the
WEB-INF/lib folder to its classpath.
I can explicitly add my jar to the Weblogic classpath on the
commandline (weblogic.class.path property). Now my EJBs load. However,
my servlets become unable to load any classes from any jar in
WEB-INF/lib. I read something about it being a bad idea to include a
jar from WEB-INF/lib in the classpath, so I'm probably seeing that
problem.
The third option is to include all the dependent classes in my EJB
jars themselves, in addition to deploying them in WEB-INF/lib. This
works, but it bothers me that there are multiple copies of the same
class files lying around.
I'm sure I'm not the first developer who's written an EJB that shares
classes with a servlet or JSP page. What's the proper way to do this?
Thanks.Use a ClassPath entry in your EJB jar module MANIFEST.MF file
Mark Cordobal
[email protected] (Frank LaRosa) wrote:
Hi,
I have a burning question regarding EJBs and classpaths.
Here is my situation:
- My application uses EJBs, Servlets and JSP pages
- My EJB remote interfaces and implementation classes extend common,
abstract base classes
- My EJB implementation classes use several utility classes, which are
also used by my servlets.
- Each EJB is deployed in a separate JAR file
The question I have is which classes should be included in the EJB JAR
files.
I'd like to put just the EJB implementation class in the EJB JAR, and
put everything else in a common JAR that is placed in my WEB-INF/lib
folder and shared by the rest of the application. However, if I do
that, Weblogic won't load the EJBs because it tries to do so before it
deploys my web app, and hence before it adds the JARs in the
WEB-INF/lib folder to its classpath.
I can explicitly add my jar to the Weblogic classpath on the
commandline (weblogic.class.path property). Now my EJBs load. However,
my servlets become unable to load any classes from any jar in
WEB-INF/lib. I read something about it being a bad idea to include a
jar from WEB-INF/lib in the classpath, so I'm probably seeing that
problem.
The third option is to include all the dependent classes in my EJB
jars themselves, in addition to deploying them in WEB-INF/lib. This
works, but it bothers me that there are multiple copies of the same
class files lying around.
I'm sure I'm not the first developer who's written an EJB that shares
classes with a servlet or JSP page. What's the proper way to do this?
Thanks. -
Hello Developers!
I deployed my ejb to OAS4081. I call that
from JDeveloper so it good. But when I try
to call from applet in IExpl5 I can't
instantiate the ORB. I've got a com.ms.security.SecurityException : oracle.oas.orb.CORBA.ORB.init
I coded the CLASSPATH(oasoorb(yoj),client,
ejbapi...) perfectly, I think.
If anybody could help, please...
Thanx!Hi there,
I saw someone on this group had a problem to locate proper classpath
to call EJB from JSP. I thought if you call EJB from classpath, you are
calling the bean. But you loss all the EJB functions. To be able to utilize
EJB features like object pooling. You need to call it from Weblogic server
using url/jndi, not from the jar directly.
Any comment? Am I right?
BTW, my question about calling EJB from JSP means calling through URL,
not a local path.
Thank you
>-------------------------------------------------------------------->
Jim wrote in message <[email protected]>...
>Hi there,
> Can I call EJB from JSP? Is there a particular security setting or
>concern for Weblogic? Is there an coding example?
>
>Thank you
>
>
-
We are trying to migrate jdk 1.4 (wl 8.1) to jdk1.5 (wl 9.1), when we complie Java source code and build EJB ( using Ant/build.xml), we got following error and can not proceed any further.
[java] /home/fipdev/DeltaOne/newproductimport/ejbcgen/com/leh/deltaone/ejb/business/newproductimport/DONewProductImportAccessor_41o8gs_Impl.java:12: cannot access com.leh.deltaone.ejb.business.newproductimport.DONewProductImportAccessorBean
[java] bad class file: /home/fipdev/DeltaOne/newproductimport/ejbcgen/com/leh/deltaone/ejb/business/newproductimport/DONewProductImportAccessorBean.class
[java] class file has wrong version 49.0, should be 48.0
[java] Please remove or make sure it appears in the correct subdirectory of the classpath.
[java] extends DONewProductImportAccessorBean
[java] ^
[java] 1 error
[java] Exec failed .. exiting
[java] Java Result: 1
49.0 means using jdk1.5 and 48.0 means using jdk1.4, we do use jdk 1.5 in our development server and could verify by
bash-2.03$ java -version
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Server VM (build 1.5.0_06-b05, mixed mode)
do you know why?
Michael ZouMuch appreciated your reply, I used both Windows and Unix system and Ant to build EJB, both CLASSPATH and PATH are configured to Jdk 1.5 version.
CLASSPATH=C:\bea\jdk150_06\lib and PATH=C:\bea\jdk150_06\bin, and verify that it is 1.5 not 1.4 version.
C:\Eclipse_WorkSpace\DeltaOne\ant>java -version
java version "1.5.0_16"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b02)
Java HotSpot(TM) Client VM (build 1.5.0_16-b02, mixed mode, sharing)
but still getting error, any an idea? thank you again.
Michael -
XDoclet and ejb-jar.xml - No Entity tags?
build.xml
<?xml version="1.0" encoding="UTF-8"?>
<project name="XDoclet" default="ejbdoclet">
<property file="build.properties"/>
<target name="init">
<property name="dir" value="G:\JAVA Tools"/>
<property name="lib.dir" value="lib"/>
<!-- library/jar path -->
<property name="xdoclet.jar.path" value="${dir}\XDoclet\lib\xdoclet.jar"/>
<property name="log4j.jar.path" value="${dir}\XDoclet\samples\lib\log4j.jar"/>
<property name="ant.jar.path" value="${dir}\ANT\lib\ant.jar"/>
<property name="src.dir" value="src"/>
<property name="generated.src.dir" value="XDoclet/gen-src-code"/>
<property name="web.dir" value="${src.dir}/web"/>
<property name="generated.java.dir" value="${generated.src.dir}/java"/>
<property name="config.dir" value="config"/>
<property name="build.dir" value="XDoclet/build"/>
<property name="dist.dir" value="XDoclet/dist"/>
<property name="build.compiler" value="modern"/>
<path id="project.class.path">
<fileset dir="${lib.dir}">
<include name="**/*.jar"/>
</fileset>
<!-- append the external classpath lastly -->
<pathelement path="${java.class.path};${log4j.jar.path}"/>
</path>
</target>
<!-- Prepare -->
<target name="prepare" depends="init">
<mkdir dir="${build.dir}"/>
<mkdir dir="${build.dir}/ejb"/>
<mkdir dir="${build.dir}/ejb/META-INF"/>
<mkdir dir="${build.dir}/web"/>
<mkdir dir="${build.dir}/web/WEB-INF"/>
<mkdir dir="${build.dir}/web/WEB-INF/tlds"/>
<mkdir dir="${build.dir}/web/WEB-INF/classes"/>
<mkdir dir="${build.dir}/j2ee"/>
<mkdir dir="${build.dir}/j2ee/META-INF"/>
<mkdir dir="${build.dir}/jmx"/>
<mkdir dir="${dist.dir}"/>
<mkdir dir="${generated.src.dir}"/>
<mkdir dir="${generated.java.dir}"/>
<echo message="XDoclet Path = ${xdoclet.jar.path}"/>
<echo message="Log4J Path = ${log4j.jar.path}"/>
<echo message="Ant Path = ${ant.jar.path}"/>
<echo message="ClassPath = ${java.class.path}"/>
<property name="cp" refid="project.class.path"/>
<echo message="CLASSPATH/REF ID:${cp}"/>
<echo message="base dir = ${basedir}/${src.dir}"/>
</target>
<target name="delete" >
<echo message = "Deleting directories"/>
<delete dir="${build.dir}"/>
<delete dir="${build.dir}/ejb"/>
<delete dir="${build.dir}/ejb/META-INF"/>
<delete dir="${build.dir}/web"/>
<delete dir="${build.dir}/web/WEB-INF"/>
<delete dir="${build.dir}/web/WEB-INF/tlds"/>
<delete dir="${build.dir}/web/WEB-INF/classes"/>
<delete dir="${build.dir}/j2ee"/>
<delete dir="${build.dir}/j2ee/META-INF"/>
<delete dir="${build.dir}/jmx"/>
<delete dir="${dist.dir}"/>
<delete dir="${generated.src.dir}"/>
<delete dir="${generated.java.dir}"/>
</target>
<!-- Run EJBDoclet -->
<target name="ejbdoclet" depends="prepare">
<taskdef name="ejbdoclet"
classname="xdoclet.ejb.EjbDocletTask"
classpath="${java.class.path};${log4j.jar.path};${ant.jar.path};${xdoclet.jar.path} "/>
<ejbdoclet sourcepath="${src.dir}"
destdir="${generated.java.dir}"
classpathref="project.class.path"
excludedtags="@version,@author"
ejbspec="2.0"
>
<fileset dir="${src.dir}">
<include name="**/*EJB.java"/>
</fileset>
<dataobject/>
<!-- <localinterface/>
<localhomeinterface/> -->
<remoteinterface/>
<homeinterface/>
<entitypk/>
<!-- <entitycmp/> -->
<deploymentdescriptor destdir="${build.dir}/ejb/META-INF" validatexml="true"/>
<jboss version="2.4" xmlencoding="UTF-8" validatexml="true" typemapping="Hypersonic
SQL" datasource="java:/DefaultDS" destdir="${build.dir}/ejb/META-INF"/>
<!--
<weblogic xmlencoding="UTF-8" destdir="${build.dir}/ejb/META-INF" validatexml="true"/>
<webSphere destdir="${build.dir}/ejb/META-INF" />
<orion/>
<apachesoap destdir="${build.dir}/web"/>
-->
<!--
Have struts form objects generated based on entity beans'
data objects. Will require struts.jar to compile.
<strutsform />
-->
</ejbdoclet>
</target>
</project>
My Session Bean:
package com.uniserv.comn.controller.ejb.session.terminalfacade;
* <p>Title: </p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2003</p>
* <p>Company: </p>
* @author unascribed
* @version 1.0
import javax.ejb.*;
import java.util.*;
import com.uniserv.comn.util.*;
import com.uniserv.comn.model.*;
import com.uniserv.comn.controller.ejb.entity.tenderconfig.*;
public class TerminalSessionFacadeEJB implements SessionBean {
private SessionContext ctx = null;
private ServiceLocator serviceLocator = null;
public TerminalSessionFacadeEJB() throws ServiceLocatorException {
try {
serviceLocator = ServiceLocator.getInstance();
} catch (Exception e) {
System.out.println("TerminalSessionFacade Exception : " + e.getMessage());
* Adds an tenderConfig record
* @param tenderConfigVO TenderConfig's Value Object
* @return boolean true if successful, false if not
public boolean addTenderConfig(TenderConfigVO tenderConfigVO) {
System.out.println("TerminalSessionFacadeEJB.addTenderConfig - START");
boolean blnRet = false;
try {
LocalTenderConfigHome home = (LocalTenderConfigHome)
serviceLocator.getLocalHome(ServiceLocator.Services.TENDERCONFIG);
LocalTenderConfig local = null;
try {
TenderConfigPK pk
= new TenderConfigPK(tenderConfigVO.getTndrID(), tenderConfigVO.getTndrCfgName());
local = home.findByPrimaryKey(pk);
} catch (Exception e) {
System.out.println(e.getMessage());
} finally {
if (local == null) {
home.create(tenderConfigVO);
blnRet = true;
} else {
blnRet = false;
} catch (Exception e) {
System.out.println("Error in TerminalSessionFacadeEJB.addTenderConfig "
+ "method (Exception) : "
+ e.getMessage());
} finally {
System.out.println("Returned value : " + blnRet);
System.out.println("TerminalSessionFacadeEJB.addTenderConfig - END");
return blnRet;
public void setSessionContext(SessionContext parm1) throws javax.ejb.EJBException, java.rmi.RemoteException {
this.ctx = parm1;
public void ejbRemove() throws javax.ejb.EJBException, java.rmi.RemoteException
public void ejbActivate() throws javax.ejb.EJBException, java.rmi.RemoteException
public void ejbPassivate() throws javax.ejb.EJBException, java.rmi.RemoteException
public void ejbCreate() throws javax.ejb.EJBException
My Entity Bean:
package com.uniserv.comn.controller.ejb.entity.tenderconfig;
* @ejb.bean
* type="CMP"
* cmp-version="2.x"
* name="TenderConfigEJB"
* schema="TenderConfig"
* view-type="local"
import javax.ejb.*;
import com.uniserv.comn.model.*;
public abstract class TenderConfigEJB implements EntityBean{
private EntityContext ctx = null;
* @ejb.pk
public abstract int getTndrID();
public abstract void setTndrID(int iTndrID);
* @ejb.pk
public abstract String getTndrCfgName();
public abstract void setTndrCfgName(String strTndrCfgName);
public abstract int getTndrType();
public abstract void setTndrType(int iTndrType);
public abstract String getTndrCfgValue();
public abstract void setTndrCfgValue(String strTndrCfgValue);
public abstract String getTndrCfgDataType();
public abstract void setTndrCfgDataType(String strTndrCfgDataType);
public abstract String getTndrCfgDesc();
public abstract void setTndrCfgDesc(String strTndrCfgDesc);
public TenderConfigVO getTenderConfigVO() {
TenderConfigVO tenderConfigVO = new TenderConfigVO();
tenderConfigVO.setTndrID(this.getTndrID());
tenderConfigVO.setTndrCfgName(this.getTndrCfgName());
tenderConfigVO.setTndrType(this.getTndrType());
tenderConfigVO.setTndrCfgValue(this.getTndrCfgValue());
tenderConfigVO.setTndrCfgDataType(this.getTndrCfgDataType());
tenderConfigVO.setTndrCfgDesc(this.getTndrCfgDesc());
return tenderConfigVO;
public void setTenderConfigVO(TenderConfigVO tenderConfigVO) {
this.setTndrID(tenderConfigVO.getTndrID());
this.setTndrCfgName(tenderConfigVO.getTndrCfgName());
this.setTndrType(tenderConfigVO.getTndrType());
this.setTndrCfgValue(tenderConfigVO.getTndrCfgValue());
this.setTndrCfgDataType(tenderConfigVO.getTndrCfgDataType());
this.setTndrCfgDesc(tenderConfigVO.getTndrCfgDesc());
* Constructor
public TenderConfigEJB() {
* ejbCreate callback method
* @return int
public TenderConfigPK ejbCreate(TenderConfigVO tenderConfigVO)
throws CreateException {
this.setTenderConfigVO(tenderConfigVO);
return null;
* ejbPostCreate
* @param TerminalConfigTypeVO
public void ejbPostCreate(TenderConfigVO tenderConfigVO) {
* setEntityContext callback method
public void setEntityContext(EntityContext ctx) {
this.ctx = ctx;
* unsetEntityContext callback method
public void unsetEntityContext() {
this.ctx = null;
* ejbActivate callback method
public void ejbActivate() {
* ejbPassivate callback method
public void ejbPassivate() {
* ejbLoad callback method
public void ejbLoad() {
* ejbRemove callback method
public void ejbRemove() {
* ejbStore callback method
public void ejbStore() {
But the generated ejb-jar.xml only contains
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
<ejb-jar>
<description>No Description.</description>
<display-name>Generated by XDoclet</display-name>
<enterprise-beans>
<!-- Session Beans -->
<session>
<description><![CDATA[No Description.]]></description>
<ejb-name>com.uniserv.comn.controller.ejb.session.terminalfacade.TerminalSessionFacade</ejb-name>
<home>com.uniserv.comn.controller.ejb.session.terminalfacade.TerminalSessionFacadeHome</home>
<remote>com.uniserv.comn.controller.ejb.session.terminalfacade.TerminalSessionFacade</remote>
<ejb-class>com.uniserv.comn.controller.ejb.session.terminalfacade.TerminalSessionFacadeEJB</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
<!--
To add session beans that you have deployment descriptor info for, add
a file to your merge directory called session-beans.xml that contains
the <session></session> markup for those beans.
-->
<!-- Entity Beans -->
<!--
To add entity beans that you have deployment descriptor info for, add
a file to your merge directory called entity-beans.xml that contains
the <entity></entity> markup for those beans.
-->
<!-- Message Driven Beans -->
<!--
To add message driven beans that you have deployment descriptor info for, add
a file to your merge directory called message-driven-beans.xml that contains
the <message-driven></message-driven> markup for those beans.
-->
</enterprise-beans>
<!-- Relationships -->
<!-- Assembly Descriptor -->
<assembly-descriptor>
<!-- finder permissions -->
<!-- transactions -->
<!-- finder transactions -->
</assembly-descriptor>
</ejb-jar>
this ejb-jar.xml only contains entries for session beans? where did the entries for entity beans went?Ive written XDoclet tags for the Entity Bean as what ive posted above....help!!!you comment the generation of CMP entity beans out :
build.xml:
replace
<!-- <entitycmp/> -->
with
<entitycmp/>i've already removed the comments of the tag <entitycmp> and yet the resulting ejb-jar.xml contains no <entity> tags....i'm just wondering how can i include the generation of entity tags (not only session tags) in the resulting ejb-jar.xml
<ejb-jar>
<description>No Description.</description>
<display-name>Generated by XDoclet</display-name>
<enterprise-beans>
<!-- Session Beans -->
<session>
<description><![CDATA[No Description.]]></description>
<ejb-name>com.uniserv.comn.controller.ejb.session.terminalfacade.TerminalSessionFacade</ejb-name>
<home>com.uniserv.comn.controller.ejb.session.terminalfacade.TerminalSessionFacadeHome</home>
<remote>com.uniserv.comn.controller.ejb.session.terminalfacade.TerminalSessionFacade</remote>
<ejb-class>com.uniserv.comn.controller.ejb.session.terminalfacade.TerminalSessionFacadeEJB</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
<!--
To add session beans that you have deployment descriptor info for, add
a file to your merge directory called session-beans.xml that contains
the <session></session> markup for those beans.
-->
<!-- Entity Beans -->
<!--
To add entity beans that you have deployment descriptor info for, add
a file to your merge directory called entity-beans.xml that contains
the <entity></entity> markup for those beans.
-->
<!-- Message Driven Beans -->
<!--
To add message driven beans that you have deployment descriptor info for, add
a file to your merge directory called message-driven-beans.xml that contains
the <message-driven></message-driven> markup for those beans.
-->
</enterprise-beans>
<!-- Relationships -->
<!-- Assembly Descriptor -->
<assembly-descriptor>
<!-- finder permissions -->
<!-- transactions -->
<!-- finder transactions -->
</assembly-descriptor>
</ejb-jar> -
Jserv.properties crash APACHE
Hi:
After several tests i denoted that THIS SPECIFIC ENTRY IN jserv.properties crash the jserv :
wrapper.classpath=D:\ORACLE\iSuites\panama\lib\panama.zip
this entry it's in jserv.properties and crash the jserv and i get this error on apache error_log:
[Thu May 02 15:39:29 2002] [warn] OPM: EW: Process proteus.adm.ipb.pt:2364 (pid:1980) died, restarting.
[Thu May 02 15:39:34 2002] [error] OPM: EW: Fails to ping process with pid:2260.
... repeated fails
I have:
windows 2000 server
oracle 9i DB NT
oracle 9ias 1.0.2.2.2a
i've patched oracle 9ias with oracle 9i rdbms patch 8.1.7.3
i've patched oracle 9ias portal with patch 3.0.9.8.2
i've followed instructions in A86701 step by step to configure wireless
Anyone HERE HELP ??* Please check if you've set all the zip files for the panama environment
* Check jdk installation (reinstall it if you are unsure about the installation) and configure it in your system environment.
* also check your system environment for the panama dir and the wireless installation.
* Check if the following lines are in the jsev.properties file:
wrapper.classpath=C:\jdk131\lib\dt.jar
wrapper.classpath=C:\jdk131\lib\tools.jar
wrapper.classpath=C:\jdk131\jre\lib\rt.jar
# wrapper.classpath=C:\ORACLE\iSuites\Apache\jdk\jre\lib\rt.jar
# wrapper.classpath=C:\ORACLE\iSuites\Apache\jdk\lib\tools.jar
wrapper.classpath=C:\ORACLE\iSuites\Apache\Jserv\ApacheJServ.jar
wrapper.classpath=C:\ORACLE\iSuites\Apache\Jserv\dms2Server.jar
wrapper.classpath=C:\ORACLE\iSuites\Apache\Jsdk\lib\jsdk.jar
# The following classpath entries are required to run ASWE (added by TW 25 10 01)
wrapper.classpath=C:\Oracle\iSuites\panama\server\classes
wrapper.classpath=C:\Oracle\iSuites\panama\lib\caboshare-opt.zip
wrapper.classpath=C:\Oracle\iSuites\panama\lib\classes12.zip
wrapper.classpath=C:\Oracle\iSuites\panama\lib\client.zip
wrapper.classpath=C:\Oracle\iSuites\panama\lib\jewt-opt-4_0_14.zip
wrapper.classpath=C:\Oracle\iSuites\panama\lib\marlin-opt.zip
wrapper.classpath=C:\Oracle\iSuites\panama\lib\ocelot-opt.zip
wrapper.classpath=C:\Oracle\iSuites\panama\lib\panama.zip
wrapper.classpath=C:\Oracle\iSuites\panama\lib\panama_core.zip
wrapper.classpath=C:\Oracle\iSuites\panama\lib\panama_papz.zip
wrapper.classpath=C:\Oracle\iSuites\panama\lib\panama_portal.zip
wrapper.classpath=C:\Oracle\iSuites\panama\lib\ojsp.jar
wrapper.classpath=C:\Oracle\iSuites\panama\lib\servlet.jar
wrapper.classpath=C:\Oracle\iSuites\panama\lib\jndi.jar
wrapper.classpath=C:\Oracle\iSuites\panama\lib\xmlparserv2.jar
wrapper.classpath=C:\Oracle\iSuites\panama\lib\server.zip
wrapper.classpath=C:\Oracle\iSuites\panama\lib\share-opt-1_1_7.zip
wrapper.classpath=C:\Oracle\iSuites\panama\lib\tecate-opt.zip
wrapper.classpath=C:\Oracle\iSuites\panama\lib\sax2.jar
# The following classpath entries were added to run Mail directory (added by TW 07 11 01)
wrapper.classpath=C:\Oracle\iSuites\panama\lib\activation.jar
wrapper.classpath=C:\Oracle\iSuites\panama\lib\ldap.jar
wrapper.classpath=C:\Oracle\iSuites\panama\lib\ldapbp.jar
wrapper.classpath=C:\Oracle\iSuites\panama\lib\mail.jar
wrapper.classpath=C:\Oracle\iSuites\panama\lib\ompim.jar
wrapper.classpath=C:\Oracle\iSuites\panama\lib\pop3.jar
wrapper.classpath=C:\Oracle\iSuites\panama\lib\providerutil.jar
# The following classpath entries are required to run EJBs
wrapper.classpath=C:\ORACLE\iSuites\lib\aurora_client.jar
wrapper.classpath=C:\ORACLE\iSuites\lib\vbjorb.jar
wrapper.classpath=C:\ORACLE\iSuites\lib\vbjapp.jar
# An environment name with value passed to the JVM
# Syntax: wrapper.env=[name]=[value] (String)
# Default: NONE on Unix Systems
# SystemDrive and SystemRoot with appropriate values on Win32 systems
wrapper.env=PATH=C:\ORACLE\iSuites\bin -
No name found Exception when running entity client program?
Hi
I am deployed an bean managed Entity bean successfully. And also i created one table in SQL . I am usung weblogic server 8.1 . while running Bean managed entity bean client program it throws no name found exception.please guide me how to run a entity client program. i configured JDBC driver for SQL successfully.
Regards
Priya.MHi Priya,
Before running the ejb client we need to follow the steps as given below.
1)set the weblogic environment using the setWLSEnv
2)set the classpath for ejb(home,remote and bean).
3)run the client program
Note:To set the classpath for the ejb(suppose if we placed the ejb's in ejb folder)
set classpath=d:\ejb;.; %classpath%
Regards
Anilkumar kari -
Have anyone made a wsgen task in a build.xml file for use with an original Ant-distribution?
(not using org.apache.tools.ant.Main located in weblogic.jar)
I get a non-informing build error when running the wsgen-task. (The ejbc-task
completes successfully).
java.lang.NoSuchMethodError
at weblogic.apache.xerces.jaxp.DocumentBuilderImpl.<init>(DocumentBuilderImpl.java:136)
at weblogic.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumen...bla
bla...
(Project.java:510)
at org.apache.tools.ant.Main.runBuild(Main.java:421)
at org.apache.tools.ant.Main.main(Main.java:149)
If anyone could tell me what to do - that would really make my day(!)
Regards,
Henning StorhaugThere is a little bit of situation using taskdef and a classpath from inside
a build.xml. The problem is that ant creates a custom classloader (which
loads classes the same way ant finds files, ie. replacing /->\, :->;, using
the correct basedir, etc. etc.). Ant uses this classloader to load the class
implementing the task.
Mainly this creates two problems:
- This classloader does not 100% implement the correct protocol of a
classloader, especially when it comes to finding resources. (no disrespect
intended, ant is a great tool!)
- Many classes in Weblogic is not really used to being loaded from a
classloader and doesn't behave very well. (for example: using the
system-classloader directly, assuming that they are located at the
java.system.classpath etc. etc)
This makes it almost impossible to use any weblogic-tasks without loading
weblogic-classes from the system-classpath. And that is why the "trick of
the external build.xml" works, because antcall starts the new ant with a
system-classpath including weblogic.jar.
Don't really now what the best solution to this is. I think that BEA has to
be better writing code that behaves nicer to custom classloaders, and I
think the ant team needs to fix their class-loader a little better.
(especially in respect to resources)
In the meantime use the "external build.xml"-trick or use the ant included
with weblogic.
"Chris" <[email protected]> wrote in message
news:[email protected]...
>
We are actually using Ant 1.4 with Weblogic 6.1 and the wsgen tasksuccessfully..
although I haven't tested myself , I was told that there might be problemsif
the wsgen task is run from the same build.xml file (which might be thereason
for your problem as well)... so what I have done is created a second buildxml
file that includes the wsgen task (and some staging tasks) and I call itfrom
my main build.xml (using antcall).
A couple of things to note is that you have to make sure that you put antin front
of the weblogic.jar in the classpath.. Additionally (and you were rightabout
this) you have to use the taskdef to define the wsgen task as ant will notfind
it by itself..
Here is a sample of the wsgen task I use.
<wsgendestpath="${dir.dsn-build}/webservices_staging/${module.name.Report}WS.ear"
>
context="/${module.name.Report}"
host="localhost"
port="8081"
protocol="http"
webapp="${module.name.Report}-web-services.war">
<rpcservices path="${dir.ear_staging}/ReportEntryEJB.jar">
<rpcservice bean="ReportEntry" uri="/${module.name.Report}uri"/>
</rpcservices>
</wsgen>
"Simon Spruzen" <[email protected]> wrote:
I tried this, and defined a taskdef to allow standalone ant to locate
the WLS ant
wsgen task:
<!-- wsgen - build web services -->
<taskdef name="wsgen" classname="weblogic.ant.taskdefs.ejb.WSGen">
<classpath refid="bea.class.path"/>
</taskdef>
bea.class.path was defined to ensure that weblogic.jar came first.
However, I got a curious error when running wsgen target - can't
remember,
and
don't have, the full details - but it involved a message along the lines
of something
"...violating loader constraints...".
So I just gave up and used the version of Ant that ships with WLS 6.1,
and it
works and I am happy and content.
(But you're stuffed if you want to move to ant 1.4)
"Henning Storhaug" <[email protected]> wrote:
To be a bit more specific:
The wsgen ant-task runs when using the ant-distribution within
weblogic.jar,
but
not using the jakarta-ant-1.3 distribution. I've checked the versions,
and they
are the same.
If you need more info, please ask. -
Client program not compiling?
Hi
I am using Weblogic server 8.1 for EJB applications.
I deployed simple session ejb program,i successfully deployed ,but client program not compiling it doesn't take home and remote interface.
How to set classpath for client program,before compiling a client.
for example i had client in this dir
D:\ejb\
ejbclient.jar
client.java
byeHi,
Before running the ejb client we need to follow the steps as given below.
1)set the weblogic environment using the setWLSEnv
2)set the classpath for ejb(home,remote and bean).
3)run the client program
Note:To set the classpath for the ejb
set classpath=d:\ejb;.; %classpath%
Regards
Anilkumar kari -
[wsgen] Error at line:9 col:12 ':' Already got a ':' in name
Getting the following error trying to generate a web service.
Any ideas? Thanks
WebLogic Server 6.1 SP1 09/18/2001 14:28:44 #138716
WebLogic XML Module 6.1 SP1 09/18/2001 14:43:02 #138716
<taskdef name="wsgen" classname="weblogic.ant.taskdefs.ejb.WSGen" classpath="${prj.classpath.javac};${wls.home.dir}/lib/xmlx.jar;"
/>
<target name="create_ws" depends="create_ear">
<wsgen basepath="${build.home.dir}/${Name}.ear" destpath="${build.home.dir}/${Name}WS.ear"
port="80" context="/websrv" protocol="http"
classpath="${build.app.dir}/Test.jar" >
<rpcservices module="${Name}Ejb.jar">
<rpcservice bean="ejb/TestHome" uri="/Test"/>
</rpcservices>
</wsgen>
</target>
create_ws:
[wsgen] Error at line:9 col:12 ':' Already got a ':' in name
[wsgen] at weblogic.xml.babel.baseparser.SAXElementFactory.createSAXParseException(SAXElementFactory.java:60)
[wsgen] at weblogic.xml.babel.parsers.StreamParser.<init>(StreamParser.java:45)
[wsgen] at weblogic.xml.babel.parsers.BabelXMLEventStream.startDocument(BabelXMLEventStream.java:28)
[wsgen] at weblogic.soap.WebServiceProxy.getXMLStream(WebServiceProxy.java:600)
[wsgen] at weblogic.soap.WebServiceProxy.getXMLStream(WebServiceProxy.java:577)
[wsgen] at weblogic.soap.WebServiceProxy.getServiceFrom(WebServiceProxy.java:225)
[wsgen] at weblogic.ant.taskdefs.ejb.WSGenHelper.writeClientJar(WSGenHelper.java:1125)
[wsgen] at weblogic.ant.taskdefs.ejb.WSGenHelper.writeWSDL(WSGenHelper.java:1285)
[wsgen] at weblogic.ant.taskdefs.ejb.WSGenHelper.saveDescriptors(WSGenHelper.java:1418)
[wsgen] at weblogic.ant.taskdefs.ejb.WSGenHelper.output(WSGenHelper.java:1486)
[wsgen] at weblogic.ant.taskdefs.ejb.WSGenHelper.doit(WSGenHelper.java:1520)
[wsgen] at weblogic.ant.taskdefs.ejb.WSGen.execute(WSGen.java:93)
[wsgen] at org.apache.tools.ant.Task.perform(Task.java:217)
[wsgen] at org.apache.tools.ant.Target.execute(Target.java:184)
[wsgen] at org.apache.tools.ant.Target.performTasks(Target.java:202)
[wsgen] at org.apache.tools.ant.Project.executeTarget(Project.java:601)
[wsgen] at org.apache.tools.ant.Project.executeTargets(Project.java:560)
[wsgen] at org.apache.tools.ant.Main.runBuild(Main.java:454)
[wsgen] at org.apache.tools.ant.Main.start(Main.java:153)
[wsgen] at org.apache.tools.ant.Main.main(Main.java:176)Getting the following error trying to generate a web service.
Any ideas? Thanks
WebLogic Server 6.1 SP1 09/18/2001 14:28:44 #138716
WebLogic XML Module 6.1 SP1 09/18/2001 14:43:02 #138716
<taskdef name="wsgen" classname="weblogic.ant.taskdefs.ejb.WSGen" classpath="${prj.classpath.javac};${wls.home.dir}/lib/xmlx.jar;"
/>
<target name="create_ws" depends="create_ear">
<wsgen basepath="${build.home.dir}/${Name}.ear" destpath="${build.home.dir}/${Name}WS.ear"
port="80" context="/websrv" protocol="http"
classpath="${build.app.dir}/Test.jar" >
<rpcservices module="${Name}Ejb.jar">
<rpcservice bean="ejb/TestHome" uri="/Test"/>
</rpcservices>
</wsgen>
</target>
create_ws:
[wsgen] Error at line:9 col:12 ':' Already got a ':' in name
[wsgen] at weblogic.xml.babel.baseparser.SAXElementFactory.createSAXParseException(SAXElementFactory.java:60)
[wsgen] at weblogic.xml.babel.parsers.StreamParser.<init>(StreamParser.java:45)
[wsgen] at weblogic.xml.babel.parsers.BabelXMLEventStream.startDocument(BabelXMLEventStream.java:28)
[wsgen] at weblogic.soap.WebServiceProxy.getXMLStream(WebServiceProxy.java:600)
[wsgen] at weblogic.soap.WebServiceProxy.getXMLStream(WebServiceProxy.java:577)
[wsgen] at weblogic.soap.WebServiceProxy.getServiceFrom(WebServiceProxy.java:225)
[wsgen] at weblogic.ant.taskdefs.ejb.WSGenHelper.writeClientJar(WSGenHelper.java:1125)
[wsgen] at weblogic.ant.taskdefs.ejb.WSGenHelper.writeWSDL(WSGenHelper.java:1285)
[wsgen] at weblogic.ant.taskdefs.ejb.WSGenHelper.saveDescriptors(WSGenHelper.java:1418)
[wsgen] at weblogic.ant.taskdefs.ejb.WSGenHelper.output(WSGenHelper.java:1486)
[wsgen] at weblogic.ant.taskdefs.ejb.WSGenHelper.doit(WSGenHelper.java:1520)
[wsgen] at weblogic.ant.taskdefs.ejb.WSGen.execute(WSGen.java:93)
[wsgen] at org.apache.tools.ant.Task.perform(Task.java:217)
[wsgen] at org.apache.tools.ant.Target.execute(Target.java:184)
[wsgen] at org.apache.tools.ant.Target.performTasks(Target.java:202)
[wsgen] at org.apache.tools.ant.Project.executeTarget(Project.java:601)
[wsgen] at org.apache.tools.ant.Project.executeTargets(Project.java:560)
[wsgen] at org.apache.tools.ant.Main.runBuild(Main.java:454)
[wsgen] at org.apache.tools.ant.Main.start(Main.java:153)
[wsgen] at org.apache.tools.ant.Main.main(Main.java:176) -
Weblogic 8.1 and exploded EAR application
I have been trying to deploy my eclipse j2ee project in exploded way in weblogic 8.1
I have standard folder structure,
<APP_ROOT>
-> index.jsps etc.
-> WEB-INF/classes
-> APP-INF/lib (for 3rd party libs)
META-INF/ application.xmls and ejb-jar xmls. Now problem is, i am not able to deploy ejbs using classpath WEB-INF/classes.
I tried MANIFEST.MF class-path entry, it didn't work.
Is there any way to define classpath for ejbs at application classloader level?
Ofcourse, if I create new folder say 'ejb' and deploy that as ejb module and put all classes in ejb directory, it works.
my application.xml looks like this
<application>
<display-name>Test Application</display-name>
<module>
<ejb>/</ejb>
</module>
<module>
<web>
<web-uri>/</web-uri>
<context-root>webapp</context-root>
</web>
</module>
</application>I have been trying to deploy my eclipse j2ee project in exploded way in weblogic 8.1
I have standard folder structure,
<APP_ROOT>
-> index.jsps etc.
-> WEB-INF/classes
-> APP-INF/lib (for 3rd party libs)
META-INF/ application.xmls and ejb-jar xmls. Now problem is, i am not able to deploy ejbs using classpath WEB-INF/classes.
I tried MANIFEST.MF class-path entry, it didn't work.
Is there any way to define classpath for ejbs at application classloader level?
Ofcourse, if I create new folder say 'ejb' and deploy that as ejb module and put all classes in ejb directory, it works.
my application.xml looks like this
<application>
<display-name>Test Application</display-name>
<module>
<ejb>/</ejb>
</module>
<module>
<web>
<web-uri>/</web-uri>
<context-root>webapp</context-root>
</web>
</module>
</application> -
Hi guys,
I deployed Session ejb successfully in weblogic server 8.1. i am using standalone server,i included weblogic.jar and client.jar in CLASSPATH.but running client it throws this exception.plz tell me syntax for running client in CMD prompt and also tell me CLASSPATH Setting for Session ejb.
[java] java.lang.NoClassDefFoundError: examples/ejb20/basic/statelessSessio
n/Client
[java] Exception in thread "main"
bye
Priya.MHi ,
Before running the ejb client we need to follow the steps as given below.
1)set the weblogic environment using the setWLSEnv
2)set the classpath for ejb(home,remote and bean).
3)run the client program
Note:To set the classpath for the ejb(suppose if we placed the ejb's in ejb folder)
set classpath=d:\ejb;.; %classpath%
Regards
Anilkumar kari -
Hello,
I am using eclipse and ant for development, and do not want to use the studio.
Are there command line tools to generate the sun-cmp-mappings.xml, sun-ejb-jar.xml files? I did find the capture-schema tool to generate the *.dbschema files.
Thanks.
PeterIf anyone interested....
I have found a way to use the capture-schema tool in an ant task.
<target name="_function.capture_schema">
<echo message="capturing database to schema file [because sunOne cant do it for us yet.]"/>
<java classname="com.sun.jdo.api.persistence.mapping.ejb.CaptureSchema">
<classpath>
<fileset dir="${j2ee.home}/lib">
<include name="*.jar"/>
</fileset>
<fileset dir="../lib">
<include name="*.jar"/>
</fileset>
</classpath>
<arg line="-username ${db.user}"/>
<arg line="-password ${db.pwd}"/>
<arg line="-dburl ${db.url}"/>
<arg line="-driver ${db.driver}"/>
<arg line="-out meta-inf/${db.schema}"/>
<jvmarg line="-Xms24m"/>
<jvmarg line="-Xmx96m"/>
</java>
<echo message="finisched."/>
</target>
This way (if you can rely on the capture schema class) you schouldnt have any problems with deploying.
Dont forget to specify the db.schema in the sun-cmp-mappings.xml -
Hi ,
I have an EJB A which is already deployed when the server starts. A second ejb
B is deployed at a later time.
EJB A calls methods in EJB B. I use reflection in EJB A to call methods in EJB
B.
I get a NoSuchMethodException when I call the create method in the Home object
of EJB B. If I add the ejb jar file to the classpath before the server starts
then it is able to resolve the method.
The problem is the EJBs which are called from EJB A is not known before the server
is started. New EJBs can be deployed at runtime and EJB A should be able call
the methods in newly deployed EJB's.
I also use the URLClassLoader to load all the classes in the jar file of the newly
deployed EJB in EJB A and it still gives a NoSuchMethodException because it cannot
resolve the stub class.
My error log is shown below.
This is an urgent issue.
Thanks
SampleConnector::testEJBService called
In Key : P1 Value : Input2
In Key : P3 Value : Input1
In Key : P2 Value : SomeConst
Loaded Class = com.bizwave.samples.rejb.SampleRemote
Loaded Class = com.bizwave.samples.rejb.SampleRemoteEJB
Loaded Class = com.bizwave.samples.rejb.SampleRemoteEJB_svq1df_EOImpl
Loaded Class = com.bizwave.samples.rejb.SampleRemoteEJB_svq1df_HomeImpl
Loaded Class = com.bizwave.samples.rejb.SampleRemoteEJB_svq1df_Impl
Loaded Class = com.bizwave.samples.rejb.SampleRemoteHome
java.lang.NoSuchMethodException
at java.lang.Class.getMethod0(Native Method)
at java.lang.Class.getDeclaredMethod(Class.java:1151)
at com.bizwave.samples.ejb.SampleConnectorEJB.testEJBService(SampleCon
ctorEJB.java:181)
at com.bizwave.samples.ejb.SampleConnectorEJB_be5y1v_EOImpl.testEJBSer
ce(SampleConnectorEJB_be5y1v_EOImpl.java:98)
at java.lang.reflect.Method.invoke(Native Method)
at com.bizwave.fc.utils.ClassUtils.invokeEJBMethod(ClassUtils.java:109
at com.bizwave.infra.fjet.engine.EJBServiceStepMgr.executeService(EJBS
viceStepMgr.java:91)Hi,
I am attaching a test case. This test case actually demonstrates a security bug.
Unzip the file and modify the StartWeblogic.cmd in domainA to not refer to the
SampleRemoteEJB.jar in the classpath. If u run the test client under the client
dir u will see a NoSuchMethodException.
The reason is it is not able to load the dynamically generated stub file.
Initially I had the getMethod and it didn't work. You might have to modify the
files to suit ur env. The easier way is to run th edomain wizard and create 2
domains. Run the servers in development mode and place the jars under the applications
dir
Thanks
Rajesh Mirchandani <[email protected]> wrote:
Do you have any old EJB classes in your classpath? Did you recompile
your EJBs if you
upgraded from a old release or a Service pack?
Bob Lee wrote:
Hmmmm. That's an interesting problem.
Why is it giving you a NoSuchMethodException instead of a
ClassNotFoundException?
Can you post the code from SampleConctorEJB.java, line 181?
Try changing your call to getDeclaredMethod() to getMethod().
getDeclaredMethod() searches only the class you called it on, whereas
getMethod() traverses to the superclasses and interfaces. You onlyneed
getDeclaredMethod() when you're accessing a nonpublic method.
Not sure if this will help, but it's worth a shot.
Bob
Vasu wrote:
Hi ,
I have an EJB A which is already deployed when the server starts.
A second ejb
B is deployed at a later time.
EJB A calls methods in EJB B. I use reflection in EJB A to call methodsin EJB
B.
I get a NoSuchMethodException when I call the create method in theHome object
of EJB B. If I add the ejb jar file to the classpath before the serverstarts
then it is able to resolve the method.
The problem is the EJBs which are called from EJB A is not knownbefore the server
is started. New EJBs can be deployed at runtime and EJB A shouldbe able call
the methods in newly deployed EJB's.
I also use the URLClassLoader to load all the classes in the jarfile of the newly
deployed EJB in EJB A and it still gives a NoSuchMethodExceptionbecause it cannot
resolve the stub class.
My error log is shown below.
This is an urgent issue.
Thanks
SampleConnector::testEJBService called
In Key : P1 Value : Input2
In Key : P3 Value : Input1
In Key : P2 Value : SomeConst
Loaded Class = com.bizwave.samples.rejb.SampleRemote
Loaded Class = com.bizwave.samples.rejb.SampleRemoteEJB
Loaded Class = com.bizwave.samples.rejb.SampleRemoteEJB_svq1df_EOImpl
Loaded Class = com.bizwave.samples.rejb.SampleRemoteEJB_svq1df_HomeImpl
Loaded Class = com.bizwave.samples.rejb.SampleRemoteEJB_svq1df_Impl
Loaded Class = com.bizwave.samples.rejb.SampleRemoteHome
java.lang.NoSuchMethodException
at java.lang.Class.getMethod0(Native Method)
at java.lang.Class.getDeclaredMethod(Class.java:1151)
at com.bizwave.samples.ejb.SampleConnectorEJB.testEJBService(SampleCon
ctorEJB.java:181)
at com.bizwave.samples.ejb.SampleConnectorEJB_be5y1v_EOImpl.testEJBSer
ce(SampleConnectorEJB_be5y1v_EOImpl.java:98)
at java.lang.reflect.Method.invoke(Native Method)
at com.bizwave.fc.utils.ClassUtils.invokeEJBMethod(ClassUtils.java:109
at com.bizwave.infra.fjet.engine.EJBServiceStepMgr.executeService(EJBS
viceStepMgr.java:91)
Rajesh Mirchandani
Developer Relations Engineer
BEA Support
[user_projects.zip]
Maybe you are looking for
-
I want to locate a folder on my desktop, but want to restrict access so that anyone on my laptop can't access the folder, even though they will see it sitting on the desktop. How do I set up folder permissions?
-
Unable to run procedure due to error in package OWA_UTIL
Hi, I have written a nice PL/SQL procedure called 'send_notification'.. My procedure begins like this : create or replace procedure send_notification is ws_id number; l_body clob; l_url varchar2(25
-
Keep iphone asleep when notifications arrive?
This is more of a feature request if it doesn't already exist. As you know, while the iphone is asleep, it wakes temporarily to display the notifications then goes back to sleep. The problem with this is, I'm to the point where I get tons of notifica
-
Hola peeps, since apple tv has upgraded to have more shows to watch and I wud like to watch on ESPN Watch, Disney Channel and Disney XD. Do I have to pay each time I watch?
-
Hi All, I am trying to achieve the following using the graphical mapping tool. Source: Document..... 1-1 .....rows........ 0-unbounded .........documentNumber.....1-1 Target: Document.....1..1 ..... header ....0-unbounded ..........documentNumber...1