You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@isis.apache.org by GESCONSULTOR - Óscar Bou <o....@gesconsultor.com> on 2014/02/02 20:07:34 UTC

JRebel support

Hi, Dan.

I'm very excited about the possibility to use the JRebel plugin, as it can accelerate a lot the workflow.
I've downloaded and configured it, and I'm working over the latest quickstart archetype.

I've added 1 new property to the TodoItem entity, and it has not been showed on the interface.

These are the detailed steps followed.




1. Quickstart prototype.

I create a new folder and run maven to create a project based on the latest Isis quickstart:

mvn archetype:generate      -D archetypeGroupId=org.apache.isis.archetype     -D archetypeArtifactId=quickstart_wicket_restful_jdo-archetype     -D archetypeVersion=1.3.1     -D groupId=com.mycompany     -D artifactId=myapp     -D version=1.0-SNAPSHOT     -B


2. JRebel configuration.

I've installed JRebel, and on the JRebel Config Center I've marked the "dom" and "webapp" projects. to be followed for changes by JRebel.

I've downloaded from [1] the danhaywood-isis-jrebel-plugin-1.0.0-SNAPSHOT.jar plugin and copied it on the lib folder of the "webapp" module.

I've copied the ToDoApp-no-fixtures-PROTOTYPE.launch on the "webapp" module to a new ToDoApp-no-fixtures-PROTOTYPE-Rebel.launch file, and added:

<stringAttribute 
      key="org.eclipse.jdt.launching.VM_ARGUMENTS" 
      value="${jrebel_args} -Drebel.log=false -Drebel.plugins=./lib/danhaywood-isis-jrebel-plugin-1.0.0-SNAPSHOT.jar -Disis-jrebel-plugin.packagePrefix=dom.simple -XX:MaxPermSize=128m"/>

3. DataNucleus.

I assume that the "DataNucleus - auto-enhancement" option must be enabled on the "dom" module.
That originates that, each time the Enhancer is executed (that's after any change on any file on the module) a JRebel dialog asks:
"You are launching a JRebel-enabled application without the JRebel agent. JRebel will not work without it."
For avoiding that, I've checked the "Don't perform this check again (you can restore it from preferences)", and have chosen the "Not this time" option. 

4. Run the webapp.

I've launched the newly created Eclipse configuration and navigated to "http://localhost:8080/wicket/".
I've installed the fixtures.

5. Changes in code.

I add a new field to the ToDoItem entity. The following message appears on Eclipse:

Class 'xxx' has a new non-sttic field 'newField', it will be null on existing instances.

But after refreshing the webapp entity page, the field it's not showed. I've waited enough time. In fact, the following messages have been logged:

2014-02-02 19:56:40 JRebel: Reloading class 'dom.todo.ToDoItem'.
19:56:40,515  [Native               1238094722@qtp-1337505800-5 DEBUG]  SELECT "A0"."category","A0"."complete","A0"."cost","A0"."description","A0"."dueBy","A0"."notes","A0"."ownedBy","A0"."subcategory","A0"."version" FROM "ToDoItem" "A0" WHERE "A0"."id" = <11>
2014-02-02 19:56:40 JRebel: Reloading class 'dom.todo.ToDoItem$Category'.
2014-02-02 19:56:40 JRebel: Reloading class 'dom.todo.ToDoItem$Category$1'.
2014-02-02 19:56:40 JRebel: Reloading class 'dom.todo.ToDoItem$Subcategory'.
2014-02-02 19:56:40 JRebel: Reloading class 'dom.todo.ToDoItem$Subcategory$1'.
2014-02-02 19:56:40 JRebel: Reinitialized class 'dom.todo.ToDoItem$Subcategory'.
2014-02-02 19:56:40 JRebel: Reinitialized class 'dom.todo.ToDoItem$Category$1'.
2014-02-02 19:56:40 JRebel: Reloading class 'dom.todo.ToDoItem$Category$2'.
2014-02-02 19:56:40 JRebel: Reinitialized class 'dom.todo.ToDoItem$Category$2'.
2014-02-02 19:56:40 JRebel: Reloading class 'dom.todo.ToDoItem$Category$3'.
2014-02-02 19:56:40 JRebel: Reinitialized class 'dom.todo.ToDoItem$Category$3'.
2014-02-02 19:56:40 JRebel: Reinitialized class 'dom.todo.ToDoItem$Category'.
19:56:40,697  [Native               1238094722@qtp-1337505800-5 DEBUG]  SELECT 'dom.todo.ToDoItem' AS NUCLEUS_TYPE,"A1"."category","A1"."complete","A1"."cost","A1"."description","A1"."dueBy","A1"."notes","A1"."ownedBy","A1"."subcategory","A1"."id","A1"."version" FROM "ToDoItemDependencies" "A0" INNER JOIN "ToDoItem" "A1" ON "A0"."dependentId" = "A1"."id" WHERE "A0"."dependingId" = <11>
2014-02-02 19:56:40 JRebel: Reloading class 'dom.todo.ToDoItem$DependenciesComparator'.
2014-02-02 19:56:40 JRebel: Reloading class 'dom.todo.ToDoItem$DependenciesComparator$1'.
19:56:40,771  [Native               1238094722@qtp-1337505800-5 DEBUG]  SELECT 'dom.todo.ToDoItem' AS NUCLEUS_TYPE,"A0"."category","A0"."complete","A0"."cost","A0"."description","A0"."dueBy","A0"."notes","A0"."ownedBy","A0"."subcategory","A0"."id","A0"."version" FROM "ToDoItem" "A0" WHERE "A0"."ownedBy" = <'sven'> AND "A0"."category" = <'Professional'>
19:56:40,789  [Native               1238094722@qtp-1337505800-5 DEBUG]  SELECT "A0"."attachment","A0"."version" FROM "ToDoItem" "A0" WHERE "A0"."id" = <9>
19:56:40,806  [Native               1238094722@qtp-1337505800-5 DEBUG]  SELECT "A0"."attachment","A0"."version" FROM "ToDoItem" "A0" WHERE "A0"."id" = <10>
19:56:40,812  [Native               1238094722@qtp-1337505800-5 DEBUG]  SELECT "A0"."attachment","A0"."version" FROM "ToDoItem" "A0" WHERE "A0"."id" = <8>
19:56:41,351  [ResourceServlet      447422450@qtp-1337505800-2 INFO ]  request: css/application.css
19:56:41,351  [ResourceServlet      1203999762@qtp-1337505800-0 INFO ]  request: scripts/application.js
19:56:41,362  [ResourceServlet      1238094722@qtp-1337505800-5 INFO ]  request: images/spinning-icon.gif
 


On this state, if I press Edit and try to change the ToDoItem description, the following exception is logged:

org.mortbay.jetty.bio.SocketConnector$Connection#run(SocketConnector.java:228)
org.mortbay.thread.QueuedThreadPool$PoolThread#run(QueuedThreadPool.java:582)
java.lang.NullPointerException
org.datanucleus.state.JDOStateManager#setObjectField(JDOStateManager.java:1843)
dom.todo.ToDoItem#setSubcategory(ToDoItem.java:-1)
sun.reflect.NativeMethodAccessorImpl#invoke0(NativeMethodAccessorImpl.java:-2)
sun.reflect.NativeMethodAccessorImpl#invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl#invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method#invoke(Method.java:597)
org.apache.isis.core.commons.lang.MethodExtensions#invoke(MethodExtensions.java:50)
org.apache.isis.core.commons.lang.MethodExtensions#invoke(MethodExtensions.java:45)
org.apache.isis.core.metamodel.adapter.util.AdapterInvokeUtils#invoke(AdapterInvokeUtils.java:44)
org.apache.isis.core.progmodel.facets.properties.modify.PropertyClearFacetViaSetterMethod#clearProperty(PropertyClearFacetViaSetterMethod.java:62)
org.apache.isis.core.runtime.transaction.facets.PropertyClearFacetWrapTransaction$1#execute(PropertyClearFacetWrapTransaction.java:55)
org.apache.isis.core.runtime.system.transaction.IsisTransactionManager#executeWithinTransaction(IsisTransactionManager.java:175)
org.apache.isis.core.runtime.transaction.facets.PropertyClearFacetWrapTransaction#clearProperty(PropertyClearFacetWrapTransaction.java:52)
org.apache.isis.core.metamodel.specloader.specimpl.OneToOneAssociationImpl#clearValue(OneToOneAssociationImpl.java:200)
org.apache.isis.core.metamodel.specloader.specimpl.OneToOneAssociationImpl#set(OneToOneAssociationImpl.java:164)
org.apache.isis.viewer.wicket.model.models.EntityModel#apply(EntityModel.java:427)
org.apache.isis.viewer.wicket.ui.components.entity.properties.EntityPropertiesForm$2#onSubmit(EntityPropertiesForm.java:365)
org.apache.wicket.markup.html.form.Form#delegateSubmit(Form.java:1253)
org.apache.wicket.markup.html.form.Form#process(Form.java:925)
org.apache.isis.viewer.wicket.ui.panels.FormAbstract#process(FormAbstract.java:118)
org.apache.wicket.markup.html.form.Form#onFormSubmitted(Form.java:771)
org.apache.wicket.markup.html.form.Form#onFormSubmitted(Form.java:704)
sun.reflect.NativeMethodAccessorImpl#invoke0(NativeMethodAccessorImpl.java:-2)
sun.reflect.NativeMethodAccessorImpl#invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl#invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method#invoke(Method.java:597)
org.apache.wicket.RequestListenerInterface#internalInvoke(RequestListenerInterface.java:258)
org.apache.wicket.RequestListenerInterface#invoke(RequestListenerInterface.java:216)
org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler#invokeListener(ListenerInterfaceRequestHandler.java:240)
org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler#respond(ListenerInterfaceRequestHandler.java:226)
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor#respond(RequestCycle.java:861)
org.apache.wicket.request.RequestHandlerStack#execute(RequestHandlerStack.java:64)
org.apache.wicket.request.cycle.RequestCycle#execute(RequestCycle.java:261)
org.apache.wicket.request.cycle.RequestCycle#processRequest(RequestCycle.java:218)
org.apache.wicket.request.cycle.RequestCycle#processRequestAndDetach(RequestCycle.java:289)
org.apache.wicket.protocol.http.WicketFilter#processRequestCycle(WicketFilter.java:259)
org.apache.wicket.protocol.http.WicketFilter#processRequest(WicketFilter.java:201)
org.apache.wicket.protocol.http.WicketFilter#doFilter(WicketFilter.java:282)
org.mortbay.jetty.servlet.ServletHandler$CachedChain#doFilter(ServletHandler.java:1212)
org.apache.shiro.web.servlet.AbstractShiroFilter#executeChain(AbstractShiroFilter.java:449)
org.apache.shiro.web.servlet.AbstractShiroFilter$1#call(AbstractShiroFilter.java:365)
org.apache.shiro.subject.support.SubjectCallable#doCall(SubjectCallable.java:90)
org.apache.shiro.subject.support.SubjectCallable#call(SubjectCallable.java:83)
org.apache.shiro.subject.support.DelegatingSubject#execute(DelegatingSubject.java:383)
org.apache.shiro.web.servlet.AbstractShiroFilter#doFilterInternal(AbstractShiroFilter.java:362)
org.apache.shiro.web.servlet.OncePerRequestFilter#doFilter(OncePerRequestFilter.java:125)
org.mortbay.jetty.servlet.ServletHandler$CachedChain#doFilter(ServletHandler.java:1212)
org.mortbay.jetty.servlet.ServletHandler#handle(ServletHandler.java:399)
org.mortbay.jetty.security.SecurityHandler#handle(SecurityHandler.java:216)
org.mortbay.jetty.servlet.SessionHandler#handle(SessionHandler.java:182)
org.mortbay.jetty.handler.ContextHandler#__handle(ContextHandler.java:766)
org.mortbay.jetty.handler.ContextHandler#handle(ContextHandler.java:-1)
org.mortbay.jetty.webapp.WebAppContext#handle(WebAppContext.java:450)
org.mortbay.jetty.handler.HandlerWrapper#handle(HandlerWrapper.java:152)
org.mortbay.jetty.Server#handle(Server.java:326)
org.mortbay.jetty.HttpConnection#handleRequest(HttpConnection.java:542)
org.mortbay.jetty.HttpConnection$RequestHandler#content(HttpConnection.java:945)
org.mortbay.jetty.HttpParser#parseNext(HttpParser.java:756)
org.mortbay.jetty.HttpParser#parseAvailable(HttpParser.java:218)
org.mortbay.jetty.HttpConnection#handle(HttpConnection.java:404)
org.mortbay.jetty.bio.SocketConnector$Connection#run(SocketConnector.java:228)
org.mortbay.thread.QueuedThreadPool$PoolThread#run(QueuedThreadPool.java:582)


[1] https://github.com/danhaywood/isis-jrebel-plugin.git

Re: JRebel support

Posted by GESCONSULTOR - Óscar Bou <o....@gesconsultor.com>.
Hi, Dan.



> OK, I noticed this issue today as well, while demo'ing something to Jeroen.
> Not sure why this didn't show up for me before, but I've just committed
> and pushed a change which hopefully fixes.
> 
> Let me know how you get on...

I've recompiled Isis and now I can add actions, modify their signature, and runs perfectly !!! 


El 04/02/2014, a las 01:00, GESCONSULTOR - Óscar Bou <o....@gesconsultor.com> escribió:

>> ~~~
>> Whatever, there's definitely something broken with the DN enhancer plugin.
>> But I don't think there's any ticket open on the DataNucleus JIRA for Andy
>> to look into.  My suspicion is that he would want a clearly defined
>> reproducable issue, which I don't know that we have at the moment.
>> 
>> Another avenue might be to see if Andy would provide an in-memory API so
>> that the enhancement can be performed within the JRebel plugin itself.
>> That would then let us eliminate the DN plugin completely.
> 
> 
> I don't have neither a clear case, and sure it's something broken ... Working a bit at least on an Isis project (like Estatio) I'm sure he can find a case...
> 
> The abstract class is in one module, and concrete classes on another. I also suspect that having more than 1 domain module can raise to a higher number of enhancement problems, but since now we could handle them.
> 
> The in-memory API would be perfect, as it would also allow to implement the same solution also on the BDD SystemInitializer (or some other BDD component). 
> 
> That's the main point where we are suffering those DN Enhancer problems. 
> 
> 
> A new programmer joined the team 2 weeks ago. It became productive nearly immediatly, simply writing BDD tests and the entities and actions derived from that. He had no need to see the web UI and I was confident that all was ok. That's Isis :-))
> 
> But the biggest disappointment is the DN Enhancer failures...
> 
> 
>> No, that's fine... and I'm glad that's working for you.
>> 
>> For Isis 2.0 (which I'm starting to think about), was mulling over the idea
>> that this every pojo would always be enhanced in a similar way, so that it
>> can provide access to its Oid and ObjectAdapter, such that it is
>> "self-describing".  Will probably use javassist rather than cglib, though
>> (as I'm using for the new @RequestScoped services).
> 
> 
> Seems interesting... But perhaps "always enhanced" entities would be "harder" to debug? I suspect it can conflict with some common technologies, but not sure...
> For me, using the wrapper is "just enough". 
> 
> 
>>> Or simply due to some misspelling... Because see
>>> that eventOccurrence.class name is misspelled. On the filesystem the first
>>> character is in uppercase: EventOccurrence.class
>>> 
>>> 
>> ...Yes, I think that's more likely.  If you are on Windows, then (because
>> it is case preserving but case insensitive), it'll mask this error.  At any
>> rate, you should fix it.
> 
> 
> But the point is that I'm in Mac, other mates on Windows, and the file is properly spelled (in uppercase). Seems that it's  JRebel or the plugin what is misspelling the class filename? But that's only when initializing... After that phase, all seems to work ok. The misspelling exception was shown for all classes imported by that Drools rules file that was created on the Service initialization. 
> 
>> OK, I noticed this issue today as well, while demo'ing something to Jeroen.
>> Not sure why this didn't show up for me before, but I've just committed
>> and pushed a change which hopefully fixes.
>> 
>> Let me know how you get on...
> 
> I'll recompile and try it again.
> 
> 
>> 
>> PS: one other thing to raise: JRebel seems to be quite slow in loading
>> classes.  But - even though I have rebel.xml set up to just reload the
>> domain classes - it seems to monitor everything (ie all of the Isis classes
>> too), which probably explains the slowness.   The JRebel docs [1] suggest
>> that it is possible to filter using an <include> tag, but it doesn't seem
>> to work for me.  Interesting in knowing how you get on with it.
>> 
>> [1] http://manuals.zeroturnaround.com/jrebel/standalone/config.html#include
> 
> 
> I also noticed that class reloading was also slow... Thanks for the link. I'll play with those options. 
> 
> 
> Thanks again,
> 
> Oscar
> 
> 
> 
> 
> El 04/02/2014, a las 00:17, Dan Haywood <da...@haywood-associates.co.uk> escribió:
> 
>> On 3 February 2014 17:03, GESCONSULTOR - Óscar Bou
>> <o....@gesconsultor.com>wrote:
>> 
>>> 
>>> 
>>> 
>>> We find DN enhancer problems quite a lot (nearly on each BDD execution):
>>> - This one regarding abstract classes.
>>> - Another quite common regarding duplicated fields (jdoXXX fields).
>>> 
>> 
>> 
>>> Both of them are solved by slightly changing the class and forcing Eclipse
>>> to recompile and the DN enhancer to run. So it's an old friend. Be sure I'm
>>> not trying to manually instantiate it.
>>> 
>>> 
>> OK... Jeroen and I see the second, must admit haven't seen the first.
>> 
>> 
>> 
>>> 
>> 
>> 
>>> I've run the enhancer again before executing the webapp and on this last
>>> execution finally seems solved (we have 4-5 "dom" modules, similar to
>>> "estatio-dom" and "estatio-dom-italy", but for different Bounded Contexts,
>>> that must be enhanced "in order" - taking into account dependencies between
>>> them -).
>>> 
>>> 
>> That sounds like quite a hassle.
>> 
>> I wonder if the first issue arises because of these multiple modules ... is
>> the abstract class in one of them, and the concrete class in the other?
>> 
>> Also, I have a theory that the duplicate field error is because the Eclipse
>> DN plugin spawns off the DN enhancer multiple times (each in a separate
>> Java process), and they (incorrectly) end up enhancing all the domain
>> classes on their classpath, not just the code in their module.
>> 
>> Would it be worth (temporarily) merging these modules into a single module,
>> and seeing if that reduces/eliminates the number of errors?
>> 
>> ~~~
>> Whatever, there's definitely something broken with the DN enhancer plugin.
>> But I don't think there's any ticket open on the DataNucleus JIRA for Andy
>> to look into.  My suspicion is that he would want a clearly defined
>> reproducable issue, which I don't know that we have at the moment.
>> 
>> Another avenue might be to see if Andy would provide an in-memory API so
>> that the enhancement can be performed within the JRebel plugin itself.
>> That would then let us eliminate the DN plugin completely.
>> 
>> 
>> 
>>> 
>>> Regarding:
>>> 
>>> 6. Those "ValuationDimension$$EnhancerByCGLIB$$258191d0" classes are
>>> coming from the WrapperFactory, which is probably from integration tests?
>>> Not quite sure what the interaction is there, shouldn't matter, I think,
>>> but a bit odd.
>>> 
>>> 
>>> 
>>> We "abuse" the original intention of the WrapperFactory.
>>> We've nearly standarized that, when an action is invoked from another
>>> action in the domain, it will always be "wrapped".
>>> That way, we can apply the same business logic restrictions applied to
>>> users to the interactions between Domain Entities at the Domain Level.
>>> When that's not possible (mainly due to always-hidden or always-disabled
>>> properties, and they have a modifyXXX method) we directly call the
>>> modifyXXX or simply remove the "wrap" and make a comment justifying it.
>>> 
>>> We've found it really useful for detecting nulls passed as parameters, or
>>> values that didn't comply with the "autoComplete" or "choices"
>>> restrictions, on BDD tests.
>>> 
>>> I know it was not originally intented for that, but is  that "conceptually
>>> wrong"?
>>> 
>>> 
>> No, that's fine... and I'm glad that's working for you.
>> 
>> For Isis 2.0 (which I'm starting to think about), was mulling over the idea
>> that this every pojo would always be enhanced in a similar way, so that it
>> can provide access to its Oid and ObjectAdapter, such that it is
>> "self-describing".  Will probably use javassist rather than cglib, though
>> (as I'm using for the new @RequestScoped services).
>> 
>> 
>> 
>> 
>>> ----
>>> 
>>> I've just seen that there are some exceptions when initializing the webapp.
>>> 
>>> Seems they are happening because when initializing a Domain Service, those
>>> classes are loaded and, perhaps, the "environment" has not been yet
>>> properly initialized by JRebel. Is it possible?
>>> 
>>> 
>> Don't think so...
>> 
>> 
>> 
>>> Or simply due to some misspelling... Because see
>>> that eventOccurrence.class name is misspelled. On the filesystem the first
>>> character is in uppercase: EventOccurrence.class
>>> 
>>> 
>> ...Yes, I think that's more likely.  If you are on Windows, then (because
>> it is case preserving but case insensitive), it'll mask this error.  At any
>> rate, you should fix it.
>> 
>> 
>> 
>> 
>>> 
>>> at org.apache.isis.core.webserver.WebServer.run(WebServer.java:92)
>>> at org.apache.isis.core.webserver.WebServer.main(WebServer.java:68)
>>> at org.apache.isis.WebServer.main(WebServer.java:25)
>>> java.lang.RuntimeException: cannot find
>>> com.xms.framework.risk.domain.model.materialization.eventOccurrence:
>>> com.xms.framework.risk.domain.model.materialization.EventOccurrence found
>>> in com/xms/framework/risk/domain/model/materialization/eventOccurrence.class
>>> at
>>> org.zeroturnaround.bundled.javassist.CtClassType.getClassFile2(JRebel:194)
>>> at
>>> org.zeroturnaround.bundled.javassist.CtClassType.getAnnotations(JRebel:541)
>>> at
>>> org.zeroturnaround.bundled.javassist.CtClassType.getAnnotations(JRebel:526)
>>> at
>>> com.danhaywood.isis.tool.jrebelplugin.IsisJRebelPlugin.isPersistenceCapable(
>>> IsisJRebelPlugin.java:362)
>>> at com.danhaywood.isis.tool.jrebelplugin.IsisJRebelPlugin.access$700(
>>> IsisJRebelPlugin.java:50)
>>> at
>>> com.danhaywood.isis.tool.jrebelplugin.IsisJRebelPlugin$2.processSafely(
>>> IsisJRebelPlugin.java:242)
>>> at com.danhaywood.isis.tool.jrebelplugin.IsisJRebelPlugin$2.process(
>>> IsisJRebelPlugin.java:198)
>>> at com.zeroturnaround.javarebel.xU.a(JRebel:257)
>>> at com.zeroturnaround.javarebel.xU.a(JRebel:246)
>>> at com.zeroturnaround.javarebel.xU.a(JRebel:218)
>>> at
>>> com.zeroturnaround.javarebel.SDKIntegrationImpl.runBytecodeProcessors(JRebel:120)
>>> at com.zeroturnaround.javarebel.xE.transform(JRebel:50)
>>> at java.lang.ClassLoader.defineClass(ClassLoader.java)
>>> at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
>>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(
>>> DelegatingMethodAccessorImpl.java:25)
>>> at java.lang.reflect.Method.invoke(Method.java:597)
>>> at com.zeroturnaround.javarebel.xr.defineRebelClass(JRebel:168)
>>> at com.zeroturnaround.javarebel.Bq.a(JRebel:638)
>>> at com.zeroturnaround.javarebel.xt.a(JRebel:261)
>>> at com.zeroturnaround.javarebel.xb.a(JRebel:174)
>>> at com.zeroturnaround.javarebel.xt.loadReloadableClass(JRebel:319)
>>> at
>>> com.zeroturnaround.javarebel.SDKIntegrationImpl.findReloadableClass(JRebel:85)
>>> at com.zeroturnaround.javarebel.xJ.findReloadableClass(JRebel:16)
>>> at java.net.URLClassLoader.findClass(URLClassLoader.java)
>>> at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>>> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>>> 
>>> -----
>>> 
>>> 
>>> As this is an IT Monitoring  service, it's not needed for debugging with
>>> JRebel. Simply after removing it, I can add a field and the webapp updates
>>> it !
>>> 
>>> After that, I've added a simple action to update the value of the newly
>>> created field. When trying to reload the entity page, the following
>>> exception is thrown:
>>> 
>>> at org.mortbay.jetty.bio.SocketConnector$Connection.run(
>>> SocketConnector.java:228)
>>> at org.mortbay.thread.QueuedThreadPool$PoolThread.run(
>>> QueuedThreadPool.java:582)
>>> Caused by: java.lang.NullPointerException
>>> at org.apache.isis.viewer.wicket.model.mementos.ActionMemento.<init>(
>>> ActionMemento.java:53)
>>> at org.apache.isis.viewer.wicket.model.mementos.ActionMemento.<init>(
>>> ActionMemento.java:45)
>>> at
>>> org.apache.isis.viewer.wicket.model.mementos.ObjectAdapterMemento$Functions$4.apply(
>>> ObjectAdapterMemento.java:396)
>>> 
>> 
>> 
>> OK, I noticed this issue today as well, while demo'ing something to Jeroen.
>> Not sure why this didn't show up for me before, but I've just committed
>> and pushed a change which hopefully fixes.
>> 
>> Let me know how you get on...
>> 
>> Dan
>> 
>> 
>> PS: one other thing to raise: JRebel seems to be quite slow in loading
>> classes.  But - even though I have rebel.xml set up to just reload the
>> domain classes - it seems to monitor everything (ie all of the Isis classes
>> too), which probably explains the slowness.   The JRebel docs [1] suggest
>> that it is possible to filter using an <include> tag, but it doesn't seem
>> to work for me.  Interesting in knowing how you get on with it.
>> 
>> [1] http://manuals.zeroturnaround.com/jrebel/standalone/config.html#include
> 
> 
> Óscar Bou Bou
> Responsable de Producto
> Auditor Jefe de Certificación ISO 27001 en BSI
> CISA, CRISC, APMG ISO 20000, ITIL-F
> 
> <contactenos.html.gif>   902 900 231 / 620 267 520
> <Pasted Graphic 1.tiff>   http://www.twitter.com/oscarbou
> 
> <gesdatos-software.gif>   http://es.linkedin.com/in/oscarbou
> 
> <blog.png>   http://www.GesConsultor.com 
> 
> <gesconsultor_logo_blue_email.png>
> 
> 
> Este mensaje y los ficheros anexos son confidenciales. Los mismos contienen información reservada que no puede ser difundida. Si usted ha recibido este correo por error, tenga la amabilidad de eliminarlo de su sistema y avisar al remitente mediante reenvío a su dirección electrónica; no deberá copiar el mensaje ni divulgar su contenido a ninguna persona.
> Su dirección de correo electrónico junto a sus datos personales constan en un fichero titularidad de Gesdatos Software, S.L. cuya finalidad es la de mantener el contacto con Ud. Si quiere saber de qué información disponemos de Ud., modificarla, y en su caso, cancelarla, puede hacerlo enviando un escrito al efecto, acompañado de una fotocopia de su D.N.I. a la siguiente dirección: Gesdatos Software, S.L. , Paseo de la Castellana, 153 bajo - 28046 (Madrid), y Avda. Cortes Valencianas num. 50, 1ºC - 46015 (Valencia). Asimismo, es su responsabilidad comprobar que este mensaje o sus archivos adjuntos no contengan virus informáticos, y en caso que los tuvieran eliminarlos.
> 
> 
> 
> 
> 






Re: JRebel support

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
On 5 February 2014 06:52, GESCONSULTOR - Óscar Bou
<o....@gesconsultor.com>wrote:

> Regarding this:
>
>
> >>
> >> PS: one other thing to raise: JRebel seems to be quite slow in loading
> >> classes.  But - even though I have rebel.xml set up to just reload the
> >> domain classes - it seems to monitor everything (ie all of the Isis
> classes
> >> too), which probably explains the slowness.   The JRebel docs [1]
> suggest
> >> that it is possible to filter using an <include> tag, but it doesn't
> seem
> >> to work for me.  Interesting in knowing how you get on with it.
> >>
> >> [1]
> http://manuals.zeroturnaround.com/jrebel/standalone/config.html#include
> >
>
>
> I've noticed that just changing one file, forces JRebel to reload all (or
> near all) classes on the "domain" Module.
> Does it happen the same to you?
>

Yeah... in fact, I've found that JRebel seems to monitor everything in my
workspace.  Given I have all of Isis source code in it, that's quite a lot
of monitoring it's doing.

Actually, for me, that's quite convenient when I'm changing framework code,
but it doesn't seem that the <include> tag is working.


> If so, I suspect it can be related also to DN Enhancer, as changing one
> file seems to force the DN Enhancer plugin to enhance all classes in that
> project, not just the changed one. As it originates changes on .class files
> in /target-ide, JRebel reloads all them.
>
>
Even if the DN enhancer changes all the domain classes, that's still only a
small number compared to what I think JRebel is monitoring.  But you might
well be right that the DN enhancer does more work than it should, as well.




> And, as JRebel seems not to be "specially fast" on that, all that
> combination originates a slow reload of 20 (or more) classes in my case.
>
> As per above, I think it's monitoring lots and lots of classes.  There is
some JRebel logging that can be enabled, might be worth looking at that
more closely.




> If that would be the case, we could also ask for the DN Enhancer plugin to
> only enhance those classes that have changed.
>
> In my IsisJRebelPlugin, I have the packagePrefix property which is used to
restrict the classes I process.  so if we can get an in-memory enhancement
API, then we could deal with it there.

Cheers
Dan



> Thanks,
>
> Oscar
>
>
>
>
>
>
>
> --------
>
> Hi, Dan.
>
>
>
> > OK, I noticed this issue today as well, while demo'ing something to
> Jeroen.
> > Not sure why this didn't show up for me before, but I've just committed
> > and pushed a change which hopefully fixes.
> >
> > Let me know how you get on...
>
> I've recompiled Isis and now I can add actions, modify their signature,
> and runs perfectly !!!
>
>
> El 04/02/2014, a las 01:00, GESCONSULTOR - Óscar Bou <
> o.bou@gesconsultor.com> escribió:
>
> >> ~~~
> >> Whatever, there's definitely something broken with the DN enhancer
> plugin.
> >> But I don't think there's any ticket open on the DataNucleus JIRA for
> Andy
> >> to look into.  My suspicion is that he would want a clearly defined
> >> reproducable issue, which I don't know that we have at the moment.
> >>
> >> Another avenue might be to see if Andy would provide an in-memory API so
> >> that the enhancement can be performed within the JRebel plugin itself.
> >> That would then let us eliminate the DN plugin completely.
> >
> >
> > I don't have neither a clear case, and sure it's something broken ...
> Working a bit at least on an Isis project (like Estatio) I'm sure he can
> find a case...
> >
> > The abstract class is in one module, and concrete classes on another. I
> also suspect that having more than 1 domain module can raise to a higher
> number of enhancement problems, but since now we could handle them.
> >
> > The in-memory API would be perfect, as it would also allow to implement
> the same solution also on the BDD SystemInitializer (or some other BDD
> component).
> >
> > That's the main point where we are suffering those DN Enhancer problems.
> >
> >
> > A new programmer joined the team 2 weeks ago. It became productive
> nearly immediatly, simply writing BDD tests and the entities and actions
> derived from that. He had no need to see the web UI and I was confident
> that all was ok. That's Isis :-))
> >
> > But the biggest disappointment is the DN Enhancer failures...
> >
> >
> >> No, that's fine... and I'm glad that's working for you.
> >>
> >> For Isis 2.0 (which I'm starting to think about), was mulling over the
> idea
> >> that this every pojo would always be enhanced in a similar way, so that
> it
> >> can provide access to its Oid and ObjectAdapter, such that it is
> >> "self-describing".  Will probably use javassist rather than cglib,
> though
> >> (as I'm using for the new @RequestScoped services).
> >
> >
> > Seems interesting... But perhaps "always enhanced" entities would be
> "harder" to debug? I suspect it can conflict with some common technologies,
> but not sure...
> > For me, using the wrapper is "just enough".
> >
> >
> >>> Or simply due to some misspelling... Because see
> >>> that eventOccurrence.class name is misspelled. On the filesystem the
> first
> >>> character is in uppercase: EventOccurrence.class
> >>>
> >>>
> >> ...Yes, I think that's more likely.  If you are on Windows, then
> (because
> >> it is case preserving but case insensitive), it'll mask this error.  At
> any
> >> rate, you should fix it.
> >
> >
> > But the point is that I'm in Mac, other mates on Windows, and the file
> is properly spelled (in uppercase). Seems that it's  JRebel or the plugin
> what is misspelling the class filename? But that's only when
> initializing... After that phase, all seems to work ok. The misspelling
> exception was shown for all classes imported by that Drools rules file that
> was created on the Service initialization.
> >
> >> OK, I noticed this issue today as well, while demo'ing something to
> Jeroen.
> >> Not sure why this didn't show up for me before, but I've just committed
> >> and pushed a change which hopefully fixes.
> >>
> >> Let me know how you get on...
> >
> > I'll recompile and try it again.
> >
> >
> >>
> >> PS: one other thing to raise: JRebel seems to be quite slow in loading
> >> classes.  But - even though I have rebel.xml set up to just reload the
> >> domain classes - it seems to monitor everything (ie all of the Isis
> classes
> >> too), which probably explains the slowness.   The JRebel docs [1]
> suggest
> >> that it is possible to filter using an <include> tag, but it doesn't
> seem
> >> to work for me.  Interesting in knowing how you get on with it.
> >>
> >> [1]
> http://manuals.zeroturnaround.com/jrebel/standalone/config.html#include
> >
> >
> > I also noticed that class reloading was also slow... Thanks for the
> link. I'll play with those options.
> >
> >
> > Thanks again,
> >
> > Oscar
> >
> >
> >
> >
> > El 04/02/2014, a las 00:17, Dan Haywood <da...@haywood-associates.co.uk>
> escribió:
> >
> >> On 3 February 2014 17:03, GESCONSULTOR - Óscar Bou
> >> <o....@gesconsultor.com>wrote:
> >>
> >>>
> >>>
> >>>
> >>> We find DN enhancer problems quite a lot (nearly on each BDD
> execution):
> >>> - This one regarding abstract classes.
> >>> - Another quite common regarding duplicated fields (jdoXXX fields).
> >>>
> >>
> >>
> >>> Both of them are solved by slightly changing the class and forcing
> Eclipse
> >>> to recompile and the DN enhancer to run. So it's an old friend. Be
> sure I'm
> >>> not trying to manually instantiate it.
> >>>
> >>>
> >> OK... Jeroen and I see the second, must admit haven't seen the first.
> >>
> >>
> >>
> >>>
> >>
> >>
> >>> I've run the enhancer again before executing the webapp and on this
> last
> >>> execution finally seems solved (we have 4-5 "dom" modules, similar to
> >>> "estatio-dom" and "estatio-dom-italy", but for different Bounded
> Contexts,
> >>> that must be enhanced "in order" - taking into account dependencies
> between
> >>> them -).
> >>>
> >>>
> >> That sounds like quite a hassle.
> >>
> >> I wonder if the first issue arises because of these multiple modules
> ... is
> >> the abstract class in one of them, and the concrete class in the other?
> >>
> >> Also, I have a theory that the duplicate field error is because the
> Eclipse
> >> DN plugin spawns off the DN enhancer multiple times (each in a separate
> >> Java process), and they (incorrectly) end up enhancing all the domain
> >> classes on their classpath, not just the code in their module.
> >>
> >> Would it be worth (temporarily) merging these modules into a single
> module,
> >> and seeing if that reduces/eliminates the number of errors?
> >>
> >> ~~~
> >> Whatever, there's definitely something broken with the DN enhancer
> plugin.
> >> But I don't think there's any ticket open on the DataNucleus JIRA for
> Andy
> >> to look into.  My suspicion is that he would want a clearly defined
> >> reproducable issue, which I don't know that we have at the moment.
> >>
> >> Another avenue might be to see if Andy would provide an in-memory API so
> >> that the enhancement can be performed within the JRebel plugin itself.
> >> That would then let us eliminate the DN plugin completely.
> >>
> >>
> >>
> >>>
> >>> Regarding:
> >>>
> >>> 6. Those "ValuationDimension$$EnhancerByCGLIB$$258191d0" classes are
> >>> coming from the WrapperFactory, which is probably from integration
> tests?
> >>> Not quite sure what the interaction is there, shouldn't matter, I
> think,
> >>> but a bit odd.
> >>>
> >>>
> >>>
> >>> We "abuse" the original intention of the WrapperFactory.
> >>> We've nearly standarized that, when an action is invoked from another
> >>> action in the domain, it will always be "wrapped".
> >>> That way, we can apply the same business logic restrictions applied to
> >>> users to the interactions between Domain Entities at the Domain Level.
> >>> When that's not possible (mainly due to always-hidden or
> always-disabled
> >>> properties, and they have a modifyXXX method) we directly call the
> >>> modifyXXX or simply remove the "wrap" and make a comment justifying it.
> >>>
> >>> We've found it really useful for detecting nulls passed as parameters,
> or
> >>> values that didn't comply with the "autoComplete" or "choices"
> >>> restrictions, on BDD tests.
> >>>
> >>> I know it was not originally intented for that, but is  that
> "conceptually
> >>> wrong"?
> >>>
> >>>
> >> No, that's fine... and I'm glad that's working for you.
> >>
> >> For Isis 2.0 (which I'm starting to think about), was mulling over the
> idea
> >> that this every pojo would always be enhanced in a similar way, so that
> it
> >> can provide access to its Oid and ObjectAdapter, such that it is
> >> "self-describing".  Will probably use javassist rather than cglib,
> though
> >> (as I'm using for the new @RequestScoped services).
> >>
> >>
> >>
> >>
> >>> ----
> >>>
> >>> I've just seen that there are some exceptions when initializing the
> webapp.
> >>>
> >>> Seems they are happening because when initializing a Domain Service,
> those
> >>> classes are loaded and, perhaps, the "environment" has not been yet
> >>> properly initialized by JRebel. Is it possible?
> >>>
> >>>
> >> Don't think so...
> >>
> >>
> >>
> >>> Or simply due to some misspelling... Because see
> >>> that eventOccurrence.class name is misspelled. On the filesystem the
> first
> >>> character is in uppercase: EventOccurrence.class
> >>>
> >>>
> >> ...Yes, I think that's more likely.  If you are on Windows, then
> (because
> >> it is case preserving but case insensitive), it'll mask this error.  At
> any
> >> rate, you should fix it.
> >>
> >>
> >>
> >>
> >>>
> >>> at org.apache.isis.core.webserver.WebServer.run(WebServer.java:92)
> >>> at org.apache.isis.core.webserver.WebServer.main(WebServer.java:68)
> >>> at org.apache.isis.WebServer.main(WebServer.java:25)
> >>> java.lang.RuntimeException: cannot find
> >>> com.xms.framework.risk.domain.model.materialization.eventOccurrence:
> >>> com.xms.framework.risk.domain.model.materialization.EventOccurrence
> found
> >>> in
> com/xms/framework/risk/domain/model/materialization/eventOccurrence.class
> >>> at
> >>>
> org.zeroturnaround.bundled.javassist.CtClassType.getClassFile2(JRebel:194)
> >>> at
> >>>
> org.zeroturnaround.bundled.javassist.CtClassType.getAnnotations(JRebel:541)
> >>> at
> >>>
> org.zeroturnaround.bundled.javassist.CtClassType.getAnnotations(JRebel:526)
> >>> at
> >>>
> com.danhaywood.isis.tool.jrebelplugin.IsisJRebelPlugin.isPersistenceCapable(
> >>> IsisJRebelPlugin.java:362)
> >>> at com.danhaywood.isis.tool.jrebelplugin.IsisJRebelPlugin.access$700(
> >>> IsisJRebelPlugin.java:50)
> >>> at
> >>> com.danhaywood.isis.tool.jrebelplugin.IsisJRebelPlugin$2.processSafely(
> >>> IsisJRebelPlugin.java:242)
> >>> at com.danhaywood.isis.tool.jrebelplugin.IsisJRebelPlugin$2.process(
> >>> IsisJRebelPlugin.java:198)
> >>> at com.zeroturnaround.javarebel.xU.a(JRebel:257)
> >>> at com.zeroturnaround.javarebel.xU.a(JRebel:246)
> >>> at com.zeroturnaround.javarebel.xU.a(JRebel:218)
> >>> at
> >>>
> com.zeroturnaround.javarebel.SDKIntegrationImpl.runBytecodeProcessors(JRebel:120)
> >>> at com.zeroturnaround.javarebel.xE.transform(JRebel:50)
> >>> at java.lang.ClassLoader.defineClass(ClassLoader.java)
> >>> at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
> >>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> >>> DelegatingMethodAccessorImpl.java:25)
> >>> at java.lang.reflect.Method.invoke(Method.java:597)
> >>> at com.zeroturnaround.javarebel.xr.defineRebelClass(JRebel:168)
> >>> at com.zeroturnaround.javarebel.Bq.a(JRebel:638)
> >>> at com.zeroturnaround.javarebel.xt.a(JRebel:261)
> >>> at com.zeroturnaround.javarebel.xb.a(JRebel:174)
> >>> at com.zeroturnaround.javarebel.xt.loadReloadableClass(JRebel:319)
> >>> at
> >>>
> com.zeroturnaround.javarebel.SDKIntegrationImpl.findReloadableClass(JRebel:85)
> >>> at com.zeroturnaround.javarebel.xJ.findReloadableClass(JRebel:16)
> >>> at java.net.URLClassLoader.findClass(URLClassLoader.java)
> >>> at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
> >>> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
> >>>
> >>> -----
> >>>
> >>>
> >>> As this is an IT Monitoring  service, it's not needed for debugging
> with
> >>> JRebel. Simply after removing it, I can add a field and the webapp
> updates
> >>> it !
> >>>
> >>> After that, I've added a simple action to update the value of the newly
> >>> created field. When trying to reload the entity page, the following
> >>> exception is thrown:
> >>>
> >>> at org.mortbay.jetty.bio.SocketConnector$Connection.run(
> >>> SocketConnector.java:228)
> >>> at org.mortbay.thread.QueuedThreadPool$PoolThread.run(
> >>> QueuedThreadPool.java:582)
> >>> Caused by: java.lang.NullPointerException
> >>> at org.apache.isis.viewer.wicket.model.mementos.ActionMemento.<init>(
> >>> ActionMemento.java:53)
> >>> at org.apache.isis.viewer.wicket.model.mementos.ActionMemento.<init>(
> >>> ActionMemento.java:45)
> >>> at
> >>>
> org.apache.isis.viewer.wicket.model.mementos.ObjectAdapterMemento$Functions$4.apply(
> >>> ObjectAdapterMemento.java:396)
> >>>
> >>
> >>
> >> OK, I noticed this issue today as well, while demo'ing something to
> Jeroen.
> >> Not sure why this didn't show up for me before, but I've just committed
> >> and pushed a change which hopefully fixes.
> >>
> >> Let me know how you get on...
> >>
> >> Dan
> >>
> >>
> >> PS: one other thing to raise: JRebel seems to be quite slow in loading
> >> classes.  But - even though I have rebel.xml set up to just reload the
> >> domain classes - it seems to monitor everything (ie all of the Isis
> classes
> >> too), which probably explains the slowness.   The JRebel docs [1]
> suggest
> >> that it is possible to filter using an <include> tag, but it doesn't
> seem
> >> to work for me.  Interesting in knowing how you get on with it.
> >>
> >> [1]
> http://manuals.zeroturnaround.com/jrebel/standalone/config.html#include
> >
> >
> > Óscar Bou Bou
> > Responsable de Producto
> > Auditor Jefe de Certificación ISO 27001 en BSI
> > CISA, CRISC, APMG ISO 20000, ITIL-F
> >
> > <contactenos.html.gif>   902 900 231 / 620 267 520
> > <Pasted Graphic 1.tiff>   http://www.twitter.com/oscarbou
> >
> > <gesdatos-software.gif>   http://es.linkedin.com/in/oscarbou
> >
> > <blog.png>   http://www.GesConsultor.com
> >
> > <gesconsultor_logo_blue_email.png>
> >
> >
> > Este mensaje y los ficheros anexos son confidenciales. Los mismos
> contienen información reservada que no puede ser difundida. Si usted ha
> recibido este correo por error, tenga la amabilidad de eliminarlo de su
> sistema y avisar al remitente mediante reenvío a su dirección electrónica;
> no deberá copiar el mensaje ni divulgar su contenido a ninguna persona.
> > Su dirección de correo electrónico junto a sus datos personales constan
> en un fichero titularidad de Gesdatos Software, S.L. cuya finalidad es la
> de mantener el contacto con Ud. Si quiere saber de qué información
> disponemos de Ud., modificarla, y en su caso, cancelarla, puede hacerlo
> enviando un escrito al efecto, acompañado de una fotocopia de su D.N.I. a
> la siguiente dirección: Gesdatos Software, S.L. , Paseo de la Castellana,
> 153 bajo - 28046 (Madrid), y Avda. Cortes Valencianas num. 50, 1ºC - 46015
> (Valencia). Asimismo, es su responsabilidad comprobar que este mensaje o
> sus archivos adjuntos no contengan virus informáticos, y en caso que los
> tuvieran eliminarlos.
> >
> >
> >
> >
> >
>
>
>
>
>
>

Re: JRebel support

Posted by GESCONSULTOR - Óscar Bou <o....@gesconsultor.com>.
Regarding this:


>> 
>> PS: one other thing to raise: JRebel seems to be quite slow in loading
>> classes.  But - even though I have rebel.xml set up to just reload the
>> domain classes - it seems to monitor everything (ie all of the Isis classes
>> too), which probably explains the slowness.   The JRebel docs [1] suggest
>> that it is possible to filter using an <include> tag, but it doesn't seem
>> to work for me.  Interesting in knowing how you get on with it.
>> 
>> [1] http://manuals.zeroturnaround.com/jrebel/standalone/config.html#include
> 


I've noticed that just changing one file, forces JRebel to reload all (or near all) classes on the "domain" Module.
Does it happen the same to you?

If so, I suspect it can be related also to DN Enhancer, as changing one file seems to force the DN Enhancer plugin to enhance all classes in that project, not just the changed one. As it originates changes on .class files in /target-ide, JRebel reloads all them.

And, as JRebel seems not to be "specially fast" on that, all that combination originates a slow reload of 20 (or more) classes in my case.

If that would be the case, we could also ask for the DN Enhancer plugin to only enhance those classes that have changed.

Thanks,

Oscar







--------

Hi, Dan.



> OK, I noticed this issue today as well, while demo'ing something to Jeroen.
> Not sure why this didn't show up for me before, but I've just committed
> and pushed a change which hopefully fixes.
> 
> Let me know how you get on...

I've recompiled Isis and now I can add actions, modify their signature, and runs perfectly !!! 


El 04/02/2014, a las 01:00, GESCONSULTOR - Óscar Bou <o....@gesconsultor.com> escribió:

>> ~~~
>> Whatever, there's definitely something broken with the DN enhancer plugin.
>> But I don't think there's any ticket open on the DataNucleus JIRA for Andy
>> to look into.  My suspicion is that he would want a clearly defined
>> reproducable issue, which I don't know that we have at the moment.
>> 
>> Another avenue might be to see if Andy would provide an in-memory API so
>> that the enhancement can be performed within the JRebel plugin itself.
>> That would then let us eliminate the DN plugin completely.
> 
> 
> I don't have neither a clear case, and sure it's something broken ... Working a bit at least on an Isis project (like Estatio) I'm sure he can find a case...
> 
> The abstract class is in one module, and concrete classes on another. I also suspect that having more than 1 domain module can raise to a higher number of enhancement problems, but since now we could handle them.
> 
> The in-memory API would be perfect, as it would also allow to implement the same solution also on the BDD SystemInitializer (or some other BDD component). 
> 
> That's the main point where we are suffering those DN Enhancer problems. 
> 
> 
> A new programmer joined the team 2 weeks ago. It became productive nearly immediatly, simply writing BDD tests and the entities and actions derived from that. He had no need to see the web UI and I was confident that all was ok. That's Isis :-))
> 
> But the biggest disappointment is the DN Enhancer failures...
> 
> 
>> No, that's fine... and I'm glad that's working for you.
>> 
>> For Isis 2.0 (which I'm starting to think about), was mulling over the idea
>> that this every pojo would always be enhanced in a similar way, so that it
>> can provide access to its Oid and ObjectAdapter, such that it is
>> "self-describing".  Will probably use javassist rather than cglib, though
>> (as I'm using for the new @RequestScoped services).
> 
> 
> Seems interesting... But perhaps "always enhanced" entities would be "harder" to debug? I suspect it can conflict with some common technologies, but not sure...
> For me, using the wrapper is "just enough". 
> 
> 
>>> Or simply due to some misspelling... Because see
>>> that eventOccurrence.class name is misspelled. On the filesystem the first
>>> character is in uppercase: EventOccurrence.class
>>> 
>>> 
>> ...Yes, I think that's more likely.  If you are on Windows, then (because
>> it is case preserving but case insensitive), it'll mask this error.  At any
>> rate, you should fix it.
> 
> 
> But the point is that I'm in Mac, other mates on Windows, and the file is properly spelled (in uppercase). Seems that it's  JRebel or the plugin what is misspelling the class filename? But that's only when initializing... After that phase, all seems to work ok. The misspelling exception was shown for all classes imported by that Drools rules file that was created on the Service initialization. 
> 
>> OK, I noticed this issue today as well, while demo'ing something to Jeroen.
>> Not sure why this didn't show up for me before, but I've just committed
>> and pushed a change which hopefully fixes.
>> 
>> Let me know how you get on...
> 
> I'll recompile and try it again.
> 
> 
>> 
>> PS: one other thing to raise: JRebel seems to be quite slow in loading
>> classes.  But - even though I have rebel.xml set up to just reload the
>> domain classes - it seems to monitor everything (ie all of the Isis classes
>> too), which probably explains the slowness.   The JRebel docs [1] suggest
>> that it is possible to filter using an <include> tag, but it doesn't seem
>> to work for me.  Interesting in knowing how you get on with it.
>> 
>> [1] http://manuals.zeroturnaround.com/jrebel/standalone/config.html#include
> 
> 
> I also noticed that class reloading was also slow... Thanks for the link. I'll play with those options. 
> 
> 
> Thanks again,
> 
> Oscar
> 
> 
> 
> 
> El 04/02/2014, a las 00:17, Dan Haywood <da...@haywood-associates.co.uk> escribió:
> 
>> On 3 February 2014 17:03, GESCONSULTOR - Óscar Bou
>> <o....@gesconsultor.com>wrote:
>> 
>>> 
>>> 
>>> 
>>> We find DN enhancer problems quite a lot (nearly on each BDD execution):
>>> - This one regarding abstract classes.
>>> - Another quite common regarding duplicated fields (jdoXXX fields).
>>> 
>> 
>> 
>>> Both of them are solved by slightly changing the class and forcing Eclipse
>>> to recompile and the DN enhancer to run. So it's an old friend. Be sure I'm
>>> not trying to manually instantiate it.
>>> 
>>> 
>> OK... Jeroen and I see the second, must admit haven't seen the first.
>> 
>> 
>> 
>>> 
>> 
>> 
>>> I've run the enhancer again before executing the webapp and on this last
>>> execution finally seems solved (we have 4-5 "dom" modules, similar to
>>> "estatio-dom" and "estatio-dom-italy", but for different Bounded Contexts,
>>> that must be enhanced "in order" - taking into account dependencies between
>>> them -).
>>> 
>>> 
>> That sounds like quite a hassle.
>> 
>> I wonder if the first issue arises because of these multiple modules ... is
>> the abstract class in one of them, and the concrete class in the other?
>> 
>> Also, I have a theory that the duplicate field error is because the Eclipse
>> DN plugin spawns off the DN enhancer multiple times (each in a separate
>> Java process), and they (incorrectly) end up enhancing all the domain
>> classes on their classpath, not just the code in their module.
>> 
>> Would it be worth (temporarily) merging these modules into a single module,
>> and seeing if that reduces/eliminates the number of errors?
>> 
>> ~~~
>> Whatever, there's definitely something broken with the DN enhancer plugin.
>> But I don't think there's any ticket open on the DataNucleus JIRA for Andy
>> to look into.  My suspicion is that he would want a clearly defined
>> reproducable issue, which I don't know that we have at the moment.
>> 
>> Another avenue might be to see if Andy would provide an in-memory API so
>> that the enhancement can be performed within the JRebel plugin itself.
>> That would then let us eliminate the DN plugin completely.
>> 
>> 
>> 
>>> 
>>> Regarding:
>>> 
>>> 6. Those "ValuationDimension$$EnhancerByCGLIB$$258191d0" classes are
>>> coming from the WrapperFactory, which is probably from integration tests?
>>> Not quite sure what the interaction is there, shouldn't matter, I think,
>>> but a bit odd.
>>> 
>>> 
>>> 
>>> We "abuse" the original intention of the WrapperFactory.
>>> We've nearly standarized that, when an action is invoked from another
>>> action in the domain, it will always be "wrapped".
>>> That way, we can apply the same business logic restrictions applied to
>>> users to the interactions between Domain Entities at the Domain Level.
>>> When that's not possible (mainly due to always-hidden or always-disabled
>>> properties, and they have a modifyXXX method) we directly call the
>>> modifyXXX or simply remove the "wrap" and make a comment justifying it.
>>> 
>>> We've found it really useful for detecting nulls passed as parameters, or
>>> values that didn't comply with the "autoComplete" or "choices"
>>> restrictions, on BDD tests.
>>> 
>>> I know it was not originally intented for that, but is  that "conceptually
>>> wrong"?
>>> 
>>> 
>> No, that's fine... and I'm glad that's working for you.
>> 
>> For Isis 2.0 (which I'm starting to think about), was mulling over the idea
>> that this every pojo would always be enhanced in a similar way, so that it
>> can provide access to its Oid and ObjectAdapter, such that it is
>> "self-describing".  Will probably use javassist rather than cglib, though
>> (as I'm using for the new @RequestScoped services).
>> 
>> 
>> 
>> 
>>> ----
>>> 
>>> I've just seen that there are some exceptions when initializing the webapp.
>>> 
>>> Seems they are happening because when initializing a Domain Service, those
>>> classes are loaded and, perhaps, the "environment" has not been yet
>>> properly initialized by JRebel. Is it possible?
>>> 
>>> 
>> Don't think so...
>> 
>> 
>> 
>>> Or simply due to some misspelling... Because see
>>> that eventOccurrence.class name is misspelled. On the filesystem the first
>>> character is in uppercase: EventOccurrence.class
>>> 
>>> 
>> ...Yes, I think that's more likely.  If you are on Windows, then (because
>> it is case preserving but case insensitive), it'll mask this error.  At any
>> rate, you should fix it.
>> 
>> 
>> 
>> 
>>> 
>>> at org.apache.isis.core.webserver.WebServer.run(WebServer.java:92)
>>> at org.apache.isis.core.webserver.WebServer.main(WebServer.java:68)
>>> at org.apache.isis.WebServer.main(WebServer.java:25)
>>> java.lang.RuntimeException: cannot find
>>> com.xms.framework.risk.domain.model.materialization.eventOccurrence:
>>> com.xms.framework.risk.domain.model.materialization.EventOccurrence found
>>> in com/xms/framework/risk/domain/model/materialization/eventOccurrence.class
>>> at
>>> org.zeroturnaround.bundled.javassist.CtClassType.getClassFile2(JRebel:194)
>>> at
>>> org.zeroturnaround.bundled.javassist.CtClassType.getAnnotations(JRebel:541)
>>> at
>>> org.zeroturnaround.bundled.javassist.CtClassType.getAnnotations(JRebel:526)
>>> at
>>> com.danhaywood.isis.tool.jrebelplugin.IsisJRebelPlugin.isPersistenceCapable(
>>> IsisJRebelPlugin.java:362)
>>> at com.danhaywood.isis.tool.jrebelplugin.IsisJRebelPlugin.access$700(
>>> IsisJRebelPlugin.java:50)
>>> at
>>> com.danhaywood.isis.tool.jrebelplugin.IsisJRebelPlugin$2.processSafely(
>>> IsisJRebelPlugin.java:242)
>>> at com.danhaywood.isis.tool.jrebelplugin.IsisJRebelPlugin$2.process(
>>> IsisJRebelPlugin.java:198)
>>> at com.zeroturnaround.javarebel.xU.a(JRebel:257)
>>> at com.zeroturnaround.javarebel.xU.a(JRebel:246)
>>> at com.zeroturnaround.javarebel.xU.a(JRebel:218)
>>> at
>>> com.zeroturnaround.javarebel.SDKIntegrationImpl.runBytecodeProcessors(JRebel:120)
>>> at com.zeroturnaround.javarebel.xE.transform(JRebel:50)
>>> at java.lang.ClassLoader.defineClass(ClassLoader.java)
>>> at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
>>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(
>>> DelegatingMethodAccessorImpl.java:25)
>>> at java.lang.reflect.Method.invoke(Method.java:597)
>>> at com.zeroturnaround.javarebel.xr.defineRebelClass(JRebel:168)
>>> at com.zeroturnaround.javarebel.Bq.a(JRebel:638)
>>> at com.zeroturnaround.javarebel.xt.a(JRebel:261)
>>> at com.zeroturnaround.javarebel.xb.a(JRebel:174)
>>> at com.zeroturnaround.javarebel.xt.loadReloadableClass(JRebel:319)
>>> at
>>> com.zeroturnaround.javarebel.SDKIntegrationImpl.findReloadableClass(JRebel:85)
>>> at com.zeroturnaround.javarebel.xJ.findReloadableClass(JRebel:16)
>>> at java.net.URLClassLoader.findClass(URLClassLoader.java)
>>> at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>>> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>>> 
>>> -----
>>> 
>>> 
>>> As this is an IT Monitoring  service, it's not needed for debugging with
>>> JRebel. Simply after removing it, I can add a field and the webapp updates
>>> it !
>>> 
>>> After that, I've added a simple action to update the value of the newly
>>> created field. When trying to reload the entity page, the following
>>> exception is thrown:
>>> 
>>> at org.mortbay.jetty.bio.SocketConnector$Connection.run(
>>> SocketConnector.java:228)
>>> at org.mortbay.thread.QueuedThreadPool$PoolThread.run(
>>> QueuedThreadPool.java:582)
>>> Caused by: java.lang.NullPointerException
>>> at org.apache.isis.viewer.wicket.model.mementos.ActionMemento.<init>(
>>> ActionMemento.java:53)
>>> at org.apache.isis.viewer.wicket.model.mementos.ActionMemento.<init>(
>>> ActionMemento.java:45)
>>> at
>>> org.apache.isis.viewer.wicket.model.mementos.ObjectAdapterMemento$Functions$4.apply(
>>> ObjectAdapterMemento.java:396)
>>> 
>> 
>> 
>> OK, I noticed this issue today as well, while demo'ing something to Jeroen.
>> Not sure why this didn't show up for me before, but I've just committed
>> and pushed a change which hopefully fixes.
>> 
>> Let me know how you get on...
>> 
>> Dan
>> 
>> 
>> PS: one other thing to raise: JRebel seems to be quite slow in loading
>> classes.  But - even though I have rebel.xml set up to just reload the
>> domain classes - it seems to monitor everything (ie all of the Isis classes
>> too), which probably explains the slowness.   The JRebel docs [1] suggest
>> that it is possible to filter using an <include> tag, but it doesn't seem
>> to work for me.  Interesting in knowing how you get on with it.
>> 
>> [1] http://manuals.zeroturnaround.com/jrebel/standalone/config.html#include
> 
> 
> Óscar Bou Bou
> Responsable de Producto
> Auditor Jefe de Certificación ISO 27001 en BSI
> CISA, CRISC, APMG ISO 20000, ITIL-F
> 
> <contactenos.html.gif>   902 900 231 / 620 267 520
> <Pasted Graphic 1.tiff>   http://www.twitter.com/oscarbou
> 
> <gesdatos-software.gif>   http://es.linkedin.com/in/oscarbou
> 
> <blog.png>   http://www.GesConsultor.com 
> 
> <gesconsultor_logo_blue_email.png>
> 
> 
> Este mensaje y los ficheros anexos son confidenciales. Los mismos contienen información reservada que no puede ser difundida. Si usted ha recibido este correo por error, tenga la amabilidad de eliminarlo de su sistema y avisar al remitente mediante reenvío a su dirección electrónica; no deberá copiar el mensaje ni divulgar su contenido a ninguna persona.
> Su dirección de correo electrónico junto a sus datos personales constan en un fichero titularidad de Gesdatos Software, S.L. cuya finalidad es la de mantener el contacto con Ud. Si quiere saber de qué información disponemos de Ud., modificarla, y en su caso, cancelarla, puede hacerlo enviando un escrito al efecto, acompañado de una fotocopia de su D.N.I. a la siguiente dirección: Gesdatos Software, S.L. , Paseo de la Castellana, 153 bajo - 28046 (Madrid), y Avda. Cortes Valencianas num. 50, 1ºC - 46015 (Valencia). Asimismo, es su responsabilidad comprobar que este mensaje o sus archivos adjuntos no contengan virus informáticos, y en caso que los tuvieran eliminarlos.
> 
> 
> 
> 
> 






Re: JRebel support

Posted by GESCONSULTOR - Óscar Bou <o....@gesconsultor.com>.
> ~~~
> Whatever, there's definitely something broken with the DN enhancer plugin.
> But I don't think there's any ticket open on the DataNucleus JIRA for Andy
> to look into.  My suspicion is that he would want a clearly defined
> reproducable issue, which I don't know that we have at the moment.
> 
> Another avenue might be to see if Andy would provide an in-memory API so
> that the enhancement can be performed within the JRebel plugin itself.
> That would then let us eliminate the DN plugin completely.


I don't have neither a clear case, and sure it's something broken ... Working a bit at least on an Isis project (like Estatio) I'm sure he can find a case...

The abstract class is in one module, and concrete classes on another. I also suspect that having more than 1 domain module can raise to a higher number of enhancement problems, but since now we could handle them.

The in-memory API would be perfect, as it would also allow to implement the same solution also on the BDD SystemInitializer (or some other BDD component). 

That's the main point where we are suffering those DN Enhancer problems. 


A new programmer joined the team 2 weeks ago. It became productive nearly immediatly, simply writing BDD tests and the entities and actions derived from that. He had no need to see the web UI and I was confident that all was ok. That's Isis :-))

But the biggest disappointment is the DN Enhancer failures...


> No, that's fine... and I'm glad that's working for you.
> 
> For Isis 2.0 (which I'm starting to think about), was mulling over the idea
> that this every pojo would always be enhanced in a similar way, so that it
> can provide access to its Oid and ObjectAdapter, such that it is
> "self-describing".  Will probably use javassist rather than cglib, though
> (as I'm using for the new @RequestScoped services).


Seems interesting... But perhaps "always enhanced" entities would be "harder" to debug? I suspect it can conflict with some common technologies, but not sure...
For me, using the wrapper is "just enough". 


>> Or simply due to some misspelling... Because see
>> that eventOccurrence.class name is misspelled. On the filesystem the first
>> character is in uppercase: EventOccurrence.class
>> 
>> 
> ...Yes, I think that's more likely.  If you are on Windows, then (because
> it is case preserving but case insensitive), it'll mask this error.  At any
> rate, you should fix it.


But the point is that I'm in Mac, other mates on Windows, and the file is properly spelled (in uppercase). Seems that it's  JRebel or the plugin what is misspelling the class filename? But that's only when initializing... After that phase, all seems to work ok. The misspelling exception was shown for all classes imported by that Drools rules file that was created on the Service initialization. 

> OK, I noticed this issue today as well, while demo'ing something to Jeroen.
> Not sure why this didn't show up for me before, but I've just committed
> and pushed a change which hopefully fixes.
> 
> Let me know how you get on...

I'll recompile and try it again.


> 
> PS: one other thing to raise: JRebel seems to be quite slow in loading
> classes.  But - even though I have rebel.xml set up to just reload the
> domain classes - it seems to monitor everything (ie all of the Isis classes
> too), which probably explains the slowness.   The JRebel docs [1] suggest
> that it is possible to filter using an <include> tag, but it doesn't seem
> to work for me.  Interesting in knowing how you get on with it.
> 
> [1] http://manuals.zeroturnaround.com/jrebel/standalone/config.html#include


I also noticed that class reloading was also slow... Thanks for the link. I'll play with those options. 


Thanks again,

Oscar




El 04/02/2014, a las 00:17, Dan Haywood <da...@haywood-associates.co.uk> escribió:

> On 3 February 2014 17:03, GESCONSULTOR - Óscar Bou
> <o....@gesconsultor.com>wrote:
> 
>> 
>> 
>> 
>> We find DN enhancer problems quite a lot (nearly on each BDD execution):
>> - This one regarding abstract classes.
>> - Another quite common regarding duplicated fields (jdoXXX fields).
>> 
> 
> 
>> Both of them are solved by slightly changing the class and forcing Eclipse
>> to recompile and the DN enhancer to run. So it's an old friend. Be sure I'm
>> not trying to manually instantiate it.
>> 
>> 
> OK... Jeroen and I see the second, must admit haven't seen the first.
> 
> 
> 
>> 
> 
> 
>> I've run the enhancer again before executing the webapp and on this last
>> execution finally seems solved (we have 4-5 "dom" modules, similar to
>> "estatio-dom" and "estatio-dom-italy", but for different Bounded Contexts,
>> that must be enhanced "in order" - taking into account dependencies between
>> them -).
>> 
>> 
> That sounds like quite a hassle.
> 
> I wonder if the first issue arises because of these multiple modules ... is
> the abstract class in one of them, and the concrete class in the other?
> 
> Also, I have a theory that the duplicate field error is because the Eclipse
> DN plugin spawns off the DN enhancer multiple times (each in a separate
> Java process), and they (incorrectly) end up enhancing all the domain
> classes on their classpath, not just the code in their module.
> 
> Would it be worth (temporarily) merging these modules into a single module,
> and seeing if that reduces/eliminates the number of errors?
> 
> ~~~
> Whatever, there's definitely something broken with the DN enhancer plugin.
> But I don't think there's any ticket open on the DataNucleus JIRA for Andy
> to look into.  My suspicion is that he would want a clearly defined
> reproducable issue, which I don't know that we have at the moment.
> 
> Another avenue might be to see if Andy would provide an in-memory API so
> that the enhancement can be performed within the JRebel plugin itself.
> That would then let us eliminate the DN plugin completely.
> 
> 
> 
>> 
>> Regarding:
>> 
>> 6. Those "ValuationDimension$$EnhancerByCGLIB$$258191d0" classes are
>> coming from the WrapperFactory, which is probably from integration tests?
>> Not quite sure what the interaction is there, shouldn't matter, I think,
>> but a bit odd.
>> 
>> 
>> 
>> We "abuse" the original intention of the WrapperFactory.
>> We've nearly standarized that, when an action is invoked from another
>> action in the domain, it will always be "wrapped".
>> That way, we can apply the same business logic restrictions applied to
>> users to the interactions between Domain Entities at the Domain Level.
>> When that's not possible (mainly due to always-hidden or always-disabled
>> properties, and they have a modifyXXX method) we directly call the
>> modifyXXX or simply remove the "wrap" and make a comment justifying it.
>> 
>> We've found it really useful for detecting nulls passed as parameters, or
>> values that didn't comply with the "autoComplete" or "choices"
>> restrictions, on BDD tests.
>> 
>> I know it was not originally intented for that, but is  that "conceptually
>> wrong"?
>> 
>> 
> No, that's fine... and I'm glad that's working for you.
> 
> For Isis 2.0 (which I'm starting to think about), was mulling over the idea
> that this every pojo would always be enhanced in a similar way, so that it
> can provide access to its Oid and ObjectAdapter, such that it is
> "self-describing".  Will probably use javassist rather than cglib, though
> (as I'm using for the new @RequestScoped services).
> 
> 
> 
> 
>> ----
>> 
>> I've just seen that there are some exceptions when initializing the webapp.
>> 
>> Seems they are happening because when initializing a Domain Service, those
>> classes are loaded and, perhaps, the "environment" has not been yet
>> properly initialized by JRebel. Is it possible?
>> 
>> 
> Don't think so...
> 
> 
> 
>> Or simply due to some misspelling... Because see
>> that eventOccurrence.class name is misspelled. On the filesystem the first
>> character is in uppercase: EventOccurrence.class
>> 
>> 
> ...Yes, I think that's more likely.  If you are on Windows, then (because
> it is case preserving but case insensitive), it'll mask this error.  At any
> rate, you should fix it.
> 
> 
> 
> 
>> 
>> at org.apache.isis.core.webserver.WebServer.run(WebServer.java:92)
>> at org.apache.isis.core.webserver.WebServer.main(WebServer.java:68)
>> at org.apache.isis.WebServer.main(WebServer.java:25)
>> java.lang.RuntimeException: cannot find
>> com.xms.framework.risk.domain.model.materialization.eventOccurrence:
>> com.xms.framework.risk.domain.model.materialization.EventOccurrence found
>> in com/xms/framework/risk/domain/model/materialization/eventOccurrence.class
>> at
>> org.zeroturnaround.bundled.javassist.CtClassType.getClassFile2(JRebel:194)
>> at
>> org.zeroturnaround.bundled.javassist.CtClassType.getAnnotations(JRebel:541)
>> at
>> org.zeroturnaround.bundled.javassist.CtClassType.getAnnotations(JRebel:526)
>> at
>> com.danhaywood.isis.tool.jrebelplugin.IsisJRebelPlugin.isPersistenceCapable(
>> IsisJRebelPlugin.java:362)
>> at com.danhaywood.isis.tool.jrebelplugin.IsisJRebelPlugin.access$700(
>> IsisJRebelPlugin.java:50)
>> at
>> com.danhaywood.isis.tool.jrebelplugin.IsisJRebelPlugin$2.processSafely(
>> IsisJRebelPlugin.java:242)
>> at com.danhaywood.isis.tool.jrebelplugin.IsisJRebelPlugin$2.process(
>> IsisJRebelPlugin.java:198)
>> at com.zeroturnaround.javarebel.xU.a(JRebel:257)
>> at com.zeroturnaround.javarebel.xU.a(JRebel:246)
>> at com.zeroturnaround.javarebel.xU.a(JRebel:218)
>> at
>> com.zeroturnaround.javarebel.SDKIntegrationImpl.runBytecodeProcessors(JRebel:120)
>> at com.zeroturnaround.javarebel.xE.transform(JRebel:50)
>> at java.lang.ClassLoader.defineClass(ClassLoader.java)
>> at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(
>> DelegatingMethodAccessorImpl.java:25)
>> at java.lang.reflect.Method.invoke(Method.java:597)
>> at com.zeroturnaround.javarebel.xr.defineRebelClass(JRebel:168)
>> at com.zeroturnaround.javarebel.Bq.a(JRebel:638)
>> at com.zeroturnaround.javarebel.xt.a(JRebel:261)
>> at com.zeroturnaround.javarebel.xb.a(JRebel:174)
>> at com.zeroturnaround.javarebel.xt.loadReloadableClass(JRebel:319)
>> at
>> com.zeroturnaround.javarebel.SDKIntegrationImpl.findReloadableClass(JRebel:85)
>> at com.zeroturnaround.javarebel.xJ.findReloadableClass(JRebel:16)
>> at java.net.URLClassLoader.findClass(URLClassLoader.java)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>> 
>> -----
>> 
>> 
>> As this is an IT Monitoring  service, it's not needed for debugging with
>> JRebel. Simply after removing it, I can add a field and the webapp updates
>> it !
>> 
>> After that, I've added a simple action to update the value of the newly
>> created field. When trying to reload the entity page, the following
>> exception is thrown:
>> 
>> at org.mortbay.jetty.bio.SocketConnector$Connection.run(
>> SocketConnector.java:228)
>> at org.mortbay.thread.QueuedThreadPool$PoolThread.run(
>> QueuedThreadPool.java:582)
>> Caused by: java.lang.NullPointerException
>> at org.apache.isis.viewer.wicket.model.mementos.ActionMemento.<init>(
>> ActionMemento.java:53)
>> at org.apache.isis.viewer.wicket.model.mementos.ActionMemento.<init>(
>> ActionMemento.java:45)
>> at
>> org.apache.isis.viewer.wicket.model.mementos.ObjectAdapterMemento$Functions$4.apply(
>> ObjectAdapterMemento.java:396)
>> 
> 
> 
> OK, I noticed this issue today as well, while demo'ing something to Jeroen.
> Not sure why this didn't show up for me before, but I've just committed
> and pushed a change which hopefully fixes.
> 
> Let me know how you get on...
> 
> Dan
> 
> 
> PS: one other thing to raise: JRebel seems to be quite slow in loading
> classes.  But - even though I have rebel.xml set up to just reload the
> domain classes - it seems to monitor everything (ie all of the Isis classes
> too), which probably explains the slowness.   The JRebel docs [1] suggest
> that it is possible to filter using an <include> tag, but it doesn't seem
> to work for me.  Interesting in knowing how you get on with it.
> 
> [1] http://manuals.zeroturnaround.com/jrebel/standalone/config.html#include


Óscar Bou Bou
Responsable de Producto
Auditor Jefe de Certificación ISO 27001 en BSI
CISA, CRISC, APMG ISO 20000, ITIL-F

   902 900 231 / 620 267 520
   http://www.twitter.com/oscarbou

   http://es.linkedin.com/in/oscarbou

   http://www.GesConsultor.com 




Este mensaje y los ficheros anexos son confidenciales. Los mismos contienen información reservada que no puede ser difundida. Si usted ha recibido este correo por error, tenga la amabilidad de eliminarlo de su sistema y avisar al remitente mediante reenvío a su dirección electrónica; no deberá copiar el mensaje ni divulgar su contenido a ninguna persona.
Su dirección de correo electrónico junto a sus datos personales constan en un fichero titularidad de Gesdatos Software, S.L. cuya finalidad es la de mantener el contacto con Ud. Si quiere saber de qué información disponemos de Ud., modificarla, y en su caso, cancelarla, puede hacerlo enviando un escrito al efecto, acompañado de una fotocopia de su D.N.I. a la siguiente dirección: Gesdatos Software, S.L. , Paseo de la Castellana, 153 bajo - 28046 (Madrid), y Avda. Cortes Valencianas num. 50, 1ºC - 46015 (Valencia). Asimismo, es su responsabilidad comprobar que este mensaje o sus archivos adjuntos no contengan virus informáticos, y en caso que los tuvieran eliminarlos.






Re: JRebel support

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
On 3 February 2014 17:03, GESCONSULTOR - Óscar Bou
<o....@gesconsultor.com>wrote:

>
>
>
> We find DN enhancer problems quite a lot (nearly on each BDD execution):
> - This one regarding abstract classes.
> - Another quite common regarding duplicated fields (jdoXXX fields).
>


> Both of them are solved by slightly changing the class and forcing Eclipse
> to recompile and the DN enhancer to run. So it's an old friend. Be sure I'm
> not trying to manually instantiate it.
>
>
OK... Jeroen and I see the second, must admit haven't seen the first.



>


> I've run the enhancer again before executing the webapp and on this last
> execution finally seems solved (we have 4-5 "dom" modules, similar to
> "estatio-dom" and "estatio-dom-italy", but for different Bounded Contexts,
> that must be enhanced "in order" - taking into account dependencies between
> them -).
>
>
That sounds like quite a hassle.

I wonder if the first issue arises because of these multiple modules ... is
the abstract class in one of them, and the concrete class in the other?

Also, I have a theory that the duplicate field error is because the Eclipse
DN plugin spawns off the DN enhancer multiple times (each in a separate
Java process), and they (incorrectly) end up enhancing all the domain
classes on their classpath, not just the code in their module.

Would it be worth (temporarily) merging these modules into a single module,
and seeing if that reduces/eliminates the number of errors?

~~~
Whatever, there's definitely something broken with the DN enhancer plugin.
 But I don't think there's any ticket open on the DataNucleus JIRA for Andy
to look into.  My suspicion is that he would want a clearly defined
reproducable issue, which I don't know that we have at the moment.

Another avenue might be to see if Andy would provide an in-memory API so
that the enhancement can be performed within the JRebel plugin itself.
 That would then let us eliminate the DN plugin completely.



>
> Regarding:
>
> 6. Those "ValuationDimension$$EnhancerByCGLIB$$258191d0" classes are
> coming from the WrapperFactory, which is probably from integration tests?
>  Not quite sure what the interaction is there, shouldn't matter, I think,
> but a bit odd.
>
>
>
> We "abuse" the original intention of the WrapperFactory.
> We've nearly standarized that, when an action is invoked from another
> action in the domain, it will always be "wrapped".
> That way, we can apply the same business logic restrictions applied to
> users to the interactions between Domain Entities at the Domain Level.
> When that's not possible (mainly due to always-hidden or always-disabled
> properties, and they have a modifyXXX method) we directly call the
> modifyXXX or simply remove the "wrap" and make a comment justifying it.
>
> We've found it really useful for detecting nulls passed as parameters, or
> values that didn't comply with the "autoComplete" or "choices"
> restrictions, on BDD tests.
>
> I know it was not originally intented for that, but is  that "conceptually
> wrong"?
>
>
No, that's fine... and I'm glad that's working for you.

For Isis 2.0 (which I'm starting to think about), was mulling over the idea
that this every pojo would always be enhanced in a similar way, so that it
can provide access to its Oid and ObjectAdapter, such that it is
"self-describing".  Will probably use javassist rather than cglib, though
(as I'm using for the new @RequestScoped services).




> ----
>
> I've just seen that there are some exceptions when initializing the webapp.
>
> Seems they are happening because when initializing a Domain Service, those
> classes are loaded and, perhaps, the "environment" has not been yet
> properly initialized by JRebel. Is it possible?
>
>
Don't think so...



> Or simply due to some misspelling... Because see
> that eventOccurrence.class name is misspelled. On the filesystem the first
> character is in uppercase: EventOccurrence.class
>
>
...Yes, I think that's more likely.  If you are on Windows, then (because
it is case preserving but case insensitive), it'll mask this error.  At any
rate, you should fix it.




>
> at org.apache.isis.core.webserver.WebServer.run(WebServer.java:92)
>  at org.apache.isis.core.webserver.WebServer.main(WebServer.java:68)
>  at org.apache.isis.WebServer.main(WebServer.java:25)
> java.lang.RuntimeException: cannot find
> com.xms.framework.risk.domain.model.materialization.eventOccurrence:
> com.xms.framework.risk.domain.model.materialization.EventOccurrence found
> in com/xms/framework/risk/domain/model/materialization/eventOccurrence.class
>  at
> org.zeroturnaround.bundled.javassist.CtClassType.getClassFile2(JRebel:194)
>  at
> org.zeroturnaround.bundled.javassist.CtClassType.getAnnotations(JRebel:541)
> at
> org.zeroturnaround.bundled.javassist.CtClassType.getAnnotations(JRebel:526)
>  at
> com.danhaywood.isis.tool.jrebelplugin.IsisJRebelPlugin.isPersistenceCapable(
> IsisJRebelPlugin.java:362)
>  at com.danhaywood.isis.tool.jrebelplugin.IsisJRebelPlugin.access$700(
> IsisJRebelPlugin.java:50)
>  at
> com.danhaywood.isis.tool.jrebelplugin.IsisJRebelPlugin$2.processSafely(
> IsisJRebelPlugin.java:242)
>  at com.danhaywood.isis.tool.jrebelplugin.IsisJRebelPlugin$2.process(
> IsisJRebelPlugin.java:198)
>  at com.zeroturnaround.javarebel.xU.a(JRebel:257)
>  at com.zeroturnaround.javarebel.xU.a(JRebel:246)
> at com.zeroturnaround.javarebel.xU.a(JRebel:218)
>  at
> com.zeroturnaround.javarebel.SDKIntegrationImpl.runBytecodeProcessors(JRebel:120)
>  at com.zeroturnaround.javarebel.xE.transform(JRebel:50)
> at java.lang.ClassLoader.defineClass(ClassLoader.java)
>  at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
>  at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:25)
>  at java.lang.reflect.Method.invoke(Method.java:597)
>  at com.zeroturnaround.javarebel.xr.defineRebelClass(JRebel:168)
> at com.zeroturnaround.javarebel.Bq.a(JRebel:638)
>  at com.zeroturnaround.javarebel.xt.a(JRebel:261)
>  at com.zeroturnaround.javarebel.xb.a(JRebel:174)
> at com.zeroturnaround.javarebel.xt.loadReloadableClass(JRebel:319)
>  at
> com.zeroturnaround.javarebel.SDKIntegrationImpl.findReloadableClass(JRebel:85)
>  at com.zeroturnaround.javarebel.xJ.findReloadableClass(JRebel:16)
> at java.net.URLClassLoader.findClass(URLClassLoader.java)
>  at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>  at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>
> -----
>
>
> As this is an IT Monitoring  service, it's not needed for debugging with
> JRebel. Simply after removing it, I can add a field and the webapp updates
> it !
>
> After that, I've added a simple action to update the value of the newly
> created field. When trying to reload the entity page, the following
> exception is thrown:
>
> at org.mortbay.jetty.bio.SocketConnector$Connection.run(
> SocketConnector.java:228)
> at org.mortbay.thread.QueuedThreadPool$PoolThread.run(
> QueuedThreadPool.java:582)
> Caused by: java.lang.NullPointerException
>  at org.apache.isis.viewer.wicket.model.mementos.ActionMemento.<init>(
> ActionMemento.java:53)
>  at org.apache.isis.viewer.wicket.model.mementos.ActionMemento.<init>(
> ActionMemento.java:45)
>  at
> org.apache.isis.viewer.wicket.model.mementos.ObjectAdapterMemento$Functions$4.apply(
> ObjectAdapterMemento.java:396)
>


OK, I noticed this issue today as well, while demo'ing something to Jeroen.
 Not sure why this didn't show up for me before, but I've just committed
and pushed a change which hopefully fixes.

Let me know how you get on...

Dan


PS: one other thing to raise: JRebel seems to be quite slow in loading
classes.  But - even though I have rebel.xml set up to just reload the
domain classes - it seems to monitor everything (ie all of the Isis classes
too), which probably explains the slowness.   The JRebel docs [1] suggest
that it is possible to filter using an <include> tag, but it doesn't seem
to work for me.  Interesting in knowing how you get on with it.

[1] http://manuals.zeroturnaround.com/jrebel/standalone/config.html#include

Re: JRebel support

Posted by GESCONSULTOR - Óscar Bou <o....@gesconsultor.com>.



For:
> Cannot instantiate abstract class.
> 	at com.xms.framework.api.domain.model.isis.AbstractMultiTenantUnnamedEntity.jdoNewInstance(AbstractMultiTenantUnnamedEntity.java)
> 
> which looks like a rather odd thing for the framework to attempt.


We find DN enhancer problems quite a lot (nearly on each BDD execution):
- This one regarding abstract classes.
- Another quite common regarding duplicated fields (jdoXXX fields). 

Both of them are solved by slightly changing the class and forcing Eclipse to recompile and the DN enhancer to run. So it's an old friend. Be sure I'm not trying to manually instantiate it.

I've run the enhancer again before executing the webapp and on this last execution finally seems solved (we have 4-5 "dom" modules, similar to "estatio-dom" and "estatio-dom-italy", but for different Bounded Contexts, that must be enhanced "in order" - taking into account dependencies between them -).



Regarding:

> 6. Those "ValuationDimension$$EnhancerByCGLIB$$258191d0" classes are coming from the WrapperFactory, which is probably from integration tests?  Not quite sure what the interaction is there, shouldn't matter, I think, but a bit odd.


We "abuse" the original intention of the WrapperFactory. 
We've nearly standarized that, when an action is invoked from another action in the domain, it will always be "wrapped". 
That way, we can apply the same business logic restrictions applied to users to the interactions between Domain Entities at the Domain Level. 
When that's not possible (mainly due to always-hidden or always-disabled properties, and they have a modifyXXX method) we directly call the modifyXXX or simply remove the "wrap" and make a comment justifying it.

We've found it really useful for detecting nulls passed as parameters, or values that didn't comply with the "autoComplete" or "choices" restrictions, on BDD tests.

I know it was not originally intented for that, but is  that "conceptually wrong"?

----

I've just seen that there are some exceptions when initializing the webapp.

Seems they are happening because when initializing a Domain Service, those classes are loaded and, perhaps, the "environment" has not been yet properly initialized by JRebel. Is it possible? 

Or simply due to some misspelling... Because see that eventOccurrence.class name is misspelled. On the filesystem the first character is in uppercase: EventOccurrence.class


at org.apache.isis.core.webserver.WebServer.run(WebServer.java:92)
	at org.apache.isis.core.webserver.WebServer.main(WebServer.java:68)
	at org.apache.isis.WebServer.main(WebServer.java:25)
java.lang.RuntimeException: cannot find com.xms.framework.risk.domain.model.materialization.eventOccurrence: com.xms.framework.risk.domain.model.materialization.EventOccurrence found in com/xms/framework/risk/domain/model/materialization/eventOccurrence.class
	at org.zeroturnaround.bundled.javassist.CtClassType.getClassFile2(JRebel:194)
	at org.zeroturnaround.bundled.javassist.CtClassType.getAnnotations(JRebel:541)
	at org.zeroturnaround.bundled.javassist.CtClassType.getAnnotations(JRebel:526)
	at com.danhaywood.isis.tool.jrebelplugin.IsisJRebelPlugin.isPersistenceCapable(IsisJRebelPlugin.java:362)
	at com.danhaywood.isis.tool.jrebelplugin.IsisJRebelPlugin.access$700(IsisJRebelPlugin.java:50)
	at com.danhaywood.isis.tool.jrebelplugin.IsisJRebelPlugin$2.processSafely(IsisJRebelPlugin.java:242)
	at com.danhaywood.isis.tool.jrebelplugin.IsisJRebelPlugin$2.process(IsisJRebelPlugin.java:198)
	at com.zeroturnaround.javarebel.xU.a(JRebel:257)
	at com.zeroturnaround.javarebel.xU.a(JRebel:246)
	at com.zeroturnaround.javarebel.xU.a(JRebel:218)
	at com.zeroturnaround.javarebel.SDKIntegrationImpl.runBytecodeProcessors(JRebel:120)
	at com.zeroturnaround.javarebel.xE.transform(JRebel:50)
	at java.lang.ClassLoader.defineClass(ClassLoader.java)
	at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.zeroturnaround.javarebel.xr.defineRebelClass(JRebel:168)
	at com.zeroturnaround.javarebel.Bq.a(JRebel:638)
	at com.zeroturnaround.javarebel.xt.a(JRebel:261)
	at com.zeroturnaround.javarebel.xb.a(JRebel:174)
	at com.zeroturnaround.javarebel.xt.loadReloadableClass(JRebel:319)
	at com.zeroturnaround.javarebel.SDKIntegrationImpl.findReloadableClass(JRebel:85)
	at com.zeroturnaround.javarebel.xJ.findReloadableClass(JRebel:16)
	at java.net.URLClassLoader.findClass(URLClassLoader.java)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
	at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:401)
	at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:363)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:249)
	at org.drools.util.CompositeClassLoader$CachingLoader.load(CompositeClassLoader.java:258)
	at org.drools.util.CompositeClassLoader$CachingLoader.load(CompositeClassLoader.java:237)
	at org.drools.util.CompositeClassLoader.loadClass(CompositeClassLoader.java:88)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:249)
	at org.mvel2.ParserConfiguration.checkForDynamicImport(ParserConfiguration.java:161)
	at org.mvel2.ParserConfiguration.hasImport(ParserConfiguration.java:189)
	at org.mvel2.ParserContext.hasImport(ParserContext.java:351)
	at org.mvel2.compiler.PropertyVerifier.getBeanProperty(PropertyVerifier.java:163)
	at org.mvel2.compiler.PropertyVerifier.analyze(PropertyVerifier.java:117)
	at org.mvel2.compiler.ExpressionCompiler.verify(ExpressionCompiler.java:381)
	at org.mvel2.compiler.ExpressionCompiler._compile(ExpressionCompiler.java:273)
	at org.mvel2.compiler.ExpressionCompiler.compile(ExpressionCompiler.java:62)
	at org.mvel2.MVEL.compileExpression(MVEL.java:810)
	at org.drools.base.extractors.MVELClassFieldReader.compile(MVELClassFieldReader.java:88)
	at org.drools.rule.MVELDialectRuntimeData.onBeforeExecute(MVELDialectRuntimeData.java:185)
	at org.drools.rule.DialectRuntimeRegistry.onBeforeExecute(DialectRuntimeRegistry.java:147)
	at org.drools.common.AbstractRuleBase.addPackages(AbstractRuleBase.java:602)
	at org.drools.reteoo.ReteooRuleBase.addPackages(ReteooRuleBase.java:472)
	at org.drools.impl.KnowledgeBaseImpl.addKnowledgePackages(KnowledgeBaseImpl.java:149)
	at com.xms.framework.monitoring.domain.model.realtime.server.RealTimeIntelligentMonitoringServer.createKnowledgeBase(RealTimeIntelligentMonitoringServer.java:178)
	at com.xms.framework.monitoring.domain.model.realtime.server.RealTimeIntelligentMonitoringServer.createKnowledgeSession(RealTimeIntelligentMonitoringServer.java:202)
	at com.xms.framework.monitoring.domain.model.realtime.server.RealTimeIntelligentMonitoringServer.singletonKnowledgeSession(RealTimeIntelligentMonitoringServer.java:80)
	at com.xms.framework.monitoring.domain.model.realtime.server.RealTimeIntelligentMonitoringServer.init(RealTimeIntelligentMonitoringServer.java:98)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.isis.core.commons.lang.MethodExtensions.invoke(MethodExtensions.java:50)
	at org.apache.isis.core.metamodel.specloader.ServiceInitializer.postConstruct(ServiceInitializer.java:128)
	at org.apache.isis.core.runtime.system.IsisSystemFixturesHookAbstract.initializeServices(IsisSystemFixturesHookAbstract.java:181)
	at org.apache.isis.core.runtime.system.IsisSystemFixturesHookAbstract.init(IsisSystemFixturesHookAbstract.java:141)
	at org.apache.isis.core.runtime.runner.IsisInjectModule.provideIsisSystem(IsisInjectModule.java:139)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	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.SingletonScopeWrapper$ProviderWrapper.get(SingletonScopeWrapper.java:38)
	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 com.google.inject.internal.MembersInjectorImpl.injectAndNotify(MembersInjectorImpl.java:73)
	at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:60)
	at com.google.inject.internal.InjectorImpl.injectMembers(InjectorImpl.java:944)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.google.inject.JrInjectorProxy.invoke(JrInjectorProxy.java:71)
	at com.google.inject.Injector_$$_jvst539_0.injectMembers(Injector_$$_jvst539_0.java)
	at org.apache.isis.viewer.wicket.viewer.IsisWicketApplication.init(IsisWicketApplication.java:237)
	at org.apache.wicket.Application.initApplication(Application.java:818)
	at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:424)
	at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:351)
	at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
	at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:713)
	at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
	at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1282)
	at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:518)
	at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:499)
	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
	at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
	at org.mortbay.jetty.Server.doStart(Server.java:224)
	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
	at org.apache.isis.core.webserver.WebServerBootstrapper.bootstrap(WebServerBootstrapper.java:93)
	at org.apache.isis.core.webserver.WebServer.run(WebServer.java:92)
	at org.apache.isis.core.webserver.WebServer.main(WebServer.java:68)
	at org.apache.isis.WebServer.main(WebServer.java:25)
