Struts 2
  1. Struts 2
  2. WW-3558

xwork does not support the VFS of jboss-6.0Final

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.1, 2.2.1.1
    • Fix Version/s: 2.3.1
    • Component/s: None
    • Labels:
      None
    • Environment:

      APP server: JBossAS [6.0.0.Final "Neo"]
      JDK version: 1.6.0_18,Sun Microsystems Inc.
      OS-System: Windows 7 6.1,x86

    • Flags:
      Important

      Description

      deploy 'struts2-blank-2.2.1.war'(official example app of struts2.2.1) and got the below error:
      ps: I have try to add "-Djboss.vfs.forceVfsJar=false" or "-Djboss.vfs.forceCopy=true" to the start script, but does not effect anything.

      errorlog:
      Calling G:\jboss-6.0.0.Final\bin\run.conf.bat
      ===============================================================================
      ...

      10:23:51,306 INFO [AbstractServer] Starting: JBossAS [6.0.0.Final "Neo"]
      10:23:56,606 INFO [ServerInfo] Java version: 1.6.0_18,Sun Microsystems Inc.
      10:23:56,607 INFO [ServerInfo] Java Runtime: Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
      10:23:56,607 INFO [ServerInfo] Java VM: Java HotSpot(TM) Server VM 16.0-b13,Sun Microsystems Inc.
      10:23:56,607 INFO [ServerInfo] OS-System: Windows 7 6.1,x86
      10:23:56,608 INFO [ServerInfo] VM arguments: -Dprogram.name=run.bat -Xms512M -Xmx768M -XX:MaxPermSize=256M -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dorg.jboss.resolver.warning=true -Djava.endorsed.dirs=G:\jboss-6.0.0.Final\lib\endorsed
      ...

      10:24:59,857 INFO [TomcatDeployment] deploy, ctxPath=/
      10:25:18,090 INFO [TomcatDeployment] deploy, ctxPath=/struts2-blank-2.2.1
      10:25:18,926 WARN [FileManager] Could not create JarEntryRevision for [vfs:/G:/jboss-6.0.0.Final/server/default/deploy/struts2-blank-2.2.1.war/WEB-INF/lib/struts2-core-2.2.1]!: java.io.FileNotFoundException: vfs:\G:\jboss-6.0.0.Final\server\default\deploy\struts2-blank-2.2.1.war\WEB-INF\lib\struts2-core-2.2.1 (文件名、目录名或卷标语法不正确。)
      at java.util.zip.ZipFile.open(Native Method) [:1.6.0_18]
      at java.util.zip.ZipFile.<init>(ZipFile.java:114) [:1.6.0_18]
      at java.util.jar.JarFile.<init>(JarFile.java:133) [:1.6.0_18]
      at java.util.jar.JarFile.<init>(JarFile.java:97) [:1.6.0_18]
      at com.opensymphony.xwork2.util.FileManager$JarEntryRevision.build(FileManager.java:307) [:2.2.1]
      at com.opensymphony.xwork2.util.FileManager.loadFile(FileManager.java:145) [:2.2.1]
      at com.opensymphony.xwork2.util.FileManager.loadFile(FileManager.java:105) [:2.2.1]
      at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:898) [:2.2.1]
      at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:154) [:2.2.1]
      at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:121) [:2.2.1]
      at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:179) [:2.2.1]
      at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66) [:2.2.1]
      at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:371) [:2.2.1]
      at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:415) [:2.2.1]
      at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69) [:2.2.1]
      at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51) [:2.2.1]
      at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:447) [:6.0.0.Final]
      at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3246) [:6.0.0.Final]
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:3843) [:6.0.0.Final]
      at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:294) [:6.0.0.Final]
      at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:146) [:6.0.0.Final]
      at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:477) [:6.0.0.Final]
      at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118) [:6.0.0.Final]
      at org.jboss.web.deployers.WebModule.start(WebModule.java:95) [:6.0.0.Final]
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_18]
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_18]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_18]
      at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_18]
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157) [:6.0.0.GA]
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96) [:6.0.0.GA]
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) [:6.0.0.GA]
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:271) [:6.0.0.GA]
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:670) [:6.0.0.GA]
      at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206) [:2.2.0.GA]
      at $Proxy41.start(Unknown Source) at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:53) [:2.2.0.GA]
      at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:41) [:2.2.0.GA]
      at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62) [jboss-dependency.jar:2.2.0.GA]
      at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71) [jboss-dependency.jar:2.2.0.GA]
      at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51) [jboss-dependency.jar:2.2.0.GA]
      at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.GA]
      at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:301) [:2.2.0.GA]
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.GA]
      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.GA]
      at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.GA]
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.GA]
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.GA]
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:894) [jboss-dependency.jar:2.2.0.GA]
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:641) [jboss-dependency.jar:2.2.0.GA]
      at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:182) [:2.2.0.GA]
      at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:58) [:2.2.0.GA]
      at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62) [:2.2.0.GA]
      at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55) [:2.2.0.GA]
      at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179) [:2.2.0.GA]
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1832) [:2.2.0.GA]
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1550) [:2.2.0.GA]
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1571) [:2.2.0.GA]
      at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1491) [:2.2.0.GA]
      at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.GA]
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.GA]
      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.GA]
      at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.GA]
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.GA]
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.GA]
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.GA]
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.GA]
      at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1983) [:2.2.0.GA]
      at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:1076) [:2.2.0.GA]
      at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:679) [:2.2.0.GA]
      at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.process(MainDeployerPlugin.java:106) [:6.0.0.Final]
      at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.process(ProfileControllerContext.java:143) [:0.2.2]
      at org.jboss.profileservice.dependency.ProfileDeployAction.deploy(ProfileDeployAction.java:151) [:0.2.2]
      at org.jboss.profileservice.dependency.ProfileDeployAction.installActionInternal(ProfileDeployAction.java:94) [:0.2.2]
      at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54) [jboss-kernel.jar:2.2.0.GA]
      at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42) [jboss-kernel.jar:2.2.0.GA]
      at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62) [jboss-dependency.jar:2.2.0.GA]
      at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71) [jboss-dependency.jar:2.2.0.GA]
      at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51) [jboss-dependency.jar:2.2.0.GA]
      at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.GA]
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.GA]
      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.GA]
      at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.GA]
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.GA]
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.GA]
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.GA]
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.GA]
      at org.jboss.profileservice.dependency.ProfileActivationWrapper$BasicProfileActivation.start(ProfileActivationWrapper.java:190) [:0.2.2]
      at org.jboss.profileservice.dependency.ProfileActivationWrapper.start(ProfileActivationWrapper.java:87) [:0.2.2]
      at org.jboss.profileservice.dependency.ProfileActivationService.activateProfile(ProfileActivationService.java:215) [:0.2.2]
      at org.jboss.profileservice.dependency.ProfileActivationService.activate(ProfileActivationService.java:159) [:0.2.2]
      at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.activate(AbstractProfileServiceBootstrap.java:112) [:0.2.2]
      at org.jboss.profileservice.resolver.BasicResolverFactory$ProfileResolverFacade.deploy(BasicResolverFactory.java:87) [:0.2.2]
      at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.start(AbstractProfileServiceBootstrap.java:91) [:0.2.2]
      at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:132) [:6.0.0.Final]
      at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:56) [:6.0.0.Final]
      at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:827) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-5]
      at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:417) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-5]
      at java.lang.Thread.run(Thread.java:619) [:1.6.0_18]

      10:25:19,073 INFO [XmlConfigurationProvider] Parsing configuration file [struts-default.xml]
      10:25:19,088 INFO [XmlConfigurationProvider] Unable to locate configuration files of the name struts-plugin.xml, skipping
      10:25:19,089 INFO [XmlConfigurationProvider] Parsing configuration file [struts-plugin.xml]
      10:25:19,311 INFO [XmlConfigurationProvider] Parsing configuration file [struts.xml]
      10:25:20,858 INFO [service] Removing bootstrap log handlers
      10:25:21,084 INFO [org.apache.coyote.http11.Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
      10:25:21,178 INFO [org.apache.coyote.ajp.AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
      10:25:21,186 INFO [org.jboss.bootstrap.impl.base.server.AbstractServer] JBossAS [6.0.0.Final "Neo"] Started in 1m:29s:817ms

        Activity

        Hide
        lwen.ma added a comment -

        I trace the error log and find the code in "com.opensymphony.xwork2.util.URLUtil":
        //-------------------------------old code---------------------------------------------------
        public static final String JBOSS5_VFSZIP = "vfszip";
        public static final String JBOSS5_VFSMEMORY = "vfsmemory";
        public static boolean isJBoss5Url(URL fileUrl)

        { final String protocol = fileUrl.getProtocol(); return JBOSS5_VFSZIP.equals(protocol) || JBOSS5_VFSMEMORY.equals(fileUrl.getProtocol()); }

        //-------------------------------end of old code------------------------------------------
        and change it to:
        //-------------------------------fixed code---------------------------------------------------
        public static final String JBOSS5_VFS = "vfs";
        public static final String JBOSS5_VFSZIP = "vfszip";
        public static final String JBOSS5_VFSMEMORY = "vfsmemory";
        public static boolean isJBoss5Url(URL fileUrl)

        { final String protocol = fileUrl.getProtocol(); return JBOSS5_VFS.equals(protocol) || JBOSS5_VFSZIP.equals(protocol) || JBOSS5_VFSMEMORY.equals(fileUrl.getProtocol()); }

        //-------------------------------end of fixed code------------------------------------------

        then redeploy the war to jboss, and it does work

        Show
        lwen.ma added a comment - I trace the error log and find the code in "com.opensymphony.xwork2.util.URLUtil": //------------------------------- old code --------------------------------------------------- public static final String JBOSS5_VFSZIP = "vfszip"; public static final String JBOSS5_VFSMEMORY = "vfsmemory"; public static boolean isJBoss5Url(URL fileUrl) { final String protocol = fileUrl.getProtocol(); return JBOSS5_VFSZIP.equals(protocol) || JBOSS5_VFSMEMORY.equals(fileUrl.getProtocol()); } //------------------------------- end of old code ------------------------------------------ and change it to: //------------------------------- fixed code --------------------------------------------------- public static final String JBOSS5_VFS = "vfs"; public static final String JBOSS5_VFSZIP = "vfszip"; public static final String JBOSS5_VFSMEMORY = "vfsmemory"; public static boolean isJBoss5Url(URL fileUrl) { final String protocol = fileUrl.getProtocol(); return JBOSS5_VFS.equals(protocol) || JBOSS5_VFSZIP.equals(protocol) || JBOSS5_VFSMEMORY.equals(fileUrl.getProtocol()); } //------------------------------- end of fixed code ------------------------------------------ then redeploy the war to jboss, and it does work
        Hide
        Lukasz Lenart added a comment -

        It's just a warning, application should work. Any way thanks for the patch!

        Show
        Lukasz Lenart added a comment - It's just a warning, application should work. Any way thanks for the patch!
        Hide
        Lukasz Lenart added a comment -

        Solved, thanks for the patch!

        Show
        Lukasz Lenart added a comment - Solved, thanks for the patch!
        Hide
        Hudson added a comment -

        Integrated in Struts2 #331 (See https://builds.apache.org/job/Struts2/331/)
        WW-3558 - adds support for JBoss VFS protocol

        lukaszlenart :
        Files :

        • /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/URLUtil.java
        Show
        Hudson added a comment - Integrated in Struts2 #331 (See https://builds.apache.org/job/Struts2/331/ ) WW-3558 - adds support for JBoss VFS protocol lukaszlenart : Files : /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/URLUtil.java
        Hide
        lwen.ma added a comment -

        See another bug about jboss-vfs https://issues.apache.org/jira/browse/WW-3662.
        It seems that channges on '/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/URLUtil.java' doen't solved bug completely.

        Show
        lwen.ma added a comment - See another bug about jboss-vfs https://issues.apache.org/jira/browse/WW-3662 . It seems that channges on '/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/URLUtil.java' doen't solved bug completely.

          People

          • Assignee:
            Lukasz Lenart
            Reporter:
            lwen.ma
          • Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development