-
Bug
-
Resolution: Won't Fix
-
P4
-
None
-
6u10
-
x86
-
linux_redhat_5.0
FULL PRODUCT VERSION :
java version "1.6.0_18"
Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
Java HotSpot(TM) 64-Bit Server VM (build 16.0-b13, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
uname -a
Linux pc-ab-linux64 2.6.18-194.el5 #1 SMP Tue Mar 16 21:52:39 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
corbaloc urls are being transmitted to the server using the platform character set instead of iso-8859-1 as per the corba specification.
If the platform character set is utf8 urls of the form
"iiop:1.0@host:port/%ffipc/partition%00initial"
result in %ff being transmitted as \c3 \bf insteat of \ff
Offending code is in
com.sun.corba.se.impl.resolver.INSURLOperationImpl.getIORUsingCorbaloc.java.212
theKeyString.getBytes() should be theKeyString.getBytes("ISO8859_1")
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Construct a client/server
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Object Ok
ACTUAL -
Exception thrown
ERROR MESSAGES/STACK TRACES THAT OCCUR :
org.omg.CORBA.OBJECT_NOT_EXIST: vmcid: OMG minor code: 1 completed: No
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:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase.getSystemException(MessageBase.java:897)
at com.sun.corba.se.impl.protocol.giopmsgheaders.ReplyMessage_1_0.getSystemException(ReplyMessage_1_0.java:94)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.getSystemExceptionReply(CorbaMessageMediatorImpl.java:572)
at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.processResponse(CorbaClientRequestDispatcherImpl.java:445)
at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete(CorbaClientRequestDispatcherImpl.java:339)
at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.invoke(CorbaClientDelegateImpl.java:129)
at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.non_existent(CorbaClientDelegateImpl.java:232)
at org.omg.CORBA.portable.ObjectImpl._non_existent(ObjectImpl.java:137)
at testing.PnsLinuxTest.main(PnsLinuxTest.java:15)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
package testing;
import org.omg.CORBA.ORB;
public class PnsLinuxTest {
public static void main(String[] args) {
String url = new String("corbaloc:iiop:1.0@hostname:port/%ffipc/partition%00initial");
ORB orb;
try {
orb = org.omg.CORBA.ORB.init(args,null);
org.omg.CORBA.Object obj = orb.string_to_object(url);
if(obj._non_existent()) {
System.out.println("Couldn't locate object");
} else {
System.out.println("Object ok");
}
// Narrow etc
} catch ( Exception e ) {
e.printStackTrace();
}
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Change the default platform encoding
e.g. java -Dfile.encoding=ISO8859_1
java version "1.6.0_18"
Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
Java HotSpot(TM) 64-Bit Server VM (build 16.0-b13, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
uname -a
Linux pc-ab-linux64 2.6.18-194.el5 #1 SMP Tue Mar 16 21:52:39 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
corbaloc urls are being transmitted to the server using the platform character set instead of iso-8859-1 as per the corba specification.
If the platform character set is utf8 urls of the form
"iiop:1.0@host:port/%ffipc/partition%00initial"
result in %ff being transmitted as \c3 \bf insteat of \ff
Offending code is in
com.sun.corba.se.impl.resolver.INSURLOperationImpl.getIORUsingCorbaloc.java.212
theKeyString.getBytes() should be theKeyString.getBytes("ISO8859_1")
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Construct a client/server
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Object Ok
ACTUAL -
Exception thrown
ERROR MESSAGES/STACK TRACES THAT OCCUR :
org.omg.CORBA.OBJECT_NOT_EXIST: vmcid: OMG minor code: 1 completed: No
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:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase.getSystemException(MessageBase.java:897)
at com.sun.corba.se.impl.protocol.giopmsgheaders.ReplyMessage_1_0.getSystemException(ReplyMessage_1_0.java:94)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.getSystemExceptionReply(CorbaMessageMediatorImpl.java:572)
at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.processResponse(CorbaClientRequestDispatcherImpl.java:445)
at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete(CorbaClientRequestDispatcherImpl.java:339)
at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.invoke(CorbaClientDelegateImpl.java:129)
at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.non_existent(CorbaClientDelegateImpl.java:232)
at org.omg.CORBA.portable.ObjectImpl._non_existent(ObjectImpl.java:137)
at testing.PnsLinuxTest.main(PnsLinuxTest.java:15)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
package testing;
import org.omg.CORBA.ORB;
public class PnsLinuxTest {
public static void main(String[] args) {
String url = new String("corbaloc:iiop:1.0@hostname:port/%ffipc/partition%00initial");
ORB orb;
try {
orb = org.omg.CORBA.ORB.init(args,null);
org.omg.CORBA.Object obj = orb.string_to_object(url);
if(obj._non_existent()) {
System.out.println("Couldn't locate object");
} else {
System.out.println("Object ok");
}
// Narrow etc
} catch ( Exception e ) {
e.printStackTrace();
}
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Change the default platform encoding
e.g. java -Dfile.encoding=ISO8859_1