juddi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "subes (Updated) (JIRA)" <juddi-...@ws.apache.org>
Subject [jira] [Updated] (JUDDI-537) NPE when deleting servicebinding
Date Thu, 05 Jan 2012 00:04:40 GMT

     [ https://issues.apache.org/jira/browse/JUDDI-537?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

subes updated JUDDI-537:
------------------------

    Description: 
This is a new issue extracted from: https://issues.apache.org/jira/browse/JUDDI-536?focusedCommentId=13178920&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13178920

---------------------------------------------------------------------------------------------
Though now I have a new problem with juddi 3.1.2. It is impossible for me to delete servicebindings
with scout. It throws the following exception:

{code}
java.lang.IllegalArgumentException: obj parameter must not be null
at javax.xml.bind.helpers.AbstractMarshallerImpl.checkNotNull(AbstractMarshallerImpl.java:437)
at javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:129)
at org.apache.juddi.jaxb.JAXBMarshaller.marshallToElement(JAXBMarshaller.java:124)
at org.apache.juddi.v3.client.transport.wrapper.RequestHandler.invoke(RequestHandler.java:153)
at org.apache.juddi.v3.client.transport.wrapper.UDDIPublicationService.publish(UDDIPublicationService.java:110)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.apache.ws.scout.transport.LocalTransport.send(LocalTransport.java:63)
at org.apache.ws.scout.registry.RegistryV3Impl.execute(RegistryV3Impl.java:301)
at org.apache.ws.scout.registry.RegistryV3Impl.deleteBinding(RegistryV3Impl.java:561)
at org.apache.ws.scout.registry.BusinessLifeCycleManagerV3Impl.executeOperation(BusinessLifeCycleManagerV3Impl.java:661)
at org.apache.ws.scout.registry.BusinessLifeCycleManagerV3Impl.deleteOperation(BusinessLifeCycleManagerV3Impl.java:827)
at org.apache.ws.scout.registry.BusinessLifeCycleManagerV3Impl.deleteServiceBindings(BusinessLifeCycleManagerV3Impl.java:159)
at de.invesdwin.gemeinsam.integration.ws.registry.JaxrHelper.removeServiceBinding(JaxrHelper.java:125)
at de.invesdwin.gemeinsam.integration.ws.registry.internal.RegistryService.unregisterServiceInstance(RegistryService.java:74)
at de.invesdwin.gemeinsam.integration.ws.XsdWebServicePublikation.shutdown(XsdWebServicePublikation.java:88)
at de.invesdwin.gemeinsam.integration.ws.XsdWebServicePublikationTest.testPublikation(XsdWebServicePublikationTest.java:29)
at de.invesdwin.gemeinsam.integration.ws.registry.RegistryServerTest.testStartServer(RegistryServerTest.java:62)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:82)
at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:240)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
java.lang.IllegalArgumentException: obj parameter must not be null
at javax.xml.bind.helpers.AbstractMarshallerImpl.checkNotNull(AbstractMarshallerImpl.java:437)
at javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:129)
at org.apache.juddi.jaxb.JAXBMarshaller.marshallToElement(JAXBMarshaller.java:124)
at org.apache.juddi.v3.client.transport.wrapper.RequestHandler.invoke(RequestHandler.java:153)
at org.apache.juddi.v3.client.transport.wrapper.UDDIPublicationService.publish(UDDIPublicationService.java:110)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.apache.ws.scout.transport.LocalTransport.send(LocalTransport.java:63)
at org.apache.ws.scout.registry.RegistryV3Impl.execute(RegistryV3Impl.java:301)
at org.apache.ws.scout.registry.RegistryV3Impl.deleteBinding(RegistryV3Impl.java:561)
at org.apache.ws.scout.registry.BusinessLifeCycleManagerV3Impl.executeOperation(BusinessLifeCycleManagerV3Impl.java:661)
at org.apache.ws.scout.registry.BusinessLifeCycleManagerV3Impl.deleteOperation(BusinessLifeCycleManagerV3Impl.java:827)
at org.apache.ws.scout.registry.BusinessLifeCycleManagerV3Impl.deleteServiceBindings(BusinessLifeCycleManagerV3Impl.java:159)
at de.invesdwin.gemeinsam.integration.ws.registry.JaxrHelper.removeServiceBinding(JaxrHelper.java:125)
at de.invesdwin.gemeinsam.integration.ws.registry.internal.RegistryService.unregisterServiceInstance(RegistryService.java:74)
at de.invesdwin.gemeinsam.integration.ws.XsdWebServicePublikation.shutdown(XsdWebServicePublikation.java:88)
at de.invesdwin.gemeinsam.integration.ws.XsdWebServicePublikationTest.testPublikation(XsdWebServicePublikationTest.java:29)
at de.invesdwin.gemeinsam.integration.ws.registry.RegistryServerTest.testStartServer(RegistryServerTest.java:62)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:82)
at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:240)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
{code}

