Thanks a lot Simon.
Now I am trying to start my SCA based app module using a different
classloader which is based on a URLClassloader. All my jars & tuscany
jars & its depedent jars are in one separated folder.
When I am trying to create an SCANode, I get the following exception:
Caused by: org.osoa.sca.ServiceRuntimeException: java.lang.NullPointerException
at org.apache.tuscany.sca.node.impl.NodeImpl.<init>(NodeImpl.java:452)
at
org.apache.tuscany.sca.node.impl.NodeFactoryImpl.createSCANode(NodeFactoryImpl.java:52)
at
com.ca.ucf.remote.sca.bind.tuscany.TuscanySCANodeWrapperFactory.getSCANodeWrapper(TuscanySCANodeWrapperFactory.java:49)
at
com.ca.ucf.remote.sca.util.SCANodeUtil.buildClientSCANode(SCANodeUtil.java:147)
... 7 more
Caused by: java.lang.NullPointerException
at
org.apache.tuscany.sca.node.impl.RuntimeBootStrapper.start(RuntimeBootStrapper.java:116)
at
org.apache.tuscany.sca.node.impl.NodeImpl.initRuntime(NodeImpl.java:473)
at org.apache.tuscany.sca.node.impl.NodeImpl.<init>(NodeImpl.java:412)
... 10 more
There a NPE @ line 116 in RuntimeBootStrapper [[[ code shown below ]]]]:
[[[[[[[[[[[[
// Get work scheduler
workScheduler = utilities.getUtility(WorkScheduler.class);
]]]]]]]]]]]]
my SCANode creation logic is as follows:
String contribName = "myservice-contribution.xml";
SCAContribution contrib = new SCAContribution(contribName, "");
// create SCA Node
SCANode node =
SCANodeFactory.newInstance().createSCANode(compositeName,
compositeXml,
contrib);
Any guesses what the problem could be? I am badly in need of this
solution. I just need an SCANode to create successfully & everything
else will work for me. Please help.
Thanks & Regards,
Anil
On 7/2/10, Simon Nash <[email protected]> wrote:
> Blue Diamond wrote:
>> Hi,
>>
>> I have a doubt regarding the way it works with NodeLauncher.
>>
>> Say I have got all tuscany jars & my services loaded using a different
>> classloader thru NodeLauncher. But I have a requirement that I need to
>> inject my application objects into these SCA services. Will this work?
>>
>> My objects are loaded by my classloader & when I inject it into SCA
>> services which are loaded by a different classloader, the assignment
>> will fail with a ClassCastException I think.
>>
>> Or is there something Tuscany does to make this work? Any work arounds?
>>
>> Thanks & Regards,
>> Anil
>>
> I think this injection would work OK because the application classloader
> would be the parent of the Tuscany runtime classloader, making the
> application classes visible to the Tuscany runtime but not vice versa.
> Do you have a test case that shows a problem when you try to do this?
>
> Simon
>>
>>
>> On Mon, Jun 14, 2010 at 7:57 PM, Malisetti, Ramanjaneyulu
>> <[email protected] <mailto:[email protected]>>
>> wrote:
>>
>> Mike,
>> We are using Tuscany 1.6. we could not use Tuscany 2.0 as it
>> doesn't have all features we are looking for.
>>
>> Regards
>> Raman
>>
>> -----Original Message-----
>> From: Mike Edwards [mailto:[email protected]
>> <mailto:[email protected]>]
>> Sent: Saturday, June 12, 2010 11:48 AM
>> To: [email protected] <mailto:[email protected]>
>> Subject: Re: Does SCA 1.6 supports Axis 1.5
>>
>> Malisetti, Ramanjaneyulu wrote:
>> > Thanks for the information.
>> >
>> >
>> > We are not using Axis-1.5.1 directly. But, one of the component
>> that
>> is going to run along with the modules developed on SCA is using. They
>> don't have any proper reason other than they can't change it now from
>> 1.5.1 to 1.4.1 because that component is already shipped to customers.
>> >
>> > So, it is a circular dependency for us.
>> >
>> >
>> > Do you have any suggestion to come out this flux.
>> >
>> > Regards
>> > Raman
>> Raman,
>>
>> Have you considered using Tuscany running under OSGi?
>>
>> OSGi is able to handle the use of different versions of the same
>> packages in one application.
>>
>> I routinely do my work under OSGi, using the node-launcher-equinox
>> module to start Tuscany, although
>> this is all done on Tuscany 2.x rather than 1.6.
>>
>>
>> Yours, Mike.
>>
>>
>
>