Hi,

Using Nuxeo 5.2 M4 with JBoss 4.2.3 GA.

I am trying to connect to Nuxeo repository using code similar to
http://svn.nuxeo.org/nuxeo/sandbox/nuxeo-remoting-sample/ but from a war
file (JAX-RS resource). However, I get ClassCastException while trying to
cast jndi retrieved object (proxy) in the following code.

    private static CoreSession getSession()
            throws NamingException {
        String beanRemoteLocation = "nuxeo/DocumentManagerBean/remote";
        javax.naming.Context ctx = getInitialContext();
        Object proxy = ctx.lookup(beanRemoteLocation);
        CoreSession session = (CoreSession) proxy; //classcastexception
        return session;
    }

My war (a JAX-RS resource) also packages nuxeo-core-apis.jar (snapshot
1.5). Nuxeo.ear (which also happens to package the same core apis jar) is
deployed on the same server (successfully). Please provide pointer to a
working sample code and packaging directions that uses Java (local or
remote) APIs to connect to the Nuxeo Repository. Note that my war will
always be colocated with Nuxeo.ear in the same JVM.


thanks,
sanjay

CollectionSpace - UC Berkeley

thanks,
sanjay



_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm

Reply via email to