glassfish
  1. glassfish
  2. GLASSFISH-19668

WELD - ClassNotFoundException: BoundContextRequest

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.2.2
    • Fix Version/s: 4.0
    • Component/s: cdi
    • Labels:
      None
    • Environment:

      Windows 7 64Bit

      Description

      Experienceing the same issue as http://java.net/jira/browse/GLASSFISH-19226 but with the BoundContextRequest class.
      We get the error if our direct class or subclass tries to "@Inject BoundContextRequest request;" and our application doesn't deploy.

      Seems like that package isn't visible to the server? The classes are in the weld-osgi-bundle.jar.

      I've tried the standard 1.1.8-final version and even the 1.1.10-final and same issues.

        Activity

        Hide
        jwells added a comment -

        So... I can't find a class called "BoundContextRequest" in Weld.

        I have found these though:

        import org.jboss.weld.context.bound.BoundRequestContext;
        import org.jboss.weld.context.bound.BoundSessionContext;

        However, when I @Inject either of these things into a previously working EJB suddenly the thing isn't even recognized as an EJB anymore:

        Command deploy failed.
        remote failure: Error occurred during deployment: Exception while deploying the app [ejb1] : Invalid ejb jar ejb1: it contains zero ejb. A valid ejb jar requires at least one session/entity/message driven bean.. Please see server.log for more details.

        I've even tried to export the given package org.jboss.weld.context.bound to see if that would fix it, but it does not.

        So I guess the questions I have are:

        1. What class exactly do you mean (along with package)
        2. Can you post the EAR or WAR or EJB jar containing your code that doesn't work?
        3. Could you post more of your code so we can see if there is anything else of interest?

        Thanks!

        Show
        jwells added a comment - So... I can't find a class called "BoundContextRequest" in Weld. I have found these though: import org.jboss.weld.context.bound.BoundRequestContext; import org.jboss.weld.context.bound.BoundSessionContext; However, when I @Inject either of these things into a previously working EJB suddenly the thing isn't even recognized as an EJB anymore: Command deploy failed. remote failure: Error occurred during deployment: Exception while deploying the app [ejb1] : Invalid ejb jar ejb1: it contains zero ejb. A valid ejb jar requires at least one session/entity/message driven bean.. Please see server.log for more details. I've even tried to export the given package org.jboss.weld.context.bound to see if that would fix it, but it does not. So I guess the questions I have are: 1. What class exactly do you mean (along with package) 2. Can you post the EAR or WAR or EJB jar containing your code that doesn't work? 3. Could you post more of your code so we can see if there is anything else of interest? Thanks!
        Hide
        jwells added a comment -

        I did find this in the log:

        [2013-03-20T13:15:40.953-0700] [glassfish 4.0] [SEVERE] [] [global] [tid: _ThreadID=42 _ThreadName=admin-listener(1)] [timeMillis: 1363810540953] [levelValue: 1000] [[
        Class [ Lorg/jboss/weld/context/bound/BoundRequestContext; ] not found. Error while loading [ class com.oracle.hk2.devtest.cdi.ejb1.EjbInjectedWithServiceLocator ]]]

        So I'm assuming this is the same error you saw...

        Show
        jwells added a comment - I did find this in the log: [2013-03-20T13:15:40.953-0700] [glassfish 4.0] [SEVERE] [] [global] [tid: _ThreadID=42 _ThreadName=admin-listener(1)] [timeMillis: 1363810540953] [levelValue: 1000] [[ Class [ Lorg/jboss/weld/context/bound/BoundRequestContext; ] not found. Error while loading [ class com.oracle.hk2.devtest.cdi.ejb1.EjbInjectedWithServiceLocator ]]] So I'm assuming this is the same error you saw...
        Hide
        jwells added a comment -

        Added in the package org.jboss.weld.context.bound to the set of exported packages. Verified by injecting org.jboss.weld.context.bound.BoundRequestContext into an EJB via CDI.

        Show
        jwells added a comment - Added in the package org.jboss.weld.context.bound to the set of exported packages. Verified by injecting org.jboss.weld.context.bound.BoundRequestContext into an EJB via CDI.
        Hide
        tmulle added a comment -

        Awesome! Any idea which version of GF 4.0 this will be in? the nightly? or a promoted version so I can try to deploy my project.

        Show
        tmulle added a comment - Awesome! Any idea which version of GF 4.0 this will be in? the nightly? or a promoted version so I can try to deploy my project.
        Hide
        fishcream added a comment -

        I can't tell from your comment what you did to fix this issue. I have a production server that's running GF 3.1.2.2 that I really need this fixed on. I tried editing the weld-osgi-bundle.jar's MANIFEST.MF file and adding 'org.jboss.weld.context.bound' to the end of the Exported-Package list but it still had the same problem as before. Any change you can share the fix?

        Show
        fishcream added a comment - I can't tell from your comment what you did to fix this issue. I have a production server that's running GF 3.1.2.2 that I really need this fixed on. I tried editing the weld-osgi-bundle.jar's MANIFEST.MF file and adding 'org.jboss.weld.context.bound' to the end of the Exported-Package list but it still had the same problem as before. Any change you can share the fix?

          People

          • Assignee:
            jwells
            Reporter:
            tmulle
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: