Re: mysql error when upgrade from 1.8 to 1.10

2015-11-16 Thread Jeroen van der Wal
We actively use Apache Isis with HSQLDB, PostgreSQL and MS SQL Server and
they all support separate schemas within the same database. I would like to
see Apache Isis run without issues in the scenario you have but I don't
want to lose the security that database schemas provide in preventing
similar named entities to clash.

What options do you have? Can you

On 16 November 2015 at 14:40, Chuangyu  wrote:

> Hi Jeroen and Stephen,
> Thanks for your response.
> Jeroen ,your solution may not fit my scenario.
> I run 3 instance of this system but all 3 databases on one server .(eg.
>  db1,db2,db3)
> Each instance has username/password separately.(eg, user1, user2, user3)
> If create schema on this server , all databases would share the schema.
>
> If tables will create in the default schema, as Stephen said, it may be can
> work.
> But it is hard to maintenance.
>
>
> James.
>
>
> 2015-11-16 19:27 GMT+08:00 Stephen Cameron :
>
> > Yes, that was a problem for me with MySQL and I used the same solution to
> > manually create the schemas, but then the module tables seem to have been
> > created in the default schema anyway, so presently a mystery!
> >
> > On Mon, Nov 16, 2015 at 10:22 PM, Jeroen van der Wal <
> jer...@stromboli.it>
> > wrote:
> >
> > > Hi James,
> > >
> > > Starting with Isis 1.10.0 we've moved the tables of the modules to
> their
> > > own database schema to avoid clashes with similar named entities in
> your
> > > own domain or other modules. Here's [1] a sample of an MSSQL script
> that
> > we
> > > used. You have create something similar for MySQL I guess.
> > >
> > > Looking at the error message I also suspect that the automatic creation
> > of
> > > schemas does not work on MySQL, perhaps it requires delimiters around
> the
> > > schema name? Try creating the schemas manually as a workaround.
> > >
> > > [1] https://gist.github.com/jcvanderwal/c30e2d8c4d11aec5b0c0
> > >
> > >
> > > On 16 November 2015 at 11:10, Chuangyu  wrote:
> > >
> > > > Hi,
> > > >
> > > > I create a new 1.10 simple app and copy all code from 1.8 to 1.10.
> > > > And made some change to fit new 1.10 specs.
> > > > When start system , Eclipse show errors on console box.
> > > > It seems each addon module occur one error.
> > > > Below is one of errors:
> > > >
> > > > Unable to create schema
> > > > com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have
> an
> > > > error in your SQL syntax; check the manual that corresponds to your
> > MySQL
> > > > server version for the right syntax to use near '"isissessionlogger"'
> > at
> > > > line 1
> > > > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> > Method)
> > > > at
> > > >
> > > >
> > >
> >
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
> > > > at
> > > >
> > > >
> > >
> >
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> > > > at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
> > > > at com.mysql.jdbc.Util.handleNewInstance(Util.java:408)
> > > > at com.mysql.jdbc.Util.getInstance(Util.java:383)
> > > > at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1062)
> > > > at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4226)
> > > > at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4158)
> > > > at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2615)
> > > > at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2776)
> > > > at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2834)
> > > > at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2783)
> > > > at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:908)
> > > > at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:788)
> > > > at
> > > >
> > > >
> > >
> >
> org.apache.isis.objectstore.jdo.datanucleus.CreateSchemaObjectFromClassMetadata.exec(CreateSchemaObjectFromClassMetadata.java:117)
> > > > at
> > > >
> > > >
> > >
> >
> org.apache.isis.objectstore.jdo.datanucleus.CreateSchemaObjectFromClassMetadata.loaded(CreateSchemaObjectFromClassMetadata.java:76)
> > > > at
> > > >
> > > >
> > >
> >
> org.datanucleus.metadata.MetaDataManagerImpl.processListenerLoadingCall(MetaDataManagerImpl.java:1705)
> > > > at
> > > >
> > > >
> > >
> >
> org.datanucleus.metadata.MetaDataManagerImpl.getMetaDataForClass(MetaDataManagerImpl.java:1681)
> > > > at
> > > >
> > > >
> > >
> >
> org.datanucleus.metadata.MetaDataManagerImpl.getMetaDataForClass(MetaDataManagerImpl.java:1580)
> > > > at
> > > >
> > > >
> > >
> >
> org.datanucleus.metadata.MetaDataManagerImpl.getReferencedClasses(MetaDataManagerImpl.java:3009)
> > > > at
> > > >
> > > >
> > >
> >
> org.datanucleus.store.rdbms.RDBMSStoreManager$ClassAdder.addClassTables(RDBMSStoreManager.java:2981)
> > > > at
> > > >
> > > >
> > >
> >
> 

Re: mysql error when upgrade from 1.8 to 1.10

2015-11-16 Thread Chuangyu
Hi Jeroen and Stephen,
Thanks for your response.
Jeroen ,your solution may not fit my scenario.
I run 3 instance of this system but all 3 databases on one server .(eg.
 db1,db2,db3)
