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!

0 votes

1 answers

2790 views

ANSWER

I've done the same test with 7.4 and hot reload doesn't break Nuxeo, so I guess it's something that has been introduced with the latest version.
12/30/2015



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.

1 votes



Hi slacoin, thanks for your quick reply!

In the target folder, I have this layout:

  • devbundle
    • main
      • org
        • example
          • myproject
            • core
              • (some classes inside this structure)
    • seam
      • org
        • example
          • myproject
            • core
              • MyProjectActionBean.class

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,

12/30/2015

No, the IDE is doing what's I'm expecting. Problem should comes from seam hot–reloader. Can you check now that the seam classes are deployed in the nuxeo.war/WEB-INF/dev folder.

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.

12/31/2015

Hello again slacoin,

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):

http://pastebin.com/ixhuvyQs

http://pastebin.com/hK0iP2wW

http://pastebin.com/gC3sAJ8J

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!

01/04/2016

Yeap, that's mean seam is not detecting the change. Can you share your project ?
01/04/2016

Hello again,

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!

01/04/2016

Thanks I'm going to investigate.
01/05/2016

Hello slacoin Lacoin ,

any news on what is the problem? Can we check anything else?

Thanks!

01/18/2016