[opencms-dev] a weird problem ...
Dark Side
darkside68 at web.de
Sun Nov 5 12:34:21 CET 2006
Hi,
regardless of the problem you have,
this:
co.getRequestContext().setSiteRoot("/sites"); // no trailing slash ?!
makes definitely no sense!!!!!
A site root is either "/", the Root site or
"/sites/default/", "/sites/mysite/" etc.
A site is always a subfolder in the "/sites/" folder of your VFS
(looking at it form the Root-Site "/").
Which - of course - must have its corresponding definition in the
opencms.system.xml config file. This is also described in the Alkacon
documentation modules.
If you use something else as your "site", you might encounter unexpected
effects, so maybe you problem is related to that.
Dark
>
> is it a trailing slash again?
>
> i am currently getting thefollowing exception:
>
>
> ( 1 / 1 ) Publishing file /default/published.txt ... !!! Error
> publishing file "/sites/default/published.txt".
>
> !!! Exception Unable to read resource with ID
> "5d1e5c1e-6cb6-11db-9b38-1544a99c51af".
>
> org.opencms.file.CmsVfsResourceNotFoundException: Unable to read
> resource with ID "5d1e5c1e-6cb6-11db-9b38-1544a99c51af".
>
> at
> org.opencms.db.generic.CmsVfsDriver.readResource(CmsVfsDriver.java:1382)
>
> at
> org.opencms.db.generic.CmsProjectDriver.publishFile(CmsProjectDriver.
>
>
>
> now, what i do is pretty much this:
>
>
> co.getRequestContext().setSiteRoot("/sites"); // no trailing slash ?!
> /*
>
> make sure it isn't locked or something, if nothing else helps, steal
> the lock ...
>
> */
>
> co.publishResource("/default/published.txt",true,report); //
> leading slash??!?
>
>
>
> in this example, "/sites/default/published.txt" DOES exists. the
> actual values may vary, but my debugger tells me they actually are
> what i expect them to be. now i could try every possible combination
> of trailing and/or leading slashes, but what strikes me most is that
> the ID given in the exception is NOT a resource id, but the (correct!)
> structure id of the item in question. is that just another example of
> my confusion with the naming of structure and resource elements? i
> understand that the CmsResource objects actually are not only directly
> linked to the resource table in the db, but got a bit of structure
> mixed in, but shouldn't the error message read "unable to read
> resource with STRUCTURE id "foo-bar-something" or "... with RESOURCE
> if "bar-foo-something" instead? i mean, it's not entirely clear to me
> what it actually tries to retrieve ... and i don't have a strong urge
> to look at the sql logs, either ...
>
> anyway. anyone out there with a clear understanding of this frigging
> trailing/leading slash issue? help? please?
>
> .rm
>
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please
> visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
>
More information about the opencms-dev
mailing list