Each instance has username/password separately.(eg, user1, user2, user3)
If create schema on this server , all databases would share the schema.

If tables will create in the default schema, as Stephen said, it may be can
work.
But it is hard to maintenance.


James.


2015-11-16 19:27 GMT+08:00 Stephen Cameron :

> Yes, that was a problem for me with MySQL and I used the same solution to
> manually create the schemas, but then the module tables seem to have been
> created in the default schema anyway, so presently a mystery!
>
> On Mon, Nov 16, 2015 at 10:22 PM, Jeroen van der Wal 
> wrote:
>
> > Hi James,
> >
> > Starting with Isis 1.10.0 we've moved the tables of the modules to their
> > own database schema to avoid clashes with similar named entities in your
> > own domain or other modules. Here's [1] a sample of an MSSQL script that
> we
> > used. You have create something similar for MySQL I guess.
> >
> > Looking at the error message I also suspect that the automatic creation
> of
> > schemas does not work on MySQL, perhaps it requires delimiters around the
> > schema name? Try creating the schemas manually as a workaround.
> >
> > [1] https://gist.github.com/jcvanderwal/c30e2d8c4d11aec5b0c0
> >
> >
> > On 16 November 2015 at 11:10, Chuangyu  wrote:
> >
> > > Hi,
> > >
> > > I create a new 1.10 simple app and copy all code from 1.8 to 1.10.
> > > And made some change to fit new 1.10 specs.
> > > When start system , Eclipse show errors on console box.
> > > It seems each addon module occur one error.
> > > Below is one of errors:
> > >
> > > Unable to create schema
> > > com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an
> > > error in your SQL syntax; check the manual that corresponds to your
> MySQL
> > > server version for the right syntax to use near '"isissessionlogger"'
> at
> > > line 1
> > > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
> > > at
> > >
> > >
> >
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
> > > at
> > >
> > >
> >
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> > > at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
> > > at com.mysql.jdbc.Util.handleNewInstance(Util.java:408)
> > > at com.mysql.jdbc.Util.getInstance(Util.java:383)
> > > at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1062)
> > > at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4226)
> > > at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4158)
> > > at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2615)
> > > at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2776)
> > > at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2834)
> > > at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2783)
> > > at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:908)
> > > at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:788)
> > > at
> > >
> > >
> >
> org.apache.isis.objectstore.jdo.datanucleus.CreateSchemaObjectFromClassMetadata.exec(CreateSchemaObjectFromClassMetadata.java:117)
> > > at
> > >
> > >
> >
> org.apache.isis.objectstore.jdo.datanucleus.CreateSchemaObjectFromClassMetadata.loaded(CreateSchemaObjectFromClassMetadata.java:76)
> > > at
> > >
> > >
> >
> org.datanucleus.metadata.MetaDataManagerImpl.processListenerLoadingCall(MetaDataManagerImpl.java:1705)
> > > at
> > >
> > >
> >
> org.datanucleus.metadata.MetaDataManagerImpl.getMetaDataForClass(MetaDataManagerImpl.java:1681)
> > > at
> > >
> > >
> >
> org.datanucleus.metadata.MetaDataManagerImpl.getMetaDataForClass(MetaDataManagerImpl.java:1580)
> > > at
> > >
> > >
> >
> org.datanucleus.metadata.MetaDataManagerImpl.getReferencedClasses(MetaDataManagerImpl.java:3009)
> > > at
> > >
> > >
> >
> org.datanucleus.store.rdbms.RDBMSStoreManager$ClassAdder.addClassTables(RDBMSStoreManager.java:2981)
> > > at
> > >
> > >
> >
> org.datanucleus.store.rdbms.RDBMSStoreManager$ClassAdder.run(RDBMSStoreManager.java:2872)
> > > at
> > >
> > >
> >
> org.datanucleus.store.rdbms.AbstractSchemaTransaction.execute(AbstractSchemaTransaction.java:119)
> > > at
> > >
> > >
> >
> org.datanucleus.store.rdbms.RDBMSStoreManager.createSchemaForClasses(RDBMSStoreManager.java:3842)
> > > at
> > >
> > >
> >
> org.apache.isis.core.runtime.system.persistence.DataNucleusApplicationComponents.createSchema(DataNucleusApplicationComponents.java:191)
> > > at
> > >
> > >
> >
> org.apache.isis.core.runtime.system.persistence.DataNucleusApplicationComponents.createPmfAndSchemaIfRequired(DataNucleusApplicationComponents.java:150)
> > > at
> > >
> > >
> >
> 

Re: RO calls authentication

2015-11-16 Thread César Camilo Lugo Marcos
Thank you Joan. I followed the link you posted in Github but got an access 
error 404 , is it a private repository?

Cesar


De: johandoornen...@filternet.nl 
Enviado: sábado, 14 de noviembre de 2015 04:21:48 a. m.
Para: users@isis.apache.org
Asunto: Re: RO calls authentication

Maybe checking out this code 1) from an app that I am working on can help you?

