Last time I checked, the M2 plugin didn't handle multi-projects
correctly, so I did the equivalent work manually.

On 3/20/06, Russell, Paul <[EMAIL PROTECTED]> wrote:
> Howard,
>
> Not an expert, and can't post directly to the list from this account, but it
> looks like something is trying to register the same MBean (or at least a
> bean with the same name) with JMX twice. Out of interest, what build target
> are you using here? You've not got a clover run executing alongside a normal
> test run or something have you?
>
> Also, I take it from your statement about updating .classpath that you're
> not using the M2 eclipse plug-in? Is that a permanent state of affairs, or
> just because you've not got around to it yet?
>
> Cheers,
>
>
> Paul
> --
> Paul Russell
> Technical Architect - GPNWOM Programme
> Legal & General Assurance Society Ltd
> [EMAIL PROTECTED] | 07810 822842
>
> -----Original Message-----
> From: Howard Lewis Ship [mailto:[EMAIL PROTECTED]
> Sent: 19 March 2006 18:16
> To: [email protected]
> Subject: [Maybe Spam] Conversion from Ant to Maven 2
>
> It's coming along very nicely; I'll have stuff checked in shortly.
>
> For the moment, I'm having one problem, in the JMX area, that I'm not
> familiar with.
>
> Things are working well inside Eclipse, but the Maven build fails on
> just one test for JMX:
>
> Anyone have any clues on this?  I'm at a loss ... some aspect of
> runtime code, classpath, lifecycle, or something must differ between
> Eclipse build and Maven build.
>
> I'm off to update the .classpath to match what Maven uses, see if that
> helps.
>
> Here's the error report:
>
> ----------------------------------------------------------------------------
> ---
> Battery: org.apache.hivemind.management.TestPerformanceMonitorFactory
> ----------------------------------------------------------------------------
> ---
> Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.57 sec
>
> testIntegration(org.apache.hivemind.management.TestPerformanceMonitorFactory
> )
>  Time elapsed: 0.57 sec  <<< ERROR!
>
> [ stdout ] ---------------------------------------------------------------
>
>
>
> [ stderr ] ---------------------------------------------------------------
>
>
>
> [ stacktrace ] -----------------------------------------------------------
>
> org.apache.hivemind.ApplicationRuntimeException: Unable to construct
> service test.management.Calculator: Service interceptor factory
> hivemind.management.PerformanceMonitorFactory failed to create
> org.apache.hivemind.management.Calculator interceptor for service
> test.management.Calculator :
> hivemind:module=test.management,type=service,id=Calculator,decorator=Perform
> anceCollector
>         at
> org.apache.hivemind.impl.servicemodel.AbstractServiceModelImpl.constructNewS
> erviceImplementation(AbstractServiceModelImpl.java:166)
>         at
> org.apache.hivemind.impl.servicemodel.AbstractServiceModelImpl.constructServ
> iceImplementation(AbstractServiceModelImpl.java:140)
>         at
> org.apache.hivemind.impl.servicemodel.SingletonServiceModel.getActualService
> Implementation(SingletonServiceModel.java:69)
>         at $Calculator_10a13af95a1._service($Calculator_10a13af95a1.java)
>         at $Calculator_10a13af95a1.getSum($Calculator_10a13af95a1.java)
>         at $Calculator_10a13af95a0.getSum($Calculator_10a13af95a0.java)
>         at
> org.apache.hivemind.management.TestPerformanceMonitorFactory.testIntegration
> (TestPerformanceMonitorFactory.java:41)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
> )
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> .java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at junit.framework.TestCase.runTest(TestCase.java:154)
>         at junit.framework.TestCase.runBare(TestCase.java:127)
>         at junit.framework.TestResult$1.protect(TestResult.java:106)
>         at junit.framework.TestResult.runProtected(TestResult.java:124)
>         at junit.framework.TestResult.run(TestResult.java:109)
>         at junit.framework.TestCase.run(TestCase.java:118)
>         at junit.framework.TestSuite.runTest(TestSuite.java:208)
>         at junit.framework.TestSuite.run(TestSuite.java:203)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
> )
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> .java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at
> org.apache.maven.surefire.battery.JUnitBattery.executeJUnit(JUnitBattery.jav
> a:242)
>         at
> org.apache.maven.surefire.battery.JUnitBattery.execute(JUnitBattery.java:216
> )
>         at
> org.apache.maven.surefire.Surefire.executeBattery(Surefire.java:215)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:163)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:87)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
> )
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> .java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at
> org.apache.maven.surefire.SurefireBooter.runTestsInProcess(SurefireBooter.ja
> va:285)
>         at
> org.apache.maven.surefire.SurefireBooter.run(SurefireBooter.java:201)
>         at
> org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:366)
>         at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManage
> r.java:415)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLife
> cycleExecutor.java:531)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
> (DefaultLifecycleExecutor.java:472)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecycle(Def
> aultLifecycleExecutor.java:859)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(DefaultLif
> ecycleExecutor.java:726)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLife
> cycleExecutor.java:502)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
> (DefaultLifecycleExecutor.java:472)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifec
> ycleExecutor.java:451)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFail
> ures(DefaultLifecycleExecutor.java:303)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(Defa
> ultLifecycleExecutor.java:270)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycle
> Executor.java:139)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
> )
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> .java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at
> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at
> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.hivemind.ApplicationRuntimeException: Service
> interceptor factory hivemind.management.PerformanceMonitorFactory
> failed to create org.apache.hivemind.management.Calculator interceptor
> for service test.management.Calculator :
> hivemind:module=test.management,type=service,id=Calculator,decorator=Perform
> anceCollector
>         at
> org.apache.hivemind.management.impl.PerformanceMonitorFactory.createIntercep
> tor(PerformanceMonitorFactory.java:139)
>         at
> $ServiceInterceptorFactory_10a13af95a3.createInterceptor($ServiceInterceptor
> Factory_10a13af95a3.java)
>         at
> $ServiceInterceptorFactory_10a13af95a2.createInterceptor($ServiceInterceptor
> Factory_10a13af95a2.java)
>         at
> org.apache.hivemind.impl.ServiceInterceptorContributionImpl.createIntercepto
> r(ServiceInterceptorContributionImpl.java:95)
>         at
> org.apache.hivemind.impl.InterceptorStackImpl.process(InterceptorStackImpl.j
> ava:116)
>         at
> org.apache.hivemind.impl.servicemodel.AbstractServiceModelImpl.addIntercepto
> rs(AbstractServiceModelImpl.java:85)
>         at
> org.apache.hivemind.impl.servicemodel.AbstractServiceModelImpl.constructNewS
> erviceImplementation(AbstractServiceModelImpl.java:160)
>         ... 56 more
> Caused by: javax.management.InstanceAlreadyExistsException:
> hivemind:module=test.management,type=service,id=Calculator,decorator=Perform
> anceCollector
>         at
> com.sun.jmx.mbeanserver.RepositorySupport.addMBean(RepositorySupport.java:45
> 2)
>         at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(Def
> aultMBeanServerInterceptor.java:1410)
>         at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(Default
> MBeanServerInterceptor.java:936)
>         at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultM
> BeanServerInterceptor.java:337)
>         at
> com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:497
> )
>         at
> $MBeanServer_10a13af95af.registerMBean($MBeanServer_10a13af95af.java)
>         at
> $MBeanServer_10a13af95ae.registerMBean($MBeanServer_10a13af95ae.java)
>         at
> org.apache.hivemind.management.impl.MBeanRegistryImpl.registerMBean(MBeanReg
> istryImpl.java:185)
>         at
> $MBeanRegistry_10a13af95a5.registerMBean($MBeanRegistry_10a13af95a5.java)
>         at
> $MBeanRegistry_10a13af95a4.registerMBean($MBeanRegistry_10a13af95a4.java)
>         at
> org.apache.hivemind.management.impl.PerformanceMonitorFactory.createMBean(Pe
> rformanceMonitorFactory.java:154)
>         at
> org.apache.hivemind.management.impl.PerformanceMonitorFactory.createIntercep
> tor(PerformanceMonitorFactory.java:127)
>         ... 62 more
>
>
>
>
> --
> Howard M. Lewis Ship
> Independent J2EE / Open-Source Java Consultant
> Creator, Jakarta Tapestry
> Creator, Jakarta HiveMind
>
> Professional Tapestry training, mentoring, support
> and project work.  http://howardlewisship.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> This e-mail (and any attachments) may contain privileged and/or confidential 
> information. If you are not the intended recipient please do not disclose, 
> copy, distribute, disseminate or take any action in reliance on it. If you 
> have received this message in error please reply and tell us and then delete 
> it. Should you wish to communicate with us by e-mail we cannot guarantee the 
> security of any data outside our own computer systems. For the protection of 
> Legal & General's systems and staff, incoming emails will be automatically 
> scanned.
>
> Any information contained in this message may be subject to applicable terms 
> and conditions and must not be construed as giving investment advice within 
> or outside the United Kingdom.
>
> The following companies are subsidiary companies of the Legal & General Group 
> Plc which are authorised and regulated by the Financial Services Authority 
> for advising and arranging the products shown: Legal & General Partnership 
> Services Limited (insurance and mortgages), Legal & General Insurance Limited 
> (insurance), Legal & General Assurance Society Limited
> (life assurance, pensions and investments), Legal & General Unit Trust 
> Managers Limited and Legal & General Portfolio Management Services Limited 
> (investments).
>
> They are registered in England under numbers shown.
> The registered office is Temple Court, 11 Queen Victoria Street, London EC4N 
> 4TP.
>
> Legal & General Partnership Services Limited: 5045000 Legal & General 
> Assurance Society Limited: 166055 Legal & General (Unit Trust Managers) 
> Limited: 1009418 Legal & General (Portfolio Management Services) Limited: 
> 2457525 Legal & General Insurance Limited: 423930
>
> They are registered with the Financial Services Authority under numbers 
> shown. You can check this at www.fsa.gov.uk/register
>
> Legal & General Partnership Services Limited: 300792 Legal & General 
> Assurance Society Limited: 117659 Legal & General (Unit Trust Managers) 
> Limited: 119273 Legal & General (Portfolio Management Services) Limited: 
> 146786 Legal & General Insurance Limited: 202050
>
>


--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to