You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fortress@directory.apache.org by Laura van de Weerd <la...@gmail.com> on 2016/12/02 14:38:28 UTC

Bootstrap & Fortress startup problem

We've followed the instructions given by Shawn to Martijn and have a
running docker image for the LDAP environment. When we start the fortress
commander in wildfly 10.1 and try to login we get the following
ClassNotFoundException. Is there any step we've missed in setting things up?

Kind regards,

Laura & Martijn

15:21:14,804 ERROR [org.apache.directory.fortress.core.util.VUtil] (default
task-3) static initialzier caught SecurityException=createInstance()
className [org.openldap.fortress.util.time.Date] caught
java.lang.ClassNotFoundException=java.lang.ClassNotFoundException:
org.openldap.fortress.util.time.Date from [Module
"deployment.fortress-web.war:main" from Service Module Loader]:
org.apache.directory.fortress.core.CfgException: createInstance() className
[org.openldap.fortress.util.time.Date] caught
java.lang.ClassNotFoundException=java.lang.ClassNotFoundException:
org.openldap.fortress.util.time.Date from [Module
"deployment.fortress-web.war:main" from Service Module Loader]
at
org.apache.directory.fortress.core.util.ClassUtil.createInstance(ClassUtil.java:83)
at
org.apache.directory.fortress.core.util.VUtil.getValidators(VUtil.java:685)
at org.apache.directory.fortress.core.util.VUtil.init(VUtil.java:114)
at org.apache.directory.fortress.core.util.VUtil.<init>(VUtil.java:135)
at
org.apache.directory.fortress.core.util.VUtil.getConstraintValidator(VUtil.java:145)
at
org.apache.directory.fortress.core.impl.AdminRoleP.<clinit>(AdminRoleP.java:65)
at org.apache.directory.fortress.core.impl.UserP.<init>(UserP.java:75)
at
org.apache.directory.fortress.core.impl.AccessMgrImpl.<clinit>(AccessMgrImpl.java:79)
at
org.apache.directory.fortress.core.AccessMgrFactory.createInstance(AccessMgrFactory.java:77)
at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
at
org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1123)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:325)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at
org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1082)
at
org.apache.wicket.spring.SpringBeanLocator.lookupSpringBean(SpringBeanLocator.java:252)
at
org.apache.wicket.spring.SpringBeanLocator.locateProxyTarget(SpringBeanLocator.java)
at
org.apache.wicket.spring.injection.annot.AnnotProxyFieldValueFactory.getFieldValue(AnnotProxyFieldValueFactory.java:150)
at org.apache.wicket.injection.Injector.inject(Injector.java:111)
at
org.apache.wicket.spring.injection.annot.SpringComponentInjector.inject(SpringComponentInjector.java:124)
at
org.apache.wicket.spring.injection.annot.SpringComponentInjector.onInstantiation(SpringComponentInjector.java:130)
at
org.apache.wicket.application.ComponentInstantiationListenerCollection$1.notify(ComponentInstantiationListenerCollection.java:38)
at
org.apache.wicket.application.ComponentInstantiationListenerCollection$1.notify(ComponentInstantiationListenerCollection.java:34)
at
org.apache.wicket.util.listener.ListenerCollection.notify(ListenerCollection.java:80)
at
org.apache.wicket.application.ComponentInstantiationListenerCollection.onInstantiation(ComponentInstantiationListenerCollection.java:33)
at org.apache.wicket.Component.<init>(Component.java:687)
at org.apache.wicket.MarkupContainer.<init>(MarkupContainer.java:180)
at org.apache.wicket.Page.<init>(Page.java:170)
at org.apache.wicket.Page.<init>(Page.java:134)
at org.apache.wicket.markup.html.WebPage.<init>(WebPage.java:75)
at
org.apache.directory.fortress.web.FortressWebBasePage.<init>(FortressWebBasePage.java:65)
at org.apache.directory.fortress.web.LaunchPage.<init>(LaunchPage.java:40)
at sun.reflect.GeneratedConstructorAccessor48.newInstance(Unknown Source)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at
org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:175)
at
org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:67)
at
org.apache.wicket.DefaultMapperContext.newPageInstance(DefaultMapperContext.java:102)
at
org.apache.wicket.core.request.handler.PageProvider.resolvePageInstance(PageProvider.java:271)
at
org.apache.wicket.core.request.handler.PageProvider.getPageInstance(PageProvider.java:169)
at
org.apache.wicket.request.handler.render.PageRenderer.getPage(PageRenderer.java:78)
at
org.apache.wicket.request.handler.render.WebPageRenderer.isPageStateless(WebPageRenderer.java:287)
at
org.apache.wicket.request.handler.render.WebPageRenderer.shouldRenderPageAndWriteResponse(WebPageRenderer.java:329)
at
org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:193)
at
org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:175)
at
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:895)
at
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
at
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:265)
at
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:222)
at
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:293)
at
org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:261)
at
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:203)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:284)
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
at
io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317)
at
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)
at
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:115)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at
org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:121)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at
org.springframework.security.web.authentication.preauth.AbstractPreAuthenticatedProcessingFilter.doFilter(AbstractPreAuthenticatedProcessingFilter.java:121)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at
org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214)
at
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177)
at
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
at
io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
at
io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
at
io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
at
io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
at
org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
at
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at
io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
at
io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
at
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at
io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:53)
at
io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
at
io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
at
io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler.handleRequest(ServletSecurityConstraintHandler.java:59)
at
io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
at
io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
at
io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
at
io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
at
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at
org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
at
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at
io.undertow.servlet.handlers.ServletInitialHandler.jrHandle(ServletInitialHandler.java)
at
org.zeroturnaround.javarebel.integration.servlet.undertow.cbp.ServletInitialHandlerCBP.handleRequest(ServletInitialHandlerCBP.java:98)
at
io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
at
io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
at
io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
at
io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
at
io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
at
io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
at
io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at
io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at
io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at
io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at
io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at
io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
at
io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
at
io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:202)
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:805)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException:
org.openldap.fortress.util.time.Date from [Module
"deployment.fortress-web.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:198)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:363)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:351)
at
org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:93)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at
org.apache.directory.fortress.core.util.ClassUtil.createInstance(ClassUtil.java:77)
... 119 more

Re: Bootstrap & Fortress startup problem

Posted by Shawn McKinney <sm...@apache.org>.

> On Dec 2, 2016, at 1:51 PM, Martijn Dashorst <ma...@gmail.com> wrote:
> 
> When running step 1 I encountered some problems:
> 
> - the run_tests.sh script doesn't work on Mac OS X (El Capitan) due
> to a missing parameter for sed. I had to insert '-e' before the
> replacement expression
> 
> - running the script fails a test:
> 
> 2016-12-02 20:44:022 ERROR PropertyMgrImplTest:94 - addProperties
> caught SecurityException rc=1003, msg=add entity properties[Group]
> caught LDAPException=attribute 'ftProps' not allowed
> org.apache.directory.fortress.core.UpdateException: add entity
> properties[Group] caught LDAPException=attribute 'ftProps' not allowed
>  at org.apache.directory.fortress.core.impl.PropertyDAO.addProperties(PropertyDAO.java:71)
> ... 24 more
> 
> But I doubt that either of these steps will solve the
> ClassNotFoundException in wildfly.

Hey Martjin, was this the only test case that failed?  If so it won’t stop the web app from working.

If there were more errors please let me know.

Here’s a test summary on my machine with a configuration similar to yours:
Failed tests: 
  PropertyMgrImplTest.testCrudProperties:63->addProperties:96 add entity properties[Group] caught LDAPException=attribute 'ftProps' not allowed
Tests run: 127, Failures: 1, Errors: 0, Skipped: 0

If this is what you are seeing, it is a minor issue and can be ignored.

