You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@beehive.apache.org by "Yongqin Xu (JIRA)" <be...@incubator.apache.org> on 2005/05/27 19:30:54 UTC

[jira] Created: (BEEHIVE-769) WSM client control can not load WSDL file from @WSDL annotation

WSM client control can not load WSDL file from @WSDL annotation
---------------------------------------------------------------

         Key: BEEHIVE-769
         URL: http://issues.apache.org/jira/browse/BEEHIVE-769
     Project: Beehive
        Type: Bug
  Components: Controls  
    Versions: V1    
 Environment: Win XP SP2, JDK 1.5.03
    Reporter: Yongqin Xu
    Priority: Critical


In WSM web service client control, I specified @WSDL(path="Skugen.wsdl"...) as I did before. But latest unit test failed with following error:

-------------------------------------------------------------------------
bcc
java.lang.NullPointerException: bcc
	at java.beans.beancontext.BeanContextSupport.getResourceAsStream(BeanContextSupport.java:646)
	at org.apache.beehive.controls.system.webservice.jaxrpc.ServiceControlImpl.getWSDLStream(ServiceControlImpl.java:514)
	at org.apache.beehive.controls.system.webservice.jaxrpc.ServiceControlImpl.initialize(ServiceControlImpl.java:457)
	at org.apache.beehive.controls.system.webservice.jaxrpc.ServiceControlImpl.invoke(ServiceControlImpl.java:126)
	at com.bea.wlw.aa.skugen.ws.GenerateSKUBean.ping(GenerateSKUBean.java:124)
	at com.bea.wlw.aa.skugen.ws.SkuGeneratorClientControlTest.testPing(SkuGeneratorClientControlTest.java:80)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at 

----------------------------------------------------------------------------

According to stack trace. In source code:
org.apache.beehive.controls.system.webservice.jaxrpc.ServiceControlImpl.java,
the private method getWSDLStream(String), at line 514:

wsdlStream =cbContext.getBeanContext().getResourceAsStream(pathToWSDL, null);

The second parameter is "null". But by checking JDK source code 1.5.03 in
java.beans.beancontext.BeanContextSupport.java, at line 644, the method:

    public InputStream getResourceAsStream(String name, BeanContextChild bcc) {
	if (name == null) throw new NullPointerException("name");
	if (bcc  == null) throw new NullPointerException("bcc");

	if (containsKey(bcc)) {
	    ClassLoader cl = bcc.getClass().getClassLoader();

	    return cl != null ? cl.getResourceAsStream(name)
			      : ClassLoader.getSystemResourceAsStream(name);
	} else throw new IllegalArgumentException("Not a valid child");
    }

"bcc" is required somehow, that is why the NullPointerException happened.



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (BEEHIVE-769) WSM client control can not load WSDL file from @WSDL annotation

Posted by "daryoush mehrtash (JIRA)" <be...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/BEEHIVE-769?page=comments#action_66491 ]
     
daryoush mehrtash commented on BEEHIVE-769:
-------------------------------------------

The problem here is that the control is not initialized correctly.  The fact that the calls ends up in java.beans.beancontext.BeanContextSupport.java means that you don't have the correct bean context.  If the control is running in a container then there is a problem in the container initialization.  If the control is running in the JUnit environment, you need to make sure your are initializing the controls properly.

The best place to look at a running example of the controls in Junit context is  the controls-webservices-blank in the distribution samples.  The sample runs a service control against the wsm-addressbook-enhanced (that is also in the samples) web service.  To run the  controls-webservices-blank you need to make sure to have built and deployed the wsm-addressbook-enhanced.   

There are two changes you need to be aware of::  Build process, and Controls initialization in JUnit (if you are running the control as JUnit)   


Take a look at the build.xml for the . controls-webservices-blank and notice that there has been a change in the arguments to the ExtensionMaker.  The "-wsdl_path_annotation ."  argument is not longer used.  You should only need:

<arg line="-gen_root ${gen.source.dir} -wsdl ${schema.dir} -pkg ${my.service.control.package}" />

At run time The JCX file and the WSDL file should be on the same directory and in  the JCX file your @WSDL annotations should look like:

@WSDL(path = "Service.wsdl",
	service = "EnhancedAddressBook")

Notice the "./" is no longer used in the  path.  