This is caused by the following code:

{code}public Node invoke(Element uddiReq)
  {
    try
    {
      // Lookup the appropriate XML handler. Throw an
      // UnsupportedException if one could not be located.
      //String reqString = getText(uddiReq);
      //Object uddiReqObj = JAXBMarshaller.unmarshallFromString(reqString, "org.uddi.api_v3");
      Object uddiReqObj = JAXBMarshaller.unmarshallFromElement(uddiReq, "org.uddi.api_v3");
      Method method = portType.getClass().getMethod(methodName, operationClass);
      Object result = method.invoke(portType, (Object) uddiReqObj);
      // Lookup the appropriate response handler which will
      // be used to marshal the UDDI object into the appropriate
      // xml format.
      
      /*
      IHandler responseHandler = maker.lookup(uddiResObj.getClass().getName());
      if (responseHandler == null)
        throw new FatalErrorException("The response object " +
          "type is unknown: " +uddiResObj.getClass().getName());
      */
      
      // Create a new 'temp' XML element to use as a container
      // in which to marshal the UDDI response data into.
     
      DocumentBuilder docBuilder = getDocumentBuilder();
      Document document = docBuilder.newDocument();
      Element element = document.createElement("temp");
      // Lookup the appropriate response handler and marshal
      // the juddi object into the appropriate xml format (we
      // only support UDDI v2.0 at this time). Attach the
      // results to the body of the SOAP response.
      JAXBMarshaller.marshallToElement(result, "org.uddi.api_v3", element);
      
      // Grab a reference to the 'temp' element's
      // only child here (this has the effect of
      // discarding the temp element) and append
      // this child to the soap response body
      document.appendChild(element.getFirstChild());
      setResponse(document);
    } catch (InvocationTargetException ite) {
     Throwable t = ite.getTargetException();
     String errorMessage = "";
     if (t.getCause() != null) {
     while (t.getCause() != null) {
     t = t.getCause();
     }
     errorMessage = t.getMessage() != null ?
     t.getMessage() : "";
     } else {
     errorMessage = ite.getTargetException().getMessage() != null ?
     ite.getTargetException().getMessage() : "";
     }
     String message;
try {
message = URLEncoder.encode(errorMessage,"UTF-8");
} catch (UnsupportedEncodingException e) {
message = e.getMessage();
}
     log.error(message);
     setException(message);
    }
    catch(Exception ex) // Catch any other exceptions
    {
     String message;
try {
message = URLEncoder.encode(ex.getMessage(), "UTF-8");
} catch (UnsupportedEncodingException e) {
message = e.getMessage();
}
        log.error(message);
        setException(message);
    }
    return response;
  }
{code}

For the deleteBinding invocation the result is being returned as null here:
{code}
Object result = method.invoke(portType, (Object) uddiReqObj);
{code}

Then the null result is given into:
{code}
JAXBMarshaller.marshallToElement(result, "org.uddi.api_v3", element);
{code}

which causes the jaxb assertion to fire because result is null (see stacktrace for further
code). I don't know if it is normal that the result is null. If so, the result should not
be marshalled. If it is not unnormal for the result to be null, I don't have an idea why it
is so. :) Hope you have an idea. 

  was:
This is a new issue extracted from: https://issues.apache.org/jira/browse/JUDDI-536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13178821#comment-13178821

