Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Virgo Fails to Start On alternate Invocation
Virgo Fails to Start On alternate Invocation [message #636202] Fri, 29 October 2010 11:47 Go to next message
Raji Abraham is currently offline Raji Abraham
Messages: 13
Registered: October 2010
Junior Member
Here is the scenario:

1. Unzipped fresh copy of virgo-web-server-2.1.0.RC1-incubation.zip.
2. Ran startup.bat from <virgo>\bin. Everything comes up fine.
3. Ran shutdown.bat from <virgo>\bin. Server shuts down fine.
4. Ran startup.bat from <virgo>\bin. Server fails to start with the message shown at the end of this message.
5. Ran startup.bat from <virgo>\bin. Everything comes up fine.
6. Ran shutdown.bat from <virgo>\bin. Server shuts down fine.
7. Ran startup.bat from <virgo>\bin. Server fails to start with the same message.
8. Further invocations repeatedly fail with message indicating 'Destination path already exists.'

If I run with startup -clean, it works all the time.

Environment Details:

JAVA_HOME=C:\java\jdk1.6.0_17
OS: Windows 7 Pro

Attaching zipped dump directory (minus heap.out as its 20M)

**************** Console Error Message *******************

[2010-10-29 09:39:05.770] startup-tracker <KE0001I> Kernel starting.
[2010-10-29 09:39:08.046] startup-tracker <KE0003E> Kernel failed to start. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.eclipse.virgo.kernel.osgi.region.Reg
Manager#0' defined in URL [ bundleentry://31.fwk20698484/META-INF/spring/osgi-framework- context.xml]: Invocation of init method failed; nested exception is java.lang.NullPointerException
at org.springframework.beans.factory.support.AbstractAutowireCa pableBeanFactory.initializeBean(AbstractAutowireCapableBeanF actory.java:1401)
at org.springframework.beans.factory.support.AbstractAutowireCa pableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFac tory.java:512)
at org.springframework.beans.factory.support.AbstractAutowireCa pableBeanFactory.createBean(AbstractAutowireCapableBeanFacto ry.java:450)
at org.springframework.beans.factory.support.AbstractBeanFactor y$1.getObject(AbstractBeanFactory.java:290)
at org.springframework.beans.factory.support.DefaultSingletonBe anRegistry.getSingleton(DefaultSingletonBeanRegistry.java:22 2)
at org.springframework.beans.factory.support.AbstractBeanFactor y.doGetBean(AbstractBeanFactory.java:287)
at org.springframework.beans.factory.support.AbstractBeanFactor y.getBean(AbstractBeanFactory.java:189)
at org.springframework.beans.factory.support.DefaultListableBea nFactory.preInstantiateSingletons(DefaultListableBeanFactory .java:557)
at org.springframework.context.support.AbstractApplicationConte xt.finishBeanFactoryInitialization(AbstractApplicationContex t.java:842)
at org.springframework.osgi.context.support.AbstractDelegatedEx ecutionApplicationContext.access$1600(AbstractDelegatedExecu tionApplicationContext.java:69)
at org.springframework.osgi.context.support.AbstractDelegatedEx ecutionApplicationContext$4.run(AbstractDelegatedExecutionAp plicationContext.java:355)
at org.springframework.osgi.util.internal.PrivilegedUtils.execu teWithCustomTCCL(PrivilegedUtils.java:85)
at org.springframework.osgi.context.support.AbstractDelegatedEx ecutionApplicationContext.completeRefresh(AbstractDelegatedE xecutionApplicationContext.java:320)
at org.springframework.osgi.extender.internal.dependencies.star tup.DependencyWaiterApplicationContextExecutor$CompleteRefre shTask.run(DependencyWaiterApplicationContextExecutor.java:1 32)
at org.eclipse.virgo.kernel.agent.dm.ContextPropagatingTaskExec utor$2.run(ContextPropagatingTaskExecutor.java:95)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Threa dPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo lExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException: null
at org.eclipse.osgi.internal.composite.CompositeImpl.updateSurr ogate(CompositeImpl.java:92)
at org.eclipse.osgi.internal.composite.CompositeImpl.giveExport s(CompositeImpl.java:216)
at org.eclipse.osgi.internal.module.ResolverImpl.checkComposite s(ResolverImpl.java:563)
at org.eclipse.osgi.internal.module.ResolverImpl.resolveBundles 0(ResolverImpl.java:549)
at org.eclipse.osgi.internal.module.ResolverImpl.resolveBundles (ResolverImpl.java:514)
at org.eclipse.osgi.internal.module.ResolverImpl.resolve(Resolv erImpl.java:393)
at org.eclipse.osgi.internal.resolver.StateImpl.resolve(StateIm pl.java:458)
at org.eclipse.osgi.internal.resolver.StateImpl.resolve(StateIm pl.java:523)
at org.eclipse.osgi.framework.internal.core.PackageAdminImpl.do ResolveBundles(PackageAdminImpl.java:238)
at org.eclipse.osgi.framework.internal.core.PackageAdminImpl.re solveBundles(PackageAdminImpl.java:185)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:318)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:284)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:276)
at org.eclipse.virgo.kernel.osgi.region.RegionManager.createAnd PublishUserRegion(RegionManager.java:146)
at org.eclipse.virgo.kernel.osgi.region.RegionManager.start(Reg ionManager.java:137)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.beans.factory.support.AbstractAutowireCa pableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapa bleBeanFactory.java:1529)
at org.springframework.beans.factory.support.AbstractAutowireCa pableBeanFactory.invokeInitMethods(AbstractAutowireCapableBe anFactory.java:1468)
at org.springframework.beans.factory.support.AbstractAutowireCa pableBeanFactory.initializeBean(AbstractAutowireCapableBeanF actory.java:1398)
... 17 common frames omitted

