8 Replies Latest reply on Jul 4, 2013 2:15 PM by keller13

    JAASLoginInterceptor leads to java.lang.ClassNotFoundException: org.apache.karaf.jaas.boot.principal.RolePrincipal

    keller13

      I am using fuse-esb-7.1.0.fuse-047 which is based on Karaf 2.3.0.fuse-71-047.

       

      I tried to secure a CXF restful service using JAAS login interceptor. From my blueprint.xml the configuration of the JAASLoginInterceptor:

       

      <jaxrs:inInterceptors>

            <ref component-id="authenticationInterceptor"/>

      </jaxrs:inInterceptors>

       

      <bean id="authenticationInterceptor" class="org.apache.cxf.interceptor.security.JAASLoginInterceptor">

              <property name="contextName" value="karaf"/>

      </bean>

       

      However, I got java.lang.ClassNotFoundException: org.apache.karaf.jaas.boot.principal.RolePrincipal. According to http://fusesource.com/forums/thread.jspa?messageID=16780 this is

      a CXF bug that should have been fixed. Is this bug really fixed?

       

      Or do I do something the wrong way? E.g. I tried to add according import packages but without any success. From my pom.xml:

       

      <Import-Package>

          org.apache.karaf.jaas.boot,

          org.apache.karaf.jaas.boot.principal,

          org.apache.karaf.jaas.config,

          org.eclipse.jetty.plus.jaas,

          *

      </Import-Package>

       

      Do I need to add an uninstalled feature? Or is it possible that other installed features lead to this exception?

       

      See below the Java stack trace.

       

      Thanks, Peter

       

       

      2013-06-26 16:44:05,899 | WARN  | qtp853932697-157 | ServletHandler               | ?                               ? | 90 - org.eclipse.jetty.util - 7.6.7.v20120910 | /cxf/rest/cases/

      java.lang.reflect.UndeclaredThrowableException


      at org.ops4j.pax.web.service.internal.$Proxy28.service(Unknown Source)[100:org.ops4j.pax.web.pax-web-runtime:1.1.9]

      at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:652)[80:org.eclipse.jetty.servlet:7.6.7.v20120910]

      at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:447)[80:org.eclipse.jetty.servlet:7.6.7.v20120910]

      at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:70)[98:org.ops4j.pax.web.pax-web-jetty:1.1.9]

      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)[84:org.eclipse.jetty.server:7.6.7.v20120910]

      at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:534)[82:org.eclipse.jetty.security:7.6.7.v20120910]

      at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)[84:org.eclipse.jetty.server:7.6.7.v20120910]

      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1038)[84:org.eclipse.jetty.server:7.6.7.v20120910]

      at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:117)[98:org.ops4j.pax.web.pax-web-jetty:1.1.9]

      at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:374)[80:org.eclipse.jetty.servlet:7.6.7.v20120910]

      at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)[84:org.eclipse.jetty.server:7.6.7.v20120910]

      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:972)[84:org.eclipse.jetty.server:7.6.7.v20120910]

      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)[84:org.eclipse.jetty.server:7.6.7.v20120910]

      at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:75)[98:org.ops4j.pax.web.pax-web-jetty:1.1.9]

      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)[84:org.eclipse.jetty.server:7.6.7.v20120910]

      at org.eclipse.jetty.server.Server.handle(Server.java:363)[84:org.eclipse.jetty.server:7.6.7.v20120910]

      at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:483)[84:org.eclipse.jetty.server:7.6.7.v20120910]

      at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:920)[84:org.eclipse.jetty.server:7.6.7.v20120910]

      at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:982)[84:org.eclipse.jetty.server:7.6.7.v20120910]

      at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635)[79:org.eclipse.jetty.http:7.6.7.v20120910]

      at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)[79:org.eclipse.jetty.http:7.6.7.v20120910]

      at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)[84:org.eclipse.jetty.server:7.6.7.v20120910]

      at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:627)[81:org.eclipse.jetty.io:7.6.7.v20120910]

      at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:51)[81:org.eclipse.jetty.io:7.6.7.v20120910]

      at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)[90:org.eclipse.jetty.util:7.6.7.v20120910]

      at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)[90:org.eclipse.jetty.util:7.6.7.v20120910]

      at java.lang.Thread.run(Thread.java:722)[:1.7.0_21]

      Caused by: java.lang.reflect.InvocationTargetException


      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_21]

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_21]

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_21]

      at java.lang.reflect.Method.invoke(Method.java:601)[:1.7.0_21]

      at org.ops4j.pax.web.service.internal.HttpServiceStarted$1.invoke(HttpServiceStarted.java:182)[100:org.ops4j.pax.web.pax-web-runtime:1.1.9]

      ... 27 more

      Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: org.apache.karaf.jaas.boot.principal.RolePrincipal not found by org.apache.cxf.cxf-rt-transports-http [178]


      at org.eclipse.jetty.plus.jaas.JAASLoginService.getGroups(JAASLoginService.java:327)

      at org.eclipse.jetty.plus.jaas.JAASLoginService.login(JAASLoginService.java:244)

      at org.eclipse.jetty.security.authentication.BasicAuthenticator.validateRequest(BasicAuthenticator.java:88)

      at org.eclipse.jetty.security.authentication.DeferredAuthentication.authenticate(DeferredAuthentication.java:108)

      at org.eclipse.jetty.server.Request.getUserPrincipal(Request.java:1251)

      at org.apache.cxf.transport.http.AbstractHTTPDestination.setupMessage(AbstractHTTPDestination.java:332)[178:org.apache.cxf.cxf-rt-transports-http:2.6.0.fuse-71-047]

      at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:219)[178:org.apache.cxf.cxf-rt-transports-http:2.6.0.fuse-71-047]

      at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:213)[178:org.apache.cxf.cxf-rt-transports-http:2.6.0.fuse-71-047]

      at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:154)[178:org.apache.cxf.cxf-rt-transports-http:2.6.0.fuse-71-047]

      at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:130)[178:org.apache.cxf.cxf-rt-transports-http:2.6.0.fuse-71-047]

      at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:221)[178:org.apache.cxf.cxf-rt-transports-http:2.6.0.fuse-71-047]

      at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:146)[178:org.apache.cxf.cxf-rt-transports-http:2.6.0.fuse-71-047]

      at javax.servlet.http.HttpServlet.service(HttpServlet.java:693)[95:org.apache.geronimo.specs.geronimo-servlet_2.5_spec:1.1.2]

      at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:197)[178:org.apache.cxf.cxf-rt-transports-http:2.6.0.fuse-71-047]

      ... 32 more

      Caused by: java.lang.ClassNotFoundException: org.apache.karaf.jaas.boot.principal.RolePrincipal not found by org.apache.cxf.cxf-rt-transports-http [178]


      at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1499)

      at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75)

      at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1882)

      at java.lang.ClassLoader.loadClass(ClassLoader.java:356)[:1.7.0_21]

      at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1814)

      at org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:929)

      at org.ops4j.pax.swissbox.core.BundleClassLoader.findClass(BundleClassLoader.java:176)

      at org.ops4j.pax.swissbox.core.BundleClassLoader.loadClass(BundleClassLoader.java:194)

      at java.lang.ClassLoader.loadClass(ClassLoader.java:356)[:1.7.0_21]

      at org.eclipse.jetty.plus.jaas.JAASLoginService.getGroups(JAASLoginService.java:315)

      ... 45 more

       

      EDITED: I deleted "I can reproduce this exception using JBoss FUSE ESB 6.0 that is also based on the same Karaf version." from the orginal post as using JBoss FUSE ESB 6.0 is the solution to my problem. Obviously, I must have been making some weird thing when testing my bundle with this OSGI server. Mea culpa.

        • 1. Re: JAASLoginInterceptor leads to java.lang.ClassNotFoundException: org.apache.karaf.jaas.boot.principal.RolePrincipal
          ffang

          Hi,

           

          The error like

          Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: org.apache.karaf.jaas.boot.principal.RolePrincipal not found by org.apache.cxf.cxf-rt-transports-http [178]

           

          is caused by a context classloader issue from CXF side, and  this issue already get resolved for JBoss Fuse 6.0, and in your pom.xml,

          you need add

           

               <plugin>

                          <groupId>org.apache.maven.plugins</groupId>

                          <artifactId>maven-jar-plugin</artifactId>

                          <version>2.4</version>

                          <configuration>

                              <archive>

                                  <index>true</index>

                                  <manifestEntries>

                                      <Import-Package>

                                          org.eclipse.jetty.plus.jaas,

                                          org.apache.karaf.jaas.boot.principal,*

                                      </Import-Package>

                                  </manifestEntries>

                              </archive>

                          </configuration>

                      </plugin>

           

          which will indicate fab to import necessary package.

          Freeman

           

          • 2. Re: JAASLoginInterceptor leads to java.lang.ClassNotFoundException: org.apache.karaf.jaas.boot.principal.RolePrincipal
            keller13

            Hi Freeman

             

            Thank you for your answer!

             

            Actually I already added the import packages, however without any success (I used the Felix plugin but this should not make any difference):

             

                       <plugin>

                            <groupId>org.apache.felix</groupId>

                            <artifactId>maven-bundle-plugin</artifactId>

                            <version>2.3.5</version>

                            <extensions>true</extensions>

                            <configuration>

                                <instructions>

                                    <Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>

                                    <Import-Package>

                                           org.apache.karaf.jaas.boot.principal,

                                           org.eclipse.jetty.plus.jaas,

                                           org.apache.karaf.jaas.config,

                                           *

                                       </Import-Package>

                                    <Private-Package>

                                        ch.deimos.soe.ws.service

                                    </Private-Package>

                                    <Require-Bundle>org.apache.cxf.bundle</Require-Bundle>

                                </instructions>

                            </configuration>

                        </plugin>

             

            Further tests showed, that if I use a vanilla FUSE ESB installation without any added features etc. than everything works as expected.

             

            However, if I first add following feature (referencing other feathers and different bundles) with "features:install soe-esb" than the ClassNotFoundException occurs. And it still occurs if I remove the feature again with "features:uninstall soe-esb":

             

               <feature name="soe-esb">

                    <feature>webconsole</feature>

                    <feature>mq-web-console</feature>

                    <feature>camel-apns</feature>

                    <feature>camel-jackson</feature>

                    <feature>jndi</feature>

                    <feature>jpa</feature>

                    <feature>transaction</feature>

             

                    <bundle>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.java-persistence-api-2.0/2.2.0</bundle>

                    <bundle>mvn:commons-collections/commons-collections/3.2.1</bundle>

                    <bundle>mvn:commons-pool/commons-pool/1.5.4</bundle>

                    <bundle>mvn:commons-dbcp/commons-dbcp/1.4</bundle>

                    <bundle>mvn:commons-lang/commons-lang/2.6</bundle>

                    <bundle>wrap:mvn:net.sourceforge.serp/serp/1.13.1</bundle>

                    <bundle>mvn:org.apache.openjpa/openjpa/2.2.1</bundle>

                    <bundle>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.stax-api-1.0/1.9.0</bundle>

                    <bundle>mvn:mysql/mysql-connector-java/5.1.24</bundle>

                    <bundle>mvn:org.codehaus.jackson/jackson-jaxrs/1.9.10</bundle>

                    <bundle>mvn:com.fasterxml.jackson.core/jackson-core/2.1.4</bundle>

                    <bundle>mvn:com.fasterxml.jackson.core/jackson-annotations/2.1.4</bundle>

                    <bundle>mvn:com.fasterxml.jackson.core/jackson-databind/2.1.4</bundle>

                    <bundle>mvn:com.notnoop.apns/apns/0.2.3</bundle>

                    <bundle>mvn:org.apache.commons/commons-lang3/3.1</bundle>  

                </feature>

             

            Any ideas?

             

            Peter

             

            EDITED: Everything  works as expected if I use a vanilla jboss-fuse-6.0.0.redhat-024 installation but not if I use a vanilla fuse-esb-7.1.0.fuse installation.

            • 3. Re: JAASLoginInterceptor leads to java.lang.ClassNotFoundException: org.apache.karaf.jaas.boot.principal.RolePrincipal
              ffang

              Hi,

               

              Please use maven-jar-plugin as I showed, as it could be understand by fab.

               

              The example we build here isn't a bundle, it's a fab jar, so I don't think maven-bundle-plugin should be here.

               

              Freeman

              • 4. Re: JAASLoginInterceptor leads to java.lang.ClassNotFoundException: org.apache.karaf.jaas.boot.principal.RolePrincipal
                keller13

                Actually, I wanted to build a normal OSGI bundle not a fab...

                 

                Creating a fab instead of a OSGI bundle jar as you propose I run into following problems:

                1. If I don't put all packages on one line in the <import-package> section, than I got error message that the MANIFEST.MF file has a corrupt header. Of course I could just put all packages on one line...
                2. All referenced bundles of our project have to be transfered to fab modules or Eclipse will not recognize the referenced Java classes
                3. More seriously, I got following exception when deploying the fab: java.lang.ClassNotFoundException: javax.jms.ConnectionFactory not found by ch.deimos.soe.soe-esb-ws [386]. Any ideas?

                 

                On the other side, I don't understand, why it is necessary to build a fab instead of a normal OSGI bundle at all. Shouldn't it work properly, when the package org.pache.karaf.jaas.boot.principal is included in the MANIFIST.MF file created by the felix maven plugin, see below? The most serious problem however is, that a successful runtime behaviour depends on the already installed features (see my last post), this is really fatal!

                 

                Thanks, Peter

                 

                Manifest-Version: 1

                Bnd-LastModified: 1372685492821

                Build-Jdk: 1.7.0_21

                Built-By: peter.keller

                Bundle-DocURL: http://www.deimos.ch

                Bundle-ManifestVersion: 2

                Bundle-Name: SOE :: ESB :: Rest Webservices

                Bundle-SymbolicName: ch.deimos.soe.soe-esb-ws

                Bundle-Vendor: Deimos AG

                Bundle-Version: 0.0.1.SNAPSHOT

                Created-By: Apache Maven Bundle Plugin

                Export-Package: ch.deimos.soe.ws.mapper;uses:="javax.ws.rs.ext,ch.deimos

                .soe.persistence.service.exception,org.slf4j,javax.ws.rs.core,org.codeh

                aus.jackson.map";version="0.0.1.SNAPSHOT",ch.deimos.soe.ws.mapper.util;

                uses:="org.springframework.beans.factory.annotation,org.apache.cxf.ws.a

                ddressing,org.apache.cxf.binding,org.slf4j,org.apache.cxf.message,org.a

                pache.cxf.configuration.security,org.apache.cxf.transport,org.apache.cx

                f.binding.soap.interceptor,org.apache.cxf.endpoint,org.apache.cxf.inter

                ceptor,org.apache.cxf.interceptor.security,org.apache.cxf.security,java

                x.security.auth,org.apache.cxf.phase,org.apache.cxf.common.security,org

                .apache.cxf.common.i18n,javax.security.auth.callback,org.apache.cxf.jax

                rs.ext,org.apache.cxf.jaxrs.model,org.apache.cxf.jaxrs.impl,org.apache.

                cxf.jaxrs.utils,javax.ws.rs.core,org.apache.cxf.common.logging,javax.se

                curity.auth.login,org.apache.ws.security";version="0.0.1.SNAPSHOT",ch.d

                eimos.soe.ws.route;uses:="org.apache.camel.builder";version="0.0.1.SNAP

                SHOT",ch.deimos.soe.ws.service;uses:="javax.annotation,org.apache.cxf.j

                axrs.ext,org.slf4j,javax.ws.rs.core,ch.deimos.soe.persistence.service,j

                avax.ws.rs,ch.deimos.soe.base.data,ch.deimos.soe.persistence.service.ex

                ception,ch.deimos.soe.base.data.filter,org.apache.cxf.jaxrs.ext.search,

                javax.jms,javax.ws.rs.ext,org.apache.commons.lang3,org.codehaus.jackson

                .map";version="0.0.1.SNAPSHOT"

                Export-Service: org.apache.karaf.jaas.modules.BackingEngineFactory

                Import-Package: ch.deimos.soe.base.data;version="[0.0,1)",ch.deimos.soe.

                base.data.filter;version="[0.0,1)",ch.deimos.soe.persistence.service;ve

                rsion="[0.0,1)",ch.deimos.soe.persistence.service.exception;version="[0

                .0,1)",javax.annotation;version="[1.1,2)",javax.jms;version="[1.1,2)",j

                avax.security.auth,javax.security.auth.callback,javax.security.auth.log

                in,javax.ws.rs;version="[1.1,2)",javax.ws.rs.core;version="[1.1,2)",jav

                ax.ws.rs.ext;version="[1.1,2)",org.apache.camel.builder;version="[2.10,

                3)",org.apache.commons.lang3;version="[3.1,4)",org.apache.cxf.binding;v

                ersion="[2.6,3)",org.apache.cxf.binding.soap.interceptor;version="[2.6,

                3)",org.apache.cxf.common.i18n;version="[2.6,3)",org.apache.cxf.common.

                logging;version="[2.6,3)",org.apache.cxf.common.security;version="[2.6,

                3)",org.apache.cxf.configuration.security;version="[2.6,3)",org.apache.

                cxf.endpoint;version="[2.6,3)",org.apache.cxf.interceptor;version="[2.6

                ,3)",org.apache.cxf.interceptor.security;version="[2.6,3)",org.apache.c

                xf.jaxrs.ext;version="[2.6,3)",org.apache.cxf.jaxrs.ext.search;version=

                "[2.6,3)",org.apache.cxf.jaxrs.impl;version="[2.6,3)",org.apache.cxf.ja

                xrs.model;version="[2.6,3)",org.apache.cxf.jaxrs.model.wadl;version="[2

                .6,3)",org.apache.cxf.jaxrs.security;version="[2.6,3)",org.apache.cxf.j

                axrs.utils;version="[2.6,3)",org.apache.cxf.message;version="[2.6,3)",o

                rg.apache.cxf.phase;version="[2.6,3)",org.apache.cxf.security;version="

                [2.6,3)",org.apache.cxf.transport;version="[2.6,3)",org.apache.cxf.ws.a

                ddressing;version="[2.6,3)",org.apache.karaf.jaas.boot.principal,org.ap

                ache.karaf.jaas.config,org.apache.karaf.jaas.modules,org.apache.karaf.j

                aas.modules.properties,org.apache.ws.security,org.codehaus.jackson.jaxr

                s;version="[1.9,2)",org.codehaus.jackson.map;version="[1.9,2)",org.ecli

                pse.jetty.plus.jaas,org.osgi.service.blueprint;version="[1.0.0,2.0.0)",

                org.slf4j;version="[1.7,2)",org.springframework.beans.factory.annotatio

                n

                Import-Service: ch.deimos.soe.persistence.service.CaseEntryService;multi

                ple:=false,ch.deimos.soe.persistence.service.CaseGroupEntryService;mult

                iple:=false,ch.deimos.soe.persistence.service.CaseParticipantEntryServi

                ce;multiple:=false,ch.deimos.soe.persistence.service.CorpsEntryService;

                multiple:=false,ch.deimos.soe.persistence.service.DeviceEntryService;mu

                ltiple:=false,ch.deimos.soe.persistence.service.GroupEntryService;multi

                ple:=false,ch.deimos.soe.persistence.service.MemberEntryService;multipl

                e:=false,ch.deimos.soe.persistence.service.MessageEntryService;multiple

                :=false,ch.deimos.soe.persistence.service.OperationEntryService;multipl

                e:=false,ch.deimos.soe.persistence.service.OperationParticipantEntrySer

                vice;multiple:=false,ch.deimos.soe.persistence.service.ParticipantEntry

                Service;multiple:=false,ch.deimos.soe.persistence.service.SessionEntryS

                ervice;multiple:=false,javax.jms.ConnectionFactory;multiple:=false

                Require-Bundle: org.apache.cxf.bundle

                Tool: Bnd-1.43.0

                • 5. Re: JAASLoginInterceptor leads to java.lang.ClassNotFoundException: org.apache.karaf.jaas.boot.principal.RolePrincipal
                  ffang

                  Hi,

                   

                  Of course you can use normal OSGi bundle, no fab get involved at all.

                  I thought we are talking about the secure-rest example shipped with kit, which is built as a fab jar.

                  Anyway,  I noticed that in your bundles header, there's a "Require-Bundle: org.apache.cxf.bundle", this shouldn't be here since CXF 2.6.x, could you please remove it?

                  If you still see this issue, we need a testcase to see how your bundle ch.deimos.soe.soe-esb-ws looks like(and a client to invoke this endpoint). As I can't reproduce the behavior you described here,  the secured rest endpoint in my test always works even after install your soe-esb feature.

                   

                   

                  Freeman

                  • 6. Re: JAASLoginInterceptor leads to java.lang.ClassNotFoundException: org.apache.karaf.jaas.boot.principal.RolePrincipal
                    keller13

                    Hi Freeman,

                     

                    I built a new bundle with the bare minimum (without the Require-Bundle section), and I got the same exception.

                     

                    However, with following setup it works:

                     

                    1. Unzip vanilla FUSE to fuse-esb-7.1.0.fuse-047
                    2. Enabling user admin in fuse-esb-7.1.0.fuse-047\etc\users.properties: admin=admin,admin
                    3. Copy Bundle JAR to fuse-esb-7.1.0.fuse-047\deploy
                    4. Start the server with cd fuse-esb-7.1.0.fuse-047\bin and fuseesb.bat
                    5. log:tail
                    6. Invoke the REST service -> I see the ClassNotFoundException in the log!!!
                    7. Stop the server
                    8. Rename fuse-esb-7.1.0.fuse-047 to fuse-esb-7.1.0.fuse-047-copy
                    9. Start the server with cd fuse-esb-7.1.0.fuse-047-copy and fuseesb.bat
                    10. log:tail -> I see the exception that the file activemq.xml has not been found. Note that the old file location fuse-esb-7.1.0.fuse-047 is used: IOException parsing XML document from class path resource [D:/java/container/fuse-esb-7.1.0.fuse-047/etc/activemq.xml]
                    11. Invoke the REST service -> No ClassNotFoundException in the log!!!

                     

                    My conclusion: if the the ActiveMQ server could not be started, than the authentication works. Of course, this does not really helps, as we need the ActiveMQ server.

                     

                    Does this make sens to you? Any ideas?

                     

                    Thanks.

                     

                    Peter

                    • 7. Re: JAASLoginInterceptor leads to java.lang.ClassNotFoundException: org.apache.karaf.jaas.boot.principal.RolePrincipal
                      ffang

                      Hi,

                       

                      The issue discussed in [1] was fixed in JBoss Fuse 6, so you need test with JBoss Fuse 6.

                       

                      [1]http://fusesource.com/forums/thread.jspa?messageID=16780

                       

                      Freeman

                      • 8. Re: JAASLoginInterceptor leads to java.lang.ClassNotFoundException: org.apache.karaf.jaas.boot.principal.RolePrincipal
                        keller13

                        Thanks, Freeman. JBoss Fuse 6.0 does the job!

                         

                        I guess that some weired issues I got was because I copied and/or renamed the ESB installation directory for my tests. This was obviously a bad idea as some configuration in the data directory uses absolute paths and not relative paths.

                         

                        Peter