[jira] [Commented] (ISIS-1852) Iterating over query result list with parallelStream produces next exception

2018-01-25 Thread Andi Huber (JIRA)

[ 
https://issues.apache.org/jira/browse/ISIS-1852?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16340377#comment-16340377
 ] 

Andi Huber commented on ISIS-1852:
--

Thanks for reporting this.

Internal Note:
Investigating the problem (and definitely not fully understanding what's going 
on), there might be need of InheritableThreadLocal instead of ThreadLocal, in 
our implementation of ServiceInstantiator. But at the time being, this is just 
a wild guess.

[1] 
https://docs.oracle.com/javase/8/docs/api/java/lang/InheritableThreadLocal.html|https://docs.oracle.com/javase/8/docs/api/java/lang/InheritableThreadLocal.html

 

> Iterating over query result list with parallelStream produces next exception
> 
>
> Key: ISIS-1852
> URL: https://issues.apache.org/jira/browse/ISIS-1852
> Project: Isis
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 1.15.1
>Reporter: Vladimir Nisevic
>Priority: Major
>
> Given the the result from database, e.g.
> {code:java}
> final List devices = 
> repositoryService.allInstances(MobileDevice.class);{code}
> When I iterate over list with parallelStream
> {code:java}
> filteredDevices.parallelStream().forEach(mobileDevice -> {
> // my stuff here
> });{code}
> Then I get this exception
> {code:java}
> ... 134 more
> Caused by: java.lang.IllegalStateException: No service of type class 
> org.apache.isis.core.runtime.services.metrics.MetricsServiceDefault is 
> available on this 
> at 
> org.apache.isis.core.runtime.services.ServiceInstantiator$2.invoke(ServiceInstantiator.java:217)
> at 
> org.apache.isis.core.runtime.services.metrics.MetricsServiceDefault_$$_jvstad5_7.postLoad(MetricsServiceDefault_$$_jvstad5_7.java)
> at 
> org.datanucleus.api.jdo.JDOCallbackHandler.postLoad(JDOCallbackHandler.java:305)
> at org.datanucleus.state.StateManagerImpl.postLoad(StateManagerImpl.java:4443)
> at 
> org.datanucleus.state.StateManagerImpl.initialiseForCachedPC(StateManagerImpl.java:645)
> at 
> org.apache.isis.objectstore.jdo.datanucleus.JDOStateManagerForIsis.initialiseForCachedPC(JDOStateManagerForIsis.java:112)
> at 
> org.datanucleus.state.ObjectProviderFactoryImpl.newForCachedPC(ObjectProviderFactoryImpl.java:280)
> at 
> org.datanucleus.ExecutionContextImpl.getObjectFromLevel2Cache(ExecutionContextImpl.java:5210)
> at 
> org.datanucleus.ExecutionContextImpl.getObjectFromCache(ExecutionContextImpl.java:5101)
> at 
> org.datanucleus.ExecutionContextImpl.findObject(ExecutionContextImpl.java:3048)
> at 
> org.datanucleus.store.rdbms.query.PersistentClassROF.getObjectForDatastoreId(PersistentClassROF.java:460)
> at 
> org.datanucleus.store.rdbms.query.PersistentClassROF.getObject(PersistentClassROF.java:385)
> at 
> org.datanucleus.store.rdbms.scostore.CollectionStoreIterator.(CollectionStoreIterator.java:100)
> at 
> org.datanucleus.store.rdbms.scostore.FKSetStore.iterator(FKSetStore.java:1080)
> at 
> org.datanucleus.store.types.wrappers.backed.Collection.loadFromStore(Collection.java:374)
> at 
> org.datanucleus.store.types.java8.wrappers.backed.Collection.stream(Collection.java:70)
> at 
> a1.guidedselling.offer.hardware.MobileDevice.referenceNextDevicePriceForTarifWithoutService(MobileDevice.java:195)
> at 
> a1.guidedselling.templates.OfferTemplatesRepository.lambda$offerTemplatesFor$1(OfferTemplatesRepository.java:102)
> at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
> at 
> java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
> at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
> at java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:291)
> at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731)
> at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
> at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
> at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
> at 
> java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157){code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


Re: Internal API: Introduction

2018-01-25 Thread Andi Huber
Thx Dan!

Giving just quick answers inline ...

Cheers, Andi!

On 25.01.2018 23:05, Dan Haywood wrote:
> Hi Andreas,
>
> thanks for doing this work, very happy to see the codebase being tidied up
> and you bringing in some useful utility classes.
>
> One question though ...
>
> Obviously in the future when we're on Java 9, this package can be made
> truly private and hidden from other consumers.  But in the meantime, is
> there any reason to have these classes within applib, given that they are
> intended only for use by the framework, and not by domain applications?
When refactoring applib, I felt the need for a place, where we could put
utility classes, that we can share among the entire(!) core code base,
without having to care too much about changes without notice. Since
every other module depends on applib, except for 'unittestsupport' and I
guess 'schema', applib seemed to be the natural place for this.
> In the isis-core-metamodel module (upon which most other stuff in the
> framework depends) we have org.apache.isis.core.common package, could it go
> there?
This would exclude applib from access to the internal API. (Which in my
refactored version requires access to the new _Reflect and _Context
classes, and makes heavy use of _NullSafe.)
>
> Or, if you'd rather create a new isis-core-commons module, to sit between
> applib and metamodel, that'd also make sense to me.
>From my point of view, a technical solution could be to have the
internal API in a separate module, but share it also with applib!
>
> Let me know,
>
> thx
> Dan



[jira] [Resolved] (ISIS-1853) Fix AbstractSessionTemplate and to unmarshal collection and reference arguments.

2018-01-25 Thread Dan Haywood (JIRA)

 [ 
https://issues.apache.org/jira/browse/ISIS-1853?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dan Haywood resolved ISIS-1853.
---
Resolution: Fixed

> Fix AbstractSessionTemplate and to unmarshal collection and reference 
> arguments.
> 
>
> Key: ISIS-1853
> URL: https://issues.apache.org/jira/browse/ISIS-1853
> Project: Isis
>  Issue Type: Bug
>Affects Versions: 1.16.0
>Reporter: Dan Haywood
>Assignee: Dan Haywood
>Priority: Minor
> Fix For: 1.16.1
>
>
> This is blocking replay (ISIS-1569) of actions with parameter collections.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


Re: Internal API: Introduction

2018-01-25 Thread Dan Haywood
Hi Andreas,

thanks for doing this work, very happy to see the codebase being tidied up
and you bringing in some useful utility classes.

One question though ...

Obviously in the future when we're on Java 9, this package can be made
truly private and hidden from other consumers.  But in the meantime, is
there any reason to have these classes within applib, given that they are
intended only for use by the framework, and not by domain applications?

In the isis-core-metamodel module (upon which most other stuff in the
framework depends) we have org.apache.isis.core.common package, could it go
there?

Or, if you'd rather create a new isis-core-commons module, to sit between
applib and metamodel, that'd also make sense to me.

Let me know,

thx
Dan

On Wed, 24 Jan 2018 at 07:14 Andreas Huber  wrote:

> Hi Folks!
>
> I'd like to give a summary of changes introduced with branch
> ISIS-1846_internal_utils that's meant for version 2.0.0. (Ready for
> review and comments.)
>
> In order to consolidate recurring code fragments and idioms, we gather
> these within an Internal API which ...
> * is shared among the entire code base (except unittestsupport)
> * has explicit java-doc warnings 'internal use only ... likely to change
> without notice'
> * is gathered within org.apache.isis.applib.internal.xxx
> * has naming convention: class-names should be prefixed with underscore (_)
> * has naming suggestion: package private support classes should follow
> 'mixin naming style'
> * is not part of the public API and will be access restricted once Java
> 9 will be in place
>
> = Internal API Summary [1]
>
> == _Constants
> * as the name suggests, a collection of immutable recurring immutables
> * helps to reduce heap pollution (at least a little bit)
>
> == _Casts
> * collection of common type casting use-cases
> * by now we have only one: unchecked casts
>
> == _NullSafe
> * shortcuts for common null-check idioms
> * shortcuts for common empty-check idioms
> * convenient ways for null-safe stream creation
>
> == _Strings
> * all use-cases are implemented null-safe (we handle null inputs properly)
> * has some basic building blocks like 'trim', 'upper', 'lower',
> 'capitalize'
> * can combine building blocks via unary-operator composition
> * more complex string processing operators are provided via mixins
> * convenient string splitting via Stream splitThenStream(input,
> separator)
>
> == _Comparators
> * complex recurring comparators (e.g. dewey-order) are provided via mixins
>
> == _Context
> * provides a mechanism for storing and retrieving singletons
> * needed to replaces static fields in our code-base that have a
> application-scoped life-cycle
> * could be backed with CDI once we have it, by now uses a static hash-map
>
> == _Exceptions
> provides recurring exception creation idioms like
> * 'unexpected code reach' or
> * 'case not handled' in switch statements
>
> == _Reflect
> Since we use an external reflection API (reflections.org), we refactored
> all use-cases throughout our code-base (except unittestsupport) to
> access 'reflections.org' only via the interfaces now provided by
> _Reflect. This allows for easy replacement under the hood, if needed.
> Maven dependencies have been updated, such that 'reflections.org' is
> only a compile-dependency for isis-core-applib (and unittestsupport) but
> this dependency is not transitive (meaning, its not propagated to the
> other core-projects).
>
> Cheers Andi!
>
> [1]
>
> https://github.com/apache/isis/tree/ISIS-1846_internal_utils/core/applib/src/main/java/org/apache/isis/applib/internal
>
>
>
>
>
>
>
>
>
>
>
>
>


[jira] [Commented] (ISIS-1853) Fix AbstractSessionTemplate and to unmarshal collection and reference arguments.

2018-01-25 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/ISIS-1853?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16339530#comment-16339530
 ] 

