5 Replies Latest reply on Apr 1, 2010 6:14 AM by Atanas Krachev

    Embedded JBoss protocol unknown vfsfile. URLStreamHandlers

    Adrian Pillinger Newbie

      Bill, I checked out the Embedded JBoss code and built it from the source today.

      I have set up JUnit tests to deploy and test my EJBs. When I run the tests in Eclipse they work, but when I build the project in Maven it fails.

      I have done a lot of investigating and debugging in the embedded code, and understanding the URLStreamHandler framework for handling protocols. I haven't managed to fix the problem, so I wondered if you can shed any light on it?

      Looking at the embedded code you have a class HandlerFactoryHack. From the comment in the class it says that URL.setURLStreamHandlerFactory() can only be setup once, could maven perhaps be setting this up before JBoss boots? I have tried setting ...

      System.setProperty("java.protocol.handler.pkgs","org.jboss.virtual.protocol");

      but that doesn't make a difference - maybe maven overwrites this property or sets up the urls even before i get to set the property.

      I understand if this is a maven configuration problem that you cannot necessarily help.

      Any clues as where to look would be very much appreciated.

      DEBUG 22-02 15:30:41,220 (KernelFactory.java:assembleNewKernel:86) -Starting JBoss Kernel construction...
      DEBUG 22-02 15:30:43,218 (KernelFactory.java:assembleNewKernel:112) -Completed JBoss Kernel construction. Duration: 1889 milliseconds
      DEBUG 22-02 15:30:43,678 (Bootstrap.java:deployBaseBootstrapUrl:149) -*** URL Details in deployBaseBootstrapUrl(url) ***
      DEBUG 22-02 15:30:43,679 (Bootstrap.java:deployBaseBootstrapUrl:150) -url.getAuthority():
      DEBUG 22-02 15:30:43,681 (Bootstrap.java:deployBaseBootstrapUrl:151) -url.getDefaultPort(): -1
      DEBUG 22-02 15:30:43,682 (Bootstrap.java:deployBaseBootstrapUrl:152) -url.getFile(): /usr/local/data/workspaces/current/maximizer-ejb/target/test-classes/conf/bootstrap-beans.xml
      DEBUG 22-02 15:30:43,683 (Bootstrap.java:deployBaseBootstrapUrl:153) -url.getHost():
      DEBUG 22-02 15:30:43,692 (Bootstrap.java:deployBaseBootstrapUrl:154) -url.getPath(): /usr/local/data/workspaces/current/maximizer-ejb/target/test-classes/conf/bootstrap-beans.xml
      DEBUG 22-02 15:30:43,693 (Bootstrap.java:deployBaseBootstrapUrl:155) -url.getPort(): -1
      DEBUG 22-02 15:30:43,695 (Bootstrap.java:deployBaseBootstrapUrl:156) -url.getProtocol(): file
      DEBUG 22-02 15:30:43,696 (Bootstrap.java:deployBaseBootstrapUrl:157) -url.getQuery(): null
      DEBUG 22-02 15:30:43,698 (Bootstrap.java:deployBaseBootstrapUrl:158) -url.getRef(): null
      DEBUG 22-02 15:30:43,699 (Bootstrap.java:deployBaseBootstrapUrl:159) -url.getUserInfo(): null
      DEBUG 22-02 15:30:44,135 (BeanXMLDeployer.java:deploy:92) -Parsing file:/usr/local/data/workspaces/current/maximizer-ejb/target/test-classes/conf/bootstrap-beans.xml took 435 milliseconds
      WARN 22-02 15:30:44,345 (UnifiedLoaderRepository3.java:addClassLoader:675) -Tried to add non-URLClassLoader. Ignored
      DEBUG 22-02 15:30:44,356 (ServiceController.java:preRegister:592) -Controller MBean online
      DEBUG 22-02 15:30:44,746 (MainDeployerImpl.java:addDeployer:206) -Added deployer: org.jboss.deployers.plugins.deployers.kernel.BeanDeployer@5cce5cce
      DEBUG 22-02 15:30:44,749 (MainDeployerImpl.java:addDeployer:206) -Added deployer: org.jboss.deployers.plugins.deployers.kernel.BeanMetaDataDeployer@66ca66ca
      DEBUG 22-02 15:30:44,752 (MainDeployerImpl.java:addDeployer:206) -Added deployer: org.jboss.system.deployers.ServiceDeploymentDeployer@3a493a49
      DEBUG 22-02 15:30:44,755 (MainDeployerImpl.java:addDeployer:206) -Added deployer: org.jboss.embedded.ClassLoaderDeployer@b480b48
      DEBUG 22-02 15:30:44,758 (MainDeployerImpl.java:addDeployer:206) -Added deployer: org.jboss.system.deployers.SARDeployer@66d366d3
      DEBUG 22-02 15:30:44,763 (MainDeployerImpl.java:addDeployer:206) -Added deployer: org.jboss.system.deployers.ServiceDeployer@5810581
      DEBUG 22-02 15:30:44,766 (MainDeployerImpl.java:addDeployer:206) -Added deployer: org.jboss.deployers.plugins.deployers.kernel.KernelDeploymentDeployer@11d011d0
      DEBUG 22-02 15:30:45,087 (DeploymentGroup.java:getVirtualFile:189) -*** URL Details in getVirtualFile(url) ***
      DEBUG 22-02 15:30:45,091 (DeploymentGroup.java:getVirtualFile:190) -url.getAuthority():
      DEBUG 22-02 15:30:45,097 (DeploymentGroup.java:getVirtualFile:191) -url.getDefaultPort(): -1
      DEBUG 22-02 15:30:45,101 (DeploymentGroup.java:getVirtualFile:192) -url.getFile(): /usr/local/data/workspaces/current/maximizer-ejb/target/test-classes/conf/jboss-service.xml
      DEBUG 22-02 15:30:45,105 (DeploymentGroup.java:getVirtualFile:193) -url.getHost():
      DEBUG 22-02 15:30:45,109 (DeploymentGroup.java:getVirtualFile:194) -url.getPath(): /usr/local/data/workspaces/current/maximizer-ejb/target/test-classes/conf/jboss-service.xml
      DEBUG 22-02 15:30:45,114 (DeploymentGroup.java:getVirtualFile:195) -url.getPort(): -1
      DEBUG 22-02 15:30:45,118 (DeploymentGroup.java:getVirtualFile:196) -url.getProtocol(): file
      DEBUG 22-02 15:30:45,122 (DeploymentGroup.java:getVirtualFile:197) -url.getQuery(): null
      DEBUG 22-02 15:30:45,126 (DeploymentGroup.java:getVirtualFile:198) -url.getRef(): null
      DEBUG 22-02 15:30:45,130 (DeploymentGroup.java:getVirtualFile:199) -url.getUserInfo(): null
      ERROR 22-02 15:30:45,174 (DeploymentScanner.java:start:113) -Failed to deploy
      org.jboss.deployers.spi.DeploymentException: Unable to get VirtualFile for url: file:/usr/local/data/workspaces/current/maximizer-ejb/target/test-classes/conf/jboss-service.xml
       at org.jboss.embedded.DeploymentGroup.getVirtualFile(DeploymentGroup.java:205)
       at org.jboss.embedded.DeploymentGroup.add(DeploymentGroup.java:178)
       at org.jboss.embedded.DeploymentGroup.addResource(DeploymentGroup.java:344)
       at org.jboss.embedded.DeploymentScanner.start(DeploymentScanner.java:85)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       at java.lang.reflect.Method.invoke(Method.java:615)
       at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:55)
       at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:108)
       at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
       at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:103)
       at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:145)
       at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.installAction(KernelControllerContextAction.java:197)
       at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.install(KernelControllerContextAction.java:136)
       at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
       at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:233)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:709)
       at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:430)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:540)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:474)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:274)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:177)
       at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBean(AbstractKernelDeployer.java:302)
       at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBeans(AbstractKernelDeployer.java:272)
       at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deploy(AbstractKernelDeployer.java:119)
       at org.jboss.kernel.plugins.deployment.xml.BeanXMLDeployer.deploy(BeanXMLDeployer.java:96)
       at org.jboss.embedded.Bootstrap.deployBaseBootstrapUrl(Bootstrap.java:160)
       at org.jboss.embedded.Bootstrap.bootstrapURL(Bootstrap.java:172)
       at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:212)
       at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:225)
       at com.dolby.maximizer.ejb.test.AbstractEJBTestCase.startupEmbeddedJboss(AbstractEJBTestCase.java:63)
       at com.dolby.maximizer.ejb.test.TestSetupWrapper.setUp(TestSetupWrapper.java:29)
       at junit.extensions.TestSetup$1.protect(TestSetup.java:22)
       at junit.framework.TestResult.runProtected(TestResult.java:128)
       at junit.extensions.TestSetup.run(TestSetup.java:27)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       at java.lang.reflect.Method.invoke(Method.java:615)
       at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:210)
       at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:135)
       at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:122)
       at org.apache.maven.surefire.Surefire.run(Surefire.java:129)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       at java.lang.reflect.Method.invoke(Method.java:615)
       at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:225)
       at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:747)
      Caused by:
      java.net.MalformedURLException: unknown protocol: vfsfile
       at java.net.URL.<init>(URL.java:608)
       at java.net.URL.<init>(URL.java:498)
       at java.net.URL.<init>(URL.java:447)
       at org.jboss.virtual.plugins.context.file.FileHandler.<init>(FileHandler.java:75)
       at org.jboss.virtual.plugins.context.file.FileHandler.<init>(FileHandler.java:89)
       at org.jboss.virtual.plugins.context.file.FileSystemContext.createVirtualFileHandler(FileSystemContext.java:253)
       at org.jboss.virtual.plugins.context.file.FileSystemContext.createVirtualFileHandler(FileSystemContext.java:186)
       at org.jboss.virtual.plugins.context.file.FileSystemContext.<init>(FileSystemContext.java:150)
       at org.jboss.virtual.plugins.context.file.FileSystemContext.<init>(FileSystemContext.java:124)
       at org.jboss.virtual.plugins.context.file.FileSystemContext.<init>(FileSystemContext.java:113)
       at org.jboss.virtual.plugins.context.file.FileSystemContextFactory.getVFS(FileSystemContextFactory.java:54)
       at org.jboss.virtual.VFS.getVFS(VFS.java:130)
       at org.jboss.virtual.VFS.getRoot(VFS.java:144)
       at org.jboss.embedded.DeploymentGroup.getVirtualFile(DeploymentGroup.java:201)
       ... 49 more
      


        • 1. Re: Embedded JBoss protocol unknown vfsfile. URLStreamHandle
          Adrian Pillinger Newbie

          FYI I came across a maven plugin bug...

          http://jira.codehaus.org/browse/SUREFIRE-104

          I have half remedied my problems with the following code and setting the java protocol system property...

          org.jboss.net.protocol.URLStreamHandlerFactory factory = new org.jboss.net.protocol.URLStreamHandlerFactory();
          URL.setURLStreamHandlerFactory(factory);
          Bootstrap.getInstance().bootstrap();
          
          [/url]

          • 2. Re: Embedded JBoss protocol unknown vfsfile. URLStreamHandle
            Adrian Pillinger Newbie

            Problems all fixed. The final error was a stupid mistake on my behalf!

            • 3. Re: Embedded JBoss protocol unknown vfsfile. URLStreamHandle
              Przemyslaw Madzik Newbie

               

              "apill" wrote:
              Problems all fixed. The final error was a stupid mistake on my behalf!


              Could you describe what was wrong?
              I'm trying to setup tests in maven (surefire, testng) and i get error like in your first post. After aplying snippet from your second post i get:

              [...]
              DEBUG 13-03 13:41:53,138 (MainDeployerImpl.java:process:507) -Deployed: vfsfile:/D:/work/safo/safo-mobile/safo-mobile-srv-ejb/target/test-classes/conf/jboss-service.xml
              DEBUG 13-03 13:41:53,138 (LocalOnlyUserTransaction.java:start:62) -new UserTx: org.jboss.embedded.adapters.LocalOnlyUserTransaction@167c5e3
              DEBUG 13-03 13:41:54,075 (NamingContext.java:checkRef:1428) -Failed to connect to localhost:1099
              javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]
               at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:272)
               at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1423)
               at org.jnp.interfaces.NamingContext.rebind(NamingContext.java:487)
               at org.jnp.interfaces.NamingContext.rebind(NamingContext.java:480)
               at javax.naming.InitialContext.rebind(InitialContext.java:367)
               at org.jboss.util.naming.NonSerializableFactory.rebind(NonSerializableFactory.java:182)
               at org.jboss.naming.JndiBinder.start(JndiBinder.java:79)
               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:55)
               at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:108)
               at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
               at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:103)
               at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:145)
               at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.installAction(KernelControllerContextAction.java:197)
               at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.install(KernelControllerContextAction.java:136)
               at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
               at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:233)
               at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:724)
               at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:445)
               at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:555)
               at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:489)
               at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:289)
               at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:192)
               at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBean(AbstractKernelDeployer.java:302)
               at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBeans(AbstractKernelDeployer.java:272)
               at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deploy(AbstractKernelDeployer.java:119)
               at org.jboss.kernel.plugins.deployment.xml.BeanXMLDeployer.deploy(BeanXMLDeployer.java:96)
               at org.jboss.embedded.Bootstrap.deployBaseBootstrapUrl(Bootstrap.java:148)
               at org.jboss.embedded.Bootstrap.bootstrapURL(Bootstrap.java:160)
               at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:199)
               at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:212)
               at biz.safo.ejb.test.EJB3Test.setUp(EJB3Test.java:56)
               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.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:552)
               at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:322)
               at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:156)
               at org.testng.SuiteRunner.privateRun(SuiteRunner.java:223)
               at org.testng.SuiteRunner.run(SuiteRunner.java:145)
               at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:901)
               at org.testng.TestNG.runSuitesLocally(TestNG.java:863)
               at org.apache.maven.surefire.testng.TestNGExecutor.executeTestNG(TestNGExecutor.java:69)
               at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:78)
               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(DelegatingMethodAccessorImpl.java:25)
               at java.lang.reflect.Method.invoke(Method.java:585)
               at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290)
               at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818)
              Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: connect]
               at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:246)
               ... 54 more
              Caused by: java.net.ConnectException: Connection refused: connect
               at java.net.PlainSocketImpl.socketConnect(Native Method)
               at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
               at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
               at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
               at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
               at java.net.Socket.connect(Socket.java:519)
               at java.net.Socket.connect(Socket.java:469)
               at java.net.Socket.<init>(Socket.java:366)
               at java.net.Socket.<init>(Socket.java:266)
               at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:84)
               at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:77)
               at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:242)
               ... 54 more
              ERROR 13-03 13:41:59,091 (AbstractController.java:incrementState:456) -Error installing to Start: name=UserTransactionBinding state=Create
              javax.naming.NamingException: Could not bind JndiBinder service into JNDI under jndiName:/UserTransaction [Root exception is javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]]]
               at org.jboss.naming.JndiBinder.start(JndiBinder.java:83)
               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:55)
               at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:108)
               at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
               at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:103)
               at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:145)
               at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.installAction(KernelControllerContextAction.java:197)
               at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.install(KernelControllerContextAction.java:136)
               at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
               at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:233)
               at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:724)
               at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:445)
               at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:555)
               at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:489)
               at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:289)
               at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:192)
               at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBean(AbstractKernelDeployer.java:302)
               at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBeans(AbstractKernelDeployer.java:272)
               at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deploy(AbstractKernelDeployer.java:119)
               at org.jboss.kernel.plugins.deployment.xml.BeanXMLDeployer.deploy(BeanXMLDeployer.java:96)
               at org.jboss.embedded.Bootstrap.deployBaseBootstrapUrl(Bootstrap.java:148)
               at org.jboss.embedded.Bootstrap.bootstrapURL(Bootstrap.java:160)
               at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:199)
               at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:212)
               at biz.safo.ejb.test.EJB3Test.setUp(EJB3Test.java:56)
               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.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:552)
               at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:322)
               at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:156)
               at org.testng.SuiteRunner.privateRun(SuiteRunner.java:223)
               at org.testng.SuiteRunner.run(SuiteRunner.java:145)
               at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:901)
               at org.testng.TestNG.runSuitesLocally(TestNG.java:863)
               at org.apache.maven.surefire.testng.TestNGExecutor.executeTestNG(TestNGExecutor.java:69)
               at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:78)
               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(DelegatingMethodAccessorImpl.java:25)
               at java.lang.reflect.Method.invoke(Method.java:585)
               at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290)
               at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818)
              Caused by: javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]]
               at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1452)
               at org.jnp.interfaces.NamingContext.rebind(NamingContext.java:487)
               at org.jnp.interfaces.NamingContext.rebind(NamingContext.java:480)
               at javax.naming.InitialContext.rebind(InitialContext.java:367)
               at org.jboss.util.naming.NonSerializableFactory.rebind(NonSerializableFactory.java:182)
               at org.jboss.naming.JndiBinder.start(JndiBinder.java:79)
               ... 48 more
              Caused by: javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]
               at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:272)
               at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1423)
               ... 53 more
              Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: connect]
               at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:246)
               ... 54 more
              Caused by: java.net.ConnectException: Connection refused: connect
               at java.net.PlainSocketImpl.socketConnect(Native Method)
               at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
               at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
               at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
               at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
               at java.net.Socket.connect(Socket.java:519)
               at java.net.Socket.connect(Socket.java:469)
               at java.net.Socket.<init>(Socket.java:366)
               at java.net.Socket.<init>(Socket.java:266)
               at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:84)
               at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:77)
               at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:242)
               ... 54 more
              
              


              Regards,
              PM

              • 4. Re: Embedded JBoss protocol unknown vfsfile. URLStreamHandle
                Peter Rylance Newbie

                I have the same "connection refused " problem. Does anyone have a solution to this?


                *** DEPLOYMENTS IN ERROR: Name -& Error
                UserTransactionBinding -& javax.naming.NamingException: Could not bind JndiBinder service into JNDI under jndiName:/UserTransaction [Root exception is javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]]]
                
                 at org.jboss.ejb3.embedded.EJB3StandaloneBootstrap.boot(EJB3StandaloneBootstrap.java:386)


                Thanks,
                Pete


                • 5. Re: Embedded JBoss protocol unknown vfsfile. URLStreamHandle
                  Atanas Krachev Newbie

                  Hi Peter,

                   

                  Sorry for being late with 4 years with this replay, but I hope it can help others too:

                   

                  In my case I have put by mistake in the Embedded Jboss\jndi.properties additional line with jndi address and port.

                  The file has to be as is : only

                   

                  # DO NOT EDIT THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING
                  #
                  java.naming.factory.initial=org.jboss.naming.JBossRemotingContextFactory
                  java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces