3 Replies Latest reply on Jan 7, 2008 1:36 AM by barramundi

    Custom Authenticator class not found

    barramundi

      JBOSS 4.0.5GA

      Wrote a similar Authenticator to GenericHeaderAuthenticator
      (http://wiki.jboss.org/wiki/Wiki.jsp?page=GenericHeaderBasedAuthentication)
      and placed the jar file at
      <jboss-4.0.5.GA>\server\default\deploy\jbossweb-tomcat55.sar

      However JBoss can't find it throwing error
      java.lang.ClassNotFoundException: TestAuthenticator

      Tried to place at
      <jboss-4.0.5.GA>\server\default\lib &
      <jboss-4.0.5.GA>\lib
      but JBoss does not find it as well.

      Even tried to place the class file inside <jboss-4.0.5.GA>\server\default\deploy\jbossweb-tomcat55.sar\tomcat55-service.jar

      Where should I place the custom authenticator in order for JBoss to find it?

        • 1. Re: Custom Authenticator class not found
          ragavgomatam

          In the jboss server classpath :- either under $JBOSS_HOME/server/default/lib or modify the %CLASSPATH% in run.bat/run.sh and add the jar location there

          • 2. Re: Custom Authenticator class not found
            barramundi

            Actually I tried that after posting this topic, but got the same error.
            I edited the run.bat to include the jar file
            -classpath "%JBOSS_CLASSPATH%;C:\jbosscustauth.jar"

            error as below:

            2008-01-07 11:02:38,796 ERROR [org.jboss.web.tomcat.security.config.JBossContextConfig] Failed to customize authenticators::
            java.lang.ClassNotFoundException: TestAuthenticator
            at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
            at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:575)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
            at org.jboss.web.tomcat.security.config.JBossContextConfig.getAuthenticators(JBossContextConfig.java:108)

            • 3. Re: Custom Authenticator class not found
              barramundi

              Found the problem to be compiler JDK version.
              Referring to http://wiki.jboss.org/wiki/Wiki.jsp?page=DeterminingClassVersionFromADotClassFile
              I found the bytecode major version to be jdk 1.5

              Compiled back with 1.4 and the problem is gone.

              Strange though, that the error was not java.lang.UnsupportedClassVersionError