dcsimg
Problem with Unknown Exceptions in OrbixWeb dealing with Java objects/associations
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Dave_Clayton
Posted On:   Wednesday, April 11, 2001 05:27 AM

I have a Java server and a Java client that use OrbixWeb to communicate. One of the methods is a "getAllStructs" method that returns an array of structs containing info about all member objects of that type. These structs have some standard static data, and some associations - the associations are where I'm pretty sure the problem is. These associations are arrays of references to other existing objects in the system. The getAllStructs method invokes a getAllInfo method on each object that exists, which converts the server-side version of the object into a struct - including a part that makes arrays from Vectors, since some of the Associations are lists. (Using the Object[] Vector.toArray(Object[]) method). The pr   More>>

I have a Java server and a Java client that use OrbixWeb to communicate.

One of the methods is a "getAllStructs" method that returns an array of structs containing info about all member objects of that type. These structs have some standard static data, and some associations - the associations are where I'm pretty sure the problem is. These associations are arrays of references to other existing objects in the system. The getAllStructs method invokes a getAllInfo method on each object that exists, which converts the server-side version of the object into a struct - including a part that makes arrays from Vectors, since some of the Associations are lists. (Using the Object[] Vector.toArray(Object[]) method).

The problem I'm having is I'm getting

org.omg.CORBA.UNKNOWN: remote exception - Unknown error

The server encountered a Java exception while dispatching the request - (unknown)


-- not the most useful Exception I've seen :)

I have 8 different types of objects, and confusingly, the getAllStructs method works on 3 of them, but not the other 5.

Colleagues have told me it's most likely a null pointer problem, but I've been chasing this for days now to no avail. Does anyone have any experience with this or have any ideas at all? I'd really appreciate it...

   <<Less

Re: Problem with Unknown Exceptions in OrbixWeb dealing with Java objects/associations

Posted By:   Dermot_Hennessy  
Posted On:   Wednesday, May 16, 2001 06:40 AM

Your colleagues may be right - the CORBA.UNKNOWN remote exception has normally been a null pointer exception in my experience. My advice would be to put some trace in your server side implementation of
getAllStructs()
and catch a null pointer exception in this method. If this is impossible, you can launch the server in debug mode, and attach the jdb to it, enter
catch java.lang.Error
catch java.lang.Exception



This should enable you to catch the exception on the server side, and if you print the stack upon catching it you will have homed in on the problem.


Hope this helps,

Dermot
About | Sitemap | Contact