I am making unauthorized calls to the endpoints /register and /authenticate.

The other endpoints use basic authentication.

See also docs 2) and further



1) 
https://github.com/johandoornenbal/matching/blob/master/webapp/src/main/java/info/matchingservice/webapp/custom_rest/CustomAuthenticationSessionStrategyBasicAuth.java​


2)
https://isis.apache.org/guides/ug.html#8.9.2.-restful-objects-viewer

Grtz Johan


Hello.



I wrote a simple JavaScript app which makes a call to invoke an Apache Isis
RO web service. When making the GET call I am getting an error that seems to
be due to the fact that I have not included authentication in my app yet. Is
there any reference that I can read to document myself on how to
authenticate to make HTTP calls using authentication?



Cesar.







---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus





Re: Does ISIS make following "rich domain model" pattern easier?

2015-11-16 Thread David Tildesley
Thanks Dan for this comprehensive reply. 

Regards,David. 


 On Monday, 16 November 2015 8:48 PM, Dan Haywood 
 wrote:
   

 

On 15 November 2015 at 20:30, David Tildesley  wrote:

Hi All,

I am looking for reasons why Apache ISIS framework promotes and enables a "rich 
domain model" [1] [2]  and therefore promotes OO design.



It certainly _enables_ a rich domain model, whereas many other frameworks don't 
even do that.  And its architecture acts a little like a "firewall", preventing 
behaviour from leaching out of the domain layer and into the adjacent 
presentation layer and persistence layer, ie technical infrastructure layers 
that should have no business logic.
I don't know that it necessarily promotes OO (non-anaemic) design, or rather, 
you can choose to do that or you can choose not to.  Generally it's easier to 
start with a non-anaemic approach - just put behaviour into actions on methods 
- so in the sense that that is the quickest route to a functioning app, then I 
suppose it does promote OO.
However, the more I work with the naked objects pattern the more I think of it 
as an aspect-oriented system rather than an object-oriented one.  We are all 
used to AOP at the technical infrastructure level, for example security 
(authorization), logging/auditing, command profiling ... and these are all 
supported by the framework.  Also, persistence is another cross-cutting concern 
which the framework offloads to the DataNucleus ORM.  But I also think of naked 
objects pattern itself as a cross-cutting concern... basically the ability for 
provide a representation of domain objects in the presentation layer.
Over and above AOP at the technical layer, I think that the framework also 
promotes aspect-orientation within the domain layer itself.  For example, for a 
long time we've had the concept of contributed actions, which is behaviour 
implemented in domain services but which apparently belongs to the domain 
objects (binding on action parameter types).  Over the last couple of years the 
framework has extended this to contributed collections and contributed 
properties.  In the most recent 1.10.0 release we've simplified this with the 
new @Mixin annotation ... so these things are very much like AOP traits.  I 
experimented with this concept while implementing the incode-module-notes and 
incode-module-commchannel modules [3], so one can see what such code looks 
like.   I've also used it for some new functionality to be able to generate XML 
and XSDs from JAXB-annotated "DTO" view models [4]
Also (and I only actually realized this while drafting this answer) the events 
that we emit on the event bus (for 
hide/disable/validate/pre-execute/post-execute) are actually a type of 
pointcut, allowing other behaviour (of the subscribers) to be interleave and 
influence with the original business logic.
What's important, I think, is not OO design per se.  It's that the framework 
supports the single responsibility pattern, ie that the way to organize code is 
to put code that changes at the same rate together, but to separate out code 
that changes at different rates.  So sometimes putting behaviour with data is 
the right thing, but sometimes it's right to move that behaviour out into a 
mixin or into a subscriber of an event.


 
And of course any reasons to the contrary (i.e. things that ISIS does that gets 
in the way of OO design).



No, I don't think it does get in the way of OO design.    Though that said 
there are some minor limitations to the sorts of OO designs one can 
contemplate... we still don't support collections as action parameters, for 
example.

 
Or is it simply neutral? i.e. developer choice.



This is probably the best answer.  Though it takes a little time working with 
the framework to realize this... most will think it is heavily biased to OO and 
rich domain models and only later realize that one can do it both ways.
My 2c, but would love to hear other opinions on this too.
CheersDan
[3] http://catalog.incode.org/[4] 
https://github.com/apache/isis/blob/master/core/applib/src/main/java/org/apache/isis/applib/services/jaxb/Dto_downloadXml.java
 
Regards,
David.

[1] 
https://www.link-intersystems.com/blog/2011/10/01/anemic-vs-rich-domain-models/
[2] http://www.martinfowler.com/bliki/AnemicDomainModel.html




  

Re: Does ISIS make following "rich domain model" pattern easier?

2015-11-16 Thread Stephen Cameron
Yes, the idea of constraints giving a system specific features (boosting
some, diminishing others) is interesting, the main subject of Roy
Fielding's PhD.