Junit Initalization.....I suspect this is the main source of your problem.  Please look at the controls-webservices-blank 's junit\test\AddressBookTest.java.  Notice the "setup()" and "teardown()" methods that perform the control initializations and install the correct context.  The Service Control Drt Tests also uses a similar structure in the unit testing.  You need to make sure your unit tests also perform similar steps.

Hope this help.    I leave the bug open until we make sure this would fix your problem.
  

> WSM client control can not load WSDL file from @WSDL annotation
> ---------------------------------------------------------------
>
>          Key: BEEHIVE-769
>          URL: http://issues.apache.org/jira/browse/BEEHIVE-769
>      Project: Beehive
>         Type: Bug
>   Components: Controls
>     Versions: V1
>  Environment: Win XP SP2, JDK 1.5.03
>     Reporter: Yongqin Xu
>     Assignee: daryoush mehrtash
>     Priority: Critical

>
> In WSM web service client control, I specified @WSDL(path="Skugen.wsdl"...) as I did before. But latest unit test failed with following error:
> -------------------------------------------------------------------------
> bcc
> java.lang.NullPointerException: bcc
> 	at java.beans.beancontext.BeanContextSupport.getResourceAsStream(BeanContextSupport.java:646)
> 	at org.apache.beehive.controls.system.webservice.jaxrpc.ServiceControlImpl.getWSDLStream(ServiceControlImpl.java:514)
> 	at org.apache.beehive.controls.system.webservice.jaxrpc.ServiceControlImpl.initialize(ServiceControlImpl.java:457)
> 	at org.apache.beehive.controls.system.webservice.jaxrpc.ServiceControlImpl.invoke(ServiceControlImpl.java:126)
> 	at com.bea.wlw.aa.skugen.ws.GenerateSKUBean.ping(GenerateSKUBean.java:124)
> 	at com.bea.wlw.aa.skugen.ws.SkuGeneratorClientControlTest.testPing(SkuGeneratorClientControlTest.java:80)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at 
> ----------------------------------------------------------------------------
> According to stack trace. In source code:
> org.apache.beehive.controls.system.webservice.jaxrpc.ServiceControlImpl.java,
> the private method getWSDLStream(String), at line 514:
> wsdlStream =cbContext.getBeanContext().getResourceAsStream(pathToWSDL, null);
> The second parameter is "null". But by checking JDK source code 1.5.03 in
> java.beans.beancontext.BeanContextSupport.java, at line 644, the method:
>     public InputStream getResourceAsStream(String name, BeanContextChild bcc) {
> 	if (name == null) throw new NullPointerException("name");
> 	if (bcc  == null) throw new NullPointerException("bcc");
> 	if (containsKey(bcc)) {
> 	    ClassLoader cl = bcc.getClass().getClassLoader();
> 	    return cl != null ? cl.getResourceAsStream(name)
> 			      : ClassLoader.getSystemResourceAsStream(name);
> 	} else throw new IllegalArgumentException("Not a valid child");
>     }
> "bcc" is required somehow, that is why the NullPointerException happened.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (BEEHIVE-769) WSM client control can not load WSDL file from @WSDL annotation

Posted by "Rich Feit (JIRA)" <be...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/BEEHIVE-769?page=comments#action_66493 ]
     
Rich Feit commented on BEEHIVE-769:
-----------------------------------

Thanks for the investigation and explanation.  I think that if this turns out to have been the issue, then we should lower the priority of this bug and push it to TBD, in order to get a better error if there's not a properly-initialized context.  This particular NPE is pretty hard to figure out.  Sounds like we're OK for the release, though.

> WSM client control can not load WSDL file from @WSDL annotation
> ---------------------------------------------------------------
>
>          Key: BEEHIVE-769
>          URL: http://issues.apache.org/jira/browse/BEEHIVE-769
>      Project: Beehive
>         Type: Bug
>   Components: Controls
>     Versions: V1
>  Environment: Win XP SP2, JDK 1.5.03
>     Reporter: Yongqin Xu
>     Assignee: daryoush mehrtash
>     Priority: Critical

