Tapestry
  1. Tapestry
  2. TAPESTRY-1922

EJB3 Beans can not be referenced as properties inside JBoss 4.0

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.7
    • Fix Version/s: 5.0.7
    • Component/s: None
    • Labels:
      None
    • Environment:
      JBoss 4.2.2

      Description

      When trying to deploy an application on JBoss which also references my EJB3 beans, I get a "no classloader found for" exception in the when passing a context from one page to the next.

      This seems to be caused by the use of Class.forName in ComponentEventImpl.

      Replacing line 82
      Class desiredType = Class.forName(desiredTypeName);
      with
      ClassLoader loader = Thread.currentThread().getContextClassLoader();
      if ( loader == null ) loader = this.getClass().getClassLoader();
      Class desiredType = Class.forName(desiredTypeName, true, loader);

      Seems to fix this problem.

        Activity

        Hide
        Howard M. Lewis Ship added a comment -

        I will sheepishly admit I didn't test this, so please try out the snapshot tomorrow and give it a whirl. My solution was slightly more involved, it uses the component class loaders, whose parent is the context class loader, and it passes it around a bit so that we don't constantly have to figure out the right loader. Final is the new private and all.

        Show
        Howard M. Lewis Ship added a comment - I will sheepishly admit I didn't test this, so please try out the snapshot tomorrow and give it a whirl. My solution was slightly more involved, it uses the component class loaders, whose parent is the context class loader, and it passes it around a bit so that we don't constantly have to figure out the right loader. Final is the new private and all.

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Joachim Van der Auwera
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development