If the essence of DDD is ubiquitous language, then UML definitely adds
nothing because its a distraction when trying to communicate with domain
experts, other graphical tools, like VUE, have more potential I believe. I
once made the mistake of putting an database schema diagram up in a meeting
with a group of scientists, the immediate response of one was to say
"another horrendogram", making a good point with humour I guess.

I will do some experimentation with my alternative approach and report
back, its very encouraging that we are having this discussion though.



On Tue, Nov 17, 2015 at 7:28 AM, David Tildesley 
wrote:

> Thanks Stephen,
> Certainly the intention of DDD is to make it easier for a development team
> to focus on a  "rich domain model" and therefore OO design principles.
> I agree Naked Objects approach facilitates the focusing on the domain
> model as an intention.
> And so both DDD and Naked Objects have the same intention. Another way of
> putting it is that they both strive to remove the "distractions" that
> derail the domain model.
> You could also say the same about UML class model to code intention - the
> intention is to remove the technical "distractions" so that everyone can
> focus on the domain model with the basic use of UML representing the "just
> enough" domain model design.
> One of the main influencers on an efficient and loosely coupled (rich)
> domain model shape is domain behaviour (actual problem domain behaviour -
> beyond the basic setters and getters) e.g. calculateXXX(...).
> Regards,David.
>
>
>
>
>  On Monday, 16 November 2015 10:54 AM, Stephen Cameron <
> steve.cameron...@gmail.com> wrote:
>
>
>  Hi David,
>
> I would ask a slightly different question: does Isis assist with DDD as
> explained by Evans as a means of "tackling complexity"  (the root of what
> makes big projects fail I believe)?.
>
> In fact its slightly disturbing to me to hear this talk of UML
> "design-time" tools and of round-tripping, that is, if learning by coding
> and refactoring a design (as code) is the essence of 'agile'  DDD. In fact
> I spent alot of time looking into this and decided that UML and MDA
> particularly were not that helpful, for that reason. If they were we'd have
> moved to executable UML.
>
> I think a bigger problem is that people use OO when its not actually the
> best kind of language for their specific problem.
>
> To answer your question though, I'd say its the naked objects approach more
> than use of OO per se that aids that, you focus more on the objects than on
> specific use-cases. If that is done an anaemic design seems improbable.
>
> On Mon, Nov 16, 2015 at 7:30 AM, David Tildesley 
> wrote:
>
> > Hi All,
> >
> > I am looking for reasons why Apache ISIS framework promotes and enables a
> > "rich domain model" [1] [2]  and therefore promotes OO design.
> >
>
> > And of course any reasons to the contrary (i.e. things that ISIS does
> that
> > gets in the way of OO design).
> >
> > Or is it simply neutral? i.e. developer choice.
> >
> > Regards,
> > David.
> >
> > [1]
> >
> https://www.link-intersystems.com/blog/2011/10/01/anemic-vs-rich-domain-models/
> > [2] http://www.martinfowler.com/bliki/AnemicDomainModel.html
> >
>
>
>
>


Re: Does ISIS make following "rich domain model" pattern easier?

2015-11-16 Thread David Tildesley
Thanks Stephen,
Certainly the intention of DDD is to make it easier for a development team to 
focus on a  "rich domain model" and therefore OO design principles.
I agree Naked Objects approach facilitates the focusing on the domain model as 
an intention.
And so both DDD and Naked Objects have the same intention. Another way of 
putting it is that they both strive to remove the "distractions" that derail 
the domain model.
You could also say the same about UML class model to code intention - the 
intention is to remove the technical "distractions" so that everyone can focus 
on the domain model with the basic use of UML representing the "just enough" 
domain model design.
One of the main influencers on an efficient and loosely coupled (rich) domain 
model shape is domain behaviour (actual problem domain behaviour - beyond the 
basic setters and getters) e.g. calculateXXX(...). 
Regards,David.
 
 


 On Monday, 16 November 2015 10:54 AM, Stephen Cameron 
 wrote:
   

 Hi David,

I would ask a slightly different question: does Isis assist with DDD as
explained by Evans as a means of "tackling complexity"  (the root of what
makes big projects fail I believe)?.

In fact its slightly disturbing to me to hear this talk of UML
"design-time" tools and of round-tripping, that is, if learning by coding
and refactoring a design (as code) is the essence of 'agile'  DDD. In fact
I spent alot of time looking into this and decided that UML and MDA
particularly were not that helpful, for that reason. If they were we'd have
moved to executable UML.

I think a bigger problem is that people use OO when its not actually the
best kind of language for their specific problem.

To answer your question though, I'd say its the naked objects approach more
than use of OO per se that aids that, you focus more on the objects than on
specific use-cases. If that is done an anaemic design seems improbable.

On Mon, Nov 16, 2015 at 7:30 AM, David Tildesley 
wrote:

> Hi All,
>
> I am looking for reasons why Apache ISIS framework promotes and enables a
> "rich domain model" [1] [2]  and therefore promotes OO design.
>