16:54:32,714  [WebApplication       main       INFO ]  [WicketFilter] Started Wicket version 6.11.0 in DEVELOPMENT mode
********************************************************************
*** WARNING: Wicket is running in DEVELOPMENT mode.              ***
***                               ^^^^^^^^^^^                    ***
*** Do NOT deploy to your live server(s) without changing this.  ***
*** See Application#getConfigurationType() for more information. ***
********************************************************************


-----


As this is an IT Monitoring  service, it's not needed for debugging with JRebel. Simply after removing it, I can add a field and the webapp updates it !

After that, I've added a simple action to update the value of the newly created field. When trying to reload the entity page, the following exception is thrown:

at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Caused by: java.lang.NullPointerException
	at org.apache.isis.viewer.wicket.model.mementos.ActionMemento.<init>(ActionMemento.java:53)
	at org.apache.isis.viewer.wicket.model.mementos.ActionMemento.<init>(ActionMemento.java:45)
	at org.apache.isis.viewer.wicket.model.mementos.ObjectAdapterMemento$Functions$4.apply(ObjectAdapterMemento.java:396)
	at org.apache.isis.viewer.wicket.model.mementos.ObjectAdapterMemento$Functions$4.apply(ObjectAdapterMemento.java:393)
	at org.apache.isis.viewer.wicket.model.models.ActionModel.create(ActionModel.java:100)
	at org.apache.isis.viewer.wicket.ui.components.widgets.cssmenu.ActionLinkFactoryAbstract.newLink(ActionLinkFactoryAbstract.java:90)
	at org.apache.isis.viewer.wicket.ui.components.entity.EntityActionLinkFactory.newLink(EntityActionLinkFactory.java:72)
	at org.apache.isis.viewer.wicket.ui.components.widgets.cssmenu.CssMenuItem.newSubMenuItem(CssMenuItem.java:283)
	at org.apache.isis.viewer.wicket.ui.components.widgets.cssmenu.CssMenuBuilder.addMenuItemForAction(CssMenuBuilder.java:146)
	at org.apache.isis.viewer.wicket.ui.components.widgets.cssmenu.CssMenuBuilder.addMenuItem(CssMenuBuilder.java:127)
	at org.apache.isis.viewer.wicket.ui.components.widgets.cssmenu.CssMenuBuilder.addMenuItemsForActionsOfType(CssMenuBuilder.java:119)
	at org.apache.isis.viewer.wicket.ui.components.widgets.cssmenu.CssMenuBuilder.addMenuItems(CssMenuBuilder.java:85)
	at org.apache.isis.viewer.wicket.ui.components.widgets.cssmenu.CssMenuBuilder.buildPanel(CssMenuBuilder.java:76)
	at org.apache.isis.viewer.wicket.ui.components.entity.header.EntityHeaderPanel.buildEntityActionsGui(EntityHeaderPanel.java:116)
	at org.apache.isis.viewer.wicket.ui.components.entity.header.EntityHeaderPanel.buildGui(EntityHeaderPanel.java:97)
	at org.apache.isis.viewer.wicket.ui.components.entity.header.EntityHeaderPanel.onBeforeRender(EntityHeaderPanel.java:91)
	at org.apache.wicket.Component.internalBeforeRender(Component.java:923)
	at org.apache.wicket.Component.beforeRender(Component.java:991)
	at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1681)



Many thanks,

Oscar

 




El 03/02/2014, a las 16:34, Dan Haywood <da...@haywood-associates.co.uk> escribió:

> Hi Oscar,
> Hmm.
> 
> There's a couple of things to remark on here.
> 
> 1. The JRebel integration does still require the DN enhancement to be done first, which basically means running the DN enhancer automatically, or manually.
> 2. What I've noticed is that, from JRebel's point of view, the bytecode changes twice: (a) initially it is recompiled by Eclipse, then (b) the DN enhancer runs.  This causes the plugin to be fired twice.
> 3. Assuming that the plugin sees the enhanced bytecode when the app is initially loaded, this byteode is then cached.  So even if the plugin is given the unenhanced bytecode (ie at step 2(a)), it will still emit valid bytecode to JRebel.
> 4. From what I've observed, JRebel seems to eagerly pick up the first bytecode change (by Eclipse)... this causes the plugin to emit the cached bytecode.  But, when you interact with the app, this causes JRebel to lazily pick up the bytecode as enhanced by DN.
>  
> So it oughtn't to be possible when using JRebel and the plugin for there ever to be unenhanced bytecode (assuming it was all enhanced initially).
> 
> You could try upping the loggingLevel to DEBUG:
> 
>     -Disis-jrebel-plugin.loggingLevel=debug
> 
> 
> and see if it provides any further clues.
> 
> ~~~
> In terms of your stack trace:
> 
> 5. I wonder whether that exception really is an enhancement issue.  The line failing says: 
> 
> Cannot instantiate abstract class.
> 	at com.xms.framework.api.domain.model.isis.AbstractMultiTenantUnnamedEntity.jdoNewInstance(AbstractMultiTenantUnnamedEntity.java)
> 
> which looks like a rather odd thing for the framework to attempt.
> 
> 6. Those "ValuationDimension$$EnhancerByCGLIB$$258191d0" classes are coming from the WrapperFactory, which is probably from integration tests?  Not quite sure what the interaction is there, shouldn't matter, I think, but a bit odd.
> 
> Is it possible to strip back the example a bit, try something simpler in the first case?
> 
> Thx
> Dan
> 
> 
> 
> 
> On 3 February 2014 15:15, GESCONSULTOR - Óscar Bou <o....@gesconsultor.com> wrote:
> 
> Hi again, Dan.
> 
> I've configured it in our project, and updated to the latest trunk commit. 
> 
> An exception is thrown when executing a fixture for loading demo data. This kind of exception is an old friend, as it's commonly due to a un-enhanced class. 
> 
> ----
> 
> 
> 
> 
> 	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
> 	at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
> 	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
> Caused by: java.lang.reflect.InvocationTargetException
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:258)
> 	... 35 more
> Caused by: javax.jdo.JDOFatalInternalException: Cannot instantiate abstract class.
> 	at com.xms.framework.api.domain.model.isis.AbstractMultiTenantUnnamedEntity.jdoNewInstance(AbstractMultiTenantUnnamedEntity.java)
> 	at org.datanucleus.state.JDOStateManager.saveFields(JDOStateManager.java:693)
> 	at org.datanucleus.state.JDOStateManager.initialiseForPersistentNew(JDOStateManager.java:437)
> 	at org.apache.isis.objectstore.jdo.datanucleus.JDOStateManagerForIsis.initialiseForPersistentNew(JDOStateManagerForIsis.java:86)
> 	at org.datanucleus.state.ObjectProviderFactoryImpl.newForPersistentNew(ObjectProviderFactoryImpl.java:232)
> 	at org.datanucleus.ExecutionContextImpl.newObjectProviderForPersistentNew(ExecutionContextImpl.java:1415)
> 	at org.datanucleus.ExecutionContextImpl.persistObjectInternal(ExecutionContextImpl.java:2219)
> 	at org.datanucleus.ExecutionContextImpl.persistObjectWork(ExecutionContextImpl.java:2066)
> 	at org.datanucleus.ExecutionContextImpl.persistObject(ExecutionContextImpl.java:1914)
> 	at org.datanucleus.api.jdo.JDOPersistenceManager.jdoMakePersistent(JDOPersistenceManager.java:727)
> 	at org.datanucleus.api.jdo.JDOPersistenceManager.makePersistent(JDOPersistenceManager.java:752)
> 	at org.apache.isis.objectstore.jdo.datanucleus.persistence.commands.DataNucleusCreateObjectCommand.execute(DataNucleusCreateObjectCommand.java:54)
> 	at org.apache.isis.objectstore.jdo.datanucleus.DataNucleusObjectStore.executeCommands(DataNucleusObjectStore.java:361)
> 	at org.apache.isis.objectstore.jdo.datanucleus.DataNucleusObjectStore.execute(DataNucleusObjectStore.java:355)
> 	at org.apache.isis.core.runtime.system.transaction.IsisTransaction.doFlush(IsisTransaction.java:409)
> 	at org.apache.isis.core.runtime.system.transaction.IsisTransaction.flush(IsisTransaction.java:358)
> 	at org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.flushTransaction(IsisTransactionManager.java:311)
> 	at org.apache.isis.core.runtime.persistence.internal.RuntimeContextFromSession$7.flush(RuntimeContextFromSession.java:221)
> 	at org.apache.isis.core.metamodel.services.container.DomainObjectContainerDefault.flush(DomainObjectContainerDefault.java:229)
> 	at com.xms.framework.api.domain.model.isis.AbstractXMSDomainObjectRepositoryAndFactory.persist(AbstractXMSDomainObjectRepositoryAndFactory.java:58)
> 	at com.xms.framework.measurement.domain.model.measure.BaseMeasures.createBaseMeasureAlienVault(BaseMeasures.java:95)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.apache.isis.core.progmodel.facets.actions.invoke.ActionInvocationFacetViaMethod.invoke(ActionInvocationFacetViaMethod.java:172)
> 	at org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction$1.execute(ActionInvocationFacetWrapTransaction.java:57)
> 	at org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction$1.execute(ActionInvocationFacetWrapTransaction.java:54)
> 	at org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.executeWithinTransaction(IsisTransactionManager.java:223)
> 	at org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction.invoke(ActionInvocationFacetWrapTransaction.java:54)
> 	at org.apache.isis.core.metamodel.specloader.specimpl.ObjectActionImpl.execute(ObjectActionImpl.java:342)
> 	at org.apache.isis.core.wrapper.internal.DomainObjectInvocationHandler.handleActionMethod(DomainObjectInvocationHandler.java:509)
> 	at org.apache.isis.core.wrapper.internal.DomainObjectInvocationHandler.invoke(DomainObjectInvocationHandler.java:236)
> 	at org.apache.isis.core.wrapper.internal.InvocationHandlerMethodInterceptor.intercept(InvocationHandlerMethodInterceptor.java:37)
> 	at com.xms.framework.measurement.domain.model.measure.BaseMeasures$$EnhancerByCGLIB$$5b26939b.createBaseMeasureAlienVault(<generated>)
> 	at com.xms.framework.measurement.domain.model.measure.BaseMeasures.createBaseMeasuresFromAlienVaultTemplateCatalog(BaseMeasures.java:172)
> 	at com.xms.framework.measurement.fixtures.MeasurementFixture.installMeasurementFixture(MeasurementFixture.java:46)
> 	at com.xms.framework.measurement.fixtures.MeasurementFixture.install(MeasurementFixture.java:34)
> 	at com.xms.framework.measurement.fixtures.MeasurementFixtureService.installDemoData(MeasurementFixtureService.java:23)
> 	at com.xms.framework.continuity.fixtures.BCMFixture.installMeasurementFixture(BCMFixture.java:128)
> 	at com.xms.framework.continuity.fixtures.BCMFixture.install(BCMFixture.java:42)
> 	at com.xms.framework.continuity.fixtures.BCMFixtureService.installDemoData(BCMFixtureService.java:28)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.apache.isis.core.progmodel.facets.actions.invoke.ActionInvocationFacetViaMethod.invoke(ActionInvocationFacetViaMethod.java:172)
> 	at org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction$1.execute(ActionInvocationFacetWrapTransaction.java:57)
> 	at org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction$1.execute(ActionInvocationFacetWrapTransaction.java:54)
> 	at org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.executeWithinTransaction(IsisTransactionManager.java:223)
> 	at org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction.invoke(ActionInvocationFacetWrapTransaction.java:54)
> 	at org.apache.isis.core.metamodel.specloader.specimpl.ObjectActionImpl.execute(ObjectActionImpl.java:342)
> 	at org.apache.isis.viewer.wicket.model.models.ActionModel.executeAction(ActionModel.java:434)
> 	at org.apache.isis.viewer.wicket.model.models.ActionModel.load(ActionModel.java:421)
> 	at org.apache.isis.viewer.wicket.model.models.ActionModel.load(ActionModel.java:73)
> 	at org.apache.wicket.model.LoadableDetachableModel.getObject(LoadableDetachableModel.java:121)
> 	at org.apache.isis.viewer.wicket.ui.components.actions.ActionPanel.executeActionHandlingApplicationExceptions(ActionPanel.java:291)
> 	at org.apache.isis.viewer.wicket.ui.components.actions.ActionPanel.executeActionOnTargetAndProcessResults(ActionPanel.java:200)
> 	at org.apache.isis.viewer.wicket.ui.components.actions.ActionPanel.executeActionAndProcessResults(ActionPanel.java:147)
> 	at org.apache.isis.viewer.wicket.ui.components.actions.ActionPanel.buildGui(ActionPanel.java:86)
> 	at org.apache.isis.viewer.wicket.ui.components.actions.ActionPanel.<init>(ActionPanel.java:79)
> 	at org.apache.isis.viewer.wicket.ui.components.actions.ActionPanelFactory.createComponent(ActionPanelFactory.java:49)
> 	at org.apache.isis.viewer.wicket.viewer.registries.components.ComponentFactoryRegistryDefault.createComponent(ComponentFactoryRegistryDefault.java:129)
> 	at org.apache.isis.viewer.wicket.ui.components.widgets.cssmenu.ActionLinkFactoryAbstract$1.onClick(ActionLinkFactoryAbstract.java:104)
> 	at org.apache.wicket.ajax.markup.html.AjaxLink$1.onEvent(AjaxLink.java:86)
> 	at org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:123)
> 	at org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:626)
> 	... 40 more
> 16:06:12,662  [RequestCycleExtra    597516262@qtp-1626371610-0 WARN ]  ********************************
> 2014-02-03 16:06:15 JRebel: JRebel will clear Wicket property caches because of the newly added key: 'noMatches'. Have you specified this key in Wicket's properties files?
> 16:06:16,769  [PropertiesFactory    597516262@qtp-1626371610-0 INFO ]  Loading properties files from jar:file:/Users/oscarboubou/.m2/repository/com/vaynberg/wicket/select2/wicket-select2/2.2.2/wicket-select2-2.2.2.jar!/com/vaynberg/wicket/select2/AbstractSelect2Choice.utf8.properties with loader org.apache.wicket.resource.UtfPropertiesFilePropertiesLoader@61b52c64
> 
> 
> 
> ----
> 
> Normally it's solved by going to the class, making a small change (i.e., pressing intro and deleting the new line) forcing Eclipse to recompile and DN to enhance it again. 
> I've done that, and after waiting for the enhancer to run, I've gone again to the wicket interface. 
> That has "forced" JRebel to reload all classes inheriting from it. Seeing different kind of entries, including some classes named as "xxx$$EnhancerByCGLIB$$yyy".
> 
>  
> 2014-02-03 16:03:48 JRebel: Reloading class 'com.xms.framework.architecture.domain.model.EnterpriseArchitectureManagement'.
> 2014-02-03 16:03:48 JRebel: Reloading class 'com.xms.framework.architecture.domain.model.EnterpriseArchitectureModel'.
> 2014-02-03 16:03:48 JRebel: Reloading class 'com.xms.framework.architecture.domain.model.TypeOfCost'.
> 2014-02-03 16:03:48 JRebel: Reloading class 'com.xms.framework.architecture.domain.model.valuation.ValuationDimensionsSets'.
> 2014-02-03 16:03:48 JRebel: Reloading class 'com.xms.framework.architecture.domain.model.valuation.InformationAssetProperty'.
> 2014-02-03 16:03:48 JRebel: Reloading class 'com.xms.framework.architecture.domain.model.valuation.InformationAssetProperty$1'.
> 2014-02-03 16:03:48 JRebel: Reloading class 'com.xms.framework.architecture.domain.model.valuation.InformationSecurityProperty'.
> 2014-02-03 16:03:48 JRebel: Reinitialized class 'com.xms.framework.architecture.domain.model.valuation.InformationAssetProperty$1'.
> 2014-02-03 16:03:48 JRebel: Reloading class 'com.xms.framework.architecture.domain.model.valuation.InformationAssetProperty$2'.
> 2014-02-03 16:03:48 JRebel: Reinitialized class 'com.xms.framework.architecture.domain.model.valuation.InformationAssetProperty$2'.
> ....
> 2014-02-03 16:04:21 JRebel: Reloading class 'com.xms.framework.risk.domain.model.continuity.application.DataObjectBCMInformation'.
> 2014-02-03 16:04:22 JRebel: Reloading class 'com.xms.framework.risk.domain.model.continuity.technology.ArtifactBCMInformation'.
> 2014-02-03 16:04:24 JRebel: Reinitialized class 'com.xms.framework.architecture.domain.model.valuation.ValuationDimension$$EnhancerByCGLIB$$258191d0'.
> 2014-02-03 16:04:25 JRebel: Reinitialized class 'com.xms.framework.architecture.domain.model.valuation.ValuationDimensionsSet$$EnhancerByCGLIB$$b0eb1417'.
> 2014-02-03 16:04:26 JRebel: Reinitialized class 'com.xms.framework.architecture.domain.model.valuation.ImpactCriterion$$EnhancerByCGLIB$$206d735a'.
> 2014-02-03 16:04:26 JRebel: Reinitialized class 'com.xms.framework.architecture.domain.model.valuation.ImpactCriteriaSet$$EnhancerByCGLIB$$7038328c'.
> 2014-02-03 16:04:27 JRebel: Reinitialized class 'com.xms.framework.architecture.domain.model.valuation.ImpactScale$$EnhancerByCGLIB$$f6feaeb'.
> 2014-02-03 16:04:28 JRebel: Reinitialized class 'com.xms.framework.architecture.domain.model.valuation.ImpactScales$$EnhancerByCGLIB$$5b4eeeca'.
> 
> ------
> 
> But after reloading all classes, if I execute the action again, exactly the same initial exception occurs:
> 
> Caused by: javax.jdo.JDOFatalInternalException: Cannot instantiate abstract class.
> 	at com.xms.framework.api.domain.model.isis.AbstractMultiTenantUnnamedEntity.jdoNewInstance(AbstractMultiTenantUnnamedEntity.java)
> ...
> 
> 
> Thanks,
> 
> Oscar
> 
> 
> 
> 
> 
> 
> 
> 
> El 03/02/2014, a las 08:20, GESCONSULTOR <o....@gesconsultor.com> escribió:
> 
> 
>> Oh! I forgot to change the QuickStart pom!
>> 
>> Sure that's it. I'll let you know.
>> 
>> Thanks
>> 
>>> El 03/02/2014, a las 08:12, Dan Haywood <da...@haywood-associates.co.uk> escribió:
>>> 
>>> Hi Oscar,
>>> You need to use trunk (1.4.0-SNAPSHOT) rather than 1.3.1; I think that's
>>> the problem.
>>> Let me know
>>> Cheers
>>> Dan
>>> 
>>> Sorry to be brief, sent from my phone
>>> On 2 Feb 2014 19:08, "GESCONSULTOR - Óscar Bou" <o....@gesconsultor.com>
>>> wrote:
>>> 
>>>> 
>>>> Hi, Dan.
>>>> 
>>>> I'm very excited about the possibility to use the JRebel plugin, as it can
>>>> accelerate a lot the workflow.
>>>> I've downloaded and configured it, and I'm working over the latest
>>>> quickstart archetype.
>>>> 
>>>> I've added 1 new property to the TodoItem entity, and it has not been
>>>> showed on the interface.
>>>> 
>>>> These are the detailed steps followed.
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 1. Quickstart prototype.
>>>> 
>>>> I create a new folder and run maven to create a project based on the
>>>> latest Isis quickstart:
>>>> 
>>>> mvn archetype:generate      -D archetypeGroupId=org.apache.isis.archetype
>>>>   -D archetypeArtifactId=quickstart_wicket_restful_jdo-archetype     -D
>>>> archetypeVersion=1.3.1     -D groupId=com.mycompany     -D artifactId=myapp
>>>>   -D version=1.0-SNAPSHOT     -B
>>>> 
>>>> 
>>>> 2. JRebel configuration.
>>>> 
>>>> I've installed JRebel, and on the JRebel Config Center I've marked the
>>>> "dom" and "webapp" projects. to be followed for changes by JRebel.
>>>> 
>>>> I've downloaded from [1] the
>>>> danhaywood-isis-jrebel-plugin-1.0.0-SNAPSHOT.jar plugin and copied it on
>>>> the lib folder of the "webapp" module.
>>>> 
>>>> I've copied the ToDoApp-no-fixtures-PROTOTYPE.launch on the "webapp"
>>>> module to a new ToDoApp-no-fixtures-PROTOTYPE-Rebel.launch file, and added:
>>>> 
>>>> <stringAttribute
>>>>     key="org.eclipse.jdt.launching.VM_ARGUMENTS"
>>>>     value="${jrebel_args} -Drebel.log=false
>>>> -Drebel.plugins=./lib/danhaywood-isis-jrebel-plugin-1.0.0-SNAPSHOT.jar
>>>> -Disis-jrebel-plugin.packagePrefix=dom.simple -XX:MaxPermSize=128m"/>
>>>> 
>>>> 3. DataNucleus.
>>>> 
>>>> I assume that the "DataNucleus - auto-enhancement" option must be enabled
>>>> on the "dom" module.
>>>> That originates that, each time the Enhancer is executed (that's after any
>>>> change on any file on the module) a JRebel dialog asks:
>>>> "You are launching a JRebel-enabled application without the JRebel agent.
>>>> JRebel will not work without it."
>>>> For avoiding that, I've checked the "Don't perform this check again (you
>>>> can restore it from preferences)", and have chosen the "Not this time"
>>>> option.
>>>> 
>>>> 4. Run the webapp.
>>>> 
>>>> I've launched the newly created Eclipse configuration and navigated to "
>>>> http://localhost:8080/wicket/".
>>>> I've installed the fixtures.
>>>> 
>>>> 5. Changes in code.
>>>> 
>>>> I add a new field to the ToDoItem entity. The following message appears on
>>>> Eclipse:
>>>> 
>>>> Class 'xxx' has a new non-sttic field 'newField', it will be null on
>>>> existing instances.
>>>> 
>>>> But after refreshing the webapp entity page, the field it's not showed.
>>>> I've waited enough time. In fact, the following messages have been logged:
>>>> 
>>>> 2014-02-02 19:56:40 JRebel: Reloading class 'dom.todo.ToDoItem'.
>>>> 19:56:40,515  [Native               1238094722@qtp-1337505800-5 DEBUG]
>>>> SELECT
>>>> "A0"."category","A0"."complete","A0"."cost","A0"."description","A0"."dueBy","A0"."notes","A0"."ownedBy","A0"."subcategory","A0"."version"
>>>> FROM "ToDoItem" "A0" WHERE "A0"."id" = <11>
>>>> 2014-02-02 19:56:40 JRebel: Reloading class 'dom.todo.ToDoItem$Category'.
>>>> 2014-02-02 19:56:40 JRebel: Reloading class 'dom.todo.ToDoItem$Category$1'.
>>>> 2014-02-02 19:56:40 JRebel: Reloading class
>>>> 'dom.todo.ToDoItem$Subcategory'.
>>>> 2014-02-02 19:56:40 JRebel: Reloading class
>>>> 'dom.todo.ToDoItem$Subcategory$1'.
>>>> 2014-02-02 19:56:40 JRebel: Reinitialized class
>>>> 'dom.todo.ToDoItem$Subcategory'.
>>>> 2014-02-02 19:56:40 JRebel: Reinitialized class
>>>> 'dom.todo.ToDoItem$Category$1'.
>>>> 2014-02-02 19:56:40 JRebel: Reloading class 'dom.todo.ToDoItem$Category$2'.
>>>> 2014-02-02 19:56:40 JRebel: Reinitialized class
>>>> 'dom.todo.ToDoItem$Category$2'.
>>>> 2014-02-02 19:56:40 JRebel: Reloading class 'dom.todo.ToDoItem$Category$3'.
>>>> 2014-02-02 19:56:40 JRebel: Reinitialized class
>>>> 'dom.todo.ToDoItem$Category$3'.
>>>> 2014-02-02 19:56:40 JRebel: Reinitialized class
>>>> 'dom.todo.ToDoItem$Category'.
>>>> 19:56:40,697  [Native               1238094722@qtp-1337505800-5 DEBUG]
>>>> SELECT 'dom.todo.ToDoItem' AS
>>>> NUCLEUS_TYPE,"A1"."category","A1"."complete","A1"."cost","A1"."description","A1"."dueBy","A1"."notes","A1"."ownedBy","A1"."subcategory","A1"."id","A1"."version"
>>>> FROM "ToDoItemDependencies" "A0" INNER JOIN "ToDoItem" "A1" ON
>>>> "A0"."dependentId" = "A1"."id" WHERE "A0"."dependingId" = <11>
>>>> 2014-02-02 19:56:40 JRebel: Reloading class
>>>> 'dom.todo.ToDoItem$DependenciesComparator'.
>>>> 2014-02-02 19:56:40 JRebel: Reloading class
>>>> 'dom.todo.ToDoItem$DependenciesComparator$1'.
>>>> 19:56:40,771  [Native               1238094722@qtp-1337505800-5 DEBUG]
>>>> SELECT 'dom.todo.ToDoItem' AS
>>>> NUCLEUS_TYPE,"A0"."category","A0"."complete","A0"."cost","A0"."description","A0"."dueBy","A0"."notes","A0"."ownedBy","A0"."subcategory","A0"."id","A0"."version"
>>>> FROM "ToDoItem" "A0" WHERE "A0"."ownedBy" = <'sven'> AND "A0"."category" =
>>>> <'Professional'>
>>>> 19:56:40,789  [Native               1238094722@qtp-1337505800-5 DEBUG]
>>>> SELECT "A0"."attachment","A0"."version" FROM "ToDoItem" "A0" WHERE
>>>> "A0"."id" = <9>
>>>> 19:56:40,806  [Native               1238094722@qtp-1337505800-5 DEBUG]
>>>> SELECT "A0"."attachment","A0"."version" FROM "ToDoItem" "A0" WHERE
>>>> "A0"."id" = <10>
>>>> 19:56:40,812  [Native               1238094722@qtp-1337505800-5 DEBUG]
>>>> SELECT "A0"."attachment","A0"."version" FROM "ToDoItem" "A0" WHERE
>>>> "A0"."id" = <8>
>>>> 19:56:41,351  [ResourceServlet      447422450@qtp-1337505800-2 INFO ]
>>>> request: css/application.css
>>>> 19:56:41,351  [ResourceServlet      1203999762@qtp-1337505800-0 INFO ]
>>>> request: scripts/application.js
>>>> 19:56:41,362  [ResourceServlet      1238094722@qtp-1337505800-5 INFO ]
>>>> request: images/spinning-icon.gif
>>>> 
>>>> 
>>>> 
>>>> On this state, if I press Edit and try to change the ToDoItem description,
>>>> the following exception is logged:
>>>> 
>>>> 
>>>> org.mortbay.jetty.bio.SocketConnector$Connection#run(SocketConnector.java:228)
>>>> 
>>>> org.mortbay.thread.QueuedThreadPool$PoolThread#run(QueuedThreadPool.java:582)
>>>> java.lang.NullPointerException
>>>> 
>>>> org.datanucleus.state.JDOStateManager#setObjectField(JDOStateManager.java:1843)
>>>> dom.todo.ToDoItem#setSubcategory(ToDoItem.java:-1)
>>>> 
>>>> sun.reflect.NativeMethodAccessorImpl#invoke0(NativeMethodAccessorImpl.java:-2)
>>>> 
>>>> sun.reflect.NativeMethodAccessorImpl#invoke(NativeMethodAccessorImpl.java:39)
>>>> 
>>>> sun.reflect.DelegatingMethodAccessorImpl#invoke(DelegatingMethodAccessorImpl.java:25)
>>>> java.lang.reflect.Method#invoke(Method.java:597)
>>>> 
>>>> org.apache.isis.core.commons.lang.MethodExtensions#invoke(MethodExtensions.java:50)
>>>> 
>>>> org.apache.isis.core.commons.lang.MethodExtensions#invoke(MethodExtensions.java:45)
>>>> 
>>>> org.apache.isis.core.metamodel.adapter.util.AdapterInvokeUtils#invoke(AdapterInvokeUtils.java:44)
>>>> 
>>>> org.apache.isis.core.progmodel.facets.properties.modify.PropertyClearFacetViaSetterMethod#clearProperty(PropertyClearFacetViaSetterMethod.java:62)
>>>> 
>>>> org.apache.isis.core.runtime.transaction.facets.PropertyClearFacetWrapTransaction$1#execute(PropertyClearFacetWrapTransaction.java:55)
>>>> 
>>>> org.apache.isis.core.runtime.system.transaction.IsisTransactionManager#executeWithinTransaction(IsisTransactionManager.java:175)
>>>> 
>>>> org.apache.isis.core.runtime.transaction.facets.PropertyClearFacetWrapTransaction#clearProperty(PropertyClearFacetWrapTransaction.java:52)
>>>> 
>>>> org.apache.isis.core.metamodel.specloader.specimpl.OneToOneAssociationImpl#clearValue(OneToOneAssociationImpl.java:200)
>>>> 
>>>> org.apache.isis.core.metamodel.specloader.specimpl.OneToOneAssociationImpl#set(OneToOneAssociationImpl.java:164)
>>>> 
>>>> org.apache.isis.viewer.wicket.model.models.EntityModel#apply(EntityModel.java:427)
>>>> 
>>>> org.apache.isis.viewer.wicket.ui.components.entity.properties.EntityPropertiesForm$2#onSubmit(EntityPropertiesForm.java:365)
>>>> org.apache.wicket.markup.html.form.Form#delegateSubmit(Form.java:1253)
>>>> org.apache.wicket.markup.html.form.Form#process(Form.java:925)
>>>> 
>>>> org.apache.isis.viewer.wicket.ui.panels.FormAbstract#process(FormAbstract.java:118)
>>>> org.apache.wicket.markup.html.form.Form#onFormSubmitted(Form.java:771)
>>>> org.apache.wicket.markup.html.form.Form#onFormSubmitted(Form.java:704)
>>>> 
>>>> sun.reflect.NativeMethodAccessorImpl#invoke0(NativeMethodAccessorImpl.java:-2)
>>>> 
>>>> sun.reflect.NativeMethodAccessorImpl#invoke(NativeMethodAccessorImpl.java:39)
>>>> 
>>>> sun.reflect.DelegatingMethodAccessorImpl#invoke(DelegatingMethodAccessorImpl.java:25)
>>>> java.lang.reflect.Method#invoke(Method.java:597)
>>>> 
>>>> org.apache.wicket.RequestListenerInterface#internalInvoke(RequestListenerInterface.java:258)
>>>> 
>>>> org.apache.wicket.RequestListenerInterface#invoke(RequestListenerInterface.java:216)
>>>> 
>>>> org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler#invokeListener(ListenerInterfaceRequestHandler.java:240)
>>>> 
>>>> org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler#respond(ListenerInterfaceRequestHandler.java:226)
>>>> 
>>>> org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor#respond(RequestCycle.java:861)
>>>> 
>>>> org.apache.wicket.request.RequestHandlerStack#execute(RequestHandlerStack.java:64)
>>>> org.apache.wicket.request.cycle.RequestCycle#execute(RequestCycle.java:261)
>>>> 
>>>> org.apache.wicket.request.cycle.RequestCycle#processRequest(RequestCycle.java:218)
>>>> 
>>>> org.apache.wicket.request.cycle.RequestCycle#processRequestAndDetach(RequestCycle.java:289)
>>>> 
>>>> org.apache.wicket.protocol.http.WicketFilter#processRequestCycle(WicketFilter.java:259)
>>>> 
>>>> org.apache.wicket.protocol.http.WicketFilter#processRequest(WicketFilter.java:201)
>>>> 
>>>> org.apache.wicket.protocol.http.WicketFilter#doFilter(WicketFilter.java:282)
>>>> 
>>>> org.mortbay.jetty.servlet.ServletHandler$CachedChain#doFilter(ServletHandler.java:1212)
>>>> 
>>>> org.apache.shiro.web.servlet.AbstractShiroFilter#executeChain(AbstractShiroFilter.java:449)
>>>> 
>>>> org.apache.shiro.web.servlet.AbstractShiroFilter$1#call(AbstractShiroFilter.java:365)
>>>> 
>>>> org.apache.shiro.subject.support.SubjectCallable#doCall(SubjectCallable.java:90)
>>>> 
>>>> org.apache.shiro.subject.support.SubjectCallable#call(SubjectCallable.java:83)
>>>> 
>>>> org.apache.shiro.subject.support.DelegatingSubject#execute(DelegatingSubject.java:383)
>>>> 
>>>> org.apache.shiro.web.servlet.AbstractShiroFilter#doFilterInternal(AbstractShiroFilter.java:362)
>>>> 
>>>> org.apache.shiro.web.servlet.OncePerRequestFilter#doFilter(OncePerRequestFilter.java:125)
>>>> 
>>>> org.mortbay.jetty.servlet.ServletHandler$CachedChain#doFilter(ServletHandler.java:1212)
>>>> org.mortbay.jetty.servlet.ServletHandler#handle(ServletHandler.java:399)
>>>> org.mortbay.jetty.security.SecurityHandler#handle(SecurityHandler.java:216)
>>>> org.mortbay.jetty.servlet.SessionHandler#handle(SessionHandler.java:182)
>>>> org.mortbay.jetty.handler.ContextHandler#__handle(ContextHandler.java:766)
>>>> org.mortbay.jetty.handler.ContextHandler#handle(ContextHandler.java:-1)
>>>> org.mortbay.jetty.webapp.WebAppContext#handle(WebAppContext.java:450)
>>>> org.mortbay.jetty.handler.HandlerWrapper#handle(HandlerWrapper.java:152)
>>>> org.mortbay.jetty.Server#handle(Server.java:326)
>>>> org.mortbay.jetty.HttpConnection#handleRequest(HttpConnection.java:542)
>>>> 
>>>> org.mortbay.jetty.HttpConnection$RequestHandler#content(HttpConnection.java:945)
>>>> org.mortbay.jetty.HttpParser#parseNext(HttpParser.java:756)
>>>> org.mortbay.jetty.HttpParser#parseAvailable(HttpParser.java:218)
>>>> org.mortbay.jetty.HttpConnection#handle(HttpConnection.java:404)
>>>> 
>>>> org.mortbay.jetty.bio.SocketConnector$Connection#run(SocketConnector.java:228)
>>>> 
>>>> org.mortbay.thread.QueuedThreadPool$PoolThread#run(QueuedThreadPool.java:582)
>>>> 
>>>> 
>>>> [1] https://github.com/danhaywood/isis-jrebel-plugin.git
> 
> 
> Óscar Bou Bou
> Responsable de Producto
> Auditor Jefe de Certificación ISO 27001 en BSI
> CISA, CRISC, APMG ISO 20000, ITIL-F
> 
> <contactenos.html.gif>   902 900 231 / 620 267 520
> <Pasted Graphic 1.tiff>   http://www.twitter.com/oscarbou
> 
> <gesdatos-software.gif>   http://es.linkedin.com/in/oscarbou
> 
> <blog.png>   http://www.GesConsultor.com 
> 
> <gesconsultor_logo_blue_email.png>
> 
> 
> Este mensaje y los ficheros anexos son confidenciales. Los mismos contienen información reservada que no puede ser difundida. Si usted ha recibido este correo por error, tenga la amabilidad de eliminarlo de su sistema y avisar al remitente mediante reenvío a su dirección electrónica; no deberá copiar el mensaje ni divulgar su contenido a ninguna persona.
> Su dirección de correo electrónico junto a sus datos personales constan en un fichero titularidad de Gesdatos Software, S.L. cuya finalidad es la de mantener el contacto con Ud. Si quiere saber de qué información disponemos de Ud., modificarla, y en su caso, cancelarla, puede hacerlo enviando un escrito al efecto, acompañado de una fotocopia de su D.N.I. a la siguiente dirección: Gesdatos Software, S.L. , Paseo de la Castellana, 153 bajo - 28046 (Madrid), y Avda. Cortes Valencianas num. 50, 1ºC - 46015 (Valencia). Asimismo, es su responsabilidad comprobar que este mensaje o sus archivos adjuntos no contengan virus informáticos, y en caso que los tuvieran eliminarlos.
> 
> 
> 
> 
> 
> 


