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

Reply via email to