[jira] [Updated] (ISIS-2029) Using Application Identity (e.g. settings module) with .orm file leads to Webui exception

2020-03-19 Thread Daniel Keir Haywood (Jira)


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

Daniel Keir Haywood updated ISIS-2029:
--
  Component/s: (was: Isis Viewer Wicket)
   (was: Isis Core)
   Isis Persistence JDO
Fix Version/s: (was: 2.1.2)

> Using Application Identity (e.g. settings module) with .orm file leads to 
> Webui exception
> -
>
> Key: ISIS-2029
> URL: https://issues.apache.org/jira/browse/ISIS-2029
> Project: Isis
>  Issue Type: Bug
>  Components: Isis Persistence JDO
>Affects Versions: 1.16.2
>Reporter: Vladimir Nisevic
>Priority: Major
> Attachments: stacktrace.txt
>
>
> h2.Problem description
> I want to use settings module (incode or previous isis-addons) so that the 
> tables are persisted in custom database schema (different than isissettings).
> In order to achieve this I have created a custom .orm file e.g.
>  
> package-custom.orm 
> {code:java}
> 
> http://xmlns.jcp.org/xml/ns/jdo/orm;
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
>  xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/jdo/orm 
> http://xmlns.jcp.org/xml/ns/jdo/orm_3_0.xsd;>
> 
>  table="IsisAppSetting"/>
> 
> 
> 
> {code}
> and refer the file in persistor_datanucleus.properties
> {code:java}
> # schema name override
> isis.persistor.datanucleus.impl.datanucleus.Mapping=custom{code}
>  
> I can create single ApplicationSetting thru WebUI but if I have more than one 
> persisted, here the WebUI exception I get in WebUI
> {code:java}
> Caused by:
> org.datanucleus.exceptions.NucleusUserException
> Identity 
> "interface.MQTT.activated[OID]org.incode.example.settings.dom.jdo.ApplicationSettingJdo"
>  is assigned to class 
> "org.incode.example.settings.dom.jdo.ApplicationSettingJdo", but its not the 
> correct object-id type for this class.
> org.datanucleus.store.AbstractStoreManager#manageClassForIdentity(AbstractStoreManager.java:937)
> org.datanucleus.ExecutionContextImpl#getClassDetailsForId(ExecutionContextImpl.java:3385)
> org.datanucleus.ExecutionContextImpl#findObjects(ExecutionContextImpl.java:3251){code}
>  
> I believe the root cause is that Datanucleus thinks somehow that the 
> ApplicationSetting has not Application Identity which it has since field key 
> is primary key - but only in the case when retreiving more then one entity 
> from database.
>  
> All works fine when creating new instance ApplicationSetting or reading it 
> from database by key. The command "Settings --> listAll" fails.
>  
> I tried also to adapt the .orm file e.g. but it didn't helped.
> {code:java}
> 
>  schema="myschema" table="IsisAppSetting">
> 
> 
>  table="IsisUserSetting"/>
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (ISIS-2029) Using Application Identity (e.g. settings module) with .orm file leads to Webui exception

2019-01-06 Thread Dan Haywood (JIRA)


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

Dan Haywood updated ISIS-2029:
--
Fix Version/s: 1.19.0

