You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@isis.apache.org by Luis Miguel Payet <mp...@fastmail.fm> on 2015/04/09 04:57:18 UTC

Error with DEBUG logging in SimpleApp with isis-module-security

Hello,

I create a new project from the SimpleApp archetype, version 1.9.0-SNAPSHOT. I change the logging to DEBUG in the logging.properties file. I test that the application runs properly.

Then I add the isis-module-security add-on following the readme instructions. When I run the application, I get an exception as follows:

21:49:23,873  [IsisWicketApplication main       ERROR]  Failed to initialize
com.google.inject.ProvisionException: Guice provision errors:

1) Error in custom provider, java.util.ConcurrentModificationException
  at org.apache.isis.core.runtime.runner.IsisInjectModule.provideIsisSystem(IsisInjectModule.java:132)
  at org.apache.isis.core.runtime.runner.IsisInjectModule.provideIsisSystem(IsisInjectModule.java:132)
  while locating org.apache.isis.core.runtime.system.IsisSystem
    for field at org.apache.isis.viewer.wicket.viewer.IsisWicketApplication.system(IsisWicketApplication.java:142)
  while locating domainapp.webapp.SimpleApplication

When I turn the logging down to INFO, the application runs properly. The same behaviour happens with the SimpleApp version 1.8.0

Please help, as I’m far too new at this to be able to fix it myself.

Thanks,
Miguel

Re: Error with DEBUG logging in SimpleApp with isis-module-security

Posted by Martin Grigorov <mg...@apache.org>.
Fixed with
https://git1-us-west.apache.org/repos/asf?p=isis.git;a=commit;h=820bc809
(ISIS-1135)

Martin Grigorov
Freelancer, available for hire!
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Fri, Apr 10, 2015 at 10:52 AM, Martin Grigorov <mg...@apache.org>
wrote:

> Here is what happens:
>
> java.lang.Thread.State: RUNNABLE
>   at
> org.apache.isis.core.runtime.persistence.adaptermanager.PojoAdapterHashMap.remove(PojoAdapterHashMap.java:137)
>   at
> org.apache.isis.core.runtime.persistence.adaptermanager.AdapterManagerDefault.unmap(AdapterManagerDefault.java:762)
>   at
> org.apache.isis.core.runtime.persistence.adaptermanager.AdapterManagerDefault.removeAdapter(AdapterManagerDefault.java:465)
>   at
> org.apache.isis.core.runtime.persistence.adaptermanager.AdapterManagerDefault.remapRecreatedPojo(AdapterManagerDefault.java:368)
>   at
> org.apache.isis.objectstore.jdo.datanucleus.persistence.FrameworkSynchronizer$1.run(FrameworkSynchronizer.java:93)
>   at
> org.apache.isis.objectstore.jdo.datanucleus.persistence.FrameworkSynchronizer$8.call(FrameworkSynchronizer.java:350)
>   at
> org.apache.isis.objectstore.jdo.datanucleus.persistence.FrameworkSynchronizer$8.call(FrameworkSynchronizer.java:346)
>   at
> org.apache.isis.objectstore.jdo.datanucleus.persistence.FrameworkSynchronizer.withLogging(FrameworkSynchronizer.java:335)
>   at
> org.apache.isis.objectstore.jdo.datanucleus.persistence.FrameworkSynchronizer.withLogging(FrameworkSynchronizer.java:346)
>   at
> org.apache.isis.objectstore.jdo.datanucleus.persistence.FrameworkSynchronizer.postLoadProcessingFor(FrameworkSynchronizer.java:73)
>   at
> org.apache.isis.objectstore.jdo.datanucleus.persistence.IsisLifecycleListener$1.doRun(IsisLifecycleListener.java:80)
>   at
> org.apache.isis.objectstore.jdo.datanucleus.persistence.IsisLifecycleListener$RunnableAbstract.run(IsisLifecycleListener.java:206)
>   at
> org.apache.isis.objectstore.jdo.datanucleus.persistence.IsisLifecycleListener.withLogging(IsisLifecycleListener.java:185)
>   at
> org.apache.isis.objectstore.jdo.datanucleus.persistence.IsisLifecycleListener.postLoad(IsisLifecycleListener.java:76)
>   at
> org.datanucleus.api.jdo.JDOCallbackHandler.postLoad(JDOCallbackHandler.java:304)
>   at
> org.datanucleus.state.JDOStateManager.postLoad(JDOStateManager.java:4885)
>   at
> org.datanucleus.state.JDOStateManager.replaceNonLoadedFields(JDOStateManager.java:3485)
>   at
> org.datanucleus.store.rdbms.query.PersistentClassROF$2.fetchNonLoadedFields(PersistentClassROF.java:670)
>   at
> org.datanucleus.ExecutionContextImpl.findObject(ExecutionContextImpl.java:3223)
>   at
> org.datanucleus.store.rdbms.query.PersistentClassROF.getObjectForDatastoreId(PersistentClassROF.java:637)
>   at
> org.datanucleus.store.rdbms.query.PersistentClassROF.getObject(PersistentClassROF.java:410)
>   at
> org.datanucleus.store.rdbms.fieldmanager.ResultSetGetter.fetchObjectField(ResultSetGetter.java:169)
>   at
> org.datanucleus.state.JDOStateManager.replacingObjectField(JDOStateManager.java:2172)
>   at
> org.isisaddons.module.security.dom.permission.ApplicationPermission.jdoReplaceField(ApplicationPermission.java:-1)
>   at
> org.isisaddons.module.security.dom.permission.ApplicationPermission.jdoReplaceFields(ApplicationPermission.java:-1)
>   at
> org.datanucleus.state.JDOStateManager.replaceFields(JDOStateManager.java:3418)
>   at
> org.apache.isis.objectstore.jdo.datanucleus.JDOStateManagerForIsis.replaceFields(JDOStateManagerForIsis.java:135)
>   at
> org.datanucleus.state.JDOStateManager.replaceFields(JDOStateManager.java:3445)
>   at
> org.apache.isis.objectstore.jdo.datanucleus.JDOStateManagerForIsis.replaceFields(JDOStateManagerForIsis.java:124)
>   at
> org.datanucleus.store.rdbms.request.FetchRequest.execute(FetchRequest.java:362)
>   at
> org.datanucleus.store.rdbms.RDBMSPersistenceHandler.fetchObject(RDBMSPersistenceHandler.java:324)
>   at
> org.datanucleus.state.AbstractStateManager.loadFieldsFromDatastore(AbstractStateManager.java:1122)
>   at
> org.datanucleus.state.JDOStateManager.loadSpecifiedFields(JDOStateManager.java:2916)
>   at
> org.datanucleus.state.JDOStateManager.isLoaded(JDOStateManager.java:3219)
>   at
> org.isisaddons.module.security.dom.permission.ApplicationPermission.getRole(ApplicationPermission.java:-1)
>   at sun.reflect.GeneratedMethodAccessor86.invoke(Unknown Source:-1)
>   at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:606)
>   at
> org.apache.isis.applib.util.Clause.getValueOf(ObjectContracts.java:211)
>   at
> org.apache.isis.applib.util.ObjectContracts.asString(ObjectContracts.java:128)
>   at
> org.apache.isis.applib.util.ObjectContracts.toStringOf(ObjectContracts.java:122)
>   at
> org.apache.isis.applib.util.ObjectContracts.toString(ObjectContracts.java:59)
>   at
> org.isisaddons.module.security.dom.permission.ApplicationPermission.toString(ApplicationPermission.java:579)
>   at
> org.apache.isis.core.runtime.persistence.adapter.PojoAdapter.toString(PojoAdapter.java:438)
>   - locked <0x1d20> (a
> org.apache.isis.core.runtime.persistence.adapter.PojoAdapter)
>   at
> org.apache.isis.core.runtime.persistence.adaptermanager.PojoAdapterHashMap.debugData(PojoAdapterHashMap.java:179)
>   at
> org.apache.isis.core.runtime.persistence.adaptermanager.AdapterManagerDefault.debugData(AdapterManagerDefault.java:827)
>   at
> org.apache.isis.core.runtime.system.persistence.PersistenceSession.debugData(PersistenceSession.java:916)
>
> ApplicationPermission#toString() loads the entity and later tries to
> remove the adapter for it for the same map.
>
> I'll make a copy before iterating, as Dan suggested.
>
>
> Martin Grigorov
> Freelancer, available for hire!
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Fri, Apr 10, 2015 at 10:41 AM, Dan Haywood <
> dan@haywood-associates.co.uk> wrote:
>
>> Suggest that the takeSnapshot/debug method takes a copy of the collection
>> before iterating over it.
>>
>> Dan
>> On 10 Apr 2015 08:34, "Martin Grigorov" <mg...@apache.org> wrote:
>>
>> > Hi,
>> >
>> > The problem is at:
>> >
>> > Caused by: java.util.ConcurrentModificationException
>> > at java.util.HashMap$HashIterator.nextEntry(HashMap.java:922)
>> > at java.util.HashMap$EntryIterator.next(HashMap.java:962)
>> > at java.util.HashMap$EntryIterator.next(HashMap.java:960)
>> > at
>> >
>> >
>> org.apache.isis.core.runtime.persistence.adaptermanager.PojoAdapterHashMap.debugData(PojoAdapterHashMap.java:172)
>> > at
>> >
>> >
>> org.apache.isis.core.runtime.persistence.adaptermanager.AdapterManagerDefault.debugData(AdapterManagerDefault.java:827)
>> > at
>> >
>> >
>> org.apache.isis.core.runtime.system.persistence.PersistenceSession.debugData(PersistenceSession.java:916)
>> > at
>> >
>> >
>> org.apache.isis.core.runtime.system.session.IsisSessionDefault.debug(IsisSessionDefault.java:283)
>> > at
>> >
>> >
>> org.apache.isis.core.runtime.system.session.IsisSessionDefault.takeSnapshot(IsisSessionDefault.java:270)
>> > at
>> >
>> >
>> org.apache.isis.core.runtime.system.session.IsisSessionDefault.close(IsisSessionDefault.java:105)
>> > at
>> >
>> >
>> org.apache.isis.core.runtime.system.context.IsisContext.closeSessionInstance(IsisContext.java:215)
>> > at
>> >
>> >
>> org.apache.isis.core.runtime.system.context.IsisContext.closeSession(IsisContext.java:284)
>> >
>> > I'm looking at it.
>> >
>> >
>> > Martin Grigorov
>> > Freelancer, available for hire!
>> > Wicket Training and Consulting
>> > https://twitter.com/mtgrigorov
>> >
>> > On Thu, Apr 9, 2015 at 10:35 PM, Dan Haywood <
>> dan@haywood-associates.co.uk
>> > >
>> > wrote:
>> >
>> > > Hi Luis,
>> > >
>> > > (could you subscribe to the mailing list ?... at the moment it seems I
>> > have
>> > > to approve your posts)
>> > >
>> > > As Martin says, we'll take a look.  We have seen this sort of issue in
>> > the
>> > > past, where increasing the logging level to DEBUG is caused Isis to
>> > attempt
>> > > to do a toString() on an entity that had been deleted or was otherwise
>> > > invalid to access.  It's possible that's the issue here.
>> > >
>> > > For now, I guess the workaround is to leave the logging as it us :-)
>> > >
>> > > Thanks for bringing this to our attention, though.
>> > >
>> > > Cheers
>> > > Dan
>> > >
>> > >
>> > > On 9 April 2015 at 18:27, Luis Miguel Payet <
>> miguelpayet@trazos-peru.com
>> > >
>> > > wrote:
>> > >
>> > > > Hello Martin,
>> > > >
>> > > > > Please give us the diff and we will debug it.
>> > > >
>> > > > Here it is:
>> > > >
>> > > > --- a/src/main/webapp/WEB-INF/logging.properties
>> > > > +++ b/src/main/webapp/WEB-INF/logging.properties
>> > > > @@ -19,8 +19,8 @@
>> > > >  #
>> > > >  # Isis uses log4j is used to provide system logging
>> > > >  #
>> > > > -log4j.rootCategory=INFO, Console
>> > > > -#log4j.rootCategory=DEBUG, Console,File
>> > > > +#log4j.rootCategory=INFO, Console
>> > > > +log4j.rootCategory=DEBUG, Console,File
>> > > >
>> > > > Thanks,
>> > > > Miguel
>> > > >
>> > > > > On Apr 9, 2015, at 9:42 AM, Martin Grigorov <mgrigorov@apache.org
>> >
>> > > > wrote:
>> > > > >
>> > > > > Hi,
>> > > > >
>> > > > > What change exactly you did in logging.properties ?
>> > > > > Please give us the diff and we will debug it.
>> > > > > Thanks!
>> > > > >
>> > > > > Martin Grigorov
>> > > > > Freelancer, available for hire!
>> > > > > Wicket Training and Consulting
>> > > > > https://twitter.com/mtgrigorov
>> > > > >
>> > > > > On Thu, Apr 9, 2015 at 5:57 AM, Luis Miguel Payet <
>> > mpayet@fastmail.fm>
>> > > > > wrote:
>> > > > >
>> > > > >> Hello,
>> > > > >>
>> > > > >> I create a new project from the SimpleApp archetype, version
>> > > > >> 1.9.0-SNAPSHOT. I change the logging to DEBUG in the
>> > > logging.properties
>> > > > >> file. I test that the application runs properly.
>> > > > >>
>> > > > >> Then I add the isis-module-security add-on following the readme
>> > > > >> instructions. When I run the application, I get an exception as
>> > > follows:
>> > > > >>
>> > > > >> 21:49:23,873  [IsisWicketApplication main       ERROR]  Failed to
>> > > > >> initialize
>> > > > >> com.google.inject.ProvisionException: Guice provision errors:
>> > > > >>
>> > > > >> 1) Error in custom provider,
>> > java.util.ConcurrentModificationException
>> > > > >> at
>> > > > >>
>> > > >
>> > >
>> >
>> org.apache.isis.core.runtime.runner.IsisInjectModule.provideIsisSystem(IsisInjectModule.java:132)
>> > > > >> at
>> > > > >>
>> > > >
>> > >
>> >
>> org.apache.isis.core.runtime.runner.IsisInjectModule.provideIsisSystem(IsisInjectModule.java:132)
>> > > > >> while locating org.apache.isis.core.runtime.system.IsisSystem
>> > > > >>   for field at
>> > > > >>
>> > > >
>> > >
>> >
>> org.apache.isis.viewer.wicket.viewer.IsisWicketApplication.system(IsisWicketApplication.java:142)
>> > > > >> while locating domainapp.webapp.SimpleApplication
>> > > > >>
>> > > > >> When I turn the logging down to INFO, the application runs
>> properly.
>> > > The
>> > > > >> same behaviour happens with the SimpleApp version 1.8.0
>> > > > >>
>> > > > >> Please help, as I’m far too new at this to be able to fix it
>> myself.
>> > > > >>
>> > > > >> Thanks,
>> > > > >> Miguel
>> > > >
>> > > >
>> > >
>> >
>>
>
>

