You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Rafael Marins (JIRA)" <ji...@apache.org> on 2011/01/01 16:40:47 UTC
[jira] Commented: (KARAF-344) Deploying a new JAAS config requires
to restart the framework
[ https://issues.apache.org/jira/browse/KARAF-344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12976410#action_12976410 ]
Rafael Marins commented on KARAF-344:
-------------------------------------
Don't think the problem was the imports. Seems like the blueprint deployer automatically adds imports to the bundle service when discovered.
I've tried with a clean Karaf install and it worked fine. Don't know what is wrong in my other Karaf environment, it's giving Service not found (not ClassNotFoundException), but it's not really big a problem. See below the results of my tests from clean Karaf installation and, please, close this issue properly.
tar zxvf ~/Downloads/apache-karaf-2.1.2.tar.gz
...
x apache-karaf-2.1.2/system/org/apache/aries/jmx/org.apache.aries.jmx.blueprint/0.2-incubating/
localhost:test rmarins$ cd apache-karaf-2.1.2/
localhost:apache-karaf-2.1.2 rmarins$ ./bin/karaf
__ __ ____
/ //_/____ __________ _/ __/
/ ,< / __ `/ ___/ __ `/ /_
/ /| |/ /_/ / / / /_/ / __/
/_/ |_|\__,_/_/ \__,_/_/
Apache Karaf (2.1.2)
Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or 'osgi:shutdown' to shutdown Karaf.
karaf@root> osgi:install \-s mvn:org.neociclo.samples.karaf/jaas-config-requires-restart/1.0-SNAPSHOT
Bundle ID: 32
karaf@root> nc:jaaslogin karaf karaf
Login succeed for realm=nctest, user=karaf
karaf@root>
> Deploying a new JAAS config requires to restart the framework
> -------------------------------------------------------------
>
> Key: KARAF-344
> URL: https://issues.apache.org/jira/browse/KARAF-344
> Project: Karaf
> Issue Type: Bug
> Affects Versions: 2.1.2
> Environment: Apache Maven 2.2.1 (r801777; 2009-08-06 16:16:01-0300)
> Java version: 1.6.0_22
> Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
> Default locale: en_US, platform encoding: MacRoman
> OS name: "mac os x" version: "10.6.5" arch: "x86_64" Family: "mac"
> Reporter: Rafael Marins
> Assignee: Andreas Pieber
> Fix For: 2.1.3, 2.2.0
>
> Attachments: jaas-config-requires-restart.zip
>
>
> The JAAS realm cannot be used just after a fresh deployment of the JAAS config blueprint xml. The framework needs to be restarted.
> I've prepared the attached project to test this behavior. You can build and simply follow the steps:
> karaf@root> osgi:install \-s mvn:org.neociclo.samples.karaf/jaas-config-requires-restart/1.0-SNAPSHOT
> Bundle ID: 330
> karaf@root> nc:jaaslogin user pwd
> org.osgi.service.blueprint.container.ServiceUnavailableException: Service is unavailable
> at org.apache.aries.blueprint.container.ReferenceListRecipe$ServiceDispatcher.call(ReferenceListRecipe.java:201)
> at org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe$CgLibProxyFactory$1.loadObject(AbstractServiceReferenceRecipe.java:652)
> at org.apache.karaf.jaas.config.JaasRealm$$EnhancerByCGLIB$$59154.getName(<generated>)
> at org.apache.karaf.jaas.config.impl.OsgiConfiguration.getAppConfigurationEntry(OsgiConfiguration.java:52)
> at javax.security.auth.login.LoginContext.init(LoginContext.java:243)
> at javax.security.auth.login.LoginContext.<init>(LoginContext.java:367)
> at javax.security.auth.login.LoginContext.<init>(LoginContext.java:444)
> at org.neociclo.samples.karaf.JaasLoginShellCommand.doExecute(JaasLoginShellCommand.java:41)
> at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:38)
> at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)
> at org.apache.felix.gogo.runtime.shell.CommandProxy.execute(CommandProxy.java:50)
> at org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:229)
> at org.apache.felix.gogo.runtime.shell.Closure.executeStatement(Closure.java:162)
> at org.apache.felix.gogo.runtime.shell.Pipe.run(Pipe.java:101)
> at org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:79)
> at org.apache.felix.gogo.runtime.shell.CommandSessionImpl.execute(CommandSessionImpl.java:71)
> at org.apache.karaf.shell.console.jline.Console.run(Console.java:169)
> at java.lang.Thread.run(Thread.java:680)
> Failed to load LoginContext for realm=nctestkaraf@root> shutdown
> localhost:karaf rmarins$ ./bin/karaf
> __ __ ____
> / //_/____ __________ _/ __/
> / ,< / __ `/ ___/ __ `/ /_
> / /| |/ /_/ / / / /_/ / __/
> /_/ |_|\__,_/_/ \__,_/_/
> Apache Karaf (2.1.2)
> Hit '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' or 'osgi:shutdown' to shutdown Karaf.
> karaf@root> nc:jaaslogin user pwd
> javax.security.auth.login.FailedLoginException: User user does not exist
> at org.apache.karaf.jaas.modules.properties.PropertiesLoginModule.login(PropertiesLoginModule.java:97)
> at org.apache.karaf.jaas.boot.ProxyLoginModule.login(ProxyLoginModule.java:83)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at javax.security.auth.login.LoginContext.invoke(LoginContext.java:769)
> at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
> at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
> at java.security.AccessController.doPrivileged(Native Method)
> at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
> at javax.security.auth.login.LoginContext.login(LoginContext.java:579)
> at org.neociclo.samples.karaf.JaasLoginShellCommand.doExecute(JaasLoginShellCommand.java:61)
> at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:38)
> at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)
> at org.apache.felix.gogo.runtime.shell.CommandProxy.execute(CommandProxy.java:50)
> at org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:229)
> at org.apache.felix.gogo.runtime.shell.Closure.executeStatement(Closure.java:162)
> at org.apache.felix.gogo.runtime.shell.Pipe.run(Pipe.java:101)
> at org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:79)
> at org.apache.felix.gogo.runtime.shell.CommandSessionImpl.execute(CommandSessionImpl.java:71)
> at org.apache.karaf.shell.console.jline.Console.run(Console.java:169)
> at java.lang.Thread.run(Thread.java:680)
> Login failed
> karaf@root> nc:jaaslogin karaf karaf
> Login succeed for realm=nctest, user=karaf
> karaf@root>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.