Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-17016

EAP 6.4.21 introduced a severe regression with virtual file system access

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Critical Critical
    • None
    • 6.4.0.GA
    • VFS
    • None
    • Hide

      i)unzip Simple.war -d (path to EAP..)/jboss-eap-6.4/standalone/deployments/Simple.war
      ii)touch (path to EAP..)/jbeap/6.4.21/jboss-eap-6.4/standalone/deployments/Simple.war.dodeploy
      iii)remove try/catch in jsp to see full exception.

      Show
      i)unzip Simple.war -d (path to EAP..)/jboss-eap-6.4/standalone/deployments/Simple.war ii)touch (path to EAP..)/jbeap/6.4.21/jboss-eap-6.4/standalone/deployments/Simple.war.dodeploy iii)remove try/catch in jsp to see full exception.

      While rebasing JBoss Operations Network on top of EAP 6.4.22, I noticed a regression/non-trivial change in the returned org.jboss.vfs.VirtualFile instances.

      Before EAP 6.4.22(going back many releases), the following access pattern was supported.

      ###

      Enumeration<URL> fileUrls = getClass().getClassLoader().getResources("META-INF/persistence.xml");

      VirtualFile virtualFile = (VirtualFile) fileUrl.openConnection().getContent();

      was ok. Starting with 6.4.21 and 6.4.22, the access pattern above causes runtime class cast exceptions as below:

      ###

      13:07:29,537 WARN [org.rhq.enterprise.server.plugin.pc.alert.AlertSenderPluginManager] (pool-6-thread-1) Plugin component failed to start plugin [alert-cli]: java.lang.ClassCastException: java.io.FileInputStream cannot be cast to org.jboss.vfs.VirtualFile
      at org.rhq.enterprise.server.plugins.alertCli.CliComponent.loadPackagesNames(CliComponent.java:165) [alert-cli-4.12.0.JON330GA.jar:4.12.0.JON330GA]
      ...

      ###

      While it might be possible to work around the instances we discover, it is concerning that there may be other runtime failures like this lurking within other code paths not fully exercised during each release. Also, there are 3rd party plugins who may well be encounter this issue suddenly merely by being installed into and EAP 6.4.21+ server.

      Please see attached reproducer webapp for deployment into an affected EAP server. I catch the exception in the jsp, but the problem should be visible in what's provided.

              ropalka Richard Opalka
              spinder Simeon Pinder (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: