Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-4916

NPE before being checked in JaxWsServiceConfiguration.class

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • None
    • None
    • None
    • None
    • jdk6

    • Moderate

    Description

      Exception in thread "main" java.lang.NullPointerException
      at java.lang.Class.isAssignableFrom(Native Method)
      at org.apache.cxf.jaxws.support.JaxWsServiceConfiguration.isWebMethod(JaxWsServiceConfiguration.java:166)
      at org.apache.cxf.jaxws.support.JaxWsServiceConfiguration.isOperation(JaxWsServiceConfiguration.java:205)
      at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.isValidMethod(ReflectionServiceFactoryBean.java:1932)
      at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.createInterface(ReflectionServiceFactoryBean.java:981)
      at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:469)
      at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromClass(JaxWsServiceFactoryBean.java:690)
      at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:540)
      at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:252)
      at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:205)
      at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:101)
      at org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:90)
      at org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:156)
      at org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:156)
      ....

      ---------------------------
      Here is the concerned code snippet (JaxWsServiceConfiguration.java.isWebMethod():
      implInfo.getSEIClass() null check is after cls.isAssignableFrom(implInfo.getSEIClass()) threw an exception, I'm trying to move it ahead to solve my problem.

      if ((wm != null && !wm.exclude()) || (cls.isInterface()
      && cls.isAssignableFrom(implInfo.getSEIClass())))

      { return Boolean.TRUE; }

      if (method.getDeclaringClass().isInterface())

      { return hasWebServiceAnnotation(method); }

      if (implInfo.getSEIClass() == null)

      { return hasWebServiceAnnotation(method) && !Modifier.isFinal(method.getModifiers()) && !Modifier.isStatic(method.getModifiers()); }

      return implInfo.getSEIClass().isAssignableFrom(method.getDeclaringClass());

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jieying.xiong jieying.xiong
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: