I am using Karaf 4.0.7 in combination with com.tagish.jaasmodules, which can be found at https://github.com/chriseldredge/tagish-jaas. It works fine when my code is compiled into jars and placed in the karaf/system/company/prefix/folders/.../ folder with features.xml files included as follows (company prefix folders and irrelevant features edited out):
daemons.server.dependencies-features.xml:
<?xml version="1.0" encoding="UTF-8"?>
<features xmlns="http://karaf.apache.org/xmlns/features/v1.2.1" name="daemons.server.dependencies">
<feature name="daemons.server.dependencies" version="5.8.0"> <bundle>#KARAF_HOME#system/daemons/server/jaasmodules.jar</bundle>
</feature>
</features>
The jaasmodules.jar file also exists and is contained in the same folder as the above and below feature files
daemons.server-features.xml
<?xml version="1.0" encoding="UTF-8"?>
<features xmlns="http://karaf.apache.org/xmlns/features/v1.2.1" name="daemons.server">
<repository>#KARAF_HOME#system/daemons/server/daemons.server.dependencies-features.xml</repository>
<feature name="daemons.server" version="5.8.0">
<feature>daemons.server.dependencies</feature>
<bundle start-level="85">#KARAF_HOME#system/daemons/server/daemons.server.jar</bundle>
</feature>
</features>
These features are then added as featuresRepositories and set to install at startup in org.apache.karaf.features.cfg.
I have a JaasPropertiesLoginModule.xml file in my karaf/deploy folder, contents of which are as follows:
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:jaas="http://karaf.apache.org/xmlns/jaas/v1.0.0"
xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0">
<jaas:config name="ALM">
<jaas:module className="com.tagish.auth.FileLogin" flags="required">
pwdFile=E:/alm/ALM_HEAD/dev/system/security/passwd.config
</jaas:module>
</jaas:config>
<jaas:config name="Sample_FileLogin">
<jaas:module className="com.tagish.auth.FileLogin" flags="required">
pwdFile=E:/alm/ALM_HEAD/dev/system/security/passwd.config
</jaas:module>
</jaas:config>
<jaas:config name="Sample_LDAPLogin">
<jaas:module className="edu.vt.middleware.ldap.jaas.LdapLoginModule" flags="required">
ldapUrl=ldap://ldaphost:389
bindDn=CN=ldapuser,OU=Users,DC=company,DC=com
bindCredential=ldapuserpassword
baseDn=OU=Users,DC=company,DC=com
subtreeSearch=true
userField=sAMAccountName
referral=follow
org.osgi.framework.BundleContext=dummy
</jaas:module>
<jaas:module className="edu.vt.middleware.ldap.jaas.LdapRoleAuthorizationModule" flags="required">
ldapUrl=ldap://ldaphost:389
bindDn=CN=ldapuser,OU=Users,DC=company,DC=com
bindCredential=ldapuserpassword
baseDn=OU=Users,DC=company,DC=com
subtreeSearch=true
userField=sAMAccountName
roleBase=OU=Groups,DC=company,DC=com
roleFilter=(|(sAMAccountName={1})(member={0}))
roleAttribute=memberOf
searchResultHandlers=edu.vt.middleware.ldap.handler.FqdnSearchResultHandler,edu.vt.middleware.ldap.handler.RecursiveSearchResultHandler{{searchAttribute=memberOf}{mergeAttributes=CN}}
referral=follow
org.osgi.framework.BundleContext=dummy
</jaas:module>
</jaas:config>
</blueprint>
The above works perfectly in a standard deployment, with everything being located in the system folder or a subdirectory of the systemfolder apart from the JaasPropertiesLoginModule.xml, which is found in the deploy folder. When I create a new LoginContext using context name ALM, it can properly find the ALM config and initialize the FileLogin module with the correct settings, and this FileLogin module fully functions to login.
However, in our local development environment, instead of the system folder, we have all our jars and dependencies located inside the deploy folder alongside the JaasPropertyLoginModule.xml file, and we don't use the feature file either (which means that we sometimes have to manually start most of our bundles because they don't automatically start). In this particular configuration, when I create a new LoginContext using context name ALM, it gives the following error:
javax.security.auth.login.LoginException: No LoginModules configured for ALM
at javax.security.auth.login.LoginContext.init(LoginContext.java:264)[:1.8.0_172]
at javax.security.auth.login.LoginContext.<init>(LoginContext.java:417)[:1.8.0_172]
at business.server.bs.login.LoginServiceImpl.login(LoginServiceImpl.java:136)
Is there something particular I need to change somewhere to allow the JaasPropertiesLoginModule.xml file to recognize the JaasModules.jar file in the karaf/deploy folder instead of the karaf/system folder?
This is the Karaf log file for a startup procedure:
2019-06-04 13:08:08,976 | INFO | pool-49-thread-1 | SecurityUtils | 64 - org.apache.sshd.core - 0.14.0 | BouncyCastle not registered, using the default JCE provider
2019-06-04 13:08:09,318 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/lib.util.xmlrpc.jar
2019-06-04 13:08:09,320 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/axis.jar
2019-06-04 13:08:09,321 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/bndlib.jar
2019-06-04 13:08:09,324 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/commons-digester.jar
2019-06-04 13:08:09,324 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/stax2-api.jar
2019-06-04 13:08:09,324 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/xmlrpc.jar
2019-06-04 13:08:09,325 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/xstream.jar
2019-06-04 13:08:09,325 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/daemons.shared.jar
2019-06-04 13:08:09,327 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/jfreechart.jar
2019-06-04 13:08:09,331 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/phases.scripting.jar
2019-06-04 13:08:09,336 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/com.springsource.org.apache.velocity.jar
2019-06-04 13:08:09,336 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/jackson-annotations.jar
2019-06-04 13:08:09,340 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/org.osgi.core.jar
2019-06-04 13:08:09,340 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/mail.jar
2019-06-04 13:08:09,341 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/tinybundles.jar
2019-06-04 13:08:09,344 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/jsoup.jar
2019-06-04 13:08:09,348 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/ops4j-base-io.jar
2019-06-04 13:08:09,353 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/ojb.jar
2019-06-04 13:08:09,353 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/trueswing.jar
2019-06-04 13:08:09,354 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/tfs.sdk.jar
2019-06-04 13:08:09,358 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/woodstox-core-asl.jar
2019-06-04 13:08:09,358 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/lib.util.jar
2019-06-04 13:08:09,362 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/util.urlhandlers.almscp.jar
2019-06-04 13:08:09,367 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/org.osgi.compendium.jar
2019-06-04 13:08:09,371 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/commons-validator.jar
2019-06-04 13:08:09,375 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/jackson-databind.jar
2019-06-04 13:08:09,375 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/jcommon.jar
2019-06-04 13:08:09,376 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/com.springsource.org.apache.xml.resolver.jar
2019-06-04 13:08:09,376 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/truelicense.jar
2019-06-04 13:08:09,379 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/httpcore.jar
2019-06-04 13:08:09,382 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/lib.orm.jar
2019-06-04 13:08:09,385 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/com.springsource.org.apache.commons.lang.jar
2019-06-04 13:08:09,386 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/jaasmodules.jar
2019-06-04 13:08:09,388 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/wsdl4j.jar
2019-06-04 13:08:09,391 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/daemons.server.jar
2019-06-04 13:08:09,394 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/commons-discovery.jar
2019-06-04 13:08:09,395 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/jaxrpc-api.jar
2019-06-04 13:08:09,399 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/phases.core.server.jar
2019-06-04 13:08:09,400 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/itext.jar
2019-06-04 13:08:09,403 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/com.springsource.org.apache.commons.net.jar
2019-06-04 13:08:09,404 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/com.springsource.org.apache.oro.jar
2019-06-04 13:08:09,405 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/ops4j-base-lang.jar
2019-06-04 13:08:09,407 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/jackson-core.jar
2019-06-04 13:08:09,408 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/org.apache.servicemix.bundles.jsch.jar
2019-06-04 13:08:09,414 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/truexml.jar
2019-06-04 13:08:09,415 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/ops4j-base-store.jar
2019-06-04 13:08:09,416 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/soap60.jar
2019-06-04 13:08:09,417 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/util.urlhandlers.almftp.jar
2019-06-04 13:08:09,418 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/pax-swissbox-property.jar
2019-06-04 13:08:09,419 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/ops4j-base-monitors.jar
2019-06-04 13:08:09,422 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/pax-url-commons.jar
2019-06-04 13:08:09,422 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/poi.jar
2019-06-04 13:08:09,425 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/vt-ldap.jar
2019-06-04 13:08:09,425 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/protobuf-java.jar
2019-06-04 13:08:09,428 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/commons-pool.jar
2019-06-04 13:08:09,433 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/jasperreports.jar
2019-06-04 13:08:09,434 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/ojdbc16.jar
2019-06-04 13:08:09,435 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/commons-compress.jar
2019-06-04 13:08:09,436 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/com.springsource.org.apache.commons.cli.jar
2019-06-04 13:08:09,436 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/commons-codec.jar
2019-06-04 13:08:09,437 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/httpclient.jar
2019-06-04 13:08:09,441 | DEBUG | FelixStartLevel | xmlrpc | 131 - lib.util.xmlrpc - 7.0.0 | BundleEvent RESOLVED - lib.util.xmlrpc
2019-06-04 13:08:09,441 | DEBUG | FelixStartLevel | util | 152 - lib.util - 7.0.0 | BundleEvent RESOLVED - lib.util
2019-06-04 13:08:09,442 | DEBUG | FelixStartLevel | xmlrpc | 131 - lib.util.xmlrpc - 7.0.0 | BundleEvent STARTING - lib.util.xmlrpc
2019-06-04 13:08:09,442 | DEBUG | FelixStartLevel | xmlrpc | 131 - lib.util.xmlrpc - 7.0.0 | BundleEvent STARTED - .lib.util.xmlrpc
2019-06-04 13:08:09,460 | DEBUG | FelixStartLevel | server 2019-06-04 13:08:09,620 | DEBUG | FelixStartLevel | almftp | 147 - util.urlhandlers.almftp - 5.8.0 | BundleEvent RESOLVED - util.urlhandlers.almftp
2019-06-04 13:08:09,621 | DEBUG | FelixStartLevel | almftp | 147 - util.urlhandlers.almftp - 5.8.0 | BundleEvent STARTING - util.urlhandlers.almftp
2019-06-04 13:08:09,624 | DEBUG | FelixStartLevel | almftp | 147 - util.urlhandlers.almftp - 5.8.0 | ServiceEvent REGISTERED - [org.osgi.service.url.URLStreamHandlerService] - util.urlhandlers.almftp
2019-06-04 13:08:09,625 | DEBUG | FelixStartLevel | almftp | 147 - util.urlhandlers.almftp - 5.8.0 | ServiceEvent REGISTERED - [org.osgi.service.cm.ManagedService] - util.urlhandlers.almftp
2019-06-04 13:08:09,626 | DEBUG | FelixStartLevel | almftp | 147 - util.urlhandlers.almftp - 5.8.0 | BundleEvent STARTED - util.urlhandlers.almftp
2019-06-04 13:08:09,636 | DEBUG | FelixStartLevel | util | 152 - lib.util - 7.0.0 | BundleEvent STARTING - lib.util
2019-06-04 13:08:09,636 | DEBUG | FelixStartLevel | util | 152 - lib.util - 7.0.0 | BundleEvent STARTED - lib.util
2019-06-04 13:08:09,640 | DEBUG | FelixStartLevel | almscp | 153 - util.urlhandlers.almscp - 5.8.0 | BundleEvent RESOLVED - util.urlhandlers.almscp
2019-06-04 13:08:09,641 | DEBUG | FelixStartLevel | almscp | 153 - util.urlhandlers.almscp - 5.8.0 | BundleEvent STARTING - util.urlhandlers.almscp
2019-06-04 13:08:09,642 | DEBUG | FelixStartLevel | almscp | 153 - util.urlhandlers.almscp - 5.8.0 | ServiceEvent REGISTERED - [org.osgi.service.url.URLStreamHandlerService] - util.urlhandlers.almscp
2019-06-04 13:08:09,643 | DEBUG | FelixStartLevel | almscp | 153 - util.urlhandlers.almscp - 5.8.0 | ServiceEvent REGISTERED - [org.osgi.service.cm.ManagedService] - util.urlhandlers.almscp
2019-06-04 13:08:09,644 | DEBUG | FelixStartLevel | almscp | 153 - util.urlhandlers.almscp - 5.8.0 | BundleEvent STARTED - util.urlhandlers.almscp
2019-06-04 13:08:09,644 | DEBUG | FelixStartLevel | server | 158 - daemons.server - 5.8.0 | BundleEvent STARTING - daemons.server
2019-06-04 13:08:09,647 | DEBUG | FelixStartLevel | server | 158 - daemons.server - 5.8.0 | ServiceEvent REGISTERED - [org.osgi.service.cm.ManagedService] - daemons.server
2019-06-04 13:08:09,648 | INFO | e: pid=[server]) | ServerActivator | 152 - lib.util - 7.0.0 | keepKarafRunningWhenServerStops=true
2019-06-04 13:08:09,648 | DEBUG | FelixStartLevel | server | 158 - daemons.server - 5.8.0 | BundleEvent STARTED - daemons.server
2019-06-04 13:08:09,651 | INFO | e: pid=[server]) | ServerActivator | 152 - lib.util - 7.0.0 | Trying to load database configuration from : E:\alm\ALM_HEAD\dev\trunk\daemons\server\karaf/etc/hibernate.properties
2019-06-04 13:08:09,704 | INFO | e: pid=[server]) | Version | 72 - org.jboss.logging.jboss-logging - 3.3.1.Final | HHH000412: Hibernate Core {5.2.17.Final}
2019-06-04 13:08:09,705 | INFO | e: pid=[server]) | Environment | 72 - org.jboss.logging.jboss-logging - 3.3.1.Final | HHH000206: hibernate.properties not found
2019-06-04 13:08:10,029 | INFO | e: pid=[server]) | Version | 72 - org.jboss.logging.jboss-logging - 3.3.1.Final | HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
2019-06-04 13:08:10,089 | INFO | e: pid=[server]) | C3P0ConnectionProvider | 72 - org.jboss.logging.jboss-logging - 3.3.1.Final | HHH010002: C3P0 using driver: com.mysql.cj.jdbc.Driver at URL: jdbc:mysql://localhost:3306/almhead?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false
2019-06-04 13:08:10,090 | INFO | e: pid=[server]) | C3P0ConnectionProvider | 72 - org.jboss.logging.jboss-logging - 3.3.1.Final | HHH10001001: Connection properties: {user=root, password=****}
2019-06-04 13:08:10,091 | INFO | e: pid=[server]) | C3P0ConnectionProvider | 72 - org.jboss.logging.jboss-logging - 3.3.1.Final | HHH10001003: Autocommit mode: false
We managed to fix this a couple weeks ago. Turns out that it was a mix of dependency issues and bundle misconfiguration: we had to exclude org.osgi.core and org.osgi.compendium from the hibernate-osgi dependency, and we had to make the javax.security import required in the Karaf bundle that contained our security code.