Distinction of EJBs in shared clusterwide JNDI-Tree
Hi,
for logging issues i want to browse the shared clusterwide JNDI-Tree. As far
as i know, the clusterwide JNDI-Tree contains all services of any deployed
EJB in the cluster.
My problem is that i want do distinguish between the EJBs on the unique
Application Servers in the cluster. I need to get information about the
ApplicationServer/Thread the EJB is running in.
-Is it possible to get this information out of the clusterwide JNDI-Tree of
WLS6.0sp1?
-Is there a way to work with the replica-aware stubs of clusterable EJBs to
distinguish between "originals" and their replicas on other AppServers?
-Which type of EJBs can be accessed? All types?
-How can this task be achieved?
Thanks in advance for your help
René
"René Eßer" wrote:
> Hi,
>
> for logging issues i want to browse the shared clusterwide JNDI-Tree. As far
> as i know, the clusterwide JNDI-Tree contains all services of any deployed
> EJB in the cluster.
Yes, the cluster wide JNDI tree contains everything that is deployed in the
cluster.
> My problem is that i want do distinguish between the EJBs on the unique
> Application Servers in the cluster. I need to get information about the
> ApplicationServer/Thread the EJB is running in.
I don't understand what you mean here. "EJB's on the unique App Servers in the
cluster". To find out which thread is running you can do a
Thread.currentThread().getName()
>
> -Is it possible to get this information out of the clusterwide JNDI-Tree of
> WLS6.0sp1?
No not really.
>
> -Is there a way to work with the replica-aware stubs of clusterable EJBs to
> distinguish between "originals" and their replicas on other AppServers?
This is all hidden and transperent to the users.
-- Prasad
>
> -Which type of EJBs can be accessed? All types?
>
> -How can this task be achieved?
>
> Thanks in advance for your help
>
> René
Similar Messages
-
Hi
I am just a starter on WLPortal.
I have created a barebone Application from scratch. I have synchronized it properly
from EBCC to WLP. But When I am trying to access the home page of my application,
I am getting from stack trace -
<Nov 6, 2002 5:37:59 PM IST> <Error> <PortalAppflow> <Could not lookup PortalManagerHome
in the JNDI tree using EJB reference java:comp/env/ejb/PortalManager.
javax.naming.NameNotFoundException: Unable to resolve comp/env/ejb/PortalManager
Resolved: 'comp/env' Unresolved:'ejb' ; remaining name 'PortalManager'
at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:802)
at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:209)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:173)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:181)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:181)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:323)
at weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyContextWrapper.java:36)
at weblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.java:124)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at com.bea.p13n.util.JndiHelper.lookupNarrow(JndiHelper.java:96)
at com.bea.portal.appflow.PortalAppflowHelper.<clinit>(PortalAppflowHelper.java:64)
at com.bea.portal.appflow.servlets.internal.PortalWebflowServlet.init(PortalWebflowServlet.java:78)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:700)
at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:643)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:588)
at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:368)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:242)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:215)
at weblogic.servlet.jsp.PageContextImpl.forward(PageContextImpl.java:112)
at jsp_servlet.__index._jspService(__index.java:92)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:304)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2459)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2039)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>
<Nov 6, 2002 5:37:59 PM IST> <Error> <HTTP> <[WebAppServletContext(19695286,FirstWebApp,/FirstWebApp)]
Servlet failed with Exception
java.lang.NullPointerException:
at com.bea.portal.appflow.PortalAppflowHelper.createPortalManager(PortalAppflowHelper.java:82)
at com.bea.portal.appflow.servlets.internal.PortalWebflowServlet.setupPortalRequest(PortalWebflowServlet.java:187)
at com.bea.portal.appflow.servlets.internal.PortalWebflowServlet.doGet(PortalWebflowServlet.java:99)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:215)
at weblogic.servlet.jsp.PageContextImpl.forward(PageContextImpl.java:112)
at jsp_servlet.__index._jspService(__index.java:92)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:304)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2459)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2039)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
When I decompiled the class PortalAppflowHelper, I found a static block in it,
which was as under-
static
debug = Debug.getInstance(com.bea.portal.appflow.PortalAppflowHelper.class);
try
if(debug.ON)
debug.out("Looking up PortalManagerHome using EJB reference java:comp/env/ejb/PortalManager");
portalManagerHome = (PortalManagerHome)JndiHelper.lookupNarrow("java:comp/env/ejb/PortalManager",
com.bea.portal.manager.ejb.PortalManagerHome.class);
if(debug.ON)
debug.out("Successfully retrieved PortalManagerHome " + portalManagerHome);
catch(Exception e)
PortalAppflowLogger.errorFindingPortalManagerHome("java:comp/env/ejb/PortalManager",
e);
I have checked the PortalManager's JNDI name on WLConsole. Its ${APPNAME}.BEA_portal.PortalManager.
Should I change it?
When I tried to change it, I started getting other weird errors.
Thanks
Neeraj HansNeeraj -
The Portal framework code (including PortalAppflowHelper) uses ejb
references to find the PortalManager (and other EJBs) from servlets and
taglibs; that is what is signified by the java:comp/env/... name.
Since you built your webapp from scratch (instead of using the portal
wizard), you will need to make sure the you have the appropriate
<ejb-ref> entries in your web.xml, and the corresponding
<ejb-reference-description> entries in your weblogic.xml. By default,
you will need at least mappings for:
- ejb/PortalManager
- ejb/UserManager
- ejb/GroupManager
- ejb/PipelineExecutor
- ejb/EventService
See either the resulting webapp from using the portal wizard or
BEA_HOME/weblogic700/samples/portal/sampleportalDomain/beaApps/sampleportal/sampleportal/WEB-INF
for example syntax.
Greg
Neeraj Hans wrote:
Hi
I am just a starter on WLPortal.
I have created a barebone Application from scratch. I have
synchronized it properly
from EBCC to WLP. But When I am trying to access the home page of my
application,
I am getting from stack trace -
<Nov 6, 2002 5:37:59 PM IST> <Error> <PortalAppflow> <Could not lookup
PortalManagerHome
in the JNDI tree using EJB reference java:comp/env/ejb/PortalManager.
javax.naming.NameNotFoundException: Unable to resolve
comp/env/ejb/PortalManager
Resolved: 'comp/env' Unresolved:'ejb' ; remaining name 'PortalManager'
at <stack trace lines snipped>
When I decompiled the class PortalAppflowHelper, I found a static
block in it,
which was as under-
static
debug =
Debug.getInstance(com.bea.portal.appflow.PortalAppflowHelper.class);
try
if(debug.ON)
debug.out("Looking up PortalManagerHome using EJB
reference java:comp/env/ejb/PortalManager");
portalManagerHome =
(PortalManagerHome)JndiHelper.lookupNarrow("java:comp/env/ejb/PortalManager",
com.bea.portal.manager.ejb.PortalManagerHome.class);
if(debug.ON)
debug.out("Successfully retrieved PortalManagerHome "
+ portalManagerHome);
catch(Exception e)
PortalAppflowLogger.errorFindingPortalManagerHome("java:comp/env/ejb/PortalManager",
e);
I have checked the PortalManager's JNDI name on WLConsole. Its
${APPNAME}.BEA_portal.PortalManager.
Should I change it?
When I tried to change it, I started getting other weird errors.
Thanks
Neeraj Hans -
Unable to Find EJB in JNDI Tree
Good Morning to All!
I have been scratching my head all day yesterday trying to understand this error:
[2005-06-15 09:44:38,203][Servlet.Engine.Transports : 1][FATAL][{ServiceLocator}{getHome}{CONFIG0001}{Failed to find EJB Reference from JNDI tree}{External Message:Name comp/env/ejb not found in context "java:".}]
{ServiceLocator}{getHome}{CONFIG0001}{Failed to find EJB Reference from JNDI tree}{External Message:Name comp/env/ejb not found in context "java:".}
What is going on is the user is logging into the web application. The process is the user comes in from the web container and enters the EJB container through the AdminEJB. The AdminEJB has a reference to a singleton POJO entitled ServiceLocator. This POJO follows the locator pattern. One of the things the Locator is attempting to accomplish is retrieving the CacheEJBLocalHome. This Cache ejb has a JNDI name of
ejb/CacheEJBHome
I have promoted the Cache ejb to the Local and the Remote interfaces using WSAD.
I realize the lookup method can not find the EJB, but I do not know what is causing this behavior. I originally thought the AdminEJB needed a bean reference to the CacheEJB, but this did not work.
Any insight or debugging techniques into this issue would be greatly appreciated.
Thank you for reading my post.
RussHi Ten,
FYI, just by placing the ejb jar inside EAR project it will not be picked up for deployment. The EJB module has to be defined on EAR Module Assembly, and the steps are:
> EAR Project | Properties, Deployment Assembly - Add EJB module
NOTE: To verify the dependency you could try to export the EAR project to an .ear file. If the exported .ear file bundles ejb jar then deployment should work fine.
As far as the deployment mode, OEPE supports WebLogic Split-source (default) and Exploded archive. In the default split-source mode, the .beabuild.txt contains the mapping to the actual files whereas in exploded archive the files are copied over to deployment staging location.
Steps to modify deployment mode:
> In the server view, right click on server configuration | Properties, select WebLogic | Publishing
Please make sure the ejb module is defined appropriately and let me know if this resolves the issue.
Thanks,
Ram -
EJB not published in the JNDI tree
I am trying to deploy a simple ear file containing one ejb on to WL 9.2. The app is deploying without any problems, but the EJB is not published in the JNDI tree. When I look at the EJB's configuration through the admin console, it does indicated that the JNDI name is set to "ejb/HelloWorld". However, when I look at the JNDI tree there is no HelloWorld node under ejb. Below is my weblogic-ejb-jar.xml file that defines the JNDI name:
<?xml version="1.0" encoding="UTF-8"?>
<weblogic-ejb-jar
xmlns="http://www.bea.com/ns/weblogic/90"
xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.bea.com/ns/weblogic/90
http://www.bea.com/ns/weblogic/90/weblogic-ejb-jar.xsd">
<weblogic-enterprise-bean>
<ejb-name>HelloWorld</ejb-name>
<stateless-session-descriptor>
<pool>
<max-beans-in-free-pool>1000</max-beans-in-free-pool>
<initial-beans-in-free-pool>0</initial-beans-in-free-pool>
</pool>
</stateless-session-descriptor>
<transaction-descriptor>
<trans-timeout-seconds>0</trans-timeout-seconds>
</transaction-descriptor>
<enable-call-by-reference>false</enable-call-by-reference>
<jndi-name>ejb/HelloWorld</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>Can anyone help me understand why the JNDI name is not being published?
Thanks.Hi all,
It seems that I have the same problem with WL 10. Has any of you solved this yet?
I'm trying to switch my application from perfectly working JBoss 4.2 environment to WL 10 and no luck so far, because of this weird problem.
What I have noticed so far is:
- Some of my sessions beans are deployed ok
- "Big" session beans are silently ignored in deployment. This is unbelievable because these beans are SILENTLY ignored. And, my session beans are not that big. Under 700 LOC all of them.
- These EJBs don't appear in admin console's JNDI-browser
- These EJBs don't appear in ear-content details in "Deployments" section.
- These EJBs don't get their stubs generated in server/cache/EJBCompilerCache
- One big is ignored, but when splitting it in e.g. three smaller ones, all of these three session beans are deployed successfully
I'm using EJB3 session beans with no XML-descriptors.
So what is going on here??!
Looking forward to hear some answers. At least from BEA developers or other insiders.
Thanks.
Edited by villeingman at 06/13/2007 12:42 AM -
EJB deployed but doesnt show up in JNDI tree on weblogic
Hi,
I have a sample EJB deployed on weblogic 10.3 server. My Bean class contains following code.
========================================================================
@Stateless (mappedName = "DemoEJB")
@TransactionManagement(TransactionManagementType.BEAN)
public class DemoBean implements SessionBean {
static final boolean verbose = true;
private transient SessionContext ctx;
private transient Properties props;
@SuppressWarnings("deprecation")
@Override
public void setSessionContext(SessionContext ctx) throws EJBException,
RemoteException {
// TODO Auto-generated method stub
if (verbose)
System.out.println("setSessionContext called");
this.ctx = ctx;
props = ctx.getEnvironment();
public String demoSelect()
throws RemoteException
return("hello world");
===========================================================================
I have created a jar file for the above class using eclipse and deployed it on weblogic. I can see the EJB in the <Deployment> on weblogic but it doesnt appear in <EJB> on JNDI tree view. Therefore i cannot access it from my client code (also written in Eclipse IDE).
I will appreciate any guidance in this regard.
Thanks
Regards,
AwaisHi,
i have the same problem with yours
This is my annotation with EJB3.0:
@Stateless(mappedName="ConSession")
@Remote(ConBeanRemote.class)
@Local(ConBean.class)
and i have a weblogic-ejb-jar.xml to define my jndi name
<?xml version="1.0" encoding="UTF-8"?>
<weblogic-ejb-jar xmlns:wls="http://www.bea.com/ns/weblogic/weblogic-ejb-jar"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd
http://www.bea.com/ns/weblogic/weblogic-ejb-jar
http://www.bea.com/ns/weblogic/weblogic-ejb-jar/1.0/weblogic-ejb-jar.xsd">
<weblogic-enterprise-bean>
<ejb-name>ConSession</ejb-name>
<stateless-session-descriptor>
<business-interface-jndi-name-map>
<business-remote>com.staffware.ConBeanRemote</business-remote>
<jndi-name>ConSession#com/staffware/ConBeanRemote</jndi-name>
</business-interface-jndi-name-map>
</stateless-session-descriptor>
<local-jndi-name>com/ConfigurationManagerBeanLocal</local-jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
[ the most important: I also have specify JNDI in a java file like this
beanRemoteJNDIs.put("ConBeanRemote","ConSession#com/staffware/ConBeanRemote");
beanLocalJNDIs.put("ConBean","java:comp/env/com/ConBean");
and i can find the ConSession#com/staffware/ConBeanRemote in the jndi tree . but it shows like Multilevel directory tree
and when i login the website and click the button
.another error comes out :
13:35:55,046 ERROR [EJBDelegate] Unable to lookup reference java:comp/env/com/ConBean for ConBean!
javax.naming.LinkException: [Root exception is javax.naming.LinkException: [Root exception is javax.naming.NameNotFoun
dException: While trying to look up /app/ejb/CONFIG-ejb-2.0.jar#ConSession/local-home in /app/webapp/CO
M/18328287.; remaining name '/app/ejb/CONFIG-ejb-2/0/jar#ConfigurationManagerSession/local-home']; Link Remaining Name:
'java:app/ejb/CONFIG-ejb-2.0.jar#ConSession/local-home']; Link Remaining Name: 'com/ConBean'
at weblogic.jndi.internal.WLNamingManager.getObjectInstance(WLNamingManager.java:104)
at weblogic.jndi.internal.BasicNamingNode.resolveObject(BasicNamingNode.java:884)
at weblogic.jndi.internal.ApplicationNamingNode.resolveObject(ApplicationNamingNode.java:187)
what should i do ?
and should i specify the jndi name in the java file . the JNDI name defined in the weblogic is right?
can you help me ?
thanks very much in advance! -
JNDI tree access for code outside servlets and EJBs and JSPs
Can code outside EJBs, Servlets and JSPs have access to the JNDI tree?
For example, in a web application, web.xml has a env-entry declaration which I want to access from a POJO which is called by a JSP in the web app. Is this permissible?Can code outside EJBs, Servlets and JSPs have access
to the JNDI tree?
For example, in a web application, web.xml has a
env-entry declaration which I want to access from a
POJO which is called by a JSP in the web app. Is
this permissible?Yes. Read the JNDI tutorial. -
Should I see EJBs in JNDI tree?
Should I be able to see my deployed EJBs in the JNDI tree of WLS6.1?
I can see the session beans that I have deployed, but not my entity
beans.
Thanks,
MaloneShould I be able to see my deployed EJBs in the JNDI tree of WLS6.1?
I can see the session beans that I have deployed, but not my entity
beans.
Thanks,
Malone -
Shared JNDI Tree WL 10 and SAP Web AS
Hi,
in my current project, the vision is to have a joined JNDI tree for the platform. Currently we have a WL 10 server hosting a web application with its own JNDI tree and a SAP Web Application Server also with an JNDI tree. The server are not clustered. The vision is to merge the JNDI trees and have one central instance which can be accessed by both AS. Is this a feasable solution? What is required to setup the central/share JNDI tree and which server should host the JNDI tree? Can anyone point me to some relevant documentation?Cord Plasse <> writes:
You can't really share the tree, although you could federate from one
namespace to the other.
andy
Hi,
in my current project, the vision is to have a joined JNDI tree for the platform. Currently we have a WL 10 server hosting a web application with its own JNDI tree and a SAP Web Application Server also with an JNDI tree. The server are not clustered. The vision is to merge the JNDI trees and have one central instance which can be accessed by both AS. Is this a feasable solution? What is required to setup the central/share JNDI tree and which server should host the JNDI tree? Can anyone point me to some relevant documentation? -
MBeanServer location in JNDI tree
Hello,
I'm testing methods that use a MBeanServer from JConsole and MBean browser in EM console. I launch the JConsole using this parameters:
jconsole -J-Djava.class.path=/home/user/wlfullclient-10.3.5.0.jar:/usr/java/jdk1.6.0_30/lib/jconsole.jar -J-Djmx.remote.protocol.provider.pkgs=weblogic.management.remote
When I use the JConsole for testing I obtain the MBeanServer in this way:
InitialContext ctx = new InitialContext();
server = (MBeanServer)ctx.lookup("java:comp/jmx/runtime");
And when I use the MBean browser I have to to use this code:
server = (MBeanServer)ctx.lookup("java:comp/env/jmx/runtime");
I'm following the next Oracle documentation, but I want to know if there is other way to use only once String to found the MBeanServer in the JNDI tree.
Does anybody know a different way to do this?
Thanks in advance,
Make Local Connections to the Runtime MBean Server+
Local clients can access a WebLogic Server instance’s Runtime MBean Server through the JNDI tree instead of constructing a JMXServiceURL object. Only the Runtime MBean Server registers itself in the JNDI tree.+
When accessed from JNDI, the Runtime MBean Server returns its javax.management.MBeanServer interface. This interface contains all of the methods in the MBeanServerConnection interface plus additional methods such as registerMBean(), which local process can use to register custom MBeans. (See MBeanServer in the J2SE 5.0 API Specification.)+
If the classes for the JMX client are located at the top level of an enterprise application (that is, if they are deployed from the application’s APP-INF directory), then the JNDI name for the Runtime MBean Server is:+
java:comp/jmx/runtime
If the classes for the JMX client are located in a Java EE module, such as an EJB or Web application, then the JNDI name for the Runtime MBeanServer is:+
java:comp/env/jmx/runtime
For example:
InitialContext ctx = new InitialContext();
server = (MBeanServer)ctx.lookup("java:comp/env/jmx/runtime");Hi,
I have same problem.
I have developed some libs (with common functionality to be used in many places, utils, and so) which I deploy in $DOMAIN/lib. I also have an ear, with ApplicationLifecycleListener to register some MBeans in the MBeanServer and they make use of this shared libs.
The thing is that if I access on of my MBeans from JConsole and if I access the same MBean from within em console, my app needs to look at different locations in the JNDI tree for the MBeanServer. Shouldn't this code, as it is running in the same location need to locate the MBeanServer the same way? Or because the client application in one case is remote, and in the other is local, need to look for the MBeanServer in one location and if not found in the other.
Think that code is deployed as a Util class in the DOMAIN/lib directory.
Thanks, -
EJB 3.0 and jndi lookup (simple question)
hi all,
i am newbie on Weblogic Application Server and i have some issues,
i have weblogic application server 10.0, also i have oracle timesten in-memory database, i have configured datasource and deploy my ejb 3.0 application, but i could not done jndi lookup?
here is my example:
1. one stateless session bean :
import javax.ejb.Remote;
@Remote
public interface InsertSubscriber {
public void insertSubscriber(SubscriberT subscriberT);
} 2. here is it's implementation :
@Remote(InsertSubscriber.class)
@Stateless
public class InsertSubscriberBean implements InsertSubscriber {
@PersistenceContext(unitName = "TimesTenDS")
private EntityManager oracleManager;
public void insertSubscriber(SubscriberT subscriber)
try {
System.out.println("started");
oracleManager.persist(subscriber);
System.out.println("end");
} catch (Exception e) {
e.printStackTrace();
}3 and my test client :
public class Client {
public static void main(String[] args) {
Context ctx = null;
Hashtable ht = new Hashtable();
ht.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
ht.put(Context.PROVIDER_URL, "t3://192.9.200.222:7001");
try {
ctx = new InitialContext(ht);
InsertSubscriber usagefasade = (InsertSubscriber) ctx
.lookup("ejb.InsertSubscriberBean");
} catch (NamingException e) {
e.printStackTrace();
} finally {
try {
ctx.close();
} catch (Exception e) {
e.printStackTrace();
}what i did incorrect ???
i got error like this : Name not fount exception
when i tried to view jndi tree on weblogic server application console i found this :
Binding Name:
TimestenExampleTimestenExample_jarInsertSubscriberBean_InsertSubscriber
Class:
test.InsertSubscriberBean_o7jk9u_InsertSubscriberImpl_1000_WLStub
Hash Code:
286
toString Results:
weblogic.rmi.internal.CollocatedRemoteRef - hostID: '2929168367193491522S::billing_domain:AdminServer', oid: '286', channel: 'null'what does it mean how i can done lookup to jndi ?
Regards,
Paata Lominadze,
Magticom LTD.
Georgia.Hi All,
I am using the weblogic cluster with session replication and EJB 2.0 with Local entity beans.
for fail-over session should be replicated to another server so we can achive the same session if 1st server fails.
Suppose i m using two managed server(server1,server2) in the cluster.I am storing the object of class ABC into session and object contains the instance of Local-EntityBean home but i put that as a transient.I have also override the readObject and write object method.
when write object is called on 1st server,readObject method should be called on second server so we will be sure that session is replicating properly.
pleaase find the code below : -
public IssuerPageBean() {
initEJB();
private void readObject(java.io.ObjectInputStream stream) throws IOException, ClassNotFoundException {
stream.defaultReadObject();
initEJB();
initializeCommonObject();
private void writeObject(java.io.ObjectOutputStream stream) throws IOException {
stream.defaultWriteObject();
private void initEJB() {
try {
ic = new InitialContext();
issuerHome = (LocalIssuerHome) ic.lookup("java:comp/env/Issuer");
} catch (NamingException e) {
e.printStackTrace();
in my case if i am calling the constructor IssuerPageBean(),it calls the initEJB() method and lookeup the entity local home properly but when readObject method is called on another server only initEJB() method is called directly and getting the exception below :
WARNING: Error during create -
javax.naming.NameNotFoundException: remaining name: env/ejb/Client
at weblogic.j2eeclient.SimpleContext.resolve(Ljavax/naming/Name;Z)Ljavax/naming/Context;(SimpleContext.java:35)
at weblogic.j2eeclient.SimpleContext.resolve(Ljavax/naming/Name;)Ljavax/naming/Context;(SimpleContext.java:39)
at weblogic.j2eeclient.SimpleContext.lookup(Ljavax/naming/Name;)Ljava/lang/Object;(SimpleContext.java:57)
at weblogic.j2eeclient.SimpleContext.lookup(Ljavax/naming/Name;)Ljava/lang/Object;(SimpleContext.java:57)
at weblogic.j2eeclient.SimpleContext.lookup(Ljava/lang/String;)Ljava/lang/Object;(SimpleContext.java:62)
at weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(Ljava/lang/String;)Ljava/lang/Object;(ReadOnlyCont
extWrapper.java:45)
at weblogic.jndi.internal.AbstractURLContext.lookup(Ljava/lang/String;)Ljava/lang/Object;(AbstractURLContext.jav
a:130)
at javax.naming.InitialContext.lookup(Ljava/lang/String;)Ljava/lang/Object;(InitialContext.java:347)
at com.lb.equities.veda.tools.salesvault.jsp.ClientPageBean.initEJB()V(ClientPageBean.java:218)
at com.lb.equities.veda.tools.salesvault.jsp.ClientPageBean.readObject(Ljava/io/ObjectInputStream;)V(ClientPageB
ean.java:191)
at java.lang.LangAccessImpl.readObject(Ljava/lang/Class;Ljava/lang/Object;Ljava/io/ObjectInputStream;)V(Unknown
Source)
at java.io.ObjectStreamClass.invokeReadObject(Ljava/lang/Object;Ljava/io/ObjectInputStream;)V(Unknown Source)
at java.io.ObjectInputStream.readSerialData(Ljava/lang/Object;Ljava/io/ObjectStreamClass;)V(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Z)Ljava/lang/Object;(Unknown Source)
at java.io.ObjectInputStream.readObject0(Z)Ljava/lang/Object;(Unknown Source)
at java.io.ObjectInputStream.readObject()Ljava/lang/Object;(Unknown Source)
at java.util.HashMap.readObject(Ljava/io/ObjectInputStream;)V(Unknown Source)
at java.lang.LangAccessImpl.readObject(Ljava/lang/Class;Ljava/lang/Object;Ljava/io/ObjectInputStream;)V(Unknown
Source)
at java.io.ObjectStreamClass.invokeReadObject(Ljava/lang/Object;Ljava/io/ObjectInputStream;)V(Unknown Source)
at java.io.ObjectInputStream.readSerialData(Ljava/lang/Object;Ljava/io/ObjectStreamClass;)V(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Z)Ljava/lang/Object;(Unknown Source)
at java.io.ObjectInputStream.readObject0(Z)Ljava/lang/Object;(Unknown Source)
at java.io.ObjectInputStream.defaultReadFields(Ljava/lang/Object;Ljava/io/ObjectStreamClass;)V(Unknown Source)
at java.io.ObjectInputStream.readSerialData(Ljava/lang/Object;Ljava/io/ObjectStreamClass;)V(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Z)Ljava/lang/Object;(Unknown Source)
at java.io.ObjectInputStream.readObject0(Z)Ljava/lang/Object;(Unknown Source)
at java.io.ObjectInputStream.readObject()Ljava/lang/Object;(Unknown Source)
at weblogic.common.internal.ChunkedObjectInputStream.readObject()Ljava/lang/Object;(ChunkedObjectInputStream.jav
a:120)
at weblogic.rjvm.MsgAbbrevInputStream.readObject(Ljava/lang/Class;)Ljava/lang/Object;(MsgAbbrevInputStream.java:
121)
at weblogic.cluster.replication.ReplicationManager_WLSkel.invoke(ILweblogic/rmi/spi/InboundRequest;Lweblogic/rmi
/spi/OutboundResponse;Ljava/lang/Object;)Lweblogic/rmi/spi/OutboundResponse;(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(Lweblogic/rmi/extensions/server/RuntimeMethodDescriptor;Lweblogic
/rmi/spi/InboundRequest;Lweblogic/rmi/spi/OutboundResponse;)V(BasicServerRef.java:492)
Please help .
Thanks in Advance.
Edited by hforever at 03/04/2008 7:28 AM -
How to delete conext entries in JNDI tree after undeployment?
Hi,
When I deploy an EAR or JAR file with EJBs, they bind in the JNDI server.
When I undeploy the application the beans are no longer bound to the JNDI
tree, but the contexts they created remain.
For example, I deploy a bean that binds its home object to the following
entry in the JNDI:
myapp/mymodule/MyBean
When I undeploy MyBean, the context myapp/mymodule remain.
Is there an utility to remove these entries or do I have to develop my own
utility? I did not find anything in the administration console to do this.
This has been a source of some trouble, because sometimes I get error
messages when I want to redeploy the beans.
Thanks in advance,
VegetaPlease don't cross post. see my reply in the ejb newsgroup.
Thanks,
Michael
Vegeta wrote:
Hi,
When I deploy an EAR or JAR file with EJBs, they bind in the JNDI server.
When I undeploy the application the beans are no longer bound to the JNDI
tree, but the contexts they created remain.
For example, I deploy a bean that binds its home object to the following
entry in the JNDI:
myapp/mymodule/MyBean
When I undeploy MyBean, the context myapp/mymodule remain.
Is there an utility to remove these entries or do I have to develop my own
utility? I did not find anything in the administration console to do this.
This has been a source of some trouble, because sometimes I get error
messages when I want to redeploy the beans.
Thanks in advance,
Vegeta--
Michael Young
Developer Relations Engineer
BEA Support -
Publish, deploy, jndi tree
Hello,
I work with Weblogic server 9.2 and Ganymede 3.4.
Here are some beginner questions:
Why do I, in Ganymede's server tab, publish on the server node instead of on the EAR node?
When I publish my EAR I cannot see anything added in the jndi tree of the app-server (via admin console, view jndi tree). What do I miss?
This my weblogic-ejb-jar:
<?xml version="1.0" encoding="UTF-8"?>
<weblogic-ejb-jar xmlns="http://www.bea.com/ns/weblogic/90" xmlns:j2ee="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-ejb-jar.xsd">
<!-- server-version: 9.2 -->
<weblogic-enterprise-bean>
<ejb-name>HelloWorld</ejb-name>
<stateless-session-descriptor>
</stateless-session-descriptor>
<jndi-name>ejb.EjbHelloWorldHome</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
Is there a perspective that displays the weblogic generated stub/skeleton files?
Is there a difference between publishing an EAR and deploying an EAR, except that deploying refers to a production environment instead of dev environment?
Thanks for any ideas.If you are using OEPE - Oracle Enterprise Pack for Eclipse (or Workshop), then WebLogic EJB's are built (the stubs, etc) with a tool called EJBGen, this link is for 10.3, but I'm pretty sure it's the same for 9.2
http://download.oracle.com/docs/cd/E12839_01/wls/docs103/ejb/EJBGen_reference.html
I think that is implemented as a an Eclipse build task, so it's only run when exporting to an archive like an EAR or EJB jar OR when publishing to the server. In either case, those generated classes would not be shown in Eclipse.
Check your deployments tab of your WLS console to see if you application is deployed an active. If it is, then I would expect to see entries from your application in the JNDI tree.
The OEPE forum is a better place to ask Eclipse questions:
Enterprise Pack for Eclipse -
Hi
I'm facing the following problem while viewing the JNDI tree. I had configured
two servers ejbServer,ejbServer1 both clustered, i can able to start both the
servers, but in the JNDI tree when i click ejbServer or Replication Manager
i'm getting the following error please help me out.
An unexpected error was encountered in processing your request.
Exception
javax.naming.NameNotFoundException: Unable to resolve weblogic.transaction.coordinators.ejbServer.
Resolved: 'weblogic.transaction.coordinators' Unresolved:'ejbServer' ; remaining
name ''
<>
Current Date
Mon Aug 27 09:15:19 GMT+08:00 2001
Console Release Build
6.0 Service Pack 2
Console Build
6.0 Service Pack 2 05/24/2001 11:55:28 #117037
Server Release Build
6.0 Service Pack 2
Server Build
6.0 Service Pack 2 05/24/2001 11:55:28 #117037
All Server Product Versions
WebLogic Server Build: 6.0 Service Pack 2 05/24/2001 11:55:28 #117037
WebLogic XML Module: 6.0 Service Pack 2 05/24/2001 12:34:27 #117037
Request Info
Protocol: HTTP/1.1
ServerName: 127.0.0.1
ServerPort: 7001
Secure: false
ContextPath: /console
ServletPath: /common/error.jsp
QueryString: null
PathInfo: null
PathTranslated: null
RequestURI: /console/common/error.jsp
AuthType: Basic
ContentType: null
CharacterEncoding: null
Locale: hi
Method: GET
Session: weblogic.servlet.internal.session.MemorySessionData@37b6ef
RequestedSessionId: O4meRts3MSQ1pr2YCfOsUGA3MckiUv6wmiQVYrdcQBy3oYpYTz2Q/console
RequestedSessionIdFromCookie: true
RequestedSessionIdFromURL: false
UserPrincipal: system
RemoteUser: system
RemoteAddr: 127.0.0.1
RemoteHost: localhost
Parameters
binding = ejbServer
context = weblogic.transaction.coordinators
Attributes
console.original./console/common/error.jsp.ContextPath = /console
console.original./console/common/error.jsp.Method = GET
console.original./console/common/error.jsp.RemoteUser = system
console.original./console/common/error.jsp.RequestURI = /console/common/error.jsp
console.original./console/common/error.jsp.ServletPath = /common/error.jsp
console.original./console/panels/mbean/JNDIBinding.jsp.ContextPath = /console
console.original./console/panels/mbean/JNDIBinding.jsp.Method = GET
console.original./console/panels/mbean/JNDIBinding.jsp.QueryString = context=weblogic.transaction.coordinators&binding=ejbServer
console.original./console/panels/mbean/JNDIBinding.jsp.RemoteUser = system
console.original./console/panels/mbean/JNDIBinding.jsp.RequestURI = /console/panels/mbean/JNDIBinding.jsp
console.original./console/panels/mbean/JNDIBinding.jsp.ServletPath = /panels/mbean/JNDIBinding.jsp
console.preferences.ContextKey = /panels/mbean/JNDIBinding.jsp
javax.servlet.include.context_path = /console
javax.servlet.include.request_uri = /console/common/requestinfo.jsp
javax.servlet.include.servlet_path = /common/requestinfo.jsp
javax.servlet.jsp.jspException = javax.naming.NameNotFoundException:
Unable to resolve weblogic.transaction.coordinators.ejbServer. Resolved: 'weblogic.transaction.coordinators'
Unresolved:'ejbServer' ; remaining name ''
weblogic.httpd.user = system
weblogic.management.console.tags.ContentTag = java.lang.Object@397a54
weblogic.management.console.tags.HeaderTag = java.lang.Object@e4a33
Headers
Accept = image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel,
application/msword, application/vnd.ms-powerpoint, */*
Accept-Encoding = gzip, deflate
Accept-Language = hi
Authorization = Basic c3lzdGVtOm1hbmFnZXIx
Connection = Keep-Alive
Cookie = JSESSIONID=O4meRts3MSQ1pr2YCfOsUGA3MckiUv6wmiQVYrdcQBy3oYpYTz2Q!2557472653882942880!-1062729946!7001!7002
Host = 127.0.0.1:7001
User-Agent = Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)
BrowserInfo
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)
IE: true
Netscape: false
Supported: true
JavscriptHrefs: false
TableCellClick: true
DocumentReloadedOnResize: false
DropdownStretchable: true
CellSpacingBlank: false
EmptyCellBlank: false
ImgOnclickSupported: true
TableBorderFancy: true
PartialToWideTables: false
Server System Properties
awt.toolkit = sun.awt.windows.WToolkit
bea.home = d:\Weblogic
cloudscape.system.home = ./samples/eval/cloudscape/data
file.encoding = Cp1252
file.encoding.pkg = sun.io
file.separator = \
java.awt.fonts =
java.awt.graphicsenv = sun.awt.Win32GraphicsEnvironment
java.awt.printerjob = sun.awt.windows.WPrinterJob
java.class.path = .;d:\Weblogic\jdk130\lib\tools.jar;d:\Weblogic\wlserver\lib\weblogic_sp.jar;d:\Weblogic\wlserver\lib\weblogic.jar;d:\Weblogic\wlserver\lib\xmlx.jar;d:\Weblogic\wlserver\lib\ejb20.jar;d:\Weblogic\wlserver\samples\eval\cloudscape\lib\cloudscape.jar;;;;d:\Weblogic;d:\Weblogic\wlserver\bin\oci816_8;d:\Oracle_Home\iSuites\jdbc\lib\classes12.zip;d:\Weblogic\wlserver\lib;d:\Oracle_Home\iSuites\lib\xmlparserv2.jar;d:\JDeveloper\lib\xsu12.jar;;
java.class.version = 47.0
java.ext.dirs = d:\Weblogic\jdk130\jre\lib\ext
java.home = d:\Weblogic\jdk130\jre
java.io.tmpdir = C:\TEMP\
java.library.path = d:\Weblogic\jdk130\bin;.;C:\WINNT\System32;C:\WINNT;.\bin;D:\Oracle_Home\iSuites\BIN;D:\Oracle_Home\iSuites\Apache\Perl\5.00503\bin\mswin32-x86;C:\Program
Files\Oracle\jre\1.1.7\bin;C:\WINNT\system32;C:\WINNT;C:\VisualCafeSE\Java2\Bin;C:\Program
Files\Common Files\WebGain Shared;C:\VisualCafeSE\Bin;
java.naming.factory.initial = weblogic.jndi.WLInitialContextFactory
java.naming.factory.url.pkgs = weblogic.jndi.factories
java.protocol.handler.pkgs = weblogic.utils|weblogic.utils|weblogic.net|weblogic.management|weblogic.net|weblogic.net|weblogic.utils
java.runtime.name = Java(TM) 2 Runtime Environment, Standard
Edition
java.runtime.version = 1.3.0-C
java.security.policy = =d:\Weblogic\wlserver/lib/weblogic.policy
java.specification.name = Java Platform API Specification
java.specification.vendor = Sun Microsystems Inc.
java.specification.version = 1.3
java.vendor = Sun Microsystems Inc.
java.vendor.url = http://java.sun.com/
java.vendor.url.bug = http://java.sun.com/cgi-bin/bugreport.cgi
java.version = 1.3.0
java.vm.info = mixed mode
java.vm.name = Java HotSpot(TM) Client VM
java.vm.specification.name = Java Virtual Machine Specification
java.vm.specification.vendor = Sun Microsystems Inc.
java.vm.specification.version = 1.0
java.vm.vendor = Sun Microsystems Inc.
java.vm.version = 1.3.0-C
javax.rmi.CORBA.PortableRemoteObjectClass = weblogic.iiop.PortableRemoteObjectDelegateImpl
javax.rmi.CORBA.UtilClass = weblogic.iiop.UtilDelegateImpl
javax.xml.parsers.DocumentBuilderFactory = weblogic.xml.jaxp.RegistryDocumentBuilderFactory
javax.xml.parsers.SAXParserFactory = weblogic.xml.jaxp.RegistrySAXParserFactory
jmx.implementation.name = JMX RI
jmx.implementation.vendor = Sun Microsystems
jmx.implementation.version = 1.0
jmx.specification.name = Java Management Extensions
jmx.specification.vendor = Sun Microsystems
jmx.specification.version = 1.0 Final Release
line.separator =
os.arch = x86
os.name = Windows NT
os.version = 4.0
path.separator = ;
sun.boot.class.path = d:\Weblogic\jdk130\jre\lib\rt.jar;d:\Weblogic\jdk130\jre\lib\i18n.jar;d:\Weblogic\jdk130\jre\lib\sunrsasign.jar;d:\Weblogic\jdk130\jre\classes
sun.boot.library.path = d:\Weblogic\jdk130\jre\bin
sun.cpu.endian = little
sun.cpu.isalist = pentium_pro+mmx pentium_pro pentium+mmx
pentium i486 i386
sun.io.unicode.encoding = UnicodeLittle
user.dir = D:\Weblogic\wlserver
user.home = C:\WINNT\Profiles\venkata
user.language = en
user.name = venkata
user.region = US
user.timezone = Asia/Singapore
weblogic.Domain = DNSdomain
weblogic.Name = DNSserver
weblogic.management.discover = true
weblogic.security.jaas.Configuration = weblogic.security.internal.ServerConfig
weblogic.security.jaas.Policy = d:/Weblogic/wlserver/lib/Server.policy
[att1.html]
-
ACL on JNDI tree or elements in it
Hello
I am trying to find out how I can secure information in the JNDI tree.
The documentation led me to believe using the t3 naming service I could
protect anything under acl.<i>perm</i>.weblogic.jndi.<i>path</i>
but this does not seem to be the case. I assumed path was the jndi
path name... I have been unable to find documentation on what I
can attach ACL to in the JNDI tree - though I have seen a few
posted on deja, example from filerealm.properties,
#acl.list.weblogic.jndi.weblogic.ejb=system
#acl.modify.weblogic.jndi.weblogic.rmi=system
#acl.lookup.weblogic.jndi.weblogic.fileSystem=system
There seems to be <b>no</b> definitive list though in the BEA documentation.
Can anyone refer me to docs on what JNDI elements can attach ACL?
Or how I can protect things in the JNDI tree? I get the impression,
that I must manually implement ACL support for remote objects
I add into the tree. I have also not found good information
on this.
not helpful
anything searched with JNDI and ACL
http://e-docs.bea.com/wls/docs61/adminguide/cnfgsec.html
not very helpful
http://e-docs.bea.com/wls/docs61/security/prog.html#1043942Hi,
Check this debug in ur environment.
-Dweblogic.jndi.retainenvironment=true
this should show you the path.
Regards,
Kal. -
Why in jndi tree I find the remote interface to String is so strange?
when I view the jndi tree in weblogic server 61sp1
I found such information:
Bind Name: Enterprise1
Class: class $Proxy94
to String: ClusterableRemoteRef(10.132.0.161 [10.132.0.161])/275
hash Code: 4568198
Why the Class and to String like such? my license.bea
is not a cluster version.
Thanks you very much
"Kumar Allamraju" <[email protected]> wrote:
>EJB's are compiled with clustering options "ON". that's why you are seeing
>a
>ClusterableRemoteRef.
>Don't worry, you will not be able to run WLS instances in cluster mode
>without having a cluster license.
>
>--
>--
>Kumar
>
>"Eric nie" <[email protected]> wrote in message
>news:3ca8238a$[email protected]..
>>
>> when I view the jndi tree in weblogic server 61sp1
>> I found such information:
>>
>> Bind Name: Enterprise1
>> Class: class $Proxy94
>> to String: ClusterableRemoteRef(10.132.0.161 [10.132.0.161])/275
>> hash Code: 4568198
>>
>> Why the Class and to String like such? my license.bea
>> is not a cluster version.
>>
>
>
Maybe you are looking for
-
IWeb version 3.0.4 & adsense
What is the correct code to replace the Google Adsense Widget which USED to work beautifully? I want to stay with the "live ad" sizes already on my webpage but these are now blank on publication. I apologize if I am asking a stupid question, but I re
-
Material cost estimate can't be released
Hello Experts I've already handled with necessary steps including CK11N (create cost estimate), CK24(Mark and release), but it failed to be released although the cost estimate has been updated into 'Future' sheet in material master. It seems like the
-
Attaching pdf files they do not open in adobe reader?
I just downloaded Mozilla as browser due to the many issues with IE. Now when attaching PDF files or trying to read PDF files they show up as a Mozilla icon or do not open with Adobe Acrobat.
-
I was installing Leopard to my Mac Mini and iPhoto etc. was ok, but iWeb was off. Why?? My iLife (was coming also, when I by Mini) is 6. Even I doesn't need iWeb very much I'd like it to be in my Mini.
-
TS1646 still doesnt fix the problem.
i have called the bank and everything is fine on thier end but itunes still will not let me update cc info. just keeps asking for a valid security code. very frustrating!!!