Java Corba Problem
Hi,
I have a strange Java Client Server application with a corba interface between the two.
There are three Session Classes that describe this interface.
The base session is SessionA. Extending that (i.e. :: in IDL) is SessionB and extending that is SessionC.
The client is broken up into two parts which run in the same JVM. The first part has a dependency to SessionC and the second part has a dependency SessionB. It has to be this way.
Upon start up the client creates a SessionC everything okay. The client then launches part of the application which only has a dependency to SessionB. To launch this part of the client application a SessionB object must be past. To do this I use the SessionBHelper class and the narrow method.
Everything works fine no exceptions are thrown.
Now here is the part that is killing me - when I invoke a method then from the Client to SessionB it throws a Marshalling exception
org.omg.CORBA.MARSHAL: minor code: 0 completed: No. I check the spec. and there is minor code 0 has a default meaning - i.e. nothing. I have n't a clue what is wrong.
My only thoughts are that narrow can only be used in down casting. But I could be wrong here.
I would really appreciate any help or thoughts. Thanks in Advance.
When ever I come across the most lovely Marshalling exceptions... its usually because my skel/stub classes out of synch with each other (on the client/server)
When I update the everyone... I usually have everything working and playing nicely.
This occurs with some frequency using Websphere EJB (using IIOP)... if your client JAR's are not in synch with your server JAR's... then the objects can't be marshalled... its a pain
./dave
Similar Messages
-
*****Please Help Simple Java Corba Problem*****
This is probably a really simple one but I am very cheased off about it.
I run my applications on a Win XP pro OS, and when I go to type in nameserv it gives me the following error I hava downloaded and installed JDK 1.4.1. I also have the JRE, And jbuilder personal edition ver 8.....And J2RE 1.4.1
C:\Documents and Settings\Ash>nameserv
Exception in thread "main" java.lang.NoClassDefFoundError: java/util/HashSet
at com.inprise.vbroker.orb.ORB.<init>(ORB.java:81)
at org.omg.CORBA.ORB.create_impl(ORB.java)
at org.omg.CORBA.ORB.init(ORB.java)
at com.inprise.vbroker.naming.ExtFactory.main(ExtFactory.java:126)
my classpath looks like this
.;C:\VisualCafePDETrial\BIN\COMPONENTS\SYMBEANS.JAR;C:\VisualCafePDETrial\JAVA\LIB\CLASSES.ZIP;C:\VisualCafePDETrial\JAVA\LIB;C:\BES\bin;C:\j2sdk1.4.1\lib\tools.jar;.;
and my path is
C:\VisualCafePDETrial\BIN;C:\VisualCafePDETrial\JAVA\BIN;C:\BES\binC:\j2sdk1.4.1\lib\tools.jar;.;
what on earth am I doing wrong ??
Also when I goto compile any java program it comes up with the following
C:\DOCprac\Prac5\bank_naming>vbmake
Building the bank_agent example ...
Exception in thread "main" java.lang.ClassCastException
at com.visigenic.vbroker.tools.idl2java.main(idl2java.java:30)
Symantec Java! JustInTime Compiler Version 3.00.021(i) for JDK 1.1.x (TRIAL VER)
Copyright (C) 1996-98 Symantec Corporation
compiling: Client.java
Client.java:2: Package org.omg.CORBA not found in import.
import org.omg.CORBA.*;
^
Client.java:3: Package org.omg.CosNaming not found in import.
import org.omg.CosNaming.*;
^
2 errors
Symantec Java! JustInTime Compiler Version 3.00.021(i) for JDK 1.1.x (TRIAL VER)
Please help I am really desperate to sort this one out. Can you give me some detailed info on how I would do this.>>>Thanx in advanceYou have 2 sets of errors, at least.
The first is : Exception in thread "main" java.lang.NoClassDefFoundError: java/util/HashSet which is that you have not imported the class for hashset.
The second is that the import of the jars is probably wrong, hard to say without seeing code. -
Not able to connect to Lotus Domino server using java/corba
Hi
I am new to Lotus Domino server and Java.
I have INstalled Lotus Domino server5 on 1 machine and was successful in installing the Lotus client on another machine.
Throught the lotus client i am able to connect to the server and send and receive the mails.
Now I want to connect to the domino server using the Lotus Domino Tolkit for Java/Corba.
In this Toolkit they have given the sample code program ..
if I run the code I am getting the error
java.io.FileNotFoundException: http://<IPADDRESS>/diiop_ior.txtjava.io.FileNotFoundException: http://<IPADDRESS>/diiop_ior.txt
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
nection.java:691)
at java.net.URL.openStream(URL.java:942)
at lotus.domino.NotesFactory.getIOR(NotesFactory.java:314)
at lotus.domino.NotesFactory.createSession(NotesFactory.java:66)
at IntroCorbaApp.run(IntroCorbaApp.java:65)
at java.lang.Thread.run(Thread.java:539)
lotus.domino.NotesException: Could not get IOR from HTTP Server
lotus.domino.NotesException
at lotus.domino.NotesFactory.getIOR(NotesFactory.java:344)
at lotus.domino.NotesFactory.createSession(NotesFactory.java:66)
at IntroCorbaApp.run(IntroCorbaApp.java:65)
at java.lang.Thread.run(Thread.java:539)
I also tried to find this file in the Domino server directory.
The file exists in drive:\LotusServer\Domino\Data\Domino\HTML directory..
I am not getting what exactly is the Problem
Plz any one help me in this regard..
thanks in advanceYou should be able to access the diiop_ior.txt file from browser without authentication,only then it will work. This file should not
be protected. -
Hi there,
I've got some code (EJB) which connect
me to OLAPService on my 9i Oracle server. I deployed it to Oracle AS which
is istalled on another machine. Then I wrote client application which has to
connect to OAS and invoke EJB method to connect to OLAPService.
The connection to EJB was successfully established (of course through a
CORBA). But when EJB was trying to connect to Oracle9i I got such error :
javax.naming.NameNotFoundException:
sess_iiop://<server_ip>:<port>:<sid>/etc/OLAPServer/OLAPServer not found
I think it something wrong with my OAS enviroment. I have tried to do my best , but still nothing .... ( I am sure that everything else is OK, because I tried to make connection through
JDBC to relational database and it worked fine).
When I'm starting EJB's code as client application everything is OK. The
connection to OLAPService is established every time. When I modyfied code
for EJB (commenting code responsible for preparing InitailContextEnviroment
and connecting to OLAPService) everything was OK. So :
1) I can connect and invoke EJB's method deployed to OAS,
2) I can connect to Oracle9i OLAPService and use OLAPAPI methods,
3) I can't do it when I try to connect to OLAPService through the OAS (where
is EJB)
client_application (java) ===CORBA===> OAS ( EJB with OLAPAPI) ==CORBA==>
OLAPService
This is the EJB's method code ( when it is calling as client application it
works!!!!):
import javax.ejb.SessionBean;
import javax.ejb.SessionContext;
import org.omg.CORBA.Object;
import oracle.aurora.jndi.sess_iiop.ServiceCtx;
import oracle.express.connection.Connection;
import oracle.express.connection.ConnectionManager;
import javax.naming.Context;
import javax.naming.InitialContext;
import java.util.*;
public String Polaczenie()
String serviceURL="sess_iiop://<server_ip>:<port>:<sid>";
String objectName="/etc/OLAPServer/OLAPServer";
Hashtable env=new Hashtable();
env.put(Context.URL_PKG_PREFIXES,"oracle.aurora.jndi");
env.put(Context.SECURITY_PRINCIPAL,<user>);
env.put(Context.SECURITY_CREDENTIALS,<password>);
env.put(Context.SECURITY_AUTHENTICATION,ServiceCtx.NON_SSL_LOGIN);
try
Context ic=new InitialContext(env);
org.omg.CORBA.Object
ServiceStub=(org.omg.CORBA.Object)(ic.lookup(serviceURL+objectName));
Properties connParams = new Properties();
connParams.put("UserID",<user>);
connParams.put("Password",<password>);
ConnectionManager cm=ConnectionManager.init();
Connection conn=
cm.connect((org.omg.CORBA.Object)ServiceStub,connParams);
conn.close();
catch(Exception e)
return "\nError:" + e + "\n";
return "\nIt works\n";
This is client's code:
public static void main(String[] args)
try {
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.evermind.server.rmi.RMIInitialContextFactory");
env.put(Context.PROVIDER_URL, "ormi://sasza/SerwerEjb");
env.put(Context.SECURITY_PRINCIPAL, "admin");
env.put(Context.SECURITY_CREDENTIALS, "oracle");
Context context = new
com.evermind.server.rmi.RMIInitialContextFactory().getInitialContext(env);
Object homeObject = context.lookup("<myEJBName>");
SerwerEjbHome home = (SerwerEjbHome)
PortableRemoteObject.narrow(homeObject, pakiet.SerwerEjbHome.class);
SerwerEjb remote = home.create();
System.out.println(remote.Polaczenie()); <------------------ there is
error !!!!!!!!!!!!!!!!!! ------------------>
catch(Exception e)
System.err.println("Error: " + e + ":::" + e.getMessage());
Any idea ??
Thank you in advance."Taesun, An" <[email protected]> writes:
Thanks for your concern !Its my code - I should be concerned :)
I have successfuly tested the sample program that you attached.
and I have some more questions.Great!
Q1) Can I use idl files generated by weblogic.ejbc on the other ORB like as
orbix, etc..?Yes. But the problem is that Orbix is known to have problems with the
codeset that we send out. For silversword we are doing a GIOP 1.2
implementation a by-product of which will be that we have to do some
form of codeset negotiation, so hopefully these issues will be sorted
in the near future.
And I know that the Client.cpp program you sent differs from original source
code in the respects which is including TradeResultFactory and
TradeResultImpl classes.
Q2) If so, Do i have to implement the above classes for all of call by value
parameters or return type ?You have to write some C++ code for any valuetypes that you use. This
basically means any non-primitive object that is not a remote
interface and implements serializable.
I wanna know for the needed classes how to easily get generated or the other
solutions.I attach the entity bean example I cooked up which shows you how you
can use C++ macros to take away some of this pain. Note that you cannot make the finder method work with 6.0SP2. This will be fixed in 6.1
[generic_idl_entity.zip]
I got error message following as, when i used "-idlFactories" of
weblogic.ejbc option to generate Factory definition.
Usage: java weblogic.rmic [options] <classes>...
option descriptions ,.,........
option descriptions ,.,........
ERROR: Error from ejbc: Unrecognized option or flag, -idlFactories
ERROR: ejbc found errors
make: *** [ejbc] Error 1Hmm, you are right. It looks like the option didn't get inverted in
rmic. The attached class file should fix this.
[IDLGeneratorOptions.class]
andy -
Java Session problem while sending mail(using javamail) using Pl/SQL
Hello ...
i am using Java stored procedure to send mail. but i'm getting java session problem. means only once i can execute that procedure
pls any help.props.put("smtp.gmail.com",host);I doubt javamail recognizes the 'smtp.gmail.com' property. I think it expects 'mail.host'. Of course since it cannot find a specified howt it assumes by default localhost
Please format your code when you post the next time, there is a nice 'code' button above the post area.
Mike -
Hi all,
I was looking for this java programming problem which had to do with a large building and there was some gallons of water involved in it too somehow and we had to figure out the height of the buiding using java. This problem is also in one of the java books and I really need to find out all details about this problem and the solution. NEED HELP!!
Thanks
macYes, it will. The water will drain from the bottom of
the tank until the pressure from the water inside the
tank equals the pressure from the pipe. In other
words, without a pump, the water will drain out until
there is the same amount of water in the tank as in
the pipe The water pressure depends on the depth of the water, not the volume. So once the depth of the water inside the pipe reaches the same depth as the water inside the tank it will stop flowing. This will never be above the height of the tank.
I found this applet which demonstrates our problem. If you run it you can drag the guy up to the top, when water in his hose reaches the level of the water in the tank it will stop flowing out. -
Java Uninstall Problem
This all came about because of a failed uninstall, using Your Uninstaller.
The {Java runtime which is all I want) is not listed now & I tried all the other fix bad uninstall type features, all to no avail.} )
When I DL & run the latest package (jxpiinstall-6u11-fcs-bin-b90-windows-i586-25_nov_2008.exe}
& run it I get:
1st message:
"This software has already been installed on your computer.
Would you like to install it?"
If I say no, it exits.
If I say yes, I get this second message:
:This action is only valid for products that are currently installed."
So Now I have no Java & have no idea what to do.
Any help would be greatly appreciated.
Thanks, Neuromancer23Sorry...after posting it i realized there was a more appropriate forum, of which it took quiet awhile to find.)
Now that I know where to find the forum list I will never double-post again.
I'll close the question if I can -
Please any one tel me about Sun Java security problems
with Desktop applicationHi.
If you're using SSGD 4.41, please download the Admin guide from here:
http://docs.sun.com/app/docs/doc/820-4907
There, at page #41 you'll find useful info concerning "Client Connections and Security Warnings".
Hope this helps,
Rob -
OS X Lion - JAVA SCRIPT PROBLEM
I recently updated from Snow Leopard to OS X Lion. Now I seem to have a JAVA Script problem. Where do I start fixing this issue. I have checked updates etc etc but it seems to be updated. However, when I login to my web site backend, I have a problem. Any advice please?
Would you please write some more details? explain the problem and what web site backend you use. Thanks.
-
Java corba ID CS5 7.0 Problem with table format import excel 2007 document
hello,
I want to import an excel 2007 document with a table into a textframe. This is the code to set import preferences:
ExcelImportPreference pref = aplicacion.getExcelImportPreferences();
pref.setTableFormatting(kTableFormattingOptionsExcelFormattedTable.value);
but when I insert the file into de texframe and export in a pdf file i lose the table format, always apply this format: kTableFormattingOptionsExcelUnformattedTabbedText.value.
This problem only happens with excel 2007. Excel 2003 files the import is ok.Apart from iTunes (which I rarely update since we never use it) they both had a Java update, which I'm installing now but I can't imagine that's connected (plus they both didn't have it). Both Macs are 10.6.8.
I also repaired the permissions and cleaned caches on Friday. Today I created a new user/profile and tried the same thing on that. No luck. -
CORBA problem after migration to JDK 1.5.0_05
Hi,
I faced some errors with CORBA, after performing migration from JDK 1.4.1 to JDK 1.5.0_02
on Solaris 8 2/02 (SPARC version).
I've spend few days on digging in java.sun.com bug database and google archive,
but haven't found similar case.
The problem occurs in a web application launched on Tomcat 5.5.7, if JDK 1.5.0_02 is used and trying to connect with CORBA server.
If using JDK 1.4.1 the CORBA stuff works fine.
I isolated the problem code and found out, that Tomcat
can not cause the error, because i receive the same error while invoking test class from command line.
I use IOR file for obtaining the object reference and default JDK Orb.
The stacktrace(see below) goes through new package in JDK 1.5 com.sun.corba.se.impl.* and java.lang.Class which was
rewriten in JDK 1.5 in order to use generics. Is it possible that the bug lies somewhere in this classes?
I've already spent few days on searching cause of the bug, and found no clues.
Is this a known issue? Does anyone have a workaround?
Have you seen some similiar behavior associated with migration to JDK 1.5.0 ?
I'm running out of ideas, on debugging this stuff, any help or suggestion could be helpful.
Thanks In Advance, Kuba
PS. I attach the received stack trace below:
org.omg.CORBA.BAD_OPERATION: vmcid: 0x0 minor code: 0 completed: Maybe
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at java.lang.Class.newInstance0(Class.java:350)
at java.lang.Class.newInstance(Class.java:303)
at com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase.getSystemException(MessageBase.java:897)
at com.sun.corba.se.impl.protocol.giopmsgheaders.ReplyMessage_1_2.getSystemException(ReplyMessage_1_2.java:99)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.getSystemExceptionReply(CorbaMessageMediatorImpl.java:572)
at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.processResponse(CorbaClientRequestDispatcherImpl.java:430)
at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete(CorbaClientRequestDispatcherImpl.java:326)
at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.invoke(CorbaClientDelegateImpl.java:129)
at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:457)
at generated.from.idl.package._ServerFactoryStub.FindServer(_ServerFactoryStub.java:25)Hi,
I replying to my own post for persons who, have a similar problem.
I've used external ORB implementation, and the stuff started working properly.
www.jacorb.org. -
Hi Jhe,
Hope you are fine.
I tried to create a mail session using the j2eetutorial14 examples.I did all the necessary settings like giving the mailhost name,defining JNDI name etc as per specification.But its throwing the following error please help me to solve this problem.
Feb 15, 2007 12:28:16 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: development3.s4indsoft.com; p
ort: 3700"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2257)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2278)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:208)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:221)
at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java
:104)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:
152)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:146)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:286)
at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:89)
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:128)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:288)
at com.sun.enterprise.naming.NamingManagerImpl.lookup(NamingManagerImpl.java:725)
at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:132)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:286)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at ConfirmerClient.main(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:237)
at com.sun.enterprise.appclient.Main.<init>(Main.java:430)
at com.sun.enterprise.appclient.Main.main(Main.java:99)
Caused by: java.lang.RuntimeException: java.nio.channels.UnresolvedAddressException
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:336)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:191)
... 22 more
Caused by: java.nio.channels.UnresolvedAddressException
at sun.nio.ch.Net.checkAddress(Net.java:30)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:451)
at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:320)
... 23 more
Thanks & Regards,
R.Ramesh.This says it all.
Feb 15, 2007 12:28:16 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: development3.s4indsoft.com; p
ort: 3700"
MeTitus -
Idlj java compile problem from badly named interfaces in idl
I am trying to build a java client to communicate with an application using corba interfaces.
The large/complex idl I am using to build all the client stubs has interface names that seem to cause problems for the generated java. For example there is an interface in the idl called 'Device' as well as an interface called 'DeviceOperations'. This causes problems because idlj creates java interfaces with the word 'Operations' appended to it.
So I get a bunch of weird results in my generated java which has many compiler errors.
Unfortunately I cannot change the idl because it is not an application I work on directly.
Any suggestions?
Thanks!My guess is that you are between a rock and a hard place unless you can 1) change the IDL or 2) change how the IDL is compiled. You have said you can't do the former, so maybe you can influence the latter (unfortunately for you, I suspect not). On the change you can, keep reading.
IDL only creates interfaces such as DeviceOperations if you compile the IDL using the Tie model. But you would definitely have a problems since 1) the IDL has an interface called Device and DeviceOperations and as a result will create java files Device.java and DeviceOperations.java and 2) the Tie model will want to create two interfaces, DeviceOperations.java and DeviceOperationsOperations.java. I suspect that the second interface compiled by the IDL compiler will be the winner the first one will be overwritten).
If you can, change the IDL compilation to that you do not use the Tie model. However, you said you have no ability to change the IDL, so you also may not have the ability to change how it is compiled, so I am not sure if this is practical advice. I can't imagine that this application ever successfully used both interfaces. -
Hi,
I'm using Java 1.5 to try out some Corba stuff with the idlj compiler, and am getting errors while testing. Can anyone show me what the problem is? The error is when i run the client code and the error is denoted where i put the comment //CRASH HERE. The stack trace is below as well:
My IDL:
module corbatest
interface Device_CI
readonly attribute long deviceID;
interface NorthBoundInterface
corbatest::Device_CI GetDevice(in long deviceID);
//SERVER CODE
import corbatest.*;
public class DeviceImpl extends Device_CIPOA{
public DeviceImpl() { }
public int deviceID() {
return 44;
import corbatest.*;
import org.omg.CORBA.*;
public class NorthBoundInterfaceImpl extends NorthBoundInterfacePOA {
private ORB orb;
public void setORB(ORB val) {
val = orb;
public Device_CI GetDevice (int deviceID) {
DeviceImpl dev = new DeviceImpl();
Device_CIPOATie tie = new Device_CIPOATie(dev);
return tie._this(orb);
import corbatest.*;
import org.omg.CosNaming.*;
import org.omg.CosNaming.NamingContextPackage.*;
import org.omg.CORBA.*;
import org.omg.PortableServer.*;
import org.omg.PortableServer.POA;
import java.util.Properties;
public class Server{
public static void main(String args[]){
try{
// create and initialize the ORB
Properties properties = new Properties();
properties.put("org.omg.CORBA.ORBInitialPort", "1050");
properties.put("org.omg.CORBA.ORBInitialHost", "localhost");
ORB orb = ORB.init((String[])null, properties);
// Get reference to rootpoa & activate the POAManager
POA rootpoa = POAHelper.narrow(orb.resolve_initial_references("RootPOA"));
rootpoa.the_POAManager().activate();
// create servant and register it with the ORB
NorthBoundInterfaceImpl nbiImpl = new NorthBoundInterfaceImpl();
nbiImpl.setORB(orb);
// create a tie, with servant being the delegate.
NorthBoundInterfacePOATie tie = new NorthBoundInterfacePOATie(nbiImpl, rootpoa);
// obtain the objectRef for the tie
NorthBoundInterface nbi = tie._this(orb);
// get the root naming context
org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");
// Naming Service specification.
NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);
// bind the Object Reference in Naming
String name = "NorthBoundInterface";
NameComponent path[] = ncRef.to_name( name );
ncRef.rebind(path, nbi);
System.out.println("NorthBoundInterface ready and waiting ...");
// wait for invocations from clients
orb.run();
catch (Exception e){
System.err.println("ERROR: " + e);
e.printStackTrace(System.out);
//CLIENT CODE
import corbatest.*;
import org.omg.CosNaming.*;
import org.omg.CosNaming.NamingContextPackage.*;
import org.omg.CORBA.*;
import org.omg.PortableServer.*;
import org.omg.PortableServer.POA;
import java.util.Properties;
public class Client{
public static void main(String args[]){
try{
// create and initialize the ORB
Properties properties = new Properties();
properties.put("org.omg.CORBA.ORBInitialPort", "1050");
properties.put("org.omg.CORBA.ORBInitialHost", "localhost");
ORB orb = ORB.init((String[])null, properties);
// get the root naming context
org.omg.CORBA.Object objRef =
orb.resolve_initial_references("NameService");
NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);
// resolve the Object Reference in Naming
String name = "NorthBoundInterface";
NorthBoundInterface nbi = NorthBoundInterfaceHelper.narrow(ncRef.resolve_str(name));
System.out.println("Obtained a handle on server object: " + nbi);
//CRASH HERE
Device_CI device = nbi.GetDevice(44);
int x = device.deviceID();
catch (Exception e) {
System.out.println("ERROR : " + e) ;
e.printStackTrace(System.out);
RROR : org.omg.CORBA.UNKNOWN: ----------BEGIN server-side stack trace----------
org.omg.CORBA.UNKNOWN: vmcid: SUN minor code: 202 completed: Maybe
at com.sun.corba.se.impl.logging.ORBUtilSystemException.runtimeexception(Unknown Source)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.convertThrowableToSystemException(Unknown Source)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleThrowableDuringServerDispatch(Unknown Source)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleThrowableDuringServerDispatch(Unknown Source)
at com.sun.corba.se.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(Unknown Source)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(Unknown Source)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(Unknown Source)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleInput(Unknown Source)
at com.sun.corba.se.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(Unknown Source)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(Unknown Source)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.dispatch(Unknown Source)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.doWork(Unknown Source)
at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at org.omg.PortableServer.Servant._this_object(Unknown Source)
at corbatest.Device_CIPOA._this(Device_CIPOA.java:68)
at NorthBoundInterfaceImpl.GetDevice(NorthBoundInterfaceImpl.java:15)
at corbatest.NorthBoundInterfacePOATie.GetDevice(NorthBoundInterfacePOATie.java:39)
at corbatest.NorthBoundInterfacePOA._invoke(NorthBoundInterfacePOA.java:38)
at com.sun.corba.se.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(Unknown Source)
... 9 more
----------END server-side stack trace---------- vmcid: SUN minor code: 202 completed: MaybeYou have 2 sets of errors, at least.
The first is : Exception in thread "main" java.lang.NoClassDefFoundError: java/util/HashSet which is that you have not imported the class for hashset.
The second is that the import of the jars is probably wrong, hard to say without seeing code. -
Hi Jhe,
Hope You are Fine.
I tried to create a mail session using the j2eetutorial14 examples.I did all the necessary settings like giving the mailhost name,defining JNDI name etc as per specification.But its throwing the following error please help me to solve this problem.
Feb 15, 2007 12:28:16 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: development3.s4indsoft.com; p
ort: 3700"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2257)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2278)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:208)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:221)
at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java
:104)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:
152)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:146)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:286)
at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:89)
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:128)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:288)
at com.sun.enterprise.naming.NamingManagerImpl.lookup(NamingManagerImpl.java:725)
at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:132)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:286)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at ConfirmerClient.main(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:237)
at com.sun.enterprise.appclient.Main.<init>(Main.java:430)
at com.sun.enterprise.appclient.Main.main(Main.java:99)
Caused by: java.lang.RuntimeException: java.nio.channels.UnresolvedAddressException
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:336)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:191)
... 22 more
Caused by: java.nio.channels.UnresolvedAddressException
at sun.nio.ch.Net.checkAddress(Net.java:30)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:451)
at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:320)
... 23 morehello, seems like a [url http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6404454]bug
Maybe you are looking for
-
Can't connect to Internet through working WiFi connections
My system is constantly getting bad IP addresses from wireless base stations. Problem started while I'm traveling. At last location, of my three computers my PC would connect, but the two Macs kept having problems. Both worked at first, but then one
-
Cannot uninstall Adobe Acrobat 8 on Window 7 64-bit
I've been running the CS3 suite on windows 7 64-bit for years with no problems. Suddenly, most CS3 applications won't open, and if they do, they lock up. So, I figure no problem, I'll uninstall and then re-install. Wronk! (1) I could not deactivate t
-
How do you display BOTH the time and DATE in the menu bar?
-
How to reinstall Airport?
So lately my Macbook Pro has been having problems connecting to the internet. It kept saying the Airport was off (even though I never turned it off). I would go into my Network preferences and click the "Turn airport on" button, but nothing would hap
-
Controlling XY stage connected to parallel port using labview
Hi, I have a XY stage which I can control using mach3 software. I want to control a signal generator, VNA and the XY stage at the same time. I have programmed SG and VNA using Labview but I am having difficulties controlling XY stage using Labview. I