5 Replies Latest reply on Feb 14, 2011 3:19 PM by Pavol Noha

    java.lang.NoSuchMethodError - weird problem

    Pavol Noha Newbie

      Hello guys,

       

      i have some serious issue with my integration interface work. The deal is :

       

      I have to create some methods which go throught XML file's and just save elements  values into some variables, no big deal. So i've created .xsd files according to types of XML (create,findbyextuser,...) generate jax-b bundles and also create some adapters.

       

      So now i have 2 jax-b bundles : one for create and one for findbyextuser which contains method's used to parse xml. So in adapter i use something like :

       

      env.getBody().getCreate().getStructureCode().getStructudeNumber() for create

      ((go throught create.xml and return value of Structure Code))

      env.getBody().getExternalKey().getStructureCode().getStructudeNumber() for find by external

      ((go throught findbyext.xml and return value of Structure Code))

       

      First one for create works fine. I don't have a problem to go throught xml but when i try

      to getExternalKey() from the second one (use for findbyexternal.xml) it crash and i don't know why (till env.getBody() works but after adding .getExternalKey() crash). Method getExternalKey() is in jax-b element in correct way .. dependencies are OK and also NetBeans propose to me this method so it's weird .. and it's similar process to create one and in this one it works fine ..

       

      The concrete error is :

       

      //////////////////////////////////////////////////////////////////////////////////////////////

       

      11:02:02,501 | ERROR | tenerContainer-1 | DefaultErrorHandler              | rg.apache.camel.processor.Logger  248 | 68 - org.apache.camel.camel-core - 2.4.0.fuse-02-00 | Failed delivery for exchangeId: ID:ww020878-2363-1297099894534-3:644:1:1:1. Exhausted after delivery attempt: 1 caught: org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[JmsMessage: ActiveMQTextMessage {commandId = 5, responseRequired = true, messageId = ID:ww020878-2363-1297099894534-3:644:1:1:1, originalDestination = null, originalTransactionId = null, producerId = ID:ww020878-2363-1297099894534-3:644:1:1, destination = topic://ProjectInfo, transactionId = null, expiration = 0, timestamp = 1297332122408, arrival = 0, brokerInTime = 1297332122408, brokerOutTime = 1297332122439, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = org.apache.activemq.util.ByteSequence@f50c09, dataStructure = null, redeliveryCounter = 0, size = 0, properties = {CamelFileNameOnly=testNew.xml, CamelFileLastModified=Thu Feb 10 10:58:34 CET 2011, CamelFileRelativePath=c:\temp\pickup\testNew.xml, CamelFileAbsolutePath=c:\temp\pickup\testNew.xml, JMS_OracleDelay=0, JMS_OracleDeliveryMode=2, CamelFileName=testNew.xml, CamelFileLength=622, CamelFilePath=c:\temp\pickup\testNew.xml, CamelFileParent=c:\temp\pickup, JMS_OracleTimestamp=1297332121189, CamelJmsDeliveryMode=2, CamelFileAbsolute=true}, readOnlyProperties = true, readOnlyBody = true, droppable = false, text = <soapenv:Envelope xmlns:soapenv="http://schem...nvelope>

       

      }]

      org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[JmsMessage: ActiveMQTextMessage {commandId = 5, responseRequired = true, messageId = ID:ww020878-2363-1297099894534-3:644:1:1:1, originalDestination = null, originalTransactionId = null, producerId = ID:ww020878-2363-1297099894534-3:644:1:1, destination = topic://ProjectInfo, transactionId = null, expiration = 0, timestamp = 1297332122408, arrival = 0, brokerInTime = 1297332122408, brokerOutTime = 1297332122439, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = org.apache.activemq.util.ByteSequence@f50c09, dataStructure = null, redeliveryCounter = 0, size = 0, properties = {CamelFileNameOnly=testNew.xml, CamelFileLastModified=Thu Feb 10 10:58:34 CET 2011, CamelFileRelativePath=c:\temp\pickup\testNew.xml, CamelFileAbsolutePath=c:\temp\pickup\testNew.xml, JMS_OracleDelay=0, JMS_OracleDeliveryMode=2, CamelFileName=testNew.xml, CamelFileLength=622, CamelFilePath=c:\temp\pickup\testNew.xml, CamelFileParent=c:\temp\pickup, JMS_OracleTimestamp=1297332121189, CamelJmsDeliveryMode=2, CamelFileAbsolute=true}, readOnlyProperties = true, readOnlyBody = true, droppable = false, text = <soapenv:Envelope xmlns:soapenv="http://schem...nvelope>

       

      Caused by: java.lang.NoSuchMethodError: org.xmlsoap.schemas.soap.envelope.Body.getFindByExternalKey()Lcom/planview/schemas/tieto/noha/_2011/_02/_09/FindByExternalKey;

       

      ////////////////////////////////////////////////////////////////////////////////////////////////

       

      Whole servicemix.log as attachement

       

      Thanks for any response.

       

      Paul