Re: Error with DEBUG logging in SimpleApp with isis-module-security

Posted by Martin Grigorov <mg...@apache.org>.
Here is what happens:

java.lang.Thread.State: RUNNABLE
  at
org.apache.isis.core.runtime.persistence.adaptermanager.PojoAdapterHashMap.remove(PojoAdapterHashMap.java:137)
  at
org.apache.isis.core.runtime.persistence.adaptermanager.AdapterManagerDefault.unmap(AdapterManagerDefault.java:762)
  at
org.apache.isis.core.runtime.persistence.adaptermanager.AdapterManagerDefault.removeAdapter(AdapterManagerDefault.java:465)
  at
org.apache.isis.core.runtime.persistence.adaptermanager.AdapterManagerDefault.remapRecreatedPojo(AdapterManagerDefault.java:368)
  at
org.apache.isis.objectstore.jdo.datanucleus.persistence.FrameworkSynchronizer$1.run(FrameworkSynchronizer.java:93)
  at
org.apache.isis.objectstore.jdo.datanucleus.persistence.FrameworkSynchronizer$8.call(FrameworkSynchronizer.java:350)
  at
org.apache.isis.objectstore.jdo.datanucleus.persistence.FrameworkSynchronizer$8.call(FrameworkSynchronizer.java:346)
  at
org.apache.isis.objectstore.jdo.datanucleus.persistence.FrameworkSynchronizer.withLogging(FrameworkSynchronizer.java:335)
  at
org.apache.isis.objectstore.jdo.datanucleus.persistence.FrameworkSynchronizer.withLogging(FrameworkSynchronizer.java:346)
  at
org.apache.isis.objectstore.jdo.datanucleus.persistence.FrameworkSynchronizer.postLoadProcessingFor(FrameworkSynchronizer.java:73)
  at
org.apache.isis.objectstore.jdo.datanucleus.persistence.IsisLifecycleListener$1.doRun(IsisLifecycleListener.java:80)
  at
