Regular RMI server object with WebLogic JNDI
Is that possible to register a regular RMI object with WebLogic JNDI
tree? I was building a simple program (using javac and rmic only) based
on the java.rmi.* (without changing the import statements to
weblogic.rmi.*) and using the weblogic.jndi to register the server
object. Below is some piece of code,
Context ctx = null;
Hashtable ht = new Hashtable();
ht.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
ht.put(Context.PROVIDER_URL, "t3://172.20.20.20:7001");
ctx = new InitialContext(ht);
ctx.bind("HelloServer", obj);
The code failed for the following reason,
javax.naming.NamingException. Root exception is
java.rmi.MarshalException: failed to marshal public abstract void
weblogic.jndi.internal.NamingNode.bind(java.lang.String,java.lang.Object,java.util.Hashtable)
throws javax.naming.NamingException,java.rmi.RemoteException; nested
exception is:
java.rmi.server.ExportException: A description for
examples.rmi.hello.HelloImpl was found but it could not be read due to:
[Failed to find examples.rmi.hello.HelloImpl_WLStub or
examples.rmi.hello.Hello_WLStub for class examples.rmi.hello.HelloImpl]
java.rmi.StubNotFoundException: Failed to find
examples.rmi.hello.HelloImpl_WLStub or examples.rmi.hello.Hello_WLStub
for class examples.rmi.hello.HelloImpl
at
weblogic.rmi.internal.BasicDescriptor.<init>(BasicDescriptor.java:101)
at
weblogic.rmi.internal.BasicRuntimeDescriptor.<init>(BasicRuntimeDescriptor.java:50)
at
weblogic.rmi.internal.DescriptorManager.resolveClass(DescriptorManager.java:55)
at
weblogic.rmi.internal.DescriptorManager.getDescriptor(DescriptorManager.java:39)
at
weblogic.rmi.internal.DescriptorManager.getDescriptor(DescriptorManager.java:30)
at
weblogic.rmi.internal.OIDManager.getRequestDispatcher(OIDManager.java:281)
at
weblogic.rmi.internal.OIDManager.getReplacement(OIDManager.java:270)
at
weblogic.rmi.internal.OIDManager.replaceObject(OIDManager.java:98)
at
weblogic.common.internal.ChunkedObjectOutputStream.replaceObject(ChunkedObjectOutputStream.java:55)
at
weblogic.common.internal.ChunkedObjectOutputStream$NestedObjectOutputStream.replaceObject(ChunkedObjectOutputStream.java:239)
Any idea?
- SteveC
"Pyung Yoon" <[email protected]> writes:
MediatorInterface mediator = (MediatorInterface) java.rmi.Naming.lookup("rmi://localhost:7001/TestMediator);This implies JRMP which the server does not support. You need to use t3 or iiop.
andy
Similar Messages
-
RMI server object lookup in a session bean
Hi all,
I am getting MarshalException when I call java.rmi.Naming.lookup() in a session
bean. Following is the code and exception. Please note that I am using java.rmi
package instead of weblogic.rmi and that both the session bean and RMI server
object (a startup class) is deployed on the same machine.
Thanks for your help in advance.
// a simple, replica-aware session bean method
// some code here
try {
MediatorInterface mediator = (MediatorInterface) java.rmi.Naming.lookup("rmi://localhost:7001/TestMediator);
catch (Exception e) {
// log the exception
The exception:
java.rmi.MarshalException: Error marshaling transport header; nested exception
i
s:
java.io.EOFException
java.io.EOFException
at java.io.DataInputStream.readByte(DataInputStream.java:224)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:206
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:174)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:318)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at java.rmi.Naming.lookup(Naming.java:84)
at test.mgmtop.CreateNetworkOpHandler.execute(CreateNetworkOpHandler.jav
a:88)
at test.mgmtop.CreateNetworkOpHandler.perform(CreateNetworkOpHandler.jav
a:28)
at test.ejb.MgmtServiceBean.create(MgmtServiceBean.java:57)
at test.ejb.MgmtServiceSession_idi8yo_EOImpl.create(MgmtServiceSession_i
di8yo_EOImpl.java:46)
at test.ejb.MgmtServiceSession_idi8yo_EOImpl_WLSkel.invoke(Unknown Sourc
e)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:346)
at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerR
ef.java:114)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:300)
at weblogic.security.service.SecurityServiceManager.runAs(SecurityServic
eManager.java:762)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.jav
a:295)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest
.java:30)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:152)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:133)Hi Pyung,
How about trying this instead:
InitialContext ctx = new InitialContext();
MediatorInterface mediator = (MediatorInterface) ctx.lookup("TestMediator");
This assumes your startup class binds the Mediator to the JNDI name "TestMediator".
- Matt
Pyung Yoon wrote:
Hi all,
I am getting MarshalException when I call java.rmi.Naming.lookup() in a session
bean. Following is the code and exception. Please note that I am using java.rmi
package instead of weblogic.rmi and that both the session bean and RMI server
object (a startup class) is deployed on the same machine.
Thanks for your help in advance.
// a simple, replica-aware session bean method
// some code here
try {
MediatorInterface mediator = (MediatorInterface) java.rmi.Naming.lookup("rmi://localhost:7001/TestMediator);
catch (Exception e) {
// log the exception
The exception:
java.rmi.MarshalException: Error marshaling transport header; nested exception
i
s:
java.io.EOFException
java.io.EOFException
at java.io.DataInputStream.readByte(DataInputStream.java:224)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:206
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:174)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:318)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at java.rmi.Naming.lookup(Naming.java:84)
at test.mgmtop.CreateNetworkOpHandler.execute(CreateNetworkOpHandler.jav
a:88)
at test.mgmtop.CreateNetworkOpHandler.perform(CreateNetworkOpHandler.jav
a:28)
at test.ejb.MgmtServiceBean.create(MgmtServiceBean.java:57)
at test.ejb.MgmtServiceSession_idi8yo_EOImpl.create(MgmtServiceSession_i
di8yo_EOImpl.java:46)
at test.ejb.MgmtServiceSession_idi8yo_EOImpl_WLSkel.invoke(Unknown Sourc
e)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:346)
at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerR
ef.java:114)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:300)
at weblogic.security.service.SecurityServiceManager.runAs(SecurityServic
eManager.java:762)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.jav
a:295)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest
java:30)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:152)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:133) -
Hello All,
Does WLServer6.1 take care of having a pool of RMI Server objects, similar
to the way EJB container does it for EJBs. I guess what I am trying to
achieve is an effect of Servlets that spawn light threads per invocation
though now using RMI Server Object. I did look at the "executeThreadPool"
options which would allow for increasing performance. I am not 100%
satisfied with it though. Is there any way I can do this. Thanks,
Chirag"Pyung Yoon" <[email protected]> writes:
MediatorInterface mediator = (MediatorInterface) java.rmi.Naming.lookup("rmi://localhost:7001/TestMediator);This implies JRMP which the server does not support. You need to use t3 or iiop.
andy -
How do I design and write stateful RMI client/server applications?
I just find the examples on the Web that introduce RMI with some sample RMI client/server programs which are stateless, that means the RMI client and server do not maintain session information.
I would like to design and write stateful client/server applications with RMI, i.e. a new instance of server object is invoked to handle a client Java applet connection session, and maintains state/session information such as security context in the server instance's local variables.
Is that possible? Where can I find sample programs and design guidelines for this topic??I suggest that you approach this slightly differently.
1. RMI generally gives access to a common server object, with each remote request being handled in a different thread. You can just as well have that common object do a lookup on a (synchronized) table of sessions. In other words, when a new client makes a request, look that client up, and if it is not in the table, then create a new session object and put it in the table. So now you have saved state.
2. A variation on this: Make your common server object create a session object, and return a remote reference to the caller. All subsequent requests go to the individual session object. (The terminology hear is probably misleading; we have done such designs, and call the registered object an "entry", and the individual objects "servers". -
How to add a custom jndi object into weblogic jndi context.
Hi,
I noticed that there is a standard way of adding jndi entry in the weblogic jndi context. One is through the console by specifying the jndi name (e.g DataSource) and this is added in config.xml and in its appropriate "jdbc/xxx-jdbc.xml". The question now is, I have an object which I would like to be included in the global weblogic jndi context.
<entry key="java:comp/env/jms/wsnotificationCF">
<bean class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL" value="tcp://localhost:61616"/>
</bean>
</entry>
or
<entry key="java:comp/env/obj/UUID_CLASS_KEY" value="org.apache.servicemix.bpe.uuid.ActiveMQUUIDService"/>
This is just a sample of a possible entry. Is there then a way I could add this object in weblogic jndi context ?
Regards,
FritzHi,
I noticed that there is a standard way of adding jndi entry in the weblogic jndi context. One is through the console by specifying the jndi name (e.g DataSource) and this is added in config.xml and in its appropriate "jdbc/xxx-jdbc.xml". The question now is, I have an object which I would like to be included in the global weblogic jndi context.
<entry key="java:comp/env/jms/wsnotificationCF">
<bean class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL" value="tcp://localhost:61616"/>
</bean>
</entry>
or
<entry key="java:comp/env/obj/UUID_CLASS_KEY" value="org.apache.servicemix.bpe.uuid.ActiveMQUUIDService"/>
This is just a sample of a possible entry. Is there then a way I could add this object in weblogic jndi context ?
Regards,
Fritz -
RMI server object getting garbage collected
Hi all,
I have seen a number of posts regarding the ConnectException and found that this can occur in a number of situations.
I am having a problem here.
I am having an RMI server that is always up and running. And the server object gets requests from the client at regular intervals. But, when the server object is not receiving any requests for a long time (ex: 1 day), then I think the remote object itself is getting garbage collected. And so, tough I am able to get the remote reference using the lookup method, I am getting "Connection refused to host: 192.168.0.216; nested exception is:
java.net.ConnectException: Connection refused" when I call a method using this reference.
I believe that this is because the server object getting garbage collected as there are no requests for the server since long. Please correct me if my assumption is wrong.
I want to know, after how much time the server object gets garbage collected if no requests are received. But, my requirement is that the server object should always be available and WHENEVER a client request comes then that should be processed. What should I do to accomplish this task.
If any one have any suggestions, please reply as soon as possible.
Thanks in advance,
srik4uYou might do some research into using an activatable remote object. You run rmid (the rmi activation deamon) and register a subclass of java.rmi.activation.Activatable (instead of the usual UnicastRemoteObject) with it. With an activatable object, the remote reference to the activatable object doesn't need to have a live object behind it. If an activatable object is not running (ie: it hasn't been constructed yet, or it has been garbage collected ...as in your case) a remote reference to the object can still be exported to a client. The first time the client calls a method on the remote object, the activation service on the server sees the object is not active, and activates the object for the client. If the object is running ...it is rmi as usual. But if it gets gc'd again, the next invocation on the remote object will trigger the activation service again.
(The above explanation paraphrases author David Flanagan from Java Enterprise in a Nutshell, O'Reilly)
I have only built one of these, which loosely followed an example from the above mentioned book. It's a whole other ballgame over and above a regular rmi object. But like anything else, if you dig in and get your head wrapped around it, it eventually makes sense. Ok, why lie ...it confused the hell out of me and left me a little queasy. But you know the drill, by the time you build a few of them it will probably seem as easy as mapping the human genome, right? At any rate, it seems like what you might be after ...so have a look at it. Good luck, and wear your lifejacket. -
RMI Server Object Startup Error
Greetings,
I am trying to set up a computer lab at my college. I currently have one server running Slackware 9.1 and one client (my laptop) running Windows XP Home. I can telnet and ftp from my client. I can also access the Apache web server running on the Linux machine. I recently discovered RMI as a way to do distributed computing (we are trying to build a proof-of-concept distributed computing system). However, I cannot get RMI to work. When I take the code I wrote and use my laptop as both client and server, everything works. However, when I try to use both machines, it does not work. I want the Linux box to be the server and my laptop to be the client. After compiling my RMI server class (the class that registers the server object for use under RMI) and running it by typing java RemServer, I get a strange error (see bottom of this message). I cannot find this error anywhere else on the internet. I have the rmiregistry program running. I do everything the same as when I do RMI on just my laptop. Please help!
RemServer Remote Exception: java.rmi.UnmarshalException: Error unmarshaling return; nested exception is:
java.net.SocketException: Connection reset
[Ljava.lang.StackTraceElement;@13d93f4
Thanks,
JasonOne thing I did discover is that I have not been explicitly starting rmid. Some documentation says that rmi starts rmid automatically. If I need to start rmid, what parameters to I need to pass to it?
Thanks,
Jason -
Binding custom objects in weblogic JNDI
I noticed that if I bind a custom object, the object is not available after the weblogic
restart. Is there anyway to bind an object permanently in the weblogic JNDI..In article <[email protected]>, [email protected] says...
Murali <[email protected]> wrote:
I noticed that if I bind a custom object, the object is not available after the weblogic
restart. Is there anyway to bind an object permanently in the weblogic JNDI..No.
Perhaps what your trying to accomplish could be handled via a startup
class that did the bind for you.
Bob -
Rmi server communicating with client
Is there any way for an rmi server to communicate back to the client? What I mean is, the client connects to the server and calls some method x(). One of the arguments of x() is the client(x(AClient ac)). Assume that AClient is a JFrame and has a method y() which adds a button to the frame or something. If the server calls ac.y(), in my understanding/experience, the server would actually create a local copy of AClient and add the button to the local copy, not to the frame that the client user is looking at.Is this correct? {
If so, is there any way to have ac.y() add the button to the client user's frame?
If not, does anyone have any ideas for how to implement something like this relatively easily?
If not, does anyone have any ideas why it's not responding that way for me?I'm trying to avoid programming socket connections for this, and would love to be able to do it with rmi.
Thanks in advance,
mNot sure exactly what your starting point is. But:
1. The client must be a UnicastRemoteObject.
2. If your client is behind a firewall, then the scheme probably won't work. (Explored exhaustively in this forum.) -
RMI - Serializing Object with the right constructor..?
Hello, I am trying to usr RMI to send an object that I serialized but I have further porblems than that. The Object that I am using is called FileLineReader and it Extends Buffered Reader. SInce Buffered Reader is not Serializable, I implemented Serializable within FileLineReader, so that I can send it through the RMI.
package musr.client.dbreader;
import java.io.*;
public class FileLineReader extends BufferedReader
implements LineReader, java.io.Serializable {
String pattern; // The string we are going to be matching.
* Constructor
* Passes the stream to our superclass
public FileLineReader(Reader in) { super(in); }
* This is the filter: call our superclass's readLine() to get the
* actual lines, but only return lines that contain the pattern.
* When the superclass readLine() returns null (EOF), we return null.
public String matchLine(String pattern) throws IOException {
String line;
do { line = super.readLine(); }
while ((line != null) && line.indexOf(pattern) == -1);
return line;
When I use this object to send it through RMI to the Server,
(FileLineReader)inFile = (FileLineReader) obj.senddbFile(openFileTextField1.getText(),openFileTextField2.getText());
I get an exception:
GUI_RMI exception, error unmarshalling return; nested exception is: java.io.InvalidClassException: musr.client.dbreader.FileLineReader; no valid constructor.
I am not sure what the problem is and I have been struggling with it for a while now. The constructor of BufferedReader takes one argument in so I have to pass FileLineReader an argument when I construct it. I think the RMI needs a constructor that takes no arguments and that causes problems. Is that true? In that case, I can't extend my class with BufferedReader.
Or maybe the problem is somthing quite different. Anyone has any suggestions or comments, I'd appreciate help. Thanks IvanYou will have to create your own stream. (RMI is just a way to call reemote methods; it knows nothing about files or I/O.)
1. You need a RemoteReader. This object should probably have 3 or so methods:
Open(filename) Opens the file
read reads a block from the file and returns it as a byte array.
close()
2. You need a RemoteInputStream object.
o Instantiated on the client.
o Makes calls to the RemoteReader.
o Has some read methods and a close method.
o Implements InputStream.
With these two objects, you have enough underpinnings top - for example - wrap the RemoteINputStream in a BufferedReader or whatever you need. -
"Server Header" with Weblogic SIP Server 2.2
Hi All,
I'm using Weblogic SIP Server 2.2, based on Weblogic Server 8.1 SP5, and I want to desactivate the "Send Server Header" option.
I try to do it by using the console like describe in http://e-docs.bea.com/wls/docs81/ConsoleHelp/domain_server_protocols_http.html page. The config.xml file is modified ( <i><WebServer Name="myserver" SendServerHeaderEnabled="false"/></i>), but all response messages still contain the server header.
This header adds information about the version of WebLogic Server that is running. Which is a security leak.
It seem's that this problem is solved since Weblogic Server 8.1 SP4. But I don't succeed in turning the option off.
Any idea about this issue?
Thanks,
Karine.Hi,
This problem is resolved by installing the new version of WebLogic SIP server (3.0 préviews).
Thanks,
Karine. -
Can I use RMI to find an object with contructor with params?
Does an RMI available object HAVE to be a parameter-less constructor?
All the examples I see are:
MyClass mc = (MyClass) Naming.lookup("/HelloServer");
Is there any way to pass arguments to its constructor?RMI client invokes a remote method on the server object through proxy stub of the server object obtained via Naming service. Stub implements all remote interfaces exported by the RMI server object which basically marshals all the parameters of the remote method, sends the method request to server object skeleton residing in a different address space via TCP connection and finally receives the result from the server object if any, unmarshals and returns result to the caller.
Server side RMI appilcation instantiates the RMI server class which implements all intended remote interfaces, exports it to the RMI runtime and finally registers itself with Naming service. RMI client only obtains a reference to the RMI server object through lookup method of the Naming service. Remember client does not instantiate a server object, client only knows about the remote interface implemented by the server object and does not have any idea about its implementation object details. On the server sice the Class which implements remote interfaces, can pass any number of arguments to its constructor.
In your example, MyClass is the stub to the remote server object which implements "MyClass" remote interface. The stub only provides boiler-plate code for remote methods which marshalls params, sends request to RMI server object, receives the result object, unmarshals it and finally returns it to the caller. The stub only contains the necessary information details like remote object ID, host and port to contact the RMI server object which implements the remote interface.
So client does not instantiate a server implementation objet, it only obtains a reference (stub) to the server object thru Naming service. Remote interface implementation object can declare a constructor which takes any number of arguments. RMI server side application only instantiates this implementation object and registers its stub with the Naming service.
-- Srinath Mandalapu -
QUESTION Re. Integrating TIBCO EMS with Weblogic 8.1 using MDB
Hi All,
I am trying to integrate TIBCO EMS 4.3.0 with Weblogic 8.1 SP6.
I have created a topic "SIMPLE.TOPIC" on the EMS. I have configured the Foreign JMS Server as follows:
Name: TIBCO JMSServer
JNDI Initial Context Factory:com.tibco.tibjms.naming.TibjmsInitialContextFactory
JNDI Connection URL:tibjmsnaming://emshost:emsport
I have configured the connection factory as follows:
Name: TIBCO JMSTopicConnectionFactory
Local JNDI Name: TopicConnectionFactory.Local
Remote JNDI Name:TopicConnectionFactory
User Name:username to connect to EMS server
Password::pssword to connect to EMS server
My JMS destination is configured as follows:
Name: Tibco JMS Destination
Local JNDI Name:SIMPLE.TOPIC.LOCAL
Remote JNDI Name:SIMPLE.TOPIC
My weblogic-ejb-jar.xml consists of the following code:
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>SimpleTopicListener</ejb-name>
<message-driven-descriptor>
<pool>
<max-beans-in-free-pool>200</max-beans-in-free-pool>
<initial-beans-in-free-pool>20</initial-beans-in-free-pool>
</pool>
<destination-jndi-name>SIMPLE.TOPIC</destination-jndi-name>
<connection-factory-jndi-name>TopicConnectionFactory</connection-factory-jndi-name>
</message-driven-descriptor>
<enable-call-by-reference>True</enable-call-by-reference>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
The problem is, when I try to deploy this mdb, I get the following error:
The Message-Driven EJB attempted to connect to the JMS destination with the JNDI name: SIMPLE.TOPIC. However, the object with the JNDI name: SIMPLE.TOPIC is not a JMS destination, or the destination found was of the wrong type (Topic or Queue).
I have checked and double checked to make sure that the topic SIMPLE.TOPIC does exist on the EMS server.
Does anyone know what is the issue here and how to resolve it?
Many thanks!
-Kinshuk
Edited by kinshukk at 05/14/2007 8:35 AM(1) Check the standard ejb jar and make sure you've specified a topic destination type (the default is queue). For details, you can reference the WebLogic 9.0 MDB developer guide (the MDB dev guide was revised in 9.0 to include more detail than the 8.1 guide). Also, you might want to take a look at our integration/interop FAQ (again for 9.0 or later).
(2) Change the weblogic-ejb-jar to reference the foreign local JNDI names - not the remote JNDI names.
(3) Be careful about using the "." and "/" characters in local JNDI names - these have side-effects in JNDI (they force creation of subcontexts).
Tom -
XDK 9i Issues : setXSLT - NullPointerException And RMI Server hangs
Present Scenario :
JDK 1.3
Oracle DB : 8.1.6
JDBC Driver : OracleThin.jar
XML Parser : xmlparserv2.jar : ( size = 1121488 )
XML-SQL utility : xsu12.jar : ( size = 180522 )
We use RMI with JDBC. RMI server object connects to database , uses xsu12.jar and xmlparserv2.jar to convert data into XML. Servlet connects to RMI server and gets this XML. Everything works fine.
Problem Scenario :
Since this parser does not support JAXP , I downloaded XDK 9i from oracle site.(9.2.0.1.0 - Dated 01/31/02 ) . After extracting , I replaced xmlparserv2.jar and xsu12.jar with this new ones. And problem started. There are 2 problems :
A. setXSLT( String, String ) throws NullPointerExcpetion
B. When I commented setXSLT method, RMI server completes execution of remote method which can be verified from Log. But it never returns , so client gets blocked. When RMI server is stopped by doing ctrl-C , client gets correct XML document.
Then I installed latest JDBC2.0 driver for 8.1.6 from site which is classes.zip. This also resulted in to same problems mentioned above. But it did work fine wirh earlier version of xmlparserv2.jar and xsu12.jar. Just FYI : I noticed significant size difference betwenn new and old jars.
New xmlparserv2.jar : size = 660421
New xsu12.jar : size = 473249
Thanks for patience
What could be possible solution ?Thanks Jinu
Problem A of setXSLT throwing NullPOinter Exception is solved. However problem B of RMI server not returning still there.
Just as an FYI , following is system
DB : oracle 8.1.6
xmlparserv2.jar : 9i xdk
xsu12_816.jar : 9i xdk
classes12.zip : JDBC2.0 for 8.1.6
When RMI server is stopped ( ctrl- C ) , client gets correct XML document alongwith proper Node names as set in setStyleSheet( String, String). -
Call weblogic EJB without using weblogic.jndi.T3InitialContextFactory
I am trying to call an ejb on a weblogic server without using weblogic.jndi.T3InitialContextFactory.
The context retrieval is as follows:
Properties table = new Properties();
table.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory");
table.put(Context.PROVIDER_URL, "iiop://localhost:7001");
Context context = new InitialContext(table);
return context;
but when I run the client I am getting the follwing error:
javax.naming.CommunicationException: Cannot connect to ORB [Root exception is org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No]
at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:362)
at com.sun.jndi.cosnaming.CNCtx.initUsingIiopUrl(CNCtx.java:289)
at com.sun.jndi.cosnaming.CNCtx.initUsingUrl(CNCtx.java:245)
at com.sun.jndi.cosnaming.CNCtx.initOrbAndRootContext(CNCtx.java:209)
at com.sun.jndi.cosnaming.CNCtx.<init>(CNCtx.java:69)
at com.sun.jndi.cosnaming.CNCtxFactory.getInitialContext(CNCtxFactory.java:32)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
at javax.naming.InitialContext.init(InitialContext.java:219)
at javax.naming.InitialContext.<init>(InitialContext.java:195)
at com.test.TestDirectDocumentLoad.getContext(TestDirectDocumentLoad.java:59)
at com.test.TestDirectDocumentLoad.loadDocs(TestDirectDocumentLoad.java:139)
at com.test.TestDirectDocumentLoad.main(TestDirectDocumentLoad.java:116)
Caused by: org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at com.sun.corba.se.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:173)
at com.sun.corba.se.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:65)
at com.sun.corba.se.internal.iiop.GIOPImpl.getConnection(GIOPImpl.java:67)
at com.sun.corba.se.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:652)
at com.sun.corba.se.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:594)
at com.sun.corba.se.internal.corba.InitialNamingClient.resolve(InitialNamingClient.java:1105)
at com.sun.corba.se.internal.corba.InitialNamingClient.resolveUsingBootstrapProtocol(InitialNamingClient.java:788)
at com.sun.corba.se.internal.corba.InitialNamingClient.cachedInitialReferences(InitialNamingClient.java:1186)
at com.sun.corba.se.internal.corba.InitialNamingClient.resolve_initial_references(InitialNamingClient.java:1079)
at com.sun.corba.se.internal.corba.ORB.resolve_initial_references(ORB.java:2436)
at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:340)
... 12 more
I have the J2EE jar on the client path and all....but can't get through this error
need help guys!
SamirSamir j <> writes:
Make sure IIOP is enabled on the server side. There was a bug in
earlier 8.1 config wizards that defaulted it to off.
andy
I am trying to call an ejb on a weblogic server without using weblogic.jndi.T3InitialContextFactory.
The context retrieval is as follows:
Properties table = new Properties();
table.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory");
table.put(Context.PROVIDER_URL, "iiop://localhost:7001");
Context context = new InitialContext(table);
return context;
but when I run the client I am getting the follwing error:
javax.naming.CommunicationException: Cannot connect to ORB [Root exception is org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No]
at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:362)
at com.sun.jndi.cosnaming.CNCtx.initUsingIiopUrl(CNCtx.java:289)
at com.sun.jndi.cosnaming.CNCtx.initUsingUrl(CNCtx.java:245)
at com.sun.jndi.cosnaming.CNCtx.initOrbAndRootContext(CNCtx.java:209)
at com.sun.jndi.cosnaming.CNCtx.<init>(CNCtx.java:69)
at com.sun.jndi.cosnaming.CNCtxFactory.getInitialContext(CNCtxFactory.java:32)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
at javax.naming.InitialContext.init(InitialContext.java:219)
at javax.naming.InitialContext.<init>(InitialContext.java:195)
at com.test.TestDirectDocumentLoad.getContext(TestDirectDocumentLoad.java:59)
at com.test.TestDirectDocumentLoad.loadDocs(TestDirectDocumentLoad.java:139)
at com.test.TestDirectDocumentLoad.main(TestDirectDocumentLoad.java:116)
Caused by: org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at com.sun.corba.se.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:173)
at com.sun.corba.se.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:65)
at com.sun.corba.se.internal.iiop.GIOPImpl.getConnection(GIOPImpl.java:67)
at com.sun.corba.se.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:652)
at com.sun.corba.se.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:594)
at com.sun.corba.se.internal.corba.InitialNamingClient.resolve(InitialNamingClient.java:1105)
at com.sun.corba.se.internal.corba.InitialNamingClient.resolveUsingBootstrapProtocol(InitialNamingClient.java:788)
at com.sun.corba.se.internal.corba.InitialNamingClient.cachedInitialReferences(InitialNamingClient.java:1186)
at com.sun.corba.se.internal.corba.InitialNamingClient.resolve_initial_references(InitialNamingClient.java:1079)
at com.sun.corba.se.internal.corba.ORB.resolve_initial_references(ORB.java:2436)
at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:340)
... 12 more
I have the J2EE jar on the client path and all....but can't get through this error
need help guys!
Samir
Maybe you are looking for
-
i would be thankful, if somebody could help me.
-
Yahoo Images Not Loading Properly In FireFox
I can get images/links to load properly in other browsers, but if I do an image search on yahoo with Firefox, I will click a thumbnail, and the page changes to the pic. But, if I try to click the link to go to the actual page the image is on, the lin
-
How to check for Optional Oracle 10gR2 components installed?
Hi How can I get a list of all optional oracle database components/features installed (some of them may require additional license)? I was going through list of directory objects in a database and I spotted "ORACLE_OCM_CONFIG_DIR" in one of the datab
-
PSE 5: saving of catalog impossible ?
I had a bad crash on my PC, but to copy all files including catalog worked fine. After this I just tried to make a backup of my actual catalog of PSE 5. Now it is not possible to change the location of the catalog folder with "saving under...". It is
-
Hi Is iBooks suppose to sync over the cloud for my iOS & Mac Devices or only when connected to iTunes ? if i buy books from the store i see them at all devices but if i buy just a epub file and drag it to iBooks in my Mac it doesbt show in iOS Device