[MOBY-dev] java.lang.NoSuchMethodError launched when MobyException raised

Martin Senger martin.senger at gmail.com
Mon May 28 11:18:56 UTC 2007


Hi Ivan,

Is it possible that the return value of the method
> ServiceException.toXML() has changed from String to Node (or any other
> XML representation)


It is not only possible but it is a fact :-).  You may recall a private
message about it (to you and to Paul), from the last week. Simply speaking,
the method signature is back where it was before Paul changed it sometimes
ago.

and this has not been taking into account in some
> other parts of jMoby?


I did my best to check this. Did I forgot anything? However, just now I have
tried again, and I could not reproduce the behaviour you are reporting. I
have raised a MobyException in the sample TestServiceNotes service (which is
part of the jMoby), in the processIt() method, and I have got a reasonable
output, without any Java exception:

<?xml version="1.0" encoding="UTF-8"?>
<moby:MOBY xmlns:moby="http://www.biomoby.org/moby">
  <moby:mobyContent>
    <moby:serviceNotes>
      <moby:mobyException moby:severity="information"
moby:refQueryID="sip_1_">
        <moby:exceptionCode>700</moby:exceptionCode>
        <moby:exceptionMessage>Input date was
2007-05-20T10:54:59Z</moby:exceptionMessage>
      </moby:mobyException>
      <moby:mobyException moby:severity="error">
        <moby:exceptionCode>600</moby:exceptionCode>
        <moby:exceptionMessage>AN ERROR OCCURED DURING THE SERVICE
EXECUTION: Yes, this is bad...</moby:exceptionMessage>
      </moby:mobyException>
...

Obviously I've recreated and deployed the jmoby.jar. Should I regenerate
> skeletons? I imagine (and hope) not.
>

No, that would not be necessary. But you need to restart your server I guess
(or whatever is needed in JBoss to make it reload all classes.

I am not sure how to continue now, how to help you (because definitely the
cause of your troubles is in the change of jMoby, but at the moment I
believe that the change itself was fixed correctly...). Any idea?

Oh, now I think what may be the problem. You said that you "recreated
jmoby.jar". But perhaps you have not clean the old classes first. Which
would cause the problem. Please do:

./build-devsh clean compile

...and then create jmoby.jar and redeploy. It should fix it.

Martin

-- 
Martin Senger
   email: martin.senger at gmail.com
   skype: martinsenger



More information about the MOBY-dev mailing list