Unnest Exceptions

Hi,

i get this error recorded by the APM-Agent.

Could not open Jcr Session; nested exception is javax.jcr.LoginException: Workspace access denied

i've set this in my properties file:

unnest_exceptions

and i also tried:

unnest_exceptions=*nested*excpetion

but it seems like the exception is not unnested. How should it look like, and what is the correct config for this case?

APM Agent language and version:
Java 1.4.0

In order to unnest, you need to specify the class name of the Exception you want to unnest. So, if you want to unnest this javax.jcr.LoginException, your setting should be unnest_exceptions=javax.jcr.LoginException or any usage of pattern as described in the docs.

I changed it to unnest_exceptions=javax.jcr.LoginException but it looks and behaves the same.

How should it become visible in the gui that the exception is now unnested?

Is javax.jcr.LoginException the nested one, or the nesting one? I can't say as I didn't get your full logs, but it should be the nesting Exception.

Here is the full stacktrace (unneeded things away 7k limit). When i get it correctly the filter should be javax.jcr.AccessDeniedException then?

2019-03-25 14:17:11,852 [SEVERE ] 00000000 Servlet.service() for servlet [GenericServlet] in context with path [/analysis-ci] threw exception (org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/analysis-ci].[GenericServlet]: org.apache.catalina.core.StandardWrapperValve invoke) 
org.springframework.dao.DataAccessResourceFailureException: Could not open Jcr Session; nested exception is javax.jcr.LoginException: Workspace access denied
	at org.springframework.extensions.jcr.SessionFactoryUtils.getSession(SessionFactoryUtils.java:121)
	at ...
...
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:748)
Caused by: javax.jcr.LoginException: Workspace access denied
	at org.apache.jackrabbit.core.RepositoryImpl.login(RepositoryImpl.java:1529)
	at org.pentaho.platform.repository2.unified.jcr.sejcr.NoCachePentahoJcrSessionFactory.getSession(NoCachePentahoJcrSessionFactory.java:44)
	at org.pentaho.platform.repository2.unified.jcr.sejcr.GuavaCachePoolPentahoJcrSessionFactory.getSession(GuavaCachePoolPentahoJcrSessionFactory.java:145)
	at org.pentaho.platform.repository2.unified.jcr.sejcr.CredentialsStrategySessionFactory.getSession(CredentialsStrategySessionFactory.java:364)
	at org.springframework.extensions.jcr.SessionFactoryUtils.doGetSession(SessionFactoryUtils.java:87)
	at org.springframework.extensions.jcr.SessionFactoryUtils.getSession(SessionFactoryUtils.java:119)
	... 77 more
Caused by: javax.jcr.AccessDeniedException: Not allowed to access Workspace default
	at org.apache.jackrabbit.core.security.DefaultAccessManager.init(DefaultAccessManager.java:159)
	at org.apache.jackrabbit.core.DefaultSecurityManager.getAccessManager(DefaultSecurityManager.java:280)
	at org.apache.jackrabbit.core.SessionImpl.createAccessManager(SessionImpl.java:358)
	at org.apache.jackrabbit.core.SessionImpl.<init>(SessionImpl.java:273)
	at org.apache.jackrabbit.core.SessionImpl.<init>(SessionImpl.java:239)
	at org.apache.jackrabbit.core.XASessionImpl.<init>(XASessionImpl.java:101)
	at org.apache.jackrabbit.core.RepositoryImpl.createSessionInstance(RepositoryImpl.java:1613)
	at org.apache.jackrabbit.core.RepositoryImpl.createSession(RepositoryImpl.java:956)
	at org.apache.jackrabbit.core.RepositoryImpl.login(RepositoryImpl.java:1501)
	... 82 more

Looks like the unnesting should be done on org.springframework.dao.DataAccessResourceFailureException in order to get you the javax.jcr.LoginException. You can not go deeper than that, though, it is only one level.

Thanks now its working.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.