Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Why is my plan being stopped?
Why is my plan being stopped? [message #725946] Fri, 16 September 2011 09:03 Go to next message
Barbara Rosi-Schwartz is currently offline Barbara Rosi-Schwartz
Messages: 448
Registered: July 2009
Senior Member
Hi everyone.

One last problem for this week... Razz

I am registering a service with the Registry (via Spring DM) and watching it being set on its client bean when the bean is created. However, when I go to use the service a little later, I get the following exception:

Exception in thread "AWT-EventQueue-0" org.springframework.osgi.service.importer.ServiceProxyDestroyedException: service proxy has been destroyed
	at org.springframework.osgi.service.importer.support.internal.aop.ServiceDynamicInterceptor$ServiceLookUpCallback.doWithRetry(ServiceDynamicInterceptor.java:105)
	at org.springframework.osgi.service.importer.support.internal.support.RetryTemplate.execute(RetryTemplate.java:83)
	at org.springframework.osgi.service.importer.support.internal.aop.ServiceDynamicInterceptor.lookupService(ServiceDynamicInterceptor.java:430)
	at org.springframework.osgi.service.importer.support.internal.aop.ServiceDynamicInterceptor.getTarget(ServiceDynamicInterceptor.java:415)
	at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
	at $Proxy137.activateFeatureSet(Unknown Source)
	at com.iggroup.wb.workbench.ui.WorkBenchFrame$WelcomeActionListener.actionPerformed(WorkBenchFrame.java:256)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
	at java.awt.Component.processMouseEvent(Component.java:6289)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
	at java.awt.Component.processEvent(Component.java:6054)
	at java.awt.Container.processEvent(Container.java:2041)
	at java.awt.Component.dispatchEventImpl(Component.java:4652)
	at java.awt.Container.dispatchEventImpl(Container.java:2099)
	at java.awt.Component.dispatchEvent(Component.java:4482)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
	at java.awt.Container.dispatchEventImpl(Container.java:2085)
	at java.awt.Window.dispatchEventImpl(Window.java:2478)
	at java.awt.Component.dispatchEvent(Component.java:4482)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)
	at java.awt.EventQueue.access$000(EventQueue.java:85)
	at java.awt.EventQueue$1.run(EventQueue.java:603)
	at java.awt.EventQueue$1.run(EventQueue.java:601)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
	at java.awt.EventQueue$2.run(EventQueue.java:617)
	at java.awt.EventQueue$2.run(EventQueue.java:615)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)


In looking through the log, I find that the plan I am using has been started but then mysteriously stopped. Here are the relevant lines of the log:

[2011-09-16 09:45:01.197] INFO  start-signalling-1           org.eclipse.virgo.medic.eventlog.default                         DE0005I Started plan 'com.iggroup.wb.workbench.plan' version '0.0.1'. 
[2011-09-16 09:45:01.808] INFO  fs-watcher                   org.eclipse.virgo.medic.eventlog.default                         HD0001I Hot deployer processing 'MODIFIED' event for file 'com.iggroup.wb.workbench.plan'. 
[2011-09-16 09:45:01.808] INFO  fs-watcher                   o.e.virgo.kernel.deployer.hot.HotDeploymentFileSystemListener     Redeploying path 'C:\dev\Virgo\virgo-kernel-3.0.0.RELEASE\pickup\com.iggroup.wb.workbench.plan'. 
[2011-09-16 09:45:01.826] WARN  fs-watcher                   org.eclipse.virgo.medic.eventlog.default                         DE0050W Cannot refresh plan 'com.iggroup.wb.workbench.plan' version '0.0.1' as refresh of plan artifacts is not supported. 
[2011-09-16 09:45:01.828] INFO  fs-watcher                   org.eclipse.virgo.medic.eventlog.default                         DE0010I Stopping plan 'com.iggroup.wb.workbench.plan' version '0.0.1'. 


Any pointers as to why the plan would be stopped? Does it have to do with the refresh attempt not succeeding? And why is the plan marked as MODIFIED and refreshed anyway? Is it something the framework does as a result of the plan being started?

TIA, as always.
B.
Re: Why is my plan being stopped? [message #726049 is a reply to message #725946] Fri, 16 September 2011 13:23 Go to previous messageGo to next message
Dmitry Sklyut is currently offline Dmitry Sklyut
Messages: 272
Registered: January 2010
Senior Member
Can you make sure nothing "touches" the plan file or copies it over again?
Re: Why is my plan being stopped? [message #727046 is a reply to message #726049] Tue, 20 September 2011 09:39 Go to previous messageGo to next message
Barbara Rosi-Schwartz is currently offline Barbara Rosi-Schwartz
Messages: 448
Registered: July 2009
Senior Member
Thanks Dmitry.

I found that, if I switch the plan's "atomic" flag to false, my problem disappears. Is this expected behaviour?
Re: Why is my plan being stopped? [message #727051 is a reply to message #726049] Tue, 20 September 2011 09:39 Go to previous messageGo to next message
Barbara Rosi-Schwartz is currently offline Barbara Rosi-Schwartz
Messages: 448
Registered: July 2009
Senior Member
Thanks Dmitry.

I found that, if I switch the plan's "atomic" flag to false, my problem disappears. Is this expected behaviour?
Re: Why is my plan being stopped? [message #727290 is a reply to message #727046] Tue, 20 September 2011 19:40 Go to previous messageGo to next message
Dmitry Sklyut is currently offline Dmitry Sklyut
Messages: 272
Registered: January 2010
Senior Member
atomic should only drive if bundles within the plan start/stop together. One of the other bundles within your plan could be failing to start causing all plan bundles to stop. Check if all of the bundles within the plan are started and active when atomic = false.
Re: Why is my plan being stopped? [message #727425 is a reply to message #727290] Wed, 21 September 2011 09:25 Go to previous messageGo to next message
Barbara Rosi-Schwartz is currently offline Barbara Rosi-Schwartz
Messages: 448
Registered: July 2009
Senior Member
Well, my "fix" does not seem to work all the time.

I guess my problem is that I am creating a plan file dynamically in the pickup directory, so I first create the file and then I write its contents. Could that be the reason why I trigger the wrong process?

And if that is the case, what is the fix? Just create the file and write the contents in a temp directory and then copy it over in the pickup dir?

Thanks,
B.
Re: Why is my plan being stopped? [message #727577 is a reply to message #727425] Wed, 21 September 2011 14:46 Go to previous messageGo to next message
Dmitry Sklyut is currently offline Dmitry Sklyut
Messages: 272
Registered: January 2010
Senior Member
Barbara,

Yes - you do want to create plan outside of pickup and copy that over.
In pickup there is a directory scanner that is picking up your "new" file while you are still writing to it.

Regards,
Dmitry
Re: Why is my plan being stopped? [message #727969 is a reply to message #727577] Thu, 22 September 2011 10:14 Go to previous message
Barbara Rosi-Schwartz is currently offline Barbara Rosi-Schwartz
Messages: 448
Registered: July 2009
Senior Member
Thanks Dmitri. Done as recommended and it all works quite well, thanks!
Previous Topic:Virgo, Spring & DataNucleus
Next Topic:OSGi Package Hell
Goto Forum:
  


Current Time: Thu Oct 23 13:59:01 GMT 2014

Powered by FUDForum. Page generated in 0.02675 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software