Hot Reload with Action Beans breaks Nuxeo 7.10
Hello,
I have some bundles with Action Beans, and I was using Nuxeo 7.2 with the IDE to develop, without problems. But now I've decided to use Nuxeo 7.10 as it is the LTS version, and I've seen that when I hot reload the bundles with Action Beans, Nuxeo breaks (the page won't load but I don't see anything in the logs). I've tried with other bundles that have no Action Beans, and everything works as it should. If I create the JARs of the bundles that have Action Beans, I have no problems neither.
To ensure that it wasn't a problem in my code, I've used a clean 7.10 SDK, with only one bundle that I've created using the wizard of Nuxeo IDE, and I've created an Action Bean also with the Nuxeo Artifact Wizard. Again, when I hot reload, Nuxeo breaks and I have to stop and restart it.
Is it a bug? Has something changed in 7.10 and do I need to change my code in order to work?
If you need any more information please ask, but as I have said, it is very easy to reproduce the error using the Nuxeo Artifact Wizard.
Thank you and Happy Holidays!
action beans are hot-reloaded in a specific way with the help of seam framework. Project output classes are split in two folders, one containing the main classes and another containing seam related classes.
Can you check you have the correct layout in the folder target/devbundle. Then can you give me the content of the file NUXEO_HOME/nxserver/dev.bundles file.
In the target folder, I have this layout:
- devbundle
- main
- org
- example
- myproject
- core
- (some classes inside this structure)
- core
- myproject
- example
- org
- seam
- org
- example
- myproject
- core
- MyProjectActionBean.class
- core
- myproject
- example
- org
- main
So, I guess this is correct.
And my dev.bundles files has this content:
# Projects
bundle:/home/myuser/Documents/MyProject/Workspace/myproject-config/bin/devbundle/main
resourceBundleFragment:/home/myuser/Documents/MyProject/Workspace/myproject-config/src/main/resources/OSGI-INF/l10n/org.example.myproject.config-messages_en_US.properties
resourceBundleFragment:/home/myuser/Documents/MyProject/Workspace/myproject-config/src/main/resources/OSGI-INF/l10n/org.example.myproject.config-messages_es_ES.properties
resourceBundleFragment:/home/myuser/Documents/MyProject/Workspace/myproject-config/src/main/resources/OSGI-INF/l10n/org.example.myproject.config-messages_eu_ES.properties
bundle:/home/myuser/Documents/MyProject/Workspace/myproject-core/bin/devbundle/main
seam:/home/myuser/Documents/MyProject/Workspace/myproject-core/bin/devbundle/seam
So, as you see I have two bundles: myproject-config and myproject-core, and the ActionBean is in myproject-core
Do you see something wrong here?
Thanks in advance,
If yes, can you enable traces in seam by configuring a logger for the package {{org.jboss.seam.deployment}} at trace level and attach the generated traces.
I've checked and the ActionBean class is in that folder. I've enabled traces and started Nuxeo with my bundles, and the result is more than 8000 lines long… I've put it on Pastebin, (I had to separate it in 3 links):
When I hot reload the log doesn't change (no new lines).
Is this log useful? Tell me if I can test anything else.
Thanks!
I've put the project ZIP here: http://filebin.ca/2SK38O0VMBRq
It isn't the same project that I mentioned before (with two bundles: myproject-config and myproject-core), but it is much simpler and with the same problem. I just created an ActionBean with the IDE wizard and checked that the error was the same and I've also checked that the devbundle structure was correct and seam classes are deployed. I've added that traces log file in the zip too.
Thank you very much!