jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julio Castillo" <jcasti...@edgenuity.com>
Subject RE: JCR Webdav Server -1.4.1 -Exception found
Date Sun, 27 Apr 2008 00:47:06 GMT
Angela,
While trying to run the JCR Webdav client I got an exception (see stack
trace below). My test program (again modeled after the RepositoryHelper that
uses jcr2spi/JCR2SPIRepositoryStub.java) does in summary the following:
	session = helper.getSuperuserSession();
	root = session.getRootNode();

I get the exception while attempting to get the root node. I get several
exceptions on the server side, but those are different from the exception I
get on the client side.

Using the latest RepositoryServiceImpl file I get the Null pointer exception
because the DavPropertySet.map variable contains only the following entries
in the map:
"{http://www.day.com/jcr/webdav/1.0}path"
"{DAV:}resourcetype"
"{http://www.day.com/jcr/webdav/1.0}parent"

And the code is looking for the following key:
"{http://www.day.com/jcr/webdav/1.0}name"

Of course this is not in the DavPropertySet.map and when trying to
dereference it in URIResolverImpl.buildPropertyId:201 I get a null pointer
exception while attempting to getValue from a null value. Should I create
bug report?

Exception in thread "main" java.lang.NullPointerException
	at
org.apache.jackrabbit.spi2dav.URIResolverImpl.buildPropertyId(URIResolverImp
l.java:201)
	at
org.apache.jackrabbit.spi2dav.RepositoryServiceImpl.getNodeInfo(RepositorySe
rviceImpl.java:808)
	at
org.apache.jackrabbit.spi2dav.RepositoryServiceImpl.getItemInfos(RepositoryS
erviceImpl.java:834)
	at
org.apache.jackrabbit.jcr2spi.state.WorkspaceItemStateFactory.createNodeStat
e(WorkspaceItemStateFactory.java:88)
	at
org.apache.jackrabbit.jcr2spi.state.TransientISFactory.createNodeState(Trans
ientISFactory.java:99)
	at
org.apache.jackrabbit.jcr2spi.hierarchy.NodeEntryImpl.doResolve(NodeEntryImp
l.java:959)
	at
org.apache.jackrabbit.jcr2spi.hierarchy.HierarchyEntryImpl.resolve(Hierarchy
EntryImpl.java:95)
	at
org.apache.jackrabbit.jcr2spi.hierarchy.HierarchyEntryImpl.getItemState(Hier
archyEntryImpl.java:212)
	at
org.apache.jackrabbit.jcr2spi.ItemManagerImpl.getItem(ItemManagerImpl.java:1
57)
	at
org.apache.jackrabbit.jcr2spi.SessionImpl.getRootNode(SessionImpl.java:225)
	at
com.edgenuity.contentMgmt.test.RepositoryTest.main(RepositoryTest.java:193)

General question. The Stub in effect simulates a repository? The Node,
Session and other objects appear to be real objects on the client side?


Exception/trace on the server side in response to the requests above:

26.04.2008 17:38:20 *INFO * JCRWebdavServer: login: User 'admin' logged in.
(JCRWebdavServer.java, line 188)
26.04.2008 17:38:20 *INFO * JCRWebdavServer: Removed reference
org.apache.jackrabbit.webdav.WebdavRequestImpl@56d6cf to session
org.apache.jackrabbit.server.jcr.JCRWebdavServer$DavSessionImpl@1662250
(JCRWebdavServer.java, line 222)
26.04.2008 17:38:20 *INFO * JCRWebdavServer: No more references present on
webdav session -> clean up. (JCRWebdavServer.java, line 228)
26.04.2008 17:38:20 *INFO * JCRWebdavServer: Login: User 'admin' logged out
(JCRWebdavServer.java, line 234)
26.04.2008 17:38:47 *DEBUG* IfHeader: IfHeader: No If header in request
(IfHeader.java, line 247)
26.04.2008 17:38:47 *DEBUG* IfHeader: IfHeader: No If header in request
(IfHeader.java, line 247)
26.04.2008 17:38:47 *DEBUG* MLRUItemStateCache:
org.apache.jackrabbit.core.state.MLRUItemStateCache@e9c592 size=1,
664/4194304 (MLRUItemStateCache.java, line 148)
26.04.2008 17:38:47 *INFO * JCRWebdavServer: login: User 'admin' logged in.
(JCRWebdavServer.java, line 188)
26.04.2008 17:38:47 *DEBUG* MLRUItemStateCache:
org.apache.jackrabbit.core.state.MLRUItemStateCache@18ec029 size=1,
4864/4194304 (MLRUItemStateCache.java, line 148)
26.04.2008 17:38:47 *DEBUG* ItemManager: created item
cafebabe-cafe-babe-cafe-babecafebabe (ItemManager.java, line 750)
26.04.2008 17:38:47 *DEBUG* ItemManager: caching item
cafebabe-cafe-babe-cafe-babecafebabe (ItemManager.java, line 689)
26.04.2008 17:38:48 *DEBUG* NodeImpl: Unable to perform versioning operation
on non versionable node: / (NodeImpl.java, line 3214)
26.04.2008 17:38:48 *DEBUG* DavException: DavException: (501) Unable to
perform versioning operation on non versionable node: / (DavException.java,
line 101)
26.04.2008 17:38:48 *DEBUG* JcrDavException: Handling exception with error
code 501 (JcrDavException.java, line 98)
javax.jcr.UnsupportedRepositoryOperationException: Unable to perform
versioning operation on non versionable node: /
        at