> Using Application Identity (e.g. settings module) with .orm file leads to 
> Webui exception
> -
>
> Key: ISIS-2029
> URL: https://issues.apache.org/jira/browse/ISIS-2029
> Project: Isis
>  Issue Type: Bug
>  Components: Core, Core: Viewer: Wicket
>Affects Versions: 1.16.2
>Reporter: Vladimir Nisevic
>Priority: Major
> Fix For: 1.19.0
>
> Attachments: stacktrace.txt
>
>
> h2.Problem description
> I want to use settings module (incode or previous isis-addons) so that the 
> tables are persisted in custom database schema (different than isissettings).
> In order to achieve this I have created a custom .orm file e.g.
>  
> package-custom.orm 
> {code:java}
> 
> http://xmlns.jcp.org/xml/ns/jdo/orm;
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
>  xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/jdo/orm 
> http://xmlns.jcp.org/xml/ns/jdo/orm_3_0.xsd;>
> 
>  table="IsisAppSetting"/>
> 
> 
> 
> {code}
> and refer the file in persistor_datanucleus.properties
> {code:java}
> # schema name override
> isis.persistor.datanucleus.impl.datanucleus.Mapping=custom{code}
>  
> I can create single ApplicationSetting thru WebUI but if I have more than one 
> persisted, here the WebUI exception I get in WebUI
> {code:java}
> Caused by:
> org.datanucleus.exceptions.NucleusUserException
> Identity 
> "interface.MQTT.activated[OID]org.incode.example.settings.dom.jdo.ApplicationSettingJdo"
>  is assigned to class 
> "org.incode.example.settings.dom.jdo.ApplicationSettingJdo", but its not the 
> correct object-id type for this class.
> org.datanucleus.store.AbstractStoreManager#manageClassForIdentity(AbstractStoreManager.java:937)
> org.datanucleus.ExecutionContextImpl#getClassDetailsForId(ExecutionContextImpl.java:3385)
> org.datanucleus.ExecutionContextImpl#findObjects(ExecutionContextImpl.java:3251){code}
>  
> I believe the root cause is that Datanucleus thinks somehow that the 
> ApplicationSetting has not Application Identity which it has since field key 
> is primary key - but only in the case when retreiving more then one entity 
> from database.
>  
> All works fine when creating new instance ApplicationSetting or reading it 
> from database by key. The command "Settings --> listAll" fails.
>  
> I tried also to adapt the .orm file e.g. but it didn't helped.
> {code:java}
> 
>  schema="myschema" table="IsisAppSetting">
> 
> 
>  table="IsisUserSetting"/>
> {code}



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


[jira] [Updated] (ISIS-2029) Using Application Identity (e.g. settings module) with .orm file leads to Webui exception

2018-11-03 Thread Vladimir Nisevic (JIRA)


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

Vladimir Nisevic updated ISIS-2029:
---
Attachment: stacktrace.txt

> Using Application Identity (e.g. settings module) with .orm file leads to 
> Webui exception
> -
>
> Key: ISIS-2029
> URL: https://issues.apache.org/jira/browse/ISIS-2029
> Project: Isis
>  Issue Type: Bug
>  Components: Core, Core: Viewer: Wicket
>Affects Versions: 1.16.2
>Reporter: Vladimir Nisevic
>Priority: Major
> Attachments: stacktrace.txt
>
>
> h2.Problem description
> I want to use settings module (incode or previous isis-addons) so that the 
> tables are persisted in custom database schema (different than isissettings).
> In order to achieve this I have created a custom .orm file e.g.
>  
> package-custom.orm 
> {code:java}
> 
> http://xmlns.jcp.org/xml/ns/jdo/orm;
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
>  xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/jdo/orm 
> http://xmlns.jcp.org/xml/ns/jdo/orm_3_0.xsd;>
> 
>  table="IsisAppSetting"/>
> 
> 
> 
> {code}
> and refer the file in persistor_datanucleus.properties
> {code:java}
> # schema name override
> isis.persistor.datanucleus.impl.datanucleus.Mapping=custom{code}
>  
> I can create single ApplicationSetting thru WebUI but if I have more than one 
> persisted, here the WebUI exception I get in WebUI
> {code:java}
> Caused by:
> org.datanucleus.exceptions.NucleusUserException
> Identity 
> "interface.MQTT.activated[OID]org.incode.example.settings.dom.jdo.ApplicationSettingJdo"
>  is assigned to class 
> "org.incode.example.settings.dom.jdo.ApplicationSettingJdo", but its not the 
> correct object-id type for this class.
> org.datanucleus.store.AbstractStoreManager#manageClassForIdentity(AbstractStoreManager.java:937)
> org.datanucleus.ExecutionContextImpl#getClassDetailsForId(ExecutionContextImpl.java:3385)
> org.datanucleus.ExecutionContextImpl#findObjects(ExecutionContextImpl.java:3251){code}
>  
> I believe the root cause is that Datanucleus thinks somehow that the 
> ApplicationSetting has not Application Identity which it has since field key 
> is primary key - but only in the case when retreiving more then one entity 
> from database.
>  
> All works fine when creating new instance ApplicationSetting or reading it 
> from database by key. The command "Settings --> listAll" fails.
>  
> I tried also to adapt the .orm file e.g. but it didn't helped.
> {code:java}
> 
>  schema="myschema" table="IsisAppSetting">
> 
> 
>  table="IsisUserSetting"/>
> {code}



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