Óscar Bou Bou
Responsable de Producto
Auditor Jefe de Certificación ISO 27001 en BSI
CISA, CRISC, APMG ISO 20000, ITIL-F

   902 900 231 / 620 267 520
   http://www.twitter.com/oscarbou

   http://es.linkedin.com/in/oscarbou

   http://www.GesConsultor.com 




Este mensaje y los ficheros anexos son confidenciales. Los mismos contienen información reservada que no puede ser difundida. Si usted ha recibido este correo por error, tenga la amabilidad de eliminarlo de su sistema y avisar al remitente mediante reenvío a su dirección electrónica; no deberá copiar el mensaje ni divulgar su contenido a ninguna persona.
Su dirección de correo electrónico junto a sus datos personales constan en un fichero titularidad de Gesdatos Software, S.L. cuya finalidad es la de mantener el contacto con Ud. Si quiere saber de qué información disponemos de Ud., modificarla, y en su caso, cancelarla, puede hacerlo enviando un escrito al efecto, acompañado de una fotocopia de su D.N.I. a la siguiente dirección: Gesdatos Software, S.L. , Paseo de la Castellana, 153 bajo - 28046 (Madrid), y Avda. Cortes Valencianas num. 50, 1ºC - 46015 (Valencia). Asimismo, es su responsabilidad comprobar que este mensaje o sus archivos adjuntos no contengan virus informáticos, y en caso que los tuvieran eliminarlos.






Re: JRebel support

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
Hi Oscar,
Hmm.

There's a couple of things to remark on here.

1. The JRebel integration does still require the DN enhancement to be done
first, which basically means running the DN enhancer automatically, or
manually.
2. What I've noticed is that, from JRebel's point of view, the bytecode
changes twice: (a) initially it is recompiled by Eclipse, then (b) the DN
enhancer runs.  This causes the plugin to be fired twice.
3. Assuming that the plugin sees the enhanced bytecode when the app is
initially loaded, this byteode is then cached.  So even if the plugin is
given the unenhanced bytecode (ie at step 2(a)), it will still emit valid
bytecode to JRebel.
4. From what I've observed, JRebel seems to eagerly pick up the first
bytecode change (by Eclipse)... this causes the plugin to emit the cached
bytecode.  But, when you interact with the app, this causes JRebel to
lazily pick up the bytecode as enhanced by DN.

So it oughtn't to be possible when using JRebel and the plugin for there
ever to be unenhanced bytecode (assuming it was all enhanced initially).

You could try upping the loggingLevel to DEBUG:

    -Disis-jrebel-plugin.loggingLevel=debug


and see if it provides any further clues.

~~~
In terms of your stack trace:

5. I wonder whether that exception really is an enhancement issue.  The
line failing says:

Cannot instantiate abstract class.
 at com.xms.framework.api.domain.model.isis.AbstractMultiTenantUnnamedEnti
ty.jdoNewInstance(AbstractMultiTenantUnnamedEntity.java)

which looks like a rather odd thing for the framework to attempt.

6. Those "ValuationDimension$$EnhancerByCGLIB$$258191d0" classes are coming
from the WrapperFactory, which is probably from integration tests?  Not
quite sure what the interaction is there, shouldn't matter, I think, but a
bit odd.

Is it possible to strip back the example a bit, try something simpler in
the first case?

Thx
Dan




On 3 February 2014 15:15, GESCONSULTOR - Óscar Bou
<o....@gesconsultor.com>wrote:

>
> Hi again, Dan.
>
> I've configured it in our project, and updated to the latest trunk commit.
>
> An exception is thrown when executing a fixture for loading demo data.
> This kind of exception is an old friend, as it's commonly due to a
> un-enhanced class.
>
> ----
>
>
>
>
> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
> at
> org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
>  at
> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
> Caused by: java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>  at java.lang.reflect.Method.invoke(Method.java:597)
> at
> org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:258)
>  ... 35 more
> Caused by: javax.jdo.JDOFatalInternalException: Cannot instantiate
> abstract class.
> at
> com.xms.framework.api.domain.model.isis.AbstractMultiTenantUnnamedEntity.jdoNewInstance(AbstractMultiTenantUnnamedEntity.java)
>  at
> org.datanucleus.state.JDOStateManager.saveFields(JDOStateManager.java:693)
> at
> org.datanucleus.state.JDOStateManager.initialiseForPersistentNew(JDOStateManager.java:437)
>  at
> org.apache.isis.objectstore.jdo.datanucleus.JDOStateManagerForIsis.initialiseForPersistentNew(JDOStateManagerForIsis.java:86)
> at
> org.datanucleus.state.ObjectProviderFactoryImpl.newForPersistentNew(ObjectProviderFactoryImpl.java:232)
>  at
> org.datanucleus.ExecutionContextImpl.newObjectProviderForPersistentNew(ExecutionContextImpl.java:1415)
> at
> org.datanucleus.ExecutionContextImpl.persistObjectInternal(ExecutionContextImpl.java:2219)
>  at
> org.datanucleus.ExecutionContextImpl.persistObjectWork(ExecutionContextImpl.java:2066)
> at
> org.datanucleus.ExecutionContextImpl.persistObject(ExecutionContextImpl.java:1914)
>  at
> org.datanucleus.api.jdo.JDOPersistenceManager.jdoMakePersistent(JDOPersistenceManager.java:727)
> at
> org.datanucleus.api.jdo.JDOPersistenceManager.makePersistent(JDOPersistenceManager.java:752)
>  at
> org.apache.isis.objectstore.jdo.datanucleus.persistence.commands.DataNucleusCreateObjectCommand.execute(DataNucleusCreateObjectCommand.java:54)
> at
> org.apache.isis.objectstore.jdo.datanucleus.DataNucleusObjectStore.executeCommands(DataNucleusObjectStore.java:361)
>  at
> org.apache.isis.objectstore.jdo.datanucleus.DataNucleusObjectStore.execute(DataNucleusObjectStore.java:355)
> at
> org.apache.isis.core.runtime.system.transaction.IsisTransaction.doFlush(IsisTransaction.java:409)
>  at
> org.apache.isis.core.runtime.system.transaction.IsisTransaction.flush(IsisTransaction.java:358)
> at
> org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.flushTransaction(IsisTransactionManager.java:311)
>  at
> org.apache.isis.core.runtime.persistence.internal.RuntimeContextFromSession$7.flush(RuntimeContextFromSession.java:221)
> at
> org.apache.isis.core.metamodel.services.container.DomainObjectContainerDefault.flush(DomainObjectContainerDefault.java:229)
>  at
> com.xms.framework.api.domain.model.isis.AbstractXMSDomainObjectRepositoryAndFactory.persist(AbstractXMSDomainObjectRepositoryAndFactory.java:58)
> at
> com.xms.framework.measurement.domain.model.measure.BaseMeasures.createBaseMeasureAlienVault(BaseMeasures.java:95)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>  at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
>  at
> org.apache.isis.core.progmodel.facets.actions.invoke.ActionInvocationFacetViaMethod.invoke(ActionInvocationFacetViaMethod.java:172)
> at
> org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction$1.execute(ActionInvocationFacetWrapTransaction.java:57)
>  at
> org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction$1.execute(ActionInvocationFacetWrapTransaction.java:54)
> at
> org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.executeWithinTransaction(IsisTransactionManager.java:223)
>  at
> org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction.invoke(ActionInvocationFacetWrapTransaction.java:54)
> at
> org.apache.isis.core.metamodel.specloader.specimpl.ObjectActionImpl.execute(ObjectActionImpl.java:342)
>  at
> org.apache.isis.core.wrapper.internal.DomainObjectInvocationHandler.handleActionMethod(DomainObjectInvocationHandler.java:509)
> at
> org.apache.isis.core.wrapper.internal.DomainObjectInvocationHandler.invoke(DomainObjectInvocationHandler.java:236)
>  at
> org.apache.isis.core.wrapper.internal.InvocationHandlerMethodInterceptor.intercept(InvocationHandlerMethodInterceptor.java:37)
> at
> com.xms.framework.measurement.domain.model.measure.BaseMeasures$$EnhancerByCGLIB$$5b26939b.createBaseMeasureAlienVault(<generated>)
>  at
> com.xms.framework.measurement.domain.model.measure.BaseMeasures.createBaseMeasuresFromAlienVaultTemplateCatalog(BaseMeasures.java:172)
> at
> com.xms.framework.measurement.fixtures.MeasurementFixture.installMeasurementFixture(MeasurementFixture.java:46)
>  at
> com.xms.framework.measurement.fixtures.MeasurementFixture.install(MeasurementFixture.java:34)
> at
> com.xms.framework.measurement.fixtures.MeasurementFixtureService.installDemoData(MeasurementFixtureService.java:23)
>  at
> com.xms.framework.continuity.fixtures.BCMFixture.installMeasurementFixture(BCMFixture.java:128)
> at
> com.xms.framework.continuity.fixtures.BCMFixture.install(BCMFixture.java:42)
>  at
> com.xms.framework.continuity.fixtures.BCMFixtureService.installDemoData(BCMFixtureService.java:28)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>  at java.lang.reflect.Method.invoke(Method.java:597)
> at
> org.apache.isis.core.progmodel.facets.actions.invoke.ActionInvocationFacetViaMethod.invoke(ActionInvocationFacetViaMethod.java:172)
>  at
> org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction$1.execute(ActionInvocationFacetWrapTransaction.java:57)
> at
> org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction$1.execute(ActionInvocationFacetWrapTransaction.java:54)
>  at
> org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.executeWithinTransaction(IsisTransactionManager.java:223)
> at
> org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction.invoke(ActionInvocationFacetWrapTransaction.java:54)
>  at
> org.apache.isis.core.metamodel.specloader.specimpl.ObjectActionImpl.execute(ObjectActionImpl.java:342)
> at
> org.apache.isis.viewer.wicket.model.models.ActionModel.executeAction(ActionModel.java:434)
>  at
> org.apache.isis.viewer.wicket.model.models.ActionModel.load(ActionModel.java:421)
> at
> org.apache.isis.viewer.wicket.model.models.ActionModel.load(ActionModel.java:73)
>  at
> org.apache.wicket.model.LoadableDetachableModel.getObject(LoadableDetachableModel.java:121)
> at
> org.apache.isis.viewer.wicket.ui.components.actions.ActionPanel.executeActionHandlingApplicationExceptions(ActionPanel.java:291)
>  at
> org.apache.isis.viewer.wicket.ui.components.actions.ActionPanel.executeActionOnTargetAndProcessResults(ActionPanel.java:200)
> at
> org.apache.isis.viewer.wicket.ui.components.actions.ActionPanel.executeActionAndProcessResults(ActionPanel.java:147)
>  at
> org.apache.isis.viewer.wicket.ui.components.actions.ActionPanel.buildGui(ActionPanel.java:86)
> at
> org.apache.isis.viewer.wicket.ui.components.actions.ActionPanel.<init>(ActionPanel.java:79)
>  at
> org.apache.isis.viewer.wicket.ui.components.actions.ActionPanelFactory.createComponent(ActionPanelFactory.java:49)
> at
> org.apache.isis.viewer.wicket.viewer.registries.components.ComponentFactoryRegistryDefault.createComponent(ComponentFactoryRegistryDefault.java:129)
>  at
> org.apache.isis.viewer.wicket.ui.components.widgets.cssmenu.ActionLinkFactoryAbstract$1.onClick(ActionLinkFactoryAbstract.java:104)
> at org.apache.wicket.ajax.markup.html.AjaxLink$1.onEvent(AjaxLink.java:86)
>  at
> org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:123)
> at
> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:626)
>  ... 40 more
> 16:06:12,662  [RequestCycleExtra    597516262@qtp-1626371610-0 WARN ]
>  ********************************
> 2014-02-03 16:06:15 JRebel: JRebel will clear Wicket property caches
> because of the newly added key: 'noMatches'. Have you specified this key in
> Wicket's properties files?
> 16:06:16,769  [PropertiesFactory    597516262@qtp-1626371610-0 INFO ]
>  Loading properties files from
> jar:file:/Users/oscarboubou/.m2/repository/com/vaynberg/wicket/select2/wicket-select2/2.2.2/wicket-select2-2.2.2.jar!/com/vaynberg/wicket/select2/AbstractSelect2Choice.utf8.properties
> with loader
> org.apache.wicket.resource.UtfPropertiesFilePropertiesLoader@61b52c64
>
>
>
> ----
>
> Normally it's solved by going to the class, making a small change (i.e.,
> pressing intro and deleting the new line) forcing Eclipse to recompile and
> DN to enhance it again.
> I've done that, and after waiting for the enhancer to run, I've gone again
> to the wicket interface.
> That has "forced" JRebel to reload all classes inheriting from it. Seeing
> different kind of entries, including some classes named as
> "xxx$$EnhancerByCGLIB$$yyy".
>
>
> 2014-02-03 16:03:48 JRebel: Reloading class
> 'com.xms.framework.architecture.domain.model.EnterpriseArchitectureManagement'.
> 2014-02-03 16:03:48 JRebel: Reloading class
> 'com.xms.framework.architecture.domain.model.EnterpriseArchitectureModel'.
> 2014-02-03 16:03:48 JRebel: Reloading class
> 'com.xms.framework.architecture.domain.model.TypeOfCost'.
> 2014-02-03 16:03:48 JRebel: Reloading class
> 'com.xms.framework.architecture.domain.model.valuation.ValuationDimensionsSets'.
> 2014-02-03 16:03:48 JRebel: Reloading class
> 'com.xms.framework.architecture.domain.model.valuation.InformationAssetProperty'.
> 2014-02-03 16:03:48 JRebel: Reloading class
> 'com.xms.framework.architecture.domain.model.valuation.InformationAssetProperty$1'.
> 2014-02-03 16:03:48 JRebel: Reloading class
> 'com.xms.framework.architecture.domain.model.valuation.InformationSecurityProperty'.
> 2014-02-03 16:03:48 JRebel: Reinitialized class
> 'com.xms.framework.architecture.domain.model.valuation.InformationAssetProperty$1'.
> 2014-02-03 16:03:48 JRebel: Reloading class
> 'com.xms.framework.architecture.domain.model.valuation.InformationAssetProperty$2'.
> 2014-02-03 16:03:48 JRebel: Reinitialized class
> 'com.xms.framework.architecture.domain.model.valuation.InformationAssetProperty$2'.
> ....
> 2014-02-03 16:04:21 JRebel: Reloading class
> 'com.xms.framework.risk.domain.model.continuity.application.DataObjectBCMInformation'.
> 2014-02-03 16:04:22 JRebel: Reloading class
> 'com.xms.framework.risk.domain.model.continuity.technology.ArtifactBCMInformation'.
> 2014-02-03 16:04:24 JRebel: Reinitialized class
> 'com.xms.framework.architecture.domain.model.valuation.ValuationDimension$$EnhancerByCGLIB$$258191d0'.
> 2014-02-03 16:04:25 JRebel: Reinitialized class
> 'com.xms.framework.architecture.domain.model.valuation.ValuationDimensionsSet$$EnhancerByCGLIB$$b0eb1417'.
> 2014-02-03 16:04:26 JRebel: Reinitialized class
> 'com.xms.framework.architecture.domain.model.valuation.ImpactCriterion$$EnhancerByCGLIB$$206d735a'.
> 2014-02-03 16:04:26 JRebel: Reinitialized class
> 'com.xms.framework.architecture.domain.model.valuation.ImpactCriteriaSet$$EnhancerByCGLIB$$7038328c'.
> 2014-02-03 16:04:27 JRebel: Reinitialized class
> 'com.xms.framework.architecture.domain.model.valuation.ImpactScale$$EnhancerByCGLIB$$f6feaeb'.
> 2014-02-03 16:04:28 JRebel: Reinitialized class
> 'com.xms.framework.architecture.domain.model.valuation.ImpactScales$$EnhancerByCGLIB$$5b4eeeca'.
>
> ------
>
> But after reloading all classes, if I execute the action again, exactly
> the same initial exception occurs:
>
> Caused by: javax.jdo.JDOFatalInternalException: Cannot instantiate
> abstract class.
>  at
> com.xms.framework.api.domain.model.isis.AbstractMultiTenantUnnamedEntity.jdoNewInstance(AbstractMultiTenantUnnamedEntity.java)
> ...
>
>
> Thanks,
>
> Oscar
>
>
>
>
>
>
>
>
> El 03/02/2014, a las 08:20, GESCONSULTOR <o....@gesconsultor.com>
> escribió:
>
>
> Oh! I forgot to change the QuickStart pom!
>
> Sure that's it. I'll let you know.
>
> Thanks
>
> El 03/02/2014, a las 08:12, Dan Haywood <da...@haywood-associates.co.uk>
> escribió:
>
> Hi Oscar,
> You need to use trunk (1.4.0-SNAPSHOT) rather than 1.3.1; I think that's
> the problem.
> Let me know
> Cheers
> Dan
>
> Sorry to be brief, sent from my phone
> On 2 Feb 2014 19:08, "GESCONSULTOR - Óscar Bou" <o....@gesconsultor.com>
> wrote:
>
>
> Hi, Dan.
>
> I'm very excited about the possibility to use the JRebel plugin, as it can
> accelerate a lot the workflow.
> I've downloaded and configured it, and I'm working over the latest
> quickstart archetype.
>
> I've added 1 new property to the TodoItem entity, and it has not been
> showed on the interface.
>
> These are the detailed steps followed.
>
>
>
>
> 1. Quickstart prototype.
>
> I create a new folder and run maven to create a project based on the
> latest Isis quickstart:
>
> mvn archetype:generate      -D archetypeGroupId=org.apache.isis.archetype
>   -D archetypeArtifactId=quickstart_wicket_restful_jdo-archetype     -D
> archetypeVersion=1.3.1     -D groupId=com.mycompany     -D artifactId=myapp
>   -D version=1.0-SNAPSHOT     -B
>
>
> 2. JRebel configuration.
>
> I've installed JRebel, and on the JRebel Config Center I've marked the
> "dom" and "webapp" projects. to be followed for changes by JRebel.
>
> I've downloaded from [1] the
> danhaywood-isis-jrebel-plugin-1.0.0-SNAPSHOT.jar plugin and copied it on
> the lib folder of the "webapp" module.
>
> I've copied the ToDoApp-no-fixtures-PROTOTYPE.launch on the "webapp"
> module to a new ToDoApp-no-fixtures-PROTOTYPE-Rebel.launch file, and added:
>
> <stringAttribute
>     key="org.eclipse.jdt.launching.VM_ARGUMENTS"
>     value="${jrebel_args} -Drebel.log=false
> -Drebel.plugins=./lib/danhaywood-isis-jrebel-plugin-1.0.0-SNAPSHOT.jar
> -Disis-jrebel-plugin.packagePrefix=dom.simple -XX:MaxPermSize=128m"/>
>
> 3. DataNucleus.
>
> I assume that the "DataNucleus - auto-enhancement" option must be enabled
> on the "dom" module.
> That originates that, each time the Enhancer is executed (that's after any
> change on any file on the module) a JRebel dialog asks:
> "You are launching a JRebel-enabled application without the JRebel agent.
> JRebel will not work without it."
> For avoiding that, I've checked the "Don't perform this check again (you
> can restore it from preferences)", and have chosen the "Not this time"
> option.
>
> 4. Run the webapp.
>
> I've launched the newly created Eclipse configuration and navigated to "
> http://localhost:8080/wicket/".
> I've installed the fixtures.
>
> 5. Changes in code.
>
> I add a new field to the ToDoItem entity. The following message appears on
> Eclipse:
>
> Class 'xxx' has a new non-sttic field 'newField', it will be null on
> existing instances.
>
> But after refreshing the webapp entity page, the field it's not showed.
> I've waited enough time. In fact, the following messages have been logged:
>
> 2014-02-02 19:56:40 JRebel: Reloading class 'dom.todo.ToDoItem'.
> 19:56:40,515  [Native               1238094722@qtp-1337505800-5 DEBUG]
> SELECT
>
> "A0"."category","A0"."complete","A0"."cost","A0"."description","A0"."dueBy","A0"."notes","A0"."ownedBy","A0"."subcategory","A0"."version"
> FROM "ToDoItem" "A0" WHERE "A0"."id" = <11>
> 2014-02-02 19:56:40 JRebel: Reloading class 'dom.todo.ToDoItem$Category'.
> 2014-02-02 19:56:40 JRebel: Reloading class 'dom.todo.ToDoItem$Category$1'.
> 2014-02-02 19:56:40 JRebel: Reloading class
> 'dom.todo.ToDoItem$Subcategory'.
> 2014-02-02 19:56:40 JRebel: Reloading class
> 'dom.todo.ToDoItem$Subcategory$1'.
> 2014-02-02 19:56:40 JRebel: Reinitialized class
> 'dom.todo.ToDoItem$Subcategory'.
> 2014-02-02 19:56:40 JRebel: Reinitialized class
> 'dom.todo.ToDoItem$Category$1'.
> 2014-02-02 19:56:40 JRebel: Reloading class 'dom.todo.ToDoItem$Category$2'.
> 2014-02-02 19:56:40 JRebel: Reinitialized class
> 'dom.todo.ToDoItem$Category$2'.
> 2014-02-02 19:56:40 JRebel: Reloading class 'dom.todo.ToDoItem$Category$3'.
> 2014-02-02 19:56:40 JRebel: Reinitialized class
> 'dom.todo.ToDoItem$Category$3'.
> 2014-02-02 19:56:40 JRebel: Reinitialized class
> 'dom.todo.ToDoItem$Category'.
> 19:56:40,697  [Native               1238094722@qtp-1337505800-5 DEBUG]
> SELECT 'dom.todo.ToDoItem' AS
>
> NUCLEUS_TYPE,"A1"."category","A1"."complete","A1"."cost","A1"."description","A1"."dueBy","A1"."notes","A1"."ownedBy","A1"."subcategory","A1"."id","A1"."version"
> FROM "ToDoItemDependencies" "A0" INNER JOIN "ToDoItem" "A1" ON
> "A0"."dependentId" = "A1"."id" WHERE "A0"."dependingId" = <11>
> 2014-02-02 19:56:40 JRebel: Reloading class
> 'dom.todo.ToDoItem$DependenciesComparator'.
> 2014-02-02 19:56:40 JRebel: Reloading class
> 'dom.todo.ToDoItem$DependenciesComparator$1'.
> 19:56:40,771  [Native               1238094722@qtp-1337505800-5 DEBUG]
> SELECT 'dom.todo.ToDoItem' AS
>
> NUCLEUS_TYPE,"A0"."category","A0"."complete","A0"."cost","A0"."description","A0"."dueBy","A0"."notes","A0"."ownedBy","A0"."subcategory","A0"."id","A0"."version"
> FROM "ToDoItem" "A0" WHERE "A0"."ownedBy" = <'sven'> AND "A0"."category" =
> <'Professional'>
> 19:56:40,789  [Native               1238094722@qtp-1337505800-5 DEBUG]
> SELECT "A0"."attachment","A0"."version" FROM "ToDoItem" "A0" WHERE
> "A0"."id" = <9>
> 19:56:40,806  [Native               1238094722@qtp-1337505800-5 DEBUG]
> SELECT "A0"."attachment","A0"."version" FROM "ToDoItem" "A0" WHERE
> "A0"."id" = <10>
> 19:56:40,812  [Native               1238094722@qtp-1337505800-5 DEBUG]
> SELECT "A0"."attachment","A0"."version" FROM "ToDoItem" "A0" WHERE
> "A0"."id" = <8>
> 19:56:41,351  [ResourceServlet      447422450@qtp-1337505800-2 INFO ]
> request: css/application.css
> 19:56:41,351  [ResourceServlet      1203999762@qtp-1337505800-0 INFO ]
> request: scripts/application.js
> 19:56:41,362  [ResourceServlet      1238094722@qtp-1337505800-5 INFO ]
> request: images/spinning-icon.gif
>
>
>
> On this state, if I press Edit and try to change the ToDoItem description,
> the following exception is logged:
>
>
>
> org.mortbay.jetty.bio.SocketConnector$Connection#run(SocketConnector.java:228)
>
>
> org.mortbay.thread.QueuedThreadPool$PoolThread#run(QueuedThreadPool.java:582)
> java.lang.NullPointerException
>
>
> org.datanucleus.state.JDOStateManager#setObjectField(JDOStateManager.java:1843)
> dom.todo.ToDoItem#setSubcategory(ToDoItem.java:-1)
>
>
> sun.reflect.NativeMethodAccessorImpl#invoke0(NativeMethodAccessorImpl.java:-2)
>
>
> sun.reflect.NativeMethodAccessorImpl#invoke(NativeMethodAccessorImpl.java:39)
>
>
> sun.reflect.DelegatingMethodAccessorImpl#invoke(DelegatingMethodAccessorImpl.java:25)
> java.lang.reflect.Method#invoke(Method.java:597)
>
>
> org.apache.isis.core.commons.lang.MethodExtensions#invoke(MethodExtensions.java:50)
>
>
> org.apache.isis.core.commons.lang.MethodExtensions#invoke(MethodExtensions.java:45)
>
>
> org.apache.isis.core.metamodel.adapter.util.AdapterInvokeUtils#invoke(AdapterInvokeUtils.java:44)
>
>
> org.apache.isis.core.progmodel.facets.properties.modify.PropertyClearFacetViaSetterMethod#clearProperty(PropertyClearFacetViaSetterMethod.java:62)
>
>
> org.apache.isis.core.runtime.transaction.facets.PropertyClearFacetWrapTransaction$1#execute(PropertyClearFacetWrapTransaction.java:55)
>
>
> org.apache.isis.core.runtime.system.transaction.IsisTransactionManager#executeWithinTransaction(IsisTransactionManager.java:175)
>
>
> org.apache.isis.core.runtime.transaction.facets.PropertyClearFacetWrapTransaction#clearProperty(PropertyClearFacetWrapTransaction.java:52)
>
>
> org.apache.isis.core.metamodel.specloader.specimpl.OneToOneAssociationImpl#clearValue(OneToOneAssociationImpl.java:200)
>
>
> org.apache.isis.core.metamodel.specloader.specimpl.OneToOneAssociationImpl#set(OneToOneAssociationImpl.java:164)
>
>
> org.apache.isis.viewer.wicket.model.models.EntityModel#apply(EntityModel.java:427)
>
>
> org.apache.isis.viewer.wicket.ui.components.entity.properties.EntityPropertiesForm$2#onSubmit(EntityPropertiesForm.java:365)
> org.apache.wicket.markup.html.form.Form#delegateSubmit(Form.java:1253)
> org.apache.wicket.markup.html.form.Form#process(Form.java:925)
>
>
> org.apache.isis.viewer.wicket.ui.panels.FormAbstract#process(FormAbstract.java:118)
> org.apache.wicket.markup.html.form.Form#onFormSubmitted(Form.java:771)
> org.apache.wicket.markup.html.form.Form#onFormSubmitted(Form.java:704)
>
>
> sun.reflect.NativeMethodAccessorImpl#invoke0(NativeMethodAccessorImpl.java:-2)
>
>
> sun.reflect.NativeMethodAccessorImpl#invoke(NativeMethodAccessorImpl.java:39)
>
>
> sun.reflect.DelegatingMethodAccessorImpl#invoke(DelegatingMethodAccessorImpl.java:25)
> java.lang.reflect.Method#invoke(Method.java:597)
>
>
> org.apache.wicket.RequestListenerInterface#internalInvoke(RequestListenerInterface.java:258)
>
>
> org.apache.wicket.RequestListenerInterface#invoke(RequestListenerInterface.java:216)
>
>
> org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler#invokeListener(ListenerInterfaceRequestHandler.java:240)
>
>
> org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler#respond(ListenerInterfaceRequestHandler.java:226)
>
>
> org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor#respond(RequestCycle.java:861)
>
>
> org.apache.wicket.request.RequestHandlerStack#execute(RequestHandlerStack.java:64)
> org.apache.wicket.request.cycle.RequestCycle#execute(RequestCycle.java:261)
>
>
> org.apache.wicket.request.cycle.RequestCycle#processRequest(RequestCycle.java:218)
>
>
> org.apache.wicket.request.cycle.RequestCycle#processRequestAndDetach(RequestCycle.java:289)
>
>
> org.apache.wicket.protocol.http.WicketFilter#processRequestCycle(WicketFilter.java:259)
>
>
> org.apache.wicket.protocol.http.WicketFilter#processRequest(WicketFilter.java:201)
>
>
> org.apache.wicket.protocol.http.WicketFilter#doFilter(WicketFilter.java:282)
>
>
> org.mortbay.jetty.servlet.ServletHandler$CachedChain#doFilter(ServletHandler.java:1212)
>
>
> org.apache.shiro.web.servlet.AbstractShiroFilter#executeChain(AbstractShiroFilter.java:449)
>
>
> org.apache.shiro.web.servlet.AbstractShiroFilter$1#call(AbstractShiroFilter.java:365)
>
>
> org.apache.shiro.subject.support.SubjectCallable#doCall(SubjectCallable.java:90)
>
>
> org.apache.shiro.subject.support.SubjectCallable#call(SubjectCallable.java:83)
>
>
> org.apache.shiro.subject.support.DelegatingSubject#execute(DelegatingSubject.java:383)
>
>
> org.apache.shiro.web.servlet.AbstractShiroFilter#doFilterInternal(AbstractShiroFilter.java:362)
>
>
> org.apache.shiro.web.servlet.OncePerRequestFilter#doFilter(OncePerRequestFilter.java:125)
>
>
> org.mortbay.jetty.servlet.ServletHandler$CachedChain#doFilter(ServletHandler.java:1212)
> org.mortbay.jetty.servlet.ServletHandler#handle(ServletHandler.java:399)
> org.mortbay.jetty.security.SecurityHandler#handle(SecurityHandler.java:216)
> org.mortbay.jetty.servlet.SessionHandler#handle(SessionHandler.java:182)
> org.mortbay.jetty.handler.ContextHandler#__handle(ContextHandler.java:766)
> org.mortbay.jetty.handler.ContextHandler#handle(ContextHandler.java:-1)
> org.mortbay.jetty.webapp.WebAppContext#handle(WebAppContext.java:450)
> org.mortbay.jetty.handler.HandlerWrapper#handle(HandlerWrapper.java:152)
> org.mortbay.jetty.Server#handle(Server.java:326)
> org.mortbay.jetty.HttpConnection#handleRequest(HttpConnection.java:542)
>
>
> org.mortbay.jetty.HttpConnection$RequestHandler#content(HttpConnection.java:945)
> org.mortbay.jetty.HttpParser#parseNext(HttpParser.java:756)
> org.mortbay.jetty.HttpParser#parseAvailable(HttpParser.java:218)
> org.mortbay.jetty.HttpConnection#handle(HttpConnection.java:404)
>
>
> org.mortbay.jetty.bio.SocketConnector$Connection#run(SocketConnector.java:228)
>
>
> org.mortbay.thread.QueuedThreadPool$PoolThread#run(QueuedThreadPool.java:582)
>
>
> [1] https://github.com/danhaywood/isis-jrebel-plugin.git
>
>
>
> Óscar Bou Bou
> Responsable de Producto
> Auditor Jefe de Certificación ISO 27001 en BSI
> CISA, CRISC, APMG ISO 20000, ITIL-F
>
>    902 900 231 / 620 267 520
>    http://www.twitter.com/oscarbou
>
>    http://es.linkedin.com/in/oscarbou
>
>    http://www.GesConsultor.com <http://www.gesconsultor.com/>
>
>
>
> Este mensaje y los ficheros anexos son confidenciales. Los mismos
> contienen información reservada que no puede ser difundida. Si usted ha
> recibido este correo por error, tenga la amabilidad de eliminarlo de su
> sistema y avisar al remitente mediante reenvío a su dirección electrónica;
> no deberá copiar el mensaje ni divulgar su contenido a ninguna persona.
> Su dirección de correo electrónico junto a sus datos personales constan en
> un fichero titularidad de Gesdatos Software, S.L. cuya finalidad es la de
> mantener el contacto con Ud. Si quiere saber de qué información disponemos
> de Ud., modificarla, y en su caso, cancelarla, puede hacerlo enviando un
> escrito al efecto, acompañado de una fotocopia de su D.N.I. a la siguiente
> dirección: Gesdatos Software, S.L. , Paseo de la Castellana, 153 bajo -
> 28046 (Madrid), y Avda. Cortes Valencianas num. 50, 1ºC - 46015 (Valencia).
> Asimismo, es su responsabilidad comprobar que este mensaje o sus archivos
> adjuntos no contengan virus informáticos, y en caso que los tuvieran
> eliminarlos.
>
>
>
>
>
>

Re: JRebel support

Posted by GESCONSULTOR - Óscar Bou <o....@gesconsultor.com>.
Hi again, Dan.

I've configured it in our project, and updated to the latest trunk commit. 

An exception is thrown when executing a fixture for loading demo data. This kind of exception is an old friend, as it's commonly due to a un-enhanced class. 

----




	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
	at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:258)
	... 35 more