org.apache.jackrabbit.core.NodeImpl.checkVersionable(NodeImpl.java:3215)
        at
org.apache.jackrabbit.core.NodeImpl.getVersionHistory(NodeImpl.java:3177)
        at
org.apache.jackrabbit.webdav.jcr.VersionControlledItemCollection.getVersionH
istory(VersionControlledItemCollection.java:486)
        at
org.apache.jackrabbit.webdav.jcr.DavResourceFactoryImpl.isVersionControlled(
DavResourceFactoryImpl.java:220)
        at
org.apache.jackrabbit.webdav.jcr.DavResourceFactoryImpl.createResource(DavRe
sourceFactoryImpl.java:104)
        at
org.apache.jackrabbit.webdav.server.AbstractWebdavServlet.service(AbstractWe
bdavServlet.java:187)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:290)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:206)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:233)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:175)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128
)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102
)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:109)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
        at
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:
856)
        at
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(H
ttp11AprProtocol.java:565)
        at
org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1509)
        at java.lang.Thread.run(Thread.java:619)
26.04.2008 17:38:48 *DEBUG* DavResourceFactoryImpl: Resource
'http://localhost:2455/jackrabbit/server/default/jcr%3aroot/' is not
version-controlled. (DavResourceFactoryImpl.java, line 222)
26.04.2008 17:38:48 *DEBUG* AbstractItemResource:
http://localhost:2455/jackrabbit/server/default/ (AbstractItemResource.java,
line 391)
26.04.2008 17:38:48 *DEBUG* AbstractItemResource:
javax.jcr.PathNotFoundException: no such ancestor path of degree 1
(AbstractItemResource.java, line 371)
26.04.2008 17:38:48 *DEBUG* DefaultItemCollection: No primary item present
on this node '/default/jcr:root' (DefaultItemCollection.java, line 872)


-----Original Message-----
From: Julio Castillo [mailto:jcastillo@edgenuity.com] 
Sent: Thursday, April 24, 2008 3:04 PM
To: 'users@jackrabbit.apache.org'
Subject: RE: JCR Webdav Server -1.4.1 -looking for a client

Angela,
I tried to put together a JCR WebDav client from various test programs in
the sources. I enabled in the jackrabbit's web.xml the init-parm entries
under JCRWebdavServlet (missing-auth-mapping and authenticate-header).
I picked up a the file repositoryStubImpl.properties and made the following
modification:
javax.jcr.tck.repository_stub_impl=com.myCompany.contentMgmt.stub.JCR2SPIRep
ositoryStub
org.apache.jackrabbit.jcr2spi.repository.url=http://localhost:2455/jackrabbi
t/server/

Where the JCR2SPIRepositoryStub is a ported module based on
org/apache/jackrabbit/jcr2spi/JCR2SPIRepositoryStub.java

My starting point was the following file:
 org/apache/jackrabbit/test/RepositoryHelper.java

As I single step through it, the following file has a relevant role in the
process:
 org/apache/jackrabbit/jcr2spi/RepositoryImpl.java

The problems (actually warnings). The current settings for authentication
generates the following warnings while trying to get execute the
JCR2SPIRepositoryStub.getRepository() method.
"0     [main] WARN  org.apache.commons.httpclient.HttpMethodDirector  -
Required credentials not available for BASIC <any realm>@localhost:2455"
"39125 [main] WARN  org.apache.commons.httpclient.HttpMethodDirector  -
Preemptive authentication requested but no default credentials available"

On the server side I get the fact that "anonymous" logs in and out.
Any idea what exactly the warning messages refer to? Or how to address them?

Thanks

** julio


Mime
View raw message