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

Timothy Simecsek edited comment on ISIS-1066 at 3/21/15 8:33 AM:
-----------------------------------------------------------------

Hi Martin,

Thank you for taking a look on it.
the patch.txt is to update the todoapp-1.8 so one can see what I did - you can 
use this as a demo application. If you need a more detailed demo let me know.
Running the application works, but during maven install I get this error 
message: java.lang.RuntimeException: 
org.apache.isis.core.runtime.system.transaction.IsisTransactionManagerException:
 org.apache.wicket.WicketRuntimeException: There is no application attached 

We have in our project a RestCustomRepresentation where we parse the action 
result to a JSON representation (we use ObjectMapper of jackson to do this). My 
goal is to have a unit test in the -integtests module to test the result of 
RestCustomRepresentation.
If you have another approach I can try to use this also.

Thank you
Br Timothy


was (Author: timothy):
Hi Martin,

Thank you for taking a look on it.
the patch.txt is to update the todoapp-1.8 so one can see what I did - you can 
use this as a demo application. If you need a more detailed demo let me know.

We have in our project a RestCustomRepresentation where we parse the action 
result to a JSON representation (we use ObjectMapper of jackson to do this). My 
goal is to have a unit test in the -integtests module to test the result of 
RestCustomRepresentation.
If you have another approach I can try to use this also.

Thank you
Br Timothy

> Moving CustomRepresentationService to dom - There is no application attached 
> to current thread main
> ---------------------------------------------------------------------------------------------------
>
>                 Key: ISIS-1066
>                 URL: https://issues.apache.org/jira/browse/ISIS-1066
>             Project: Isis
>          Issue Type: Bug
>          Components: Core: Viewer: RestfulObjects
>    Affects Versions: core-1.8.0
>            Reporter: Timothy Simecsek
>            Assignee: Dan Haywood
>             Fix For: 1.9.0
>
>         Attachments: patch.txt
>
>
> Hi,
> We are using  something similar to CustomRepresentationService of todoapp, we 
> use it to get a simple JSON representation.
> Our CustomRepresentationService is annotated as DomainService, its package is 
> registered in isis.properties 
> (isis.services.ServicesInstallerFromAnnotation.packagePrefix but not in 
> isis.services!) and it is located in the dom module.
> With apache isis 1.7 it was working, now we migrated to isis 1.8 and now this 
> causes an error during maven install:
> WicketRuntimeException: There is no application attached to current thread 
> main
> {noformat}
> 16:05:09,146  [IsisTransaction      main       INFO ]  abort transaction 
> IsisTransaction@2a49af03[state=MUST_ABORT,commands=0]
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 10.018 sec 
> <<< FAILURE! - in ase.integration.test.ESIntegTest
> ase.integration.test.ESIntegTest  Time elapsed: 10.018 sec  <<< ERROR!
> java.lang.RuntimeException: 
> org.apache.isis.core.runtime.system.transaction.IsisTransactionManagerException:
>  org.apache.wicket.WicketRuntimeException: There is no application attached 
> to current thread main
>       at 
> org.apache.isis.core.integtestsupport.IsisSystemForTest.setUpSystem(IsisSystemForTest.java:350)
>       at 
> ase.integration.AddressSearchEngineSystemInitializer.initIsft(AddressSearchEngineSystemInitializer.java:46)
>       at 
> ase.integration.AbstractAseIntegTest.initClass(AbstractAseIntegTest.java:13)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> {noformat}
> When I run the application on tomcat everything seems to work, the UI is 
> available and I can access the CustomRepresentationService through Rest API.
> I did the described changes on the todoapp for isis 1.8 and I'm getting same 
> result (I attached my changes with patch.txt).
> I moved the CustomRepresentationService to dom module because I need an 
> possibility to unit test the generated JSON strings.
> Please fix that issue or assist me in creating a workaround.
> Thanks,
> Timothy



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to