EJB classpath
when i compile the home and remote interfaces java file i get an error cannot resolve symbol.it is not able to find the ejb.jar files.i ve included the j2eesdk1.3.1/lib/j2ee.jar in classspath but still it is not working.please help me.thanks in advance.
You may want to place j2ee.jar as very first file in classpath. What might have happed is while editing to classpath there would have been a junk charcater which would invalidate the later part of classpath. Just try this and see if it works. It is for sure your classpath problem
pranav
Similar Messages
-
WebLogic 11g EAR EJB Classpath and class loaders
All,
I have been having issues migrating Spring based EJB applications from OC4J to WebLogic 11g (10.3.1). I have been in communication with Oracle who has suggested a work around however I am keen to see if anyone else can suggest a solution.
The application is dependant on stateless session EJB beans that communicate with a Spring managed service tier to perform the business logic and database access. PitchFork is used to inject the Spring managers into the EJB’s using the spring-ejb-jar.xml configuration file. Note originally I was using the SpringBeanAutowiringInterceptor however I could not get this to work. See WebLogic 11g and Spring beens injected into EJB for details.
When the application is deployed packaging all the dependant jars within the APP-INF\lib folder I get a verity of errors from the following InvalidClassException, NoSuchMethodError, AbstractMethodError and IllegalArgumentException. I am using Spring 2.5.3 to match the supported WebLogic version. Note within the EAR application.xml the library-directory is set to APP-INF/lib. The issue appears to be Spring, PitchFork, commons-logging and aspectj libraries are being loaded form WebLogic and do not have visibility on jars within the application or have been modified when bundled for WebLogic. An example of this is the PitchFork jar within WebLogic has been changed excluding the spi package resulting in java.lang.ClassNotFoundException: org.springframework.jee.spi.PitchforkUtilsImpl errors.
Moving the jars to the domain library path does not resolve any of the issues. I have been unable to successfully deploy the application picking up the application jars using the prefer-application-packages configuration.
Oracle has advised me to deploy the libraries into the WebLogic system classpath by modifying the startWebLogic command to load the libraries into the classpath. I am concerned that modifying the system classpath will result in an unstable WebLogic server as I will be replacing modified jar files packages with WebLogic (such as PitchFork). This will also limit the applications that can be deployed within the server as each application must use the same libraries and versions (as the application ibraries are leing ignored).
Has anyone else hit this issue and corrected it? Can anyone think of an alternative solution?
Regards
NeilHi,
I am in the process of updating the tracking bug# 331569 with copies of the eclipse EAR/WAR projects and the EAR for these scenarios. Here are some details on how I got past the 2nd CCE on the org.eclipse.persistence.jpa.PersistenceProvider class (not the javax one)
https://bugs.eclipse.org/bugs/show_bug.cgi?id=331569
Essentially an SE persistence unit running both JPA 2.0 api and the 2.0 XSD schema work fine. I will next retest the EE case with variations of the 3 types of injection on the SSB or Servlet.
Update: There are 3 (possibly 4) issues here (all of these may become obsolete when the next WLS version ships)Initially I got the same 2.0 schema error and the ClassCastException on org.eclipse.persistence.jpa.PersistenceProvider
It turns out that my import of the 2 eclipse projects from my bug # 296271 for WebLogic 10.3.2.0 lost their facets(specifically the dynamic web facet) because I associated them with a different WebLogic 10.3.3.0. - this caused the CCE I was experiencing like Sri.
Anyways, after creating an EAR/Web project combination from scratch in eclipse associated with the 10.3.3.0 instance - I predeployed/deployed/ran fine - even with the 2.0 schema - in SE bootstrap mode (no EE yet).
Reproduction Procedure:
redoing project from scratch as I noticed that the war was not at the root of the ear - it was a jar in the app-inf/lib dir - my imported eclipse project was not referenced correctly as a web module facet- create empty EAR and WAR project with references
- download and open my EAR and WAR project code from bug # 296271
https://bugs.eclipse.org/bugs/show_bug.cgi?id=296271
- do essentially all the steps in the page below (I paraphrase for re-verification)
http://wiki.eclipse.org/EclipseLink/Development/JPA_2.0/weblogic#DI_1.1:_Alternative_3:_Application_Level_Shared_Library_-InUse
- copy applicationService, entity and FrontController servlet code into new projects
- create persistence.xml and MANIFEST.MF manifest in src\META-INF
- update manifest
Class-Path: APP-INF/lib/eclipselink.jar
APP-INF/lib/javax.persistence_2.0.0.v200911041116.jar
- copy both javax.persistence 2.0 and eclipselink 2.x jars to APP-INF/lib
- change ordering of WebLogic library modules classpath reference (javax.persistence 1.0) to ear reference (2.0 version)
- update web.xml with servlet tags
- update weblogic.xml with new context root
- make the persistence unit name the same in persistence.xml and ApplicationManagedService
- update weblogic-application.xml with prefer-application-packages overrides
<wls:prefer-application-packages>
<wls:package-name>javax.persistence.*</wls:package-name>
<wls:package-name>org.eclipse.persistence.*</wls:package-name>
</wls:prefer-application-packages>
- enable server redirect logging
<!-- new for 10.3.3.0 http://wiki.eclipse.org/EclipseLink/Examples/JPA/Logging#Server_Logging -->
<property name="eclipselink.logging.logger" value="DefaultLogger"/>
- start WebLogic 10.3.3.0
- deploy (run on) server from eclipse or export ear to auto deploy directory
1) JPA 2.0 XSD usage on 10.3.3.0
- I reproduced this issue with a bad EAR
- was able to use the 2.0 schema within the WAR-only application managed EAR
persistence.xml<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
<!-- persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"-->
<persistence-unit name="example2" transaction-type="JTA">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<jta-data-source>localJTA</jta-data-source>
<class>org.eclipse.persistence.example.business.Cell</class>
<shared-cache-mode>NONE</shared-cache-mode>
<properties>
<property name="eclipselink.target-server" value="WebLogic_10"/>
<property name="eclipselink.logging.level" value="FINEST"/>
<property name="eclipselink.target-database" value="Derby"/>
<!-- new for 10.3.3.0 http://wiki.eclipse.org/EclipseLink/Examples/JPA/Logging#Server_Logging -->
<property name="eclipselink.logging.logger" value="DefaultLogger"/>
<!-- property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.ClientDriver"/>
<property name="javax.persistence.jdbc.url" value="jdbc:derby://127.0.0.1:1527/dataparallel;create=true"/>
<property name="javax.persistence.jdbc.user" value="APP"/>
<property name="javax.persistence.jdbc.password" value="APP"/-->
<!-- turn off DDL generation after the model is stable -->
<!-- property name="eclipselink.ddl-generation" value="drop-and-create-tables"/>
<property name="eclipselink.ddl-generation.output-mode" value="both"/-->
</properties>
</persistence-unit>
</persistence>
2) CCE on JPA provider implementation class
Error instantiating the Persistence Provider class org.eclipse.persistence.jpa.PersistenceProvider of the PersistenceUnit example2: java.lang.ClassCastException: org.eclipse.persistence.jpa.PersistenceProvider
- I reproduced and fixed this one (was Eclipse project facet issue) - EAR was wrong
- was able to run JPA 2.0 code fine on an SE PU (predeploy/deploy together)
- EE injection should not work but I will post an example EAR anyway
log[EL Example]: enterprise: JPA 2.0 Metamodel: MetamodelImpl@56287508 [ 3 Types: , 1 ManagedTypes: , 1 EntityTypes: , 0 MappedSuperclassTypes: , 0 EmbeddableTypes: ]
3) CCE on JPA spec interface class
- I could not reproduce this one
Re: WebLogic 11g EAR EJB Classpath and class loaders
Error processing persistence unit PT of module pt: Error instantiating the Persistence Provider class org.eclipse.persistence.jpa.PersistenceProvider of the PersistenceUnit PT: java.lang.ClassCastException: org.eclipse.persistence.jpa.PersistenceProvider cannot be cast to javax.persistence.spi.PersistenceProvider
4) CCE on fallback Kodo JPA provider (if an invalid say 2.1 JPA XSD schema is referenced)
java.lang.ClassCastException: kodo.persistence.PersistenceProviderImpl
at javax.persistence.Persistence.findAllProviders(Persistence.java:186)
java.lang.NoSuchMethodError: javax/persistence/EntityManager.getMetamodel()Ljavax/persistence/metamodel/Metamodel;
- reproduced by using the 1.0 javax.persistence jar (but named as the 2.0 one in APP-INF/lib)
- fixed by using either the 1.0 or 2.0 JPA XSD schema and using the correct 2.0 spec jar
thank you
/michael -
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. -
EJB classpath problem when refering a DAO in library jar file
Hi
When I tried to deploy an EJB jar file in 10g which references the DAO for getting database[SQL Server2000] query results.Its not retriving data nor throwing any exceptions.Other DAO business methods which do not access database are working well.
When I tried to import the DAO inside a JSP and calling the DAO data access method which is working fine. Even I have set the resource-ref [datasource JNDI Name] in ejb-jar.xml files for the EJB beans, but its not referencing. If you have any ideas, how to resolve this problem, please forward me your suggestion.
Thanks in Advance
Best Regards
Venugopal BaluHi
When I tried to deploy an EJB jar file in 10g which references the DAO for getting database[SQL Server2000] query results.Its not retriving data nor throwing any exceptions.Other DAO business methods which do not access database are working well.
When I tried to import the DAO inside a JSP and calling the DAO data access method which is working fine. Even I have set the resource-ref [datasource JNDI Name] in ejb-jar.xml files for the EJB beans, but its not referencing. If you have any ideas, how to resolve this problem, please forward me your suggestion.
Thanks in Advance
Best Regards
Venugopal Balu -
Why wlappc ANT task forces aways the generation of the EJB classes ?
I've got a problem with the ANT task "wlappc" witch interfaces Weblogic compilator.
In fact, I would like to execute the ebj compilation only when needed (if the deployment descriptor or a class changed for example).
It seems that this is the default behavior and the 'forcegeneration' option of the wlappc Ant task can change it (the doc is below).
forceGeneration :
Forces generation of EJB and JSP classes. Without this flag, the classes will not be regenerated unless a checksum indicates that it is necessary.
So I wrote :
<wlappc source="${descriptors}/CommandeEntities" output="${build}/CommandsEntities.jar" keepgenerated="true" verbose="true" forcegeneration="false">
<classpath refid="ejb.classpath"/>
</wlappc>
but I got the folowing result :
ejbjar:
[wlappc] Warning, output location exists H:\devWv2\wv2\build\CommandesEntities.jar
[wlappc] Created working directory: C:\DOCUME~1\vdoneva\LOCALS~1\Temp\appcgen_1221729775921_CommandesEntities
[wlappc] 18 sept. 2008 11:22:59 weblogic.diagnostics.debug.DebugLogger debug
[wlappc] FIN: [VersionHelper] Recompiling because no previous hashes found
[wlappc] 18 sept. 2008 11:22:59 weblogic.diagnostics.debug.DebugLogger debug
[wlappc] FIN: [EJBCompiler] Compliance Checker said bean was compliant
[wlappc] 18 sept. 2008 11:22:59 weblogic.diagnostics.debug.DebugLogger debug
[wlappc] FIN: [EJBCompiler] Generating Bean Sources
[wlappc] 18 sept. 2008 11:22:59 weblogic.diagnostics.debug.DebugLogger debug
[wlappc] FIN: [EJBCompiler] Generating source for ejb WCritereListeMulticritere
[wlappc] 18 sept. 2008 11:22:59 weblogic.diagnostics.debug.DebugLogger debug
[wlappc] FIN: [EJBCompiler] Generated the following sources for this EJB: [C:\DOCUME~1\vdoneva\LOCALS~1\Temp\appcgen_1221729775921_CommandesEntities\com\experian\wv2\db\WCritereListeMulticritere_u6449c_LocalHomeImpl.java, C:\DOCUME~1\vdoneva\LOCALS~1\Temp\appcgen_1221729775921_CommandesEntities\com\experian\wv2\db\WCritereListeMulticritere_u6449c_ELOImpl.java]
[wlappc] 18 sept. 2008 11:22:59 weblogic.diagnostics.debug.DebugLogger debug
[wlappc] FIN: [EJBCompiler] Generating Persistence Sources
[wlappc] 18 sept. 2008 11:22:59 weblogic.diagnostics.debug.DebugLogger debug
[wlappc] FIN: [EJBCompiler] Generating Bean Sources
[wlappc] 18 sept. 2008 11:22:59 weblogic.diagnostics.debug.DebugLogger debug
[wlappc] FIN: [EJBCompiler] Generating source for ejb Document
[wlappc] 18 sept. 2008 11:23:00 weblogic.diagnostics.debug.DebugLogger debug
[wlappc] FIN: [EJBCompiler] Generated the following sources for this EJB: [C:\DOCUME~1\vdoneva\LOCALS~1\Temp\appcgen_1221729775921_CommandesEntities\com\experian\wv2\db\Document_6vm6yi_LocalHomeImpl.java, C:\DOCUME~1\vdoneva\LOCALS~1\Temp\appcgen_1221729775921_CommandesEntities\com\experian\wv2\db\Document_6vm6yi_ELOImpl.java]
[wlappc] 18 sept. 2008 11:23:02 weblogic.diagnostics.debug.DebugLogger debug
[wlappc] FIN: [EJBCompiler] Generating Persistence Sources
[wlappc] 18 sept. 2008 11:23:02 weblogic.diagnostics.debug.DebugLogger debug
[wlappc] FIN: [EJBCompiler] Compiling EJB sources
[wlappc] Note: Some input files use unchecked or unsafe operations.
[wlappc] Note: Recompile with -Xlint:unchecked for details.
[wlappc] 18 sept. 2008 11:23:10 weblogic.diagnostics.debug.DebugLogger debug
[wlappc] FIN: [EJBCompiler] Recompilation completed
[wlappc] 18 sept. 2008 11:23:10 weblogic.diagnostics.debug.DebugLogger debug
[wlappc] FIN: [EJBCompiler] Rmic completed
[wlappc] Compilation completed successfully.
[jar] Updating jar: H:\devWv2\wv2\build\CommandesEntities.jar
BUILD SUCCESSFUL
All the classes witch hasn't changed has been checked and regenerated. The compliler says "Recompiling because no previous hashes found".
But why ? It could be besause it creates a different working directory each time I execute this ant task ? Is this working directory configurable ?
Would you have any idea of what's happening ?
Thanks.You can find this in the 'org\apache\tools\ant\taskdefs\defaults.properties'
file of %wl-home%\server\lib\ant\ant.jar
--Sathish
<Michael Lee> wrote in message news:[email protected]..
I mean the definition of "wlappc" not the help for wlappc???thx.
i.e.
where can i find the sentence list below:
<taskdef name="wlappc" classname="weblogic.ant.taskdefs.j2ee.Appc"/>
I mean which files this "taskdef" is being in . -
Building weblogic ejbs with ant...
Hi, it may be not the proper place, but I haven't found a better one...
Here comes my question:
I have an ant build.xml file where I have the following tasks defined:
<property name="ejb.dtd.location" value="weblogic/ejb/deployment/xml/ejb-jar.dtd"/>
<condition property="ejb.dtd.location" value="weblogic/ejb20/dd/xml/ejb11-jar.dtd">
<equals arg1="${weblogic.major.version}" arg2="6"/>
</condition>
<property name="weblogic.ejb.dtd.location" value="weblogic/ejb/deployment/xml/weblogic-ejb-jar.dtd"/>
<condition property="ejb.dtd.location" value="weblogic/ejb20/dd/xml/weblogic510-ejb-jar.dtd">
<equals arg1="${weblogic.major.version}" arg2="6"/>
</condition>
<!-- compiles EJBs -->
<target name="compile.ejb" depends="init">
<javac srcdir="${srcDir.ejb}"
destdir="${srcDir.ejb}"
debug="${npm.debug}">
<classpath id="ejb.cpath">
<pathelement path="${weblogic.sp.path}"/>
<pathelement path="${weblogic.core.path}"/>
<pathelement location="${outDir.core}${file.separator}npm.jar"/>
<pathelement location="${srcDir.ejb}"/>
</classpath>
</javac>
</target>
<!-- delivers EJBs -->
<target name="make.ejb" depends="prepare, compile.ejb">
<!-- ejbc 'n jar 'em -->
<ejbjar srcdir="${srcDir.ejb}">
<weblogic destdir="${outDir.ejb}"
compiler="${compiler.ejb}"
keepgeneric="false"
suffix=".jar"
args="-g -nowarn"
oldCMP="false">
<classpath refid="ejb.cpath"/>
</weblogic>
<include name="**/*-ejb-jar.xml"/>
<exclude name="**/*-weblogic-ejb-jar.xml"/>
<!-- WLS v5 DTDs!!! -->
<dtd publicId="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN"
location="${ejb.dtd.location}"/>
<dtd publicId="-//BEA Systems, Inc.//DTD WebLogic 5.1.0 EJB//EN"
location="${weblogic.ejb.dtd.location}"/>
</ejbjar>
</target>This should build my ejbs with either the wls61 ejbc or the wls51 one. Anyway ant seems to have problems finding the local dtds in the classpath, although this is specified in the documentation. When I set both location attributes to point to files it works perfect. The problem is that these are in weblogic.jar for the wls61 release. This has two solutions, but either are bad in my opinion:
1. extract the needed dtds to a temp dir with a jar task and then delete em...
2. put the proper wls.jar in the classpath so ejbc could automatically resolve the dtds
Can anyone help or may be send his ant build file, where a <dtd> nested element is used for <ejbjar> for wls61?
Thank you in advance
AntonAnton,
Your second solution is the correct one. If you look at dtd element description under ejbjar task in the Ant manual, you'll see that vendors jars are required in Ant's classpath in order for ejbjar task to resolve DTD dependencies, in which case you don't need to specify dtd elements. I don't particularly like it either. If you find a better way to solve this problem, let me know.
-Dmitry -
Strange ClassNotFoundException using ejb
I have an ejb deployed as part of an ear. the ejb has a manifest.mf which allows
it to access helper jars and classes in the ear. I see the below error message
when the bean tries to use the ReportDirectoryBase class. That class is accessable
to the ejb classpath. It's in the ear and the manifest.mf directs the ejb to
that class.
The ReportDirectoryBase class is also used by our webapp, and we see a similar
error message when accessing this class through the web app. Any insights would
be most helpfull.
####<Oct 21, 2003 8:01:38 AM EDT> <Error> <Unknown> <mlybarger> <myserver> <ExecuteThread:
'11' for queue: 'default'> <> <> <000000> <EventSubmitBean.submit() - error: java.rmi.UnmarshalException:
error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: com.cbc.isac.toolkit.ReportDirectoryBase:
This error could indicate that a component was deployed on a cluster member but
not other members of that cluster. Make sure that any component deployed on a
server that is part of a cluster is also deployed on all other members of that
cluster
Start server side stack trace:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: com.cbc.isac.toolkit.ReportDirectoryBase:
This error could indicate that a component was deployed on a cluster member but
not other members of that cluster. Make sure that any component deployed on a
server that is part of a cluster is also deployed on all other members of that
cluster
java.lang.ClassNotFoundException: com.cbc.isac.toolkit.ReportDirectoryBase: This
error could indicate that a component was deployed on a cluster member but not
other members of that cluster. Make sure that any component deployed on a server
that is part of a cluster is also deployed on all other members of that cluster
at weblogic.j2ee.ApplicationManager.loadClass(ApplicationManager.java:162)
at weblogic.rjvm.MsgAbbrevInputStream.readClassDescriptor(MsgAbbrevInputStream.java:211)
at weblogic.common.internal.ChunkedObjectInputStream$NestedObjectInputStream.readClassDescriptor(ChunkedObjectInputStream.java:300)
at java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java:906)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:366)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1186)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
at java.util.ArrayList.readObject(ArrayList.java:531)
at java.lang.reflect.Method.invoke(Native Method)
at java.io.ObjectInputStream.invokeObjectReader(ObjectInputStream.java:2214)got it figured out kinda. We were passing a ReportDocument object to an ejb.
This object doesn't have a ReportDirectoryBase instance, but it does have a List
of ReportDirectoryBase objects, The ejb that is using the ReportDocument works
fine when it recieves a ReportDocument that doesn't contain a list of ReportDirectoryBase
objects, but craps out when it has to serialize a ReportDocument object that
contains a list of ReportDirectoryBase objects. The ejb does not have the ReportDirectoryBase
class in it (since it doesn't directly use that class). I suspect that weblogic
has to identify the classes it's serializing on the ejb side.
Note, this is not a problem when running the ejb, and the webapp all under the
same weblogic instance (one server for webapp and ejb's for development).
"Mark" <[email protected]> wrote:
>
I have an ejb deployed as part of an ear. the ejb has a manifest.mf
which allows
it to access helper jars and classes in the ear. I see the below error
message
when the bean tries to use the ReportDirectoryBase class. That class
is accessable
to the ejb classpath. It's in the ear and the manifest.mf directs the
ejb to
that class.
The ReportDirectoryBase class is also used by our webapp, and we see
a similar
error message when accessing this class through the web app. Any insights
would
be most helpfull.
####<Oct 21, 2003 8:01:38 AM EDT> <Error> <Unknown> <mlybarger> <myserver>
<ExecuteThread:
'11' for queue: 'default'> <> <> <000000> <EventSubmitBean.submit() -
error: java.rmi.UnmarshalException:
error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: com.cbc.isac.toolkit.ReportDirectoryBase:
This error could indicate that a component was deployed on a cluster
member but
not other members of that cluster. Make sure that any component deployed
on a
server that is part of a cluster is also deployed on all other members
of that
cluster
Start server side stack trace:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception
is:
java.lang.ClassNotFoundException: com.cbc.isac.toolkit.ReportDirectoryBase:
This error could indicate that a component was deployed on a cluster
member but
not other members of that cluster. Make sure that any component deployed
on a
server that is part of a cluster is also deployed on all other members
of that
cluster
java.lang.ClassNotFoundException: com.cbc.isac.toolkit.ReportDirectoryBase:
This
error could indicate that a component was deployed on a cluster member
but not
other members of that cluster. Make sure that any component deployed
on a server
that is part of a cluster is also deployed on all other members of that
cluster
at weblogic.j2ee.ApplicationManager.loadClass(ApplicationManager.java:162)
at weblogic.rjvm.MsgAbbrevInputStream.readClassDescriptor(MsgAbbrevInputStream.java:211)
at weblogic.common.internal.ChunkedObjectInputStream$NestedObjectInputStream.readClassDescriptor(ChunkedObjectInputStream.java:300)
at java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java:906)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:366)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1186)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
at java.util.ArrayList.readObject(ArrayList.java:531)
at java.lang.reflect.Method.invoke(Native Method)
at java.io.ObjectInputStream.invokeObjectReader(ObjectInputStream.java:2214) -
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] -
ClassNotFoundException if ejb jar file is not placed in the server's classpath
Hi,
My ejb jar file contains some non-weblogic generated files and is placed in
the applications directory. When client is executed, I get the ClassNotFoundException
on the server when my bean makes a reference to the generated class. The problem
gets resolved if I put the ejb jar in the server's classpath.
This problem happens in weblogic server version 6.1. It was not happening in
the previous releases of weblogic server(6.0).Well
I follow your instruction
I am pasting the command prompt operation
Coding is same above
My all three files (.java )is resides in javath folder
command prompt code
Z:\javath>javac -d . sa.java
Z:\javath>javac -d . sb.java
Z:\javath>jar -cvf p1.jar p1/*.class
added manifest
adding: p1/sa.class(in = 687) (out= 423)(deflated 38%)
adding: p1/sb.class(in = 185) (out= 153)(deflated 17%)
Z:\javath>javac demopack.java
demopack.java:4: cannot access sb
bad class file: .\sb.java
file does not contain class sb
Please remove or make sure it appears in the correct subdirectory of the classpa
th.
public class demopack implements sb
^
1 error
Z:\javath>------------------------------------------------------------
in demopack.java file i want to access class files which are resides in
jar files
Actually when we are writing import java.io.*;
we can access all the class file from that io package
Same thing i am trying to implement for user defined package
I hope you understand my question
regards -
How to set classpath to EJB and Servlets
Hi all,
How can I add a classpath to EJB and Servlets in Weblogic 6.1, so that that classpath
can be achieved by both EJB jar and war file? I have deployed a .ear file having
the jar and war files. Now the EJBs inside the jar file are not reaching the class
files of the war file and the class files in the war file are not reaching to
the EJBs. Please let me know at the earliest.
AtanuHi.
You might try looking at the petstore example which combines webapps (war files) with
ejbs in an ear file to see how to do this. It may be a simple config problem.
Regards,
Michael
Atanu Dey wrote:
Hi all,
How can I add a classpath to EJB and Servlets in Weblogic 6.1, so that that classpath
can be achieved by both EJB jar and war file? I have deployed a .ear file having
the jar and war files. Now the EJBs inside the jar file are not reaching the class
files of the war file and the class files in the war file are not reaching to
the EJBs. Please let me know at the earliest.
Atanu--
Michael Young
Developer Relations Engineer
BEA Support -
Cannot find javax.ejb.CreateException fix classpath
Hi Guys,
I have made a Webdynpro in which I am using an EJB in the libraries of the project. When I access the classes of EJB I am getting a complie time error saying
Cannot find class file for javax.ejb.CreateException. Fix the classpath then try rebuilding this project.
Can you tell me how to fix this.
Regards,
Khusro HabibHi,
Guys I was able to solve this problem, by adding
C:\Program Files\SAP\IDE\IDE70\eclipse\plugins\com.tssap.ext.libs.j2ee_1.3.0\lib\ejb20.jar
into the project properties>> in the Java Buildpath adding external jars.
Khusro Habib -
Recompiling EJB jars during start up, and classpath wrong
When I start WL6.1 with SP2, it tries to recompile (re: ejbc ?) one of my ejb jars.
Why does it do this. This gives NoClassDefFoundError exception as the bean references
utility classes which are only resolved by the class-path entry in the manifest
file e.g
Class-Path: /rdfinf.jar NRInfrastructure.jar
But these classes aren't on the classpath when starting WL6.1, if they were they
couldn't be redeployed. I think what is happening is the jar is being re ejbc
but the class path given to ejbc is obviously incorrect ?
The jar was produced by JBuilder6, I thought that maybe JBuilder6 didn't have
sp2 installed and therefore it was an sp1 ejbc'd jar so at start up it is re ejbc'd
But JB6 does have weblogic_sp.jar in its libraries BUT I can't find weblogic_sp.jar
anywhere on my bea\wlserver6.1 installation. I upgraded from wl6.1 sp1 to sp2,
and when wl6.1 starts up it clearly says sp2.
Any ideas ? I've been looking at this for days.
<22-Jan-02 16:30:14 GMT> <Info> <EJB> <EJB Deploying file: AccountManager.jar>
<22-Jan-02 16:30:14 GMT> <Info> <EJB> <The EJB deployment named: AccountManager.jar
is being recompiled within the WebLogic
onsult the server logs if there are any errors. It is also possible to run weblogic.ejbc
as a stand-alone tool to generate t
ses.>
<22-Jan-02 16:30:14 GMT> <Error> <J2EE> <Error deploying application AccountManager:
Unable to deploy EJB: AccountManager.jar from AccountManager.jar:
EJB : AccountManagerBean .Unable to initialize method info for remote
or home interface.The error is java.lang.NoCla
com/rdf/infrastructure/exceptions/RDFApplicationException
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
at java.lang.ClassLoader.loadClass(ClassLoader.java:290)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:339)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:156)
at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
at java.lang.Class.getMethods0(Native Method)
at java.lang.Class.getMethods(Class.java:742)
at weblogic.ejb20.deployer.ClientDrivenBeanInfoImpl.initializeMethodInfos(ClientDrivenBeanInfoImpl.java:955)
at weblogic.ejb20.deployer.ClientDrivenBeanInfoImpl.<init>(ClientDrivenBeanInfoImpl.java:210)
at weblogic.ejb20.deployer.SessionBeanInfoImpl.<init>(SessionBeanInfoImpl.java:103)
at weblogic.ejb20.deployer.BeanInfoImpl.createBeanInfoImpl(BeanInfoImpl.java:327)
at weblogic.ejb20.deployer.MBeanDeploymentInfoImpl.initializeBeanInfos(MBeanDeploymentInfoImpl.java:395)
at weblogic.ejb20.deployer.MBeanDeploymentInfoImpl.<init>(MBeanDeploymentInfoImpl.java:126)
at weblogic.ejb20.ejbc.EJBCompiler.setupEJB(EJBCompiler.java:128)
at weblogic.ejb20.deployer.Deployer.runEJBC(Deployer.java:295)
at weblogic.ejb20.deployer.Deployer.compileEJB(Deployer.java:684)
at weblogic.ejb20.deployer.Deployer.deploy(Deployer.java:851)
at weblogic.j2ee.EJBComponent.deploy(EJBComponent.java:30)
at weblogic.j2ee.Application.addComponent(Application.java:163)
at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:117)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:329)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(DeploymentTarget.java:279)
at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(DeploymentTarget.java:233)
at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(DeploymentTarget.java:193)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:636)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:621)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:359)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)Hi,
the weblogic_sp.jar file should be in the bea/wlserver6.1/lib directory.
If WebLogic starts as SP2, it should be there. You could also look in
the start script (startweblogic.cmd if you're on Windows),
weblogic_sp.jar should be referenced in there, too.
When using JBuilder, make sure that the weblogic_sp.jar file is listed
before (above) the weblogic.jar file, so it is included first in the
classpath.
If you can't find weblogic_sp.jar anywhere, try reinstalling the service
pack.
Hope that helps,
Nils
PeteTh wrote:
>
When I start WL6.1 with SP2, it tries to recompile (re: ejbc ?) one of my ejb jars.
Why does it do this. This gives NoClassDefFoundError exception as the bean references
utility classes which are only resolved by the class-path entry in the manifest
file e.g
Class-Path: /rdfinf.jar NRInfrastructure.jar
But these classes aren't on the classpath when starting WL6.1, if they were they
couldn't be redeployed. I think what is happening is the jar is being re ejbc
but the class path given to ejbc is obviously incorrect ?
The jar was produced by JBuilder6, I thought that maybe JBuilder6 didn't have
sp2 installed and therefore it was an sp1 ejbc'd jar so at start up it is re ejbc'd
But JB6 does have weblogic_sp.jar in its libraries BUT I can't find weblogic_sp.jar
anywhere on my bea\wlserver6.1 installation. I upgraded from wl6.1 sp1 to sp2,
and when wl6.1 starts up it clearly says sp2.
Any ideas ? I've been looking at this for days.
<22-Jan-02 16:30:14 GMT> <Info> <EJB> <EJB Deploying file: AccountManager.jar>
<22-Jan-02 16:30:14 GMT> <Info> <EJB> <The EJB deployment named: AccountManager.jar
is being recompiled within the WebLogic
onsult the server logs if there are any errors. It is also possible to run weblogic.ejbc
as a stand-alone tool to generate t
ses.>
<22-Jan-02 16:30:14 GMT> <Error> <J2EE> <Error deploying application AccountManager:
Unable to deploy EJB: AccountManager.jar from AccountManager.jar:
EJB : AccountManagerBean .Unable to initialize method info for remote
or home interface.The error is java.lang.NoCla
com/rdf/infrastructure/exceptions/RDFApplicationException
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
at java.lang.ClassLoader.loadClass(ClassLoader.java:290)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:339)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:156)
at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
at java.lang.Class.getMethods0(Native Method)
at java.lang.Class.getMethods(Class.java:742)
at weblogic.ejb20.deployer.ClientDrivenBeanInfoImpl.initializeMethodInfos(ClientDrivenBeanInfoImpl.java:955)
at weblogic.ejb20.deployer.ClientDrivenBeanInfoImpl.<init>(ClientDrivenBeanInfoImpl.java:210)
at weblogic.ejb20.deployer.SessionBeanInfoImpl.<init>(SessionBeanInfoImpl.java:103)
at weblogic.ejb20.deployer.BeanInfoImpl.createBeanInfoImpl(BeanInfoImpl.java:327)
at weblogic.ejb20.deployer.MBeanDeploymentInfoImpl.initializeBeanInfos(MBeanDeploymentInfoImpl.java:395)
at weblogic.ejb20.deployer.MBeanDeploymentInfoImpl.<init>(MBeanDeploymentInfoImpl.java:126)
at weblogic.ejb20.ejbc.EJBCompiler.setupEJB(EJBCompiler.java:128)
at weblogic.ejb20.deployer.Deployer.runEJBC(Deployer.java:295)
at weblogic.ejb20.deployer.Deployer.compileEJB(Deployer.java:684)
at weblogic.ejb20.deployer.Deployer.deploy(Deployer.java:851)
at weblogic.j2ee.EJBComponent.deploy(EJBComponent.java:30)
at weblogic.j2ee.Application.addComponent(Application.java:163)
at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:117)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:329)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(DeploymentTarget.java:279)
at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(DeploymentTarget.java:233)
at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(DeploymentTarget.java:193)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:636)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:621)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:359)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)--
============================
[email protected] -
Dear all friends,
As you probably know if EJB client wants to connect to EJB jar file that deployed in JServer we have to add that .jar file in our classpath otherwise EJB client throws exception.it seems to be owfull that for each .jar file that has been deployed in Jserver we have to add appropiate entry in classpath.and our classpath would be very long after time.
Could you please help that is there anyother option ?
Any suggestion would be appreciated.
Thank you very much
Amirali pourteymourRepackage them into one common Jar file. Maybe called 8iEJB.jar? Then a single entry on the classpath will suffice.
-
Webapp: ejb jars on servlet classpath
I have created a WebApplication (using WebLogic 5.1 sp8) that uses
the directory structure documented in http://www.weblogic.com/docs51/classdocs/webappguide.html#dirstruct
(with a web-inf/classes for servlet classes and web-inf/lib for
ejb jars)
According to http://www.weblogic.com/docs51/classdocs/API_ejb/EJB_deployover.html#1056431
, the public interface of my ejb's should be exported to the weblogic
classloader so that my servlet can use these classes when doing
remote calls.
When I run the weblogic console and check my web application's
servlet classpath however, I see that all jar files in web-inf/lib
have been included. So now my servlets have access to not only
the remote interface, but the entire implementation of my ejb's!
This is not what I want, or what should happen according to the
documentation.
Is there something I am doing wrong, is this a weblogic bug, or
is the documentation just wrong?
Luke Hutteman
Bank of America
In 5.1, ejb classloader will export public interfaces to weblogic
classloader automatically. And servlet can access those classes since
weblogic classloader is the parent of servlet classloader.
So, you do not need to pack your ejbs in jar and put them in WEB-INF/lib.
However, for application exception classes and other classes used by your
ejb, you have to pack them, either put them in weblogic.class.path or
WEB-INF/classes or WEB-INF/lib (as jar file)
My 2 cents.
Cheers - Wei
"Luke Hutteman" <[email protected]> wrote in message
news:[email protected]...
>
> I have created a WebApplication (using WebLogic 5.1 sp8) that uses
> the directory structure documented in
http://www.weblogic.com/docs51/classdocs/webappguide.html#dirstruct
> (with a web-inf/classes for servlet classes and web-inf/lib for
> ejb jars)
>
> According to
http://www.weblogic.com/docs51/classdocs/API_ejb/EJB_deployover.html#1056431
> , the public interface of my ejb's should be exported to the weblogic
> classloader so that my servlet can use these classes when doing
> remote calls.
>
> When I run the weblogic console and check my web application's
> servlet classpath however, I see that all jar files in web-inf/lib
> have been included. So now my servlets have access to not only
> the remote interface, but the entire implementation of my ejb's!
> This is not what I want, or what should happen according to the
> documentation.
>
> Is there something I am doing wrong, is this a weblogic bug, or
> is the documentation just wrong?
>
> Luke Hutteman
> Bank of America
>
-
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,
NilleCopy the Ejb jar file to the applications dir.
Maybe you are looking for
-
[MSI PRO MOD] At Doom's gate
Long ago i have this idea in my mind, but didn´t know how execute in a case mod. After several times thinking how to do it, i see the opportunity for this contest. I guess the image is obvious, but beyond that, i want to do a casemod based in doom un
-
Namespace problem while updating a desktop app
Hello, I've searched on a lot of forums but didn't find anything accurate on my problem. I have an old AIR 2.0 desktop app that updated itself. I want to update it to the last 3.4 framework. So I followed instructions for the intermediate application
-
Dialog progg....(matching Field values from Table)
Dear All, I have one screen 0100. At any stage, a field value entered in the screen field by user, should be matched from say EKBE table value with tolerance of 10-15%. If it doesn't matches, Error message should display in a dialo
-
Using my MacBook Pro as the host for projection to my TV via AppleTV?
Can I subscribe to HBOGO thru Apple TV and avoid cable service using my MacBook Pro as the host for projecting to my TV via AppleTV?S
-
Modification of LDB Selection screen
Hi All, I am currently working on a HR report and I am using the LDB PNPCE, which provides a default selection screen with two blocks and my requirement is to hide the first block i.e., the Reporting Period block. Can you please tell me how do I do t