On Thu, May 22, 2008 at 8:35 AM, Rajini Sivaram <
[EMAIL PROTECTED]> wrote:

> Simon,
>
> Do we actually expect to always find a monitor implementation on the
> classpath? If so, I think we should throw an exception earlier on if no
> monitor implementation was found, rather than a NullPointerException
> masking
> the original exception when something does go wrong. But shouldn't we
> actually tolerate the absence of a monitor implementation, and use monitors
> with checks for null?


It was the intention that it should run quite happily without a monitor.
What is happening is that this code path is not covered by code that fluffs
up a default monitor in the absence of one being found on the classpath.


>
> monitor-logging is not a dependency on host-embedded at the moment.
> itest/contribution-classloader is the only test that fails because it is
> the
> only one which uses the exception code path.
>

My mistake. For some reason I had it in my mind that I had added a
dependency at some point. Maybe it was just something I did locally at some
point.


>
> On 5/22/08, Simon Laws <[EMAIL PROTECTED]> wrote:
> >
> > On Wed, May 21, 2008 at 9:33 PM, Simon Nash <[EMAIL PROTECTED]> wrote:
> >
> > > I just did a clean checkout and full build.  It failed in
> > > itest/contribution-classloader with the following stack trace.
> > >
> > > The problem is caused by a null value in the "monitor" variable
> > > on line 124 of JavaInterfaceProcessor.  This does not seem to
> > > happen for other tests.  Any ideas?
> > >
> > >  Simon
> > >
> > > Running org.apache.tuscany.sca.test.contribution.ContributionTestCase
> > > Created supplychain.customer.JavaCustomerComponentImpl using: SCA
> > > contribution c
> > > lassloader for :
> > > file:/F:/tuscany70/sca/itest/contribution-classloader/contribut
> > > ion-test/target/contributions/Customer.jar
> > > Created supplychain.retailer.JavaRetailerComponentImpl using: SCA
> > > contribution c
> > > lassloader for :
> > > file:/F:/tuscany70/sca/itest/contribution-classloader/contribut
> > > ion-test/target/contributions/Retailer.jar
> > > Created supplychain.warehouse.JavaWarehouseComponentImpl using: SCA
> > > contribution
> > >  classloader for :
> > > file:/F:/tuscany70/sca/itest/contribution-classloader/contrib
> > > ution-test/target/contributions/Warehouse.jar
> > > Created supplychain.shipper.JavaShipperComponentImpl using: SCA
> > > contribution cla
> > > ssloader for :
> > > file:/F:/tuscany70/sca/itest/contribution-classloader/contributio
> > > n-test/target/contributions/Shipper.jar
> > > Work thread Thread[Thread-2,5,main] - Order, submitted, fulfilled,
> > shipped
> > > Created supplychain.customer.JavaCustomerComponentImpl using:
> > > java.net.URLClassL
> > > [EMAIL PROTECTED]
> > > Created supplychain.retailer.JavaRetailerComponentImpl using:
> > > java.net.URLClassL
> > > [EMAIL PROTECTED]
> > > Created supplychain.warehouse.JavaWarehouseComponentImpl using:
> > > java.net.URLClas
> > > [EMAIL PROTECTED]
> > > Created supplychain.shipper.JavaShipperComponentImpl using:
> > > java.net.URLClassLoa
> > > [EMAIL PROTECTED]
> > > Work thread Thread[Thread-4,5,main] - Order, submitted, fulfilled,
> > shipped
> > > Created supplychain.illegal.JavaCustomerComponentImpl using: SCA
> > > contribution cl
> > > assloader for :
> > > file:/F:/tuscany70/sca/itest/contribution-classloader/contributi
> > > on-test/target/contributions/IllegalCustomer.jar
> > > Created supplychain.retailer.JavaRetailerComponentImpl using: SCA
> > > contribution c
> > > lassloader for :
> > > file:/F:/tuscany70/sca/itest/contribution-classloader/contribut
> > > ion-test/target/contributions/Retailer.jar
> > > Created a retailer from Customer
> > > supplychain.retailer.JavaRetailerComponentImpl@
> > > 3fac1e22
> > > Created supplychain.customer.JavaCustomerComponentImpl using: SCA
> > > contribution c
> > > lassloader for :
> > > file:/F:/tuscany70/sca/itest/contribution-classloader/contribut
> > > ion-test/target/contributions/CompleteSupplyChain.jar
> > > Created supplychain.retailer.JavaRetailerComponentImpl using: SCA
> > > contribution c
> > > lassloader for :
> > > file:/F:/tuscany70/sca/itest/contribution-classloader/contribut
> > > ion-test/target/contributions/CompleteSupplyChain.jar
> > > Created supplychain.warehouse.JavaWarehouseComponentImpl using: SCA
> > > contribution
> > >  classloader for :
> > > file:/F:/tuscany70/sca/itest/contribution-classloader/contrib
> > > ution-test/target/contributions/CompleteSupplyChain.jar
> > > Created supplychain.shipper.JavaShipperComponentImpl using: SCA
> > > contribution cla
> > > ssloader for :
> > > file:/F:/tuscany70/sca/itest/contribution-classloader/contributio
> > > n-test/target/contributions/CompleteSupplyChain.jar
> > > Work thread Thread[Thread-6,5,main] - Order, submitted, fulfilled,
> > shipped
> > > Created supplychain.customer.JavaCustomerComponentImpl using: SCA
> > > contribution c
> > > lassloader for :
> > > file:/F:/tuscany70/sca/itest/contribution-classloader/contribut
> > > ion-test/target/contributions/CustomerImpl.jar
> > > Created supplychain.retailer.JavaRetailerComponentImpl using: SCA
> > > contribution c
> > > lassloader for :
> > > file:/F:/tuscany70/sca/itest/contribution-classloader/contribut
> > > ion-test/target/contributions/Retailer.jar
> > > Created supplychain.warehouse.JavaWarehouseComponentImpl using: SCA
> > > contribution
> > >  classloader for :
> > > file:/F:/tuscany70/sca/itest/contribution-classloader/contrib
> > > ution-test/target/contributions/Warehouse.jar
> > > Created supplychain.shipper.JavaShipperComponentImpl using: SCA
> > > contribution cla
> > > ssloader for :
> > > file:/F:/tuscany70/sca/itest/contribution-classloader/contributio
> > > n-test/target/contributions/Shipper.jar
> > > Work thread Thread[Thread-8,5,main] - Order, submitted, fulfilled,
> > shipped
> > > Tests run: 9, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 3.581
> sec
> > > <<< FA
> > > ILURE!
> > >
> > >
> >
> testIllegalStaticClassLoading1(org.apache.tuscany.sca.test.contribution.Contribu
> > > tionTestCase)  Time elapsed: 0.219 sec  <<< ERROR!
> > > java.lang.NullPointerException
> > >        at
> > > org.apache.tuscany.sca.interfacedef.java.xml.JavaInterfaceProcessor.r
> > > esolveJavaInterface(JavaInterfaceProcessor.java:124)
> > >        at
> > > org.apache.tuscany.sca.interfacedef.java.xml.JavaInterfaceProcessor.r
> > > esolve(JavaInterfaceProcessor.java:148)
> > >        at
> > > org.apache.tuscany.sca.interfacedef.java.xml.JavaInterfaceProcessor.r
> > > esolve(JavaInterfaceProcessor.java:50)
> > >        at
> > > org.apache.tuscany.sca.contribution.processor.DefaultStAXArtifactProc
> > >
> > >
> >
> essorExtensionPoint$LazyStAXArtifactProcessor.resolve(DefaultStAXArtifactProcess
> > > orExtensionPoint.java:320)
> > >        at
> > > org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactP
> > > rocessor.resolve(ExtensibleStAXArtifactProcessor.java:156)
> > >        at
> > > org.apache.tuscany.sca.assembly.xml.BaseAssemblyProcessor.resolveCont
> > > racts(BaseAssemblyProcessor.java:405)
> > >        at
> > > org.apache.tuscany.sca.assembly.xml.BaseAssemblyProcessor.resolveCont
> > > racts(BaseAssemblyProcessor.java:364)
> > >        at
> > > org.apache.tuscany.sca.assembly.xml.ComponentTypeProcessor.resolve(Co
> > > mponentTypeProcessor.java:356)
> > >        at
> > > org.apache.tuscany.sca.assembly.xml.ComponentTypeProcessor.resolve(Co
> > > mponentTypeProcessor.java:59)
> > >        at
> > > org.apache.tuscany.sca.contribution.processor.DefaultStAXArtifactProc
> > >
> > >
> >
> essorExtensionPoint$LazyStAXArtifactProcessor.resolve(DefaultStAXArtifactProcess
> > > orExtensionPoint.java:320)
> > >        at
> > > org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactP
> > > rocessor.resolve(ExtensibleStAXArtifactProcessor.java:156)
> > >        at
> > > org.apache.tuscany.sca.assembly.xml.ComponentTypeDocumentProcessor.re
> > > solve(ComponentTypeDocumentProcessor.java:133)
> > >        at
> > > org.apache.tuscany.sca.assembly.xml.ComponentTypeDocumentProcessor.re
> > > solve(ComponentTypeDocumentProcessor.java:47)
> > >        at
> > > org.apache.tuscany.sca.contribution.processor.DefaultURLArtifactProce
> > >
> > >
> >
> ssorExtensionPoint$LazyURLArtifactProcessor.resolve(DefaultURLArtifactProcessorE
> > > xtensionPoint.java:208)
> > >        at
> > > org.apache.tuscany.sca.contribution.processor.ExtensibleURLArtifactPr
> > > ocessor.resolve(ExtensibleURLArtifactProcessor.java:106)
> > >        at
> > > org.apache.tuscany.sca.contribution.service.impl.ContributionServiceI
> > > mpl.processResolvePhase(ContributionServiceImpl.java:519)
> > >        at
> > > org.apache.tuscany.sca.contribution.service.impl.ContributionServiceI
> > > mpl.addContribution(ContributionServiceImpl.java:394)
> > >        at
> > > org.apache.tuscany.sca.contribution.service.impl.ContributionServiceI
> > > mpl.contribute(ContributionServiceImpl.java:187)
> > >        at
> > > org.apache.tuscany.sca.test.contribution.SupplyChain.addContributions
> > > (SupplyChain.java:139)
> > >        at
> > > org.apache.tuscany.sca.test.contribution.SupplyChain.setUp(SupplyChai
> > > n.java:111)
> > >        at
> > > org.apache.tuscany.sca.test.contribution.ContributionTestCase.testIll
> > > egalStaticClassLoading1(ContributionTestCase.java:300)
> > >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > >        at
> > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> > > java:39)
> > >        at
> > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> > > sorImpl.java:25)
> > >        at java.lang.reflect.Method.invoke(Method.java:585)
> > >        at
> > > org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMet
> > > hodRunner.java:99)
> > >        at
> > > org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethod
> > > Runner.java:81)
> > >        at
> > > org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAn
> > > dAfterRunner.java:34)
> > >        at
> > > org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunne
> > > r.java:75)
> > >        at
> > > org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java
> > > :45)
> > >        at
> > > org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(Te
> > > stClassMethodsRunner.java:75)
> > >        at
> > > org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethod
> > > sRunner.java:36)
> > >        at
> > > org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClass
> > > Runner.java:42)
> > >        at
> > > org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAn
> > > dAfterRunner.java:34)
> > >        at
> > > org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:5
> > > 2)
> > >        at
> > > org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.
> > > java:62)
> > >        at
> > > org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTes
> > > tSet(AbstractDirectoryTestSuite.java:138)
> > >        at
> > > org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(Ab
> > > stractDirectoryTestSuite.java:125)
> > >        at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
> > >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > >        at
> > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> > > java:39)
> > >        at
> > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> > > sorImpl.java:25)
> > >        at java.lang.reflect.Method.invoke(Method.java:585)
> > >        at
> > > org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(Su
> > > refireBooter.java:308)
> > >        at
> > > org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.j
> > > ava:879)
> > >
> > >
> > > Results :
> > >
> > > Tests in error:
> > >
> >
> > >
>  
> testIllegalStaticClassLoading1(org.apache.tuscany.sca.test.contribution.Contri
> > > butionTestCase)
> > >
> > > Tests run: 9, Failures: 0, Errors: 1, Skipped: 0
> > >
> > > [INFO]
> > >
> ------------------------------------------------------------------------
> > > [ERROR] BUILD FAILURE
> > > [INFO]
> > >
> ------------------------------------------------------------------------
> > > [INFO] There are test failures.
> > >
> > >
> > I've go that too now and It's related to a change I made to trap a class
> > not
> > found error. Apologies! I've checked in a fix which seems to make things
> > better but it's a little strange as I'm adding a dependency to the test
> pom
> > which I believe should come in transitively. Anyhow I'll do another
> update
> > now and a full build and I'll investigate further.
> >
> > Simon
> >
>
>
>
> --
> Thank you...
>
> Regards,
>
> Rajini
>

Reply via email to