Document types not properly loaded

I'm having a problem with proper hot reload of my Nuxeo project. I am trying to adapt my workflow so I can do correct hot reload of the server in the project. I have not deployed anything do the bundles directory.

All my components seems to load properly. The 'ClassificationRelation' doctype is registered properly:

2012-11-20 15:38:45,996 INFO  [org.nuxeo.ecm.core.schema.SchemaManagerImpl] Regi
stered document type: ClassificationRelation

But sadly as soon as a service tries to use the document type, I get an immediate crash, just as would happen if the document type wasn't properly registered.

    ... 19 more
Caused by: org.nuxeo.ecm.core.api.WrappedException: Exception: org.nuxeo.ecm.core.storage.sql.jdbc.QueryMaker$QueryMakerException. message: Unknown type: ClassificationRelation
    at org.nuxeo.ecm.core.storage.sql.jdbc.NXQLQueryMaker$QueryAnalyzer.visitFromClause(NXQLQueryMaker.java:885)
    at org.nuxeo.ecm.core.storage.sql.jdbc.NXQLQueryMaker$QueryAnalyzer.visitQuery(NXQLQueryMaker.java:853)

I have tried fiddling around with the orders in which the components are loaded but I didn't see enough differences to stay the course. I don't see any misbehavior in the log file.

0 votes

1 answers

1130 views

ANSWER

Can you share a project that I can load in my IDE for reproducing the problem ?

Thanks

11/21/2012

I certainly can't send the full project so I'll try to reproduce it in a smaller one.
11/21/2012

What Nuxeo version?
11/21/2012

Happens on both 5.5-HF05 and 5.6.
11/21/2012

I'm happy to say that the project that is hosted in this repository exhibits the problem: https://github.com/fdgonthier/nuxeo-hotreload-demo

By relying solely on hot reload to get the project loaded (ie: not making a bundle out of it) I get an error similar to what I described in my question.

The project follows the frame of the service that raises the exception in our actual project. It defines a document type and a service that is called through a cron job to scan the repository for specific documents periodically. It seems the document is registered way before the service is started so I don't think it's a kind of race condition.

11/21/2012

I will have a look, thanks.
11/22/2012



I think that problem was already solved in NXP-10024 and released in 5.6-HF01 and 5.5-HF14. Can you try with the last SDK released. Here is the link for downloading.

0 votes



I am using Nuxeo 5.6 HF07 now and I'm still having various problems with hot reload. Hot reload is still unusable for me.

Caused by: java.lang.NoClassDefFoundError: Lcom/rlnx/nuxeo/am/web/AmFolderSelectDialog;

at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2291)
at java.lang.Class.getDeclaredFields(Class.java:1743)
at org.jboss.seam.Component.initMembers(Component.java:543)
at org.jboss.seam.Component.<init>(Component.java:244)
at org.jboss.seam.Component.<init>(Component.java:205)
at org.jboss.seam.init.Initialization.addComponent(Initialization.java:1139)
... 27 more

Caused by: java.lang.ClassNotFoundException: com.rlnx.nuxeo.am.web.AmFolderSelectDialog

at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 34 more
12/29/2012

I am using Nuxeo 5.6 HF07 now and I'm still having various problems with hot reload. Hot reload is still unusable for me.

Caused by: java.lang.NoClassDefFoundError: Lcom/rlnx/nuxeo/am/web/AmFolderSelectDialog;

at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2291)
at java.lang.Class.getDeclaredFields(Class.java:1743)
at org.jboss.seam.Component.initMembers(Component.java:543)
at org.jboss.seam.Component.<init>(Component.java:244)
at org.jboss.seam.Component.<init>(Component.java:205)
at org.jboss.seam.init.Initialization.addComponent(Initialization.java:1139)
... 27 more

Caused by: java.lang.ClassNotFoundException: com.rlnx.nuxeo.am.web.AmFolderSelectDialog

at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 34 more
12/29/2012