jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ask4saif <ask4s...@gmail.com>
Subject Caused by: java.lang.StackOverflowError
Date Tue, 04 Sep 2012 12:12:32 GMT
javax.ejb.EJBException: See nested exception; nested exception is:
java.lang.Exception: See nested Throwable
Hi all I am pre much a beginner in JackRabbit. I am using it with
websphere7. I have a session EJB with a method getRepository() to share my
JackRabbit repository with other applications as a JNDI resource. Following
is my EJB code snippet and PFA my repository.xml file:

@Stateful(mappedName = "JackRabbitEJB")
public class JackRabbitEJB implements JackRabbitEJBRemote  {

    /**
     * Default constructor. 
     */
    public JackRabbitEJB() {}
    
    public Repository getRepository(){
    	Repository repository = null;
    	try{
    	   
System.setProperty("org.apache.jackrabbit.repository.home","d:\\jcr_repo");
    	   
System.setProperty("org.apache.jackrabbit.repository.conf","d:\\jcr_repo\\repository.xml");
    	      Hashtable<String, String> props = new Hashtable<String,
String>();
    		repository = new TransientRepository();
    		
    		Session session = repository.login(new SimpleCredentials("repoadmin",
"repoadmin".toCharArray()));
    		System.out.println("Checking session is live or not: "+
session.isLive());
    	}catch (RepositoryException e) {
    			e.printStackTrace();
		}
    	return repository;
    }

}

This is the exception i am getting in my log file.

Caused by: java.lang.StackOverflowError
	at java.util.HashMap.findNonNullKeyEntry(HashMap.java:527)
	at java.util.LinkedHashMap.get(LinkedHashMap.java:316)
	at
org.apache.jackrabbit.core.cache.ConcurrentCache.get(ConcurrentCache.java:126)
	at
org.apache.jackrabbit.core.state.MLRUItemStateCache.retrieve(MLRUItemStateCache.java:71)
	at
org.apache.jackrabbit.core.state.ItemStateReferenceCache.retrieve(ItemStateReferenceCache.java:139)
	at
org.apache.jackrabbit.core.state.SharedItemStateManager.getNonVirtualItemState(SharedItemStateManager.java:1716)
	at
org.apache.jackrabbit.core.state.SharedItemStateManager.getItemState(SharedItemStateManager.java:268)
	at
org.apache.jackrabbit.core.HierarchyManagerImpl.getItemState(HierarchyManagerImpl.java:152)
	at
org.apache.jackrabbit.core.HierarchyManagerImpl.buildPath(HierarchyManagerImpl.java:278)
	at
org.apache.jackrabbit.core.HierarchyManagerImpl.buildPath(HierarchyManagerImpl.java:280)
	at
org.apache.jackrabbit.core.HierarchyManagerImpl.buildPath(HierarchyManagerImpl.java:280)
..................
.................
at
org.apache.jackrabbit.core.HierarchyManagerImpl.buildPath(HierarchyManagerImpl.java:280)
	at
org.apache.jackrabbit.core.HierarchyManagerImpl.getPath(HierarchyManagerImpl.java:395)
	at org.apache.jackrabbit.core.SearchManager.<init>(SearchManager.java:167)
	at
org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.getSearchManager(RepositoryImpl.java:1862)
	at
org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.doPostInitialize(RepositoryImpl.java:2098)
	at
org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.initialize(RepositoryImpl.java:2004)
	at
org.apache.jackrabbit.core.RepositoryImpl.initStartupWorkspaces(RepositoryImpl.java:517)
	at
org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:324)
	at
org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:589)
	at
org.apache.jackrabbit.core.TransientRepository$2.getRepository(TransientRepository.java:232)
	at
org.apache.jackrabbit.core.TransientRepository.startRepository(TransientRepository.java:280)
	at
org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:376)
	at
org.apache.jackrabbit.commons.AbstractRepository.login(AbstractRepository.java:123)
	at
com.emaratech.jackrabbit.ejb.JackRabbitEJB.getRepository(JackRabbitEJB.java:34)
	at
com.emaratech.jackrabbit.ejb.EJSRemote0SFJackRabbitEJB_6dac4519.getRepository(EJSRemote0SFJackRabbitEJB_6dac4519.java)
	at
com.emaratech.jackrabbit.ejb._JackRabbitEJBRemote_Stub.getRepository(_JackRabbitEJBRemote_Stub.java)
	at com.emaratech.jcr.servlet.JCRServlet.init(JCRServlet.java:147)
	at javax.servlet.GenericServlet.init(GenericServlet.java:241)
	at
com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:358)
	at
com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.init(ServletWrapperImpl.java:169)
	at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:739)
	at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:502)
	at
com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:179)
	at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3935)
	at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)
	at
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:931)
	at
com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583)
	at
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
	at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
	at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
	at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
	at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:276)
	at
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
	at
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
	at
com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
	at
com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
	at
com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
	at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
	at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
	at
com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
	at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604)

I m not getting out of this exception, this exception is raised at the
following line:
Session session = repository.login(new SimpleCredentials("repoadmin",
"repoadmin".toCharArray()));

I will appreciate your help in this regards in advance.

Regards,
Saif Khan
http://jackrabbit.510166.n4.nabble.com/file/n4656426/repository.xml
repository.xml 



--
View this message in context: http://jackrabbit.510166.n4.nabble.com/Caused-by-java-lang-StackOverflowError-tp4656426.html
Sent from the Jackrabbit - Dev mailing list archive at Nabble.com.

Mime
View raw message