tuscany-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Raymond Feng (JIRA)" <tuscany-...@ws.apache.org>
Subject [jira] Commented: (TUSCANY-2060) Exception using binding.ws if a method is named init()
Date Mon, 03 Mar 2008 18:44:54 GMT

    [ https://issues.apache.org/jira/browse/TUSCANY-2060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12574659#action_12574659
] 

Raymond Feng commented on TUSCANY-2060:
---------------------------------------

Hi, I debugged the issue and found out this is an AXIS2 problem. 

In org.apache.ws.java2wsdl.Java2WSDLBuilder.class, it has the code:

        ArrayList excludedOperation = new ArrayList();
        Utils.addExcludeMethods(excludedOperation);
        schemaGenerator.setExcludeMethods(excludedOperation);

And the Utils class has:

    /**
     * To add the exclude method when generating scheams , here the exclude methods
     * will be session releated axis2 methods
     */
    public static void addExcludeMethods(ArrayList excludeList) {
        excludeList.add("init");
        excludeList.add("setOperationContext");
        excludeList.add("startUp");
        excludeList.add("destroy");
        excludeList.add("shutDown");
    }

So the method names above are excluded. 

I think the best way is to open an AXIS2 JIRA to see if there is any options to override this.

> Exception using binding.ws if a method is named init()
> ------------------------------------------------------
>
>                 Key: TUSCANY-2060
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2060
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Core Runtime
>    Affects Versions: Java-SCA-1.1
>         Environment: Windows XP SP2, Intel Core 2 CPU, 2.6, 2GB Ram, jdk 1.5.0_10 
>            Reporter: Daniel Stucky
>            Assignee: Raymond Feng
>         Attachments: test.zip
>
>
> I have the following Java Interface that works with binding.sca: 
> public interface Gamma 
> { 
> void init(); 
> void doSomething(); 
> void stop(); 
> } 
> When I use binding.ws (I let Tuscany create the WSDL interfaces automatically I get the
following exception (see below). The method is NOT marked with @Init, it's just the name of
the method. 
> Exception in thread "main" org.osoa.sca.ServiceRuntimeException: org.osoa.sca.ServiceRuntimeException:
org.apache.tuscany.sca.core.assembly.ActivationException: java.lang.NullPointerException
> 	at org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.java:264)
> 	at org.apache.tuscany.sca.host.embedded.SCADomain.newInstance(SCADomain.java:69)
> 	at launch.Launch.main(Launch.java:10)
> Caused by: org.osoa.sca.ServiceRuntimeException: org.apache.tuscany.sca.core.assembly.ActivationException:
java.lang.NullPointerException
> 	at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init>(DefaultSCADomain.java:183)
> 	at org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.java:230)
> 	... 2 more
> Caused by: org.apache.tuscany.sca.core.assembly.ActivationException: java.lang.NullPointerException
> 	at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.activate(CompositeActivatorImpl.java:756)
> 	at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init>(DefaultSCADomain.java:181)
> 	... 3 more
> Caused by: java.lang.NullPointerException
> 	at org.apache.tuscany.sca.interfacedef.wsdl.impl.WSDLOperationIntrospectorImpl.getOperation(WSDLOperationIntrospectorImpl.java:206)
> 	at org.apache.tuscany.sca.interfacedef.wsdl.java2wsdl.Java2WSDLHelper.createWSDLInterfaceContract(Java2WSDLHelper.java:153)
> 	at org.apache.tuscany.sca.binding.ws.axis2.Axis2ReferenceBindingProvider.<init>(Axis2ReferenceBindingProvider.java:51)
> 	at org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingProviderFactory.createReferenceBindingProvider(Axis2BindingProviderFactory.java:53)
> 	at org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingProviderFactory.createReferenceBindingProvider(Axis2BindingProviderFactory.java:40)
> 	at org.apache.tuscany.sca.provider.DefaultProviderFactoryExtensionPoint$LazyBindingProviderFactory.createReferenceBindingProvider(DefaultProviderFactoryExtensionPoint.java:190)
> 	at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.addReferenceBindingProvider(CompositeActivatorImpl.java:176)
> 	at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.activate(CompositeActivatorImpl.java:133)
> 	at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.activate(CompositeActivatorImpl.java:752)
> 	... 4 more
> I also tested it with version 1.2. The Exception is the same, with slightly different
line numbers.
> Exception in thread "main" org.osoa.sca.ServiceRuntimeException: org.osoa.sca.ServiceRuntimeException:
org.apache.tuscany.sca.core.assembly.ActivationException: java.lang.NullPointerException
> 	at org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.java:264)
> 	at org.apache.tuscany.sca.host.embedded.SCADomain.newInstance(SCADomain.java:69)
> 	at launch.Launch.main(Launch.java:10)
> Caused by: org.osoa.sca.ServiceRuntimeException: org.apache.tuscany.sca.core.assembly.ActivationException:
java.lang.NullPointerException
> 	at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.init(DefaultSCADomain.java:215)
> 	at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init>(DefaultSCADomain.java:109)
> 	at org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.java:230)
> 	... 2 more
> Caused by: org.apache.tuscany.sca.core.assembly.ActivationException: java.lang.NullPointerException
> 	at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.activate(CompositeActivatorImpl.java:756)
> 	at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.init(DefaultSCADomain.java:213)
> 	... 4 more
> Caused by: java.lang.NullPointerException
> 	at org.apache.tuscany.sca.interfacedef.wsdl.impl.WSDLOperationIntrospectorImpl.getOperation(WSDLOperationIntrospectorImpl.java:209)
> 	at org.apache.tuscany.sca.interfacedef.wsdl.java2wsdl.Java2WSDLHelper.createWSDLInterfaceContract(Java2WSDLHelper.java:153)
> 	at org.apache.tuscany.sca.binding.ws.axis2.Axis2ReferenceBindingProvider.<init>(Axis2ReferenceBindingProvider.java:56)
> 	at org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingProviderFactory.createReferenceBindingProvider(Axis2BindingProviderFactory.java:60)
> 	at org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingProviderFactory.createReferenceBindingProvider(Axis2BindingProviderFactory.java:45)
> 	at org.apache.tuscany.sca.provider.DefaultProviderFactoryExtensionPoint$LazyBindingProviderFactory.createReferenceBindingProvider(DefaultProviderFactoryExtensionPoint.java:190)
> 	at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.addReferenceBindingProvider(CompositeActivatorImpl.java:176)
> 	at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.activate(CompositeActivatorImpl.java:133)
> 	at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.activate(CompositeActivatorImpl.java:752)
> 	... 5 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Mime
View raw message