Caused by: javax.jdo.JDOFatalInternalException: Cannot instantiate abstract class.
	at com.xms.framework.api.domain.model.isis.AbstractMultiTenantUnnamedEntity.jdoNewInstance(AbstractMultiTenantUnnamedEntity.java)
	at org.datanucleus.state.JDOStateManager.saveFields(JDOStateManager.java:693)
	at org.datanucleus.state.JDOStateManager.initialiseForPersistentNew(JDOStateManager.java:437)
	at org.apache.isis.objectstore.jdo.datanucleus.JDOStateManagerForIsis.initialiseForPersistentNew(JDOStateManagerForIsis.java:86)
	at org.datanucleus.state.ObjectProviderFactoryImpl.newForPersistentNew(ObjectProviderFactoryImpl.java:232)
	at org.datanucleus.ExecutionContextImpl.newObjectProviderForPersistentNew(ExecutionContextImpl.java:1415)
	at org.datanucleus.ExecutionContextImpl.persistObjectInternal(ExecutionContextImpl.java:2219)
	at org.datanucleus.ExecutionContextImpl.persistObjectWork(ExecutionContextImpl.java:2066)
	at org.datanucleus.ExecutionContextImpl.persistObject(ExecutionContextImpl.java:1914)
	at org.datanucleus.api.jdo.JDOPersistenceManager.jdoMakePersistent(JDOPersistenceManager.java:727)
	at org.datanucleus.api.jdo.JDOPersistenceManager.makePersistent(JDOPersistenceManager.java:752)
	at org.apache.isis.objectstore.jdo.datanucleus.persistence.commands.DataNucleusCreateObjectCommand.execute(DataNucleusCreateObjectCommand.java:54)
	at org.apache.isis.objectstore.jdo.datanucleus.DataNucleusObjectStore.executeCommands(DataNucleusObjectStore.java:361)
	at org.apache.isis.objectstore.jdo.datanucleus.DataNucleusObjectStore.execute(DataNucleusObjectStore.java:355)
	at org.apache.isis.core.runtime.system.transaction.IsisTransaction.doFlush(IsisTransaction.java:409)
	at org.apache.isis.core.runtime.system.transaction.IsisTransaction.flush(IsisTransaction.java:358)
	at org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.flushTransaction(IsisTransactionManager.java:311)
	at org.apache.isis.core.runtime.persistence.internal.RuntimeContextFromSession$7.flush(RuntimeContextFromSession.java:221)
	at org.apache.isis.core.metamodel.services.container.DomainObjectContainerDefault.flush(DomainObjectContainerDefault.java:229)
	at com.xms.framework.api.domain.model.isis.AbstractXMSDomainObjectRepositoryAndFactory.persist(AbstractXMSDomainObjectRepositoryAndFactory.java:58)
	at com.xms.framework.measurement.domain.model.measure.BaseMeasures.createBaseMeasureAlienVault(BaseMeasures.java:95)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.isis.core.progmodel.facets.actions.invoke.ActionInvocationFacetViaMethod.invoke(ActionInvocationFacetViaMethod.java:172)
	at org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction$1.execute(ActionInvocationFacetWrapTransaction.java:57)
	at org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction$1.execute(ActionInvocationFacetWrapTransaction.java:54)
	at org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.executeWithinTransaction(IsisTransactionManager.java:223)
	at org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction.invoke(ActionInvocationFacetWrapTransaction.java:54)
	at org.apache.isis.core.metamodel.specloader.specimpl.ObjectActionImpl.execute(ObjectActionImpl.java:342)
	at org.apache.isis.core.wrapper.internal.DomainObjectInvocationHandler.handleActionMethod(DomainObjectInvocationHandler.java:509)
	at org.apache.isis.core.wrapper.internal.DomainObjectInvocationHandler.invoke(DomainObjectInvocationHandler.java:236)
	at org.apache.isis.core.wrapper.internal.InvocationHandlerMethodInterceptor.intercept(InvocationHandlerMethodInterceptor.java:37)
	at com.xms.framework.measurement.domain.model.measure.BaseMeasures$$EnhancerByCGLIB$$5b26939b.createBaseMeasureAlienVault(<generated>)
	at com.xms.framework.measurement.domain.model.measure.BaseMeasures.createBaseMeasuresFromAlienVaultTemplateCatalog(BaseMeasures.java:172)
	at com.xms.framework.measurement.fixtures.MeasurementFixture.installMeasurementFixture(MeasurementFixture.java:46)
	at com.xms.framework.measurement.fixtures.MeasurementFixture.install(MeasurementFixture.java:34)
	at com.xms.framework.measurement.fixtures.MeasurementFixtureService.installDemoData(MeasurementFixtureService.java:23)
	at com.xms.framework.continuity.fixtures.BCMFixture.installMeasurementFixture(BCMFixture.java:128)
	at com.xms.framework.continuity.fixtures.BCMFixture.install(BCMFixture.java:42)
	at com.xms.framework.continuity.fixtures.BCMFixtureService.installDemoData(BCMFixtureService.java:28)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.isis.core.progmodel.facets.actions.invoke.ActionInvocationFacetViaMethod.invoke(ActionInvocationFacetViaMethod.java:172)
	at org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction$1.execute(ActionInvocationFacetWrapTransaction.java:57)
	at org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction$1.execute(ActionInvocationFacetWrapTransaction.java:54)
	at org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.executeWithinTransaction(IsisTransactionManager.java:223)
	at org.apache.isis.core.runtime.transaction.facets.ActionInvocationFacetWrapTransaction.invoke(ActionInvocationFacetWrapTransaction.java:54)
	at org.apache.isis.core.metamodel.specloader.specimpl.ObjectActionImpl.execute(ObjectActionImpl.java:342)
	at org.apache.isis.viewer.wicket.model.models.ActionModel.executeAction(ActionModel.java:434)
	at org.apache.isis.viewer.wicket.model.models.ActionModel.load(ActionModel.java:421)
	at org.apache.isis.viewer.wicket.model.models.ActionModel.load(ActionModel.java:73)
	at org.apache.wicket.model.LoadableDetachableModel.getObject(LoadableDetachableModel.java:121)
	at org.apache.isis.viewer.wicket.ui.components.actions.ActionPanel.executeActionHandlingApplicationExceptions(ActionPanel.java:291)
	at org.apache.isis.viewer.wicket.ui.components.actions.ActionPanel.executeActionOnTargetAndProcessResults(ActionPanel.java:200)
	at org.apache.isis.viewer.wicket.ui.components.actions.ActionPanel.executeActionAndProcessResults(ActionPanel.java:147)
	at org.apache.isis.viewer.wicket.ui.components.actions.ActionPanel.buildGui(ActionPanel.java:86)
	at org.apache.isis.viewer.wicket.ui.components.actions.ActionPanel.<init>(ActionPanel.java:79)
	at org.apache.isis.viewer.wicket.ui.components.actions.ActionPanelFactory.createComponent(ActionPanelFactory.java:49)
	at org.apache.isis.viewer.wicket.viewer.registries.components.ComponentFactoryRegistryDefault.createComponent(ComponentFactoryRegistryDefault.java:129)
	at org.apache.isis.viewer.wicket.ui.components.widgets.cssmenu.ActionLinkFactoryAbstract$1.onClick(ActionLinkFactoryAbstract.java:104)
	at org.apache.wicket.ajax.markup.html.AjaxLink$1.onEvent(AjaxLink.java:86)
	at org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:123)
	at org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:626)
	... 40 more
16:06:12,662  [RequestCycleExtra    597516262@qtp-1626371610-0 WARN ]  ********************************
2014-02-03 16:06:15 JRebel: JRebel will clear Wicket property caches because of the newly added key: 'noMatches'. Have you specified this key in Wicket's properties files?
16:06:16,769  [PropertiesFactory    597516262@qtp-1626371610-0 INFO ]  Loading properties files from jar:file:/Users/oscarboubou/.m2/repository/com/vaynberg/wicket/select2/wicket-select2/2.2.2/wicket-select2-2.2.2.jar!/com/vaynberg/wicket/select2/AbstractSelect2Choice.utf8.properties with loader org.apache.wicket.resource.UtfPropertiesFilePropertiesLoader@61b52c64



----

Normally it's solved by going to the class, making a small change (i.e., pressing intro and deleting the new line) forcing Eclipse to recompile and DN to enhance it again. 
I've done that, and after waiting for the enhancer to run, I've gone again to the wicket interface. 
That has "forced" JRebel to reload all classes inheriting from it. Seeing different kind of entries, including some classes named as "xxx$$EnhancerByCGLIB$$yyy".

 
2014-02-03 16:03:48 JRebel: Reloading class 'com.xms.framework.architecture.domain.model.EnterpriseArchitectureManagement'.
2014-02-03 16:03:48 JRebel: Reloading class 'com.xms.framework.architecture.domain.model.EnterpriseArchitectureModel'.
2014-02-03 16:03:48 JRebel: Reloading class 'com.xms.framework.architecture.domain.model.TypeOfCost'.
2014-02-03 16:03:48 JRebel: Reloading class 'com.xms.framework.architecture.domain.model.valuation.ValuationDimensionsSets'.
2014-02-03 16:03:48 JRebel: Reloading class 'com.xms.framework.architecture.domain.model.valuation.InformationAssetProperty'.
2014-02-03 16:03:48 JRebel: Reloading class 'com.xms.framework.architecture.domain.model.valuation.InformationAssetProperty$1'.
2014-02-03 16:03:48 JRebel: Reloading class 'com.xms.framework.architecture.domain.model.valuation.InformationSecurityProperty'.
2014-02-03 16:03:48 JRebel: Reinitialized class 'com.xms.framework.architecture.domain.model.valuation.InformationAssetProperty$1'.
2014-02-03 16:03:48 JRebel: Reloading class 'com.xms.framework.architecture.domain.model.valuation.InformationAssetProperty$2'.
2014-02-03 16:03:48 JRebel: Reinitialized class 'com.xms.framework.architecture.domain.model.valuation.InformationAssetProperty$2'.
....
2014-02-03 16:04:21 JRebel: Reloading class 'com.xms.framework.risk.domain.model.continuity.application.DataObjectBCMInformation'.
2014-02-03 16:04:22 JRebel: Reloading class 'com.xms.framework.risk.domain.model.continuity.technology.ArtifactBCMInformation'.
2014-02-03 16:04:24 JRebel: Reinitialized class 'com.xms.framework.architecture.domain.model.valuation.ValuationDimension$$EnhancerByCGLIB$$258191d0'.
2014-02-03 16:04:25 JRebel: Reinitialized class 'com.xms.framework.architecture.domain.model.valuation.ValuationDimensionsSet$$EnhancerByCGLIB$$b0eb1417'.
2014-02-03 16:04:26 JRebel: Reinitialized class 'com.xms.framework.architecture.domain.model.valuation.ImpactCriterion$$EnhancerByCGLIB$$206d735a'.
2014-02-03 16:04:26 JRebel: Reinitialized class 'com.xms.framework.architecture.domain.model.valuation.ImpactCriteriaSet$$EnhancerByCGLIB$$7038328c'.
2014-02-03 16:04:27 JRebel: Reinitialized class 'com.xms.framework.architecture.domain.model.valuation.ImpactScale$$EnhancerByCGLIB$$f6feaeb'.
2014-02-03 16:04:28 JRebel: Reinitialized class 'com.xms.framework.architecture.domain.model.valuation.ImpactScales$$EnhancerByCGLIB$$5b4eeeca'.

------

But after reloading all classes, if I execute the action again, exactly the same initial exception occurs:

Caused by: javax.jdo.JDOFatalInternalException: Cannot instantiate abstract class.
	at com.xms.framework.api.domain.model.isis.AbstractMultiTenantUnnamedEntity.jdoNewInstance(AbstractMultiTenantUnnamedEntity.java)
...


Thanks,

Oscar








El 03/02/2014, a las 08:20, GESCONSULTOR <o....@gesconsultor.com> escribió:

> Oh! I forgot to change the QuickStart pom!
> 
> Sure that's it. I'll let you know.
> 
> Thanks
> 
>> El 03/02/2014, a las 08:12, Dan Haywood <da...@haywood-associates.co.uk> escribió:
>> 
>> Hi Oscar,
>> You need to use trunk (1.4.0-SNAPSHOT) rather than 1.3.1; I think that's
>> the problem.
>> Let me know
>> Cheers
>> Dan
>> 
>> Sorry to be brief, sent from my phone
>> On 2 Feb 2014 19:08, "GESCONSULTOR - Óscar Bou" <o....@gesconsultor.com>
>> wrote:
>> 
>>> 
>>> Hi, Dan.
>>> 
>>> I'm very excited about the possibility to use the JRebel plugin, as it can
>>> accelerate a lot the workflow.
>>> I've downloaded and configured it, and I'm working over the latest
>>> quickstart archetype.
>>> 
>>> I've added 1 new property to the TodoItem entity, and it has not been
>>> showed on the interface.
>>> 
>>> These are the detailed steps followed.
>>> 
>>> 
>>> 
>>> 
>>> 1. Quickstart prototype.
>>> 
>>> I create a new folder and run maven to create a project based on the
>>> latest Isis quickstart:
>>> 
>>> mvn archetype:generate      -D archetypeGroupId=org.apache.isis.archetype
>>>   -D archetypeArtifactId=quickstart_wicket_restful_jdo-archetype     -D
>>> archetypeVersion=1.3.1     -D groupId=com.mycompany     -D artifactId=myapp
>>>   -D version=1.0-SNAPSHOT     -B
>>> 
>>> 
>>> 2. JRebel configuration.
>>> 
>>> I've installed JRebel, and on the JRebel Config Center I've marked the
>>> "dom" and "webapp" projects. to be followed for changes by JRebel.
>>> 
>>> I've downloaded from [1] the
>>> danhaywood-isis-jrebel-plugin-1.0.0-SNAPSHOT.jar plugin and copied it on
>>> the lib folder of the "webapp" module.
>>> 
>>> I've copied the ToDoApp-no-fixtures-PROTOTYPE.launch on the "webapp"
>>> module to a new ToDoApp-no-fixtures-PROTOTYPE-Rebel.launch file, and added:
>>> 
>>> <stringAttribute
>>>     key="org.eclipse.jdt.launching.VM_ARGUMENTS"
>>>     value="${jrebel_args} -Drebel.log=false
>>> -Drebel.plugins=./lib/danhaywood-isis-jrebel-plugin-1.0.0-SNAPSHOT.jar
>>> -Disis-jrebel-plugin.packagePrefix=dom.simple -XX:MaxPermSize=128m"/>
>>> 
>>> 3. DataNucleus.
>>> 
>>> I assume that the "DataNucleus - auto-enhancement" option must be enabled
>>> on the "dom" module.
>>> That originates that, each time the Enhancer is executed (that's after any
>>> change on any file on the module) a JRebel dialog asks:
>>> "You are launching a JRebel-enabled application without the JRebel agent.
>>> JRebel will not work without it."
>>> For avoiding that, I've checked the "Don't perform this check again (you
>>> can restore it from preferences)", and have chosen the "Not this time"
>>> option.
>>> 
>>> 4. Run the webapp.
>>> 
>>> I've launched the newly created Eclipse configuration and navigated to "
>>> http://localhost:8080/wicket/".
>>> I've installed the fixtures.
>>> 
>>> 5. Changes in code.
>>> 
>>> I add a new field to the ToDoItem entity. The following message appears on
>>> Eclipse:
>>> 
>>> Class 'xxx' has a new non-sttic field 'newField', it will be null on
>>> existing instances.
>>> 
>>> But after refreshing the webapp entity page, the field it's not showed.
>>> I've waited enough time. In fact, the following messages have been logged:
>>> 
>>> 2014-02-02 19:56:40 JRebel: Reloading class 'dom.todo.ToDoItem'.
>>> 19:56:40,515  [Native               1238094722@qtp-1337505800-5 DEBUG]
>>> SELECT
>>> "A0"."category","A0"."complete","A0"."cost","A0"."description","A0"."dueBy","A0"."notes","A0"."ownedBy","A0"."subcategory","A0"."version"
>>> FROM "ToDoItem" "A0" WHERE "A0"."id" = <11>
>>> 2014-02-02 19:56:40 JRebel: Reloading class 'dom.todo.ToDoItem$Category'.
>>> 2014-02-02 19:56:40 JRebel: Reloading class 'dom.todo.ToDoItem$Category$1'.
>>> 2014-02-02 19:56:40 JRebel: Reloading class
>>> 'dom.todo.ToDoItem$Subcategory'.
>>> 2014-02-02 19:56:40 JRebel: Reloading class
>>> 'dom.todo.ToDoItem$Subcategory$1'.
>>> 2014-02-02 19:56:40 JRebel: Reinitialized class
>>> 'dom.todo.ToDoItem$Subcategory'.
>>> 2014-02-02 19:56:40 JRebel: Reinitialized class
>>> 'dom.todo.ToDoItem$Category$1'.
>>> 2014-02-02 19:56:40 JRebel: Reloading class 'dom.todo.ToDoItem$Category$2'.
>>> 2014-02-02 19:56:40 JRebel: Reinitialized class
>>> 'dom.todo.ToDoItem$Category$2'.
>>> 2014-02-02 19:56:40 JRebel: Reloading class 'dom.todo.ToDoItem$Category$3'.
>>> 2014-02-02 19:56:40 JRebel: Reinitialized class
>>> 'dom.todo.ToDoItem$Category$3'.
>>> 2014-02-02 19:56:40 JRebel: Reinitialized class
>>> 'dom.todo.ToDoItem$Category'.
>>> 19:56:40,697  [Native               1238094722@qtp-1337505800-5 DEBUG]
>>> SELECT 'dom.todo.ToDoItem' AS
>>> NUCLEUS_TYPE,"A1"."category","A1"."complete","A1"."cost","A1"."description","A1"."dueBy","A1"."notes","A1"."ownedBy","A1"."subcategory","A1"."id","A1"."version"
>>> FROM "ToDoItemDependencies" "A0" INNER JOIN "ToDoItem" "A1" ON
>>> "A0"."dependentId" = "A1"."id" WHERE "A0"."dependingId" = <11>
>>> 2014-02-02 19:56:40 JRebel: Reloading class
>>> 'dom.todo.ToDoItem$DependenciesComparator'.
>>> 2014-02-02 19:56:40 JRebel: Reloading class
>>> 'dom.todo.ToDoItem$DependenciesComparator$1'.
>>> 19:56:40,771  [Native               1238094722@qtp-1337505800-5 DEBUG]
>>> SELECT 'dom.todo.ToDoItem' AS
>>> NUCLEUS_TYPE,"A0"."category","A0"."complete","A0"."cost","A0"."description","A0"."dueBy","A0"."notes","A0"."ownedBy","A0"."subcategory","A0"."id","A0"."version"
>>> FROM "ToDoItem" "A0" WHERE "A0"."ownedBy" = <'sven'> AND "A0"."category" =
>>> <'Professional'>
>>> 19:56:40,789  [Native               1238094722@qtp-1337505800-5 DEBUG]
>>> SELECT "A0"."attachment","A0"."version" FROM "ToDoItem" "A0" WHERE
>>> "A0"."id" = <9>
>>> 19:56:40,806  [Native               1238094722@qtp-1337505800-5 DEBUG]
>>> SELECT "A0"."attachment","A0"."version" FROM "ToDoItem" "A0" WHERE
>>> "A0"."id" = <10>
>>> 19:56:40,812  [Native               1238094722@qtp-1337505800-5 DEBUG]
>>> SELECT "A0"."attachment","A0"."version" FROM "ToDoItem" "A0" WHERE
>>> "A0"."id" = <8>
>>> 19:56:41,351  [ResourceServlet      447422450@qtp-1337505800-2 INFO ]
>>> request: css/application.css
>>> 19:56:41,351  [ResourceServlet      1203999762@qtp-1337505800-0 INFO ]
>>> request: scripts/application.js
>>> 19:56:41,362  [ResourceServlet      1238094722@qtp-1337505800-5 INFO ]
>>> request: images/spinning-icon.gif
>>> 
>>> 
>>> 
>>> On this state, if I press Edit and try to change the ToDoItem description,
>>> the following exception is logged:
>>> 
>>> 
>>> org.mortbay.jetty.bio.SocketConnector$Connection#run(SocketConnector.java:228)
>>> 
>>> org.mortbay.thread.QueuedThreadPool$PoolThread#run(QueuedThreadPool.java:582)
>>> java.lang.NullPointerException
>>> 
>>> org.datanucleus.state.JDOStateManager#setObjectField(JDOStateManager.java:1843)
>>> dom.todo.ToDoItem#setSubcategory(ToDoItem.java:-1)
>>> 
>>> sun.reflect.NativeMethodAccessorImpl#invoke0(NativeMethodAccessorImpl.java:-2)
>>> 
>>> sun.reflect.NativeMethodAccessorImpl#invoke(NativeMethodAccessorImpl.java:39)
>>> 
>>> sun.reflect.DelegatingMethodAccessorImpl#invoke(DelegatingMethodAccessorImpl.java:25)
>>> java.lang.reflect.Method#invoke(Method.java:597)
>>> 
>>> org.apache.isis.core.commons.lang.MethodExtensions#invoke(MethodExtensions.java:50)
>>> 
>>> org.apache.isis.core.commons.lang.MethodExtensions#invoke(MethodExtensions.java:45)
>>> 
>>> org.apache.isis.core.metamodel.adapter.util.AdapterInvokeUtils#invoke(AdapterInvokeUtils.java:44)
>>> 
>>> org.apache.isis.core.progmodel.facets.properties.modify.PropertyClearFacetViaSetterMethod#clearProperty(PropertyClearFacetViaSetterMethod.java:62)
>>> 
>>> org.apache.isis.core.runtime.transaction.facets.PropertyClearFacetWrapTransaction$1#execute(PropertyClearFacetWrapTransaction.java:55)
>>> 
>>> org.apache.isis.core.runtime.system.transaction.IsisTransactionManager#executeWithinTransaction(IsisTransactionManager.java:175)
>>> 
>>> org.apache.isis.core.runtime.transaction.facets.PropertyClearFacetWrapTransaction#clearProperty(PropertyClearFacetWrapTransaction.java:52)
>>> 
>>> org.apache.isis.core.metamodel.specloader.specimpl.OneToOneAssociationImpl#clearValue(OneToOneAssociationImpl.java:200)
>>> 
>>> org.apache.isis.core.metamodel.specloader.specimpl.OneToOneAssociationImpl#set(OneToOneAssociationImpl.java:164)
>>> 
>>> org.apache.isis.viewer.wicket.model.models.EntityModel#apply(EntityModel.java:427)
>>> 
>>> org.apache.isis.viewer.wicket.ui.components.entity.properties.EntityPropertiesForm$2#onSubmit(EntityPropertiesForm.java:365)
>>> org.apache.wicket.markup.html.form.Form#delegateSubmit(Form.java:1253)
>>> org.apache.wicket.markup.html.form.Form#process(Form.java:925)
>>> 
>>> org.apache.isis.viewer.wicket.ui.panels.FormAbstract#process(FormAbstract.java:118)
>>> org.apache.wicket.markup.html.form.Form#onFormSubmitted(Form.java:771)
>>> org.apache.wicket.markup.html.form.Form#onFormSubmitted(Form.java:704)
>>> 
>>> sun.reflect.NativeMethodAccessorImpl#invoke0(NativeMethodAccessorImpl.java:-2)
>>> 
>>> sun.reflect.NativeMethodAccessorImpl#invoke(NativeMethodAccessorImpl.java:39)
>>> 
>>> sun.reflect.DelegatingMethodAccessorImpl#invoke(DelegatingMethodAccessorImpl.java:25)
>>> java.lang.reflect.Method#invoke(Method.java:597)
>>> 
>>> org.apache.wicket.RequestListenerInterface#internalInvoke(RequestListenerInterface.java:258)
>>> 
>>> org.apache.wicket.RequestListenerInterface#invoke(RequestListenerInterface.java:216)
>>> 
>>> org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler#invokeListener(ListenerInterfaceRequestHandler.java:240)
>>> 
>>> org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler#respond(ListenerInterfaceRequestHandler.java:226)
>>> 
>>> org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor#respond(RequestCycle.java:861)
>>> 
>>> org.apache.wicket.request.RequestHandlerStack#execute(RequestHandlerStack.java:64)
>>> org.apache.wicket.request.cycle.RequestCycle#execute(RequestCycle.java:261)
>>> 
>>> org.apache.wicket.request.cycle.RequestCycle#processRequest(RequestCycle.java:218)
>>> 
>>> org.apache.wicket.request.cycle.RequestCycle#processRequestAndDetach(RequestCycle.java:289)
>>> 
>>> org.apache.wicket.protocol.http.WicketFilter#processRequestCycle(WicketFilter.java:259)
>>> 
>>> org.apache.wicket.protocol.http.WicketFilter#processRequest(WicketFilter.java:201)
>>> 
>>> org.apache.wicket.protocol.http.WicketFilter#doFilter(WicketFilter.java:282)
>>> 
>>> org.mortbay.jetty.servlet.ServletHandler$CachedChain#doFilter(ServletHandler.java:1212)
>>> 
>>> org.apache.shiro.web.servlet.AbstractShiroFilter#executeChain(AbstractShiroFilter.java:449)
>>> 
>>> org.apache.shiro.web.servlet.AbstractShiroFilter$1#call(AbstractShiroFilter.java:365)
>>> 
>>> org.apache.shiro.subject.support.SubjectCallable#doCall(SubjectCallable.java:90)
>>> 
>>> org.apache.shiro.subject.support.SubjectCallable#call(SubjectCallable.java:83)
>>> 
>>> org.apache.shiro.subject.support.DelegatingSubject#execute(DelegatingSubject.java:383)
>>> 
>>> org.apache.shiro.web.servlet.AbstractShiroFilter#doFilterInternal(AbstractShiroFilter.java:362)
>>> 
>>> org.apache.shiro.web.servlet.OncePerRequestFilter#doFilter(OncePerRequestFilter.java:125)
>>> 
>>> org.mortbay.jetty.servlet.ServletHandler$CachedChain#doFilter(ServletHandler.java:1212)
>>> org.mortbay.jetty.servlet.ServletHandler#handle(ServletHandler.java:399)
>>> org.mortbay.jetty.security.SecurityHandler#handle(SecurityHandler.java:216)
>>> org.mortbay.jetty.servlet.SessionHandler#handle(SessionHandler.java:182)
>>> org.mortbay.jetty.handler.ContextHandler#__handle(ContextHandler.java:766)
>>> org.mortbay.jetty.handler.ContextHandler#handle(ContextHandler.java:-1)
>>> org.mortbay.jetty.webapp.WebAppContext#handle(WebAppContext.java:450)
>>> org.mortbay.jetty.handler.HandlerWrapper#handle(HandlerWrapper.java:152)
>>> org.mortbay.jetty.Server#handle(Server.java:326)
>>> org.mortbay.jetty.HttpConnection#handleRequest(HttpConnection.java:542)
>>> 
>>> org.mortbay.jetty.HttpConnection$RequestHandler#content(HttpConnection.java:945)
>>> org.mortbay.jetty.HttpParser#parseNext(HttpParser.java:756)
>>> org.mortbay.jetty.HttpParser#parseAvailable(HttpParser.java:218)
>>> org.mortbay.jetty.HttpConnection#handle(HttpConnection.java:404)
>>> 
>>> org.mortbay.jetty.bio.SocketConnector$Connection#run(SocketConnector.java:228)
>>> 
>>> org.mortbay.thread.QueuedThreadPool$PoolThread#run(QueuedThreadPool.java:582)
>>> 
>>> 
>>> [1] https://github.com/danhaywood/isis-jrebel-plugin.git


Óscar Bou Bou
Responsable de Producto
Auditor Jefe de Certificación ISO 27001 en BSI
CISA, CRISC, APMG ISO 20000, ITIL-F

   902 900 231 / 620 267 520
   http://www.twitter.com/oscarbou

   http://es.linkedin.com/in/oscarbou

   http://www.GesConsultor.com 




Este mensaje y los ficheros anexos son confidenciales. Los mismos contienen información reservada que no puede ser difundida. Si usted ha recibido este correo por error, tenga la amabilidad de eliminarlo de su sistema y avisar al remitente mediante reenvío a su dirección electrónica; no deberá copiar el mensaje ni divulgar su contenido a ninguna persona.
Su dirección de correo electrónico junto a sus datos personales constan en un fichero titularidad de Gesdatos Software, S.L. cuya finalidad es la de mantener el contacto con Ud. Si quiere saber de qué información disponemos de Ud., modificarla, y en su caso, cancelarla, puede hacerlo enviando un escrito al efecto, acompañado de una fotocopia de su D.N.I. a la siguiente dirección: Gesdatos Software, S.L. , Paseo de la Castellana, 153 bajo - 28046 (Madrid), y Avda. Cortes Valencianas num. 50, 1ºC - 46015 (Valencia). Asimismo, es su responsabilidad comprobar que este mensaje o sus archivos adjuntos no contengan virus informáticos, y en caso que los tuvieran eliminarlos.






Re: JRebel support

Posted by GESCONSULTOR <o....@gesconsultor.com>.
Oh! I forgot to change the QuickStart pom!

Sure that's it. I'll let you know.

Thanks

