You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Raymond Feng (JIRA)" <tu...@ws.apache.org> on 2007/07/15 22:53:04 UTC

[jira] Commented: (TUSCANY-1435) CastCastException is thrown when both JSONRPC and EJBBinding are on the classpath

    [ https://issues.apache.org/jira/browse/TUSCANY-1435?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12512825 ] 

Raymond Feng commented on TUSCANY-1435:
---------------------------------------

After debugging, I found the problem in org.apache.tuscany.sca.spi.impl.BindingsActivator.java which registers multiple provider factories under the same key: PojoBinding.class.

I have a fix and will check it in soon.

Thanks,
Raymond

> CastCastException is thrown when both JSONRPC and EJBBinding are on the classpath
> ---------------------------------------------------------------------------------
>
>                 Key: TUSCANY-1435
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1435
>             Project: Tuscany
>          Issue Type: Bug
>    Affects Versions: Java-SCA-0.91, Java-SCA-Next
>            Reporter: Raymond Feng
>            Priority: Critical
>         Attachments: store.zip
>
>
> <composite 	xmlns="http://www.osoa.org/xmlns/sca/1.0"
> 			xmlns:s="http://store"
> 			name="store">
>     <component name="Catalog">
>     	<implementation.java class="services.CatalogImpl"/>
> 		<service name="Catalog">
>     			<binding.jsonrpc />	
> 		</service>    	
>     </component>
> </composite>
> launch code lools like follows
> package launch;
> import org.apache.tuscany.sca.host.embedded.SCADomain;
> public class Launch {
>     public static void main(String[] args) throws Exception {
>     	System.out.println("Starting ...");
>         SCADomain scaDomain = SCADomain.newInstance("store.composite");
>         System.out.println("store.composite ready for big business !!!");
>         System.out.println();
>     }
> }
> seeing the following in the console
> Starting ...
> Exception in thread "main" org.osoa.sca.ServiceRuntimeException: org.osoa.sca.ServiceRuntimeException: org.apache.tuscany.sca.core.runtime.ActivationException: java.lang.ClassCastException: org.apache.tuscany.sca.binding.jsonrpc.JSONRPCBinding incompatible with org.apache.tuscany.sca.binding.ejb.EJBBinding
> 	at org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.java:263)
> 	at org.apache.tuscany.sca.host.embedded.SCADomain.newInstance(SCADomain.java:68)
> 	at launch.Launch.main(Launch.java:9)
> Caused by: org.osoa.sca.ServiceRuntimeException: org.apache.tuscany.sca.core.runtime.ActivationException: java.lang.ClassCastException: org.apache.tuscany.sca.binding.jsonrpc.JSONRPCBinding incompatible with org.apache.tuscany.sca.binding.ejb.EJBBinding
> 	at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init>(DefaultSCADomain.java:148)
> 	at org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.java:229)
> 	... 2 more
> Caused by: org.apache.tuscany.sca.core.runtime.ActivationException: java.lang.ClassCastException: org.apache.tuscany.sca.binding.jsonrpc.JSONRPCBinding incompatible with org.apache.tuscany.sca.binding.ejb.EJBBinding
> 	at org.apache.tuscany.sca.core.runtime.CompositeActivatorImpl.activate(CompositeActivatorImpl.java:602)
> 	at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init>(DefaultSCADomain.java:145)
> 	... 3 more
> Caused by: java.lang.ClassCastException: org.apache.tuscany.sca.binding.jsonrpc.JSONRPCBinding incompatible with org.apache.tuscany.sca.binding.ejb.EJBBinding
> 	at org.apache.tuscany.sca.binding.ejb.EJBBindingActivator.createService(EJBBindingActivator.java:34)
> 	at org.apache.tuscany.sca.spi.impl.BindingsActivator$1$2.<init>(BindingsActivator.java:120)
> 	at org.apache.tuscany.sca.spi.impl.BindingsActivator$1.createServiceBindingProvider(BindingsActivator.java:119)
> 	at org.apache.tuscany.sca.core.runtime.CompositeActivatorImpl.configureComposite(CompositeActivatorImpl.java:111)
> 	at org.apache.tuscany.sca.core.runtime.CompositeActivatorImpl.activate(CompositeActivatorImpl.java:599)
> 	... 4 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