>
> In WSM web service client control, I specified @WSDL(path="Skugen.wsdl"...) as I did before. But latest unit test failed with following error:
> -------------------------------------------------------------------------
> bcc
> java.lang.NullPointerException: bcc
> 	at java.beans.beancontext.BeanContextSupport.getResourceAsStream(BeanContextSupport.java:646)
> 	at org.apache.beehive.controls.system.webservice.jaxrpc.ServiceControlImpl.getWSDLStream(ServiceControlImpl.java:514)
> 	at org.apache.beehive.controls.system.webservice.jaxrpc.ServiceControlImpl.initialize(ServiceControlImpl.java:457)
> 	at org.apache.beehive.controls.system.webservice.jaxrpc.ServiceControlImpl.invoke(ServiceControlImpl.java:126)
> 	at com.bea.wlw.aa.skugen.ws.GenerateSKUBean.ping(GenerateSKUBean.java:124)
> 	at com.bea.wlw.aa.skugen.ws.SkuGeneratorClientControlTest.testPing(SkuGeneratorClientControlTest.java:80)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at 
> ----------------------------------------------------------------------------
> According to stack trace. In source code:
> org.apache.beehive.controls.system.webservice.jaxrpc.ServiceControlImpl.java,
> the private method getWSDLStream(String), at line 514:
> wsdlStream =cbContext.getBeanContext().getResourceAsStream(pathToWSDL, null);
> The second parameter is "null". But by checking JDK source code 1.5.03 in
> java.beans.beancontext.BeanContextSupport.java, at line 644, the method:
>     public InputStream getResourceAsStream(String name, BeanContextChild bcc) {
> 	if (name == null) throw new NullPointerException("name");
> 	if (bcc  == null) throw new NullPointerException("bcc");
> 	if (containsKey(bcc)) {
> 	    ClassLoader cl = bcc.getClass().getClassLoader();
> 	    return cl != null ? cl.getResourceAsStream(name)
> 			      : ClassLoader.getSystemResourceAsStream(name);
> 	} else throw new IllegalArgumentException("Not a valid child");
>     }
> "bcc" is required somehow, that is why the NullPointerException happened.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (BEEHIVE-769) WSM client control can not load WSDL file from @WSDL annotation

Posted by "daryoush mehrtash (JIRA)" <be...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/BEEHIVE-769?page=all ]

daryoush mehrtash updated BEEHIVE-769:
--------------------------------------

           type: New Feature  (was: Bug)
       Priority: Major  (was: Critical)
    Fix Version: TBD

I have change the bug to a feature request for the next version to improve on the error message.



> WSM client control can not load WSDL file from @WSDL annotation
> ---------------------------------------------------------------
>
>          Key: BEEHIVE-769
>          URL: http://issues.apache.org/jira/browse/BEEHIVE-769
>      Project: Beehive
>         Type: New Feature
>   Components: Controls
>     Versions: V1
>  Environment: Win XP SP2, JDK 1.5.03
>     Reporter: Yongqin Xu
>     Assignee: daryoush mehrtash
>      Fix For: TBD

>
> In WSM web service client control, I specified @WSDL(path="Skugen.wsdl"...) as I did before. But latest unit test failed with following error:
> -------------------------------------------------------------------------
> bcc
> java.lang.NullPointerException: bcc
> 	at java.beans.beancontext.BeanContextSupport.getResourceAsStream(BeanContextSupport.java:646)
> 	at org.apache.beehive.controls.system.webservice.jaxrpc.ServiceControlImpl.getWSDLStream(ServiceControlImpl.java:514)
> 	at org.apache.beehive.controls.system.webservice.jaxrpc.ServiceControlImpl.initialize(ServiceControlImpl.java:457)
> 	at org.apache.beehive.controls.system.webservice.jaxrpc.ServiceControlImpl.invoke(ServiceControlImpl.java:126)
> 	at com.bea.wlw.aa.skugen.ws.GenerateSKUBean.ping(GenerateSKUBean.java:124)
> 	at com.bea.wlw.aa.skugen.ws.SkuGeneratorClientControlTest.testPing(SkuGeneratorClientControlTest.java:80)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at 
> ----------------------------------------------------------------------------
> According to stack trace. In source code:
> org.apache.beehive.controls.system.webservice.jaxrpc.ServiceControlImpl.java,
> the private method getWSDLStream(String), at line 514:
> wsdlStream =cbContext.getBeanContext().getResourceAsStream(pathToWSDL, null);
> The second parameter is "null". But by checking JDK source code 1.5.03 in
> java.beans.beancontext.BeanContextSupport.java, at line 644, the method:
>     public InputStream getResourceAsStream(String name, BeanContextChild bcc) {
> 	if (name == null) throw new NullPointerException("name");
> 	if (bcc  == null) throw new NullPointerException("bcc");
> 	if (containsKey(bcc)) {
> 	    ClassLoader cl = bcc.getClass().getClassLoader();
> 	    return cl != null ? cl.getResourceAsStream(name)
> 			      : ClassLoader.getSystemResourceAsStream(name);
> 	} else throw new IllegalArgumentException("Not a valid child");
>     }
> "bcc" is required somehow, that is why the NullPointerException happened.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (BEEHIVE-769) WSM client control can not load WSDL file from @WSDL annotation