> And of course any reasons to the contrary (i.e. things that ISIS does that
> gets in the way of OO design).
>
> Or is it simply neutral? i.e. developer choice.
>
> Regards,
> David.
>
> [1]
> https://www.link-intersystems.com/blog/2011/10/01/anemic-vs-rich-domain-models/
> [2] http://www.martinfowler.com/bliki/AnemicDomainModel.html
>


  

Re: moving to 1.10.0

2015-11-16 Thread Dan Haywood
On 12 November 2015 at 08:07, Stephen Cameron 
wrote:

> So yes, it was something silly on my part. I had the getApplicationTenancy
> method behaving as a property getter and it should (I guess) have been
> marked as @Programmatic. Adding that annotation has fixed the problem, the
> null pointer exception was due to there being no ObjectAdapter being found
> for the tenancy pojo, at line 1408 in
> org.apache.isis.core.runtime.system.persistence.PersistenceSession.java.
>
>
I've added some code so in the future a similar error would provide a
better error message.



> As to whether people should be protected from such silliness, that is a
> design decision.
>
> I still don't have a satisfactory debugging setup in Eclipse, tried a few
> approaches but none working satisfactorily yet. I want to use a Eclipse
> Dynamic Web Project facet over a maven webapp basically, so if anyone has
> this as their standard setup I'd be pleased to hear
>
>
Although I don't use Eclipse now, when I did I never touched the dynamic
web project stuff.  Far easier just to use our org.apache.isis.WebServer to
run the app in an embedded jetty.  This allows debug with no particular
magical configuration required at all.

see the screencast at [1], 3 minutes in.

The screenshot for IntelliJ at [2] shows the main parameters, should be
easy to fill in equivalent dialog in Eclipse.

HTH
Dan

[1] http://isis.apache.org/guides/cg.html#_screencast
[2] http://isis.apache.org/guides/cg.html#_running_the_app




> Steve
>
>


Re: Thinking about re-introducing UML in our workflow

2015-11-16 Thread Mike Burton
Hi Jeroen,

My experience is similar. I was always suspicious of the "code generation " 
approach, inevitably gives 2 "sources" that get out of step. 

The only good exception I saw was TogetherJ where "the code is the model"

Best Regards

Mike Burton
(Sent from my iPhone)



> On 15 Nov 2015, at 23:44, Jeroen van der Wal  wrote:
> 
> All very interesting!
> 
> Over the years I tried numerous modelling tools and only the low-tech ones
> stayed: drawing on a whiteboard, using coloured index cards [1] (learned
> from Dan) or using a simple online tool like yUML [2]. And I only use them
> to communicate the broad picture or for explorative purposes.
> 
> I gave up on code generators: I always ended up fighting the generated
> code. And the impression that they support rapid application development
> proved wrong: at the point where you had to work on more advanced stuff
> velocity came to a halt. If an application is built on lots of repeating
> code snippets then my conclusion is that the underlying framework is not
> good enough.
> 
> I love source code that tells the story of the application. Where
> everything that could be left out of the code is eliminated. Very DRY,
> convention over code. This has drawn me to Naked Objects and made me decide
> to spend my time on Apache Isis.
> 
> As you imagine by now I would not take the route from diagram to code. For
> me the code editor is the sole canvas to express your ideas. And I think
> that if we keep improving Apache Isis on a few points there will never be a
> need for an additional tool:
> 
> 1) Reduce boilerplate and make writing an application skeleton as easy as
> the easiest modelling tool. This has the advantage that a software
> architect can sketch the application and leave it to his developers to fill
> in details. But everyone is working on the same code base using the same
> tools. In this area we started using Lombok. Also Dan had an idea to make
> it possible to create your own custom annotations which can combine
> multiple annotations.
> 
> 2) Visualise the meta model. With contributions and mixins the application
> logic can come from anywhere. This is architecturally sane but makes an
> application hard to grasp. It would love to see a maven plugin that
> generates appealing documentation from the meta model of an Isis
> application.
> 
> 3) When taking the visualisation concept a bit further it would be very
> powerful to explore and navigate the meta model within the IDE. Any plugin
> developers here?
> 
> That's just my two cents.
> 
> Cheers,
> 
> Jeroen
> 
> 
>> On 15 November 2015 at 21:01, David Tildesley  wrote:
>> 
>> 
>> 
>> 
>> 
>> 
>> On Sunday, 15 November 2015 5:37 AM, Dan Haywood <
>> d...@haywood-associates.co.uk> wrote:
>>> Thanks for this James.
>> 
>>> My observation re: using the (relational) data model as the initial input
>>> though is that this is likely to lead to rather coupled code, ultimately
>>> not maintainable.
>> 
>> Couldn't agree more.
>> 
>> 
>>> So, while going from the database up to the domain is fine for a single
>>> module of 10 or so entities, any app that is bigger than this really
>> should
>>> be modelled from the domain down to the database.
>> 
>> Quite right. Any business app that is non trivial should be domain
>> modelled.
>> 
>> David.
>> 
>>> Dan
>> 
>> 
>> 
>> 
>> 
>>> On 14 November 2015 at 15:00, James Agada  wrote:
>>> 
>>> I actually tested out using Telosys to generate an isis app from database
>>> definition. It did work but of course it meant i did the ER first. I used
>>> MySQL, did the ER modelling on the workbench, forward engineered into the
>>> database and then used telosys scripts to generate a functional Isis
>>> application. Did it as a PoC but we will come back to it later.
>>> James Agada
>>> Chief Technology Officer
>>> 
>>> 
>>> On 14 Nov 2015, at 3:49 PM, Óscar Bou - GOVERTIS 
>>> wrote:
>>> 
>>> Many thanks, Stephen for this detailed explanation.
>>> 
>>> The problem I’m facing is that I intent to communicate the developers
>>> what’s the model to implement.
>>> 
>>> And I usually don’t find big mistakes in action code, but what mostly
>>> forces us to refactor is miscommunication regarding the Domain Entities,
>>> attributes and actions names, including typos  (think my team speak
>> Spanish
>>> but they’re modeling in English) or wrong or missing relationships
>> between
>>> those entities.
>>> 
>>> All that could be avoided by firstly agree in a common UML Class Diagram.
>>> 
>>> If it can potentially generate automatically the Java skeleton with
>> Apache
>>> Isis annotations is a big plus, as it will avoid mistakes when moving
>> from
>>> design to implementation.
>>> 
>>> And if it could potentially reverse engineer Java (incl. Apache Isis
>>> idioms) a really good feature.
>>> 
>>> Any ideas about what tools could best adapt to the workflow (that could
>> be
>>> 

mysql error when upgrade from 1.8 to 1.10

2015-11-16 Thread Chuangyu
Hi,

I create a new 1.10 simple app and copy all code from 1.8 to 1.10.
And made some change to fit new 1.10 specs.
When start system , Eclipse show errors on console box.
It seems each addon module occur one error.
Below is one of errors:

Unable to create schema
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an
error in your SQL syntax; check the manual that corresponds to your MySQL
server version for the right syntax to use near '"isissessionlogger"' at
line 1
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:408)
at com.mysql.jdbc.Util.getInstance(Util.java:383)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1062)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4226)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4158)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2615)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2776)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2834)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2783)
at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:908)
at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:788)
at
org.apache.isis.objectstore.jdo.datanucleus.CreateSchemaObjectFromClassMetadata.exec(CreateSchemaObjectFromClassMetadata.java:117)
at
org.apache.isis.objectstore.jdo.datanucleus.CreateSchemaObjectFromClassMetadata.loaded(CreateSchemaObjectFromClassMetadata.java:76)
at
org.datanucleus.metadata.MetaDataManagerImpl.processListenerLoadingCall(MetaDataManagerImpl.java:1705)
at
org.datanucleus.metadata.MetaDataManagerImpl.getMetaDataForClass(MetaDataManagerImpl.java:1681)
at
org.datanucleus.metadata.MetaDataManagerImpl.getMetaDataForClass(MetaDataManagerImpl.java:1580)
at
org.datanucleus.metadata.MetaDataManagerImpl.getReferencedClasses(MetaDataManagerImpl.java:3009)
at
org.datanucleus.store.rdbms.RDBMSStoreManager$ClassAdder.addClassTables(RDBMSStoreManager.java:2981)
at
org.datanucleus.store.rdbms.RDBMSStoreManager$ClassAdder.run(RDBMSStoreManager.java:2872)
at
org.datanucleus.store.rdbms.AbstractSchemaTransaction.execute(AbstractSchemaTransaction.java:119)
at
org.datanucleus.store.rdbms.RDBMSStoreManager.createSchemaForClasses(RDBMSStoreManager.java:3842)
at
org.apache.isis.core.runtime.system.persistence.DataNucleusApplicationComponents.createSchema(DataNucleusApplicationComponents.java:191)
at
org.apache.isis.core.runtime.system.persistence.DataNucleusApplicationComponents.createPmfAndSchemaIfRequired(DataNucleusApplicationComponents.java:150)
at
org.apache.isis.core.runtime.system.persistence.DataNucleusApplicationComponents.initialize(DataNucleusApplicationComponents.java:105)
at
org.apache.isis.core.runtime.system.persistence.DataNucleusApplicationComponents.(DataNucleusApplicationComponents.java:98)
at
org.apache.isis.core.runtime.system.persistence.PersistenceSessionFactory.createDataNucleusApplicationComponents(PersistenceSessionFactory.java:92)
at
org.apache.isis.core.runtime.system.persistence.PersistenceSessionFactory.init(PersistenceSessionFactory.java:73)
at org.apache.isis.core.runtime.system.IsisSystem.init(IsisSystem.java:203)
at
org.apache.isis.core.runtime.runner.IsisInjectModule.provideIsisSystem(IsisInjectModule.java:140)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.google.inject.internal.ProviderMethod.get(ProviderMethod.java:104)
at
com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
at
com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at
com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)
at
com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.Scopes$1$1.get(Scopes.java:65)
at
com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
at
com.google.inject.internal.SingleFieldInjector.inject(SingleFieldInjector.java:53)
at
com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:110)
at
com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:75)
at
com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:73)
at
com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1024)
at

