java - ClassCastException getting remote stub from JBoss 7 with JNLP -
I have written an adapter to get the remote interface of my Bean from Zebus 7.
throws public DeDaptator (Reference Reference, Boolean Remote) DADEETExchange {try {if (context == null} {context = new InitialContext (); } String race = "ear_name / jar_name / dadfarben! Xxx.yyy.DAdapterRemote"; dAdapter = (IDAdapter) context.lookup (res); } Hold (Exception pre) {ex.printStackTrace (); Throw new DADEptor Exxon ("Could not make DMSAdapter service.", Prior); }} Dedaptatom is a remote interface, extending to IDEdair. Its EJB3 If I run this method with Sandbox (Eclipse) then it works like a magic but when I do it in the context of my JNLP application, I get class class exposure.
context.lookup (res) gives me sun.proxy. The $ proxy is the methods declared in both cases and its id adapter.
I also tried reflections, but it seems that the version of the logic class is different from the ones used in the interface - at least it can not be found in the proper manner (method name, Argos) Method I can swear that they are the same.
What should I check first?
OK, it was resolved I had two differnt classloaders, and both of them were POJOs Were similar classes, so it brought me to X.class.equals (X.class) - & gt; False and crush my cast in the interface, because there were various signatures of the methods.
Comments
Post a Comment