Exceptions appears in my first SCA composite application [message #1233809] |
Mon, 20 January 2014 14:40 |
Mohamed Lamine Messages: 1 Registered: April 2011 |
Junior Member |
|
|
I'm trying to create my first SCA composite application using Tuscany implementation.
I created a new project using an SCA composite named Restaurant, which is provided by SCA plugins of eclipse. (details about the example are here [0])
I add to my project the necessary libraries: " to apache-tuscany-sca-1.6" " and "tuscany-sca-2.0" to solve compilation errors.
Now, when I run this client program as java application to test the application:
public static void main(String[] args) throws Exception {
SCADomain scaDomain = SCADomain.newInstance("Restaurant.composite");
// scaDomain.
RestaurantService restaurantService = scaDomain.getService(
RestaurantService.class, "RestaurantServiceComponent");
Menu[] menus = restaurantService.getMenus();
System.out.println("--- Menu ---");
for (Menu m : menus) {
System.out.println("- " + m.printMenu());
}
System.out.println();
Menu menu = menus[3];
System.out.println("My choice: " + menu.printMenu());
System.out.println();
double price = restaurantService.getBill(menu);
System.out.println("Price (" + menu.printMenu() + "): " + price);
scaDomain.close();
}
I have this exceptions :
20 janv. 2014 15:10:26 org.apache.tuscany.sca.node.impl.NodeImpl <init>
INFO: Creating node: Restaurant.composite
20 janv. 2014 15:10:26 org.apache.tuscany.sca.node.impl.RuntimeBootStrapper startModules
ATTENTION: Exception starting module org.apache.tuscany.sca.implementation.java.impl.JavaImplementationActivator :java.lang.reflect.InvocationTargetException
20 janv. 2014 15:10:26 org.apache.tuscany.sca.node.impl.RuntimeBootStrapper startModules
ATTENTION: Exception starting module org.apache.tuscany.sca.client.impl.SCAClientModuleActivator :null
20 janv. 2014 15:10:26 org.apache.tuscany.sca.node.impl.RuntimeBootStrapper startModules
ATTENTION: Exception starting module org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator :java.lang.reflect.InvocationTargetException
20 janv. 2014 15:10:26 org.apache.tuscany.sca.node.impl.RuntimeBootStrapper startModules
ATTENTION: Exception starting module org.apache.tuscany.sca.core.databinding.module.DataBindingModuleActivator :java.lang.reflect.InvocationTargetException
Exception in thread "main" org.osoa.sca.ServiceRuntimeException: java.lang.IllegalArgumentException: java.lang.reflect.InvocationTargetException
at org.apache.tuscany.sca.node.impl.NodeImpl.<init>(NodeImpl.java:204)
at org.apache.tuscany.sca.node.impl.NodeFactoryImpl.createSCANodeFromClassLoader(NodeFactoryImpl.java:37)
at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.init(DefaultSCADomain.java:178)
at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init>(DefaultSCADomain.java:100)
at org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.java:182)
at org.apache.tuscany.sca.host.embedded.SCADomain.newInstance(SCADomain.java:63)
at test.Client.main(Client.java:25)
Caused by: java.lang.IllegalArgumentException: java.lang.reflect.InvocationTargetException
at org.apache.tuscany.sca.contribution.DefaultModelFactoryExtensionPoint.getFactory(DefaultModelFactoryExtensionPoint.java:112)
at org.apache.tuscany.sca.node.impl.RuntimeBuilder.createCompositeActivator(RuntimeBuilder.java:123)
at org.apache.tuscany.sca.node.impl.RuntimeBootStrapper.start(RuntimeBootStrapper.java:182)
at org.apache.tuscany.sca.node.impl.NodeImpl.initRuntime(NodeImpl.java:460)
at org.apache.tuscany.sca.node.impl.NodeImpl.<init>(NodeImpl.java:197)
... 6 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.apache.tuscany.sca.contribution.DefaultModelFactoryExtensionPoint.getFactory(DefaultModelFactoryExtensionPoint.java:100)
... 10 more
Caused by: java.lang.IllegalArgumentException: java.lang.InstantiationException: org.apache.tuscany.sca.core.databinding.processor.DataBindingJavaInterfaceProcessor
at org.apache.tuscany.sca.interfacedef.java.DefaultJavaInterfaceFactory.loadVisitors(DefaultJavaInterfaceFactory.java:87)
at org.apache.tuscany.sca.interfacedef.java.DefaultJavaInterfaceFactory.getInterfaceVisitors(DefaultJavaInterfaceFactory.java:51)
at org.apache.tuscany.sca.interfacedef.java.impl.JavaInterfaceIntrospectorImpl.<init>(JavaInterfaceIntrospectorImpl.java:70)
at org.apache.tuscany.sca.interfacedef.java.impl.JavaInterfaceFactoryImpl.<init>(JavaInterfaceFactoryImpl.java:45)
at org.apache.tuscany.sca.interfacedef.java.DefaultJavaInterfaceFactory.<init>(DefaultJavaInterfaceFactory.java:42)
... 15 more
Caused by: java.lang.InstantiationException: org.apache.tuscany.sca.core.databinding.processor.DataBindingJavaInterfaceProcessor
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at org.apache.tuscany.sca.interfacedef.java.DefaultJavaInterfaceFactory.loadVisitors(DefaultJavaInterfaceFactory.java:83)
... 19 more
Can you help me to solve this problem Please.
Thanks
[0] http://wiki.eclipse.org/STP/SCA_Component/SCA_Java_Run_and_Debug_Tuscany
Best regards
|
|
|
Powered by
FUDForum. Page generated in 0.03422 seconds