Thanks,
Shawn

Re: Bootstrap & Fortress startup problem

Posted by Shawn McKinney <sm...@apache.org>.

> On Dec 2, 2016, at 1:51 PM, Martijn Dashorst <ma...@gmail.com> wrote:
> 
> But I doubt that either of these steps will solve the
> ClassNotFoundException in wildfly.


This error:
15:21:14,804 ERROR [org.apache.directory.fortress.core.util.VUtil] (default
task-3) static initialzier caught SecurityException=createInstance()
className [org.openldap.fortress.util.time.Date] caught
java.lang.ClassNotFoundException=java.lang.ClassNotFoundException:
org.openldap.fortress.util.time.Date from [Module

is result of this issue:
https://issues.apache.org/jira/browse/FC-202

Stemming from a docker image load that uses an outdated fortress installation package that seeds configuration data containing invalid (outdated) class names that subsequently fail during instantiation.  Running the run_tests script will correct this by seeding the directory with latest config data so the right set of dynamic classes are on the classpath at runtime.

Yeah I know this needs to be fixed (hence the issue) but but I have a bigger concern about the wildfly usage.  I have not tested with the fortress-realm container security so don’t know if this app will work in your dev env.

But, we have to get the latest schema loaded in your docker image before you can actually run the run_tests script.  In the meantime you can point to the vm restart/redeploy to wiildfly and see what happens?   

oh and sorry for the drama btw…  our docker support needs some lovin… 

Shawn

Re: Bootstrap & Fortress startup problem

Posted by Shawn McKinney <sm...@apache.org>.
> On Dec 2, 2016, at 6:15 PM, Shawn McKinney <sm...@apache.org> wrote:
> 
> The ftprops is schema problem due to recent changes.  Can you do a git pull on the fortress-core repo and try again?

ah crap, the docker image needs to be updated with latest ldap schema (from the git pull) before the run_tests script will work.  I need to do some local testing with the image in order to provide you the exact steps to follow.  Please bear with me, my docker skills are fresh.  Will post back here once ready.

Thanks,
Shawn

Re: Bootstrap & Fortress startup problem

Posted by Shawn McKinney <sm...@apache.org>.
The ftprops is schema problem due to recent changes.  Can you do a git pull on the fortress-core repo and try again?
 
Shawn

> On Dec 2, 2016, at 1:51 PM, Martijn Dashorst <ma...@gmail.com> wrote:
> 
> When running step 1 I encountered some problems:
> 
> - the run_tests.sh script doesn't work on Mac OS X (El Capitan) due
> to a missing parameter for sed. I had to insert '-e' before the
> replacement expression
> 
> - running the script fails a test:
> 
> 2016-12-02 20:44:022 ERROR PropertyMgrImplTest:94 - addProperties
> caught SecurityException rc=1003, msg=add entity properties[Group]
> caught LDAPException=attribute 'ftProps' not allowed
> org.apache.directory.fortress.core.UpdateException: add entity
> properties[Group] caught LDAPException=attribute 'ftProps' not allowed
>  at org.apache.directory.fortress.core.impl.PropertyDAO.addProperties(PropertyDAO.java:76)
>  at org.apache.directory.fortress.core.impl.PropertyP.addProperties(PropertyP.java:53)
>  at org.apache.directory.fortress.core.impl.PropertyMgrImpl.add(PropertyMgrImpl.java:49)
>  at org.apache.directory.fortress.core.impl.PropertyMgrImplTest.addProperties(PropertyMgrImplTest.java:86)
>  at org.apache.directory.fortress.core.impl.PropertyMgrImplTest.testCrudProperties(PropertyMgrImplTest.java:63)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  at java.lang.reflect.Method.invoke(Method.java:498)
>  at junit.framework.TestCase.runTest(TestCase.java:176)
>  at junit.framework.TestCase.runBare(TestCase.java:141)
>  at junit.framework.TestResult$1.protect(TestResult.java:122)
>  at junit.framework.TestResult.runProtected(TestResult.java:142)
>  at junit.framework.TestResult.run(TestResult.java:125)
>  at junit.framework.TestCase.run(TestCase.java:129)
>  at junit.framework.TestSuite.runTest(TestSuite.java:252)
>  at junit.framework.TestSuite.run(TestSuite.java:247)
>  at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:86)
>  at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283)
>  at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173)
>  at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
>  at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128)
>  at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
>  at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
>  at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
> Caused by: org.apache.directory.api.ldap.model.exception.LdapSchemaViolationException:
> attribute 'ftProps' not allowed
>  at org.apache.directory.api.ldap.model.message.ResultCodeEnum.processResponse(ResultCodeEnum.java:2086)
>  at org.apache.directory.ldap.client.api.LdapNetworkConnection.modify(LdapNetworkConnection.java:2342)
>  at org.apache.directory.ldap.client.api.LdapNetworkConnection.modify(LdapNetworkConnection.java:2351)
>  at org.apache.directory.ldap.client.api.LdapConnectionWrapper.modify(LdapConnectionWrapper.java:238)
>  at org.apache.directory.fortress.core.ldap.LdapDataProvider.modify(LdapDataProvider.java:303)
>  at org.apache.directory.fortress.core.impl.PropertyDAO.addProperties(PropertyDAO.java:71)
> ... 24 more
> 
> But I doubt that either of these steps will solve the
> ClassNotFoundException in wildfly.
> 
> Martijn
> 
> 
> On Fri, Dec 2, 2016 at 4:09 PM, Shawn McKinney <sm...@apache.org> wrote:
>> 
>>> On Dec 2, 2016, at 8:38 AM, Laura van de Weerd <la...@gmail.com> wrote:
>>> 
>>> We've followed the instructions given by Shawn to Martijn and have a
>>> running docker image for the LDAP environment. When we start the fortress
>>> commander in wildfly 10.1 and try to login we get the following
>>> ClassNotFoundException. Is there any step we've missed in setting things up?
>> 
>> Hi Laura,
>> 
>> There are a couple of additional steps to prepare the docker image to fortress-web usage.
>> 
>> 1. from the location of your directory-fortress-core repo:
>> 
>> # export JAVA_HOME=…
>> # docker/run_tests.sh
>> 
>> This will load your docker image with some ldap test data and configs.
>> 
>> 2. from the location of your directory-fortress-commander repo:
>> 
>> ```
>> mvn install -Dload.file=ldap/setup/FortressWebDemoUsers.xml
>> ```
>> 
>> This will load your docker image with sample security policies to test with.
>> 
>> Let me know if you have problems with either of these two steps.
>> 
>> Thanks,
>> Shawn
> 
> 
> 
> -- 
> Become a Wicket expert, learn from the best: http://wicketinaction.com


Re: Bootstrap & Fortress startup problem

Posted by Martijn Dashorst <ma...@gmail.com>.
When running step 1 I encountered some problems:

 - the run_tests.sh script doesn't work on Mac OS X (El Capitan) due
to a missing parameter for sed. I had to insert '-e' before the
replacement expression

 - running the script fails a test:

2016-12-02 20:44:022 ERROR PropertyMgrImplTest:94 - addProperties
caught SecurityException rc=1003, msg=add entity properties[Group]
caught LDAPException=attribute 'ftProps' not allowed
org.apache.directory.fortress.core.UpdateException: add entity
properties[Group] caught LDAPException=attribute 'ftProps' not allowed
  at org.apache.directory.fortress.core.impl.PropertyDAO.addProperties(PropertyDAO.java:76)
  at org.apache.directory.fortress.core.impl.PropertyP.addProperties(PropertyP.java:53)
  at org.apache.directory.fortress.core.impl.PropertyMgrImpl.add(PropertyMgrImpl.java:49)
  at org.apache.directory.fortress.core.impl.PropertyMgrImplTest.addProperties(PropertyMgrImplTest.java:86)
  at org.apache.directory.fortress.core.impl.PropertyMgrImplTest.testCrudProperties(PropertyMgrImplTest.java:63)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:498)
  at junit.framework.TestCase.runTest(TestCase.java:176)
  at junit.framework.TestCase.runBare(TestCase.java:141)
  at junit.framework.TestResult$1.protect(TestResult.java:122)
  at junit.framework.TestResult.runProtected(TestResult.java:142)
  at junit.framework.TestResult.run(TestResult.java:125)
  at junit.framework.TestCase.run(TestCase.java:129)
  at junit.framework.TestSuite.runTest(TestSuite.java:252)
  at junit.framework.TestSuite.run(TestSuite.java:247)
  at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:86)
  at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283)
  at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173)
  at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
  at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128)
  at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
  at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
  at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
