Thanks for your prompt reply Simon! :) I am trying your suggestions.
On Fri, Jul 2, 2010 at 10:57 PM, Simon Nash <n...@apache.org> wrote: > Some suggestions: > > 1. The code that creates the contribution isn't correct. The second > argument shouldn't be a null string. It should be the location of > the contents of the contribution. > > 2. It looks like the NPE happens because the custom classloader hasn't > been set as the thread context classloader before calling the > createSCANode() method. > > Simon > > > Blue Diamond wrote: > >> 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 <n...@apache.org> 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 >>>> <ramanjaneyulu.malise...@ca.com <mailto:ramanjaneyulu.malise...@ca.com >>>> >> >>>> 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:mike.edwards.inglen...@gmail.com >>>> <mailto:mike.edwards.inglen...@gmail.com>] >>>> Sent: Saturday, June 12, 2010 11:48 AM >>>> To: user@tuscany.apache.org <mailto:user@tuscany.apache.org> >>>> 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. >>>> >>>> >>>> >>> >> >> >