---------------------------------------------------------------------------------------------
Though now I have a new problem with juddi 3.1.2. It is impossible for me to delete servicebindings
with scout. It throws the following exception:

{code}
java.lang.IllegalArgumentException: obj parameter must not be null
at javax.xml.bind.helpers.AbstractMarshallerImpl.checkNotNull(AbstractMarshallerImpl.java:437)
at javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:129)
at org.apache.juddi.jaxb.JAXBMarshaller.marshallToElement(JAXBMarshaller.java:124)
at org.apache.juddi.v3.client.transport.wrapper.RequestHandler.invoke(RequestHandler.java:153)
at org.apache.juddi.v3.client.transport.wrapper.UDDIPublicationService.publish(UDDIPublicationService.java:110)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.apache.ws.scout.transport.LocalTransport.send(LocalTransport.java:63)
at org.apache.ws.scout.registry.RegistryV3Impl.execute(RegistryV3Impl.java:301)
at org.apache.ws.scout.registry.RegistryV3Impl.deleteBinding(RegistryV3Impl.java:561)
at org.apache.ws.scout.registry.BusinessLifeCycleManagerV3Impl.executeOperation(BusinessLifeCycleManagerV3Impl.java:661)
at org.apache.ws.scout.registry.BusinessLifeCycleManagerV3Impl.deleteOperation(BusinessLifeCycleManagerV3Impl.java:827)
at org.apache.ws.scout.registry.BusinessLifeCycleManagerV3Impl.deleteServiceBindings(BusinessLifeCycleManagerV3Impl.java:159)
at de.invesdwin.gemeinsam.integration.ws.registry.JaxrHelper.removeServiceBinding(JaxrHelper.java:125)
at de.invesdwin.gemeinsam.integration.ws.registry.internal.RegistryService.unregisterServiceInstance(RegistryService.java:74)
at de.invesdwin.gemeinsam.integration.ws.XsdWebServicePublikation.shutdown(XsdWebServicePublikation.java:88)
at de.invesdwin.gemeinsam.integration.ws.XsdWebServicePublikationTest.testPublikation(XsdWebServicePublikationTest.java:29)
at de.invesdwin.gemeinsam.integration.ws.registry.RegistryServerTest.testStartServer(RegistryServerTest.java:62)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:82)
at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:240)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
java.lang.IllegalArgumentException: obj parameter must not be null
at javax.xml.bind.helpers.AbstractMarshallerImpl.checkNotNull(AbstractMarshallerImpl.java:437)
at javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:129)
at org.apache.juddi.jaxb.JAXBMarshaller.marshallToElement(JAXBMarshaller.java:124)
at org.apache.juddi.v3.client.transport.wrapper.RequestHandler.invoke(RequestHandler.java:153)
at org.apache.juddi.v3.client.transport.wrapper.UDDIPublicationService.publish(UDDIPublicationService.java:110)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.apache.ws.scout.transport.LocalTransport.send(LocalTransport.java:63)
at org.apache.ws.scout.registry.RegistryV3Impl.execute(RegistryV3Impl.java:301)
at org.apache.ws.scout.registry.RegistryV3Impl.deleteBinding(RegistryV3Impl.java:561)
at org.apache.ws.scout.registry.BusinessLifeCycleManagerV3Impl.executeOperation(BusinessLifeCycleManagerV3Impl.java:661)
at org.apache.ws.scout.registry.BusinessLifeCycleManagerV3Impl.deleteOperation(BusinessLifeCycleManagerV3Impl.java:827)
at org.apache.ws.scout.registry.BusinessLifeCycleManagerV3Impl.deleteServiceBindings(BusinessLifeCycleManagerV3Impl.java:159)
at de.invesdwin.gemeinsam.integration.ws.registry.JaxrHelper.removeServiceBinding(JaxrHelper.java:125)
at de.invesdwin.gemeinsam.integration.ws.registry.internal.RegistryService.unregisterServiceInstance(RegistryService.java:74)
at de.invesdwin.gemeinsam.integration.ws.XsdWebServicePublikation.shutdown(XsdWebServicePublikation.java:88)
at de.invesdwin.gemeinsam.integration.ws.XsdWebServicePublikationTest.testPublikation(XsdWebServicePublikationTest.java:29)
at de.invesdwin.gemeinsam.integration.ws.registry.RegistryServerTest.testStartServer(RegistryServerTest.java:62)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:82)
at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:240)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
{code}

This is caused by the following code:

{code}public Node invoke(Element uddiReq)
  {
    try
    {
      // Lookup the appropriate XML handler. Throw an
      // UnsupportedException if one could not be located.
      //String reqString = getText(uddiReq);
      //Object uddiReqObj = JAXBMarshaller.unmarshallFromString(reqString, "org.uddi.api_v3");
      Object uddiReqObj = JAXBMarshaller.unmarshallFromElement(uddiReq, "org.uddi.api_v3");
      Method method = portType.getClass().getMethod(methodName, operationClass);
      Object result = method.invoke(portType, (Object) uddiReqObj);
      // Lookup the appropriate response handler which will
      // be used to marshal the UDDI object into the appropriate
      // xml format.
      
      /*
      IHandler responseHandler = maker.lookup(uddiResObj.getClass().getName());
      if (responseHandler == null)
        throw new FatalErrorException("The response object " +
          "type is unknown: " +uddiResObj.getClass().getName());
      */
      
      // Create a new 'temp' XML element to use as a container
      // in which to marshal the UDDI response data into.
     
      DocumentBuilder docBuilder = getDocumentBuilder();
      Document document = docBuilder.newDocument();
      Element element = document.createElement("temp");
      // Lookup the appropriate response handler and marshal
      // the juddi object into the appropriate xml format (we
      // only support UDDI v2.0 at this time). Attach the
      // results to the body of the SOAP response.
      JAXBMarshaller.marshallToElement(result, "org.uddi.api_v3", element);
      
      // Grab a reference to the 'temp' element's
      // only child here (this has the effect of
      // discarding the temp element) and append
      // this child to the soap response body
      document.appendChild(element.getFirstChild());
      setResponse(document);
    } catch (InvocationTargetException ite) {
     Throwable t = ite.getTargetException();
     String errorMessage = "";
     if (t.getCause() != null) {
     while (t.getCause() != null) {
     t = t.getCause();
     }
     errorMessage = t.getMessage() != null ?
     t.getMessage() : "";
     } else {
     errorMessage = ite.getTargetException().getMessage() != null ?
     ite.getTargetException().getMessage() : "";
     }
     String message;
try {
message = URLEncoder.encode(errorMessage,"UTF-8");
} catch (UnsupportedEncodingException e) {
message = e.getMessage();
}
     log.error(message);
     setException(message);
    }
    catch(Exception ex) // Catch any other exceptions
    {
     String message;
try {
message = URLEncoder.encode(ex.getMessage(), "UTF-8");
} catch (UnsupportedEncodingException e) {
message = e.getMessage();
}
        log.error(message);
        setException(message);
    }
    return response;
  }
{code}

For the deleteBinding invocation the result is being returned as null here:
{code}
Object result = method.invoke(portType, (Object) uddiReqObj);
{code}

Then the null result is given into:
{code}
JAXBMarshaller.marshallToElement(result, "org.uddi.api_v3", element);
{code}

