EJBs lookup and catalina ...
Hello!
i am currently trying to use a combination of Catalina and an external EJB Server (running on another machine).
i am really struggeling with doing the jndi lookup. i have no idea where and how to set the properties in the web server and do the mapping from the ejb-refs to the jndi name? (since tomcat doesnt seem to have a deploymentplan?!)
maybe someone here knows the problem and can help, please?
(i am not sure but this might also be the wrong discussion group for that??)
thanks
wolfgang
Hi There,
It should be fairly straightforward to look up an Entity Bean running on a remote machine from a Servlet or JSP running on Tomcat 4.0. The first thing that you need to know is that this process will be in all likelyhood be App Server (EJB Server) specific. You'll need the client jar file and an app server specific jar file as well as information about the Context Factory and the URL syntax supported by the initial context. If you can give us some idea of what App server you are using then we might be able to offer some further advice.
Regards
Amanda
Developer Technical Support
Sun Microsystems
http://www.sun.com/developers
Similar Messages
-
Ejb lookup and oc4j container startup
I have a servlet that is set to auto start on container startup that does a lookup on a ejb in another container. jndi locates the ejbhome but fails to load the class for the ejb home. It knows the name of the class but the classloader cannot find it. This same servlet works fine after the container has started up.
It feel the problem is a classloader problem or a restriction by oracle. Any help is appreciated.
Why can't the OC4J default application that auto starts servlets at container startup not find the ejbhome class?
David JacobsWe have previously done it, but it only worked when we are using in 10g AS R1. But now, we are porting to R2, but it doesn't work. We didn't do any other things, just a simple lookup using the url, context factory. In R1 it worked fine, in R2, we are encountering the same, NameNotFoundException. Hope someone could help us also with this. Another thing, when we are using ormi://<rest of url>, it doesn't return any exception and our application hangs, but if we use opmn:ormi://<rest of URL>, that's the time it throws the NameNotFoundException. In R1, we didn't have any problems.
-
Security question JAAS: performing EJB lookup and authorized creation how?
Basic question is:
How can I perform a lookup from within a servlet to a stateless EJB in the same JVM and apply credentials to this EJB, so method calls perform following the authorization rules supplied on the EJB?
Trying to get this thing to work leads to:
javax.ejb.AccessLocalException: anonymous is not allowed to call this EJB method,
check your security settings (method-permission in ejb-jar.xml and
security-role-mapping in orion-application.xmlI've checked this over and over, but cannot find any possible cause for the error. I've mapped the logical authorization role from the ejb-jar.xml to a user known in a JAZN resource - so I'm thinking my InitialContext call is wrong.
Can somebody help me out?What version of OC4J are you using?
Can you post your contents in the ejb-jar.xml for the method permissions for your EJB you are looking up ?
Also please post the code that looks up the local EJB?
-Debu -
EJB lookup works in embedded OC4J but not stand-alone
I use JDeveloper 9.0.3.1 to develop a combined web & EJB application. The EJBs are deployed on a 9.0.3 iAS server on a different machine.
The EJB lookup is in a helper class that's called by the servlet. For EJB lookup, I use the class "com.evermind.server.rmi.RMIInitialContextFactory" as described by the OC4J servlet guide (http://download-uk.oracle.com/docs/cd/A97688_10/generic.903/a97680/develop.htm#1003973). So my code looks like this:
Hashtable map = new Hashtable();
map.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
map.put(Context.PROVIDER_URL, "ormi://server:port/app-business");
map.put(Context.SECURITY_PRINCIPAL, "admin");
map.put(Context.SECURITY_CREDENTIALS, "password");
map.put("dedicated.rmicontext", "true");
InitialContext context = new InitialContext(map);
Object thing = context.lookup("MyEjb");
EJBHome feedback = (EJBHome)PortableRemoteObject.narrow(thing, "com.company.ejb.MyEjbHome");
The last insert into the map (map.put("dedicated.rmicontext", "true");) wasn't mentioned neither in the servlet guide nor the EJB one. But without it, I'd always get some "domain is null" error.
Now this code above works flawlessly in the embedded OC4J of JDeveloper. But it always hangs in the "Object thing = context.lookup("MyEjb");" line when executed either in a stand-alone OC4J (the one from JDeveloper launched through the batch file in [JDeveloper directory]\jdev\bin\start_oc4j.bat) or in the OC4J in iAS.
Does anybody know why this happens or how to fix it? I know that there are other ways of EJB lookup in servlets but since we also have plain Java classes for testing purposes that access EJBs, this seemed like the simplest thing to do for both Java classes and servlets.I was referring to the java client case where this optoin is not required. In general for web clients one doesn't use the rmi initial context to find the bean. This is because the bean and the webclient are both packaged in the same application. One defines the ejb-ref in the web.xml for the bean and then looks it using the default initial context. Something like
Context ctx = new InitialCOntext();
ctx.lookup("bean ejb-ref-name");
However if you must use rmi for accessing the bean from the web client then the dedicated connection property is required.
For java clients you would setup the rmi context environment.
Since you are trying to use a common utility class for both java and webclient I would recommend that you look into packaging the java client as a j2ee application client. Basically in that case you would be able to define a ejb-ref in the aplication-client.xml and use the default initial context in code for both the cases.
Hope that helps
Dhiraj -
EJB lookup returned stub from a different classloader.
I've written an EJB for doing authenitcation. This EJB is accessed by an security-mbean (BEA's login module).
- The EJB is deployed in an EAR.
- The EJB-stubs are extracted and is included as part of the MBEAN Jar.
When I hit a webapp causing the EJB lookup to occur, the stub object returned is created by the webapp's classloader. This cause a ClassCastException when trying to cast the returned home interface into the home interface of the MBEAN's classloader.
Note that all this is happening on the same BEA server running WLS8.1.
I don't want to put the EJB jar on the system classpath so I can redeploy the EJB, the Application's EAR and the MBEAN to a cluster.
-alexRobert Greig <[email protected]> wrote:
Thanks for responding to my question, which newsgroup is more appropriate for
my line of question?
But before I move this thread, I would like to add:
I've already handled the recursion problem on top of the ejb-lookup before JNDI
becomes avaliable (while doing server startup) problem.
The advantage with the EJB model is this. By changing the host/port configuration,
I can switch between a local-authentication server or a remote provide authentication
server network configuration.
If I were to include the necessary classes in the mbean JAR from our application,
there maybe resources issues since I now have 2 classloaders loading my server-portion
of classes. Not sure how that will workout with resources and all. This model
has the disadvantage of any classes I have in the mbean JAR will require updates
outside my EAR. This wroks against the EAR deployment model.
-alex
Alex Cheung wrote:
I've written an EJB for doing authenitcation. This EJB is accessedby an security-mbean (BEA's login module).
- The EJB is deployed in an EAR.
- The EJB-stubs are extracted and is included as part of the MBEANJar.
This isn't a good approach. You are pretty much stuffed mainly for the
reasons you outline.
Also note that if you continue to go down this road you will have to
handle the potential recursion (i.e accessing an EJB will invoke a
security call to your provider!).
Why do you need to implement this as an EJB? The main advantages of EJBs
are security and container managed transactions neither of which is
relevant here surely?
Robert -
EJB lookup failing in DCM managed Oracle AS clustering
Hi
My purpose is to test DCM managed Oracle AS clustering:
For that I have two Oracle Application servers installed in two different machines with
Version: 10.1.2.0.2 and Installation Type as J2EE and Web Cache
I created an OracleAS File-based Farm and associated both the instances of AS to the cluster. Then I created One OC4J instance called InstanceOne on the cluster and deployed my Application ear onto the cluster.I also configued web Application and EJB Application State Replication the with OracleAS Cluster (OC4J).
My Application has one Ejb module and a web module. My stateless Session bean is Spring framework implemented and I am trying to load the Spring Context lookup from the Struts Action Class by using WebApplicationContext.
My spring context looks like this
<bean id="jndiTemplate"
class="org.springframework.jndi.JndiTemplate">
<property name="environment">
<props>
<prop key="java.naming.factory.initial">com.evermind.server.rmi.RMIInitialContextFactory</prop>
<prop key="java.naming.provider.url">opmn:ormi://<server host>:InstanceOne/<Application Name></prop>
<prop key="java.naming.security.principal">oc4jadmin</prop>
<prop key="java.naming.security.credentials">admin</prop>
<prop key="oracle.j2ee.naming.cache.timeout">30</prop>
<prop key="Dedicated.Connection">yes</prop>
<prop key="Dedicated.RMIcontext">false</prop>
<prop key="LoadBalanceOnLookup">true</prop>
</props>
</property>
</bean>
<bean id="service"
class="org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBean">
<property name="jndiTemplate">
<ref bean="jndiTemplate"/>
</property>
<property name="jndiName">
<value>MyServiceEJB</value>
</property>
<property name="cacheHome">
<value>false</value>
</property>
<property name="refreshHomeOnConnectFailure">
<value>true</value>
</property>
<property name="businessInterface">
<value>com.my.springejb.MyBusinessInterface</value>
</property>
</bean>
When I give only one server lookup like
opmn:ormi://<server host1>:InstanceOne/<Application Name>
then lookup is working, But by giving two servers in cluster, like opmn:ormi://<server host1>:InstanceOne/<Application Name>, opmn:ormi://<server host2>:InstanceOne/<Application Name>
I am getting error like this
06/12/01 19:27:41 java.lang.NumberFormatException: For input string: "InstanceOne"
06/12/01 19:27:41 at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
06/12/01 19:27:41 at java.lang.Integer.parseInt(Integer.java:468)
06/12/01 19:27:41 at java.lang.Integer.parseInt(Integer.java:518)
06/12/01 19:27:41 at com.evermind.server.rmi.RMIInitialContextFactory.getInitialContext(RMIInitialContextFactory.java:237)
06/12/01 19:27:41 at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
06/12/01 19:27:41 at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
06/12/01 19:27:41 at javax.naming.InitialContext.init(InitialContext.java:219)
06/12/01 19:27:41 at javax.naming.InitialContext.<init>(InitialContext.java:195)
06/12/01 19:27:41 at org.springframework.jndi.JndiTemplate.createInitialContext(JndiTemplate.java:105)
06/12/01 19:27:41 at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:83)
06/12/01 19:27:41 at org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBean.create(SimpleRemoteStatelessSessionProxyFactoryBean.java:19)
My intension of testing is, if I make one server instance (InstanceOne) down then my lookup should divert all ejb calls to the other server in the cluster, which is not happening at all, and I am getting Server SHUT DOWN exception in the server.
Can anybody please let me know, whether the approach is correct and is there any problem with Spring lookup which does not support multiple host lookup or anything I am missing in my steps, as I am following the Oracle Application Server High Availability Guide 10g Release 2 (10.1.2)you can find an running sample from :
http://javahowto.blogspot.com/2007/12/calling-weblogic-ejb-3-from-jruby-and.html
In weblogic, local ejb don't appear in the jndi tree, but , it can be founded ...
It works into 10.0 and 10.3
Cheers ! -
EJB lookup from another EJB server
Hi people,
I have two application servers on two different computers. One
of them contains an EJB, which I need to access from another EJB
server. I know that I can achieve this using RMI, but will then
security and transaction contexts be propagated to the called
EJB?
Sincerely,
Sergei Batiuk.Here is the solution posted on another forum:
[email protected] Dec 8, 6:03 am show options
Newsgroups: ibm.software.websphere.studio
From: [email protected]
Date: 8 Dec 2004 06:03:04 -0800
Local: Wed, Dec 8 2004 6:03 am
Subject: Re: EJB lookup on from one server to another does not work
Eric,
I dealt with this same problem trying to run 2 local servers (websphere
test servers), using 2 separate WSAD 5.1.2 workspaces. Running on 1
server I have an application that contains an EJB, and running on the
other server is an application that uses an access bean to make a
remote call to my EJB, running on my other server. I too repeately
received the "NameNotFoundException" when trying to lookup my EJB home
reference.
What you have to do to get around this is to modify the server
configuration of the application that contains the EJB that you are
attempting to call remotely. You must open the the server.wsi file for
the server that is running the EJB and go to the "Configuration" tab.
You must check the "Enable administrative console". Once this is
complete, start your server. When it is started, right click on the
server, and select "run administrative console". In the admin console,
select
servers -> application servers -> <your server> -> end points ->
bootstrap address. For "host" you must change "localhost" to either
your ip address or computer name (ive only tried my ip, but your
computer name should work too). When building your properties to get
the initial context, make sure you use
"env.put(Context.PROVIDER_URL, "corbaloc:iiop:<the ip or computer name
listed as the bootstrap host of server running ejb>:<the port listed as
the bootstrap port of server running ejb, which is 2809 in your case>
Restart your server and things should work. -
Peer disconnecting immediately after EJB lookup - timing issue?
I'm getting a timing problem with the Oracle EJB server, version
8.1.6.
I've deployed an EJB successfully, so I want to write the client-
side Java code to use it. The code calls the lookup() method on
the InitialContext, and gets back an EJBHome object like this:
Object ejb = new Object();
Hashtable env = new Hashtable();
env.put(Context.URL_PKG_PREFIXES, "oracle.aurora.jndi");
env.put(Context.SECURITY_PRINCIPAL, "username");
env.put(Context.SECURITY_CREDENTIALS, "password");
env.put(Context.SECURITY_AUTHENTICATION,
ServiceCtx.NON_SSL_LOGIN);
Context ic = new InitialContext(env);
ejb = (EJBHome)ic.lookup(serviceURL + objectName); // service
URL is the URL of the server, and objectName is the name of the
EJBRemote.
This works fine. The problem is that if I try to call create()
on the EJB home interface IMMEDIATELY after this block of code
finishes, it peer disconnects. If I wait for a second or two,
there's no problem.
// Bad code?! Have to wait 1-2 seconds before calling this
code, otherwise, we peer disconnect.
MyObjectEJBRemote myEJBremote = ejb.create();
The peer disconnect looks like the following:
org.omg.CORBA.COMM_FAILURE: java.io.IOException: Peer
disconnected socket minor code: 0 completed: No
at com.visigenic.vbroker.orb.TcpConnection.read
(TcpConnection.java, Compiled Code)
at
com.visigenic.vbroker.orb.GiopConnectionImpl.receive_message
(GiopConnectionImpl.java, Compiled Code)
at
com.visigenic.vbroker.orb.GiopConnectionImpl.receive_reply
(GiopConnectionImpl.java, Compiled Code)
at com.visigenic.vbroker.orb.GiopStubDelegate.invoke
(GiopStubDelegate.java, Compiled Code)
at com.visigenic.vbroker.orb.GiopStubDelegate.invoke
(GiopStubDelegate.java, Compiled Code)
at com.inprise.vbroker.CORBA.portable.ObjectImpl._invoke
(ObjectImpl.java, Compiled Code)
at MyObjectEJBRemote.myEJBmethod
(_st_MyObjectEJBRemote.java:1103)
at MyClient.callEJBMethod(MyClient.java, Compiled Code)
at javax.swing.AbstractButton.fireActionPerformed
(Unknown Source)
at
javax.swing.AbstractButton$ForwardActionEvents.actionPerformed
(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed
(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown
Source)
at
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown
Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent
(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent
(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown
Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForComponent
(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForComponent
(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown
Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Do I have to put a delay in my code in between calling the lookup
() and calling the create()? Is there something simple that I'm
missing? All I know is that if I wait for a just a moment
before I call create(), then the code works fine.
- rjms
NOTE: Please note that my email address is now:
[email protected]. Thanks.I'm getting a timing problem with the Oracle EJB server, version
8.1.6.
I've deployed an EJB successfully, so I want to write the client-
side Java code to use it. The code calls the lookup() method on
the InitialContext, and gets back an EJBHome object like this:
Object ejb = new Object();
Hashtable env = new Hashtable();
env.put(Context.URL_PKG_PREFIXES, "oracle.aurora.jndi");
env.put(Context.SECURITY_PRINCIPAL, "username");
env.put(Context.SECURITY_CREDENTIALS, "password");
env.put(Context.SECURITY_AUTHENTICATION,
ServiceCtx.NON_SSL_LOGIN);
Context ic = new InitialContext(env);
ejb = (EJBHome)ic.lookup(serviceURL + objectName); // service
URL is the URL of the server, and objectName is the name of the
EJBRemote.
This works fine. The problem is that if I try to call create()
on the EJB home interface IMMEDIATELY after this block of code
finishes, it peer disconnects. If I wait for a second or two,
there's no problem.
// Bad code?! Have to wait 1-2 seconds before calling this
code, otherwise, we peer disconnect.
MyObjectEJBRemote myEJBremote = ejb.create();
The peer disconnect looks like the following:
org.omg.CORBA.COMM_FAILURE: java.io.IOException: Peer
disconnected socket minor code: 0 completed: No
at com.visigenic.vbroker.orb.TcpConnection.read
(TcpConnection.java, Compiled Code)
at
com.visigenic.vbroker.orb.GiopConnectionImpl.receive_message
(GiopConnectionImpl.java, Compiled Code)
at
com.visigenic.vbroker.orb.GiopConnectionImpl.receive_reply
(GiopConnectionImpl.java, Compiled Code)
at com.visigenic.vbroker.orb.GiopStubDelegate.invoke
(GiopStubDelegate.java, Compiled Code)
at com.visigenic.vbroker.orb.GiopStubDelegate.invoke
(GiopStubDelegate.java, Compiled Code)
at com.inprise.vbroker.CORBA.portable.ObjectImpl._invoke
(ObjectImpl.java, Compiled Code)
at MyObjectEJBRemote.myEJBmethod
(_st_MyObjectEJBRemote.java:1103)
at MyClient.callEJBMethod(MyClient.java, Compiled Code)
at javax.swing.AbstractButton.fireActionPerformed
(Unknown Source)
at
javax.swing.AbstractButton$ForwardActionEvents.actionPerformed
(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed
(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown
Source)
at
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown
Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent
(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent
(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown
Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForComponent
(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForComponent
(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown
Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Do I have to put a delay in my code in between calling the lookup
() and calling the create()? Is there something simple that I'm
missing? All I know is that if I wait for a just a moment
before I call create(), then the code works fine.
- rjms
NOTE: Please note that my email address is now:
[email protected]. Thanks. -
EJB lookup on Remote Server or different domain fails
Hi,
I am having two different domain (domain1,domain2) respectvely. My ABC.ear j2eee application is deployed on domain2 and its iiop port is 33703.In domain1 i have xyz.war (web application) and it's IIOP port is 3700 .In xyz.war i am having CallEJB.jsp file.In this Jsp file i want to lookup an EJB Service called PaymentEJB(JNDI Name is ejb/PaymentEJB).
The code is below
InitialContext context=new InitialContext();
Object objRef=context.lookup("corbaname:iiop:andaman:33703#ejb/PaymentEJB");
I am getting the following error.
[#|2005-12-14T16:42:03.422+0530|SEVERE|sun-appserver-pe8.1_02|javax.enterprise.resource.corba._DEFAULT_.rpc.transport|_ThreadID=11;|"IOP00410216: (COMM_FAILURE) Unable to create IIOP listener on the specified host/port: all interfaces/3700"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 216 completed: No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.createListenerFailed(ORBUtilSystemException.java:2661)
My doubt is
1.While starting domain1 and domain2 iiop listeners are started on the port 3700 and 33703.in that case why EJB lookup tries to create listener on one more time.
2.I am looking the 33703 port only.but it tries to create port on 3700 why?
3.It was working till JES2005Q1.Is there any patch i need to install? or i need to change anything in my code.
I am frustrated with this error for past one week.I will be happy if some body will give me the peace of mind(thru some solution).Hi
I found the solution for this issue.
To lookup the EJB applications in web component,we should not set any thing in the Initial Context.i.e the lookup should be
InitialContext initContext=new InitialContext();
Object objref = initContext.lookup("java:comp/env/ejb/"+ejbName_);
This will get you the Home object of the EJB you are looking.
In your web.xml you should have the entry like below.(Just replace the ejbname which you are looking for)
<ejb-ref>
<ejb-ref-name>ejb/GetAssertionEJB</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>com.ssertion.GetAssertionHome</home>
<remote>com.assertion.GetAssertionRemote</remote>
</ejb-ref>
In your sun-wb.xml,you should have the entry like below(Just replace the ejbname which you are looking for)
<ejb-ref>
<ejb-ref-name>ejb/GetAssertionEJB</ejb-ref-name>
<jndi-name>corbaname:iiop:<hostname>:<iiopport>#ejb/GetAssertionEJB</jndi-name>
</ejb-ref>
Hope this works. -
JNDI EJB Lookup fails on Remote Server
Hi,
I am having two different domain (domain1,domain2) respectvely. My ABC.ear j2eee application is deployed on domain2 and its iiop port is 33703.In domain1 i have xyz.war (web application) and it's IIOP port is 3700 .In xyz.war i am having CallEJB.jsp file.In this Jsp file i want to lookup an EJB Service called PaymentEJB(JNDI Name is ejb/PaymentEJB).
The code is below
InitialContext context=new InitialContext();
Object objRef=context.lookup("corbaname:iiop:andaman:33703#ejb/PaymentEJB");
I am getting the following error.
[#|2005-12-14T16:42:03.422+0530|SEVERE|sun-appserver-pe8.1_02|javax.enterprise.resource.corba._DEFAULT_.rpc.transport|_ThreadID=11;|"IOP00410216: (COMM_FAILURE) Unable to create IIOP listener on the specified host/port: all interfaces/3700"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 216 completed: No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.createListenerFailed(ORBUtilSystemException.java:2661)
My doubt is
1.While starting domain1 and domain2 iiop listeners are started on the port 3700 and 33703.in that case why EJB lookup tries to create listener on one more time.
2.I am looking the 33703 port only.but it tries to create port on 3700 why?
3.It was working till JES2005Q1.Is there any patch i need to install? or i need to change anything in my code.
I am frustrated with this error for past one week.I will be happy if some body will give me the peace of mind(thru some solution).http://docs.sun.com/source/819-0079/dgjndi.html
This might help. -
JNDI / EJB deployment and clustering
I'm aware that replication isn't supported for stateful EJBs. But the
"serialization of the handle isn't supported" statement has me concerned.
So I'm looking for a little clarification on this scenario:
Let's say I've got a stateful session bean, which is accessed from a
servlet. For performance reasons, you want to find the colocated instance -
the smart stub should do this, right? To have it colocated in all
instances, then I need to deploy it into each server of the cluster. This
essentially bind()/rebind()'s (whichever call the container does during a
deploy operation) the EJB n times. Does each of those JNDI bind/rebind
calls "overwrite" the previous one, or does the replicated JNDI tree somehow
"keep" all the entries?
What happens if I bind/rebind "non-cluster enabled" objects into the JNDI
tree in each server to the same name (like a reference data table - doesn't
really need to be an RMI object, one per server is fine)? Will they get
"overwritten"? Should I need to take into account the server name when
binding into the tree, and then also use that for subsequent lookups?
Thanks for any input!
--Jason
Guys,
Thanks for the information.
The problem was that classpath, some other packages required for the Bean
were not in the weblogic\classes directory.
so that was it.
Thanks
/selvan
Murali Krishna Devarakonda wrote in message
<7qjkr1$7dl$[email protected]>...
Are you using the HOT DEPLOY feature(startweblogic.bat does it)?
Then you could go to the WebLogic Console, select the Bean, and Redploy.
You could also do it from a command line utility "weblogic.deploy".
If you didn't start the server with the hot deploy, you need to restartyour
server after any changes.
You should read the weblogic docs on the Hot Deploy feature. A different
classloader is used for it. Also, the standard weblogic classpath cannot
coexist with it.
Hot Deploy uses: (assuming your weblogic installation is in D:/WebLogic
D:\WebLogic\classes/boot
It will throw an exception if you have D:\weblogic\classes or
D:\WebLogic\lib\weblogicaux.jar in the system classpath. You need to use
the weblogic.classpath instead.
Regards,
Murali Krishna Devarakonda
Tamilselvan Ramasamy <[email protected]> wrote in message
news:7qi0ln$kpc$[email protected]..
Hello,
I have created bunch of EJB Components and deployed for WLS4.0 using the
following way. It works fine under WLS4.0
To compile java code -> javac *.java
Create SER file -> java weblogic.ejb.utils.DDCreator -d .
DeploymentDescriptor.txt
Create JAR file -> jar cmf manifest Bean.jar /directory
EJBC and deployment -> java weblogic.ejbc -d /targetDirectory Bean.jar
and also add an entry in the welogic.properties file
weblogic.ejb.deploy= ...
When I do the samething in the WLS4.5, it doesn't work, first of all,
JNDI
is not finding the home interface. It throws a naming Exception
please give me an idea hw do I deploy my Beans in the WLS4.5 using the
command line option. I don't have Visual Cafe to do that automatically.So
I
have to do that manually.
Thanks
/selvan
Captura Software Inc
[email protected] -
EJB protection and SPIs in WLS 9.1 ?
I am trying to port an Authorization provider to WLS 9.1 which was working fine in WLS 7 and WLS 8.1 to perform EJB protection.
I have the
<b>isAccessAllowed(Subject subject, Map roles, Resource resource, ContextHandler handler,Direction direction)</b>
method in my Authorization provider impl class.
In WLS 7 and WLS 8.1 the Resource object was getting filled correctly with the type of resource.
But when I was testing this on WLS 9.1 by accessing an EJB method (remotely and locally) the Resource object type was <jndi> instead of <ejb>
Did anybody encounter this problem. Basically I am trying to get hold of the details of the EJB being accessed in the custom authorization SPI provider and check permission for the EJB method and act accordingly.
But the <b>Resource </b> object of <b>isAccessAllowed </b>is not filling the <ejb> type and details. It is always filling in it with <jndi> lookup details.
Thanks
Premhi
Currently I am using
req.getHeader("WL-Proxy-Client-Cert")
to get the client certificate and then i do the following to get the X509 cert format
if (pemCert != null && pemCert.length() > 0 ){
pemCertBuff.append("-----BEGIN CERTIFICATE-----");
pemCertBuff.append(pemCert);
pemCertBuff.append("-----END CERTIFICATE-----");
System.out.println("CertificateUtil:getFingerPrint: pemCertBuff --"+pemCertBuff.toString());
X509Certificate certs = null;
try {
CertificateFactory cf = CertificateFactory.getInstance("X.509");
ByteArrayInputStream bis = new ByteArrayInputStream(pemCertBuff.toString().getBytes());
weblogic.security.PEMInputStream pemIs = new weblogic.security.PEMInputStream(bis);
BufferedInputStream bufis = new BufferedInputStream(pemIs);
certs = (X509Certificate)cf.generateCertificate(bufis);
} catch (CertificateException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
And I am able to get the certificate, but I need to know is there any other elegant way to get the certificate as we did using weblogic.security.X509 class?
Please help!!
Message was edited by:
rmkandan -
What is the difference between ejb reference and ejb handle?
Hi:
I am newbie for J2EE.
I want to know what is the difference between ejb reference and ejb handle
from the client view and from the container view?
Very Thanks!
StiveHi John,,
1) Ejb Object Handle are nothing but a long lived proxy for the
ejb object, using this handle user can disconnect from the Ejb Server/Container
at any time
and after some time using the same handle he can able to resume the conversational
state
with the server / container where he was been disconnected From.
And there are currently two Handles , HomeHandle and Handle for EjbHomeObject
and EjbObject
Respectively. Both these handles have Persistent reference to the EJB Object
2) Ejb Reference is used to lookup a bean from other Enterprise Bean
Ejb reference is a nickname for the JNDI Location that you want to lookup a bean.
your code will looks up a Home object via using this nickname
and the deployer will bind the
nickname to the JNDI location of its choice
EJb Reference are declared in the deployment descriptor
Regards
Karthikeyan Gangadharan
SIP Technologies, Chennai
E-mail-ID : [email protected]
"John Stive" <[email protected]> wrote:
>
Hi:
I am newbie for J2EE.
I want to know what is the difference between ejb reference and ejb
handle
from the client view and from the container view?
Very Thanks!
Stive -
Cisco Jabber for Mac - Directory Lookup and Contact Fields
Hello,
After having issues myself with Cisco Jabber for Mac 9.2 specifically with Active Directory lookups not working, or contact information not populating (and therefore not being able to call users from the contact list as no telephone information exists) I am including a sample jabber-config.xml file that works for me.
Please note: there are many different ways to configure this. What I will be showing is the method that works for me and my deployment, which is pretty standard.
As always and as a disclaimer, once again, this is what has worked for my deployment scenario. Always keep backups of your configuration files, and always be mindful of anything you have configured already, especially in the jabber-config.xml file.
Background
My deployment is based on CUCM 9, with 1 publisher and 2 subscribers. I also have a CUCM IM & Presence 9.0 server. This assumes that you have already configured your deployment and Jabber is functioning already, albeit with the aforementioned issues.
As for Active Directory, my deployment will be based on Windows 2008 R2 Domain Controllers running in native 2008 mode. For this example, we will be searching directly against one of the DCs with a Global Catalogue role. Please be aware that in large deployments you will have to plan accordingly with regards to lookup traffic from Jabber clients to the DCs.
Also, as of Cisco Jabber for Mac 9, the client no longer can search via the CUCM internal directory (which may be made of local end users, Active Directory synced users, or a mix of both) and this must be done via a LDAP mechanism.
Scenario
In this deployment scenario, Cisco Jabber for Windows is working properly - you can search and add people from Active Directory, and contacts in your contact list have all the appropriate fields populated from Active Directory. However, when trying the same with Jabber for Mac, Jabber for iPhone or Jabber for iPad you notice that you cannot perform a directory lookup, and if you add people directly (for example, [email protected]) the user only has the IM field populated. No telephone, email or additional information is displayed.
Solution
Whereas Cisco Jabber for Windows uses the EDI mechanism (native Windows), whereby when running from a computer that is on the domain (or in the event that you are search for contacts in another Active Directory domain where a domain trust exists) , Jabber for Mac / iPhone / iPad uses the BDI mechanism.
In this case, you will need to provision a jabber-config.xml file that you will upload to your TFTP server (or Publisher) that will be "downloaded" by your Jabber for Mac client and also used by the iPhone and iPad client. You can configure many options in the jabber-config.xml file, but for this example we will place just the information that we need to order for these clients to request and display Active Directory information.
Please note that the configuration may vary depending on your deployment, but at the very least we will be:
- Configuring a DC where we will perform the lookup.
- Configure credentials that will be used to perform the lookup. This will be an Active Directory account that has read rights on the Active Directory domain. Please note that these credentials are saved in plain text in the file, so ensure that the account that you will be using is not privileged.
- Configure the server port that we will be using to perform the lookup.
- Configure the Search Base. This is basically where we want the directory lookup to happen. You can either choose for this lookup to start at the "base" of the domain (and therefore the search will iterate through all the user accounts and and OUs below the root base) or define a specific OU where you want to search.
Caution!
- There is a current limitation with Cisco Jabber for Mac whereby you can only have 1 search base configured. Please keep this in mind if, like me, you have multiple OUs (like an OU for each company in your organization) and under these OUs you have sub OUs as a user account container.
- If using the top level search base, unless you specify a filter, you will potentially be able to search for all user accounts in the domain. You will need to configure the <BDIBaseFilter> parameter if you want to fine tune your search ability.
Steps
These are the steps I have followed. Other steps or considerations may vary.
- Log in to your TFTP server and download the jabber-config.xml file and keep it as a backup. If you are already using the jabber-config.xml file for other purposes, do not worry - you can add your BDI information parameters inside.
- Remove the jabber-config.xml file
- Edit the jabber-config.xml file and configure thus:
<?xml version="1.0" encoding="UTF-8"?>
<config version="1.0">
<Directory>
<DirectoryServerType>BDI</DirectoryServerType>
<BDILDAPServerType>AD</BDILDAPServerType>
<BDIPrimaryServerName>DOMAIN CONTROLLER IP ADDRESS</BDIPrimaryServerName>
<BDIPresenceDomain>YOUR PRESENCE DOMAIN</BDIPresenceDomain>
<BDIServerPort1>3268</BDIServerPort1>
<BDISearchBase1>YOUR SEARCH BASE</BDISearchBase1>
<BDIConnectionUsername>[email protected]</BDIConnectionUsername>
<BDIConnectionPassword>PASSWORD</BDIConnectionPassword>
<BDIEnableTLS>0</BDIEnableTLS>
</Directory>
</config>
For example, let´s assume the following:
- Domain controller IP address is 10.1.1.2 .
- Your presence domain is test.local .
- Your search base will be test.local using the top level of the domain.
- Your username with which you will be doing your searches is called walt . Usually you can either identify walt as test.local\walt or [email protected] . It is always best, in these sort of scenarios, to use the UPN convention so we will be configuring a [email protected] .
- The password is the Active Directory password for the account walt .
- I have disabled TLS in my case. There are issues with the Jabber for Mac client when using other security methods.
<?xml version="1.0" encoding="UTF-8"?>
<config version="1.0">
<Directory>
<DirectoryServerType>BDI</DirectoryServerType>
<BDILDAPServerType>AD</BDILDAPServerType>
<BDIPrimaryServerName>10.1.1.2</BDIPrimaryServerName>
<BDIPresenceDomain>test.local</BDIPresenceDomain>
<BDIServerPort1>3268</BDIServerPort1>
<BDISearchBase1>DC=test,DC=local</BDISearchBase1>
<BDIConnectionUsername>[email protected]</BDIConnectionUsername>
<BDIConnectionPassword>walt01!</BDIConnectionPassword>
<BDIEnableTLS>0</BDIEnableTLS>
</Directory>
</config>
One you have configured the jabber-config.xml file, you will now need to upload it to you TFTP server. Once uploaded, you will need to restart the Cisco TFTP service. Again, my TFTP server is on my CUCM publisher, so:
- I go to Cisco Unified OS Administration on my Publisher server, TFTP File Management and I upload jabber-config.xml to / directory
- I then go to Cisco Unified Serviceability on my Publisher server, I locate the Cisco TFTP service and I restart the service
Once this is done, you can figure up your Jabber for Mac client. As a test, on your Mac (using Terminal) go to:
/Users/username/Library/Application Support/Cisco/Unified Communications/Jabber/Config
In here you will see several files, but what we want to see is jabber-config.xml . As soon as you start the Jabber for Mac client and log in, the jabber-config.xml file will download from your TFTP server and get saved here. When you see it appear, just type in your terminal window more jabber-config.xml and make sure that the output is the same as the xml file you created.
From there, try doing directory search. If you have previously added contacts and they still lack attribute information, you will need to remove them (sometimes it will not refresh properly) and add them again from the directory.
I will be updating this guide and ammending anything that is incorrect, but this is meant to be a quick checklist and steps to get this, at least in the most very basic version, up and running for Jabber for Mac.Hello,
Thanks for this post! It works, I can do lookup and also I can add found contact to contact list and get information about contact from LDAP.
One more question: - I can't get all information about contact. I don't get e.c mobile phone number and more others attributes. I have tried to expand your file as follows:
<?xml version="1.0" encoding="UTF-8"?>
<config version="1.0">
<Directory>
<DirectoryServerType>BDI</DirectoryServerType>
<BDILDAPServerType>AD</BDILDAPServerType>
<BDIPrimaryServerName>IP of AD</BDIPrimaryServerName>
<BDIPresenceDomain>Presence Domain</BDIPresenceDomain>
<BDIServerPort1>3268</BDIServerPort1>
<BDISearchBase1> Search Base</BDISearchBase1>
<BDIConnectionUsername>User</BDIConnectionUsername>
<BDIConnectionPassword>Password</BDIConnectionPassword>
<BDIEnableTLS>0</BDIEnableTLS>
<BDISipUri>msRTCSIP-PrimaryUserAddress</BDISipUri>
<BDIPhotoSource>thumbnailPhoto</BDIPhotoSource>
<BDIBusinessPhone>telephoneNumber</BDIBusinessPhone>
<BDIMobilePhone>mobile</BDIMobilePhone>
<BDIHomePhone>homePhone</BDIHomePhone>
<BDIOtherPhone>otherTelephone</BDIOtherPhone>
<BDITitle>title</BDITitle>
<BDICompanyName>company</BDICompanyName>
<BDILocation>co</BDILocation>
<BDIPostalCode>postalCode</BDIPostalCode>
<BDICity>l</BDICity>
<BDIState>st</BDIState>
<BDIStreetAddress>streetAddress</BDIStreetAddress>
</Directory>
</config>
But it didn't help.
When I capture lookup via Wireshark, I can see that Jabbers sends search request with bunch of attributes, but from LDAP answer contains only 8 attributes. (see attached screenshots) -
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
Maybe you are looking for
-
Need to activate Adobe Photoshop CS3 again but it won't work
Hello happy Photoshoppers, I've been using Photoshop for a while now and never felt the urge to upgrade to a newer version. So I'm still using CS3 (Extended Edition), which i bought back in 2006 or so. Since then it's been working perfectly. Last wee
-
How to display tables values in next window
Hello Abapgurus, This is my problem which i explained below. IF the text has 11 rows and you can only print 8 rows in the current page, THEN go to next page print all 11 rows at the fresh page. How cna i achieve this. Waiting for your favourable re
-
Can you listen to the radio without internet on the ipod touch?
Can you listen to the radio without internet on the ipod touch? (like the nano?)
-
I have just popped a CD into my Superdrive but nothing happens
I am running an early 2011 Macbook Pro 2.4Ghz Core i5 with 8GB DDR3 and OSX 10.7.5 I have just popped a CD into the superdrive and nothing has happened. Using the keyboard eject button results in no action. I managed to place the eject button on the
-
Jsp portlet multiple select parameters problem
To whom it may respond to, I am trying to get page parameters using : String foo = pReq.getParameter("foo"); It works , but I don't know how to handle something like "String[] foo", that has multiple values to get like url.jsp?foo=1&foo=2&foo=3 Thank