[2010-10-29 09:39:08.046] Thread-3 <AG0000E> Application context creation failure for bundle 'org.eclipse.virgo.kernel.osgi' version '2.1.0.RC1-incubation'. org.springframework.beans.factory.BeanCr
ionException: Error creating bean with name 'org.eclipse.virgo.kernel.osgi.region.RegionManager#0' defined in URL [ bundleentry://31.fwk20698484/META-INF/spring/osgi-framework- context.xml]: Invocation of init method fa
d; nested exception is java.lang.NullPointerException
at org.springframework.beans.factory.support.AbstractAutowireCa pableBeanFactory.initializeBean(AbstractAutowireCapableBeanF actory.java:1401)
at org.springframework.beans.factory.support.AbstractAutowireCa pableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFac tory.java:512)
at org.springframework.beans.factory.support.AbstractAutowireCa pableBeanFactory.createBean(AbstractAutowireCapableBeanFacto ry.java:450)
at org.springframework.beans.factory.support.AbstractBeanFactor y$1.getObject(AbstractBeanFactory.java:290)
at org.springframework.beans.factory.support.DefaultSingletonBe anRegistry.getSingleton(DefaultSingletonBeanRegistry.java:22 2)
at org.springframework.beans.factory.support.AbstractBeanFactor y.doGetBean(AbstractBeanFactory.java:287)
at org.springframework.beans.factory.support.AbstractBeanFactor y.getBean(AbstractBeanFactory.java:189)
at org.springframework.beans.factory.support.DefaultListableBea nFactory.preInstantiateSingletons(DefaultListableBeanFactory .java:557)
at org.springframework.context.support.AbstractApplicationConte xt.finishBeanFactoryInitialization(AbstractApplicationContex t.java:842)
at org.springframework.osgi.context.support.AbstractDelegatedEx ecutionApplicationContext.access$1600(AbstractDelegatedExecu tionApplicationContext.java:69)
at org.springframework.osgi.context.support.AbstractDelegatedEx ecutionApplicationContext$4.run(AbstractDelegatedExecutionAp plicationContext.java:355)
at org.springframework.osgi.util.internal.PrivilegedUtils.execu teWithCustomTCCL(PrivilegedUtils.java:85)
at org.springframework.osgi.context.support.AbstractDelegatedEx ecutionApplicationContext.completeRefresh(AbstractDelegatedE xecutionApplicationContext.java:320)
at org.springframework.osgi.extender.internal.dependencies.star tup.DependencyWaiterApplicationContextExecutor$CompleteRefre shTask.run(DependencyWaiterApplicationContextExecutor.java:1 32)
at org.eclipse.virgo.kernel.agent.dm.ContextPropagatingTaskExec utor$2.run(ContextPropagatingTaskExecutor.java:95)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Threa dPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo lExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException: null
at org.eclipse.osgi.internal.composite.CompositeImpl.updateSurr ogate(CompositeImpl.java:92)
at org.eclipse.osgi.internal.composite.CompositeImpl.giveExport s(CompositeImpl.java:216)
at org.eclipse.osgi.internal.module.ResolverImpl.checkComposite s(ResolverImpl.java:563)
at org.eclipse.osgi.internal.module.ResolverImpl.resolveBundles 0(ResolverImpl.java:549)
at org.eclipse.osgi.internal.module.ResolverImpl.resolveBundles (ResolverImpl.java:514)
at org.eclipse.osgi.internal.module.ResolverImpl.resolve(Resolv erImpl.java:393)
at org.eclipse.osgi.internal.resolver.StateImpl.resolve(StateIm pl.java:458)
at org.eclipse.osgi.internal.resolver.StateImpl.resolve(StateIm pl.java:523)
at org.eclipse.osgi.framework.internal.core.PackageAdminImpl.do ResolveBundles(PackageAdminImpl.java:238)
at org.eclipse.osgi.framework.internal.core.PackageAdminImpl.re solveBundles(PackageAdminImpl.java:185)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:318)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:284)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:276)
at org.eclipse.virgo.kernel.osgi.region.RegionManager.createAnd PublishUserRegion(RegionManager.java:146)
at org.eclipse.virgo.kernel.osgi.region.RegionManager.start(Reg ionManager.java:137)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.beans.factory.support.AbstractAutowireCa pableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapa bleBeanFactory.java:1529)
at org.springframework.beans.factory.support.AbstractAutowireCa pableBeanFactory.invokeInitMethods(AbstractAutowireCapableBe anFactory.java:1468)
at org.springframework.beans.factory.support.AbstractAutowireCa pableBeanFactory.initializeBean(AbstractAutowireCapableBeanF actory.java:1398)
... 17 common frames omitted

[2010-10-29 09:39:09.013] startup-tracker <ME0003I> Dump 'serviceability\dump\2010-10-29-09-39-064' generated
[2010-10-29 09:39:09.016] startup-tracker <KE0011I> Immediate shutdown initiated.

[Updated on: Fri, 29 October 2010 11:56]

Report message to a moderator

Re: Virgo Fails to Start On alternate Invocation [message #636628 is a reply to message #636202] Tue, 02 November 2010 05:39 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn Normington
Messages: 1222
Registered: July 2009
Senior Member
I don't have a Windows 7, but I tried to reproduce this on XP and couldn't. I successfully warm started and shutdown the server four times in succession.

There are known issues associated with long file paths, so please could you say where you unzipped Virgo to?
Re: Virgo Fails to Start On alternate Invocation [message #636789 is a reply to message #636628] Tue, 02 November 2010 15:02 Go to previous messageGo to next message
Raji Abraham is currently offline Raji Abraham
Messages: 13
Registered: October 2010
Junior Member
Glyn,

Thanks for your response. I have SERVER_HOME=C:\r\virgo. I did notice few instances of 'path too long' errors after switching over to 2.1.0.RELEASE version. I counted the number of characters for one path to be 284. (eg. C:\r\virgo\work\org.eclipse.virgo.kernel.deployer_2.1.0.RELE ASE\staging\org.eclipse.virgo.apps.repository-2.1.0.RELEASE\ bundle\org.eclipse.virgo.apps.repository-2.1.0.RELEASE-org.e clipse.virgo.apps.repository.core\2.1.0.RELEASE\org.eclipse. virgo.apps.repository.core-2.1.0.RELEASE.jar

I think Windows 7 still has the MAX_PATH limitation in some of its Win32 APIs, which I believe is 260.

Another error I noticed was that the kernel deployer makes a copy of the jars in the work-staging directory, renaming it as *.jar-past the second time the server is started. These files remain as is, when the server is shutdown and for the third invocation when it repeats this step, it fails with 'Destination path already exists' error. I did not see anything in the docs that would indicate if I am missing any steps in the install/setup. I checked to see if there was any permission problems with these files, but the logged in account has read/write ACLs for them. I was then planning to look in the server code and see if there was any 'clean-up' routine that is not running. But you may know from this symptom what is happening.

Thanks
Raji
Re: Virgo Fails to Start On alternate Invocation [message #636906 is a reply to message #636789] Wed, 03 November 2010 06:08 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn Normington
Messages: 1222
Registered: July 2009
Senior Member
Well spotted! *.jar-past should not exist and it looks like the following code (in the kernel's AbstractInstallArtifact class) is failing to call this.artifactStorage.rollBack() in some situations. The big question is whether this is due to a DeploymentException or some other exception such as a runtime exception.

Do you see any error messages in the earlier starts, particularly DE0009E (REFRESH_FAILED) possibly followed by evidence of an exception (although not necessarily because failed refreshes are usually "escalated" into undeploy/redeploy)? Alternatively, do you see any errors in servicability/logs/log.log about listFiles failing as that is a classic problem on Windows with long path lengths?

If you can run in a debugger with a break point on the line marked "breakpoint here" below that would also help to narrow things down.

    public boolean refresh() throws DeploymentException {
        try {
            this.isRefreshing = true;
            this.eventLogger.log(DeployerLogEvents.REFRESHING, getType(), getName(), getVersion());
            this.artifactStorage.synchronize();

            boolean refreshed = doRefresh();

            if (refreshed) {
                this.eventLogger.log(DeployerLogEvents.REFRESHED, getType(), getName(), getVersion());
            } else {
                this.artifactStorage.rollBack();
                this.eventLogger.log(DeployerLogEvents.REFRESH_FAILED, getType(), getName(), getVersion());
            }

            return refreshed;
        } catch (DeploymentException de) {
            this.eventLogger.log(DeployerLogEvents.REFRESH_FAILED, de, getType(), getName(), getVersion()); // breakpoint here
            throw de;
        } finally {
            this.isRefreshing = false;
        }
    }
Re: Virgo Fails to Start On alternate Invocation [message #636907 is a reply to message #636906] Wed, 03 November 2010 06:09 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn Normington
Messages: 1222
Registered: July 2009
Senior Member
Oh and please could you raise a bug so we can look into this. Meanwhile, you shouldn't have much trouble if you clean start all the time.
Re: Virgo Fails to Start On alternate Invocation [message #637032 is a reply to message #636907] Wed, 03 November 2010 17:14 Go to previous messageGo to next message
Raji Abraham is currently offline Raji Abraham
Messages: 13
Registered: October 2010
Junior Member
I ran the virgo server inside a VMWare running XP and it worked fine for several invocations. I then pointed the virgo sever to a share on Windows 7 from inside the VMWare and it failed. So I know that Win 7 file system is one of the culprits for the error (if not the culprit).
I will try your debug suggestion and post my observations here (and raise a bug report). That will be a little lower priority for me as my original task was to test some Apache Camel routes inside the Virgo server; which I can do in my XP VMWare now.

Re: Virgo Fails to Start On alternate Invocation [message #637070 is a reply to message #637032] Wed, 03 November 2010 23:59 Go to previous message
Glyn Normington is currently offline Glyn Normington
Messages: 1222
Registered: July 2009
Senior Member
Ok - thanks for checking XP. It's a shame that Windows 7 seems to have gone (further) backwards in its filesystem support. We'll look forward to a bug report in due course.

Meanwhile, we'll plan a fix to the code path identified earlier on the assumption that this will fix the problem. This fix, under bug 329412, will go into the 2.2.0 stream and will only be backported to 2.1.x if there is sufficient demand.

[Updated on: Thu, 04 November 2010 00:04]

Report message to a moderator

Previous Topic:Virgo web console
Next Topic:Bundle A depended on Bundle B randomly crashes during clean startup
Goto Forum:
  


Current Time: Thu Aug 28 09:27:54 EDT 2014

Powered by FUDForum. Page generated in 0.02213 seconds