> El 03/02/2014, a las 08:12, Dan Haywood <da...@haywood-associates.co.uk> escribió:
> 
> Hi Oscar,
> You need to use trunk (1.4.0-SNAPSHOT) rather than 1.3.1; I think that's
> the problem.
> Let me know
> Cheers
> Dan
> 
> Sorry to be brief, sent from my phone
> On 2 Feb 2014 19:08, "GESCONSULTOR - Óscar Bou" <o....@gesconsultor.com>
> wrote:
> 
>> 
>> Hi, Dan.
>> 
>> I'm very excited about the possibility to use the JRebel plugin, as it can
>> accelerate a lot the workflow.
>> I've downloaded and configured it, and I'm working over the latest
>> quickstart archetype.
>> 
>> I've added 1 new property to the TodoItem entity, and it has not been
>> showed on the interface.
>> 
>> These are the detailed steps followed.
>> 
>> 
>> 
>> 
>> 1. Quickstart prototype.
>> 
>> I create a new folder and run maven to create a project based on the
>> latest Isis quickstart:
>> 
>> mvn archetype:generate      -D archetypeGroupId=org.apache.isis.archetype
>>    -D archetypeArtifactId=quickstart_wicket_restful_jdo-archetype     -D
>> archetypeVersion=1.3.1     -D groupId=com.mycompany     -D artifactId=myapp
>>    -D version=1.0-SNAPSHOT     -B
>> 
>> 
>> 2. JRebel configuration.
>> 
>> I've installed JRebel, and on the JRebel Config Center I've marked the
>> "dom" and "webapp" projects. to be followed for changes by JRebel.
>> 
>> I've downloaded from [1] the
>> danhaywood-isis-jrebel-plugin-1.0.0-SNAPSHOT.jar plugin and copied it on
>> the lib folder of the "webapp" module.
>> 
>> I've copied the ToDoApp-no-fixtures-PROTOTYPE.launch on the "webapp"
>> module to a new ToDoApp-no-fixtures-PROTOTYPE-Rebel.launch file, and added:
>> 
>> <stringAttribute
>>      key="org.eclipse.jdt.launching.VM_ARGUMENTS"
>>      value="${jrebel_args} -Drebel.log=false
>> -Drebel.plugins=./lib/danhaywood-isis-jrebel-plugin-1.0.0-SNAPSHOT.jar
>> -Disis-jrebel-plugin.packagePrefix=dom.simple -XX:MaxPermSize=128m"/>
>> 
>> 3. DataNucleus.
>> 
>> I assume that the "DataNucleus - auto-enhancement" option must be enabled
>> on the "dom" module.
>> That originates that, each time the Enhancer is executed (that's after any
>> change on any file on the module) a JRebel dialog asks:
>> "You are launching a JRebel-enabled application without the JRebel agent.
>> JRebel will not work without it."
>> For avoiding that, I've checked the "Don't perform this check again (you
>> can restore it from preferences)", and have chosen the "Not this time"
>> option.
>> 
>> 4. Run the webapp.
>> 
>> I've launched the newly created Eclipse configuration and navigated to "
>> http://localhost:8080/wicket/".
>> I've installed the fixtures.
>> 
>> 5. Changes in code.
>> 
>> I add a new field to the ToDoItem entity. The following message appears on
>> Eclipse:
>> 
>> Class 'xxx' has a new non-sttic field 'newField', it will be null on
>> existing instances.
>> 
>> But after refreshing the webapp entity page, the field it's not showed.
>> I've waited enough time. In fact, the following messages have been logged:
>> 
>> 2014-02-02 19:56:40 JRebel: Reloading class 'dom.todo.ToDoItem'.
>> 19:56:40,515  [Native               1238094722@qtp-1337505800-5 DEBUG]
>> SELECT
>> "A0"."category","A0"."complete","A0"."cost","A0"."description","A0"."dueBy","A0"."notes","A0"."ownedBy","A0"."subcategory","A0"."version"
>> FROM "ToDoItem" "A0" WHERE "A0"."id" = <11>
>> 2014-02-02 19:56:40 JRebel: Reloading class 'dom.todo.ToDoItem$Category'.
>> 2014-02-02 19:56:40 JRebel: Reloading class 'dom.todo.ToDoItem$Category$1'.
>> 2014-02-02 19:56:40 JRebel: Reloading class
>> 'dom.todo.ToDoItem$Subcategory'.
>> 2014-02-02 19:56:40 JRebel: Reloading class
>> 'dom.todo.ToDoItem$Subcategory$1'.
>> 2014-02-02 19:56:40 JRebel: Reinitialized class
>> 'dom.todo.ToDoItem$Subcategory'.
>> 2014-02-02 19:56:40 JRebel: Reinitialized class
>> 'dom.todo.ToDoItem$Category$1'.
>> 2014-02-02 19:56:40 JRebel: Reloading class 'dom.todo.ToDoItem$Category$2'.
>> 2014-02-02 19:56:40 JRebel: Reinitialized class
>> 'dom.todo.ToDoItem$Category$2'.
>> 2014-02-02 19:56:40 JRebel: Reloading class 'dom.todo.ToDoItem$Category$3'.
>> 2014-02-02 19:56:40 JRebel: Reinitialized class
>> 'dom.todo.ToDoItem$Category$3'.
>> 2014-02-02 19:56:40 JRebel: Reinitialized class
>> 'dom.todo.ToDoItem$Category'.
>> 19:56:40,697  [Native               1238094722@qtp-1337505800-5 DEBUG]
>> SELECT 'dom.todo.ToDoItem' AS
>> NUCLEUS_TYPE,"A1"."category","A1"."complete","A1"."cost","A1"."description","A1"."dueBy","A1"."notes","A1"."ownedBy","A1"."subcategory","A1"."id","A1"."version"
>> FROM "ToDoItemDependencies" "A0" INNER JOIN "ToDoItem" "A1" ON
>> "A0"."dependentId" = "A1"."id" WHERE "A0"."dependingId" = <11>
>> 2014-02-02 19:56:40 JRebel: Reloading class
>> 'dom.todo.ToDoItem$DependenciesComparator'.
>> 2014-02-02 19:56:40 JRebel: Reloading class
>> 'dom.todo.ToDoItem$DependenciesComparator$1'.
>> 19:56:40,771  [Native               1238094722@qtp-1337505800-5 DEBUG]
>> SELECT 'dom.todo.ToDoItem' AS
>> NUCLEUS_TYPE,"A0"."category","A0"."complete","A0"."cost","A0"."description","A0"."dueBy","A0"."notes","A0"."ownedBy","A0"."subcategory","A0"."id","A0"."version"
>> FROM "ToDoItem" "A0" WHERE "A0"."ownedBy" = <'sven'> AND "A0"."category" =
>> <'Professional'>
>> 19:56:40,789  [Native               1238094722@qtp-1337505800-5 DEBUG]
>> SELECT "A0"."attachment","A0"."version" FROM "ToDoItem" "A0" WHERE
>> "A0"."id" = <9>
>> 19:56:40,806  [Native               1238094722@qtp-1337505800-5 DEBUG]
>> SELECT "A0"."attachment","A0"."version" FROM "ToDoItem" "A0" WHERE
>> "A0"."id" = <10>
>> 19:56:40,812  [Native               1238094722@qtp-1337505800-5 DEBUG]
>> SELECT "A0"."attachment","A0"."version" FROM "ToDoItem" "A0" WHERE
>> "A0"."id" = <8>
>> 19:56:41,351  [ResourceServlet      447422450@qtp-1337505800-2 INFO ]
>> request: css/application.css
>> 19:56:41,351  [ResourceServlet      1203999762@qtp-1337505800-0 INFO ]
>> request: scripts/application.js
>> 19:56:41,362  [ResourceServlet      1238094722@qtp-1337505800-5 INFO ]
>> request: images/spinning-icon.gif
>> 
>> 
>> 
>> On this state, if I press Edit and try to change the ToDoItem description,
>> the following exception is logged:
>> 
>> 
>> org.mortbay.jetty.bio.SocketConnector$Connection#run(SocketConnector.java:228)
>> 
>> org.mortbay.thread.QueuedThreadPool$PoolThread#run(QueuedThreadPool.java:582)
>> java.lang.NullPointerException
>> 
>> org.datanucleus.state.JDOStateManager#setObjectField(JDOStateManager.java:1843)
>> dom.todo.ToDoItem#setSubcategory(ToDoItem.java:-1)
>> 
>> sun.reflect.NativeMethodAccessorImpl#invoke0(NativeMethodAccessorImpl.java:-2)
>> 
>> sun.reflect.NativeMethodAccessorImpl#invoke(NativeMethodAccessorImpl.java:39)
>> 
>> sun.reflect.DelegatingMethodAccessorImpl#invoke(DelegatingMethodAccessorImpl.java:25)
>> java.lang.reflect.Method#invoke(Method.java:597)
>> 
>> org.apache.isis.core.commons.lang.MethodExtensions#invoke(MethodExtensions.java:50)
>> 
>> org.apache.isis.core.commons.lang.MethodExtensions#invoke(MethodExtensions.java:45)
>> 
>> org.apache.isis.core.metamodel.adapter.util.AdapterInvokeUtils#invoke(AdapterInvokeUtils.java:44)
>> 
>> org.apache.isis.core.progmodel.facets.properties.modify.PropertyClearFacetViaSetterMethod#clearProperty(PropertyClearFacetViaSetterMethod.java:62)
>> 
>> org.apache.isis.core.runtime.transaction.facets.PropertyClearFacetWrapTransaction$1#execute(PropertyClearFacetWrapTransaction.java:55)
>> 
>> org.apache.isis.core.runtime.system.transaction.IsisTransactionManager#executeWithinTransaction(IsisTransactionManager.java:175)
>> 
>> org.apache.isis.core.runtime.transaction.facets.PropertyClearFacetWrapTransaction#clearProperty(PropertyClearFacetWrapTransaction.java:52)
>> 
>> org.apache.isis.core.metamodel.specloader.specimpl.OneToOneAssociationImpl#clearValue(OneToOneAssociationImpl.java:200)
>> 
>> org.apache.isis.core.metamodel.specloader.specimpl.OneToOneAssociationImpl#set(OneToOneAssociationImpl.java:164)
>> 
>> org.apache.isis.viewer.wicket.model.models.EntityModel#apply(EntityModel.java:427)
>> 
>> org.apache.isis.viewer.wicket.ui.components.entity.properties.EntityPropertiesForm$2#onSubmit(EntityPropertiesForm.java:365)
>> org.apache.wicket.markup.html.form.Form#delegateSubmit(Form.java:1253)
>> org.apache.wicket.markup.html.form.Form#process(Form.java:925)
>> 
>> org.apache.isis.viewer.wicket.ui.panels.FormAbstract#process(FormAbstract.java:118)
>> org.apache.wicket.markup.html.form.Form#onFormSubmitted(Form.java:771)
>> org.apache.wicket.markup.html.form.Form#onFormSubmitted(Form.java:704)
>> 
>> sun.reflect.NativeMethodAccessorImpl#invoke0(NativeMethodAccessorImpl.java:-2)
>> 
>> sun.reflect.NativeMethodAccessorImpl#invoke(NativeMethodAccessorImpl.java:39)
>> 
>> sun.reflect.DelegatingMethodAccessorImpl#invoke(DelegatingMethodAccessorImpl.java:25)
>> java.lang.reflect.Method#invoke(Method.java:597)
>> 
>> org.apache.wicket.RequestListenerInterface#internalInvoke(RequestListenerInterface.java:258)
>> 
>> org.apache.wicket.RequestListenerInterface#invoke(RequestListenerInterface.java:216)
>> 
>> org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler#invokeListener(ListenerInterfaceRequestHandler.java:240)
>> 
>> org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler#respond(ListenerInterfaceRequestHandler.java:226)
>> 
>> org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor#respond(RequestCycle.java:861)
>> 
>> org.apache.wicket.request.RequestHandlerStack#execute(RequestHandlerStack.java:64)
>> org.apache.wicket.request.cycle.RequestCycle#execute(RequestCycle.java:261)
>> 
>> org.apache.wicket.request.cycle.RequestCycle#processRequest(RequestCycle.java:218)
>> 
>> org.apache.wicket.request.cycle.RequestCycle#processRequestAndDetach(RequestCycle.java:289)
>> 
>> org.apache.wicket.protocol.http.WicketFilter#processRequestCycle(WicketFilter.java:259)
>> 
>> org.apache.wicket.protocol.http.WicketFilter#processRequest(WicketFilter.java:201)
>> 
>> org.apache.wicket.protocol.http.WicketFilter#doFilter(WicketFilter.java:282)
>> 
>> org.mortbay.jetty.servlet.ServletHandler$CachedChain#doFilter(ServletHandler.java:1212)
>> 
>> org.apache.shiro.web.servlet.AbstractShiroFilter#executeChain(AbstractShiroFilter.java:449)
>> 
>> org.apache.shiro.web.servlet.AbstractShiroFilter$1#call(AbstractShiroFilter.java:365)
>> 
>> org.apache.shiro.subject.support.SubjectCallable#doCall(SubjectCallable.java:90)
>> 
>> org.apache.shiro.subject.support.SubjectCallable#call(SubjectCallable.java:83)
>> 
>> org.apache.shiro.subject.support.DelegatingSubject#execute(DelegatingSubject.java:383)
>> 
>> org.apache.shiro.web.servlet.AbstractShiroFilter#doFilterInternal(AbstractShiroFilter.java:362)
>> 
>> org.apache.shiro.web.servlet.OncePerRequestFilter#doFilter(OncePerRequestFilter.java:125)
>> 
>> org.mortbay.jetty.servlet.ServletHandler$CachedChain#doFilter(ServletHandler.java:1212)
>> org.mortbay.jetty.servlet.ServletHandler#handle(ServletHandler.java:399)
>> org.mortbay.jetty.security.SecurityHandler#handle(SecurityHandler.java:216)
>> org.mortbay.jetty.servlet.SessionHandler#handle(SessionHandler.java:182)
>> org.mortbay.jetty.handler.ContextHandler#__handle(ContextHandler.java:766)
>> org.mortbay.jetty.handler.ContextHandler#handle(ContextHandler.java:-1)
>> org.mortbay.jetty.webapp.WebAppContext#handle(WebAppContext.java:450)
>> org.mortbay.jetty.handler.HandlerWrapper#handle(HandlerWrapper.java:152)
>> org.mortbay.jetty.Server#handle(Server.java:326)
>> org.mortbay.jetty.HttpConnection#handleRequest(HttpConnection.java:542)
>> 
>> org.mortbay.jetty.HttpConnection$RequestHandler#content(HttpConnection.java:945)
>> org.mortbay.jetty.HttpParser#parseNext(HttpParser.java:756)
>> org.mortbay.jetty.HttpParser#parseAvailable(HttpParser.java:218)
>> org.mortbay.jetty.HttpConnection#handle(HttpConnection.java:404)
>> 
>> org.mortbay.jetty.bio.SocketConnector$Connection#run(SocketConnector.java:228)
>> 
>> org.mortbay.thread.QueuedThreadPool$PoolThread#run(QueuedThreadPool.java:582)
>> 
>> 
>> [1] https://github.com/danhaywood/isis-jrebel-plugin.git

Re: JRebel support

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
Hi Oscar,
You need to use trunk (1.4.0-SNAPSHOT) rather than 1.3.1; I think that's
the problem.
Let me know
Cheers
Dan

Sorry to be brief, sent from my phone
On 2 Feb 2014 19:08, "GESCONSULTOR - Óscar Bou" <o....@gesconsultor.com>
wrote:

>
> Hi, Dan.
>
> I'm very excited about the possibility to use the JRebel plugin, as it can
> accelerate a lot the workflow.
> I've downloaded and configured it, and I'm working over the latest
> quickstart archetype.
>
> I've added 1 new property to the TodoItem entity, and it has not been
> showed on the interface.
>
> These are the detailed steps followed.
>
>
>
>
> 1. Quickstart prototype.
>
> I create a new folder and run maven to create a project based on the
> latest Isis quickstart:
>
> mvn archetype:generate      -D archetypeGroupId=org.apache.isis.archetype
>     -D archetypeArtifactId=quickstart_wicket_restful_jdo-archetype     -D
> archetypeVersion=1.3.1     -D groupId=com.mycompany     -D artifactId=myapp
>     -D version=1.0-SNAPSHOT     -B
>
>
> 2. JRebel configuration.
>
> I've installed JRebel, and on the JRebel Config Center I've marked the
> "dom" and "webapp" projects. to be followed for changes by JRebel.
>
> I've downloaded from [1] the
> danhaywood-isis-jrebel-plugin-1.0.0-SNAPSHOT.jar plugin and copied it on
> the lib folder of the "webapp" module.
>
> I've copied the ToDoApp-no-fixtures-PROTOTYPE.launch on the "webapp"
> module to a new ToDoApp-no-fixtures-PROTOTYPE-Rebel.launch file, and added:
>
> <stringAttribute
>       key="org.eclipse.jdt.launching.VM_ARGUMENTS"
>       value="${jrebel_args} -Drebel.log=false
> -Drebel.plugins=./lib/danhaywood-isis-jrebel-plugin-1.0.0-SNAPSHOT.jar
> -Disis-jrebel-plugin.packagePrefix=dom.simple -XX:MaxPermSize=128m"/>
>
> 3. DataNucleus.
>
> I assume that the "DataNucleus - auto-enhancement" option must be enabled
> on the "dom" module.
> That originates that, each time the Enhancer is executed (that's after any
> change on any file on the module) a JRebel dialog asks:
> "You are launching a JRebel-enabled application without the JRebel agent.
> JRebel will not work without it."
> For avoiding that, I've checked the "Don't perform this check again (you
> can restore it from preferences)", and have chosen the "Not this time"
> option.
>
> 4. Run the webapp.
>
> I've launched the newly created Eclipse configuration and navigated to "
> http://localhost:8080/wicket/".
> I've installed the fixtures.
>
> 5. Changes in code.
>
> I add a new field to the ToDoItem entity. The following message appears on
> Eclipse:
>
> Class 'xxx' has a new non-sttic field 'newField', it will be null on
> existing instances.
>
> But after refreshing the webapp entity page, the field it's not showed.
> I've waited enough time. In fact, the following messages have been logged:
>
> 2014-02-02 19:56:40 JRebel: Reloading class 'dom.todo.ToDoItem'.
> 19:56:40,515  [Native               1238094722@qtp-1337505800-5 DEBUG]
>  SELECT
> "A0"."category","A0"."complete","A0"."cost","A0"."description","A0"."dueBy","A0"."notes","A0"."ownedBy","A0"."subcategory","A0"."version"
> FROM "ToDoItem" "A0" WHERE "A0"."id" = <11>
> 2014-02-02 19:56:40 JRebel: Reloading class 'dom.todo.ToDoItem$Category'.
> 2014-02-02 19:56:40 JRebel: Reloading class 'dom.todo.ToDoItem$Category$1'.
> 2014-02-02 19:56:40 JRebel: Reloading class
> 'dom.todo.ToDoItem$Subcategory'.
> 2014-02-02 19:56:40 JRebel: Reloading class
> 'dom.todo.ToDoItem$Subcategory$1'.
> 2014-02-02 19:56:40 JRebel: Reinitialized class
> 'dom.todo.ToDoItem$Subcategory'.
> 2014-02-02 19:56:40 JRebel: Reinitialized class
> 'dom.todo.ToDoItem$Category$1'.
> 2014-02-02 19:56:40 JRebel: Reloading class 'dom.todo.ToDoItem$Category$2'.
> 2014-02-02 19:56:40 JRebel: Reinitialized class
> 'dom.todo.ToDoItem$Category$2'.
> 2014-02-02 19:56:40 JRebel: Reloading class 'dom.todo.ToDoItem$Category$3'.
> 2014-02-02 19:56:40 JRebel: Reinitialized class
> 'dom.todo.ToDoItem$Category$3'.
> 2014-02-02 19:56:40 JRebel: Reinitialized class
> 'dom.todo.ToDoItem$Category'.
> 19:56:40,697  [Native               1238094722@qtp-1337505800-5 DEBUG]
>  SELECT 'dom.todo.ToDoItem' AS
> NUCLEUS_TYPE,"A1"."category","A1"."complete","A1"."cost","A1"."description","A1"."dueBy","A1"."notes","A1"."ownedBy","A1"."subcategory","A1"."id","A1"."version"
> FROM "ToDoItemDependencies" "A0" INNER JOIN "ToDoItem" "A1" ON
> "A0"."dependentId" = "A1"."id" WHERE "A0"."dependingId" = <11>
> 2014-02-02 19:56:40 JRebel: Reloading class
> 'dom.todo.ToDoItem$DependenciesComparator'.
> 2014-02-02 19:56:40 JRebel: Reloading class
> 'dom.todo.ToDoItem$DependenciesComparator$1'.
> 19:56:40,771  [Native               1238094722@qtp-1337505800-5 DEBUG]
>  SELECT 'dom.todo.ToDoItem' AS
> NUCLEUS_TYPE,"A0"."category","A0"."complete","A0"."cost","A0"."description","A0"."dueBy","A0"."notes","A0"."ownedBy","A0"."subcategory","A0"."id","A0"."version"
> FROM "ToDoItem" "A0" WHERE "A0"."ownedBy" = <'sven'> AND "A0"."category" =
> <'Professional'>
> 19:56:40,789  [Native               1238094722@qtp-1337505800-5 DEBUG]
>  SELECT "A0"."attachment","A0"."version" FROM "ToDoItem" "A0" WHERE
> "A0"."id" = <9>
> 19:56:40,806  [Native               1238094722@qtp-1337505800-5 DEBUG]
>  SELECT "A0"."attachment","A0"."version" FROM "ToDoItem" "A0" WHERE
> "A0"."id" = <10>
> 19:56:40,812  [Native               1238094722@qtp-1337505800-5 DEBUG]
>  SELECT "A0"."attachment","A0"."version" FROM "ToDoItem" "A0" WHERE
> "A0"."id" = <8>
> 19:56:41,351  [ResourceServlet      447422450@qtp-1337505800-2 INFO ]
>  request: css/application.css
> 19:56:41,351  [ResourceServlet      1203999762@qtp-1337505800-0 INFO ]
>  request: scripts/application.js
> 19:56:41,362  [ResourceServlet      1238094722@qtp-1337505800-5 INFO ]
>  request: images/spinning-icon.gif
>
>
>
> On this state, if I press Edit and try to change the ToDoItem description,
> the following exception is logged:
>
>
> org.mortbay.jetty.bio.SocketConnector$Connection#run(SocketConnector.java:228)
>
> org.mortbay.thread.QueuedThreadPool$PoolThread#run(QueuedThreadPool.java:582)
> java.lang.NullPointerException
>
> org.datanucleus.state.JDOStateManager#setObjectField(JDOStateManager.java:1843)
> dom.todo.ToDoItem#setSubcategory(ToDoItem.java:-1)
>
> sun.reflect.NativeMethodAccessorImpl#invoke0(NativeMethodAccessorImpl.java:-2)
>
> sun.reflect.NativeMethodAccessorImpl#invoke(NativeMethodAccessorImpl.java:39)
>
> sun.reflect.DelegatingMethodAccessorImpl#invoke(DelegatingMethodAccessorImpl.java:25)
> java.lang.reflect.Method#invoke(Method.java:597)
>
> org.apache.isis.core.commons.lang.MethodExtensions#invoke(MethodExtensions.java:50)
>
> org.apache.isis.core.commons.lang.MethodExtensions#invoke(MethodExtensions.java:45)
>
> org.apache.isis.core.metamodel.adapter.util.AdapterInvokeUtils#invoke(AdapterInvokeUtils.java:44)
>
> org.apache.isis.core.progmodel.facets.properties.modify.PropertyClearFacetViaSetterMethod#clearProperty(PropertyClearFacetViaSetterMethod.java:62)
>
> org.apache.isis.core.runtime.transaction.facets.PropertyClearFacetWrapTransaction$1#execute(PropertyClearFacetWrapTransaction.java:55)
>
> org.apache.isis.core.runtime.system.transaction.IsisTransactionManager#executeWithinTransaction(IsisTransactionManager.java:175)
>
> org.apache.isis.core.runtime.transaction.facets.PropertyClearFacetWrapTransaction#clearProperty(PropertyClearFacetWrapTransaction.java:52)
>
> org.apache.isis.core.metamodel.specloader.specimpl.OneToOneAssociationImpl#clearValue(OneToOneAssociationImpl.java:200)
>
> org.apache.isis.core.metamodel.specloader.specimpl.OneToOneAssociationImpl#set(OneToOneAssociationImpl.java:164)
>
> org.apache.isis.viewer.wicket.model.models.EntityModel#apply(EntityModel.java:427)
>
> org.apache.isis.viewer.wicket.ui.components.entity.properties.EntityPropertiesForm$2#onSubmit(EntityPropertiesForm.java:365)
> org.apache.wicket.markup.html.form.Form#delegateSubmit(Form.java:1253)
> org.apache.wicket.markup.html.form.Form#process(Form.java:925)
>
> org.apache.isis.viewer.wicket.ui.panels.FormAbstract#process(FormAbstract.java:118)
> org.apache.wicket.markup.html.form.Form#onFormSubmitted(Form.java:771)
> org.apache.wicket.markup.html.form.Form#onFormSubmitted(Form.java:704)
>
> sun.reflect.NativeMethodAccessorImpl#invoke0(NativeMethodAccessorImpl.java:-2)
>
> sun.reflect.NativeMethodAccessorImpl#invoke(NativeMethodAccessorImpl.java:39)
>
> sun.reflect.DelegatingMethodAccessorImpl#invoke(DelegatingMethodAccessorImpl.java:25)
> java.lang.reflect.Method#invoke(Method.java:597)
>
> org.apache.wicket.RequestListenerInterface#internalInvoke(RequestListenerInterface.java:258)
>
> org.apache.wicket.RequestListenerInterface#invoke(RequestListenerInterface.java:216)
>
> org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler#invokeListener(ListenerInterfaceRequestHandler.java:240)
>
> org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler#respond(ListenerInterfaceRequestHandler.java:226)
>
> org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor#respond(RequestCycle.java:861)
>
> org.apache.wicket.request.RequestHandlerStack#execute(RequestHandlerStack.java:64)
> org.apache.wicket.request.cycle.RequestCycle#execute(RequestCycle.java:261)
>
> org.apache.wicket.request.cycle.RequestCycle#processRequest(RequestCycle.java:218)
>
> org.apache.wicket.request.cycle.RequestCycle#processRequestAndDetach(RequestCycle.java:289)
>
> org.apache.wicket.protocol.http.WicketFilter#processRequestCycle(WicketFilter.java:259)
>
> org.apache.wicket.protocol.http.WicketFilter#processRequest(WicketFilter.java:201)
>
> org.apache.wicket.protocol.http.WicketFilter#doFilter(WicketFilter.java:282)
>
> org.mortbay.jetty.servlet.ServletHandler$CachedChain#doFilter(ServletHandler.java:1212)
>
> org.apache.shiro.web.servlet.AbstractShiroFilter#executeChain(AbstractShiroFilter.java:449)
>
> org.apache.shiro.web.servlet.AbstractShiroFilter$1#call(AbstractShiroFilter.java:365)
>
> org.apache.shiro.subject.support.SubjectCallable#doCall(SubjectCallable.java:90)
>
> org.apache.shiro.subject.support.SubjectCallable#call(SubjectCallable.java:83)
>
> org.apache.shiro.subject.support.DelegatingSubject#execute(DelegatingSubject.java:383)
>
> org.apache.shiro.web.servlet.AbstractShiroFilter#doFilterInternal(AbstractShiroFilter.java:362)
>
> org.apache.shiro.web.servlet.OncePerRequestFilter#doFilter(OncePerRequestFilter.java:125)
>
> org.mortbay.jetty.servlet.ServletHandler$CachedChain#doFilter(ServletHandler.java:1212)
> org.mortbay.jetty.servlet.ServletHandler#handle(ServletHandler.java:399)
> org.mortbay.jetty.security.SecurityHandler#handle(SecurityHandler.java:216)
> org.mortbay.jetty.servlet.SessionHandler#handle(SessionHandler.java:182)
> org.mortbay.jetty.handler.ContextHandler#__handle(ContextHandler.java:766)
> org.mortbay.jetty.handler.ContextHandler#handle(ContextHandler.java:-1)
> org.mortbay.jetty.webapp.WebAppContext#handle(WebAppContext.java:450)
> org.mortbay.jetty.handler.HandlerWrapper#handle(HandlerWrapper.java:152)
> org.mortbay.jetty.Server#handle(Server.java:326)
> org.mortbay.jetty.HttpConnection#handleRequest(HttpConnection.java:542)
>
> org.mortbay.jetty.HttpConnection$RequestHandler#content(HttpConnection.java:945)
> org.mortbay.jetty.HttpParser#parseNext(HttpParser.java:756)
> org.mortbay.jetty.HttpParser#parseAvailable(HttpParser.java:218)
> org.mortbay.jetty.HttpConnection#handle(HttpConnection.java:404)
>
> org.mortbay.jetty.bio.SocketConnector$Connection#run(SocketConnector.java:228)
>
> org.mortbay.thread.QueuedThreadPool$PoolThread#run(QueuedThreadPool.java:582)
>
>
> [1] https://github.com/danhaywood/isis-jrebel-plugin.git