Uploaded image for project: 'RichFaces'
  1. RichFaces
  2. RF-14097

a4j:mediaoutput does not work on wildfly 8.2

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 4.5.7
    • Fix Version/s: 4.5.8
    • Component/s: component-a4j-core
    • Labels:
      None
    • Environment:

      wildfly 8.2 , jsf 2.2.8, richfaces 4.5.7.final

    • Steps to Reproduce:
      Hide

      1) upload the Image using rich:fileupload
      2) Once its gets uploaded try to render the uploaded image with the a4j:mediaoutput tag

      Show
      1) upload the Image using rich:fileupload 2) Once its gets uploaded try to render the uploaded image with the a4j:mediaoutput tag
    • Affects:
      User Experience
    • Estimated Difficulty:
      Low

      Description

      I have debugged the code and also searched the others JIRA issues and found that org.jboss.el.lang.VariableMapperImpl needs to be added in the whitelist i.e. in code just need to add org.jboss.el.lang.VariableMapperImpl in resource-serialization.properties because as I understand it creates whitelistClassNameCache by reading above mentioned property file.

      It is failing at below code snippet of LookAheadObjectInputStream.java

      /**
      Only deserialize primitive or whitelisted classes
      */
      @Override
      protected Class<?> resolveClass(ObjectStreamClass desc) throws IOException, ClassNotFoundException
      Unknown macro: { Class<?> primitiveType = PRIMITIVE_TYPES.get(desc.getName()); if (primitiveType != null)

      { return primitiveType; }

      if (!isClassValid(desc.getName()))

      { throw new InvalidClassException("Unauthorized deserialization attempt", desc.getName()); }

      return super.resolveClass(desc); }
      boolean isClassValid(String requestedClassName) {
      if (whitelistClassNameCache.contains(requestedClassName))

      { return true; }

      try {
      Class<?> requestedClass = Class.forName(requestedClassName); // Error from this line
      for (Class baseClass : whitelistBaseClasses ) {
      if (baseClass.isAssignableFrom(requestedClass))

      { whitelistClassNameCache.add(requestedClassName); return true; }

      }
      } catch (ClassNotFoundException e)

      { return false; }

      return false;
      }
      Earlier I had raised the defect to add the org.jboss.el.MethodExpressionImpl in whitelist, its done and working properly (https://issues.jboss.org/browse/RF-14011)

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                michpetrov Michal Petrov
                Reporter:
                abhiraj25 Abhiraj Suryawanshi
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: