longofo / rmi-jndi-ldap-jrmp-jmx-jms

rmi、jndi、ldap、jrmp、jmx、jms一些demo测试
306 stars 49 forks source link

cannot be cast to #1

Closed hktalent closed 5 months ago

hktalent commented 4 years ago

https://github.com/longofo/rmi-jndi-ldap-jrmp-jmx-jms/blob/fb29782dfe5248c33d5b7505c3c6ac93bc7da122/weblogic-rmi-client/src/main/java/com/longofo/weblogicrmi/Client.java#L26

java.lang.ClassCastException: weblogic.corba.j2ee.naming.ContextImpl cannot be cast to weblogic.rmi.extensions.server.RemoteWrapper
hktalent commented 4 years ago

https://github.com/longofo/rmi-jndi-ldap-jrmp-jmx-jms/blob/fb29782dfe5248c33d5b7505c3c6ac93bc7da122/weblogic-rmi-client/src/main/java/com/longofo/weblogicrmi/Payload1.java#L34

EJBHome ejbHome = (EJBHome) initialContext.lookup("ejb/mgmt/MEJB");
    ejbHome.remove(jtaTransactionManager);

errors:

java.rmi.MarshalException: CORBA MARSHAL 0 No; nested exception is: 
    org.omg.CORBA.MARSHAL:   vmcid: 0x0  minor code: 0  completed: No
    at com.sun.corba.se.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:227)
    at javax.rmi.CORBA.Util.mapSystemException(Util.java:95)
    at org.omg.stub.javax.management.j2ee._ManagementHome_Stub.remove(Unknown Source)
    at ysoserial.payloads.ldap.WeblogicIIOPPayload.main1(Unknown Source)
    at ysoserial.payloads.ldap.WeblogicIIOPPayload.main(Unknown Source)
Caused by: org.omg.CORBA.MARSHAL:   vmcid: 0x0  minor code: 0  completed: No
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at java.lang.Class.newInstance(Class.java:442)
    at com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase.getSystemException(MessageBase.java:916)
    at com.sun.corba.se.impl.protocol.giopmsgheaders.ReplyMessage_1_2.getSystemException(ReplyMessage_1_2.java:116)
    at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.getSystemExceptionReply(CorbaMessageMediatorImpl.java:590)
    at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.processResponse(CorbaClientRequestDispatcherImpl.java:489)
    at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete(CorbaClientRequestDispatcherImpl.java:373)
    at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.invoke(CorbaClientDelegateImpl.java:148)
    at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:475)
    ... 3 more