org.apache.isis.objectstore.jdo.datanucleus.persistence.IsisLifecycleListener$RunnableAbstract.run(IsisLifecycleListener.java:206)
  at
org.apache.isis.objectstore.jdo.datanucleus.persistence.IsisLifecycleListener.withLogging(IsisLifecycleListener.java:185)
  at
org.apache.isis.objectstore.jdo.datanucleus.persistence.IsisLifecycleListener.postLoad(IsisLifecycleListener.java:76)
  at
org.datanucleus.api.jdo.JDOCallbackHandler.postLoad(JDOCallbackHandler.java:304)
  at
org.datanucleus.state.JDOStateManager.postLoad(JDOStateManager.java:4885)
  at
org.datanucleus.state.JDOStateManager.replaceNonLoadedFields(JDOStateManager.java:3485)
  at
org.datanucleus.store.rdbms.query.PersistentClassROF$2.fetchNonLoadedFields(PersistentClassROF.java:670)
  at
org.datanucleus.ExecutionContextImpl.findObject(ExecutionContextImpl.java:3223)
  at
org.datanucleus.store.rdbms.query.PersistentClassROF.getObjectForDatastoreId(PersistentClassROF.java:637)
  at
org.datanucleus.store.rdbms.query.PersistentClassROF.getObject(PersistentClassROF.java:410)
  at
org.datanucleus.store.rdbms.fieldmanager.ResultSetGetter.fetchObjectField(ResultSetGetter.java:169)
  at
org.datanucleus.state.JDOStateManager.replacingObjectField(JDOStateManager.java:2172)
  at
org.isisaddons.module.security.dom.permission.ApplicationPermission.jdoReplaceField(ApplicationPermission.java:-1)
  at
org.isisaddons.module.security.dom.permission.ApplicationPermission.jdoReplaceFields(ApplicationPermission.java:-1)
  at
org.datanucleus.state.JDOStateManager.replaceFields(JDOStateManager.java:3418)
  at
org.apache.isis.objectstore.jdo.datanucleus.JDOStateManagerForIsis.replaceFields(JDOStateManagerForIsis.java:135)
  at
org.datanucleus.state.JDOStateManager.replaceFields(JDOStateManager.java:3445)
  at
org.apache.isis.objectstore.jdo.datanucleus.JDOStateManagerForIsis.replaceFields(JDOStateManagerForIsis.java:124)
  at
org.datanucleus.store.rdbms.request.FetchRequest.execute(FetchRequest.java:362)
  at
org.datanucleus.store.rdbms.RDBMSPersistenceHandler.fetchObject(RDBMSPersistenceHandler.java:324)
  at
org.datanucleus.state.AbstractStateManager.loadFieldsFromDatastore(AbstractStateManager.java:1122)
  at
org.datanucleus.state.JDOStateManager.loadSpecifiedFields(JDOStateManager.java:2916)
  at
org.datanucleus.state.JDOStateManager.isLoaded(JDOStateManager.java:3219)
  at
org.isisaddons.module.security.dom.permission.ApplicationPermission.getRole(ApplicationPermission.java:-1)
  at sun.reflect.GeneratedMethodAccessor86.invoke(Unknown Source:-1)
  at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:606)
  at org.apache.isis.applib.util.Clause.getValueOf(ObjectContracts.java:211)
  at
org.apache.isis.applib.util.ObjectContracts.asString(ObjectContracts.java:128)
  at
org.apache.isis.applib.util.ObjectContracts.toStringOf(ObjectContracts.java:122)
  at
org.apache.isis.applib.util.ObjectContracts.toString(ObjectContracts.java:59)
  at
org.isisaddons.module.security.dom.permission.ApplicationPermission.toString(ApplicationPermission.java:579)
  at
org.apache.isis.core.runtime.persistence.adapter.PojoAdapter.toString(PojoAdapter.java:438)
  - locked <0x1d20> (a
org.apache.isis.core.runtime.persistence.adapter.PojoAdapter)
  at
org.apache.isis.core.runtime.persistence.adaptermanager.PojoAdapterHashMap.debugData(PojoAdapterHashMap.java:179)
  at
org.apache.isis.core.runtime.persistence.adaptermanager.AdapterManagerDefault.debugData(AdapterManagerDefault.java:827)
  at
org.apache.isis.core.runtime.system.persistence.PersistenceSession.debugData(PersistenceSession.java:916)

ApplicationPermission#toString() loads the entity and later tries to remove
the adapter for it for the same map.

I'll make a copy before iterating, as Dan suggested.


Martin Grigorov
Freelancer, available for hire!
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Fri, Apr 10, 2015 at 10:41 AM, Dan Haywood <da...@haywood-associates.co.uk>
wrote:

> Suggest that the takeSnapshot/debug method takes a copy of the collection
> before iterating over it.
>
> Dan
> On 10 Apr 2015 08:34, "Martin Grigorov" <mg...@apache.org> wrote:
>
> > Hi,
> >
> > The problem is at:
> >
> > Caused by: java.util.ConcurrentModificationException
> > at java.util.HashMap$HashIterator.nextEntry(HashMap.java:922)
> > at java.util.HashMap$EntryIterator.next(HashMap.java:962)
> > at java.util.HashMap$EntryIterator.next(HashMap.java:960)
> > at
> >
> >
> org.apache.isis.core.runtime.persistence.adaptermanager.PojoAdapterHashMap.debugData(PojoAdapterHashMap.java:172)
> > at
> >
> >
> org.apache.isis.core.runtime.persistence.adaptermanager.AdapterManagerDefault.debugData(AdapterManagerDefault.java:827)
> > at
> >
> >
> org.apache.isis.core.runtime.system.persistence.PersistenceSession.debugData(PersistenceSession.java:916)
> > at
> >
> >
> org.apache.isis.core.runtime.system.session.IsisSessionDefault.debug(IsisSessionDefault.java:283)
> > at
> >
> >
> org.apache.isis.core.runtime.system.session.IsisSessionDefault.takeSnapshot(IsisSessionDefault.java:270)
> > at
> >
> >
> org.apache.isis.core.runtime.system.session.IsisSessionDefault.close(IsisSessionDefault.java:105)
> > at
> >
> >
> org.apache.isis.core.runtime.system.context.IsisContext.closeSessionInstance(IsisContext.java:215)
> > at
> >
> >
> org.apache.isis.core.runtime.system.context.IsisContext.closeSession(IsisContext.java:284)
> >
> > I'm looking at it.
> >
> >
> > Martin Grigorov
> > Freelancer, available for hire!
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
> > On Thu, Apr 9, 2015 at 10:35 PM, Dan Haywood <
> dan@haywood-associates.co.uk
> > >
> > wrote:
> >
> > > Hi Luis,
> > >
> > > (could you subscribe to the mailing list ?... at the moment it seems I
> > have
> > > to approve your posts)
> > >
> > > As Martin says, we'll take a look.  We have seen this sort of issue in
> > the
> > > past, where increasing the logging level to DEBUG is caused Isis to
> > attempt
> > > to do a toString() on an entity that had been deleted or was otherwise
> > > invalid to access.  It's possible that's the issue here.
> > >
> > > For now, I guess the workaround is to leave the logging as it us :-)
> > >
> > > Thanks for bringing this to our attention, though.
> > >
> > > Cheers
> > > Dan
> > >
> > >
> > > On 9 April 2015 at 18:27, Luis Miguel Payet <
> miguelpayet@trazos-peru.com
> > >
> > > wrote:
> > >
> > > > Hello Martin,
> > > >
> > > > > Please give us the diff and we will debug it.
> > > >
> > > > Here it is:
> > > >
> > > > --- a/src/main/webapp/WEB-INF/logging.properties
> > > > +++ b/src/main/webapp/WEB-INF/logging.properties
> > > > @@ -19,8 +19,8 @@
> > > >  #
> > > >  # Isis uses log4j is used to provide system logging
> > > >  #
> > > > -log4j.rootCategory=INFO, Console
> > > > -#log4j.rootCategory=DEBUG, Console,File
> > > > +#log4j.rootCategory=INFO, Console
> > > > +log4j.rootCategory=DEBUG, Console,File
> > > >
> > > > Thanks,
> > > > Miguel
> > > >
> > > > > On Apr 9, 2015, at 9:42 AM, Martin Grigorov <mg...@apache.org>
> > > > wrote:
> > > > >
> > > > > Hi,
> > > > >
> > > > > What change exactly you did in logging.properties ?
> > > > > Please give us the diff and we will debug it.
> > > > > Thanks!
> > > > >
> > > > > Martin Grigorov
> > > > > Freelancer, available for hire!
> > > > > Wicket Training and Consulting
> > > > > https://twitter.com/mtgrigorov
> > > > >
> > > > > On Thu, Apr 9, 2015 at 5:57 AM, Luis Miguel Payet <
> > mpayet@fastmail.fm>
> > > > > wrote:
> > > > >
> > > > >> Hello,
> > > > >>
> > > > >> I create a new project from the SimpleApp archetype, version
> > > > >> 1.9.0-SNAPSHOT. I change the logging to DEBUG in the
> > > logging.properties
> > > > >> file. I test that the application runs properly.
> > > > >>
> > > > >> Then I add the isis-module-security add-on following the readme
> > > > >> instructions. When I run the application, I get an exception as
> > > follows:
> > > > >>
> > > > >> 21:49:23,873  [IsisWicketApplication main       ERROR]  Failed to
> > > > >> initialize
> > > > >> com.google.inject.ProvisionException: Guice provision errors:
> > > > >>
> > > > >> 1) Error in custom provider,
> > java.util.ConcurrentModificationException
> > > > >> at
> > > > >>
> > > >
> > >
> >
> org.apache.isis.core.runtime.runner.IsisInjectModule.provideIsisSystem(IsisInjectModule.java:132)
> > > > >> at
> > > > >>
> > > >
> > >
> >
> org.apache.isis.core.runtime.runner.IsisInjectModule.provideIsisSystem(IsisInjectModule.java:132)
> > > > >> while locating org.apache.isis.core.runtime.system.IsisSystem
> > > > >>   for field at
> > > > >>
> > > >
> > >
> >
> org.apache.isis.viewer.wicket.viewer.IsisWicketApplication.system(IsisWicketApplication.java:142)
> > > > >> while locating domainapp.webapp.SimpleApplication
> > > > >>
> > > > >> When I turn the logging down to INFO, the application runs
> properly.
> > > The
> > > > >> same behaviour happens with the SimpleApp version 1.8.0
> > > > >>
> > > > >> Please help, as I’m far too new at this to be able to fix it
> myself.
> > > > >>
> > > > >> Thanks,
> > > > >> Miguel
> > > >
> > > >
> > >
> >
>

Re: Error with DEBUG logging in SimpleApp with isis-module-security

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
Suggest that the takeSnapshot/debug method takes a copy of the collection
before iterating over it.

Dan
On 10 Apr 2015 08:34, "Martin Grigorov" <mg...@apache.org> wrote:

> Hi,
>
> The problem is at:
>
> Caused by: java.util.ConcurrentModificationException
> at java.util.HashMap$HashIterator.nextEntry(HashMap.java:922)
> at java.util.HashMap$EntryIterator.next(HashMap.java:962)
> at java.util.HashMap$EntryIterator.next(HashMap.java:960)
> at
>
> org.apache.isis.core.runtime.persistence.adaptermanager.PojoAdapterHashMap.debugData(PojoAdapterHashMap.java:172)
> at
>
> org.apache.isis.core.runtime.persistence.adaptermanager.AdapterManagerDefault.debugData(AdapterManagerDefault.java:827)
> at
>
> org.apache.isis.core.runtime.system.persistence.PersistenceSession.debugData(PersistenceSession.java:916)
> at
>
> org.apache.isis.core.runtime.system.session.IsisSessionDefault.debug(IsisSessionDefault.java:283)
> at
>
> org.apache.isis.core.runtime.system.session.IsisSessionDefault.takeSnapshot(IsisSessionDefault.java:270)
> at
>
> org.apache.isis.core.runtime.system.session.IsisSessionDefault.close(IsisSessionDefault.java:105)
> at
>
> org.apache.isis.core.runtime.system.context.IsisContext.closeSessionInstance(IsisContext.java:215)
> at
>
> org.apache.isis.core.runtime.system.context.IsisContext.closeSession(IsisContext.java:284)
>
> I'm looking at it.
>
>
> Martin Grigorov
> Freelancer, available for hire!
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Thu, Apr 9, 2015 at 10:35 PM, Dan Haywood <dan@haywood-associates.co.uk
> >
> wrote:
>
> > Hi Luis,
> >
> > (could you subscribe to the mailing list ?... at the moment it seems I
> have
> > to approve your posts)
> >
> > As Martin says, we'll take a look.  We have seen this sort of issue in
> the
> > past, where increasing the logging level to DEBUG is caused Isis to
> attempt
> > to do a toString() on an entity that had been deleted or was otherwise
> > invalid to access.  It's possible that's the issue here.
> >
> > For now, I guess the workaround is to leave the logging as it us :-)
> >
> > Thanks for bringing this to our attention, though.
> >
> > Cheers
> > Dan
> >
> >
> > On 9 April 2015 at 18:27, Luis Miguel Payet <miguelpayet@trazos-peru.com
> >
> > wrote:
> >
> > > Hello Martin,
> > >
> > > > Please give us the diff and we will debug it.
> > >
> > > Here it is:
> > >
> > > --- a/src/main/webapp/WEB-INF/logging.properties
> > > +++ b/src/main/webapp/WEB-INF/logging.properties
> > > @@ -19,8 +19,8 @@
> > >  #
> > >  # Isis uses log4j is used to provide system logging
> > >  #
> > > -log4j.rootCategory=INFO, Console
> > > -#log4j.rootCategory=DEBUG, Console,File
> > > +#log4j.rootCategory=INFO, Console
> > > +log4j.rootCategory=DEBUG, Console,File
> > >
> > > Thanks,
> > > Miguel
> > >
> > > > On Apr 9, 2015, at 9:42 AM, Martin Grigorov <mg...@apache.org>
> > > wrote:
> > > >
> > > > Hi,
> > > >
> > > > What change exactly you did in logging.properties ?
> > > > Please give us the diff and we will debug it.
> > > > Thanks!
> > > >
> > > > Martin Grigorov
> > > > Freelancer, available for hire!
> > > > Wicket Training and Consulting
> > > > https://twitter.com/mtgrigorov
> > > >
> > > > On Thu, Apr 9, 2015 at 5:57 AM, Luis Miguel Payet <
> mpayet@fastmail.fm>
> > > > wrote:
> > > >
> > > >> Hello,
> > > >>
> > > >> I create a new project from the SimpleApp archetype, version
> > > >> 1.9.0-SNAPSHOT. I change the logging to DEBUG in the
> > logging.properties
> > > >> file. I test that the application runs properly.
> > > >>
> > > >> Then I add the isis-module-security add-on following the readme
> > > >> instructions. When I run the application, I get an exception as
> > follows:
> > > >>
> > > >> 21:49:23,873  [IsisWicketApplication main       ERROR]  Failed to
> > > >> initialize
> > > >> com.google.inject.ProvisionException: Guice provision errors:
> > > >>
> > > >> 1) Error in custom provider,
> java.util.ConcurrentModificationException
> > > >> at
> > > >>
> > >
> >
> org.apache.isis.core.runtime.runner.IsisInjectModule.provideIsisSystem(IsisInjectModule.java:132)
> > > >> at
> > > >>
> > >
> >
> org.apache.isis.core.runtime.runner.IsisInjectModule.provideIsisSystem(IsisInjectModule.java:132)
> > > >> while locating org.apache.isis.core.runtime.system.IsisSystem
> > > >>   for field at
> > > >>
> > >
> >
> org.apache.isis.viewer.wicket.viewer.IsisWicketApplication.system(IsisWicketApplication.java:142)
> > > >> while locating domainapp.webapp.SimpleApplication
> > > >>
> > > >> When I turn the logging down to INFO, the application runs properly.
> > The
> > > >> same behaviour happens with the SimpleApp version 1.8.0
> > > >>
> > > >> Please help, as I’m far too new at this to be able to fix it myself.
> > > >>
> > > >> Thanks,
> > > >> Miguel
> > >
> > >
> >
>

Re: Error with DEBUG logging in SimpleApp with isis-module-security

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

The problem is at:

Caused by: java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:922)
at java.util.HashMap$EntryIterator.next(HashMap.java:962)
at java.util.HashMap$EntryIterator.next(HashMap.java:960)
at
org.apache.isis.core.runtime.persistence.adaptermanager.PojoAdapterHashMap.debugData(PojoAdapterHashMap.java:172)
at
org.apache.isis.core.runtime.persistence.adaptermanager.AdapterManagerDefault.debugData(AdapterManagerDefault.java:827)
at
org.apache.isis.core.runtime.system.persistence.PersistenceSession.debugData(PersistenceSession.java:916)
at
org.apache.isis.core.runtime.system.session.IsisSessionDefault.debug(IsisSessionDefault.java:283)
at
org.apache.isis.core.runtime.system.session.IsisSessionDefault.takeSnapshot(IsisSessionDefault.java:270)
at
org.apache.isis.core.runtime.system.session.IsisSessionDefault.close(IsisSessionDefault.java:105)
at
org.apache.isis.core.runtime.system.context.IsisContext.closeSessionInstance(IsisContext.java:215)
at
org.apache.isis.core.runtime.system.context.IsisContext.closeSession(IsisContext.java:284)