Re: Thinking about re-introducing UML in our workflow

2015-11-16 Thread Óscar Bou - GOVERTIS

Hi all.

First of all, the good news for all romantics: 

Together is still alive !!! See [1].

[2] says it fully supports Eclipse.

Really interesting, Jeroen, introducing Lombok.
Look how clear and concise is the Aggregate in [3] expressed in C#.


For me, my immediate need is to have a visual depiction of the new features 
developers must work on.
So an Agile diagramming tool would be ok for it.

I’m used to drag-n-drop like interfaces, and I'm there are “visual” tools out 
there that support plantuml, so it would be ok to be based on it.

Also agree that the model "must be" the code (and not “the code is the model” 
MDA approach, despite my experience with Bold for Delphi/Capable Objects was 
REALLY really good).



Regards,

Oscar



[1] http://www.borland.com/en-GB/Products/Requirements-Management/Together
[2[ 
http://www.borland.com/en-GB/Products/Requirements-Management/Together/Plugins-and-integrations
[3] 
https://github.com/Lokad/lokad-cqrs/blob/master/SaaS.Domain/Aggregates/Register/RegistrationState.cs



> El 16 nov 2015, a las 10:57, Mike Burton  escribió:
> 
> Hi Jeroen,
> 
> My experience is similar. I was always suspicious of the "code generation " 
> approach, inevitably gives 2 "sources" that get out of step. 
> 
> The only good exception I saw was TogetherJ where "the code is the model"
> 
> Best Regards
> 
> Mike Burton
> (Sent from my iPhone)
> 
> 
> 
>> On 15 Nov 2015, at 23:44, Jeroen van der Wal  wrote:
>> 
>> All very interesting!
>> 
>> Over the years I tried numerous modelling tools and only the low-tech ones
>> stayed: drawing on a whiteboard, using coloured index cards [1] (learned
>> from Dan) or using a simple online tool like yUML [2]. And I only use them
>> to communicate the broad picture or for explorative purposes.
>> 
>> I gave up on code generators: I always ended up fighting the generated
>> code. And the impression that they support rapid application development
>> proved wrong: at the point where you had to work on more advanced stuff
>> velocity came to a halt. If an application is built on lots of repeating
>> code snippets then my conclusion is that the underlying framework is not
>> good enough.
>> 
>> I love source code that tells the story of the application. Where
>> everything that could be left out of the code is eliminated. Very DRY,
>> convention over code. This has drawn me to Naked Objects and made me decide
>> to spend my time on Apache Isis.
>> 
>> As you imagine by now I would not take the route from diagram to code. For
>> me the code editor is the sole canvas to express your ideas. And I think
>> that if we keep improving Apache Isis on a few points there will never be a
>> need for an additional tool:
>> 
>> 1) Reduce boilerplate and make writing an application skeleton as easy as
>> the easiest modelling tool. This has the advantage that a software
>> architect can sketch the application and leave it to his developers to fill
>> in details. But everyone is working on the same code base using the same
>> tools. In this area we started using Lombok. Also Dan had an idea to make
>> it possible to create your own custom annotations which can combine
>> multiple annotations.
>> 
>> 2) Visualise the meta model. With contributions and mixins the application
>> logic can come from anywhere. This is architecturally sane but makes an
>> application hard to grasp. It would love to see a maven plugin that
>> generates appealing documentation from the meta model of an Isis
>> application.
>> 
>> 3) When taking the visualisation concept a bit further it would be very
>> powerful to explore and navigate the meta model within the IDE. Any plugin
>> developers here?
>> 
>> That's just my two cents.
>> 
>> Cheers,
>> 
>> Jeroen
>> 
>> 
>>> On 15 November 2015 at 21:01, David Tildesley  wrote:
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> On Sunday, 15 November 2015 5:37 AM, Dan Haywood <
>>> d...@haywood-associates.co.uk> wrote:
 Thanks for this James.
>>> 
 My observation re: using the (relational) data model as the initial input
 though is that this is likely to lead to rather coupled code, ultimately
 not maintainable.
>>> 
>>> Couldn't agree more.
>>> 
>>> 
 So, while going from the database up to the domain is fine for a single
 module of 10 or so entities, any app that is bigger than this really
>>> should
 be modelled from the domain down to the database.
>>> 
>>> Quite right. Any business app that is non trivial should be domain
>>> modelled.
>>> 
>>> David.
>>> 
 Dan
>>> 
>>> 
>>> 
>>> 
>>> 
 On 14 November 2015 at 15:00, James Agada  wrote:
 
 I actually tested out using Telosys to generate an isis app from database
 definition. It did work but of course it meant i did the ER first. I used
 MySQL, did the ER modelling on the workbench, forward engineered into the
 database and then used telosys scripts to generate a 

Re: Thinking about re-introducing UML in our workflow

2015-11-16 Thread Óscar Bou - GOVERTIS