Caused by: org.apache.directory.api.ldap.model.exception.LdapSchemaViolationException:
attribute 'ftProps' not allowed
  at org.apache.directory.api.ldap.model.message.ResultCodeEnum.processResponse(ResultCodeEnum.java:2086)
  at org.apache.directory.ldap.client.api.LdapNetworkConnection.modify(LdapNetworkConnection.java:2342)
  at org.apache.directory.ldap.client.api.LdapNetworkConnection.modify(LdapNetworkConnection.java:2351)
  at org.apache.directory.ldap.client.api.LdapConnectionWrapper.modify(LdapConnectionWrapper.java:238)
  at org.apache.directory.fortress.core.ldap.LdapDataProvider.modify(LdapDataProvider.java:303)
  at org.apache.directory.fortress.core.impl.PropertyDAO.addProperties(PropertyDAO.java:71)
... 24 more

But I doubt that either of these steps will solve the
ClassNotFoundException in wildfly.

Martijn


On Fri, Dec 2, 2016 at 4:09 PM, Shawn McKinney <sm...@apache.org> wrote:
>
>> On Dec 2, 2016, at 8:38 AM, Laura van de Weerd <la...@gmail.com> wrote:
>>
>> We've followed the instructions given by Shawn to Martijn and have a
>> running docker image for the LDAP environment. When we start the fortress
>> commander in wildfly 10.1 and try to login we get the following
>> ClassNotFoundException. Is there any step we've missed in setting things up?
>
> Hi Laura,
>
> There are a couple of additional steps to prepare the docker image to fortress-web usage.
>
> 1. from the location of your directory-fortress-core repo:
>
> # export JAVA_HOME=…
> # docker/run_tests.sh
>
> This will load your docker image with some ldap test data and configs.
>
> 2. from the location of your directory-fortress-commander repo:
>
>  ```
>  mvn install -Dload.file=ldap/setup/FortressWebDemoUsers.xml
>  ```
>
> This will load your docker image with sample security policies to test with.
>
> Let me know if you have problems with either of these two steps.
>
> Thanks,
> Shawn



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com

Re: Bootstrap & Fortress startup problem

Posted by Shawn McKinney <sm...@apache.org>.
> On Dec 2, 2016, at 8:38 AM, Laura van de Weerd <la...@gmail.com> wrote:
> 
> We've followed the instructions given by Shawn to Martijn and have a
> running docker image for the LDAP environment. When we start the fortress
> commander in wildfly 10.1 and try to login we get the following
> ClassNotFoundException. Is there any step we've missed in setting things up?

Hi Laura,

There are a couple of additional steps to prepare the docker image to fortress-web usage.

1. from the location of your directory-fortress-core repo:

# export JAVA_HOME=…
# docker/run_tests.sh

This will load your docker image with some ldap test data and configs.

2. from the location of your directory-fortress-commander repo:

 ```
 mvn install -Dload.file=ldap/setup/FortressWebDemoUsers.xml
 ```

This will load your docker image with sample security policies to test with.

Let me know if you have problems with either of these two steps.

Thanks,
Shawn