3 Replies Latest reply on Mar 21, 2007 3:20 AM by Antoine Herzog

    NoClassDefFoundError exception related to filter

    Lidia Garavaglia Newbie

      Hello everybody :)
      I deployed a portal on Jboss Portal Server, and all works fine.

      Now I have to integrate a filter, to change login mechanism, using libraries developed by other people.
      I specified filter mapping in %jboss_home%\server\default\deploy\jbossweb-tomcat55.sar\conf\web.xml and deployed libraries in %jboss_home%\lib folder .
      When starting Jboss, I get following exception:

      11:34:08,937 ERROR [[/invoker]] Exception starting filter
      java.lang.NoClassDefFoundError: <class inside filter library>

      (of course replace name between <> with name of filter software)
      The class which is not found is inside filter library, placed in %jboss_home%\lib folder and also in other lib folder of jboss portal, but it seems somewhere is not found.
      Its developers also told me that in JBoss (not portal) their filter worked correctly, so I think there is something wrong in my JBossPortal configuration.

      Does anyone have any suggestion?

        • 1. Re: NoClassDefFoundError exception related to filter
          Antoine Herzog Master

          for the login mechanism, you should look in the portal-server.war
          It is at \deploy\jboss-portal.sar\portal-server.war

          unpack the zip to work at it... more easy for testing.

          in the web.xml, you'll see the filters that are responsible for the authentication process.
          it should be a better place for your filter.

          those are for the login process in the portal... then look at the Jaas login module and security for the rest (securing the ejb etc...).
          As it is built, it provides authentication for the portal and portlets.

          I guess that if the lib with filter have been used for jboss (without portal), it is not only for portlets... so you may need then to see how to propagate the authentication result to other parts of the jboss elements.
          may be use some SSO...

          • 2. Re: NoClassDefFoundError exception related to filter
            Lidia Garavaglia Newbie

            Thanks for your suggestions :)

            I put filters in folder in web.xml of portal-server.war , and modified jar classpath adding the path of not found class (which is always the same), but nothing changed..
            What do you mean in the last paragraph of your message ? Is it necessary to edit filter library code in order to integrate it in jboss portal?

            • 3. Re: NoClassDefFoundError exception related to filter
              Antoine Herzog Master

              for the exception :

              did you tried to put the lib jar in the libs of the \deploy\jboss-portal.sar\portal-server.war ?

              or in the lib folder of the sar : \deploy\jboss-portal.sar\lib ?

              for authentication propagation :
              it depends what you do in "the lib"
              the portal-server.war is in charge of authenticating the user for the portal.
              the jaas login module is used for the security domain of the portal.

              if "the lib" is supposed to provide authentification for other thing (like some ejb you will use later in the portlet), then you may have to propagate the authentication.
              or at least, modify the portal authentification so it is extended to what is needed else where.

              anyway, it depends what you do in "the lib".
              and it is understandable you don't talk about this on a forum, if it is a security matter of your system.

              may be look at some acegi security system integration with the portal : there are some post, and a wiki about this.
              may be you'll find some thing about your problem.