I'm looking at it.


Martin Grigorov
Freelancer, available for hire!
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Thu, Apr 9, 2015 at 10:35 PM, Dan Haywood <da...@haywood-associates.co.uk>
wrote:

> Hi Luis,
>
> (could you subscribe to the mailing list ?... at the moment it seems I have
> to approve your posts)
>
> As Martin says, we'll take a look.  We have seen this sort of issue in the
> past, where increasing the logging level to DEBUG is caused Isis to attempt
> to do a toString() on an entity that had been deleted or was otherwise
> invalid to access.  It's possible that's the issue here.
>
> For now, I guess the workaround is to leave the logging as it us :-)
>
> Thanks for bringing this to our attention, though.
>
> Cheers
> Dan
>
>
> On 9 April 2015 at 18:27, Luis Miguel Payet <mi...@trazos-peru.com>
> wrote:
>
> > Hello Martin,
> >
> > > Please give us the diff and we will debug it.
> >
> > Here it is:
> >
> > --- a/src/main/webapp/WEB-INF/logging.properties
> > +++ b/src/main/webapp/WEB-INF/logging.properties
> > @@ -19,8 +19,8 @@
> >  #
> >  # Isis uses log4j is used to provide system logging
> >  #
> > -log4j.rootCategory=INFO, Console
> > -#log4j.rootCategory=DEBUG, Console,File
> > +#log4j.rootCategory=INFO, Console
> > +log4j.rootCategory=DEBUG, Console,File
> >
> > Thanks,
> > Miguel
> >
> > > On Apr 9, 2015, at 9:42 AM, Martin Grigorov <mg...@apache.org>
> > wrote:
> > >
> > > Hi,
> > >
> > > What change exactly you did in logging.properties ?
> > > Please give us the diff and we will debug it.
> > > Thanks!
> > >
> > > Martin Grigorov
> > > Freelancer, available for hire!
> > > Wicket Training and Consulting
> > > https://twitter.com/mtgrigorov
> > >
> > > On Thu, Apr 9, 2015 at 5:57 AM, Luis Miguel Payet <mp...@fastmail.fm>
> > > wrote:
> > >
> > >> Hello,
> > >>
> > >> I create a new project from the SimpleApp archetype, version
> > >> 1.9.0-SNAPSHOT. I change the logging to DEBUG in the
> logging.properties
> > >> file. I test that the application runs properly.
> > >>
> > >> Then I add the isis-module-security add-on following the readme
> > >> instructions. When I run the application, I get an exception as
> follows:
> > >>
> > >> 21:49:23,873  [IsisWicketApplication main       ERROR]  Failed to
> > >> initialize
> > >> com.google.inject.ProvisionException: Guice provision errors:
> > >>
> > >> 1) Error in custom provider, java.util.ConcurrentModificationException
> > >> at
> > >>
> >
> org.apache.isis.core.runtime.runner.IsisInjectModule.provideIsisSystem(IsisInjectModule.java:132)
> > >> at
> > >>
> >
> org.apache.isis.core.runtime.runner.IsisInjectModule.provideIsisSystem(IsisInjectModule.java:132)
> > >> while locating org.apache.isis.core.runtime.system.IsisSystem
> > >>   for field at
> > >>
> >
> org.apache.isis.viewer.wicket.viewer.IsisWicketApplication.system(IsisWicketApplication.java:142)
> > >> while locating domainapp.webapp.SimpleApplication
> > >>
> > >> When I turn the logging down to INFO, the application runs properly.
> The
> > >> same behaviour happens with the SimpleApp version 1.8.0
> > >>
> > >> Please help, as I’m far too new at this to be able to fix it myself.
> > >>
> > >> Thanks,
> > >> Miguel
> >
> >
>

Re: Error with DEBUG logging in SimpleApp with isis-module-security

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
Hi Luis,

(could you subscribe to the mailing list ?... at the moment it seems I have
to approve your posts)

As Martin says, we'll take a look.  We have seen this sort of issue in the
past, where increasing the logging level to DEBUG is caused Isis to attempt
to do a toString() on an entity that had been deleted or was otherwise
invalid to access.  It's possible that's the issue here.

For now, I guess the workaround is to leave the logging as it us :-)

Thanks for bringing this to our attention, though.

Cheers
Dan


On 9 April 2015 at 18:27, Luis Miguel Payet <mi...@trazos-peru.com>
wrote:

> Hello Martin,
>
> > Please give us the diff and we will debug it.
>
> Here it is:
>
> --- a/src/main/webapp/WEB-INF/logging.properties
> +++ b/src/main/webapp/WEB-INF/logging.properties
> @@ -19,8 +19,8 @@
>  #
>  # Isis uses log4j is used to provide system logging
>  #
> -log4j.rootCategory=INFO, Console
> -#log4j.rootCategory=DEBUG, Console,File
> +#log4j.rootCategory=INFO, Console
> +log4j.rootCategory=DEBUG, Console,File
>
> Thanks,
> Miguel
>
> > On Apr 9, 2015, at 9:42 AM, Martin Grigorov <mg...@apache.org>
> wrote:
> >
> > Hi,
> >
> > What change exactly you did in logging.properties ?
> > Please give us the diff and we will debug it.
> > Thanks!
> >
> > Martin Grigorov
> > Freelancer, available for hire!
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
> > On Thu, Apr 9, 2015 at 5:57 AM, Luis Miguel Payet <mp...@fastmail.fm>
> > wrote:
> >
> >> Hello,
> >>
> >> I create a new project from the SimpleApp archetype, version
> >> 1.9.0-SNAPSHOT. I change the logging to DEBUG in the logging.properties
> >> file. I test that the application runs properly.
> >>
> >> Then I add the isis-module-security add-on following the readme
> >> instructions. When I run the application, I get an exception as follows:
> >>
> >> 21:49:23,873  [IsisWicketApplication main       ERROR]  Failed to
> >> initialize
> >> com.google.inject.ProvisionException: Guice provision errors:
> >>
> >> 1) Error in custom provider, java.util.ConcurrentModificationException
> >> at
> >>
> org.apache.isis.core.runtime.runner.IsisInjectModule.provideIsisSystem(IsisInjectModule.java:132)
> >> at
> >>
> org.apache.isis.core.runtime.runner.IsisInjectModule.provideIsisSystem(IsisInjectModule.java:132)
> >> while locating org.apache.isis.core.runtime.system.IsisSystem
> >>   for field at
> >>
> org.apache.isis.viewer.wicket.viewer.IsisWicketApplication.system(IsisWicketApplication.java:142)
> >> while locating domainapp.webapp.SimpleApplication
> >>
> >> When I turn the logging down to INFO, the application runs properly. The
> >> same behaviour happens with the SimpleApp version 1.8.0
> >>
> >> Please help, as I’m far too new at this to be able to fix it myself.
> >>
> >> Thanks,
> >> Miguel
>
>

Re: Error with DEBUG logging in SimpleApp with isis-module-security

Posted by Luis Miguel Payet <mi...@trazos-peru.com>.
Hello Martin,

> Please give us the diff and we will debug it.

Here it is:

--- a/src/main/webapp/WEB-INF/logging.properties
+++ b/src/main/webapp/WEB-INF/logging.properties
@@ -19,8 +19,8 @@
 #
 # Isis uses log4j is used to provide system logging
 #
-log4j.rootCategory=INFO, Console
-#log4j.rootCategory=DEBUG, Console,File
+#log4j.rootCategory=INFO, Console
+log4j.rootCategory=DEBUG, Console,File

Thanks,
Miguel

> On Apr 9, 2015, at 9:42 AM, Martin Grigorov <mg...@apache.org> wrote:
> 
> Hi,
> 
> What change exactly you did in logging.properties ?
> Please give us the diff and we will debug it.
> Thanks!
> 
> Martin Grigorov
> Freelancer, available for hire!
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
> 
> On Thu, Apr 9, 2015 at 5:57 AM, Luis Miguel Payet <mp...@fastmail.fm>
> wrote:
> 
>> Hello,
>> 
>> I create a new project from the SimpleApp archetype, version
>> 1.9.0-SNAPSHOT. I change the logging to DEBUG in the logging.properties
>> file. I test that the application runs properly.
>> 
>> Then I add the isis-module-security add-on following the readme
>> instructions. When I run the application, I get an exception as follows:
>> 
>> 21:49:23,873  [IsisWicketApplication main       ERROR]  Failed to
>> initialize
>> com.google.inject.ProvisionException: Guice provision errors:
>> 
>> 1) Error in custom provider, java.util.ConcurrentModificationException
>> at
>> org.apache.isis.core.runtime.runner.IsisInjectModule.provideIsisSystem(IsisInjectModule.java:132)
>> at
>> org.apache.isis.core.runtime.runner.IsisInjectModule.provideIsisSystem(IsisInjectModule.java:132)
>> while locating org.apache.isis.core.runtime.system.IsisSystem
>>   for field at
>> org.apache.isis.viewer.wicket.viewer.IsisWicketApplication.system(IsisWicketApplication.java:142)
>> while locating domainapp.webapp.SimpleApplication
>> 
>> When I turn the logging down to INFO, the application runs properly. The
>> same behaviour happens with the SimpleApp version 1.8.0
>> 
>> Please help, as I’m far too new at this to be able to fix it myself.
>> 
>> Thanks,
>> Miguel


Re: Error with DEBUG logging in SimpleApp with isis-module-security

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

What change exactly you did in logging.properties ?
Please give us the diff and we will debug it.
Thanks!

Martin Grigorov
Freelancer, available for hire!
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Thu, Apr 9, 2015 at 5:57 AM, Luis Miguel Payet <mp...@fastmail.fm>
wrote:

> Hello,
>
> I create a new project from the SimpleApp archetype, version
> 1.9.0-SNAPSHOT. I change the logging to DEBUG in the logging.properties
> file. I test that the application runs properly.
>
> Then I add the isis-module-security add-on following the readme
> instructions. When I run the application, I get an exception as follows:
>
> 21:49:23,873  [IsisWicketApplication main       ERROR]  Failed to
> initialize
> com.google.inject.ProvisionException: Guice provision errors:
>
> 1) Error in custom provider, java.util.ConcurrentModificationException
>   at
> org.apache.isis.core.runtime.runner.IsisInjectModule.provideIsisSystem(IsisInjectModule.java:132)
>   at
> org.apache.isis.core.runtime.runner.IsisInjectModule.provideIsisSystem(IsisInjectModule.java:132)
>   while locating org.apache.isis.core.runtime.system.IsisSystem
>     for field at
> org.apache.isis.viewer.wicket.viewer.IsisWicketApplication.system(IsisWicketApplication.java:142)
>   while locating domainapp.webapp.SimpleApplication
>
> When I turn the logging down to INFO, the application runs properly. The
> same behaviour happens with the SimpleApp version 1.8.0
>
> Please help, as I’m far too new at this to be able to fix it myself.
>
> Thanks,
> Miguel