Posted by "Rich Feit (JIRA)" <be...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/BEEHIVE-769?page=all ]

Rich Feit reassigned BEEHIVE-769:
---------------------------------

    Assign To: daryoush mehrtash

Daryoush, it looks like revision 170192 was a patch that you contributed.  Would you take a look and attach a proposed fix?

Thanks,
Rich

> WSM client control can not load WSDL file from @WSDL annotation
> ---------------------------------------------------------------
>
>          Key: BEEHIVE-769
>          URL: http://issues.apache.org/jira/browse/BEEHIVE-769
>      Project: Beehive
>         Type: Bug
>   Components: Controls
>     Versions: V1
>  Environment: Win XP SP2, JDK 1.5.03
>     Reporter: Yongqin Xu
>     Assignee: daryoush mehrtash
>     Priority: Critical

>
> In WSM web service client control, I specified @WSDL(path="Skugen.wsdl"...) as I did before. But latest unit test failed with following error:
> -------------------------------------------------------------------------
> bcc
> java.lang.NullPointerException: bcc
> 	at java.beans.beancontext.BeanContextSupport.getResourceAsStream(BeanContextSupport.java:646)
> 	at org.apache.beehive.controls.system.webservice.jaxrpc.ServiceControlImpl.getWSDLStream(ServiceControlImpl.java:514)
> 	at org.apache.beehive.controls.system.webservice.jaxrpc.ServiceControlImpl.initialize(ServiceControlImpl.java:457)
> 	at org.apache.beehive.controls.system.webservice.jaxrpc.ServiceControlImpl.invoke(ServiceControlImpl.java:126)
> 	at com.bea.wlw.aa.skugen.ws.GenerateSKUBean.ping(GenerateSKUBean.java:124)
> 	at com.bea.wlw.aa.skugen.ws.SkuGeneratorClientControlTest.testPing(SkuGeneratorClientControlTest.java:80)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at 
> ----------------------------------------------------------------------------
> According to stack trace. In source code:
> org.apache.beehive.controls.system.webservice.jaxrpc.ServiceControlImpl.java,
> the private method getWSDLStream(String), at line 514:
> wsdlStream =cbContext.getBeanContext().getResourceAsStream(pathToWSDL, null);
> The second parameter is "null". But by checking JDK source code 1.5.03 in
> java.beans.beancontext.BeanContextSupport.java, at line 644, the method:
>     public InputStream getResourceAsStream(String name, BeanContextChild bcc) {
> 	if (name == null) throw new NullPointerException("name");
> 	if (bcc  == null) throw new NullPointerException("bcc");
> 	if (containsKey(bcc)) {
> 	    ClassLoader cl = bcc.getClass().getClassLoader();
> 	    return cl != null ? cl.getResourceAsStream(name)
> 			      : ClassLoader.getSystemResourceAsStream(name);
> 	} else throw new IllegalArgumentException("Not a valid child");
>     }
> "bcc" is required somehow, that is why the NullPointerException happened.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (BEEHIVE-769) WSM client control can not load WSDL file from @WSDL annotation

Posted by "daryoush mehrtash (JIRA)" <be...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/BEEHIVE-769?page=all ]

daryoush mehrtash reassigned BEEHIVE-769:
-----------------------------------------

    Assign To: daryoush mehrtash  (was: daryoush mehrtash)

