-
Notifications
You must be signed in to change notification settings - Fork 8
Nuxeo quick reference
- document types : see in [OSGI-INF/CoreExtensions.xml] (http://explorer.nuxeo.org/nuxeo/site/distribution/current/viewComponent/org.nuxeo.ecm.core.CoreExtensions) in nuxeo-core-xxx.jar in $NUXEO_HOME/nxserver/bundles
- [query reference & examples (NXQL)] (https://doc.nuxeo.com/display/NXDOC/NXQL)
- bundles, components, extension points & contributions : see [Nuxeo Explorer] (http://explorer.nuxeo.org/nuxeo/site/distribution/current)
- how to get the Nuxeo source, to be able to target it when your IDE wants to open the source of Java code being executed
- javadoc
See also Developing on the service registry.
Simply remove the nxserver/data
folder from Nuxeo (in the EasySOA package, Nuxeo is filed under the serviceregistry
folder).
Open bin/nuxeo.conf
and uncomment the "DEBUGGING" options line:
# Sample JPDA settings for remote socket debugging
JAVA_OPTS=$JAVA_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n
You can switch suspend=n
to suspend=y
if you want to monitor Nuxeo right from the start (Java will wait for you to connect with Eclipse before to start Nuxeo).
Error :
com.google.inject.ProvisionException: Guice provision errors:
- null returned by binding at org.nuxeo.runtime.test.runner.RuntimeFeature.bind0(RuntimeFeature.java:196) but org.nuxeo.snapshot.AbstractTestSnapshot.session is not @Nullable at org.nuxeo.runtime.test.runner.RuntimeFeature.bind0(RuntimeFeature.java:196) while locating org.nuxeo.ecm.core.api.CoreSession
Solution :
In your test annotations, change cleanup to Granularity.CLASS in
@RepositoryConfig(type = BackendType.H2, init = PublishRepositoryInit.class, user = "Administrator", cleanup = Granularity.METHOD)
It is not done by "+" but by either by putting them along each other in an EL expression, [using <c:set var="s" value="${s1} ${s2}"/>
beforehand] (http://stackoverflow.com/questions/296398/concatenate-strings-in-jsp-el), or defining a [custom concat() function] (http://stackoverflow.com/questions/2192759/concatenate-strings-in-jsf-jsp-el-and-javascript).
-
How to return collections in jaxrs / jaxb / cxf (without going to Spring conf) : create a strong-typed collection class ex. ExchangeRecordCollection See http://dhruba.name/2008/12/08/rest-service-example-using-cxf-22-jax-rs-10-jaxb-and-spring/#comment-781 NB. resteasy provides additional non-standard annotations for that : @Wrapped http://stackoverflow.com/questions/6192389/root-element-name-in-collections-returned-by-resteasy
-
How to handle a reference to another object not as an object but as its id : XmlJavaTypeAdapter See http://docs.oracle.com/javase/6/docs/api/javax/xml/bind/annotation/adapters/XmlJavaTypeAdapter.html
-
How to automatically convert java objects to JSON with a JAX RS service : Some annotation need to ba added on the method :
@GET
@Path("/getExchangeRecordStorelist")
@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
public StoreCollection getExchangeRecordStorelist() { ...
@Produces to tell that the returned type can be a json string. The returned java object, here StoreCollection must have some annotations :
@XmlRootElement
public class StoreCollection {
private Collection<ExchangeRecordStore> stores;
...
@XmlElement(name="ExchangeRecordStore")
@XmlElementWrapper(name="stores")
public Collection<ExchangeRecordStore> getStores() {
return stores;
}
}