You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@isis.apache.org by Brian K <ha...@gmail.com> on 2018/09/25 19:15:01 UTC

Wicket Viewer limitations with DataNucleus?

Hi,

It seems that the wicket viewer does not support some features of
DataNucleus:
1.  Application Identity - I posted earlier about this (
https://isis.markmail.org/thread/jm72jzykqnzjdqp6)
2.  Federated Datastore.  Following instructions at
http://www.datanucleus.org/products/datanucleus/jdo/persistence.html#_defining_primary_and_secondary_datastores
, I now can use Swagger-UI to query the secondary datastore [1], but Wicket
viewer keeps on keying on to primary datastore and throwing an error [2].

I noticed in your roadmap at
https://cwiki.apache.org/confluence/display/ISIS/Roadmap+to+Version+2#RoadmaptoVersion2-Extendingpersistencelayersupport
that Wicket may be replaced soon.

Is this something that we could fix with the Wicket viewer or should I wait
for the UI rewrite in 2.0?  Would the best work-around be to create a view
model that proxies all the properties?

Thanks!
Brian

[1]:  I added this to isis.properties:
isis.persistor.datanucleus.impl.datanucleus.datastore.oq=datanucleus_oq.properties

and created the datanucleus_oq.properties file in the src/main/java folder
of the webapp module (it works when there is no
isis.persistor.datanucleus.impl prefixes to the properties):
javax.jdo.option.ConnectionDriverName=com.microsoft.sqlserver.jdbc.SQLServerDriver
javax.jdo.option.ConnectionURL=jdbc:sqlserver://...
javax.jdo.option.ConnectionUserName=username
javax.jdo.option.ConnectionPassword=password


[2]:  (my annotations in *bold*)
REST Viewer looking up an object by its id (via Swagger-UI):
10:50:23,803  [Native               qtp1238209644-16 DEBUG]  SELECT
'domainapp.modules.simple.dom.impl.J300eSession' AS NUCLEUS_TYPE, *.....*,
WHERE A0.id = <321>

Wicket Viewer doing the same via the web page menu:
10:50:40,578  [Native               qtp1238209644-22 DEBUG]  SELECT
'domainapp.modules.simple.dom.impl.J300eSession' AS NUCLEUS_TYPE,  *...*WHERE
A0.id = <321>
10:50:40,748  [Schema               qtp1238209644-16 DEBUG]  Column "
dbo.j300e_session.id" added to internal representation of table.
10:50:40,749  [Schema               qtp1238209644-16 DEBUG]  Field [
domainapp.modules.simple.dom.impl.J300eSession.id] -> Column(s) [
dbo.j300e_session.id] using mapping of type
"org.datanucleus.store.rdbms.mapping.java.IntegerMapping"
(org.datanucleus.store.rdbms.mapping.datastore.IntegerRDBMSMapping)
10:50:40,749  [Schema               qtp1238209644-16 DEBUG]  Table
dbo.j300e_session will manage the persistence of the fields for class
domainapp.modules.simple.dom.impl.J300eSession (inheritance
strategy="new-table")
*...*
10:50:40,760  [Schema               qtp1238209644-16 DEBUG]  CREATE TABLE
dbo.j300e_session
(
    id int NOT NULL,
*...*
10:50:40,764  [Datastore            qtp1238209644-16 ERROR]  Error thrown
executing CREATE TABLE dbo.j300e_session
*...*
) : CREATE TABLE permission denied in database '*<WRONG DATABASE>*'.
com.microsoft.sqlserver.jdbc.SQLServerException: CREATE TABLE permission
denied in database '*<WRONG DATABASE>*'.

Re: Wicket Viewer limitations with DataNucleus?

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
Hi Brian,
Looks like Andi has unblocked you for now.

Just for the future, please note that Apache Isis uses JIRA for its problem
tracking [1]; the incode platform is not part of the framework (though is
Apache licensed and is maintained by Isis committers).  So what I meant was
for you to raise a ticket in JIRA.

Thx
Dan

[1] https://issues.apache.org/jira/secure/RapidBoard.jspa?rapidView=87


On Wed, 26 Sep 2018 at 20:15, Brian K <ha...@gmail.com> wrote:

> I created a ticket for the application identity issue and attached the
> zipped files to it.
> https://github.com/incodehq/incode-platform/issues/97
>
>
> On Wed, Sep 26, 2018 at 9:53 AM Dan Haywood <da...@haywood-associates.co.uk>
> wrote:
>
> > Hi Brian,
> > The Asf mailing lists don't allow attachments.
> >
> > Could you perhaps push your code to a github repo and reference that?
> >
> > Thx
> > Dan.
> >
> > On Wed, 26 Sep 2018, 19:48 Brian K, <ha...@gmail.com> wrote:
> >
> > > Hi Dan,
> > >
> > > I ran:
> > > mvn archetype:generate  \
> > >     -D archetypeGroupId=org.apache.isis.archetype \
> > >     -D archetypeArtifactId=helloworld-archetype \
> > >     -D archetypeVersion=2.0.0-M1 \
> > >     -D groupId=com.mycompany \
> > >     -D artifactId=myapp \
> > >     -D version=1.0-SNAPSHOT \
> > >     -B
> > >
> > > ...and made the changes to HelloWorldObject shown in the attached patch
> > > file (ignore the file dates - I had to diff manually because I didn't
> use
> > > git)
> > > ...and added the the attached HelloWorldPrimaryKey.java to the same
> > folder.
> > >
> > > Swagger-UI is able to handle this just fine, but the wicket viewer is
> > > getting errors when I bring up a created HelloWorldObject.
> > >
> > > -Brian
> > >
> > > On Tue, Sep 25, 2018 at 9:31 PM Dan Haywood <
> > dan@haywood-associates.co.uk>
> > > wrote:
> > >
> > >> Hi Brian,
> > >> To answer your last question first, yes we are working on a new rest
> > >> viewer, but it's still far from ready.  I expect the wicket viewer to
> be
> > >> maintained for the foreseeable future (for the lifetime of Isis v2,
> > >> certainly).
> > >>
> > >> With respect to the two limitations you've uncovered, could you raise
> a
> > >> jira ticket for both and could you also create a small helloworld app
> > >> based
> > >> off 2.0.0-M1 that demonstrates the issue. Well certainly try to fix
> the
> > >> issues in v2 and we'll back portion to 1.x if practicable.
> > >>
> > >> Thanks
> > >> Dan.
> > >>
> > >>
> > >>
> > >> On Tue, 25 Sep 2018, 21:15 Brian K, <ha...@gmail.com> wrote:
> > >>
> > >> > Hi,
> > >> >
> > >> > It seems that the wicket viewer does not support some features of
> > >> > DataNucleus:
> > >> > 1.  Application Identity - I posted earlier about this (
> > >> > https://isis.markmail.org/thread/jm72jzykqnzjdqp6)
> > >> > 2.  Federated Datastore.  Following instructions at
> > >> >
> > >> >
> > >>
> >
> http://www.datanucleus.org/products/datanucleus/jdo/persistence.html#_defining_primary_and_secondary_datastores
> > >> > , I now can use Swagger-UI to query the secondary datastore [1], but
> > >> Wicket
> > >> > viewer keeps on keying on to primary datastore and throwing an error
> > >> [2].
> > >> >
> > >> > I noticed in your roadmap at
> > >> >
> > >> >
> > >>
> >
> https://cwiki.apache.org/confluence/display/ISIS/Roadmap+to+Version+2#RoadmaptoVersion2-Extendingpersistencelayersupport
> > >> > that Wicket may be replaced soon.
> > >> >
> > >> > Is this something that we could fix with the Wicket viewer or
> should I
> > >> wait
> > >> > for the UI rewrite in 2.0?  Would the best work-around be to create
> a
> > >> view
> > >> > model that proxies all the properties?
> > >> >
> > >> > Thanks!
> > >> > Brian
> > >> >
> > >> > [1]:  I added this to isis.properties:
> > >> >
> > >> >
> > >>
> >
> isis.persistor.datanucleus.impl.datanucleus.datastore.oq=datanucleus_oq.properties
> > >> >
> > >> > and created the datanucleus_oq.properties file in the src/main/java
> > >> folder
> > >> > of the webapp module (it works when there is no
> > >> > isis.persistor.datanucleus.impl prefixes to the properties):
> > >> >
> > >> >
> > >>
> >
> javax.jdo.option.ConnectionDriverName=com.microsoft.sqlserver.jdbc.SQLServerDriver
> > >> > javax.jdo.option.ConnectionURL=jdbc:sqlserver://...
> > >> > javax.jdo.option.ConnectionUserName=username
> > >> > javax.jdo.option.ConnectionPassword=password
> > >> >
> > >> >
> > >> > [2]:  (my annotations in *bold*)
> > >> > REST Viewer looking up an object by its id (via Swagger-UI):
> > >> > 10:50:23,803  [Native               qtp1238209644-16 DEBUG]  SELECT
> > >> > 'domainapp.modules.simple.dom.impl.J300eSession' AS NUCLEUS_TYPE,
> > >> *.....*,
> > >> > WHERE A0.id = <321>
> > >> >
> > >> > Wicket Viewer doing the same via the web page menu:
> > >> > 10:50:40,578  [Native               qtp1238209644-22 DEBUG]  SELECT
> > >> > 'domainapp.modules.simple.dom.impl.J300eSession' AS NUCLEUS_TYPE,
> > >> > *...*WHERE
> > >> > A0.id = <321>
> > >> > 10:50:40,748  [Schema               qtp1238209644-16 DEBUG]  Column
> "
> > >> > dbo.j300e_session.id" added to internal representation of table.
> > >> > 10:50:40,749  [Schema               qtp1238209644-16 DEBUG]  Field [
> > >> > domainapp.modules.simple.dom.impl.J300eSession.id] -> Column(s) [
> > >> > dbo.j300e_session.id] using mapping of type
> > >> > "org.datanucleus.store.rdbms.mapping.java.IntegerMapping"
> > >> > (org.datanucleus.store.rdbms.mapping.datastore.IntegerRDBMSMapping)
> > >> > 10:50:40,749  [Schema               qtp1238209644-16 DEBUG]  Table
> > >> > dbo.j300e_session will manage the persistence of the fields for
> class
> > >> > domainapp.modules.simple.dom.impl.J300eSession (inheritance
> > >> > strategy="new-table")
> > >> > *...*
> > >> > 10:50:40,760  [Schema               qtp1238209644-16 DEBUG]  CREATE
> > >> TABLE
> > >> > dbo.j300e_session
> > >> > (
> > >> >     id int NOT NULL,
> > >> > *...*
> > >> > 10:50:40,764  [Datastore            qtp1238209644-16 ERROR]  Error
> > >> thrown
> > >> > executing CREATE TABLE dbo.j300e_session
> > >> > *...*
> > >> > ) : CREATE TABLE permission denied in database '*<WRONG DATABASE>*'.
> > >> > com.microsoft.sqlserver.jdbc.SQLServerException: CREATE TABLE
> > permission
> > >> > denied in database '*<WRONG DATABASE>*'.
> > >> >
> > >>
> > >
> >
>

Re: Wicket Viewer limitations with DataNucleus?

Posted by Brian K <ha...@gmail.com>.
Hi Andi,

Thanks for pointing that out!  I was retrofitting my code that used a
String field in its primary key.  The good news is that, after copying part
of my code to the 2.0.0-M1 HelloWorld project and altering to fit the new
2.0 classes, I no longer get the error that I reported in my email a while
back.  But, I haven't reproduced the error in the 1.16.2 code base yet from
the SimpleApp archetype.  This gives me a good start to getting my domain
code working with the 2.0 version with hopes that the error will not
occur.  I'll let you know if it does.

Thanks again!
Brian

On Wed, Sep 26, 2018 at 12:46 PM Andi Huber <ah...@apache.org> wrote:

> When trying to reproduce the issue, I found that you did not properly
> implement the HelloWorldPrimaryKey: the second public constructor should be
> (according to DN-5.2 spec) ...
>
> public HelloWorldPrimaryKey(String s) {
>         this.id = Integer.parseUnsignedInt(s);
> }
>
> Let us know, if that solves the issue!
>
> Cheers
>
> On 2018/09/26 18:15:19, Brian K <ha...@gmail.com> wrote:
> > I created a ticket for the application identity issue and attached the
> > zipped files to it.
> > https://github.com/incodehq/incode-platform/issues/97
> >
> >
> > On Wed, Sep 26, 2018 at 9:53 AM Dan Haywood <
> dan@haywood-associates.co.uk>
> > wrote:
> >
> > > Hi Brian,
> > > The Asf mailing lists don't allow attachments.
> > >
> > > Could you perhaps push your code to a github repo and reference that?
> > >
> > > Thx
> > > Dan.
> > >
> > > On Wed, 26 Sep 2018, 19:48 Brian K, <ha...@gmail.com> wrote:
> > >
> > > > Hi Dan,
> > > >
> > > > I ran:
> > > > mvn archetype:generate  \
> > > >     -D archetypeGroupId=org.apache.isis.archetype \
> > > >     -D archetypeArtifactId=helloworld-archetype \
> > > >     -D archetypeVersion=2.0.0-M1 \
> > > >     -D groupId=com.mycompany \
> > > >     -D artifactId=myapp \
> > > >     -D version=1.0-SNAPSHOT \
> > > >     -B
> > > >
> > > > ...and made the changes to HelloWorldObject shown in the attached
> patch
> > > > file (ignore the file dates - I had to diff manually because I
> didn't use
> > > > git)
> > > > ...and added the the attached HelloWorldPrimaryKey.java to the same
> > > folder.
> > > >
> > > > Swagger-UI is able to handle this just fine, but the wicket viewer is
> > > > getting errors when I bring up a created HelloWorldObject.
> > > >
> > > > -Brian
> > > >
> > > > On Tue, Sep 25, 2018 at 9:31 PM Dan Haywood <
> > > dan@haywood-associates.co.uk>
> > > > wrote:
> > > >
> > > >> Hi Brian,
> > > >> To answer your last question first, yes we are working on a new rest
> > > >> viewer, but it's still far from ready.  I expect the wicket viewer
> to be
> > > >> maintained for the foreseeable future (for the lifetime of Isis v2,
> > > >> certainly).
> > > >>
> > > >> With respect to the two limitations you've uncovered, could you
> raise a
> > > >> jira ticket for both and could you also create a small helloworld
> app
> > > >> based
> > > >> off 2.0.0-M1 that demonstrates the issue. Well certainly try to fix
> the
> > > >> issues in v2 and we'll back portion to 1.x if practicable.
> > > >>
> > > >> Thanks
> > > >> Dan.
> > > >>
> > > >>
> > > >>
> > > >> On Tue, 25 Sep 2018, 21:15 Brian K, <ha...@gmail.com>
> wrote:
> > > >>
> > > >> > Hi,
> > > >> >
> > > >> > It seems that the wicket viewer does not support some features of
> > > >> > DataNucleus:
> > > >> > 1.  Application Identity - I posted earlier about this (
> > > >> > https://isis.markmail.org/thread/jm72jzykqnzjdqp6)
> > > >> > 2.  Federated Datastore.  Following instructions at
> > > >> >
> > > >> >
> > > >>
> > >
> http://www.datanucleus.org/products/datanucleus/jdo/persistence.html#_defining_primary_and_secondary_datastores
> > > >> > , I now can use Swagger-UI to query the secondary datastore [1],
> but
> > > >> Wicket
> > > >> > viewer keeps on keying on to primary datastore and throwing an
> error
> > > >> [2].
> > > >> >
> > > >> > I noticed in your roadmap at
> > > >> >
> > > >> >
> > > >>
> > >
> https://cwiki.apache.org/confluence/display/ISIS/Roadmap+to+Version+2#RoadmaptoVersion2-Extendingpersistencelayersupport
> > > >> > that Wicket may be replaced soon.
> > > >> >
> > > >> > Is this something that we could fix with the Wicket viewer or
> should I
> > > >> wait
> > > >> > for the UI rewrite in 2.0?  Would the best work-around be to
> create a
> > > >> view
> > > >> > model that proxies all the properties?
> > > >> >
> > > >> > Thanks!
> > > >> > Brian
> > > >> >
> > > >> > [1]:  I added this to isis.properties:
> > > >> >
> > > >> >
> > > >>
> > >
> isis.persistor.datanucleus.impl.datanucleus.datastore.oq=datanucleus_oq.properties
> > > >> >
> > > >> > and created the datanucleus_oq.properties file in the
> src/main/java
> > > >> folder
> > > >> > of the webapp module (it works when there is no
> > > >> > isis.persistor.datanucleus.impl prefixes to the properties):
> > > >> >
> > > >> >
> > > >>
> > >
> javax.jdo.option.ConnectionDriverName=com.microsoft.sqlserver.jdbc.SQLServerDriver
> > > >> > javax.jdo.option.ConnectionURL=jdbc:sqlserver://...
> > > >> > javax.jdo.option.ConnectionUserName=username
> > > >> > javax.jdo.option.ConnectionPassword=password
> > > >> >
> > > >> >
> > > >> > [2]:  (my annotations in *bold*)
> > > >> > REST Viewer looking up an object by its id (via Swagger-UI):
> > > >> > 10:50:23,803  [Native               qtp1238209644-16 DEBUG]
> SELECT
> > > >> > 'domainapp.modules.simple.dom.impl.J300eSession' AS NUCLEUS_TYPE,
> > > >> *.....*,
> > > >> > WHERE A0.id = <321>
> > > >> >
> > > >> > Wicket Viewer doing the same via the web page menu:
> > > >> > 10:50:40,578  [Native               qtp1238209644-22 DEBUG]
> SELECT
> > > >> > 'domainapp.modules.simple.dom.impl.J300eSession' AS NUCLEUS_TYPE,
> > > >> > *...*WHERE
> > > >> > A0.id = <321>
> > > >> > 10:50:40,748  [Schema               qtp1238209644-16 DEBUG]
> Column "
> > > >> > dbo.j300e_session.id" added to internal representation of table.
> > > >> > 10:50:40,749  [Schema               qtp1238209644-16 DEBUG]
> Field [
> > > >> > domainapp.modules.simple.dom.impl.J300eSession.id] -> Column(s) [
> > > >> > dbo.j300e_session.id] using mapping of type
> > > >> > "org.datanucleus.store.rdbms.mapping.java.IntegerMapping"
> > > >> >
> (org.datanucleus.store.rdbms.mapping.datastore.IntegerRDBMSMapping)
> > > >> > 10:50:40,749  [Schema               qtp1238209644-16 DEBUG]  Table
> > > >> > dbo.j300e_session will manage the persistence of the fields for
> class
> > > >> > domainapp.modules.simple.dom.impl.J300eSession (inheritance
> > > >> > strategy="new-table")
> > > >> > *...*
> > > >> > 10:50:40,760  [Schema               qtp1238209644-16 DEBUG]
> CREATE
> > > >> TABLE
> > > >> > dbo.j300e_session
> > > >> > (
> > > >> >     id int NOT NULL,
> > > >> > *...*
> > > >> > 10:50:40,764  [Datastore            qtp1238209644-16 ERROR]  Error
> > > >> thrown
> > > >> > executing CREATE TABLE dbo.j300e_session
> > > >> > *...*
> > > >> > ) : CREATE TABLE permission denied in database '*<WRONG
> DATABASE>*'.
> > > >> > com.microsoft.sqlserver.jdbc.SQLServerException: CREATE TABLE
> > > permission
> > > >> > denied in database '*<WRONG DATABASE>*'.
> > > >> >
> > > >>
> > > >
> > >
> >
>

Re: Wicket Viewer limitations with DataNucleus?

Posted by Andi Huber <ah...@apache.org>.
When trying to reproduce the issue, I found that you did not properly implement the HelloWorldPrimaryKey: the second public constructor should be (according to DN-5.2 spec) ...

public HelloWorldPrimaryKey(String s) {
        this.id = Integer.parseUnsignedInt(s);
}

Let us know, if that solves the issue!

Cheers

On 2018/09/26 18:15:19, Brian K <ha...@gmail.com> wrote: 
> I created a ticket for the application identity issue and attached the
> zipped files to it.
> https://github.com/incodehq/incode-platform/issues/97
> 
> 
> On Wed, Sep 26, 2018 at 9:53 AM Dan Haywood <da...@haywood-associates.co.uk>
> wrote:
> 
> > Hi Brian,
> > The Asf mailing lists don't allow attachments.
> >
> > Could you perhaps push your code to a github repo and reference that?
> >
> > Thx
> > Dan.
> >
> > On Wed, 26 Sep 2018, 19:48 Brian K, <ha...@gmail.com> wrote:
> >
> > > Hi Dan,
> > >
> > > I ran:
> > > mvn archetype:generate  \
> > >     -D archetypeGroupId=org.apache.isis.archetype \
> > >     -D archetypeArtifactId=helloworld-archetype \
> > >     -D archetypeVersion=2.0.0-M1 \
> > >     -D groupId=com.mycompany \
> > >     -D artifactId=myapp \
> > >     -D version=1.0-SNAPSHOT \
> > >     -B
> > >
> > > ...and made the changes to HelloWorldObject shown in the attached patch
> > > file (ignore the file dates - I had to diff manually because I didn't use
> > > git)
> > > ...and added the the attached HelloWorldPrimaryKey.java to the same
> > folder.
> > >
> > > Swagger-UI is able to handle this just fine, but the wicket viewer is
> > > getting errors when I bring up a created HelloWorldObject.
> > >
> > > -Brian
> > >
> > > On Tue, Sep 25, 2018 at 9:31 PM Dan Haywood <
> > dan@haywood-associates.co.uk>
> > > wrote:
> > >
> > >> Hi Brian,
> > >> To answer your last question first, yes we are working on a new rest
> > >> viewer, but it's still far from ready.  I expect the wicket viewer to be
> > >> maintained for the foreseeable future (for the lifetime of Isis v2,
> > >> certainly).
> > >>
> > >> With respect to the two limitations you've uncovered, could you raise a
> > >> jira ticket for both and could you also create a small helloworld app
> > >> based
> > >> off 2.0.0-M1 that demonstrates the issue. Well certainly try to fix the
> > >> issues in v2 and we'll back portion to 1.x if practicable.
> > >>
> > >> Thanks
> > >> Dan.
> > >>
> > >>
> > >>
> > >> On Tue, 25 Sep 2018, 21:15 Brian K, <ha...@gmail.com> wrote:
> > >>
> > >> > Hi,
> > >> >
> > >> > It seems that the wicket viewer does not support some features of
> > >> > DataNucleus:
> > >> > 1.  Application Identity - I posted earlier about this (
> > >> > https://isis.markmail.org/thread/jm72jzykqnzjdqp6)
> > >> > 2.  Federated Datastore.  Following instructions at
> > >> >
> > >> >
> > >>
> > http://www.datanucleus.org/products/datanucleus/jdo/persistence.html#_defining_primary_and_secondary_datastores
> > >> > , I now can use Swagger-UI to query the secondary datastore [1], but
> > >> Wicket
> > >> > viewer keeps on keying on to primary datastore and throwing an error
> > >> [2].
> > >> >
> > >> > I noticed in your roadmap at
> > >> >
> > >> >
> > >>
> > https://cwiki.apache.org/confluence/display/ISIS/Roadmap+to+Version+2#RoadmaptoVersion2-Extendingpersistencelayersupport
> > >> > that Wicket may be replaced soon.
> > >> >
> > >> > Is this something that we could fix with the Wicket viewer or should I
> > >> wait
> > >> > for the UI rewrite in 2.0?  Would the best work-around be to create a
> > >> view
> > >> > model that proxies all the properties?
> > >> >
> > >> > Thanks!
> > >> > Brian
> > >> >
> > >> > [1]:  I added this to isis.properties:
> > >> >
> > >> >
> > >>
> > isis.persistor.datanucleus.impl.datanucleus.datastore.oq=datanucleus_oq.properties
> > >> >
> > >> > and created the datanucleus_oq.properties file in the src/main/java
> > >> folder
> > >> > of the webapp module (it works when there is no
> > >> > isis.persistor.datanucleus.impl prefixes to the properties):
> > >> >
> > >> >
> > >>
> > javax.jdo.option.ConnectionDriverName=com.microsoft.sqlserver.jdbc.SQLServerDriver
> > >> > javax.jdo.option.ConnectionURL=jdbc:sqlserver://...
> > >> > javax.jdo.option.ConnectionUserName=username
> > >> > javax.jdo.option.ConnectionPassword=password
> > >> >
> > >> >
> > >> > [2]:  (my annotations in *bold*)
> > >> > REST Viewer looking up an object by its id (via Swagger-UI):
> > >> > 10:50:23,803  [Native               qtp1238209644-16 DEBUG]  SELECT
> > >> > 'domainapp.modules.simple.dom.impl.J300eSession' AS NUCLEUS_TYPE,
> > >> *.....*,
> > >> > WHERE A0.id = <321>
> > >> >
> > >> > Wicket Viewer doing the same via the web page menu:
> > >> > 10:50:40,578  [Native               qtp1238209644-22 DEBUG]  SELECT
> > >> > 'domainapp.modules.simple.dom.impl.J300eSession' AS NUCLEUS_TYPE,
> > >> > *...*WHERE
> > >> > A0.id = <321>
> > >> > 10:50:40,748  [Schema               qtp1238209644-16 DEBUG]  Column "
> > >> > dbo.j300e_session.id" added to internal representation of table.
> > >> > 10:50:40,749  [Schema               qtp1238209644-16 DEBUG]  Field [
> > >> > domainapp.modules.simple.dom.impl.J300eSession.id] -> Column(s) [
> > >> > dbo.j300e_session.id] using mapping of type
> > >> > "org.datanucleus.store.rdbms.mapping.java.IntegerMapping"
> > >> > (org.datanucleus.store.rdbms.mapping.datastore.IntegerRDBMSMapping)
> > >> > 10:50:40,749  [Schema               qtp1238209644-16 DEBUG]  Table
> > >> > dbo.j300e_session will manage the persistence of the fields for class
> > >> > domainapp.modules.simple.dom.impl.J300eSession (inheritance
> > >> > strategy="new-table")
> > >> > *...*
> > >> > 10:50:40,760  [Schema               qtp1238209644-16 DEBUG]  CREATE
> > >> TABLE
> > >> > dbo.j300e_session
> > >> > (
> > >> >     id int NOT NULL,
> > >> > *...*
> > >> > 10:50:40,764  [Datastore            qtp1238209644-16 ERROR]  Error
> > >> thrown
> > >> > executing CREATE TABLE dbo.j300e_session
> > >> > *...*
> > >> > ) : CREATE TABLE permission denied in database '*<WRONG DATABASE>*'.
> > >> > com.microsoft.sqlserver.jdbc.SQLServerException: CREATE TABLE
> > permission
> > >> > denied in database '*<WRONG DATABASE>*'.
> > >> >
> > >>
> > >
> >
> 

Re: Wicket Viewer limitations with DataNucleus?

Posted by Brian K <ha...@gmail.com>.
I created a ticket for the application identity issue and attached the
zipped files to it.
https://github.com/incodehq/incode-platform/issues/97


On Wed, Sep 26, 2018 at 9:53 AM Dan Haywood <da...@haywood-associates.co.uk>
wrote:

> Hi Brian,
> The Asf mailing lists don't allow attachments.
>
> Could you perhaps push your code to a github repo and reference that?
>
> Thx
> Dan.
>
> On Wed, 26 Sep 2018, 19:48 Brian K, <ha...@gmail.com> wrote:
>
> > Hi Dan,
> >
> > I ran:
> > mvn archetype:generate  \
> >     -D archetypeGroupId=org.apache.isis.archetype \
> >     -D archetypeArtifactId=helloworld-archetype \
> >     -D archetypeVersion=2.0.0-M1 \
> >     -D groupId=com.mycompany \
> >     -D artifactId=myapp \
> >     -D version=1.0-SNAPSHOT \
> >     -B
> >
> > ...and made the changes to HelloWorldObject shown in the attached patch
> > file (ignore the file dates - I had to diff manually because I didn't use
> > git)
> > ...and added the the attached HelloWorldPrimaryKey.java to the same
> folder.
> >
> > Swagger-UI is able to handle this just fine, but the wicket viewer is
> > getting errors when I bring up a created HelloWorldObject.
> >
> > -Brian
> >
> > On Tue, Sep 25, 2018 at 9:31 PM Dan Haywood <
> dan@haywood-associates.co.uk>
> > wrote:
> >
> >> Hi Brian,
> >> To answer your last question first, yes we are working on a new rest
> >> viewer, but it's still far from ready.  I expect the wicket viewer to be
> >> maintained for the foreseeable future (for the lifetime of Isis v2,
> >> certainly).
> >>
> >> With respect to the two limitations you've uncovered, could you raise a
> >> jira ticket for both and could you also create a small helloworld app
> >> based
> >> off 2.0.0-M1 that demonstrates the issue. Well certainly try to fix the
> >> issues in v2 and we'll back portion to 1.x if practicable.
> >>
> >> Thanks
> >> Dan.
> >>
> >>
> >>
> >> On Tue, 25 Sep 2018, 21:15 Brian K, <ha...@gmail.com> wrote:
> >>
> >> > Hi,
> >> >
> >> > It seems that the wicket viewer does not support some features of
> >> > DataNucleus:
> >> > 1.  Application Identity - I posted earlier about this (
> >> > https://isis.markmail.org/thread/jm72jzykqnzjdqp6)
> >> > 2.  Federated Datastore.  Following instructions at
> >> >
> >> >
> >>
> http://www.datanucleus.org/products/datanucleus/jdo/persistence.html#_defining_primary_and_secondary_datastores
> >> > , I now can use Swagger-UI to query the secondary datastore [1], but
> >> Wicket
> >> > viewer keeps on keying on to primary datastore and throwing an error
> >> [2].
> >> >
> >> > I noticed in your roadmap at
> >> >
> >> >
> >>
> https://cwiki.apache.org/confluence/display/ISIS/Roadmap+to+Version+2#RoadmaptoVersion2-Extendingpersistencelayersupport
> >> > that Wicket may be replaced soon.
> >> >
> >> > Is this something that we could fix with the Wicket viewer or should I
> >> wait
> >> > for the UI rewrite in 2.0?  Would the best work-around be to create a
> >> view
> >> > model that proxies all the properties?
> >> >
> >> > Thanks!
> >> > Brian
> >> >
> >> > [1]:  I added this to isis.properties:
> >> >
> >> >
> >>
> isis.persistor.datanucleus.impl.datanucleus.datastore.oq=datanucleus_oq.properties
> >> >
> >> > and created the datanucleus_oq.properties file in the src/main/java
> >> folder
> >> > of the webapp module (it works when there is no
> >> > isis.persistor.datanucleus.impl prefixes to the properties):
> >> >
> >> >
> >>
> javax.jdo.option.ConnectionDriverName=com.microsoft.sqlserver.jdbc.SQLServerDriver
> >> > javax.jdo.option.ConnectionURL=jdbc:sqlserver://...
> >> > javax.jdo.option.ConnectionUserName=username
> >> > javax.jdo.option.ConnectionPassword=password
> >> >
> >> >
> >> > [2]:  (my annotations in *bold*)
> >> > REST Viewer looking up an object by its id (via Swagger-UI):
> >> > 10:50:23,803  [Native               qtp1238209644-16 DEBUG]  SELECT
> >> > 'domainapp.modules.simple.dom.impl.J300eSession' AS NUCLEUS_TYPE,
> >> *.....*,
> >> > WHERE A0.id = <321>
> >> >
> >> > Wicket Viewer doing the same via the web page menu:
> >> > 10:50:40,578  [Native               qtp1238209644-22 DEBUG]  SELECT
> >> > 'domainapp.modules.simple.dom.impl.J300eSession' AS NUCLEUS_TYPE,
> >> > *...*WHERE
> >> > A0.id = <321>
> >> > 10:50:40,748  [Schema               qtp1238209644-16 DEBUG]  Column "
> >> > dbo.j300e_session.id" added to internal representation of table.
> >> > 10:50:40,749  [Schema               qtp1238209644-16 DEBUG]  Field [
> >> > domainapp.modules.simple.dom.impl.J300eSession.id] -> Column(s) [
> >> > dbo.j300e_session.id] using mapping of type
> >> > "org.datanucleus.store.rdbms.mapping.java.IntegerMapping"
> >> > (org.datanucleus.store.rdbms.mapping.datastore.IntegerRDBMSMapping)
> >> > 10:50:40,749  [Schema               qtp1238209644-16 DEBUG]  Table
> >> > dbo.j300e_session will manage the persistence of the fields for class
> >> > domainapp.modules.simple.dom.impl.J300eSession (inheritance
> >> > strategy="new-table")
> >> > *...*
> >> > 10:50:40,760  [Schema               qtp1238209644-16 DEBUG]  CREATE
> >> TABLE
> >> > dbo.j300e_session
> >> > (
> >> >     id int NOT NULL,
> >> > *...*
> >> > 10:50:40,764  [Datastore            qtp1238209644-16 ERROR]  Error
> >> thrown
> >> > executing CREATE TABLE dbo.j300e_session
> >> > *...*
> >> > ) : CREATE TABLE permission denied in database '*<WRONG DATABASE>*'.
> >> > com.microsoft.sqlserver.jdbc.SQLServerException: CREATE TABLE
> permission
> >> > denied in database '*<WRONG DATABASE>*'.
> >> >
> >>
> >
>

Re: Wicket Viewer limitations with DataNucleus?

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
Hi Brian,
The Asf mailing lists don't allow attachments.

Could you perhaps push your code to a github repo and reference that?

Thx
Dan.

On Wed, 26 Sep 2018, 19:48 Brian K, <ha...@gmail.com> wrote:

> Hi Dan,
>
> I ran:
> mvn archetype:generate  \
>     -D archetypeGroupId=org.apache.isis.archetype \
>     -D archetypeArtifactId=helloworld-archetype \
>     -D archetypeVersion=2.0.0-M1 \
>     -D groupId=com.mycompany \
>     -D artifactId=myapp \
>     -D version=1.0-SNAPSHOT \
>     -B
>
> ...and made the changes to HelloWorldObject shown in the attached patch
> file (ignore the file dates - I had to diff manually because I didn't use
> git)
> ...and added the the attached HelloWorldPrimaryKey.java to the same folder.
>
> Swagger-UI is able to handle this just fine, but the wicket viewer is
> getting errors when I bring up a created HelloWorldObject.
>
> -Brian
>
> On Tue, Sep 25, 2018 at 9:31 PM Dan Haywood <da...@haywood-associates.co.uk>
> wrote:
>
>> Hi Brian,
>> To answer your last question first, yes we are working on a new rest
>> viewer, but it's still far from ready.  I expect the wicket viewer to be
>> maintained for the foreseeable future (for the lifetime of Isis v2,
>> certainly).
>>
>> With respect to the two limitations you've uncovered, could you raise a
>> jira ticket for both and could you also create a small helloworld app
>> based
>> off 2.0.0-M1 that demonstrates the issue. Well certainly try to fix the
>> issues in v2 and we'll back portion to 1.x if practicable.
>>
>> Thanks
>> Dan.
>>
>>
>>
>> On Tue, 25 Sep 2018, 21:15 Brian K, <ha...@gmail.com> wrote:
>>
>> > Hi,
>> >
>> > It seems that the wicket viewer does not support some features of
>> > DataNucleus:
>> > 1.  Application Identity - I posted earlier about this (
>> > https://isis.markmail.org/thread/jm72jzykqnzjdqp6)
>> > 2.  Federated Datastore.  Following instructions at
>> >
>> >
>> http://www.datanucleus.org/products/datanucleus/jdo/persistence.html#_defining_primary_and_secondary_datastores
>> > , I now can use Swagger-UI to query the secondary datastore [1], but
>> Wicket
>> > viewer keeps on keying on to primary datastore and throwing an error
>> [2].
>> >
>> > I noticed in your roadmap at
>> >
>> >
>> https://cwiki.apache.org/confluence/display/ISIS/Roadmap+to+Version+2#RoadmaptoVersion2-Extendingpersistencelayersupport
>> > that Wicket may be replaced soon.
>> >
>> > Is this something that we could fix with the Wicket viewer or should I
>> wait
>> > for the UI rewrite in 2.0?  Would the best work-around be to create a
>> view
>> > model that proxies all the properties?
>> >
>> > Thanks!
>> > Brian
>> >
>> > [1]:  I added this to isis.properties:
>> >
>> >
>> isis.persistor.datanucleus.impl.datanucleus.datastore.oq=datanucleus_oq.properties
>> >
>> > and created the datanucleus_oq.properties file in the src/main/java
>> folder
>> > of the webapp module (it works when there is no
>> > isis.persistor.datanucleus.impl prefixes to the properties):
>> >
>> >
>> javax.jdo.option.ConnectionDriverName=com.microsoft.sqlserver.jdbc.SQLServerDriver
>> > javax.jdo.option.ConnectionURL=jdbc:sqlserver://...
>> > javax.jdo.option.ConnectionUserName=username
>> > javax.jdo.option.ConnectionPassword=password
>> >
>> >
>> > [2]:  (my annotations in *bold*)
>> > REST Viewer looking up an object by its id (via Swagger-UI):
>> > 10:50:23,803  [Native               qtp1238209644-16 DEBUG]  SELECT
>> > 'domainapp.modules.simple.dom.impl.J300eSession' AS NUCLEUS_TYPE,
>> *.....*,
>> > WHERE A0.id = <321>
>> >
>> > Wicket Viewer doing the same via the web page menu:
>> > 10:50:40,578  [Native               qtp1238209644-22 DEBUG]  SELECT
>> > 'domainapp.modules.simple.dom.impl.J300eSession' AS NUCLEUS_TYPE,
>> > *...*WHERE
>> > A0.id = <321>
>> > 10:50:40,748  [Schema               qtp1238209644-16 DEBUG]  Column "
>> > dbo.j300e_session.id" added to internal representation of table.
>> > 10:50:40,749  [Schema               qtp1238209644-16 DEBUG]  Field [
>> > domainapp.modules.simple.dom.impl.J300eSession.id] -> Column(s) [
>> > dbo.j300e_session.id] using mapping of type
>> > "org.datanucleus.store.rdbms.mapping.java.IntegerMapping"
>> > (org.datanucleus.store.rdbms.mapping.datastore.IntegerRDBMSMapping)
>> > 10:50:40,749  [Schema               qtp1238209644-16 DEBUG]  Table
>> > dbo.j300e_session will manage the persistence of the fields for class
>> > domainapp.modules.simple.dom.impl.J300eSession (inheritance
>> > strategy="new-table")
>> > *...*
>> > 10:50:40,760  [Schema               qtp1238209644-16 DEBUG]  CREATE
>> TABLE
>> > dbo.j300e_session
>> > (
>> >     id int NOT NULL,
>> > *...*
>> > 10:50:40,764  [Datastore            qtp1238209644-16 ERROR]  Error
>> thrown
>> > executing CREATE TABLE dbo.j300e_session
>> > *...*
>> > ) : CREATE TABLE permission denied in database '*<WRONG DATABASE>*'.
>> > com.microsoft.sqlserver.jdbc.SQLServerException: CREATE TABLE permission
>> > denied in database '*<WRONG DATABASE>*'.
>> >
>>
>

Re: Wicket Viewer limitations with DataNucleus?

Posted by Brian K <ha...@gmail.com>.
Hi Dan,

I ran:
mvn archetype:generate  \
    -D archetypeGroupId=org.apache.isis.archetype \
    -D archetypeArtifactId=helloworld-archetype \
    -D archetypeVersion=2.0.0-M1 \
    -D groupId=com.mycompany \
    -D artifactId=myapp \
    -D version=1.0-SNAPSHOT \
    -B

...and made the changes to HelloWorldObject shown in the attached patch
file (ignore the file dates - I had to diff manually because I didn't use
git)
...and added the the attached HelloWorldPrimaryKey.java to the same folder.

Swagger-UI is able to handle this just fine, but the wicket viewer is
getting errors when I bring up a created HelloWorldObject.

-Brian

On Tue, Sep 25, 2018 at 9:31 PM Dan Haywood <da...@haywood-associates.co.uk>
wrote:

> Hi Brian,
> To answer your last question first, yes we are working on a new rest
> viewer, but it's still far from ready.  I expect the wicket viewer to be
> maintained for the foreseeable future (for the lifetime of Isis v2,
> certainly).
>
> With respect to the two limitations you've uncovered, could you raise a
> jira ticket for both and could you also create a small helloworld app based
> off 2.0.0-M1 that demonstrates the issue. Well certainly try to fix the
> issues in v2 and we'll back portion to 1.x if practicable.
>
> Thanks
> Dan.
>
>
>
> On Tue, 25 Sep 2018, 21:15 Brian K, <ha...@gmail.com> wrote:
>
> > Hi,
> >
> > It seems that the wicket viewer does not support some features of
> > DataNucleus:
> > 1.  Application Identity - I posted earlier about this (
> > https://isis.markmail.org/thread/jm72jzykqnzjdqp6)
> > 2.  Federated Datastore.  Following instructions at
> >
> >
> http://www.datanucleus.org/products/datanucleus/jdo/persistence.html#_defining_primary_and_secondary_datastores
> > , I now can use Swagger-UI to query the secondary datastore [1], but
> Wicket
> > viewer keeps on keying on to primary datastore and throwing an error [2].
> >
> > I noticed in your roadmap at
> >
> >
> https://cwiki.apache.org/confluence/display/ISIS/Roadmap+to+Version+2#RoadmaptoVersion2-Extendingpersistencelayersupport
> > that Wicket may be replaced soon.
> >
> > Is this something that we could fix with the Wicket viewer or should I
> wait
> > for the UI rewrite in 2.0?  Would the best work-around be to create a
> view
> > model that proxies all the properties?
> >
> > Thanks!
> > Brian
> >
> > [1]:  I added this to isis.properties:
> >
> >
> isis.persistor.datanucleus.impl.datanucleus.datastore.oq=datanucleus_oq.properties
> >
> > and created the datanucleus_oq.properties file in the src/main/java
> folder
> > of the webapp module (it works when there is no
> > isis.persistor.datanucleus.impl prefixes to the properties):
> >
> >
> javax.jdo.option.ConnectionDriverName=com.microsoft.sqlserver.jdbc.SQLServerDriver
> > javax.jdo.option.ConnectionURL=jdbc:sqlserver://...
> > javax.jdo.option.ConnectionUserName=username
> > javax.jdo.option.ConnectionPassword=password
> >
> >
> > [2]:  (my annotations in *bold*)
> > REST Viewer looking up an object by its id (via Swagger-UI):
> > 10:50:23,803  [Native               qtp1238209644-16 DEBUG]  SELECT
> > 'domainapp.modules.simple.dom.impl.J300eSession' AS NUCLEUS_TYPE,
> *.....*,
> > WHERE A0.id = <321>
> >
> > Wicket Viewer doing the same via the web page menu:
> > 10:50:40,578  [Native               qtp1238209644-22 DEBUG]  SELECT
> > 'domainapp.modules.simple.dom.impl.J300eSession' AS NUCLEUS_TYPE,
> > *...*WHERE
> > A0.id = <321>
> > 10:50:40,748  [Schema               qtp1238209644-16 DEBUG]  Column "
> > dbo.j300e_session.id" added to internal representation of table.
> > 10:50:40,749  [Schema               qtp1238209644-16 DEBUG]  Field [
> > domainapp.modules.simple.dom.impl.J300eSession.id] -> Column(s) [
> > dbo.j300e_session.id] using mapping of type
> > "org.datanucleus.store.rdbms.mapping.java.IntegerMapping"
> > (org.datanucleus.store.rdbms.mapping.datastore.IntegerRDBMSMapping)
> > 10:50:40,749  [Schema               qtp1238209644-16 DEBUG]  Table
> > dbo.j300e_session will manage the persistence of the fields for class
> > domainapp.modules.simple.dom.impl.J300eSession (inheritance
> > strategy="new-table")
> > *...*
> > 10:50:40,760  [Schema               qtp1238209644-16 DEBUG]  CREATE TABLE
> > dbo.j300e_session
> > (
> >     id int NOT NULL,
> > *...*
> > 10:50:40,764  [Datastore            qtp1238209644-16 ERROR]  Error thrown
> > executing CREATE TABLE dbo.j300e_session
> > *...*
> > ) : CREATE TABLE permission denied in database '*<WRONG DATABASE>*'.
> > com.microsoft.sqlserver.jdbc.SQLServerException: CREATE TABLE permission
> > denied in database '*<WRONG DATABASE>*'.
> >
>

Re: Wicket Viewer limitations with DataNucleus?

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
Hi Brian,
To answer your last question first, yes we are working on a new rest
viewer, but it's still far from ready.  I expect the wicket viewer to be
maintained for the foreseeable future (for the lifetime of Isis v2,
certainly).

With respect to the two limitations you've uncovered, could you raise a
jira ticket for both and could you also create a small helloworld app based
off 2.0.0-M1 that demonstrates the issue. Well certainly try to fix the
issues in v2 and we'll back portion to 1.x if practicable.

Thanks
Dan.



On Tue, 25 Sep 2018, 21:15 Brian K, <ha...@gmail.com> wrote:

> Hi,
>
> It seems that the wicket viewer does not support some features of
> DataNucleus:
> 1.  Application Identity - I posted earlier about this (
> https://isis.markmail.org/thread/jm72jzykqnzjdqp6)
> 2.  Federated Datastore.  Following instructions at
>
> http://www.datanucleus.org/products/datanucleus/jdo/persistence.html#_defining_primary_and_secondary_datastores
> , I now can use Swagger-UI to query the secondary datastore [1], but Wicket
> viewer keeps on keying on to primary datastore and throwing an error [2].
>
> I noticed in your roadmap at
>
> https://cwiki.apache.org/confluence/display/ISIS/Roadmap+to+Version+2#RoadmaptoVersion2-Extendingpersistencelayersupport
> that Wicket may be replaced soon.
>
> Is this something that we could fix with the Wicket viewer or should I wait
> for the UI rewrite in 2.0?  Would the best work-around be to create a view
> model that proxies all the properties?
>
> Thanks!
> Brian
>
> [1]:  I added this to isis.properties:
>
> isis.persistor.datanucleus.impl.datanucleus.datastore.oq=datanucleus_oq.properties
>
> and created the datanucleus_oq.properties file in the src/main/java folder
> of the webapp module (it works when there is no
> isis.persistor.datanucleus.impl prefixes to the properties):
>
> javax.jdo.option.ConnectionDriverName=com.microsoft.sqlserver.jdbc.SQLServerDriver
> javax.jdo.option.ConnectionURL=jdbc:sqlserver://...
> javax.jdo.option.ConnectionUserName=username
> javax.jdo.option.ConnectionPassword=password
>
>
> [2]:  (my annotations in *bold*)
> REST Viewer looking up an object by its id (via Swagger-UI):
> 10:50:23,803  [Native               qtp1238209644-16 DEBUG]  SELECT
> 'domainapp.modules.simple.dom.impl.J300eSession' AS NUCLEUS_TYPE, *.....*,
> WHERE A0.id = <321>
>
> Wicket Viewer doing the same via the web page menu:
> 10:50:40,578  [Native               qtp1238209644-22 DEBUG]  SELECT
> 'domainapp.modules.simple.dom.impl.J300eSession' AS NUCLEUS_TYPE,
> *...*WHERE
> A0.id = <321>
> 10:50:40,748  [Schema               qtp1238209644-16 DEBUG]  Column "
> dbo.j300e_session.id" added to internal representation of table.
> 10:50:40,749  [Schema               qtp1238209644-16 DEBUG]  Field [
> domainapp.modules.simple.dom.impl.J300eSession.id] -> Column(s) [
> dbo.j300e_session.id] using mapping of type
> "org.datanucleus.store.rdbms.mapping.java.IntegerMapping"
> (org.datanucleus.store.rdbms.mapping.datastore.IntegerRDBMSMapping)
> 10:50:40,749  [Schema               qtp1238209644-16 DEBUG]  Table
> dbo.j300e_session will manage the persistence of the fields for class
> domainapp.modules.simple.dom.impl.J300eSession (inheritance
> strategy="new-table")
> *...*
> 10:50:40,760  [Schema               qtp1238209644-16 DEBUG]  CREATE TABLE
> dbo.j300e_session
> (
>     id int NOT NULL,
> *...*
> 10:50:40,764  [Datastore            qtp1238209644-16 ERROR]  Error thrown
> executing CREATE TABLE dbo.j300e_session
> *...*
> ) : CREATE TABLE permission denied in database '*<WRONG DATABASE>*'.
> com.microsoft.sqlserver.jdbc.SQLServerException: CREATE TABLE permission
> denied in database '*<WRONG DATABASE>*'.
>