> WSM client control can not load WSDL file from @WSDL annotation
> ---------------------------------------------------------------
>
>          Key: BEEHIVE-769
>          URL: http://issues.apache.org/jira/browse/BEEHIVE-769
>      Project: Beehive
>         Type: Bug
>   Components: Controls
>     Versions: V1
>  Environment: Win XP SP2, JDK 1.5.03
>     Reporter: Yongqin Xu
>     Assignee: daryoush mehrtash
>     Priority: Critical

>
> In WSM web service client control, I specified @WSDL(path="Skugen.wsdl"...) as I did before. But latest unit test failed with following error:
> -------------------------------------------------------------------------
> bcc
> java.lang.NullPointerException: bcc
> 	at java.beans.beancontext.BeanContextSupport.getResourceAsStream(BeanContextSupport.java:646)
> 	at org.apache.beehive.controls.system.webservice.jaxrpc.ServiceControlImpl.getWSDLStream(ServiceControlImpl.java:514)
> 	at org.apache.beehive.controls.system.webservice.jaxrpc.ServiceControlImpl.initialize(ServiceControlImpl.java:457)
> 	at org.apache.beehive.controls.system.webservice.jaxrpc.ServiceControlImpl.invoke(ServiceControlImpl.java:126)
> 	at com.bea.wlw.aa.skugen.ws.GenerateSKUBean.ping(GenerateSKUBean.java:124)
> 	at com.bea.wlw.aa.skugen.ws.SkuGeneratorClientControlTest.testPing(SkuGeneratorClientControlTest.java:80)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at 
> ----------------------------------------------------------------------------
> According to stack trace. In source code:
> org.apache.beehive.controls.system.webservice.jaxrpc.ServiceControlImpl.java,
> the private method getWSDLStream(String), at line 514:
> wsdlStream =cbContext.getBeanContext().getResourceAsStream(pathToWSDL, null);
> The second parameter is "null". But by checking JDK source code 1.5.03 in
> java.beans.beancontext.BeanContextSupport.java, at line 644, the method:
>     public InputStream getResourceAsStream(String name, BeanContextChild bcc) {
> 	if (name == null) throw new NullPointerException("name");
> 	if (bcc  == null) throw new NullPointerException("bcc");
> 	if (containsKey(bcc)) {
> 	    ClassLoader cl = bcc.getClass().getClassLoader();
> 	    return cl != null ? cl.getResourceAsStream(name)
> 			      : ClassLoader.getSystemResourceAsStream(name);
> 	} else throw new IllegalArgumentException("Not a valid child");
>     }
> "bcc" is required somehow, that is why the NullPointerException happened.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (BEEHIVE-769) WSM client control can not load WSDL file from @WSDL annotation

Posted by "Rich Feit (JIRA)" <be...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/BEEHIVE-769?page=comments#action_66478 ]
     
Rich Feit commented on BEEHIVE-769:
-----------------------------------

Also, Yongqin, would you attach the repro case?  It *looks* like this will always blow up if the WSDL path is local (as opposed to a URI).

Would you also include the last revision number you know was working OK?  If you don't have that, a rough date would still be helpful.  It looks like the suspect revision is 170192, but I'd like to confirm.

> WSM client control can not load WSDL file from @WSDL annotation
> ---------------------------------------------------------------
>
>          Key: BEEHIVE-769
>          URL: http://issues.apache.org/jira/browse/BEEHIVE-769
>      Project: Beehive
>         Type: Bug
>   Components: Controls
>     Versions: V1
>  Environment: Win XP SP2, JDK 1.5.03
>     Reporter: Yongqin Xu
>     Priority: Critical

