Run As ejb-ref attributes
Hi everyone,
I'm reading WL6.1 documentation and I found a "Run As" attributes for web.xml configuration
file. I look at both DTD of web.xml and weblogic.xml and I didn't found any such
attribute?! Anyone have something to say to help me understanding what does it means.
I guess its have something to do with "impersonate" but it's doesn't seems standard?
Hello,
OracleAS 10g R3 (10.1.3) does support subject propagation, so you should be able to achieve what you want, if I do understand correctly your question.
Take a look to Enabling and Configuring Subject Propagation for ORMI.
Regards
Tugdual Grall
Similar Messages
-
Ejb-ref-mapping in orion-ejb.jar missing location attribute after deployment
I have noticed that on several of my entity beans that after deployment the <ebj-ref-mapping location="JNDIName" name="LocalName"/> is missing the location attribute. This causes any attempts to lookup the EJBHome for that EJB to fail because the path to the EJBHome in JNDI cannot be found (obviously!). The problem is that this causes me to manually edit the application-deployment/<app>/<ejb.jar>/orion-ejb.zml after each deployment via the admin.jar. This seems like a bug with OC4J and I am wondering if Oracle is aware/doing something to fix this?
I have noticed that the same problem exists for session beans, however, for some strange reason the EJBHomes can still be resolved in JNDI. In all cases the location in JNDI is different then the <ejb-ref-name> I used in the client EJB.
Example being I have an entity bean at com.foo.Foo and the session bean uses lookup("java:comp/env/ejb/Foo") it is still able to find the EJB even though the orion-ejb.xml looses the location attribute. If the case is an entity bean referencing another entity bean in the same fashion I get an error because the location attribute is missing.If the 'location' value is same as the 'name' value, then even though the location attribute is missing, it is ok and should work. If they are not the same, then you should have defined the ejb-link element in your ejb-jar.xml when defining this ejb-ref and that would make the location attribute appear in the generated orion-ejb-jar.xml.
If the referenced bean is from a different application (EAR), then you should have used the -parent option when deploying the application.
<BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Kris Trujillo ([email protected]):
I have noticed that on several of my entity beans that after deployment the <ebj-ref-mapping location="JNDIName" name="LocalName"/> is missing the location attribute. This causes any attempts to lookup the EJBHome for that EJB to fail because the path to the EJBHome in JNDI cannot be found (obviously!). The problem is that this causes me to manually edit the application-deployment/<app>/<ejb.jar>/orion-ejb.zml after each deployment via the admin.jar. This seems like a bug with OC4J and I am wondering if Oracle is aware/doing something to fix this?
I have noticed that the same problem exists for session beans, however, for some strange reason the EJBHomes can still be resolved in JNDI. In all cases the location in JNDI is different then the <ejb-ref-name> I used in the client EJB.
Example being I have an entity bean at com.foo.Foo and the session bean uses lookup("java:comp/env/ejb/Foo") it is still able to find the EJB even though the orion-ejb.xml looses the location attribute. If the case is an entity bean referencing another entity bean in the same fashion I get an error because the location attribute is missing.<HR></BLOCKQUOTE>
null -
Ejb-ref in oc4j 10.1.3.2.0 standalone
Hi,
i asked this before, but i didnt receive any answers. So i looked in more deeply to be more precise.
I developed and deployed a Webservice with JDEV 10.1.3 which looks up EJBs in a remote oc4j. I configured the ejb-references in web.xml and orion-web.xml like shown in the documentation by using ejb-ref-mapping attribute jndi-properties-file and remote-server-ref=true. That works fine in embedded oc4j 10.1.3.2.0.
If i deploy the same application to standalone oc4j 10.1.3.2.0 the application fails wih a naming exception. If i hardcode the jndi-properties again all works fine, so it seems to be a problem of configuration.
So i let print out some information about the InitialContext constructed im the ServiceLocator-Class i use:
ctx = new InitialContext( );
Hashtable ha = ResourceManager.getInitialEnvironment(null);
logger.debug("" + ha.get(InitialContext.PROVIDER_URL));
NamingEnumeration nenum = ctx.listBindings("java:comp/env");
There are indeed some differences between the standalone and the embedded as listed below:
embedded:
07/09/17 17:53:36 ormi://remote-IP: javax.naming.Reference:Reference Class Name: javax.ejb.EJBHome
Type: location
Content: MyBeanFacade
Type: remote-server-ref
Content: true
Type: jndi-properties-file
Content: jndi.properties
07/09/17 17:53:36 ejb: javax.naming.Context:[Context TestWS-org-webapp: {MyBeanFacade=Reference Class Name: javax.ejb.EJBHome
Type: location
Content: MyBeanFacade
Type: remote-server-ref
Content: true
Type: jndi-properties-file
Content: jndi.properties
, ejb/MBeanServerUserEjb=Reference Class Name: javax.ejb.EJBHome
Type: location
Content: MBeanServerUserEjb
standalone:
07/09/17 18:14:06 ormi://IP-ofTheHostOfOC4J:23791/default
07/09/17 18:14:06 MyBeanFacade: javax.naming.Reference:Reference Class Na
me: javax.ejb.EJBHome
Type: location
Content: MyBeanFacade
07/09/17 18:14:06 ejb: javax.naming.Context:[Context webapp: {MyBeanFacad
e=Reference Class Name: javax.ejb.EJBHome
Type: location
Content: MyBeanFacade
, ejb/MBeanServerUserEjb=Reference Class Name: javax.ejb.EJBHome
Type: location
Content: MBeanServerUserEjb
The difference is obvious.
Interestingly http://www.oracle.com/technology/oracleas/schema/orion-web-10_0.xsd
dosnt neither define jndi-properties-file nor remote-server-ref for ejb-ref-mapping. On the other hand, thats what one finds in the documentation.
Another problem is, that originally the oc4j tried to lookup with protocol ormis.
So i had first to delete ssl-port = "23943" from rmi.xml to see ormi.
Now on the first call of the Web Service after start of the server in fact the lookup goes to the remote-IP not to the IP-ofTheHostOfOC4J as written before. But the lookup fails with a namingexception anyway. After the second call the lookup goes to IP-ofTheHostOfOC4J again, even though the application is restarted or redeployed.
Its not very funny to go through this configuration issues with every new revision of the software. Perhaps the lack of feedback in this forum is a hint to open more often a tar than to post herein.
Regards chrisThank u both for your answers.
First of all this is not a Web Service specific issue at all, its about configuring ejb-references for web-components.
The difference was between embedded and standalone.
The reason for this behavior is a bug in 10.1.3.1 standalone.
I think this could be fixed in this 1/2 GB patch from july 2007, so why not upgrading to 10.1.3.3 for which i assume that it includes the fix as Olaf proposed following my proposal ;-)
Anyway you can work around it quite simple:
The reason is that during the deployment the contents of the custom (contained in the ear-file) orion-web.xml is not properly added to the generated orion-web.xml in applications-deployments.
The ejb-remote attrbiute is discarded.
So just add it to the generated orion-web.xml after the deployment and restart the oc4j. Dont redeploy or restart the application cause a redopleyment would overwrite your changes.
Thanks for my help :-)
Chris -
Dear all,
I try to set up a simple ejb environment. I managed to run the converter example from the JEE tutorial bundle in the NetBeans / Glassfish environment.
Then I tried to write a standalone java client. The code consists in essential of the statements
Context ctx = new InitialContext();
ctx.lookup("converter.ejb.Converter");Unfortunately, running this program from a windows command line by the "java" command (plus some classpath settings) results in:
NamingException: ejb ref resolution error for remote business interface converter.ejb.ConverterThe jndi entries of the app server are
jndi root
|
|-- converter.ejb.Converter#converter.ejb.Converter
|-- converter.ejb.Converter__3_x_Internal_RemoteBusinessHome__
|
|--ejb
|-- converter.ejb.Converter All environment settings are the standard ones.
Has anybody an idea, what the problem could be ? Thank you very much for your help.
RalphHi,
thanks for your interest. The client code is
// file ConverterClient
package ejb.clients;
import javax.naming.*;
import java.util.*;
public class ConverterClient
public static void main(String[] args)
try
Context ctx = new InitialContext();
ctx.lookup("converter.ejb.Converter");
Enumeration e = ctx.list("");
while (e.hasMoreElements())
System.out.println(e.nextElement());
catch(NamingException ex)
ex.printStackTrace();
}The interface:
// file Converter
package converter.ejb;
import java.math.BigDecimal;
import javax.ejb.Remote;
@Remote
public interface Converter {
public BigDecimal dollarToYen(BigDecimal dollars);
public BigDecimal yenToEuro(BigDecimal yen);
}The bean code is
// file ConverterBean
package converter.ejb;
import java.math.BigDecimal;
import javax.ejb.Stateless;
@Stateless
public class ConverterBean implements converter.ejb.Converter {
private BigDecimal euroRate = new BigDecimal("0.0070");
private BigDecimal yenRate = new BigDecimal("112.58");
public BigDecimal dollarToYen(BigDecimal dollars) {
BigDecimal result = dollars.multiply(yenRate);
return result.setScale(2, BigDecimal.ROUND_UP);
public BigDecimal yenToEuro(BigDecimal yen) {
BigDecimal result = yen.multiply(euroRate);
return result.setScale(2, BigDecimal.ROUND_UP);
}It's been deployed successfully with NetBeans on Glassfish app server.
The commands for compiling and running the client. "c:\java\JEE" is the installation dir for jee.
c:\java\programs\src javac -d .. -cp c:\java\JEE\lib\javaee.jar;c:\java\JEE\lib\appserv-rt.jar ConverterClient.java
c:\java\programs java -cp c:\java\JEE\lib\javaee.jar;c:\java\JEE\lib\appserv-rt.jar;. ejb.clients.ConverterClient -
Ejb-ref and JNDI lookup problem
Hi,
I use WLS6.1sp2. I created one EntityBean and SessionBean jar files. I tried to
use session bean to refer entity bean, I failed. The details are as following:
In EntityBean's weblogic-ejb-jar.xml, I set:
<jndi-name>cabin.CabinHome</jndi-name>
In sessionbean's ejb-jar.xml
<ejb-ref>
<ejb-ref-name>ejb/CabinHome</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<home>com.titan.cabin.CabinHome</home>
<remote>com.titan.cabin.Cabin</remote>
</ejb-ref>
In sessionbean's weblogic-ejb-jar.xml
<reference-descriptor>
<ejb-reference-description>
<ejb-ref-name>ejb/CabinHome</ejb-ref-name>
<jndi-name>ejb/CabinHome</jndi-name>
</ejb-reference-description>
</reference-descriptor>
At sessionbean's client, I use
javax.naming.Context jndiContext = getInitialContext();
Object obj = jndiContext.lookup("java:comp/env/ejb/CabinHome");
When I run client file, I get the following error message:
- with nested exception:
[javax.naming.LinkException: [Root exception is javax.naming.NameNotFoundException:
Unable to resolve ejb.CabinHome Resolved: '' Unresolved:'ejb' ; remaining name
'CabinHome']; Link Remaining Name: 'ejb/CabinHome']>
javax.naming.LinkException: . Root exception is javax.naming.NameNotFoundException:
Unable to resolve ejb.CabinHome Resolved: '' Unresolved:'ejb' ; remaining name
'CabinHome'
<<no stack trace available>>
--------------- nested within: ------------------
javax.ejb.EJBException
- with nested exception:
[javax.naming.LinkException: [Root exception is javax.naming.NameNotFoundException:
Unable to resolve ejb.CabinHome Resolved: '' Unresolved:'ejb' ; remaining name
'CabinHome']; Link Remaining Name: 'ejb/CabinHome']
at com.titan.travelagent.TravelAgentBean.listCabins(TravelAgentBean.java:45)
at com.titan.travelagent.TravelAgentBean_a4c3ph_EOImpl.listCabins(TravelAgentBean_a4c3ph_EOImpl.java:37)
at com.titan.travelagent.TravelAgentBean_a4c3ph_EOImpl_WLSkel.invoke(Unknown
Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:298)
at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:93)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:267)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
####<Feb 1, 2002 11:32:40 PM PST> <Info> <Management> <dj> <travelServer> <ExecuteThread:
'14' for queue: 'default'> <system> <> <140009> <Configuration changes for domain
saved to the repository.>
Do you know what's wrong? how to fix this problem?
Thanks in advance.
DJSlava,
I took "cabin." out from weblogic-ejb-jar.xml, I got the same error.
DJ
"Slava Imeshev" <[email protected]> wrote:
Hi DJ,
I think you don't need "cabin." in weblogic-ejb-jar.xml :
<jndi-name>cabin.CabinHome</jndi-name>
Regards,
Slava Imeshev
"DJ" <[email protected]> wrote in message
news:[email protected]...
Hi,
I use WLS6.1sp2. I created one EntityBean and SessionBean jar files.I
tried to
use session bean to refer entity bean, I failed. The details are asfollowing:
In EntityBean's weblogic-ejb-jar.xml, I set:
<jndi-name>cabin.CabinHome</jndi-name>
In sessionbean's ejb-jar.xml
<ejb-ref>
<ejb-ref-name>ejb/CabinHome</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<home>com.titan.cabin.CabinHome</home>
<remote>com.titan.cabin.Cabin</remote>
</ejb-ref>
In sessionbean's weblogic-ejb-jar.xml
<reference-descriptor>
<ejb-reference-description>
<ejb-ref-name>ejb/CabinHome</ejb-ref-name>
<jndi-name>ejb/CabinHome</jndi-name>
</ejb-reference-description>
</reference-descriptor>
At sessionbean's client, I use
javax.naming.Context jndiContext = getInitialContext();
Object obj = jndiContext.lookup("java:comp/env/ejb/CabinHome");
When I run client file, I get the following error message:
- with nested exception:
[javax.naming.LinkException: [Root exception is
javax.naming.NameNotFoundException:>> Unable to resolve ejb.CabinHome Resolved: '' Unresolved:'ejb' ; remaining>name>> 'CabinHome'; Link Remaining Name: 'ejb/CabinHome']>
javax.naming.LinkException: . Root exception isjavax.naming.NameNotFoundException:
Unable to resolve ejb.CabinHome Resolved: '' Unresolved:'ejb' ; remainingname
'CabinHome'
<<no stack trace available>>
--------------- nested within: ------------------
javax.ejb.EJBException
- with nested exception:
[javax.naming.LinkException: [Root exception is
javax.naming.NameNotFoundException:>> Unable to resolve ejb.CabinHome Resolved: '' Unresolved:'ejb' ; remaining>name>> 'CabinHome'; Link Remaining Name: 'ejb/CabinHome']
atcom.titan.travelagent.TravelAgentBean.listCabins(TravelAgentBean.java:45)
atcom.titan.travelagent.TravelAgentBean_a4c3ph_EOImpl.listCabins(TravelAgentBe
an_a4c3ph_EOImpl.java:37)
atcom.titan.travelagent.TravelAgentBean_a4c3ph_EOImpl_WLSkel.invoke(Unknown
Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:298)
atweblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java
:93)
atweblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:267)
atweblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:2
2)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
####<Feb 1, 2002 11:32:40 PM PST> <Info> <Management> <dj> <travelServer><ExecuteThread:
'14' for queue: 'default'> <system> <> <140009> <Configuration changesfor
domain
saved to the repository.>
Do you know what's wrong? how to fix this problem?
Thanks in advance.
DJ -
hi,
i get this following error when i start the WL 7.0. The web application fails
to start but the ejbs are started properly. This is an example from the Monson
Haefel book, on the CMP: Entity bean relationships.
Can anybody tell me what is happening ??
-thanks
-vasanth
Error log:
=============
<Error> <HTTP> <101179> <[HTTP] Error parsing des criptor in Web appplication
"C:\bea\user_projects\mydomain\.\myserver\.wlnotdele
te\titan\titan.war" [Path="C:\eclipse\workspace\titan4\dist\titan.ear", URI="tit
an.war"
weblogic.xml.dom.ChildCountException: missing child home in ejb-ref
at weblogic.xml.dom.DOMUtils.getElementByTagName(DOMUtils.java:147)
at weblogic.xml.dom.DOMUtils.getValueByTagName(DOMUtils.java:128)
at weblogic.servlet.internal.dd.EJBReference.<init>(EJBReference.java:61
at weblogic.servlet.internal.dd.WebAppDescriptor.<init>(WebAppDescriptor
.java:247)
at weblogic.servlet.internal.dd.DescriptorLoader.initializeWebXml(Descri
ptorLoader.java:540)
at weblogic.servlet.internal.dd.DescriptorLoader.<init>(DescriptorLoader
.java:253)
at weblogic.servlet.internal.dd.DescriptorLoader.<init>(DescriptorLoader
.java:215)
at weblogic.servlet.internal.WebAppModule.loadDescriptor(WebAppModule.ja
va:282)
at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
er.java:714)
at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
er.java:555)
at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
er.java:458)
at weblogic.management.deploy.slave.SlaveDeployer.prepareAllStagedApplic
ations(SlaveDeployer.java:490)
at weblogic.management.deploy.slave.SlaveDeployer.initialize(SlaveDeploy
er.java:253)
at weblogic.management.deploy.DeploymentManagerServerLifeCycleImpl.initi
alize(DeploymentManagerServerLifeCycleImpl.java:150)
at weblogic.t3.srvr.ServerLifeCycleList.initialize(ServerLifeCycleList.j
ava:54)
at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:782)
at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:594)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:282)
at weblogic.Server.main(Server.java:32)
>
<Jun 23, 2003 10:10:51 AM CDT> <Error> <Deployer> <149205> <The Slave Deployer
f
ailed to initialize the application titan due to error weblogic.management.Appli
cationException: Prepare failed. Task Id = null
Module Name: titan.war, Error: Could not load web application from 'C:\bea\user_
projects\mydomain\.\myserver\.wlnotdelete\titan\titan.war'
weblogic.management.ApplicationException: Prepare failed. Task Id = null
Module Name: titan.war, Error: Could not load web application from 'C:\bea\user_
projects\mydomain\.\myserver\.wlnotdelete\titan\titan.war'
at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
er.java:720)
at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
er.java:555)
at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
er.java:458)
at weblogic.management.deploy.slave.SlaveDeployer.prepareAllStagedApplic
ations(SlaveDeployer.java:490)
at weblogic.management.deploy.slave.SlaveDeployer.initialize(SlaveDeploy
er.java:253)
at weblogic.management.deploy.DeploymentManagerServerLifeCycleImpl.initi
alize(DeploymentManagerServerLifeCycleImpl.java:150)
at weblogic.t3.srvr.ServerLifeCycleList.initialize(ServerLifeCycleList.j
ava:54)
at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:782)
at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:594)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:282)
at weblogic.Server.main(Server.java:32)
>It is working now.
For a local entity bean, i was using <ejb-ref> instead of <local-ejb-ref>
Once i changed that, it worlked.
thanks
-vasanth
"Sanjeev Chopra" <[email protected]> wrote:
correct url for doc...
http://e-docs.bea.com/wls/docs81/webapp/web_xml.html#1020090
"Sanjeev Chopra" <[email protected]> wrote in message
news:[email protected]...
Seems like titan.war's WEB-INF/web.xml has an ejb-ref element witha
missing
<home> element .
see http://e-docs/wls/docs81/webapp/web_xml.html#1020090
"Vasanth" <[email protected]> wrote in message
news:[email protected]...
hi,
i get this following error when i start the WL 7.0. The web applicationfails
to start but the ejbs are started properly. This is an example from
the
Monson
Haefel book, on the CMP: Entity bean relationships.
Can anybody tell me what is happening ??
-thanks
-vasanth
Error log:
=============
<Error> <HTTP> <101179> <[HTTP] Error parsing des criptor in Webappplication
"C:\bea\user_projects\mydomain\.\myserver\.wlnotdele
te\titan\titan.war" [Path="C:\eclipse\workspace\titan4\dist\titan.ear",URI="tit
an.war"
weblogic.xml.dom.ChildCountException: missing child home in ejb-ref
atweblogic.xml.dom.DOMUtils.getElementByTagName(DOMUtils.java:147)
at
weblogic.xml.dom.DOMUtils.getValueByTagName(DOMUtils.java:128)
atweblogic.servlet.internal.dd.EJBReference.<init>(EJBReference.java:61
atweblogic.servlet.internal.dd.WebAppDescriptor.<init>(WebAppDescriptor
java:247)
atweblogic.servlet.internal.dd.DescriptorLoader.initializeWebXml(Descri
ptorLoader.java:540)
atweblogic.servlet.internal.dd.DescriptorLoader.<init>(DescriptorLoader
java:253)
atweblogic.servlet.internal.dd.DescriptorLoader.<init>(DescriptorLoader
java:215)
atweblogic.servlet.internal.WebAppModule.loadDescriptor(WebAppModule.ja
va:282)
atweblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
er.java:714)
atweblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
er.java:555)
atweblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
er.java:458)
atweblogic.management.deploy.slave.SlaveDeployer.prepareAllStagedApplic
ations(SlaveDeployer.java:490)
atweblogic.management.deploy.slave.SlaveDeployer.initialize(SlaveDeploy
er.java:253)
atweblogic.management.deploy.DeploymentManagerServerLifeCycleImpl.initi
alize(DeploymentManagerServerLifeCycleImpl.java:150)
atweblogic.t3.srvr.ServerLifeCycleList.initialize(ServerLifeCycleList.j
ava:54)
at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:782)
at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:594)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:282)
at weblogic.Server.main(Server.java:32)
>
<Jun 23, 2003 10:10:51 AM CDT> <Error> <Deployer> <149205> <The SlaveDeployer
f
ailed to initialize the application titan due to errorweblogic.management.Appli
cationException: Prepare failed. Task Id = null
Module Name: titan.war, Error: Could not load web application from'C:\bea\user_
projects\mydomain\.\myserver\.wlnotdelete\titan\titan.war'
weblogic.management.ApplicationException: Prepare failed. Task Id
= null
Module Name: titan.war, Error: Could not load web application from'C:\bea\user_
projects\mydomain\.\myserver\.wlnotdelete\titan\titan.war'
atweblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
er.java:720)
atweblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
er.java:555)
atweblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
er.java:458)
atweblogic.management.deploy.slave.SlaveDeployer.prepareAllStagedApplic
ations(SlaveDeployer.java:490)
atweblogic.management.deploy.slave.SlaveDeployer.initialize(SlaveDeploy
er.java:253)
atweblogic.management.deploy.DeploymentManagerServerLifeCycleImpl.initi
alize(DeploymentManagerServerLifeCycleImpl.java:150)
atweblogic.t3.srvr.ServerLifeCycleList.initialize(ServerLifeCycleList.j
ava:54)
at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:782)
at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:594)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:282)
at weblogic.Server.main(Server.java:32)
> -
Could not dereference object when running the EJB
Hi,
I want to reference my jsp page to EJB but get a "could not dereference object" upon running the jsp with this as it went into the catch exception instead of looking up to the EJB:
Part of my jsp codes in jspinit( ):
try {
objref = initial.lookup("java:comp/env/ejb/MyMusicCart");
System.out.println("lookup success for ejb/MyMusicCart");
// a reference to the home interface is shareable
cartHome = (MusicCartHome)PortableRemoteObject.narrow(objref, MusicCartHome.class);
System.out.println("created MusicCartHome object");
} catch (Exception ex) {
System.out.println("Unexpected Exception: " +ex.getMessage());
My web.xml
Code:
<ejb-ref>
<ejb-ref-name>ejb/MyMusicCart</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>asg.MusicCartEJB.MusicCartHome</home>
<remote>asg.MusicCartEJB.MusicCart </remote>
<ejb-link>ejb-jar-ic.jar#MusicCartBean</ejb-link>
</ejb-ref>
anyone encounter this problem before? Please help.. I
I can produce more of my files if you guys feel that is not enough
Message was edited by:
[email protected]Is the EJB you are referencing part of the same EAR file as your JSP?
-- Rob
WLS Blog http://dev2dev.bea.com/blog/rwoollen/ -
1.if an entity-A is referece to entity-B , and entity-B
is referece to entity-C (and that is
declared in entity-B 'ejb-jar.xml' !) , when adding
'ejb-local-ref' to entity-A ,beside of adding
entity-B,should entity-C be added too ,or a one can
assume that the EJB container will use the already define
reference between entity-B and entity-C.
This is a simple situation , what about a whole graph
of references ? should one keep track on the whole graph
or let the container do that for him ?!
2.I got several entity beans.
I wrapped the session beans in a java class as a manager.(through the local interfaces) - and now i created a session bean that uses the data managers layer - I defined an ejb ref to all related entity beans (in the seiion bean ejb - jar file) ....when i run the sesiion functions i get EJBException - not bound (refering the entity bean local home) ?????
Thanks,
LiatIn jboss xml the entity is defined like this:
<entity>
<ejb-name>User</ejb-name>
<local-jndi-name>ejb/persistence.UserLocal</local-jndi-name>
<jndi-name>ejb/persistence.User</jndi-name>
</entity>and in the ejb jar the local ref is:
<ejb-local-ref>
<ejb-ref-name>Permission</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>persistence.PermissionLocalHome</local-home>
<local>persistence.PermissionLocal</local>
<ejb-link>Permission</ejb-link>
</ejb-local-ref>I am looking for the object - in the data manager (which used by the session bean) this way:
permissionLocalHome = (PermissionLocalHome) locator.getEjbLocalHome("java:comp/env/ejb/persistence.PermissionLocal");thanks for the help -
if i do not write <ejb-ref> in ejb-jar.xml,what will happen?the application
can not run or performance is low?
and is there any difference between bmp and cmp?i mean "does cmp need
<ejb-ref>?"
Ciao,
zhxtIn WLS you can have either global JNDI names that are visible throughout
the server or JNDI names that are local to your application.
The recommended best practice these days is to use ejb-refs and/or
ejb-links to lookup your EJBs. For local EJBs, you don't need to have a
global JNDI name since they are not visible to other applications.
-- Rob
scratchback wrote:
hi, I asked this last week but nobody answered it.
i am really curious about it and i checked some docs it said " it is useful
coz beans can look each other up without needing to initialize JNDI to any
particular driver".
i wonder what means particular driver and when there will be great
difference between using and not using.
thanx in advance
Ciao,
zhxt -
Ejb-ref in the deployment descriptor
Could someone help me on how to configure an ejb-reference in the 3 xml
files.
ejb-jar.xml, weblogic-ejb-jar.xml and web.xml
These are the entries for my application, but I get some exception. Can
somebody help me pls?
ejb-jar.xml
<enterprise-beans>
<session id="Abcd">
<small-icon></small-icon>
<ejb-name>ABCD</ejb-name>
<home>AbcdHome</home>
<remote>AbcdRemote</remote>
<ejb-class>AbcdBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
web.xml contains the foll,
<ejb-ref>
<ejb-ref-name>ejb/abcd</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>AbcdHome</home>
<remote>AbcdRemote</remote>
<ejb-link>ABCD</ejb-link>
</ejb-ref>
weblogic.ejb-jar.xml contains,
<weblogic-enterprise-bean>
<ejb-name>ABCD</ejb-name>
<caching-descriptor>
<max-beans-in-free-pool>100</max-beans-in-free-pool>
</caching-descriptor>
<reference-descriptor>
<ejb-reference-description>
<ejb-ref-name>ejb/abcd</ejb-ref-name>
<jndi-name>ejb/ABCD</jndi-name>
</ejb-reference-description>
</reference-descriptor>
</weblogic-enterprise-bean>
But when i run the application, I get the foll exception,
In EJB RemotePlatform, a session or entity bean that has a remote home m
ust be given a JNDI name in the weblogic-ejb-jar.xml descriptor file.
at weblogic.ejb20.compliance.EJBComplianceChecker.check(EJBComplianceChe
cker.java:256)
at weblogic.ejb20.compliance.EJBComplianceChecker.checkDeploymentInfo(EJ
BComplianceChecker.java:220)
at weblogic.ejb20.ejbc.EJBCompiler.complianceCheckJar(EJBCompiler.java:4
52)
at weblogic.ejb20.ejbc.EJBCompiler.checkCompliance(EJBCompiler.java:409)
at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:202)
at weblogic.ejb20.deployer.Deployer.runEJBC(Deployer.java:296)
at weblogic.ejb20.deployer.Deployer.compileEJB(Deployer.java:676)
at weblogic.ejb20.deployer.Deployer.deploy(Deployer.java:843)
at weblogic.j2ee.EJBComponent.deploy(EJBComponent.java:30)
at weblogic.j2ee.Application.addComponent(Application.java:160)
at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:117)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
oymentTarget.java:329)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(Dep
loymentTarget.java:279)
at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeploy
ments(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(DynamicMB
eanImpl.java:606)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
.java:590)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:350)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
at $Proxy34.updateDeployments(Unknown Source)
at weblogic.management.configuration.ServerMBean_CachingStub.updateDeplo
yments(ServerMBean_CachingStub.java:2706)
at weblogic.management.mbeans.custom.ApplicationManager.startConfigManag
er(ApplicationManager.java:360)
at weblogic.management.mbeans.custom.ApplicationManager.start(Applicatio
nManager.java:152)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
eanImpl.java:606)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
.java:590)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:350)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
at $Proxy48.start(Unknown Source)
at weblogic.management.configuration.ApplicationManagerMBean_CachingStub
.start(ApplicationManagerMBean_CachingStub.java:479)
at weblogic.management.Admin.startApplicationManager(Admin.java:1138)
at weblogic.management.Admin.finish(Admin.java:561)
at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:501)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:198)
at weblogic.Server.main(Server.java:35)
>
<Jan 31, 2002 3:56:18 PM PST> <Error> <J2EE> <Error deploying application
Defaul
tVoiceApp: Could not load DefaultVoiceApp>
java.lang.reflect.UndeclaredThrowableException:
weblogic.xml.dom.DOMProcessingEx
ception: Could not setup environment for EJBReference or ResourceReference.
Can
not find WEB-INF/weblogic.xml in the Web application.
at weblogic.servlet.internal.WebAppServletContext.initFromDescriptors(We
bAppServletContext.java:1509)
at weblogic.servlet.internal.WebAppServletContext.init(WebAppServletCont
ext.java:871)
at weblogic.servlet.internal.WebAppServletContext.<init>(WebAppServletCo
ntext.java:806)
at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:413)
at weblogic.j2ee.WebAppComponent.deploy(WebAppComponent.java:74)
at weblogic.j2ee.Application.addComponent(Application.java:160)
at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:117)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
oymentTarget.java:329)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
oymentTarget.java:144)
at weblogic.management.mbeans.custom.WebServer.addWebDeployment(WebServe
r.java:76)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
eanImpl.java:606)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
.java:590)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:350)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
at $Proxy35.addWebDeployment(Unknown Source)
at weblogic.management.configuration.WebServerMBean_CachingStub.addWebDe
ployment(WebServerMBean_CachingStub.java:1093)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
oymentTarget.java:315)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(Dep
loymentTarget.java:279)
at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeploy
ments(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(DynamicMB
eanImpl.java:606)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
.java:590)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:350)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
at $Proxy34.updateDeployments(Unknown Source)
at weblogic.management.configuration.ServerMBean_CachingStub.updateDeplo
yments(ServerMBean_CachingStub.java:2706)
at weblogic.management.mbeans.custom.ApplicationManager.startConfigManag
er(ApplicationManager.java:360)
at weblogic.management.mbeans.custom.ApplicationManager.start(Applicatio
nManager.java:152)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
eanImpl.java:606)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
.java:590)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:350)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
at $Proxy48.start(Unknown Source)
at weblogic.management.configuration.ApplicationManagerMBean_CachingStub
.start(ApplicationManagerMBean_CachingStub.java:479)
at weblogic.management.Admin.startApplicationManager(Admin.java:1138)
at weblogic.management.Admin.finish(Admin.java:561)
at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:501)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:198)
at weblogic.Server.main(Server.java:35)
--------------- nested within: ------------------
weblogic.j2ee.DeploymentException: Could not load DefaultVoiceApp - with
nested
exception:
[weblogic.xml.dom.DOMProcessingException: Could not setup environment for
EJBRef
erence or ResourceReference. Cannot find WEB-INF/weblogic.xml in the Web
applic
ation.]
at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:416)
at weblogic.j2ee.WebAppComponent.deploy(WebAppComponent.java:74)
at weblogic.j2ee.Application.addComponent(Application.java:160)
at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:117)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
oymentTarget.java:329)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
oymentTarget.java:144)
at weblogic.management.mbeans.custom.WebServer.addWebDeployment(WebServe
r.java:76)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
eanImpl.java:606)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
.java:590)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:350)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
at $Proxy35.addWebDeployment(Unknown Source)
at weblogic.management.configuration.WebServerMBean_CachingStub.addWebDe
ployment(WebServerMBean_CachingStub.java:1093)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
oymentTarget.java:315)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(Dep
loymentTarget.java:279)
at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeploy
ments(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(DynamicMB
eanImpl.java:606)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
.java:590)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:350)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
at $Proxy34.updateDeployments(Unknown Source)
at weblogic.management.configuration.ServerMBean_CachingStub.updateDeplo
yments(ServerMBean_CachingStub.java:2706)
at weblogic.management.mbeans.custom.ApplicationManager.startConfigManag
er(ApplicationManager.java:360)
at weblogic.management.mbeans.custom.ApplicationManager.start(Applicatio
nManager.java:152)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
eanImpl.java:606)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
.java:590)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:350)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
at $Proxy48.start(Unknown Source)
at weblogic.management.configuration.ApplicationManagerMBean_CachingStub
.start(ApplicationManagerMBean_CachingStub.java:479)
at weblogic.management.Admin.startApplicationManager(Admin.java:1138)
at weblogic.management.Admin.finish(Admin.java:561)
at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:501)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:198)
at weblogic.Server.main(Server.java:35)
Can someone help me on what to set in sequence please. Any help would highly
be appreciated.
Thanks in advance.
Regards
AruAaru,
Verify the document structure @
http://e-docs.bea.com/wls/docs61/ejb/reference.html#1026457
jndi-name is of the ejb is missing in your WEJ.xml
and the jndi-name defined under
<reference-descriptor><ejb-reference-description>
</reference-descriptor></ejb-reference-description>
is the reference jndi-name(referenced by this bean)
For more info refere
the weblogic 6.x dtd
http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd
Venki..
Aru wrote:
As per the doc that you referred, the doc too says that the jndi-name should
be within the ejb-reference-description which in turn is inside the
reference-descriptor. I don't get what you tried to say. Am I missing
anything? Could you please make sure that for me.
Just with curiosity I even tried your suggestion but it gives me the
exception as expected,
The XML parser encountered an error in your deployment descriptor. Please
ensure
that your deployment descriptor corresponds to the format in the DTD. The
error
was:
org.xml.sax.SAXParseException: The content of element type
"ejb-reference-descr
iption" is incomplete, it must match "(ejb-ref-name,jndi-name)".
"Venki Seshaadri" <[email protected]> wrote in message
news:[email protected]...
Aaru,
<jndi-name> should be outside <reference-descriptor>
refer to http://e-docs.bea.com/wls/docs61/ejb/reference.html#1026457
<weblogic-enterprise-bean>
<reference-descriptor>...</reference-descriptor>
<jndi-name>ejb/ABCD</jndi-name>
</weblogic-enterprise-bean>
Hope this helps,
Venki
[email protected]
Aru wrote:
FYI, I am using Weblogic 6.1
"Aru" <[email protected]> wrote in message
news:[email protected]...
Could someone help me on how to configure an ejb-reference in the 3 xml
files.
ejb-jar.xml, weblogic-ejb-jar.xml and web.xml
These are the entries for my application, but I get some exception. Can
somebody help me pls?
ejb-jar.xml
<enterprise-beans>
<session id="Abcd">
<small-icon></small-icon>
<ejb-name>ABCD</ejb-name>
<home>AbcdHome</home>
<remote>AbcdRemote</remote>
<ejb-class>AbcdBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
web.xml contains the foll,
<ejb-ref>
<ejb-ref-name>ejb/abcd</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>AbcdHome</home>
<remote>AbcdRemote</remote>
<ejb-link>ABCD</ejb-link>
</ejb-ref>
weblogic.ejb-jar.xml contains,
<weblogic-enterprise-bean>
<ejb-name>ABCD</ejb-name>
<caching-descriptor>
<max-beans-in-free-pool>100</max-beans-in-free-pool>
</caching-descriptor>
<reference-descriptor>
<ejb-reference-description>
<ejb-ref-name>ejb/abcd</ejb-ref-name>
<jndi-name>ejb/ABCD</jndi-name>
</ejb-reference-description>
</reference-descriptor>
</weblogic-enterprise-bean>
But when i run the application, I get the foll exception,
In EJB RemotePlatform, a session or entity bean that has a remote home m
ust be given a JNDI name in the weblogic-ejb-jar.xml descriptor file.
at weblogic.ejb20.compliance.EJBComplianceChecker.check(EJBComplianceChe
cker.java:256)
at weblogic.ejb20.compliance.EJBComplianceChecker.checkDeploymentInfo(EJ
BComplianceChecker.java:220)
at weblogic.ejb20.ejbc.EJBCompiler.complianceCheckJar(EJBCompiler.java:4
52)
at weblogic.ejb20.ejbc.EJBCompiler.checkCompliance(EJBCompiler.java:409)
at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:202)
at weblogic.ejb20.deployer.Deployer.runEJBC(Deployer.java:296)
at weblogic.ejb20.deployer.Deployer.compileEJB(Deployer.java:676)
at weblogic.ejb20.deployer.Deployer.deploy(Deployer.java:843)
at weblogic.j2ee.EJBComponent.deploy(EJBComponent.java:30)
at weblogic.j2ee.Application.addComponent(Application.java:160)
at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:117)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
oymentTarget.java:329)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(Dep
loymentTarget.java:279)
at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeploy
ments(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(DynamicMB
eanImpl.java:606)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
.java:590)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:350)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
at $Proxy34.updateDeployments(Unknown Source)
at weblogic.management.configuration.ServerMBean_CachingStub.updateDeplo
yments(ServerMBean_CachingStub.java:2706)
at weblogic.management.mbeans.custom.ApplicationManager.startConfigManag
er(ApplicationManager.java:360)
at weblogic.management.mbeans.custom.ApplicationManager.start(Applicatio
nManager.java:152)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
eanImpl.java:606)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
.java:590)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:350)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
at $Proxy48.start(Unknown Source)
at weblogic.management.configuration.ApplicationManagerMBean_CachingStub
.start(ApplicationManagerMBean_CachingStub.java:479)
at weblogic.management.Admin.startApplicationManager(Admin.java:1138)
at weblogic.management.Admin.finish(Admin.java:561)
at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:501)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:198)
at weblogic.Server.main(Server.java:35)
<Jan 31, 2002 3:56:18 PM PST> <Error> <J2EE> <Error deploying
application
Defaul
tVoiceApp: Could not load DefaultVoiceApp>
java.lang.reflect.UndeclaredThrowableException:
weblogic.xml.dom.DOMProcessingEx
ception: Could not setup environment for EJBReference or
ResourceReference.
Can
not find WEB-INF/weblogic.xml in the Web application.
at weblogic.servlet.internal.WebAppServletContext.initFromDescriptors(We
bAppServletContext.java:1509)
at weblogic.servlet.internal.WebAppServletContext.init(WebAppServletCont
ext.java:871)
at weblogic.servlet.internal.WebAppServletContext.<init>(WebAppServletCo
ntext.java:806)
at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:413)
at weblogic.j2ee.WebAppComponent.deploy(WebAppComponent.java:74)
at weblogic.j2ee.Application.addComponent(Application.java:160)
at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:117)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
oymentTarget.java:329)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
oymentTarget.java:144)
at weblogic.management.mbeans.custom.WebServer.addWebDeployment(WebServe
r.java:76)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
eanImpl.java:606)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
.java:590)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:350)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
at $Proxy35.addWebDeployment(Unknown Source)
at weblogic.management.configuration.WebServerMBean_CachingStub.addWebDe
ployment(WebServerMBean_CachingStub.java:1093)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
oymentTarget.java:315)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(Dep
loymentTarget.java:279)
at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeploy
ments(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(DynamicMB
eanImpl.java:606)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
.java:590)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:350)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
at $Proxy34.updateDeployments(Unknown Source)
at weblogic.management.configuration.ServerMBean_CachingStub.updateDeplo
yments(ServerMBean_CachingStub.java:2706)
at weblogic.management.mbeans.custom.ApplicationManager.startConfigManag
er(ApplicationManager.java:360)
at weblogic.management.mbeans.custom.ApplicationManager.start(Applicatio
nManager.java:152)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
eanImpl.java:606)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
.java:590)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:350)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
at $Proxy48.start(Unknown Source)
at weblogic.management.configuration.ApplicationManagerMBean_CachingStub
.start(ApplicationManagerMBean_CachingStub.java:479)
at weblogic.management.Admin.startApplicationManager(Admin.java:1138)
at weblogic.management.Admin.finish(Admin.java:561)
at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:501)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:198)
at weblogic.Server.main(Server.java:35)
--------------- nested within: ------------------
weblogic.j2ee.DeploymentException: Could not load DefaultVoiceApp - with
nested
exception:
[weblogic.xml.dom.DOMProcessingException: Could not setup environment
for> >>>>EJBRef>>>>erence or ResourceReference. Cannot find WEB-INF/weblogic.xml in the Web>>>>applic>>>>ation.
at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:416)
at weblogic.j2ee.WebAppComponent.deploy(WebAppComponent.java:74)
at weblogic.j2ee.Application.addComponent(Application.java:160)
at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:117)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
oymentTarget.java:329)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
oymentTarget.java:144)
at weblogic.management.mbeans.custom.WebServer.addWebDeployment(WebServe
r.java:76)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
eanImpl.java:606)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
.java:590)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:350)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
at $Proxy35.addWebDeployment(Unknown Source)
at weblogic.management.configuration.WebServerMBean_CachingStub.addWebDe
ployment(WebServerMBean_CachingStub.java:1093)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
oymentTarget.java:315)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(Dep
loymentTarget.java:279)
at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeploy
ments(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(DynamicMB
eanImpl.java:606)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
.java:590)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:350)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
at $Proxy34.updateDeployments(Unknown Source)
at weblogic.management.configuration.ServerMBean_CachingStub.updateDeplo
yments(ServerMBean_CachingStub.java:2706)
at weblogic.management.mbeans.custom.ApplicationManager.startConfigManag
er(ApplicationManager.java:360)
at weblogic.management.mbeans.custom.ApplicationManager.start(Applicatio
nManager.java:152)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
eanImpl.java:606)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
.java:590)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:350)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
at $Proxy48.start(Unknown Source)
at weblogic.management.configuration.ApplicationManagerMBean_CachingStub
.start(ApplicationManagerMBean_CachingStub.java:479)
at weblogic.management.Admin.startApplicationManager(Admin.java:1138)
at weblogic.management.Admin.finish(Admin.java:561)
at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:501)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:198)
at weblogic.Server.main(Server.java:35)
Can someone help me on what to set in sequence please. Any help would
highly
be appreciated.
Thanks in advance.
Regards
Aru -
Client using ejb-ref to lookup
Hi,
I read the docs, I searched for answers but there are still some things I don't
understand regarding a stand alone client application to a weblogic server 8.1
that could look up a bean using ejb-ref. I don't want to use the JNDI name.
There is the client-application.xml and the MyClientJar.runtime.xml but i'm not
sure I understand where to put them. I have the client-application.xml in my
client jar, the runtime.xml one in the same directory like specified in the
documentation, I tried to put the xml and the jar in my classpath and running
the client, no success the client cannot lookup using ejb-ref
I read that MyClientJar.jar should go in my ServerModule.ear so I did that too,
still doesn't work.
Something I'm not doing right or something I don't understand.
Any help or comments appreciated
Thank You
MaxHi,
I read the docs, I searched for answers but there are still some things I don't
understand regarding a stand alone client application to a weblogic server 8.1
that could look up a bean using ejb-ref. I don't want to use the JNDI name.
There is the client-application.xml and the MyClientJar.runtime.xml but i'm not
sure I understand where to put them. I have the client-application.xml in my
client jar, the runtime.xml one in the same directory like specified in the
documentation, I tried to put the xml and the jar in my classpath and running
the client, no success the client cannot lookup using ejb-ref
I read that MyClientJar.jar should go in my ServerModule.ear so I did that too,
still doesn't work.
Something I'm not doing right or something I don't understand.
Any help or comments appreciated
Thank You
Max -
How to run the ejb project in j2ee server
How to run the EJB project.
I give like
java conveterClient converterClient.jar
here conveterClient is class file name and converterClient.jar is deployed file
like wise i give some exception is come
give some help pls friendsNavigate to the "DBOrders" module in the catalog, right click on the "ORDERS" database below and click "Export Schema Stucture". That will produce a file containing the DML needed to create the database
-
Ejb-ref error when deploying a previously working ear on weblogic 8.1
when deploying an ear module on weblogic 8.1 i get the following error:
The ejb-link 'CustomessagingBrick.jar/CustomMessaginBrick' declared in ejb-ref
or ejb-local-ref 'ejb/Service2' in the application module 'cmbrick.war' could
not be resolved. The target EJB for the ejb ref could not be found.
The ear is composed of two sub-modules:
CustomMessaginBrick.jar
cmbrick.war.
The same ear was deployed on weblogic 6.1.
Every reference in the ear seems in the right place so i am really clueless.
Hereafter i include the relevant portions of the deployment descriptors.
the web.xml for cmbrick.war contains the following data:
<ejb-local-ref>
<ejb-ref-name>ejb/Service2</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>com.hutchison3g.core.brick.custom.messaging.CustomMessagingBrickLocalHome</local-home>
<local>com.hutchison3g.core.brick.custom.messaging.CustomMessagingBrickLocal</local>
<ejb-link>CustomMessagingBrick</ejb-link>
</ejb-local-ref>
its weblogic.xml file is the following:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 8.1//EN"
"http://www.bea.com/servers/wls810/dtd/weblogic810-web-jar.dtd">
<weblogic-web-app>
<reference-descriptor>
<ejb-reference-description>
<ejb-ref-name>ejb/Service2</ejb-ref-name>
<jndi-name>Service2</jndi-name>
</ejb-reference-description>
</reference-descriptor>
</weblogic-web-app>
while the weblogic-ejb-jar for CustomMessaging bricks contains the following:
<weblogic-enterprise-bean>
<ejb-name>CustomMessagingBrick</ejb-name>
<stateless-session-descriptor>
<pool>
</pool>
<stateless-clustering>
</stateless-clustering>
</stateless-session-descriptor>
<transaction-descriptor>
</transaction-descriptor>
<enable-call-by-reference>True</enable-call-by-reference>
<jndi-name>Service2</jndi-name>
</weblogic-enterprise-bean>....when deploying an ear module on weblogic 8.1 i get the following error:
The ejb-link 'CustomessagingBrick.jar/CustomMessaginBrick' declared in ejb-ref
or ejb-local-ref 'ejb/Service2' in the application module 'cmbrick.war' could
not be resolved. The target EJB for the ejb ref could not be found.
The ear is composed of two sub-modules:
CustomMessaginBrick.jar
cmbrick.war.
The same ear was deployed on weblogic 6.1.
Every reference in the ear seems in the right place so i am really clueless.
Hereafter i include the relevant portions of the deployment descriptors.
the web.xml for cmbrick.war contains the following data:
<ejb-local-ref>
<ejb-ref-name>ejb/Service2</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>com.hutchison3g.core.brick.custom.messaging.CustomMessagingBrickLocalHome</local-home>
<local>com.hutchison3g.core.brick.custom.messaging.CustomMessagingBrickLocal</local>
<ejb-link>CustomMessagingBrick</ejb-link>
</ejb-local-ref>
its weblogic.xml file is the following:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 8.1//EN"
"http://www.bea.com/servers/wls810/dtd/weblogic810-web-jar.dtd">
<weblogic-web-app>
<reference-descriptor>
<ejb-reference-description>
<ejb-ref-name>ejb/Service2</ejb-ref-name>
<jndi-name>Service2</jndi-name>
</ejb-reference-description>
</reference-descriptor>
</weblogic-web-app>
while the weblogic-ejb-jar for CustomMessaging bricks contains the following:
<weblogic-enterprise-bean>
<ejb-name>CustomMessagingBrick</ejb-name>
<stateless-session-descriptor>
<pool>
</pool>
<stateless-clustering>
</stateless-clustering>
</stateless-session-descriptor>
<transaction-descriptor>
</transaction-descriptor>
<enable-call-by-reference>True</enable-call-by-reference>
<jndi-name>Service2</jndi-name>
</weblogic-enterprise-bean>.... -
Steps to deploy an ejb application and running an ejb client in weblogic server6.1
steps to deploy an ejb application and steps to run an ejb client in weblogic server6.1
if the client is an simple java application and if the client is a servletHi.
Check out the beanManaged example that ships with WLS and read the accompanying docs. This
is a simple EJB with a servlet that invokes it.
Michael
shekhar sachdev wrote:
steps to deploy an ejb application and steps to run an ejb client in weblogic server6.1
if the client is an simple java application and if the client is a servlet--
Michael Young
Developer Relations Engineer
BEA Support -
Running CMP EJB in remote OC4J fails, works in embedded. Oracle 9i
I more or less followed the EJB Tutorial (in the help) for creating a session-entity bean facade from Oracle 9i tables. Everything executes correctly in the embedded oc4j but it fails on the remote oc4j with
java.sql.SQLException: Invalid column name
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:187)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:229)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:292)
at oracle.jdbc.driver.OracleStatement.get_column_index(OracleStatement.java:5632)
at oracle.jdbc.driver.OracleResultSetImpl.findColumn(OracleResultSetImpl.java:716)
at oracle.jdbc.driver.OracleResultSet.getString(OracleResultSet.java:1506)
at com.evermind.sql.FilterResultSet.getString(FilterResultSet.java:585)
at EmployeeLocalHome_EntityHomeWrapper13.findAll(EmployeeLocalHome_EntityHomeWrapper13.java:1260)
Then I also created another simpler CMP EJB that just has 3 fields from Oracle table. This one doesn't even work in embedded oc4j :
com.evermind.server.rmi.OrionRemoteException: Database error: ORA-01747: invalid user.table.column, table.column, or column specification
java.util.Collection TimesheetHoursHome_EntityHomeWrapper11.findAll()
Are there any known problems I should look out for with generating CMP EJBS with wizards?
I think the IDE is more intuitive than WSAD. It would be great it things worked though.
Another question is regarding relationships. Do the wizards always use ejb-refs to implement relationships? It should be easy enough to add them with EJB Editor if they do not.
Thanks for any help.Known issues are documented in the release notes
http://otn.oracle.com/products/jdev/htdocs/readme_903Preview.html#ejb
<<<Another question is regarding relationships. Do the wizards always use ejb-refs to implement relationships? >>>>
Not sure what you meant here. If you reverse engineer let us say DEPT and EMP tables, foreign key relationships between the tables are reverse engineered as CMR but there aren't any ejb-ref/ejb-local-ref tags which get generated in the deployment descriptor.
<<It should be easy enough to add them with EJB Editor if they do not. >>
You can double-click on the EJB to bring the EJB Module Editor and select "Relationships" node to add/edit/delete relationships visually.
raghu
JDev Team
Maybe you are looking for
-
Best Practices for sharing media with iMovie and FCPX
So I've a large iMovie Events directory, and would like to use that media with both iMovie and FCPX projects. I'd rather not duplicate the media, so would prefer to import as references into FCPX. The dilemma is that I see that it's possible to modif
-
"Error in Process" for POs after changing Tax codes and Vendor address
All, We are in extended classic scenario and we have 2 POs with status "Error in Process" PO 1: The PO was ordered with 3 line items, Confirmed, Inovoiced. Later our accoutnig team realized there should not be tax for one of the line item in the PO.
-
My computer was running fine untill I got an ipod+itunes. When I have the ipod(video) hooked up via USB and i try and play music off of the ipod through the powerbook it will eventually just stop. It seems to be random if it happens on the 1st song o
-
Accessility zoom and dual monitor (disable zoom on one of the monitor)
Hello, I am vision impaired user of the Mac. I'm having a problem. When I presenting something with PowerPoint or Keynote and using a projector. The zoom is enabled on the two monitor, so when I run the diaporama the Presentation Screen is not displa
-
Premiere Pro CS6 Issues with AJA and Black Magic
Has anyone had any issues outputting via AJA and Black Magic cards? I have 3 Macs using Black Magic Intesnsity Pro HDMI cards and 1 Mac using an AJA IO Express. On all the machines, i get weird audio issues intermitantly. I press play, no audio comes