ASF subversion and git services commented on ISIS-1853:
---

Commit b56a68e189ed7f3e597a0e122633ba48cf722fa5 in isis's branch 
refs/heads/ISIS-1569-replay-commands from [~danhaywood]
[ https://gitbox.apache.org/repos/asf?p=isis.git;h=b56a68e ]

ISIS-1853: extends CommandDtoUtils to support colleciton args, and similarly 
AbstractIsisSessionTemplate.

Also simplifies some code in BackgroundCommandExecution, removing stuff 
commented out over a year ago.


> Fix AbstractSessionTemplate and to unmarshal collection and reference 
> arguments.
> 
>
> Key: ISIS-1853
> URL: https://issues.apache.org/jira/browse/ISIS-1853
> Project: Isis
>  Issue Type: Bug
>Affects Versions: 1.16.0
>Reporter: Dan Haywood
>Assignee: Dan Haywood
>Priority: Minor
> Fix For: 1.16.1
>
>
> This is blocking replay (ISIS-1569) of actions with parameter collections.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (ISIS-1853) Fix AbstractSessionTemplate and to unmarshal collection and reference arguments.

2018-01-25 Thread Dan Haywood (JIRA)

 [ 
https://issues.apache.org/jira/browse/ISIS-1853?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dan Haywood updated ISIS-1853:
--
Summary: Fix AbstractSessionTemplate and to unmarshal collection and 
reference arguments.  (was: CommonDtoUtils is unable to unmarshal collection 
arguments)

> Fix AbstractSessionTemplate and to unmarshal collection and reference 
> arguments.
> 
>
> Key: ISIS-1853
> URL: https://issues.apache.org/jira/browse/ISIS-1853
> Project: Isis
>  Issue Type: Bug
>Affects Versions: 1.16.0
>Reporter: Dan Haywood
>Assignee: Dan Haywood
>Priority: Minor
> Fix For: 1.16.1
>
>
> This is blocking replay (ISIS-1569) of actions with parameter collections.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (ISIS-1850) Rename 'default' in JSON Response

2018-01-25 Thread Dan Haywood (JIRA)

 [ 
https://issues.apache.org/jira/browse/ISIS-1850?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dan Haywood updated ISIS-1850:
--
Fix Version/s: 1.16.1

> Rename 'default' in JSON Response
> -
>
> Key: ISIS-1850
> URL: https://issues.apache.org/jira/browse/ISIS-1850
> Project: Isis
>  Issue Type: Improvement
>  Components: Core: Viewer: RestfulObjects
>Affects Versions: 1.16.0
>Reporter: Jörg Rade
>Priority: Major
> Fix For: 1.16.1
>
>
> Invoking
> {code:java}
> http://localhost:8080/restful/services/isisApplib.FixtureScriptsDefault/actions/runFixtureScript{code}
> answers:
> {code}
> "parameters": {
> "script": {
> "num": 0,
> "id": "script",
> "name": "Script",
> "description": "",
> "choices": [
> {
> "rel": "urn:org.restfulobjects:rels/value",
> "href": 
> "http://localhost:8080/restful/objects/domainapp.application.fixture.scenarios.DomainAppDemo/PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPG1lbWVudG8-PHBhdGg-PC9wYXRoPjwvbWVtZW50bz4=";,
> "method": "GET",
> "type": 
> "application/json;profile=\"urn:org.restfulobjects:repr-types/object\"",
> "title": "Domain App Demo"
> }
> ],
> "default": {
> "rel": "urn:org.restfulobjects:rels/value",
> "href": 
> "http://localhost:8080/restful/objects/domainapp.application.fixture.scenarios.DomainAppDemo/PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPG1lbWVudG8-PHBhdGg-PC9wYXRoPjwvbWVtZW50bz4=";,
> "method": "GET",
> "type": 
> "application/json;profile=\"urn:org.restfulobjects:repr-types/object\"",
> "title": "Domain App Demo"
> }
> },
> {code}
> default is a keyword in ActionScript and converting JSON to AS like in 
> https://github.com/joerg-rade/roViz/blob/master/src/main/flex/org/ro/to/AbstractTransferObject.as#L10
> is not possible since 'public var default:Object' is illegal.
> Please rename 'default' into eg. defaultChoice



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (ISIS-1845) Improve code coverage regarding applib's test-suite

2018-01-25 Thread Dan Haywood (JIRA)

 [ 
https://issues.apache.org/jira/browse/ISIS-1845?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dan Haywood updated ISIS-1845:
--
Fix Version/s: 2.0.0-M1

> Improve code coverage regarding applib's test-suite
> ---
>
> Key: ISIS-1845
> URL: https://issues.apache.org/jira/browse/ISIS-1845
> Project: Isis
>  Issue Type: Sub-task
>Reporter: Andi Huber
>Priority: Major
> Fix For: 2.0.0-M1
>
>
> Currently we have about 28% code covered by tests.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (ISIS-1853) CommonDtoUtils is unable to unmarshal collection arguments

2018-01-25 Thread Dan Haywood (JIRA)

 [ 
https://issues.apache.org/jira/browse/ISIS-1853?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dan Haywood updated ISIS-1853:
--
Summary: CommonDtoUtils is unable to unmarshal collection arguments  (was: 
CommandDtoUtils is unable to unmarshall collection arguments)

> CommonDtoUtils is unable to unmarshal collection arguments
> --
>
> Key: ISIS-1853
> URL: https://issues.apache.org/jira/browse/ISIS-1853
> Project: Isis
>  Issue Type: Bug
>Affects Versions: 1.16.0
>Reporter: Dan Haywood
>Assignee: Dan Haywood
>Priority: Minor
> Fix For: 1.16.1
>
>
> This is blocking replay (ISIS-1569) of actions with parameter collections.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (ISIS-1853) CommandDtoUtils is unable to unmarshall collection arguments

2018-01-25 Thread Dan Haywood (JIRA)
Dan Haywood created ISIS-1853:
-

 Summary: CommandDtoUtils is unable to unmarshall collection 
arguments
 Key: ISIS-1853
 URL: https://issues.apache.org/jira/browse/ISIS-1853
 Project: Isis
  Issue Type: Bug
Affects Versions: 1.16.0
Reporter: Dan Haywood
Assignee: Dan Haywood
 Fix For: 1.16.1


This is blocking replay (ISIS-1569) of actions with parameter collections.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (ISIS-1852) Iterating over query result list with parallelStream produces next exception

2018-01-25 Thread Vladimir Nisevic (JIRA)

 [ 
https://issues.apache.org/jira/browse/ISIS-1852?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vladimir Nisevic updated ISIS-1852:
---
Description: 
Given the the result from database, e.g.
{code:java}
final List devices = 
repositoryService.allInstances(MobileDevice.class);{code}
When I iterate over list with parallelStream
{code:java}
filteredDevices.parallelStream().forEach(mobileDevice -> {
// my stuff here
});{code}
Then I get this exception
{code:java}
... 134 more
Caused by: java.lang.IllegalStateException: No service of type class 
org.apache.isis.core.runtime.services.metrics.MetricsServiceDefault is 
available on this 
at 
org.apache.isis.core.runtime.services.ServiceInstantiator$2.invoke(ServiceInstantiator.java:217)
at 
org.apache.isis.core.runtime.services.metrics.MetricsServiceDefault_$$_jvstad5_7.postLoad(MetricsServiceDefault_$$_jvstad5_7.java)
at 
org.datanucleus.api.jdo.JDOCallbackHandler.postLoad(JDOCallbackHandler.java:305)
at org.datanucleus.state.StateManagerImpl.postLoad(StateManagerImpl.java:4443)
at 
org.datanucleus.state.StateManagerImpl.initialiseForCachedPC(StateManagerImpl.java:645)
at 
org.apache.isis.objectstore.jdo.datanucleus.JDOStateManagerForIsis.initialiseForCachedPC(JDOStateManagerForIsis.java:112)
at 
org.datanucleus.state.ObjectProviderFactoryImpl.newForCachedPC(ObjectProviderFactoryImpl.java:280)
at 
org.datanucleus.ExecutionContextImpl.getObjectFromLevel2Cache(ExecutionContextImpl.java:5210)
at 
org.datanucleus.ExecutionContextImpl.getObjectFromCache(ExecutionContextImpl.java:5101)
at 
org.datanucleus.ExecutionContextImpl.findObject(ExecutionContextImpl.java:3048)
at 
org.datanucleus.store.rdbms.query.PersistentClassROF.getObjectForDatastoreId(PersistentClassROF.java:460)
at 
org.datanucleus.store.rdbms.query.PersistentClassROF.getObject(PersistentClassROF.java:385)
at 
org.datanucleus.store.rdbms.scostore.CollectionStoreIterator.(CollectionStoreIterator.java:100)
at 
org.datanucleus.store.rdbms.scostore.FKSetStore.iterator(FKSetStore.java:1080)
at 
org.datanucleus.store.types.wrappers.backed.Collection.loadFromStore(Collection.java:374)
at 
org.datanucleus.store.types.java8.wrappers.backed.Collection.stream(Collection.java:70)
at 
a1.guidedselling.offer.hardware.MobileDevice.referenceNextDevicePriceForTarifWithoutService(MobileDevice.java:195)
at 
a1.guidedselling.templates.OfferTemplatesRepository.lambda$offerTemplatesFor$1(OfferTemplatesRepository.java:102)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
at 
java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:291)
at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at 
java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157){code}

  was:
Here the part of exception log

 
{code:java}
... 134 more
Caused by: java.lang.IllegalStateException: No service of type class 
org.apache.isis.core.runtime.services.metrics.MetricsServiceDefault is 
available on this 
at 
org.apache.isis.core.runtime.services.ServiceInstantiator$2.invoke(ServiceInstantiator.java:217)
at 
org.apache.isis.core.runtime.services.metrics.MetricsServiceDefault_$$_jvstad5_7.postLoad(MetricsServiceDefault_$$_jvstad5_7.java)
at 
org.datanucleus.api.jdo.JDOCallbackHandler.postLoad(JDOCallbackHandler.java:305)
at org.datanucleus.state.StateManagerImpl.postLoad(StateManagerImpl.java:4443)
at 
org.datanucleus.state.StateManagerImpl.initialiseForCachedPC(StateManagerImpl.java:645)
at 
org.apache.isis.objectstore.jdo.datanucleus.JDOStateManagerForIsis.initialiseForCachedPC(JDOStateManagerForIsis.java:112)
at 
org.datanucleus.state.ObjectProviderFactoryImpl.newForCachedPC(ObjectProviderFactoryImpl.java:280)
at 
org.datanucleus.ExecutionContextImpl.getObjectFromLevel2Cache(ExecutionContextImpl.java:5210)
at 
org.datanucleus.ExecutionContextImpl.getObjectFromCache(ExecutionContextImpl.java:5101)
at 
org.datanucleus.ExecutionContextImpl.findObject(ExecutionContextImpl.java:3048)
at 
org.datanucleus.store.rdbms.query.PersistentClassROF.getObjectForDatastoreId(PersistentClassROF.java:460)
at 
org.datanucleus.store.rdbms.query.PersistentClassROF.getObject(PersistentClassROF.java:385)
at 
org.datanucleus.store.rdbms.scostore.CollectionStoreIterator.(CollectionStoreIterator.java:100)
at 
org.datanucleus.store.rdbms.scostore.FKSetStore.iterator(FKSetStore.java:1080)
at 
org.datanucleus.store.types.wrappers.backed.Collection.loadFromStore(Collection.java:374)
at 
org.datanucleus.store.types.java8.wrappers.backed.Collection.stream(Collection.java:70)
at 
a1.gu

[jira] [Created] (ISIS-1852) Iterating over query result list with parallelStream produces next exception

2018-01-25 Thread Vladimir Nisevic (JIRA)
Vladimir Nisevic created ISIS-1852:
--

 Summary: Iterating over query result list with parallelStream 
produces next exception
 Key: ISIS-1852
 URL: https://issues.apache.org/jira/browse/ISIS-1852
 Project: Isis
  Issue Type: Bug
  Components: Core
Affects Versions: 1.15.1
Reporter: Vladimir Nisevic


Here the part of exception log

 
{code:java}
... 134 more
Caused by: java.lang.IllegalStateException: No service of type class 
org.apache.isis.core.runtime.services.metrics.MetricsServiceDefault is 
available on this 
at 
org.apache.isis.core.runtime.services.ServiceInstantiator$2.invoke(ServiceInstantiator.java:217)
at 
org.apache.isis.core.runtime.services.metrics.MetricsServiceDefault_$$_jvstad5_7.postLoad(MetricsServiceDefault_$$_jvstad5_7.java)
at 
org.datanucleus.api.jdo.JDOCallbackHandler.postLoad(JDOCallbackHandler.java:305)
at org.datanucleus.state.StateManagerImpl.postLoad(StateManagerImpl.java:4443)
at 
org.datanucleus.state.StateManagerImpl.initialiseForCachedPC(StateManagerImpl.java:645)
at 
org.apache.isis.objectstore.jdo.datanucleus.JDOStateManagerForIsis.initialiseForCachedPC(JDOStateManagerForIsis.java:112)
at 
org.datanucleus.state.ObjectProviderFactoryImpl.newForCachedPC(ObjectProviderFactoryImpl.java:280)
at 
org.datanucleus.ExecutionContextImpl.getObjectFromLevel2Cache(ExecutionContextImpl.java:5210)
at 
org.datanucleus.ExecutionContextImpl.getObjectFromCache(ExecutionContextImpl.java:5101)
at 
org.datanucleus.ExecutionContextImpl.findObject(ExecutionContextImpl.java:3048)
at 
org.datanucleus.store.rdbms.query.PersistentClassROF.getObjectForDatastoreId(PersistentClassROF.java:460)
at 
org.datanucleus.store.rdbms.query.PersistentClassROF.getObject(PersistentClassROF.java:385)
at 
org.datanucleus.store.rdbms.scostore.CollectionStoreIterator.(CollectionStoreIterator.java:100)
at 
org.datanucleus.store.rdbms.scostore.FKSetStore.iterator(FKSetStore.java:1080)
at 
org.datanucleus.store.types.wrappers.backed.Collection.loadFromStore(Collection.java:374)
at 
org.datanucleus.store.types.java8.wrappers.backed.Collection.stream(Collection.java:70)
at 
a1.guidedselling.offer.hardware.MobileDevice.referenceNextDevicePriceForTarifWithoutService(MobileDevice.java:195)
at 
a1.guidedselling.templates.OfferTemplatesRepository.lambda$offerTemplatesFor$1(OfferTemplatesRepository.java:102)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
at 
java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:291)
at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at 
java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157){code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (ISIS-1569) Automated testing tool to replay commands against a copy of prod

2018-01-25 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/ISIS-1569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16339056#comment-16339056
 ] 

ASF subversion and git services commented on ISIS-1569:
---

Commit 50fa124125da17e81f14f5cbae651cf603292d00 in isis's branch 
refs/heads/ISIS-1569-replay-commands from [~danhaywood]
[ https://gitbox.apache.org/repos/asf?p=isis.git;h=50fa124 ]

ISIS-1569: removes unused and accidentally committed element in cmd-1.4.xsd


> Automated testing tool to replay commands against a copy of prod
> 
>
> Key: ISIS-1569
> URL: https://issues.apache.org/jira/browse/ISIS-1569
> Project: Isis
>  Issue Type: New Feature
>  Components: Core
>Affects Versions: 1.13.2.1
>Reporter: Dan Haywood
>Priority: Major
> Fix For: 1.16.1
>
>
> eg obtain copy of prod from a month ago
> then for all commands since then, replay (simulating the current user and 
> time for each)
> finally, compare resultant database with current prod, and list out 
> differences in data.
> could also use for performance testing, perhaps.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (ISIS-1569) Automated testing tool to replay commands against a copy of prod

2018-01-25 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/ISIS-1569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16339054#comment-16339054
 ] 

ASF subversion and git services commented on ISIS-1569:
---

Commit 24dcfa5892dba4513c71c65e7eee59ffec5fea2f in isis's branch 
refs/heads/ISIS-1569-replay-commands from [~danhaywood]
[ https://gitbox.apache.org/repos/asf?p=isis.git;h=24dcfa5 ]

ISIS-1569: adds timings to CommandsDto, so less verbose and easier to read XML


> Automated testing tool to replay commands against a copy of prod
> 
>
> Key: ISIS-1569
> URL: https://issues.apache.org/jira/browse/ISIS-1569
> Project: Isis
>  Issue Type: New Feature
>  Components: Core
>Affects Versions: 1.13.2.1
>Reporter: Dan Haywood
>Priority: Major
> Fix For: 1.16.1
>
>
> eg obtain copy of prod from a month ago
> then for all commands since then, replay (simulating the current user and 
> time for each)
> finally, compare resultant database with current prod, and list out 
> differences in data.
> could also use for performance testing, perhaps.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (ISIS-1569) Automated testing tool to replay commands against a copy of prod

2018-01-25 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/ISIS-1569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16339055#comment-16339055
 ] 

ASF subversion and git services commented on ISIS-1569:
---

Commit 9020b721b3b7fa82454a4c6e56faee6b38956223 in isis's branch 
refs/heads/ISIS-1569-replay-commands from [~danhaywood]
[ https://gitbox.apache.org/repos/asf?p=isis.git;h=9020b72 ]

ISIS-1569: updates to XSDs, make sure the version defaultsb are correct.


> Automated testing tool to replay commands against a copy of prod
> 
>
> Key: ISIS-1569
> URL: https://issues.apache.org/jira/browse/ISIS-1569
> Project: Isis
>  Issue Type: New Feature
>  Components: Core
>Affects Versions: 1.13.2.1
>Reporter: Dan Haywood
>Priority: Major
> Fix For: 1.16.1
>
>
> eg obtain copy of prod from a month ago
> then for all commands since then, replay (simulating the current user and 
> time for each)
> finally, compare resultant database with current prod, and list out 
> differences in data.
> could also use for performance testing, perhaps.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (ISIS-1569) Automated testing tool to replay commands against a copy of prod

2018-01-25 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/ISIS-1569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16339057#comment-16339057
 ] 

ASF subversion and git services commented on ISIS-1569:
---

Commit a868fa9fbd52ad655817c82cad863c033836fcc0 in isis's branch 
refs/heads/ISIS-1569-replay-commands from [~danhaywood]
[ https://gitbox.apache.org/repos/asf?p=isis.git;h=a868fa9 ]

ISIS-1569: updates XSDs for docs, and adds in the historical previous versions 
also.


> Automated testing tool to replay commands against a copy of prod
> 
>
> Key: ISIS-1569
> URL: https://issues.apache.org/jira/browse/ISIS-1569
> Project: Isis
>  Issue Type: New Feature
>  Components: Core
>Affects Versions: 1.13.2.1
>Reporter: Dan Haywood
>Priority: Major
> Fix For: 1.16.1
>
>
> eg obtain copy of prod from a month ago
> then for all commands since then, replay (simulating the current user and 
> time for each)
> finally, compare resultant database with current prod, and list out 
> differences in data.
> could also use for performance testing, perhaps.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (ISIS-1569) Automated testing tool to replay commands against a copy of prod

2018-01-25 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/ISIS-1569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16339058#comment-16339058
 ] 

ASF subversion and git services commented on ISIS-1569:
---

Commit 1cdd64a9da2a10032ef0993c6fee3c5b55c71888 in isis's branch 
refs/heads/ISIS-1569-replay-commands from [~danhaywood]
[ https://gitbox.apache.org/repos/asf?p=isis.git;h=1cdd64a ]

ISIS-1569: updates docs for ContentMappingService, default implementations for 
Command(s)Dto

also removes unused import.


> Automated testing tool to replay commands against a copy of prod
> 
>
> Key: ISIS-1569
> URL: https://issues.apache.org/jira/browse/ISIS-1569
> Project: Isis
>  Issue Type: New Feature
>  Components: Core
>Affects Versions: 1.13.2.1
>Reporter: Dan Haywood
>Priority: Major
> Fix For: 1.16.1
>
>
> eg obtain copy of prod from a month ago
> then for all commands since then, replay (simulating the current user and 
> time for each)
> finally, compare resultant database with current prod, and list out 
> differences in data.
> could also use for performance testing, perhaps.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (ISIS-1836) Better diagnostic reporting in RO viewer if passed in a non-parseable value

2018-01-25 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/ISIS-1836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16339053#comment-16339053
 ] 

ASF subversion and git services commented on ISIS-1836:
---

Commit ad841f974943ce161db152b5fc99b92583d536ea in isis's branch 
refs/heads/ISIS-1569-replay-commands from [~danhaywood]
[ https://gitbox.apache.org/repos/asf?p=isis.git;h=ad841f9 ]

ISIS-1836: removes chance of an NPE in the RO mapper for an exception (which 
was in turn resulting in a 500 rather than 422 when invoked an action with an 
incorrect parameter argument).


> Better diagnostic reporting in RO viewer if passed in a non-parseable value
> ---
>
> Key: ISIS-1836
> URL: https://issues.apache.org/jira/browse/ISIS-1836
> Project: Isis
>  Issue Type: Improvement
>Affects Versions: 1.16.0
>Reporter: Dan Haywood
>Assignee: Dan Haywood
>Priority: Trivial
> Fix For: 1.16.1
>
>
> was passing transactionId=null for a parameter of type UUID... underlying 
> issue swallowed.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (ISIS-1835) Better diagnostic reporting if fail to read a configuration flie.

2018-01-25 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/ISIS-1835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16339052#comment-16339052
 ] 

ASF subversion and git services commented on ISIS-1835:
---

Commit dda922cce63c9442dc5a6aefd1a6a53e6e915796 in isis's branch 
refs/heads/ISIS-1569-replay-commands from [~danhaywood]
[ https://gitbox.apache.org/repos/asf?p=isis.git;h=dda922c ]

ISIS-1835: catches any type of exception in order to report a problem (an NPE 
was being thrown if the file wasn't present, rather than an IOException)


> Better diagnostic reporting if fail to read a configuration flie.
> -
>
> Key: ISIS-1835
> URL: https://issues.apache.org/jira/browse/ISIS-1835
> Project: Isis
>  Issue Type: Improvement
>Affects Versions: 1.16.0
>Reporter: Dan Haywood
>Assignee: Dan Haywood
>Priority: Trivial
> Fix For: 1.16.1
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (ISIS-1851) Improve the dynamic visibility of PropertyGroups so works with pdf js viewer (anything that isn't a ScalarPanelAbstract2, basically).

2018-01-25 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/ISIS-1851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16339042#comment-16339042
 ] 

ASF subversion and git services commented on ISIS-1851:
---

Commit 33bd9fd932c223e2b6fc5606a670fe655241089b in isis's branch 
refs/heads/maint-1.16.1 from [~danhaywood]
[ https://gitbox.apache.org/repos/asf?p=isis.git;h=33bd9fd ]

ISIS-1851: refine the algorithm for dynamically hiding property groups with 
'nothing' in them


> Improve the dynamic visibility of PropertyGroups so works with pdf js viewer 
> (anything that isn't a ScalarPanelAbstract2, basically).
> -
>
> Key: ISIS-1851
> URL: https://issues.apache.org/jira/browse/ISIS-1851
> Project: Isis
>  Issue Type: Bug
>Affects Versions: 1.16.0
>Reporter: Dan Haywood
>Assignee: Dan Haywood
>Priority: Minor
> Fix For: 1.16.1
>
>
> A property group with only a PdfJsViewer (which doesn't inherit from 
> ScalarPanelAbstract2) was being hidden.  This is because the algorithm used 
> in ISIS-1761 was too aggressive/naive.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (ISIS-1851) Improve the dynamic visibility of PropertyGroups so works with pdf js viewer (anything that isn't a ScalarPanelAbstract2, basically).

2018-01-25 Thread Dan Haywood (JIRA)

 [ 
https://issues.apache.org/jira/browse/ISIS-1851?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dan Haywood resolved ISIS-1851.
---
Resolution: Fixed

> Improve the dynamic visibility of PropertyGroups so works with pdf js viewer 
> (anything that isn't a ScalarPanelAbstract2, basically).
> -
>
> Key: ISIS-1851
> URL: https://issues.apache.org/jira/browse/ISIS-1851
> Project: Isis
>  Issue Type: Bug
>Affects Versions: 1.16.0
>Reporter: Dan Haywood
>Assignee: Dan Haywood
>Priority: Minor
> Fix For: 1.16.1
>
>
> A property group with only a PdfJsViewer (which doesn't inherit from 
> ScalarPanelAbstract2) was being hidden.  This is because the algorithm used 
> in ISIS-1761 was too aggressive/naive.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Assigned] (ISIS-1851) Improve the dynamic visibility of PropertyGroups so works with pdf js viewer (anything that isn't a ScalarPanelAbstract2, basically).

2018-01-25 Thread Dan Haywood (JIRA)

 [ 
https://issues.apache.org/jira/browse/ISIS-1851?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dan Haywood reassigned ISIS-1851:
-

 Assignee: Dan Haywood
Affects Version/s: 1.16.0
Fix Version/s: 1.16.1

> Improve the dynamic visibility of PropertyGroups so works with pdf js viewer 
> (anything that isn't a ScalarPanelAbstract2, basically).
> -
>
> Key: ISIS-1851
> URL: https://issues.apache.org/jira/browse/ISIS-1851
> Project: Isis
>  Issue Type: Bug
>Affects Versions: 1.16.0
>Reporter: Dan Haywood
>Assignee: Dan Haywood
>Priority: Minor
> Fix For: 1.16.1
>
>
> A property group with only a PdfJsViewer (which doesn't inherit from 
> ScalarPanelAbstract2) was being hidden.  This is because the algorithm used 
> in ISIS-1761 was too aggressive/naive.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (ISIS-1851) Improve the dynamic visibility of PropertyGroups so works with pdf js viewer (anything that isn't a ScalarPanelAbstract2, basically).

2018-01-25 Thread Dan Haywood (JIRA)
Dan Haywood created ISIS-1851:
-

 Summary: Improve the dynamic visibility of PropertyGroups so works 
with pdf js viewer (anything that isn't a ScalarPanelAbstract2, basically).
 Key: ISIS-1851
 URL: https://issues.apache.org/jira/browse/ISIS-1851
 Project: Isis
  Issue Type: Bug
Reporter: Dan Haywood


A property group with only a PdfJsViewer (which doesn't inherit from 
ScalarPanelAbstract2) was being hidden.  This is because the algorithm used in 
ISIS-1761 was too aggressive/naive.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (ISIS-1850) Rename 'default' in JSON Response

2018-01-25 Thread JIRA
Jörg Rade created ISIS-1850:
---

 Summary: Rename 'default' in JSON Response
 Key: ISIS-1850
 URL: https://issues.apache.org/jira/browse/ISIS-1850
 Project: Isis
  Issue Type: Improvement
  Components: Core: Viewer: RestfulObjects
Affects Versions: 1.16.0
Reporter: Jörg Rade


Invoking
{code:java}
http://localhost:8080/restful/services/isisApplib.FixtureScriptsDefault/actions/runFixtureScript{code}

answers:
{code}
"parameters": {
"script": {
"num": 0,
"id": "script",
"name": "Script",
"description": "",
"choices": [
{
"rel": "urn:org.restfulobjects:rels/value",
"href": 
"http://localhost:8080/restful/objects/domainapp.application.fixture.scenarios.DomainAppDemo/PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPG1lbWVudG8-PHBhdGg-PC9wYXRoPjwvbWVtZW50bz4=";,
"method": "GET",
"type": 
"application/json;profile=\"urn:org.restfulobjects:repr-types/object\"",
"title": "Domain App Demo"
}
],
"default": {
"rel": "urn:org.restfulobjects:rels/value",
"href": 
"http://localhost:8080/restful/objects/domainapp.application.fixture.scenarios.DomainAppDemo/PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPG1lbWVudG8-PHBhdGg-PC9wYXRoPjwvbWVtZW50bz4=";,
"method": "GET",
"type": 
"application/json;profile=\"urn:org.restfulobjects:repr-types/object\"",
"title": "Domain App Demo"
}
},
{code}

default is a keyword in ActionScript and converting JSON to AS like in 
https://github.com/joerg-rade/roViz/blob/master/src/main/flex/org/ro/to/AbstractTransferObject.as#L10

is not possible since 'public var default:Object' is illegal.

Please rename 'default' into eg. defaultChoice



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)