>
> In WSM web service client control, I specified @WSDL(path="Skugen.wsdl"...) as I did before. But latest unit test failed with following error:
> -------------------------------------------------------------------------
> bcc
> java.lang.NullPointerException: bcc
> 	at java.beans.beancontext.BeanContextSupport.getResourceAsStream(BeanContextSupport.java:646)
> 	at org.apache.beehive.controls.system.webservice.jaxrpc.ServiceControlImpl.getWSDLStream(ServiceControlImpl.java:514)
> 	at org.apache.beehive.controls.system.webservice.jaxrpc.ServiceControlImpl.initialize(ServiceControlImpl.java:457)
> 	at org.apache.beehive.controls.system.webservice.jaxrpc.ServiceControlImpl.invoke(ServiceControlImpl.java:126)
> 	at com.bea.wlw.aa.skugen.ws.GenerateSKUBean.ping(GenerateSKUBean.java:124)
> 	at com.bea.wlw.aa.skugen.ws.SkuGeneratorClientControlTest.testPing(SkuGeneratorClientControlTest.java:80)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at 
> ----------------------------------------------------------------------------
> According to stack trace. In source code:
> org.apache.beehive.controls.system.webservice.jaxrpc.ServiceControlImpl.java,
> the private method getWSDLStream(String), at line 514:
> wsdlStream =cbContext.getBeanContext().getResourceAsStream(pathToWSDL, null);
> The second parameter is "null". But by checking JDK source code 1.5.03 in
> java.beans.beancontext.BeanContextSupport.java, at line 644, the method:
>     public InputStream getResourceAsStream(String name, BeanContextChild bcc) {
> 	if (name == null) throw new NullPointerException("name");
> 	if (bcc  == null) throw new NullPointerException("bcc");
> 	if (containsKey(bcc)) {
> 	    ClassLoader cl = bcc.getClass().getClassLoader();
> 	    return cl != null ? cl.getResourceAsStream(name)
> 			      : ClassLoader.getSystemResourceAsStream(name);
> 	} else throw new IllegalArgumentException("Not a valid child");
>     }
> "bcc" is required somehow, that is why the NullPointerException happened.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (BEEHIVE-769) WSM client control can not load WSDL file from @WSDL annotation

Posted by "Rich Feit (JIRA)" <be...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/BEEHIVE-769?page=comments#action_66477 ]
     
Rich Feit commented on BEEHIVE-769:
-----------------------------------

This seems like it might be critical enough to hold the release (and cause a re-vote on a new revision).  Can someone comment on this, and also on the risk/complexity of the fix?

> WSM client control can not load WSDL file from @WSDL annotation
> ---------------------------------------------------------------
>
>          Key: BEEHIVE-769
>          URL: http://issues.apache.org/jira/browse/BEEHIVE-769
>      Project: Beehive
>         Type: Bug
>   Components: Controls
>     Versions: V1
>  Environment: Win XP SP2, JDK 1.5.03
>     Reporter: Yongqin Xu
>     Priority: Critical

>
> In WSM web service client control, I specified @WSDL(path="Skugen.wsdl"...) as I did before. But latest unit test failed with following error:
> -------------------------------------------------------------------------
> bcc
> java.lang.NullPointerException: bcc
> 	at java.beans.beancontext.BeanContextSupport.getResourceAsStream(BeanContextSupport.java:646)
> 	at org.apache.beehive.controls.system.webservice.jaxrpc.ServiceControlImpl.getWSDLStream(ServiceControlImpl.java:514)
> 	at org.apache.beehive.controls.system.webservice.jaxrpc.ServiceControlImpl.initialize(ServiceControlImpl.java:457)
> 	at org.apache.beehive.controls.system.webservice.jaxrpc.ServiceControlImpl.invoke(ServiceControlImpl.java:126)
> 	at com.bea.wlw.aa.skugen.ws.GenerateSKUBean.ping(GenerateSKUBean.java:124)
> 	at com.bea.wlw.aa.skugen.ws.SkuGeneratorClientControlTest.testPing(SkuGeneratorClientControlTest.java:80)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at 
> ----------------------------------------------------------------------------
> According to stack trace. In source code:
> org.apache.beehive.controls.system.webservice.jaxrpc.ServiceControlImpl.java,
> the private method getWSDLStream(String), at line 514:
> wsdlStream =cbContext.getBeanContext().getResourceAsStream(pathToWSDL, null);
> The second parameter is "null". But by checking JDK source code 1.5.03 in
> java.beans.beancontext.BeanContextSupport.java, at line 644, the method:
>     public InputStream getResourceAsStream(String name, BeanContextChild bcc) {
> 	if (name == null) throw new NullPointerException("name");
> 	if (bcc  == null) throw new NullPointerException("bcc");
> 	if (containsKey(bcc)) {
> 	    ClassLoader cl = bcc.getClass().getClassLoader();
> 	    return cl != null ? cl.getResourceAsStream(name)
> 			      : ClassLoader.getSystemResourceAsStream(name);
> 	} else throw new IllegalArgumentException("Not a valid child");
>     }
> "bcc" is required somehow, that is why the NullPointerException happened.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira