3 Replies Latest reply on May 11, 2009 3:18 AM by Andrew Rubinger

    Installing VFS* Protocol Handlers

    Andrew Rubinger Master

      In bringing the new bootstrap implementation to AS I've run into:

      Caused by: java.net.MalformedURLException: unknown protocol: vfsfile


      This was expected, as I'd opened an issue to manually initialize VFS when the server starts:

      https://jira.jboss.org/jira/browse/JBBOOT-67

      public void handleEvent(final LifecycleState state) throws LifecycleEventException
       {
       // Only run this instance once
       if (!beenRun)
       {
       // Log
       log.warn("Initializing the virtual filesystem..."); // Just for debugging
      
       // Init the virtual filesystem
       VFS.init();
      
       // Mark
       beenRun = true;
       }
       }


      I'd been expecting the VFS.init() call to be enough...who knows the missing piece?

      00:56:59,789 INFO [AbstractServer] Starting: org.jboss.bootstrap.impl.as.server.JBossASServerImpl@1ff4689e
      00:56:59,790 WARN [VfsInitializingLifecycleEventHandler] Initializing the virtual filesystem... // Proof my hack's running
      00:57:00,189 INFO [AbstractMCServerBase] Starting Microcontainer, Main bootstrapURL=file:/home/alrubinger/business/jboss/wc/jbossas/branches/Branch_5_x_BootstrapLegacyRemoval/build/output/jboss-5.1.0.GA/server/default/conf/bootstrap.xml
      00:57:01,054 INFO [VFSCacheFactory] Initializing VFSCache [org.jboss.virtual.plugins.cache.CombinedVFSCache]
      00:57:01,056 INFO [VFSCacheFactory] Using VFSCache [CombinedVFSCache[real-cache: null]]
      00:57:01,665 ERROR [AbstractKernelController] Error installing to Instantiated: name=bootstrap-classloader:0.0.0 state=Described
      java.lang.RuntimeException: Error creating VFS file for file:/home/alrubinger/business/jboss/wc/jbossas/branches/Branch_5_x_BootstrapLegacyRemoval/build/output/jboss-5.1.0.GA/lib/jboss-system.jar
       at org.jboss.classloading.spi.vfs.dependency.VFSClassLoaderPolicyModule.determineVFSRoots(VFSClassLoaderPolicyModule.java:178)
       at org.jboss.classloading.spi.vfs.dependency.VFSClassLoaderPolicyModule.determinePolicy(VFSClassLoaderPolicyModule.java:210)
       at org.jboss.classloading.spi.vfs.dependency.VFSClassLoaderPolicyModule.determinePolicy(VFSClassLoaderPolicyModule.java:52)
       at org.jboss.classloading.spi.dependency.policy.ClassLoaderPolicyModule.getPolicy(ClassLoaderPolicyModule.java:195)
       at org.jboss.classloading.spi.vfs.dependency.VFSClassLoaderPolicyModule.getPolicy(VFSClassLoaderPolicyModule.java:204)
       at org.jboss.classloading.spi.vfs.dependency.VFSClassLoaderPolicyModule.getPolicy(VFSClassLoaderPolicyModule.java:52)
       at org.jboss.classloading.spi.dependency.policy.ClassLoaderPolicyModule.registerClassLoaderPolicy(ClassLoaderPolicyModule.java:131)
       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.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
       at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)
       at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
       at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:241)
       at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
       at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:109)
       at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:70)
       at org.jboss.kernel.plugins.dependency.InstantiateAction.installActionInternal(InstantiateAction.java:66)
       at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
       at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
       at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
       at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
       at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
       at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
       at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:774)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540)
       at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBean(AbstractKernelDeployer.java:319)
       at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBeans(AbstractKernelDeployer.java:297)
       at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deploy(AbstractKernelDeployer.java:130)
       at org.jboss.kernel.plugins.deployment.BasicKernelDeployer.deploy(BasicKernelDeployer.java:76)
       at org.jboss.bootstrap.impl.mc.deployer.TempBasicXMLDeployer.deploy(TempBasicXMLDeployer.java:91)
       at org.jboss.bootstrap.impl.mc.deployer.TempBasicXMLDeployer.deploy(TempBasicXMLDeployer.java:161)
       at org.jboss.bootstrap.impl.mc.server.AbstractMCServerBase.doStart(AbstractMCServerBase.java:265)
       at org.jboss.bootstrap.impl.as.server.JBossASServerImpl.doStart(JBossASServerImpl.java:288)
       at org.jboss.bootstrap.impl.base.server.AbstractServer.start(AbstractServer.java:328)
       at org.jboss.bootstrap.impl.as.server.JBossASServerImpl.start(JBossASServerImpl.java:301)
       at org.jboss.Main.boot(Main.java:342)
       at org.jboss.Main$1.run(Main.java:676)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: java.net.MalformedURLException: unknown protocol: vfsfile
       at java.net.URL.<init>(URL.java:574)
       at java.net.URL.<init>(URL.java:464)
       at java.net.URL.<init>(URL.java:413)
       at org.jboss.virtual.plugins.context.file.FileHandler.<init>(FileHandler.java:77)
       at org.jboss.virtual.plugins.context.file.FileHandler.<init>(FileHandler.java:93)
       at org.jboss.virtual.plugins.context.file.FileSystemContext.createVirtualFileHandler(FileSystemContext.java:322)
       at org.jboss.virtual.plugins.context.file.FileSystemContext.createVirtualFileHandler(FileSystemContext.java:260)
       at org.jboss.virtual.plugins.context.file.FileSystemContext.getRoot(FileSystemContext.java:207)
       at org.jboss.virtual.plugins.registry.DefaultVFSRegistry.getFile(DefaultVFSRegistry.java:86)
       at org.jboss.virtual.VFS.getRoot(VFS.java:200)
       at org.jboss.classloading.spi.vfs.dependency.VFSClassLoaderPolicyModule.getVirtualFile(VFSClassLoaderPolicyModule.java:196)
       at org.jboss.classloading.spi.vfs.dependency.VFSClassLoaderPolicyModule.determineVFSRoots(VFSClassLoaderPolicyModule.java:170)
       ... 43 more