-
1. Re: Unable to use seam remoting after upgrading to 2.1.0.ga
thomas.googli.medeltiden.org Oct 26, 2008 9:38 PM (in response to thomas.googli.medeltiden.org)I have tested on jboss 4.2.3 as well..
-
2. Re: Unable to use seam remoting after upgrading to 2.1.0.ga
thejosh Oct 27, 2008 4:17 AM (in response to thomas.googli.medeltiden.org)make sure you are deploying jboss-seam-remoting.jar. it got split into a separate jar in 2.1 i believe.
Josh
-
3. Re: Unable to use seam remoting after upgrading to 2.1.0.ga
thomas.googli.medeltiden.org Oct 27, 2008 8:06 AM (in response to thomas.googli.medeltiden.org)Yes it is in war/web-inf/lib.
I have decompiled my UserRemoteService.class to verify that it does contain the annotation and it does.
This is where everything fails (inside jboss-seam-remoting)
http://fisheye.jboss.com/browse/Seam/trunk/src/remoting/org/jboss/seam/remoting/InterfaceGenerator.java?r=8670#l338 -
4. Re: Unable to use seam remoting after upgrading to 2.1.0.ga
shane.bryzak Oct 27, 2008 8:12 AM (in response to thomas.googli.medeltiden.org)So is there an exception?
-
5. Re: Unable to use seam remoting after upgrading to 2.1.0.ga
thomas.googli.medeltiden.org Oct 27, 2008 8:37 AM (in response to thomas.googli.medeltiden.org)No it fails because m.getAnnotation(WebRemote.class) never returns anything but null.
My own little annotation extraction exercise in the original post is done inside a seam component and it behaves the same way (not finding this particular annotation)
I don't know how class loading relates to ejb3 deployment and seam, is it possible that the annotation is somehow removed at runtime because the @webremote annotation is inside jboss-seam-remoting.jar that is inside a war and maybe not visible to the ejb3 deployer during deployment when my ejb-jar is inside a ear. I'm just guessing here, I'm having a hard time figuring this out,
-
6. Re: Unable to use seam remoting after upgrading to 2.1.0.ga
thomas.googli.medeltiden.org Oct 27, 2008 8:38 AM (in response to thomas.googli.medeltiden.org)On the other hand it should not have anything to do specifically with the ejb deployer since it happens with pojos as well.
-
7. Re: Unable to use seam remoting after upgrading to 2.1.0.ga
thomas.googli.medeltiden.org Oct 27, 2008 9:01 AM (in response to thomas.googli.medeltiden.org)I started working when i moved the WebRemote annotation from jboss-seam-remoting.jar (in war) to jboss-seam.jar (in ear)
-
8. Re: Unable to use seam remoting after upgrading to 2.1.0.ga
thomas.googli.medeltiden.org Oct 27, 2008 10:31 AM (in response to thomas.googli.medeltiden.org)The seam documentation says that jboss-seam-remoting.jar should be in the war and not ear..
It might need to be split up further (jboss-seam-remoting-api.jar) or just moved to the ear by default recommendation (if nothing else prohibits this).Also, I do excpect an exception (like NoClassDefFoundError) to be thrown in cases like this but thats maybe not the case with annotations (?) or is this because of some bytecode instrumentation stuff just removing the reference (?)
-
9. Re: Unable to use seam remoting after upgrading to 2.1.0.ga
shane.bryzak Oct 27, 2008 11:13 AM (in response to thomas.googli.medeltiden.org)It should be in the ear, which chapter of the documentation says that it goes in the war? In all of the remoting examples, jboss-seam-remoting.jar is in the ear also.
Which exception would you expect to be thrown? If an annotation can't be found, then the interface generator can only assume that the method isn't remotable.
-
10. Re: Unable to use seam remoting after upgrading to 2.1.0.ga
thomas.googli.medeltiden.org Oct 27, 2008 12:28 PM (in response to thomas.googli.medeltiden.org)
>It should be in the ear, which chapter of the documentation says that it goes in the war?
40.2.1. Core
jboss-seam-remoting.jar runtime war
Thats one of the only 2 places in the docs that the jar is mentioned at all.
>Which exception would you expect to be thrown? If an annotation can't be found, then the interface generator can only assume that the method isn't remotable.
Yes, I meant that I did not know that jvm treats annotations differently than other linkable things (classes, interfaces, native code) which do give such errors on class loading. -
11. Re: Unable to use seam remoting after upgrading to 2.1.0.ga
kmsmgill Oct 27, 2008 7:36 PM (in response to thomas.googli.medeltiden.org)Actually had the same problem migrating my project 2.1 today...
Solved it by removing all the jboss-seam-*.jar files from the war and putting them in the ear. A quite redeploy and remoting is working as expected... As for the affects on the rest of the app, that remains to be seen with a little testing....
--kevin -
12. Re: Unable to use seam remoting after upgrading to 2.1.0.ga
danjonesorlando Sep 1, 2010 11:06 AM (in response to thomas.googli.medeltiden.org)Ok, I know this is 2 years after the fact but here is the solution.
The check for the method containing the annotation fails because the WebRemote.class that is being checked is from the ear and the actual WebRemote annotation is from the war's jar.
By default, the seam-gen creates the deploy-ear-jars.list or whatever and the deploy wars list files. It creates the war jar list with a jboss-seam.jar. That will put the jboss-seam-remoting.jar into the war file. If you put it in the ear's lib it will be in two places and hence cause the problem.
You need to add the jboss-seam-remoting.jar to the ear's list file, and then be specific in the war jar list about which jboss-seam jars you want in there, like
jboss-seam-ui.jar
jboss-seam-debug.jar
jboss-seam-pdf.jarblah blah blah until you have them all in there. Just delete that deployed ear directory and run ant again. That way you make sure that jboss-seam-remoting is only in the ear/lib/ directory
-
13. Re: Unable to use seam remoting after upgrading to 2.1.0.ga
danjonesorlando Sep 1, 2010 7:22 PM (in response to thomas.googli.medeltiden.org)Ok, I know this is 2 years after the fact but here is the solution.
The check for the method containing the annotation fails because the WebRemote.class that is being checked is from the ear and the actual WebRemote annotation is from the war's jar.
By default, the seam-gen creates the deploy-ear-jars.list or whatever and the deploy wars list files. It creates the war jar list with a jboss-seam*.jar. That will put the jboss-seam-remoting.jar into the war file. If you put it in the ear's lib it will be in two places and hence cause the problem. You need to add the jboss-seam-remoting.jar to the ear's list file, and then be specific in the war jar list about which jboss-seam jars you want in there, like
jboss-seam-ui.jar
jboss-seam-debug.jar
jboss-seam-pdf.jar
blah blah blah until you have them all in there. Just delete that deployed ear directory and run ant again. That way you make sure that jboss-seam-remoting is only in the ear/lib/ directory
Sorry, I reported this because the formatting stripped off an asterisk!