我正在测试连接到weblogic 12c的简单java客户端程序以显示一些基本的JMX MBean,但是我不断收到以下错误。我正在使用weblogic生成的完整客户端库运行程序,名为" wlfullclient.jar"。 weblogic服务器位于运行java 1.8的远程VM服务器上,客户端是运行java 1.8的PC。我做了一些关于IIOP的类似问题的研究,这些问题已在以前版本的JAVA中得到修复,我认为这个修复程序会被转移到java 1.8但我不是100%肯定是同样的问题。我希望有人可以解决这个问题。感谢
May 10, 2016 4:49:06 PM com.sun.corba.se.impl.encoding.CDRInputStream_1_0 read_value
WARNING: "IOP00810211: (MARSHAL) Exception from readValue on ValueHandler in CDRInputStream"
org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 211 completed: Maybe
at com.sun.corba.se.impl.logging.ORBUtilSystemException.valuehandlerReadException(ORBUtilSystemException.java:7004)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1010)
at com.sun.corba.se.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:271)
at com.sun.corba.se.impl.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:2033)
at com.sun.corba.se.impl.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:2254)
at com.sun.corba.se.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1249)
at com.sun.corba.se.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:416)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:341)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:307)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:999)
at com.sun.corba.se.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:271)
at com.sun.corba.se.impl.io.ValueHandlerImpl.read_Array(ValueHandlerImpl.java:760)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:339)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:307)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:999)
at com.sun.corba.se.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:271)
at com.sun.corba.se.impl.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:2033)
at com.sun.corba.se.impl.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:2254)
at com.sun.corba.se.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1249)
at com.sun.corba.se.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:416)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:341)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:307)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:999)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:844)
at com.sun.corba.se.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:267)
at com.sun.corba.se.impl.corba.TCUtility.unmarshalIn(TCUtility.java:285)
at com.sun.corba.se.impl.corba.AnyImpl.read_value(AnyImpl.java:590)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_any(CDRInputStream_1_0.java:704)
at com.sun.corba.se.impl.encoding.CDRInputStream.read_any(CDRInputStream.java:238)
at com.sun.corba.se.impl.javax.rmi.CORBA.Util.readAny(Util.java:431)
at javax.rmi.CORBA.Util.readAny(Util.java:105)
at com.sun.corba.se.impl.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:1961)
at com.sun.corba.se.impl.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:2254)
at com.sun.corba.se.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1249)
at com.sun.corba.se.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:416)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:341)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:307)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:999)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:844)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_1_0.java:838)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_1_0.java:828)
at com.sun.corba.se.impl.encoding.CDRInputStream.read_abstract_interface(CDRInputStream.java:287)
at com.sun.corba.se.impl.io.IIOPInputStream.readObjectDelegate(IIOPInputStream.java:379)
at com.sun.corba.se.impl.io.IIOPInputStream.readObjectOverride(IIOPInputStream.java:542)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:365)
at java.util.ArrayList.readObject(ArrayList.java:791)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.sun.corba.se.impl.io.IIOPInputStream.invokeObjectReader(IIOPInputStream.java:1722)
at com.sun.corba.se.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1240)
at com.sun.corba.se.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:416)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:341)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:307)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:999)
at com.sun.corba.se.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:271)
at org.omg.stub.javax.management.remote.rmi._RMIConnection_Stub.getAttributes(Unknown Source)
at weblogic.management.remote.common.RMIConnectionWrapper$13.run(ClientProviderBase.java:1137)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:368)
at weblogic.security.subject.SubjectManager.runAs(SubjectManager.java:286)
at weblogic.security.Security.runAs(Security.java:67)
at weblogic.management.remote.common.RMIConnectionWrapper.getAttributes(ClientProviderBase.java:1135)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at weblogic.management.remote.common.InvocationContextProxyHandler.invoke(ClientProviderBase.java:636)
at com.sun.proxy.$Proxy0.getAttributes(Unknown Source)
at javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.getAttributes(RMIConnector.java:931)
at MyConnection.main(MyConnection.java:91)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Caused by: java.io.InvalidClassException: weblogic.health.Symptom$Severity; UnsupportedOperationException accessing no-arg constructor
at com.sun.corba.se.impl.io.IIOPInputStream.inputObjectUsingFVD(IIOPInputStream.java:1471)
at com.sun.corba.se.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:414)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:341)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:307)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:999)
... 74 more
Caused by: java.lang.UnsupportedOperationException
at com.sun.corba.se.impl.io.ObjectStreamClass.newInstance(ObjectStreamClass.java:915)
at com.sun.corba.se.impl.io.IIOPInputStream.inputObjectUsingFVD(IIOPInputStream.java:1457)
... 78 more
Exception in thread "main" java.rmi.MarshalException: CORBA MARSHAL 1398079699 Maybe; nested exception is:
org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 211 completed: Maybe
at com.sun.corba.se.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:227)
at javax.rmi.CORBA.Util.mapSystemException(Util.java:80)
at org.omg.stub.javax.management.remote.rmi._RMIConnection_Stub.getAttributes(Unknown Source)
at weblogic.management.remote.common.RMIConnectionWrapper$13.run(ClientProviderBase.java:1137)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:368)
at weblogic.security.subject.SubjectManager.runAs(SubjectManager.java:286)
at weblogic.security.Security.runAs(Security.java:67)
at weblogic.management.remote.common.RMIConnectionWrapper.getAttributes(ClientProviderBase.java:1135)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at weblogic.management.remote.common.InvocationContextProxyHandler.invoke(ClientProviderBase.java:636)
at com.sun.proxy.$Proxy0.getAttributes(Unknown Source)
at javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.getAttributes(RMIConnector.java:931)
at MyConnection.main(MyConnection.java:91)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Caused by: org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 211 completed: Maybe
at com.sun.corba.se.impl.logging.ORBUtilSystemException.valuehandlerReadException(ORBUtilSystemException.java:7004)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1010)
at com.sun.corba.se.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:271)
at com.sun.corba.se.impl.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:2033)
at com.sun.corba.se.impl.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:2254)
at com.sun.corba.se.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1249)
at com.sun.corba.se.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:416)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:341)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:307)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:999)
at com.sun.corba.se.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:271)
at com.sun.corba.se.impl.io.ValueHandlerImpl.read_Array(ValueHandlerImpl.java:760)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:339)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:307)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:999)
at com.sun.corba.se.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:271)
at com.sun.corba.se.impl.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:2033)
at com.sun.corba.se.impl.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:2254)
at com.sun.corba.se.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1249)
at com.sun.corba.se.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:416)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:341)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:307)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:999)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:844)
at com.sun.corba.se.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:267)
at com.sun.corba.se.impl.corba.TCUtility.unmarshalIn(TCUtility.java:285)
at com.sun.corba.se.impl.corba.AnyImpl.read_value(AnyImpl.java:590)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_any(CDRInputStream_1_0.java:704)
at com.sun.corba.se.impl.encoding.CDRInputStream.read_any(CDRInputStream.java:238)
at com.sun.corba.se.impl.javax.rmi.CORBA.Util.readAny(Util.java:431)
at javax.rmi.CORBA.Util.readAny(Util.java:105)
at com.sun.corba.se.impl.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:1961)
at com.sun.corba.se.impl.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:2254)
at com.sun.corba.se.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1249)
at com.sun.corba.se.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:416)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:341)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:307)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:999)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:844)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_1_0.java:838)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_1_0.java:828)
at com.sun.corba.se.impl.encoding.CDRInputStream.read_abstract_interface(CDRInputStream.java:287)
at com.sun.corba.se.impl.io.IIOPInputStream.readObjectDelegate(IIOPInputStream.java:379)
at com.sun.corba.se.impl.io.IIOPInputStream.readObjectOverride(IIOPInputStream.java:542)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:365)
at java.util.ArrayList.readObject(ArrayList.java:791)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.sun.corba.se.impl.io.IIOPInputStream.invokeObjectReader(IIOPInputStream.java:1722)
at com.sun.corba.se.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1240)
at com.sun.corba.se.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:416)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:341)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:307)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:999)
at com.sun.corba.se.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:271)
... 19 more
Caused by: java.io.InvalidClassException: weblogic.health.Symptom$Severity; UnsupportedOperationException accessing no-arg constructor
at com.sun.corba.se.impl.io.IIOPInputStream.inputObjectUsingFVD(IIOPInputStream.java:1471)
at com.sun.corba.se.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:414)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:341)
at com.sun.corba.se.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:307)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:999)
... 74 more
Caused by: java.lang.UnsupportedOperationException
at com.sun.corba.se.impl.io.ObjectStreamClass.newInstance(ObjectStreamClass.java:915)
at com.sun.corba.se.impl.io.IIOPInputStream.inputObjectUsingFVD(IIOPInputStream.java:1457)
示例程序如下
import javax.management.Attribute;
import javax.management.AttributeList;
import javax.management.MBeanServerConnection;
import javax.management.ObjectName;
import javax.management.remote.JMXConnector;
import javax.management.remote.JMXConnectorFactory;
import javax.management.remote.JMXServiceURL;
import javax.naming.Context;
import java.io.IOException;
import java.net.MalformedURLException;
import java.util.Hashtable;
public class MyConnection {
private static MBeanServerConnection connection;
private static JMXConnector connector;
private static final ObjectName service = null;
/*
* Initialize connection to the Domain Runtime MBean Server.
*/
public static void initConnection(String hostname, String portString,
String username, String password) throws IOException,
MalformedURLException {
String protocol = "IIOP";
Integer portInteger = Integer.valueOf(portString);
int port = portInteger.intValue();
String jndiroot = "/jndi/";
String mserver = "weblogic.management.mbeanservers.domainruntime";
JMXServiceURL serviceURL = new JMXServiceURL(protocol, hostname, port,jndiroot + mserver);
Hashtable h = new Hashtable();
h.put(Context.SECURITY_PRINCIPAL, username);
h.put(Context.SECURITY_CREDENTIALS, password);
h.put(JMXConnectorFactory.PROTOCOL_PROVIDER_PACKAGES,"weblogic.management.remote");
h.put("jmx.remote.x.request.waiting.timeout", new Long(10000));
connector = JMXConnectorFactory.connect(serviceURL, h);
connection = connector.getMBeanServerConnection();
}
public static void main(String[] args) throws Exception {
String hostname = "10.30.8.63";
String portString = "7001";
String username = "weblogic";
String password = "not4long!";
MyConnection c= new MyConnection();
initConnection(hostname, portString, username, password);
MBeanServerConnection connection = connector.getMBeanServerConnection();
String[] domains = connection.getDomains();
for(String d:domains){
System.out.println(d);
}
String bean = "com.bea:Name=JMSReader_jms-servlet!jms-servlet_java_app.weblogic.examples.jms.servletQueue!WseeJMSServer@jms.servletQueue,ServerRuntime=AdminServer,Location=AdminServer,Type=MessageDrivenEJBRuntime,ApplicationRuntime=jms-servlet,WebAppComponentRuntime=AdminServer_/jms-servlet";
String[] attributes = new String[]{
"ConnectionStatus",
"Destination",
"EJBName",
"HealthState",
"JMSConnectionAlive",
"JmsClientID",
"LastException",
"LastExceptionAsString",
"MDBStatus",
"Name",
"Parent",
"PoolRuntime",
"ProcessedMessageCount",
"Resources",
"SuspendCount",
"TimerRuntime",
"TransactionRuntime",
"Type"};
AttributeList aList = connection.getAttributes(new ObjectName(bean),attributes);
for(int i=0;i<aList.size();i++) {
Object obj = (((Attribute) aList.get(i)).getValue());
String key = ((Attribute) aList.get(i)).getName();
System.out.println(key + " " + obj );
}
connector.close();
}
}
答案 0 :(得分:0)
此问题似乎是java 1.8问题。我安装了相同的weblogic版本但是使用java 1.7并将客户端应用程序降级到java 1.7并且问题消失了。