07-18-2007 12:07 AM
org.apache.jackrabbit.rmi.client.RemoteRepositoryException: Error unmarshaling return; nested exception is:
java.lang.ClassNotFoundException: net.sf.acegisecurity.AuthenticationCredentialsNotFoundException (no security manager: RMI class loader disabled): Error unmarshaling return; nested exception is:
java.lang.ClassNotFoundException: net.sf.acegisecurity.AuthenticationCredentialsNotFoundException (no security manager: RMI class loader disabled)
at org.apache.jackrabbit.rmi.client.ClientProperty.getValue(ClientProperty.java:139)
at sample.FirstJCRClient.showNodeInfo(FirstJCRClient.java:118)
at sample.FirstJCRClient.main(FirstJCRClient.java:79)
package sample;
import java.rmi.Naming;
import java.rmi.RMISecurityManager;
import java.util.Properties;
import javax.jcr.Node;
import javax.jcr.NodeIterator;
import javax.jcr.Property;
import javax.jcr.PropertyIterator;
import javax.jcr.Repository;
import javax.jcr.RepositoryException;
import javax.jcr.Session;
import javax.jcr.SimpleCredentials;
import javax.jcr.Value;
import javax.jcr.nodetype.PropertyDefinition;
import org.apache.jackrabbit.rmi.client.ClientAdapterFactory;
import org.apache.jackrabbit.rmi.client.LocalAdapterFactory;
import org.apache.jackrabbit.rmi.remote.RemoteRepository;
public final class FirstJCRClient {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
/* define locals */
String vRmiRegistryLocation = null;
Object vRemoteObjectReference = null;
Repository vJcrRepository = null;
LocalAdapterFactory vLocalAdapterFactory = null;
Session vJcrSession = null;
Node vJcrNode = null;
String vRmiServerName = null;
String vRmiServerPort = null;
String vRmiBindingName = null;
//Properties vJcrRmiProperties = null;
try
{
/* intitalize */
//vJcrRmiProperties = new Properties();
vLocalAdapterFactory = new ClientAdapterFactory();
//vJcrRmiProperties.load(FirstJCRClient.class.getClassLoader().getResourceAsStream("/jcr-rmi.properties"));
/* get command line argments for connection parameters */
//vRmiServerName = vJcrRmiProperties.getProperty("rmi.jcr.binding.servername");
vRmiServerName = "localhost";
// vRmiServerPort = vJcrRmiProperties.getProperty("rmi.jcr.binding.port");
vRmiServerPort = "1099";
//vRmiBindingName = vJcrRmiProperties.getProperty("rmi.jcr.binding.name");
vRmiBindingName = "javaContentRepository";
vRmiRegistryLocation = "rmi://"+vRmiServerName;
vRmiRegistryLocation += ":"+vRmiServerPort;
vRmiRegistryLocation += "/"+vRmiBindingName;
java.io.PrintStream out = System.out;
out.println("looking up remote reference at ["+vRmiRegistryLocation+"]</br>");
//System.setSecurityManager(new RMISecurityManager());
vRemoteObjectReference = Naming.lookup(vRmiRegistryLocation);
// access content
out.println("creating local adapter for remotereference ["+vRemoteObjectReference+"]</br>");
vJcrRepository = vLocalAdapterFactory.getRepository((RemoteRepository)vRemoteObjectReference);
out.println("logging in as admin admin to default workspace</br>");
vJcrSession = vJcrRepository.login(new SimpleCredentials("admin", "admin".toCharArray()));
out.println("looking up workspace root node</br>");
vJcrNode = vJcrSession.getRootNode();
//propertyã
07-21-2007 10:39 PM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.