which causes the jaxb assertion to fire because result is null (see stacktrace for further
code). I don't know if it is normal that the result is null. If so, the result should not
be marshalled. If it is not unnormal for the result to be null, I don't have an idea why it
is so. :) Hope you have an idea. 

    
> NPE when deleting servicebinding
> --------------------------------
>
>                 Key: JUDDI-537
>                 URL: https://issues.apache.org/jira/browse/JUDDI-537
>             Project: jUDDI
>          Issue Type: Bug
>          Components: uddi-client
>    Affects Versions: 3.1.2
>            Reporter: subes
>            Assignee: Kurt T Stam
>
> This is a new issue extracted from: https://issues.apache.org/jira/browse/JUDDI-536?focusedCommentId=13178920&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13178920
> ---------------------------------------------------------------------------------------------
> Though now I have a new problem with juddi 3.1.2. It is impossible for me to delete servicebindings
with scout. It throws the following exception:
> {code}
> java.lang.IllegalArgumentException: obj parameter must not be null
> at javax.xml.bind.helpers.AbstractMarshallerImpl.checkNotNull(AbstractMarshallerImpl.java:437)
> at javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:129)
> at org.apache.juddi.jaxb.JAXBMarshaller.marshallToElement(JAXBMarshaller.java:124)
> at org.apache.juddi.v3.client.transport.wrapper.RequestHandler.invoke(RequestHandler.java:153)
> at org.apache.juddi.v3.client.transport.wrapper.UDDIPublicationService.publish(UDDIPublicationService.java:110)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:616)
> at org.apache.ws.scout.transport.LocalTransport.send(LocalTransport.java:63)
> at org.apache.ws.scout.registry.RegistryV3Impl.execute(RegistryV3Impl.java:301)
> at org.apache.ws.scout.registry.RegistryV3Impl.deleteBinding(RegistryV3Impl.java:561)
> at org.apache.ws.scout.registry.BusinessLifeCycleManagerV3Impl.executeOperation(BusinessLifeCycleManagerV3Impl.java:661)
> at org.apache.ws.scout.registry.BusinessLifeCycleManagerV3Impl.deleteOperation(BusinessLifeCycleManagerV3Impl.java:827)
> at org.apache.ws.scout.registry.BusinessLifeCycleManagerV3Impl.deleteServiceBindings(BusinessLifeCycleManagerV3Impl.java:159)
> at de.invesdwin.gemeinsam.integration.ws.registry.JaxrHelper.removeServiceBinding(JaxrHelper.java:125)
> at de.invesdwin.gemeinsam.integration.ws.registry.internal.RegistryService.unregisterServiceInstance(RegistryService.java:74)
> at de.invesdwin.gemeinsam.integration.ws.XsdWebServicePublikation.shutdown(XsdWebServicePublikation.java:88)
> at de.invesdwin.gemeinsam.integration.ws.XsdWebServicePublikationTest.testPublikation(XsdWebServicePublikationTest.java:29)
> at de.invesdwin.gemeinsam.integration.ws.registry.RegistryServerTest.testStartServer(RegistryServerTest.java:62)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:616)
> at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
> at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
> at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
> at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
> at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
> at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
> at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
> at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:82)
> at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
> at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:240)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
> at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
> at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
> at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
> at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
> java.lang.IllegalArgumentException: obj parameter must not be null
> at javax.xml.bind.helpers.AbstractMarshallerImpl.checkNotNull(AbstractMarshallerImpl.java:437)
> at javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:129)
> at org.apache.juddi.jaxb.JAXBMarshaller.marshallToElement(JAXBMarshaller.java:124)
> at org.apache.juddi.v3.client.transport.wrapper.RequestHandler.invoke(RequestHandler.java:153)
> at org.apache.juddi.v3.client.transport.wrapper.UDDIPublicationService.publish(UDDIPublicationService.java:110)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:616)
> at org.apache.ws.scout.transport.LocalTransport.send(LocalTransport.java:63)
> at org.apache.ws.scout.registry.RegistryV3Impl.execute(RegistryV3Impl.java:301)
> at org.apache.ws.scout.registry.RegistryV3Impl.deleteBinding(RegistryV3Impl.java:561)
> at org.apache.ws.scout.registry.BusinessLifeCycleManagerV3Impl.executeOperation(BusinessLifeCycleManagerV3Impl.java:661)
> at org.apache.ws.scout.registry.BusinessLifeCycleManagerV3Impl.deleteOperation(BusinessLifeCycleManagerV3Impl.java:827)
> at org.apache.ws.scout.registry.BusinessLifeCycleManagerV3Impl.deleteServiceBindings(BusinessLifeCycleManagerV3Impl.java:159)
> at de.invesdwin.gemeinsam.integration.ws.registry.JaxrHelper.removeServiceBinding(JaxrHelper.java:125)
> at de.invesdwin.gemeinsam.integration.ws.registry.internal.RegistryService.unregisterServiceInstance(RegistryService.java:74)
> at de.invesdwin.gemeinsam.integration.ws.XsdWebServicePublikation.shutdown(XsdWebServicePublikation.java:88)
> at de.invesdwin.gemeinsam.integration.ws.XsdWebServicePublikationTest.testPublikation(XsdWebServicePublikationTest.java:29)
> at de.invesdwin.gemeinsam.integration.ws.registry.RegistryServerTest.testStartServer(RegistryServerTest.java:62)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:616)
> at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
> at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
> at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
> at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
> at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
> at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
> at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
> at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:82)
> at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
> at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:240)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
> at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
> at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
> at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
> at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
> {code}
> This is caused by the following code:
> {code}public Node invoke(Element uddiReq)
>   {
>     try
>     {
>       // Lookup the appropriate XML handler. Throw an
>       // UnsupportedException if one could not be located.
>       //String reqString = getText(uddiReq);
>       //Object uddiReqObj = JAXBMarshaller.unmarshallFromString(reqString, "org.uddi.api_v3");
>       Object uddiReqObj = JAXBMarshaller.unmarshallFromElement(uddiReq, "org.uddi.api_v3");
>       Method method = portType.getClass().getMethod(methodName, operationClass);
>       Object result = method.invoke(portType, (Object) uddiReqObj);
>       // Lookup the appropriate response handler which will
>       // be used to marshal the UDDI object into the appropriate
>       // xml format.
>       
>       /*
>       IHandler responseHandler = maker.lookup(uddiResObj.getClass().getName());
>       if (responseHandler == null)
>         throw new FatalErrorException("The response object " +
>           "type is unknown: " +uddiResObj.getClass().getName());
>       */
>       
>       // Create a new 'temp' XML element to use as a container
>       // in which to marshal the UDDI response data into.
>      
>       DocumentBuilder docBuilder = getDocumentBuilder();
>       Document document = docBuilder.newDocument();
>       Element element = document.createElement("temp");
>       // Lookup the appropriate response handler and marshal
>       // the juddi object into the appropriate xml format (we
>       // only support UDDI v2.0 at this time). Attach the
>       // results to the body of the SOAP response.
>       JAXBMarshaller.marshallToElement(result, "org.uddi.api_v3", element);
>       
>       // Grab a reference to the 'temp' element's
>       // only child here (this has the effect of
>       // discarding the temp element) and append
>       // this child to the soap response body
>       document.appendChild(element.getFirstChild());
>       setResponse(document);
>     } catch (InvocationTargetException ite) {
>      Throwable t = ite.getTargetException();
>      String errorMessage = "";
>      if (t.getCause() != null) {
>      while (t.getCause() != null) {
>      t = t.getCause();
>      }
>      errorMessage = t.getMessage() != null ?
>      t.getMessage() : "";
>      } else {
>      errorMessage = ite.getTargetException().getMessage() != null ?
>      ite.getTargetException().getMessage() : "";
>      }
>      String message;
> try {
> message = URLEncoder.encode(errorMessage,"UTF-8");
> } catch (UnsupportedEncodingException e) {
> message = e.getMessage();
> }
>      log.error(message);
>      setException(message);
>     }
>     catch(Exception ex) // Catch any other exceptions
>     {
>      String message;
> try {
> message = URLEncoder.encode(ex.getMessage(), "UTF-8");
> } catch (UnsupportedEncodingException e) {
> message = e.getMessage();
> }
>         log.error(message);
>         setException(message);
>     }
>     return response;
>   }
> {code}
> For the deleteBinding invocation the result is being returned as null here:
> {code}
> Object result = method.invoke(portType, (Object) uddiReqObj);
> {code}
> Then the null result is given into:
> {code}
> JAXBMarshaller.marshallToElement(result, "org.uddi.api_v3", element);
> {code}
> which causes the jaxb assertion to fire because result is null (see stacktrace for further
code). I don't know if it is normal that the result is null. If so, the result should not
be marshalled. If it is not unnormal for the result to be null, I don't have an idea why it
is so. :) Hope you have an idea. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message