-
30. Re: How to use exceptions
marklittle Dec 6, 2007 7:28 AM (in response to haagenhasle)I'll take another look.
-
31. Re: How to use exceptions
marklittle Dec 7, 2007 7:53 AM (in response to haagenhasle)There's a CP branch in svn that contains updates from 4.2.1 GA. Could you try checking that out and giving it a try?
-
32. Re: How to use exceptions
haagenhasle Dec 18, 2007 6:26 AM (in response to haagenhasle)I have checked out the CP branch, and installed in into JBoss AS 4.2.1GA. (It seems to work, so I guess it is the right version?) But I need to install JBoss Messaging as well, as all my ESB-projects use it. Which version should I pick of JBoss Messaging?
(The document product/install/Deployment.txt seems to be fairly outdated. It says that the ESB Server has been tested with JBoss AS version 4.0.4.GA, but http://labs.jboss.com/file-access/default/members/jbossesb/freezone/docs/4.2.1GA/manuals/pdf/GettingStarted.pdf mentions JBoss AS 4.2.1..)
Regards, Haagen -
33. Re: How to use exceptions
marklittle Dec 18, 2007 7:34 AM (in response to haagenhasle)JBM 1.4.0SP1
-
34. Re: How to use exceptions
beve Dec 18, 2007 8:12 AM (in response to haagenhasle)I think JBM 1.4.0.SP3 is the latest release now : http://www.jboss.org/index.html?module=bb&op=viewtopic&t=125881
We have just upgraded to this version.
Regards,
Daniel -
35. Re: How to use exceptions
marklittle Dec 18, 2007 8:42 AM (in response to haagenhasle)Yes, but we haven't qualified against it yet ;-)
-
36. Re: How to use exceptions
beve Dec 18, 2007 8:51 AM (in response to haagenhasle)Ah, right :)
Well we are upgrading our production environment tomorrow...I'll let you know if we run into anything fishy. -
37. Re: How to use exceptions
haagenhasle Dec 19, 2007 7:56 AM (in response to haagenhasle)Where can I see which versions of different libraries you are using? I tried to deploy the quickstart "native_client", but ended up with this error:
BUILD FAILED
C:\opensource\jbosslabs\esb-source\product\samples\quickstarts\conf\base-build.xml:459: **** DEPLOYMENT FAILED... Sorry, this Quickstart requires a modified JBoss Webservice container, please refer to the 'Configuring Webservice Integration' section
of the Administration Guide.
Regards, Haagen -
38. Re: How to use exceptions
haagenhasle Feb 12, 2008 8:44 AM (in response to haagenhasle)When I run the quickstarts I get the following error:
Caused by: javax.naming.CommunicationException [Root exception is java.lang.ClassNotFoundException: org.apache.juddi.registry.rmi.Inquiry (no security manager: RMI class loader disabled)] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:730) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:589) at javax.naming.InitialContext.lookup(InitialContext.java:351) at org.apache.ws.scout.transport.RMITransport.send(RMITransport.java:80) ... 29 more Caused by: java.lang.ClassNotFoundException: org.apache.juddi.registry.rmi.Inquiry (no security manager: RMI class loader disabled) at sun.rmi.server.LoaderHandler.loadProxyClass(LoaderHandler.java:531) at java.rmi.server.RMIClassLoader$2.loadProxyClass(RMIClassLoader.java:628) at java.rmi.server.RMIClassLoader.loadProxyClass(RMIClassLoader.java:294) at sun.rmi.server.MarshalInputStream.resolveProxyClass(MarshalInputStream.java:238) at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1500) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1463) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348) at java.rmi.MarshalledObject.get(MarshalledObject.java:135) at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:72) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:654)
This is with a fairly recent update of the ESB code from SVN. (It seems quite a lot of things have been changed since my last update..)
This makes it difficult for me to create a standalone example to illustrate my problem. But I'm sure about what I see - when I use ServiceInvoker.deliverSync to send a message into the ESB, the message is resent when the timeout occurs. I have not been able to turn of this behavior, the tips given me in this thread has not worked so far..
Regards, Haagen -
39. Re: How to use exceptions
beve Feb 12, 2008 9:37 AM (in response to haagenhasle)Hi Haagen,
could you tell me which quickstart you ran when you got that Exception?
Are you building and running from the main trunk?
Thanks,
Daniel -
40. Re: How to use exceptions
haagenhasle Feb 12, 2008 10:00 AM (in response to haagenhasle)"beve" wrote:
Hi Haagen,
could you tell me which quickstart you ran when you got that Exception?
Are you building and running from the main trunk?
Thanks,
Daniel
I think I might have to adjust my previous statement a little bit, the exception I pasted in was from code I had written myself, trying to send a message to the ESB. But I get similar messages when I ran the quickstarts. I've tried helloworld and exception_faults (they both use SI.deliverSync).
The common theme was a lack of a Security Manager, so I googled a bit and hacked the test-classes to contain code like this:System.setProperty("java.security.policy", "client.policy"); if (System.getSecurityManager() == null) System.setSecurityManager(new RMISecurityManager());
And then I added a client.policy-file that gave me all permissions.
I then got a new exception:[echo] Runs Test ESB Message Sender [java] 15:01:47,951 WARN [main][MarshalFactory] Found marshaller fully qualified class name within locator parameters, but was unable to load class: org.jboss.jms.wireformat.JMSWireFormat
I haven't figured that one out yet..
Regards, Haagen -
41. Re: How to use exceptions
haagenhasle Feb 12, 2008 11:22 AM (in response to haagenhasle)I forgot to say; I was building from http://anonsvn.jboss.org/repos/labs/labs/jbossesb/branches/JBESB_4_2_1_GA_CP
I updated some days ago.
NB. My concern here is not really being able to build the ESB from svn. My concern is not understanding why messages are being resent, and being able to control that behaviour.
Regards, Haagen -
42. Re: How to use exceptions
haagenhasle Feb 12, 2008 12:00 PM (in response to haagenhasle)I find the following code in ServiceInvoker.post():
Message replyMessage; EPR epr; // Iterate over all the EPRs in the list until delivered while ((epr = loadBalancer.chooseEPR(serviceClusterInfo)) != null) { try { replyMessage = eprInvoker.attemptDelivery(message, epr); if (replyMessage != null) { // We've delivered it, we're done! return replyMessage; } else { logger.info("Unresponsive EPR: " + epr+" for message: "+message.getHeader()); serviceClusterInfo.removeDeadEPR(epr); } } catch (MalformedEPRException ex) // so we can differentiate failure modes, since returning null is limiting { logger.info("Invalid EPR for service: ignoring for message: "+message.getHeader()); serviceClusterInfo.removeDeadEPR(epr); } } }
Now, as far as I understand, the comment "//We've delivered it, we're done" is not really correct. The message is not only delivered at this point, but is has been processed by the Service(s) (and actions) configured in jboss-esb.xml, and returned to the ServiceInvoker. Is this really the desired functionality?
I wonder if this kicks in for me in any way and causes the problems I get? I don't have a cluster, but perhaps this while-loop can iterate more than once anyway?
I have a WS in a back-end system that change some state on the server, and returns a confirmation. It is not idempotent, so when called a second time, it returns an errormessage. If my ESB-sequence times out after the action that calls this back-end WS, the ESB thinks it is a good idea to try again. This, of course, leads to an errormessage from the back-end WS, and the client that originally called the ESB sees only the result from this error.
Regards, Haagen -
43. Re: How to use exceptions
marklittle Feb 12, 2008 1:08 PM (in response to haagenhasle)If the reply comes back, then the output message has been delivered: otherwise how could a response come back?
-
44. Re: How to use exceptions
haagenhasle Feb 13, 2008 3:13 AM (in response to haagenhasle)Yes, of course it has been delivered, I'm not trying to say that it hasn't. My point is that is has been more than just delivered - it has also been picked up again. I'm refering to this code in the attemptDelivery-method:
if (courier.deliver(message)) { if (synchronous) { // JBESB-1016 replyToEPR has to be non-null or we'd have dropped out by this point! // do we need to do this for synchronous calls? Vagueries of Couriers? courier.setReplyToEpr(replyToEPR); return courier.pickup(timeout); } else { return message; } }
And in between the delivery and the pickup, all sorts of things might happen.. (And in my case, sometimes they do.. :) )
I may not be possible, but wouldn't it be better if the message was marked as delivered even if the reply was not picked up? As long as the the delivery-phase went ok (courier.deliver(message)), shouldn't that be enough to mark it as delivered?
Please don't interpret this as me trying to tell you guys how to design your product, I know you know this code and its design a whole lot better than I do. All I'm trying to do is figure out why my messages are redelivered, and how I can turn it off.
Do you have any comments to how I can solve the case I have with a non-idempotent back-end WebService?
Regards, Haagen