For you to know.

I was just reading about “AgileJ” [1] (the video at [2] is excellent. It 
perfectly summarizes the points-of-view expressed here about the evolution last 
years of UML usage in dev teams).

But I’ve also found the Papyrus Eclipse project [3]. Seems to be really alive 
(there has been a conference this month).

And It also seems to have full code synch from Java … See [4].

Any experience out there with Papyrus? 
Could it be a good match for Apache Isis?


Cheers,

Oscar


[1] http://www.agilej.com
[2] https://www.youtube.com/embed/hs9TYFsxkxE?autoplay=1=0
[3] http://www.eclipse.org/papyrus/
[4] 
https://www.eclipsecon.org/europe2015/session/papyrus4java-uml-diagrams-ordinary-java-developers




> El 16 nov 2015, a las 11:29, Óscar Bou - GOVERTIS  
> escribió:
> 
> 
> Hi all.
> 
> First of all, the good news for all romantics: 
> 
> Together is still alive !!! See [1].
> 
> [2] says it fully supports Eclipse.
> 
> Really interesting, Jeroen, introducing Lombok.
> Look how clear and concise is the Aggregate in [3] expressed in C#.
> 
> 
> For me, my immediate need is to have a visual depiction of the new features 
> developers must work on.
> So an Agile diagramming tool would be ok for it.
> 
> I’m used to drag-n-drop like interfaces, and I'm there are “visual” tools out 
> there that support plantuml, so it would be ok to be based on it.
> 
> Also agree that the model "must be" the code (and not “the code is the model” 
> MDA approach, despite my experience with Bold for Delphi/Capable Objects was 
> REALLY really good).
> 
> 
> 
> Regards,
> 
> Oscar
> 
> 
> 
> [1] http://www.borland.com/en-GB/Products/Requirements-Management/Together
> [2[ 
> http://www.borland.com/en-GB/Products/Requirements-Management/Together/Plugins-and-integrations
> [3] 
> https://github.com/Lokad/lokad-cqrs/blob/master/SaaS.Domain/Aggregates/Register/RegistrationState.cs
> 
> 
> 
>> El 16 nov 2015, a las 10:57, Mike Burton  escribió:
>> 
>> Hi Jeroen,
>> 
>> My experience is similar. I was always suspicious of the "code generation " 
>> approach, inevitably gives 2 "sources" that get out of step. 
>> 
>> The only good exception I saw was TogetherJ where "the code is the model"
>> 
>> Best Regards
>> 
>> Mike Burton
>> (Sent from my iPhone)
>> 
>> 
>> 
>>> On 15 Nov 2015, at 23:44, Jeroen van der Wal  wrote:
>>> 
>>> All very interesting!
>>> 
>>> Over the years I tried numerous modelling tools and only the low-tech ones
>>> stayed: drawing on a whiteboard, using coloured index cards [1] (learned
>>> from Dan) or using a simple online tool like yUML [2]. And I only use them
>>> to communicate the broad picture or for explorative purposes.
>>> 
>>> I gave up on code generators: I always ended up fighting the generated
>>> code. And the impression that they support rapid application development
>>> proved wrong: at the point where you had to work on more advanced stuff
>>> velocity came to a halt. If an application is built on lots of repeating
>>> code snippets then my conclusion is that the underlying framework is not
>>> good enough.
>>> 
>>> I love source code that tells the story of the application. Where
>>> everything that could be left out of the code is eliminated. Very DRY,
>>> convention over code. This has drawn me to Naked Objects and made me decide
>>> to spend my time on Apache Isis.
>>> 
>>> As you imagine by now I would not take the route from diagram to code. For
>>> me the code editor is the sole canvas to express your ideas. And I think
>>> that if we keep improving Apache Isis on a few points there will never be a
>>> need for an additional tool:
>>> 
>>> 1) Reduce boilerplate and make writing an application skeleton as easy as
>>> the easiest modelling tool. This has the advantage that a software
>>> architect can sketch the application and leave it to his developers to fill
>>> in details. But everyone is working on the same code base using the same
>>> tools. In this area we started using Lombok. Also Dan had an idea to make
>>> it possible to create your own custom annotations which can combine
>>> multiple annotations.
>>> 
>>> 2) Visualise the meta model. With contributions and mixins the application
>>> logic can come from anywhere. This is architecturally sane but makes an
>>> application hard to grasp. It would love to see a maven plugin that
>>> generates appealing documentation from the meta model of an Isis
>>> application.
>>> 
>>> 3) When taking the visualisation concept a bit further it would be very
>>> powerful to explore and navigate the meta model within the IDE. Any plugin
>>> developers here?
>>> 
>>> That's just my two cents.
>>> 
>>> Cheers,
>>> 
>>> Jeroen
>>> 
>>> 
 On 15 November 2015 at 21:01, David Tildesley  wrote:
 
 
 
 
 
 
 On Sunday, 15 November 2015 5:37 AM, Dan Haywood <
 d...@haywood-associates.co.uk> wrote:
> Thanks for this James.