You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stanbol.apache.org by Melanie Reiplinger <me...@dfki.de> on 2012/08/11 15:30:49 UTC
cmsadapter
Hi Stanbol people,
I have a few questions concerning the cmsadapter.
1)
To map a content repository to an RDF graph,
curl -i -X POST -d "sessionKey=eec8ff46-aaf9-485f-a7b5-452c1d7197d0&baseURI=[some_uri]&store=true" http://[stanbol]/cmsadapter/map/cms
does not work for me. (I get 500 internal server error)
The documentation says:
*"baseURI*is a mandatory parameter that is used as the base URI of the
RDF to be generated."
Why is this baseURI needed here as mandatory parameter, if the RDF graph
is returned to the user in application/rdf+xml format?
And what can I specify as baseURI (does it work with a local file path
or directory path)?
2)
For the contenthubfeed, I wanted to submit a content item with path
'node1/node2' from my repository with:
curl -i -X POST --data
"sessionKey=5d934b53-dc33-4d9c-884f-c16c8ba872af&path=/node1/node2&recursive=true"
http://lnv-89012.dfki.uni-sb.de:9001/cmsadapter/contenthubfeed
I get 200 OK, but when I look on the contenthub, nothing has changed, no
new items are listed.
Would it notify me in case it cannot find my repository item (e.g. for
wrong name or wrong path)?
(I was trying for JCR/RMI)
Thanks,
melanie
Re: enhancer parameter outputContentPart
Posted by Rupert Westenthaler <ru...@gmail.com>.
Hi Melanie
from http://stanbol.apache.org/docs/trunk/components/enhancer/contentitem.html
There are two types of content parts:
2. Content parts that are registered under a predefined URI. [..] This
is used to
share intermediate enhancement results between enhancement engines.
An example would be tokens, sentences, POS tags and chunks that are
extracted by some NLP engine.
An example of such a content part are the ExecutionMetadata.
from: http://stanbol.apache.org/docs/trunk/components/enhancer/executionmetadata.html
When the EnhancementJobManager starts the Enhancement of a ContentItem
it needs to check if the ContentItem already contains ExecutionMetadata in the
ContentPart with the URI
"http://stanbol.apache.org/ontology/enhancer/executionmetadata#ChainExecution".
If this is the case it needs to initialize itself based on the
pre-existing information.
If no ExecutionMetadata are present, a new EnhancementProcess needs to be
created based on the parsed Chain. Differences between this two cases are
explained in the following two sub sections.
So one example usage of the "outputContentPart" would be to explicitly
include the ExectionMetadata within the response of the Stanbol Enhancer.
For this you need to add the parameter
outputContentPart=http://stanbol.apache.org/ontology/enhancer/executionmetadata#ChainExecution
to the request of the StanbolEnhancer.
If you want to include the plain text version of the parsed content in
the response you
need to use
outputContent=text/plain
as the URI of the text plain content part is dynamically generated based on the
MD5 of the plain text content and can therefore not be known in advance.
best
Rupert
On Thu, Sep 27, 2012 at 2:15 PM, Melanie Reiplinger
<me...@dfki.de> wrote:
> |Hi all,
>
> could someone please briefly clarify what the outputContentPart parameter
> for the enhancer does?
>
> About 'content parts', it says on
> http://stanbol.apache.org/docs/trunk/components/enhancer/contentitem.html:
> Content parts are used to represent the original content as well as
> transformations of the original content (typically created by pre-processing
> enhancement engines
> <http://stanbol.apache.org/docs/trunk/components/enhancer/engines/list.html>
> such as the Metaxa engine
> <http://stanbol.apache.org/docs/trunk/components/enhancer/engines/metaxaengine.html>).
> |etcetc
> |
> In the REST doku, it says:
> outputContentPart=[uri/'*']|: This parameter allows to explicitly include
> content parts with a specific URI in the response. Currently this only
> supports ContentParts that are stored as RDF graphs.
>
> Does this mean I'll specify the URI of a content item already present on the
> contenthub? And what is the use of that ?
>
> Thanks,
> Melanie
--
| Rupert Westenthaler rupert.westenthaler@gmail.com
| Bodenlehenstraße 11 ++43-699-11108907
| A-5500 Bischofshofen
enhancer parameter outputContentPart
Posted by Melanie Reiplinger <me...@dfki.de>.
|Hi all,
could someone please briefly clarify what the outputContentPart
parameter for the enhancer does?
About 'content parts', it says on
http://stanbol.apache.org/docs/trunk/components/enhancer/contentitem.html:
Content parts are used to represent the original content as well as
transformations of the original content (typically created by
pre-processing enhancement engines
<http://stanbol.apache.org/docs/trunk/components/enhancer/engines/list.html>
such as the Metaxa engine
<http://stanbol.apache.org/docs/trunk/components/enhancer/engines/metaxaengine.html>).
|etcetc
|
In the REST doku, it says:
outputContentPart=[uri/'*']|: This parameter allows to explicitly
include content parts with a specific URI in the response. Currently
this only supports ContentParts that are stored as RDF graphs.
Does this mean I'll specify the URI of a content item already present on
the contenthub? And what is the use of that ?
Thanks,
Melanie
Re: enhancer or contenthub problems?
Posted by Suat Gönül <su...@gmail.com>.
On Thu, Sep 27, 2012 at 1:36 PM, Melanie Reiplinger <
melanie.reiplinger@dfki.de> wrote:
> Am 27.09.2012 12:20, schrieb Suat Gönül:
>
>> Hi Melanie,
>>
>> On Thu, Sep 27, 2012 at 1:02 PM, Melanie Reiplinger <
>> melanie.reiplinger@dfki.de> wrote:
>>
>> Hi all,
>>>
>>> could someone please check on the contenthub items on
>>> http://dev.iks-project.eu:8081 <http://dev.iks-project.eu:****8081/<
>>> http://dev.iks-project.**eu:8081/ <http://dev.iks-project.eu:8081/>>>
>>>
>>> ?
>>>
>>> It seems, there are some error messages written to the html. E.g., the
>>> item page
>>>
>>> http://dev.iks-project.eu:****8081/contenthub/contenthub/**
>>> store/page/urn:content-item-****sha1-****7c41cece31c24a679b5ce60f3f01b5*
>>> ***
>>> 878a442d36<http://dev.iks-**project.eu:8081/contenthub/**
>>> contenthub/store/page/urn:**content-item-sha1-**
>>> 7c41cece31c24a679b5ce60f3f01b5**878a442d36<http://dev.iks-project.eu:8081/contenthub/contenthub/store/page/urn:content-item-sha1-7c41cece31c24a679b5ce60f3f01b5878a442d36>
>>> >
>>>
>>
>> It seems there is a bug in the ftl file drawing the details about the
>> ContentItem. Could you please open an issue and specify the steps i.e the
>> content itself, how it is sent to Contenthub, etc. to reproduce this
>> error.
>>
>
> I'd do that, but the items where this behaviour shows up were not created
> by me. I just noticed that some items were looking strange while failing to
> use the enhancer with the omitMetadata parameter via jQuery.ajax call. So I
> don't know what call produced that behaviour.
>
Ok, thanks. I will try to reproduce the error myself.
>
>
>
>> Best,
>> Suat
>>
>>
>>
>>> looks *really* strange.
>>>
>>>
>>> Best,
>>> Melanie
>>>
>>>
>>> Am 27.09.2012 11:19, schrieb Melanie Reiplinger:
>>>
>>> Hi Suat and all,
>>>>
>>>> after updating, the build will not work any more.
>>>>
>>>> [ERROR] Failed to execute goal org.apache.sling:maven-**
>>>> launchpad-plugin:2.1.0:****prepare-package (prepare-package) on project
>>>> org.apache.stanbol.launchers.****stable: Unable to resolve artifact.
>>>> Could
>>>> not transfer artifact org.apache.stanbol:org.apache.****
>>>> stanbol.entityhub.model.****clerezza:jar:0.10.0-incubating from/to
>>>> central
>>>> (http://repo.maven.apache.org/****maven2<http://repo.maven.apache.org/**maven2>
>>>> <http://repo.maven.**apache.org/maven2<http://repo.maven.apache.org/maven2>
>>>> >):
>>>>
>>>> Specified destination directory cannot be created:...
>>>>
>>>> Anybody else seen this problem?
>>>>
>>>> Best,
>>>> Melanie
>>>>
>>>> m 25.09.2012 16:48, schrieb Suat Gonul:
>>>>
>>>> Hi Melanie,
>>>>>
>>>>> It seems I had overlooked the DELETE value for the
>>>>> Access-Control-Allow-Methods header. Now, you should be able to execute
>>>>> CORS request for the DELETE method.
>>>>>
>>>>> Best,
>>>>> Suat
>>>>>
>>>>> On 09/25/2012 11:02 AM, Melanie Reiplinger wrote:
>>>>>
>>>>> Hi Suat,
>>>>>>
>>>>>> after a fresh checkout on the re-located source, I can delete items
>>>>>> via the REST interface. But when trying from jQuery, I can't get
>>>>>> through. Is it possible that CORS access has to be granted yet for the
>>>>>> CMSadapter? The Access-Control-Allow-Methods in the response header
>>>>>> seems to only contain GET, POST, and OPTIONS. I get 'Method DELETE is
>>>>>> not allowed by Access-Control-Allow-Methods'.
>>>>>>
>>>>>> Best,
>>>>>> Melanie
>>>>>>
>>>>>> Am 17.09.2012 12:17, schrieb Suat Gonul:
>>>>>>
>>>>>> Hi Melanie,
>>>>>>>
>>>>>>> Yes, it was working for me. Please note that you should rebuild the
>>>>>>> Entityhub component, since the issue was related with the Entityhub,
>>>>>>> to
>>>>>>> test the deletion operation.
>>>>>>>
>>>>>>> Best,
>>>>>>> Suat
>>>>>>>
>>>>>>> On 09/17/2012 12:42 PM, Melanie Reiplinger wrote:
>>>>>>>
>>>>>>> Hi Suat,
>>>>>>>>
>>>>>>>> I see that https://issues.apache.org/****jira/browse/STANBOL-727<https://issues.apache.org/**jira/browse/STANBOL-727>
>>>>>>>> <https:**//issues.apache.org/jira/**browse/STANBOL-727<https://issues.apache.org/jira/browse/STANBOL-727>
>>>>>>>> >is
>>>>>>>>
>>>>>>>> solved. Does the deletion of repository items on the
>>>>>>>> cmsadapter/contenthubfeed work for you now?
>>>>>>>>
>>>>>>>> Best,
>>>>>>>> Melanie
>>>>>>>>
>>>>>>>>
>>>>>>>> Am 31.08.2012 14:27, schrieb Suat Gönül:
>>>>>>>>
>>>>>>>> Hi Melanie,
>>>>>>>>>
>>>>>>>>> The deletion problems seems to be related with the bug described in
>>>>>>>>> STANBOL-727. Could you please retry after that bug is fixed?
>>>>>>>>>
>>>>>>>>> Best,
>>>>>>>>> Suat
>>>>>>>>>
>>>>>>>>> On Thu, Aug 30, 2012 at 1:00 PM, Melanie Reiplinger <
>>>>>>>>> melanie.reiplinger@dfki.de> wrote:
>>>>>>>>>
>>>>>>>>> Hi Suat,
>>>>>>>>>
>>>>>>>>>> thank you a lot for demonstrating this. It seems my mistake was
>>>>>>>>>> that
>>>>>>>>>> I did
>>>>>>>>>> not associate files with the nodes. For no specific reason I
>>>>>>>>>> assumed
>>>>>>>>>> that
>>>>>>>>>> files would be created when the nodes were created. But then I
>>>>>>>>>> guess
>>>>>>>>>> that
>>>>>>>>>> usually, it's the other way around: when building a repo, the
>>>>>>>>>> files are
>>>>>>>>>> already there and are then are used to build up the tree.
>>>>>>>>>>
>>>>>>>>>> Now how do you delete your 2 content items from the contenthub?
>>>>>>>>>> The
>>>>>>>>>> documentation says it's the very same syntax as for submitting
>>>>>>>>>> items, just
>>>>>>>>>> using DELETE instead of POST, but that gives me a Bad Request with
>>>>>>>>>> java.lang.******IllegalArgumentException: No content found for
>>>>>>>>>> any
>>>>>>>>>>
>>>>>>>>>> of the
>>>>>>>>>> following parameters [entity, content].
>>>>>>>>>> It does also not work in the REST interface.
>>>>>>>>>>
>>>>>>>>>> Best,
>>>>>>>>>> Melanie
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Am 27.08.2012 13:42, schrieb Suat Gonul:
>>>>>>>>>>
>>>>>>>>>> Hi Melanie,
>>>>>>>>>>
>>>>>>>>>> It is true that a content repo is needed to run unit tests.
>>>>>>>>>>> Anyway, I
>>>>>>>>>>> tested the Jackrabbit and I shall share the steps with you. I
>>>>>>>>>>> hope
>>>>>>>>>>> they
>>>>>>>>>>> would work for you too.
>>>>>>>>>>>
>>>>>>>>>>> First of all, I was able to create nodes in Jackrabbit through
>>>>>>>>>>> the JCR
>>>>>>>>>>> API.
>>>>>>>>>>>
>>>>>>>>>>> - I ran the jackrabbit-standalone-2.4.2.******jar on the 8080
>>>>>>>>>>> port.
>>>>>>>>>>>
>>>>>>>>>>> - Then created temporary nodes with the following code below. The
>>>>>>>>>>> code
>>>>>>>>>>> create two nodes to be submitted to the Contenthub under the
>>>>>>>>>>> "test"
>>>>>>>>>>> path. The nodes are associated with two files from the local file
>>>>>>>>>>> system. So, you should adapt the file paths. 3 external libraries
>>>>>>>>>>> are
>>>>>>>>>>> required to run this code: jackrabbit-jcr-rmi-2.2.*.jar,
>>>>>>>>>>> jcr-2.0.jar and
>>>>>>>>>>> slf4j-api-*.jar. They are already downloaded when you build
>>>>>>>>>>> Stanbol
>>>>>>>>>>> into
>>>>>>>>>>> the maven repository i.e the .m2 folder.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Repository repository = new URLRemoteRepository(
>>>>>>>>>>> "http://localhost:8080/rmi");
>>>>>>>>>>> Session session = repository.login(new
>>>>>>>>>>> SimpleCredentials("admin",
>>>>>>>>>>> "admin".toCharArray()));
>>>>>>>>>>>
>>>>>>>>>>> Node testNode = null;
>>>>>>>>>>> try {
>>>>>>>>>>> testNode = session.getNode("/test");
>>>>>>>>>>> testNode.remove();
>>>>>>>>>>> } catch (PathNotFoundException e) {
>>>>>>>>>>> // ignore
>>>>>>>>>>> }
>>>>>>>>>>> Node rootNode = session.getRootNode();
>>>>>>>>>>> testNode = rootNode.addNode("test");
>>>>>>>>>>>
>>>>>>>>>>> File f = new File(
>>>>>>>>>>> "/home/suat/Desktop/******technicalStuff/stanbolTests/**
>>>>>>>>>>> cmsAdapter/jackrabbit/news1.******txt");
>>>>>>>>>>>
>>>>>>>>>>> Node newsNode = testNode.addNode(f.getName(),
>>>>>>>>>>> "nt:file");
>>>>>>>>>>> Node resourceNode = newsNode.addNode("jcr:content"*
>>>>>>>>>>> ***
>>>>>>>>>>> **,
>>>>>>>>>>> "nt:resource");
>>>>>>>>>>> resourceNode.setProperty("jcr:******mimeType", "text/plain");
>>>>>>>>>>> Binary binary = session.getValueFactory().****
>>>>>>>>>>> createBinary(
>>>>>>>>>>> new FileInputStream(f));
>>>>>>>>>>> resourceNode.setProperty("jcr:******data", binary);
>>>>>>>>>>>
>>>>>>>>>>> f = new File(
>>>>>>>>>>> "/home/suat/Desktop/******technicalStuff/stanbolTests/**
>>>>>>>>>>> cmsAdapter/jackrabbit/news2.******txt");
>>>>>>>>>>>
>>>>>>>>>>> newsNode = testNode.addNode(f.getName(), "nt:file");
>>>>>>>>>>> resourceNode = newsNode.addNode("jcr:content"**
>>>>>>>>>>> ****,
>>>>>>>>>>> "nt:resource");
>>>>>>>>>>> resourceNode.setProperty("jcr:******mimeType", "text/plain");
>>>>>>>>>>> binary = session.getValueFactory().****
>>>>>>>>>>> createBinary(new
>>>>>>>>>>> FileInputStream(f));
>>>>>>>>>>> resourceNode.setProperty("jcr:******data", binary);
>>>>>>>>>>>
>>>>>>>>>>> session.save();
>>>>>>>>>>>
>>>>>>>>>>> - I ran the Stanbol on 8081 and executed the following commands:
>>>>>>>>>>> - curl -X GET -H "Accept: text/plain"
>>>>>>>>>>> "http://localhost:8081/******cmsadapter/session?****<http://localhost:8081/****cmsadapter/session?****>
>>>>>>>>>>> repositoryURL=http://**<http:/**/localhost:8081/**cmsadapter/**
>>>>>>>>>>> session?**repositoryURL=http:/**/**<http://localhost:8081/**cmsadapter/session?**repositoryURL=http://**>
>>>>>>>>>>> >
>>>>>>>>>>>
>>>>>>>>>>> localhost:8080/rmi&username=******admin&password=admin&****
>>>>>>>>>>> connectionType=JCR<http://****localhost:8081/cmsadapter/**
>>>>>>>>>>> session?repositoryURL=http://****localhost:8080/rmi&username=***
>>>>>>>>>>> *
>>>>>>>>>>>
>>>>>>>>>>> admin&password=admin&****connectionType=JCR<http://**
>>>>>>>>>>> localhost:8081/cmsadapter/**session?repositoryURL=http://**
>>>>>>>>>>> localhost:8080/rmi&username=**admin&password=admin&**
>>>>>>>>>>> connectionType=JCR<http://localhost:8081/cmsadapter/session?repositoryURL=http://localhost:8080/rmi&username=admin&password=admin&connectionType=JCR>
>>>>>>>>>>> >>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> "
>>>>>>>>>>> - curl -i -X POST --data
>>>>>>>>>>> "sessionKey=e92be985-e722-******419f-a1ad-5fe02628b537&path=/***
>>>>>>>>>>> ***
>>>>>>>>>>> test&recursive=true"
>>>>>>>>>>> http://localhost:8081/******cmsadapter/contenthubfeed<http://localhost:8081/****cmsadapter/contenthubfeed>
>>>>>>>>>>> <http**://localhost:8081/****cmsadapter/contenthubfeed<http://localhost:8081/**cmsadapter/contenthubfeed>
>>>>>>>>>>> >
>>>>>>>>>>> <http**://localhost:8081/**cmsadapter/**contenthubfeed<ht**
>>>>>>>>>>> tp://localhost:8081/**cmsadapter/contenthubfeed<http://localhost:8081/cmsadapter/contenthubfeed>
>>>>>>>>>>> >>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> In the second command the result of the first command should be
>>>>>>>>>>> used.
>>>>>>>>>>> After executing these commands, I was able to see documents on
>>>>>>>>>>> http://localhost:8081/******contenthub/contenthub/store<http://localhost:8081/****contenthub/contenthub/store>
>>>>>>>>>>> <ht**tp://localhost:8081/****contenthub/contenthub/store<http://localhost:8081/**contenthub/contenthub/store>
>>>>>>>>>>> >
>>>>>>>>>>> <ht**tp://localhost:8081/****contenthub/contenthub/store<ht**
>>>>>>>>>>> tp://localhost:8081/**contenthub/contenthub/store<http://localhost:8081/contenthub/contenthub/store>
>>>>>>>>>>> >>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> .
>>>>>>>>>>>
>>>>>>>>>>> Best,
>>>>>>>>>>> Suat
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On 08/20/2012 01:11 PM, Melanie Reiplinger wrote:
>>>>>>>>>>>
>>>>>>>>>>> Hi Suat,
>>>>>>>>>>>
>>>>>>>>>>>> Thanks for your reply.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> Am 20.08.2012 11:55, schrieb Suat Gönül:
>>>>>>>>>>>>
>>>>>>>>>>>> Hi Melanie,
>>>>>>>>>>>>
>>>>>>>>>>>>> Sorry, I could not answer you as I was in holiday. I will start
>>>>>>>>>>>>> to
>>>>>>>>>>>>> work on
>>>>>>>>>>>>> August 27. In my demonstration, I was using CRX CMS.
>>>>>>>>>>>>>
>>>>>>>>>>>>> That seems to be commercial software. I Cannot use that. So
>>>>>>>>>>>>> I'll
>>>>>>>>>>>>>
>>>>>>>>>>>> have
>>>>>>>>>>>> to find another way. Under these conditions, I'm not even sure
>>>>>>>>>>>> it
>>>>>>>>>>>> makes much sense to create unit tests for the JavaScript
>>>>>>>>>>>> interface to
>>>>>>>>>>>> the cmsadapter, since whoever wanted to run them would need to
>>>>>>>>>>>> have a
>>>>>>>>>>>> content repo locally installed to connect stanbol to it. It
>>>>>>>>>>>> makes
>>>>>>>>>>>> sense only if I could set up (or use) a remote repo that's
>>>>>>>>>>>> accessible
>>>>>>>>>>>> from wherever the test script is called...
>>>>>>>>>>>>
>>>>>>>>>>>> Best,
>>>>>>>>>>>> Melanie
>>>>>>>>>>>>
>>>>>>>>>>>> But to connect CRX, I
>>>>>>>>>>>>
>>>>>>>>>>>> have and additional bundle to be added to the OSGi
>>>>>>>>>>>>> environment. I
>>>>>>>>>>>>> can
>>>>>>>>>>>>> provide you that bundle when I'm back.
>>>>>>>>>>>>>
>>>>>>>>>>>>> I did not access to the repo via HTTP. In my demonstration, a
>>>>>>>>>>>>> session is
>>>>>>>>>>>>> obtained together with a session key after giving the necessary
>>>>>>>>>>>>> credentials
>>>>>>>>>>>>> e.g username, password, rmi endpoint. And that session key is
>>>>>>>>>>>>> used by
>>>>>>>>>>>>> CMS
>>>>>>>>>>>>> Adapter to access to the repo.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Best,
>>>>>>>>>>>>> Suat
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Mon, Aug 20, 2012 at 12:11 PM, Melanie Reiplinger <
>>>>>>>>>>>>> melanie.reiplinger@dfki.de> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>> Hi Suat,
>>>>>>>>>>>>>
>>>>>>>>>>>>> I cannot access my jackrabbit repo via xmlhttp either
>>>>>>>>>>>>>> (although
>>>>>>>>>>>>>> curl
>>>>>>>>>>>>>> works
>>>>>>>>>>>>>> fine), so this might as well be a CORS access problem. In your
>>>>>>>>>>>>>> demo,
>>>>>>>>>>>>>> did
>>>>>>>>>>>>>> you have to somehow provide access to the repo (by setting
>>>>>>>>>>>>>> headers
>>>>>>>>>>>>>> etc)?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Best,
>>>>>>>>>>>>>> Melanie
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Am 15.08.2012 11:15, schrieb Melanie Reiplinger:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Hi Suat,
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Am 13.08.2012 13:35, schrieb Suat Gonul:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> In any case, I guess that you
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> need to configure a RDF Bridge through the
>>>>>>>>>>>>>>>> {stanbol}/system/console/********configMgr interface.
>>>>>>>>>>>>>>>> There you
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> should
>>>>>>>>>>>>>>>> find
>>>>>>>>>>>>>>>> the
>>>>>>>>>>>>>>>> "Apache Stanbol CMS Adapter Default RDF Bridge
>>>>>>>>>>>>>>>> Configurations". In
>>>>>>>>>>>>>>>> that
>>>>>>>>>>>>>>>> configuration you specify the root path in the CMS to be
>>>>>>>>>>>>>>>> exported
>>>>>>>>>>>>>>>> to the
>>>>>>>>>>>>>>>> RDF.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> by that you mean the content repository path? This
>>>>>>>>>>>>>>>> means
>>>>>>>>>>>>>>>> that I set
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> there the path to my content repository?
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Yes, you set there a path residing in the content
>>>>>>>>>>>>>>>>> repository.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> I have set up a jackrabbit workspace with some toy
>>>>>>>>>>>>>>>> nodes
>>>>>>>>>>>>>>>> in it. To
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> access it remotely, I'd configure something like
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> http://[myserver]/server/
>>>>>>>>>>>>>>>>> <http://lnv-89012.dfki.uni-sb.****
>>>>>>>>>>>>>>>>> ****de:9002/server/default/******node1<
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> http://lnv-89012.dfki.**uni-****
>>>>>>>>>>>>>>>>> sb.de:9002/server/default/****<http://sb.de:9002/server/default/****>
>>>>>>>>>>>>>>>>> node1 <http://uni-sb.de:9002/server/**default/**node1<http://uni-sb.de:9002/server/default/**node1>
>>>>>>>>>>>>>>>>> ><
>>>>>>>>>>>>>>>>> http://lnv-89012.dfki.**uni-**sb.de:9002/server/default/**<http://uni-sb.de:9002/server/default/**>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> node1<http://lnv-89012.dfki.**
>>>>>>>>>>>>>>>>> uni-sb.de:9002/server/default/**node1<http://lnv-89012.dfki.uni-sb.de:9002/server/default/node1>
>>>>>>>>>>>>>>>>> >>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> ,
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> but then
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> I can work with this repository exclusively, right?
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> I cannot access the URL you gave, but I guess you
>>>>>>>>>>>>>>>>> should give
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> /node1
>>>>>>>>>>>>>>>> path to export it as RDF. I didn't get your question about
>>>>>>>>>>>>>>>> working
>>>>>>>>>>>>>>>> exclusively with the repository. But, you already seem to
>>>>>>>>>>>>>>>> work
>>>>>>>>>>>>>>>> on the
>>>>>>>>>>>>>>>> default repository of Jackrabbit running on your server.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> I tried with several paths, none will work.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> My remote repository stub is
>>>>>>>>>>>>>>> http://lnv-89012.dfki.uni-sb.********de:9002/rmi<http://lnv-
>>>>>>>>>>>>>>> **
>>>>>>>>>>>>>>> 89012. <http://lnv-89012.>**
>>>>>>>>>>>>>>> dfki.uni-sb.de:9002/rmi
>>>>>>>>>>>>>>> <http://lnv-89012.dfki.uni-sb.****de:9002/rmi<http://lnv-**
>>>>>>>>>>>>>>> 89012.dfki.uni-sb.de:9002/rmi<http://lnv-89012.dfki.uni-sb.de:9002/rmi>
>>>>>>>>>>>>>>> >
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> .
>>>>>>>>>>>>>>> (you cannot access those URIs because they are in a closed
>>>>>>>>>>>>>>> network)
>>>>>>>>>>>>>>> For accessing the content repository, I should use (according
>>>>>>>>>>>>>>> to my
>>>>>>>>>>>>>>> jackrabbit guidelines):
>>>>>>>>>>>>>>> http://lnv-89012.dfki.uni-sb.********de:9002/server<http://*
>>>>>>>>>>>>>>> *lnv- <http://lnv->*
>>>>>>>>>>>>>>> ***
>>>>>>>>>>>>>>> 89012.dfki.uni-sb.de:9002/******server<http://89012.dfki.uni-sb.de:9002/****server>
>>>>>>>>>>>>>>> <http://89012.dfki.uni-**sb.de:9002/**server<http://89012.dfki.uni-sb.de:9002/**server>
>>>>>>>>>>>>>>> >
>>>>>>>>>>>>>>> <http://lnv-89012.dfki.**uni-**sb.de:9002/server<http://uni-sb.de:9002/server>
>>>>>>>>>>>>>>> <http://lnv-**89012.dfki.uni-sb.de:9002/**server<http://lnv-89012.dfki.uni-sb.de:9002/server>
>>>>>>>>>>>>>>> >>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> to
>>>>>>>>>>>>>>> access all workspaces of myJCR repository
>>>>>>>>>>>>>>> http://lnv-89012.dfki.uni-sb.********de:9002/server/default/
>>>>>>>>>>>>>>> **jcr:
>>>>>>>>>>>>>>> ******
>>>>>>>>>>>>>>> rootto<http://lnv-89012.dfki.******uni-sb.de:9002/server/**
>>>>>>>>>>>>>>> default/** <http://uni-sb.de:9002/server/**default/**<http://uni-sb.de:9002/server/default/**>
>>>>>>>>>>>>>>> >
>>>>>>>>>>>>>>> jcr:rootto<http://lnv-89012.****
>>>>>>>>>>>>>>> dfki.uni-sb.de:9002/server/**<http://dfki.uni-sb.de:9002/server/**>
>>>>>>>>>>>>>>> default/jcr:rootto<http://lnv-**89012.dfki.uni-sb.de:9002/**
>>>>>>>>>>>>>>> server/default/jcr:rootto<http://lnv-89012.dfki.uni-sb.de:9002/server/default/jcr:rootto>
>>>>>>>>>>>>>>> >>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> access
>>>>>>>>>>>>>>> a single workspace (example with workspace named 'default').
>>>>>>>>>>>>>>> ->
>>>>>>>>>>>>>>> this
>>>>>>>>>>>>>>> one is also where I can navigate to with my browser, so this
>>>>>>>>>>>>>>> should
>>>>>>>>>>>>>>> then be
>>>>>>>>>>>>>>> the correct path I guess.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> But I always get the same error about
>>>>>>>>>>>>>>> org.apache.stanbol.cmsadapter.**
>>>>>>>>>>>>>>> ******jcr.mapping.JCRRDFMapper
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Failed to
>>>>>>>>>>>>>>> retrieve node having path: <thePath> or its childr
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> I'm an absolute beginner with content repositories, using
>>>>>>>>>>>>>>> jackrabbit for
>>>>>>>>>>>>>>> the first time and I'm really unsure of what would have to
>>>>>>>>>>>>>>> work if
>>>>>>>>>>>>>>> everything was correct, but I can see my repository in the
>>>>>>>>>>>>>>> jackrabbit
>>>>>>>>>>>>>>> console and I also can see that my nodes are existing, and
>>>>>>>>>>>>>>> the
>>>>>>>>>>>>>>> info
>>>>>>>>>>>>>>> command
>>>>>>>>>>>>>>> tells me that everything looks like I would expect:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Repository:
>>>>>>>>>>>>>>> http://lnv-89012.dfki.uni-sb.********de:9002/rmi<http://lnv-
>>>>>>>>>>>>>>> **
>>>>>>>>>>>>>>> 89012. <http://lnv-89012.>**
>>>>>>>>>>>>>>> dfki.uni-sb.de:9002/rmi
>>>>>>>>>>>>>>> <http://lnv-89012.dfki.uni-sb.****de:9002/rmi<http://lnv-**
>>>>>>>>>>>>>>> 89012.dfki.uni-sb.de:9002/rmi<http://lnv-89012.dfki.uni-sb.de:9002/rmi>
>>>>>>>>>>>>>>> >
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> User : admin
>>>>>>>>>>>>>>> Workspace : default
>>>>>>>>>>>>>>> Node : /
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> I looked at your paper ("Semantic Content Management with
>>>>>>>>>>>>>>> Apache
>>>>>>>>>>>>>>> Stanbol") and saw that you used jackrabbit in the demo, too.
>>>>>>>>>>>>>>> Is
>>>>>>>>>>>>>>> there some
>>>>>>>>>>>>>>> publicly accessible repository I could use for testing (so
>>>>>>>>>>>>>>> that I
>>>>>>>>>>>>>>> see what
>>>>>>>>>>>>>>> the path I have to specify looks like in a working example)?
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> best,
>>>>>>>>>>>>>>> melanie
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>
Re: enhancer or contenthub problems?
Posted by Melanie Reiplinger <me...@dfki.de>.
Am 27.09.2012 12:20, schrieb Suat Gönül:
> Hi Melanie,
>
> On Thu, Sep 27, 2012 at 1:02 PM, Melanie Reiplinger <
> melanie.reiplinger@dfki.de> wrote:
>
>> Hi all,
>>
>> could someone please check on the contenthub items on
>> http://dev.iks-project.eu:8081 <http://dev.iks-project.eu:**8081/<http://dev.iks-project.eu:8081/>>
>> ?
>>
>> It seems, there are some error messages written to the html. E.g., the
>> item page
>>
>> http://dev.iks-project.eu:**8081/contenthub/contenthub/**
>> store/page/urn:content-item-**sha1-**7c41cece31c24a679b5ce60f3f01b5**
>> 878a442d36<http://dev.iks-project.eu:8081/contenthub/contenthub/store/page/urn:content-item-sha1-7c41cece31c24a679b5ce60f3f01b5878a442d36>
>
> It seems there is a bug in the ftl file drawing the details about the
> ContentItem. Could you please open an issue and specify the steps i.e the
> content itself, how it is sent to Contenthub, etc. to reproduce this error.
I'd do that, but the items where this behaviour shows up were not
created by me. I just noticed that some items were looking strange while
failing to use the enhancer with the omitMetadata parameter via
jQuery.ajax call. So I don't know what call produced that behaviour.
>
> Best,
> Suat
>
>
>>
>> looks *really* strange.
>>
>>
>> Best,
>> Melanie
>>
>>
>> Am 27.09.2012 11:19, schrieb Melanie Reiplinger:
>>
>>> Hi Suat and all,
>>>
>>> after updating, the build will not work any more.
>>>
>>> [ERROR] Failed to execute goal org.apache.sling:maven-**
>>> launchpad-plugin:2.1.0:**prepare-package (prepare-package) on project
>>> org.apache.stanbol.launchers.**stable: Unable to resolve artifact. Could
>>> not transfer artifact org.apache.stanbol:org.apache.**
>>> stanbol.entityhub.model.**clerezza:jar:0.10.0-incubating from/to central
>>> (http://repo.maven.apache.org/**maven2<http://repo.maven.apache.org/maven2>):
>>> Specified destination directory cannot be created:...
>>>
>>> Anybody else seen this problem?
>>>
>>> Best,
>>> Melanie
>>>
>>> m 25.09.2012 16:48, schrieb Suat Gonul:
>>>
>>>> Hi Melanie,
>>>>
>>>> It seems I had overlooked the DELETE value for the
>>>> Access-Control-Allow-Methods header. Now, you should be able to execute
>>>> CORS request for the DELETE method.
>>>>
>>>> Best,
>>>> Suat
>>>>
>>>> On 09/25/2012 11:02 AM, Melanie Reiplinger wrote:
>>>>
>>>>> Hi Suat,
>>>>>
>>>>> after a fresh checkout on the re-located source, I can delete items
>>>>> via the REST interface. But when trying from jQuery, I can't get
>>>>> through. Is it possible that CORS access has to be granted yet for the
>>>>> CMSadapter? The Access-Control-Allow-Methods in the response header
>>>>> seems to only contain GET, POST, and OPTIONS. I get 'Method DELETE is
>>>>> not allowed by Access-Control-Allow-Methods'.
>>>>>
>>>>> Best,
>>>>> Melanie
>>>>>
>>>>> Am 17.09.2012 12:17, schrieb Suat Gonul:
>>>>>
>>>>>> Hi Melanie,
>>>>>>
>>>>>> Yes, it was working for me. Please note that you should rebuild the
>>>>>> Entityhub component, since the issue was related with the Entityhub, to
>>>>>> test the deletion operation.
>>>>>>
>>>>>> Best,
>>>>>> Suat
>>>>>>
>>>>>> On 09/17/2012 12:42 PM, Melanie Reiplinger wrote:
>>>>>>
>>>>>>> Hi Suat,
>>>>>>>
>>>>>>> I see that https://issues.apache.org/**jira/browse/STANBOL-727<https://issues.apache.org/jira/browse/STANBOL-727>is
>>>>>>> solved. Does the deletion of repository items on the
>>>>>>> cmsadapter/contenthubfeed work for you now?
>>>>>>>
>>>>>>> Best,
>>>>>>> Melanie
>>>>>>>
>>>>>>>
>>>>>>> Am 31.08.2012 14:27, schrieb Suat Gönül:
>>>>>>>
>>>>>>>> Hi Melanie,
>>>>>>>>
>>>>>>>> The deletion problems seems to be related with the bug described in
>>>>>>>> STANBOL-727. Could you please retry after that bug is fixed?
>>>>>>>>
>>>>>>>> Best,
>>>>>>>> Suat
>>>>>>>>
>>>>>>>> On Thu, Aug 30, 2012 at 1:00 PM, Melanie Reiplinger <
>>>>>>>> melanie.reiplinger@dfki.de> wrote:
>>>>>>>>
>>>>>>>> Hi Suat,
>>>>>>>>> thank you a lot for demonstrating this. It seems my mistake was that
>>>>>>>>> I did
>>>>>>>>> not associate files with the nodes. For no specific reason I assumed
>>>>>>>>> that
>>>>>>>>> files would be created when the nodes were created. But then I guess
>>>>>>>>> that
>>>>>>>>> usually, it's the other way around: when building a repo, the
>>>>>>>>> files are
>>>>>>>>> already there and are then are used to build up the tree.
>>>>>>>>>
>>>>>>>>> Now how do you delete your 2 content items from the contenthub? The
>>>>>>>>> documentation says it's the very same syntax as for submitting
>>>>>>>>> items, just
>>>>>>>>> using DELETE instead of POST, but that gives me a Bad Request with
>>>>>>>>> java.lang.****IllegalArgumentException: No content found for any
>>>>>>>>> of the
>>>>>>>>> following parameters [entity, content].
>>>>>>>>> It does also not work in the REST interface.
>>>>>>>>>
>>>>>>>>> Best,
>>>>>>>>> Melanie
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Am 27.08.2012 13:42, schrieb Suat Gonul:
>>>>>>>>>
>>>>>>>>> Hi Melanie,
>>>>>>>>>
>>>>>>>>>> It is true that a content repo is needed to run unit tests.
>>>>>>>>>> Anyway, I
>>>>>>>>>> tested the Jackrabbit and I shall share the steps with you. I hope
>>>>>>>>>> they
>>>>>>>>>> would work for you too.
>>>>>>>>>>
>>>>>>>>>> First of all, I was able to create nodes in Jackrabbit through
>>>>>>>>>> the JCR
>>>>>>>>>> API.
>>>>>>>>>>
>>>>>>>>>> - I ran the jackrabbit-standalone-2.4.2.****jar on the 8080 port.
>>>>>>>>>> - Then created temporary nodes with the following code below. The
>>>>>>>>>> code
>>>>>>>>>> create two nodes to be submitted to the Contenthub under the "test"
>>>>>>>>>> path. The nodes are associated with two files from the local file
>>>>>>>>>> system. So, you should adapt the file paths. 3 external libraries
>>>>>>>>>> are
>>>>>>>>>> required to run this code: jackrabbit-jcr-rmi-2.2.*.jar,
>>>>>>>>>> jcr-2.0.jar and
>>>>>>>>>> slf4j-api-*.jar. They are already downloaded when you build Stanbol
>>>>>>>>>> into
>>>>>>>>>> the maven repository i.e the .m2 folder.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Repository repository = new URLRemoteRepository(
>>>>>>>>>> "http://localhost:8080/rmi");
>>>>>>>>>> Session session = repository.login(new
>>>>>>>>>> SimpleCredentials("admin",
>>>>>>>>>> "admin".toCharArray()));
>>>>>>>>>>
>>>>>>>>>> Node testNode = null;
>>>>>>>>>> try {
>>>>>>>>>> testNode = session.getNode("/test");
>>>>>>>>>> testNode.remove();
>>>>>>>>>> } catch (PathNotFoundException e) {
>>>>>>>>>> // ignore
>>>>>>>>>> }
>>>>>>>>>> Node rootNode = session.getRootNode();
>>>>>>>>>> testNode = rootNode.addNode("test");
>>>>>>>>>>
>>>>>>>>>> File f = new File(
>>>>>>>>>> "/home/suat/Desktop/****technicalStuff/stanbolTests/**
>>>>>>>>>> cmsAdapter/jackrabbit/news1.****txt");
>>>>>>>>>> Node newsNode = testNode.addNode(f.getName(),
>>>>>>>>>> "nt:file");
>>>>>>>>>> Node resourceNode = newsNode.addNode("jcr:content"**
>>>>>>>>>> **,
>>>>>>>>>> "nt:resource");
>>>>>>>>>> resourceNode.setProperty("jcr:****mimeType", "text/plain");
>>>>>>>>>> Binary binary = session.getValueFactory().****
>>>>>>>>>> createBinary(
>>>>>>>>>> new FileInputStream(f));
>>>>>>>>>> resourceNode.setProperty("jcr:****data", binary);
>>>>>>>>>>
>>>>>>>>>> f = new File(
>>>>>>>>>> "/home/suat/Desktop/****technicalStuff/stanbolTests/**
>>>>>>>>>> cmsAdapter/jackrabbit/news2.****txt");
>>>>>>>>>> newsNode = testNode.addNode(f.getName(), "nt:file");
>>>>>>>>>> resourceNode = newsNode.addNode("jcr:content"****,
>>>>>>>>>> "nt:resource");
>>>>>>>>>> resourceNode.setProperty("jcr:****mimeType", "text/plain");
>>>>>>>>>> binary = session.getValueFactory().****
>>>>>>>>>> createBinary(new
>>>>>>>>>> FileInputStream(f));
>>>>>>>>>> resourceNode.setProperty("jcr:****data", binary);
>>>>>>>>>> session.save();
>>>>>>>>>>
>>>>>>>>>> - I ran the Stanbol on 8081 and executed the following commands:
>>>>>>>>>> - curl -X GET -H "Accept: text/plain"
>>>>>>>>>> "http://localhost:8081/****cmsadapter/session?****
>>>>>>>>>> repositoryURL=http://**<http://localhost:8081/**cmsadapter/session?**repositoryURL=http://**>
>>>>>>>>>>
>>>>>>>>>> localhost:8080/rmi&username=****admin&password=admin&****
>>>>>>>>>> connectionType=JCR<http://**localhost:8081/cmsadapter/**
>>>>>>>>>> session?repositoryURL=http://**localhost:8080/rmi&username=**
>>>>>>>>>> admin&password=admin&**connectionType=JCR<http://localhost:8081/cmsadapter/session?repositoryURL=http://localhost:8080/rmi&username=admin&password=admin&connectionType=JCR>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> "
>>>>>>>>>> - curl -i -X POST --data
>>>>>>>>>> "sessionKey=e92be985-e722-****419f-a1ad-5fe02628b537&path=/****
>>>>>>>>>> test&recursive=true"
>>>>>>>>>> http://localhost:8081/****cmsadapter/contenthubfeed<http://localhost:8081/**cmsadapter/contenthubfeed>
>>>>>>>>>> <http**://localhost:8081/cmsadapter/**contenthubfeed<http://localhost:8081/cmsadapter/contenthubfeed>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> In the second command the result of the first command should be
>>>>>>>>>> used.
>>>>>>>>>> After executing these commands, I was able to see documents on
>>>>>>>>>> http://localhost:8081/****contenthub/contenthub/store<http://localhost:8081/**contenthub/contenthub/store>
>>>>>>>>>> <ht**tp://localhost:8081/**contenthub/contenthub/store<http://localhost:8081/contenthub/contenthub/store>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> .
>>>>>>>>>>
>>>>>>>>>> Best,
>>>>>>>>>> Suat
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On 08/20/2012 01:11 PM, Melanie Reiplinger wrote:
>>>>>>>>>>
>>>>>>>>>> Hi Suat,
>>>>>>>>>>> Thanks for your reply.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Am 20.08.2012 11:55, schrieb Suat Gönül:
>>>>>>>>>>>
>>>>>>>>>>> Hi Melanie,
>>>>>>>>>>>> Sorry, I could not answer you as I was in holiday. I will start
>>>>>>>>>>>> to
>>>>>>>>>>>> work on
>>>>>>>>>>>> August 27. In my demonstration, I was using CRX CMS.
>>>>>>>>>>>>
>>>>>>>>>>>> That seems to be commercial software. I Cannot use that. So I'll
>>>>>>>>>>> have
>>>>>>>>>>> to find another way. Under these conditions, I'm not even sure it
>>>>>>>>>>> makes much sense to create unit tests for the JavaScript
>>>>>>>>>>> interface to
>>>>>>>>>>> the cmsadapter, since whoever wanted to run them would need to
>>>>>>>>>>> have a
>>>>>>>>>>> content repo locally installed to connect stanbol to it. It makes
>>>>>>>>>>> sense only if I could set up (or use) a remote repo that's
>>>>>>>>>>> accessible
>>>>>>>>>>> from wherever the test script is called...
>>>>>>>>>>>
>>>>>>>>>>> Best,
>>>>>>>>>>> Melanie
>>>>>>>>>>>
>>>>>>>>>>> But to connect CRX, I
>>>>>>>>>>>
>>>>>>>>>>>> have and additional bundle to be added to the OSGi environment. I
>>>>>>>>>>>> can
>>>>>>>>>>>> provide you that bundle when I'm back.
>>>>>>>>>>>>
>>>>>>>>>>>> I did not access to the repo via HTTP. In my demonstration, a
>>>>>>>>>>>> session is
>>>>>>>>>>>> obtained together with a session key after giving the necessary
>>>>>>>>>>>> credentials
>>>>>>>>>>>> e.g username, password, rmi endpoint. And that session key is
>>>>>>>>>>>> used by
>>>>>>>>>>>> CMS
>>>>>>>>>>>> Adapter to access to the repo.
>>>>>>>>>>>>
>>>>>>>>>>>> Best,
>>>>>>>>>>>> Suat
>>>>>>>>>>>>
>>>>>>>>>>>> On Mon, Aug 20, 2012 at 12:11 PM, Melanie Reiplinger <
>>>>>>>>>>>> melanie.reiplinger@dfki.de> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>> Hi Suat,
>>>>>>>>>>>>
>>>>>>>>>>>>> I cannot access my jackrabbit repo via xmlhttp either (although
>>>>>>>>>>>>> curl
>>>>>>>>>>>>> works
>>>>>>>>>>>>> fine), so this might as well be a CORS access problem. In your
>>>>>>>>>>>>> demo,
>>>>>>>>>>>>> did
>>>>>>>>>>>>> you have to somehow provide access to the repo (by setting
>>>>>>>>>>>>> headers
>>>>>>>>>>>>> etc)?
>>>>>>>>>>>>>
>>>>>>>>>>>>> Best,
>>>>>>>>>>>>> Melanie
>>>>>>>>>>>>>
>>>>>>>>>>>>> Am 15.08.2012 11:15, schrieb Melanie Reiplinger:
>>>>>>>>>>>>>
>>>>>>>>>>>>> Hi Suat,
>>>>>>>>>>>>>
>>>>>>>>>>>>> Am 13.08.2012 13:35, schrieb Suat Gonul:
>>>>>>>>>>>>>> In any case, I guess that you
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> need to configure a RDF Bridge through the
>>>>>>>>>>>>>>> {stanbol}/system/console/******configMgr interface. There you
>>>>>>>>>>>>>>> should
>>>>>>>>>>>>>>> find
>>>>>>>>>>>>>>> the
>>>>>>>>>>>>>>> "Apache Stanbol CMS Adapter Default RDF Bridge
>>>>>>>>>>>>>>> Configurations". In
>>>>>>>>>>>>>>> that
>>>>>>>>>>>>>>> configuration you specify the root path in the CMS to be
>>>>>>>>>>>>>>> exported
>>>>>>>>>>>>>>> to the
>>>>>>>>>>>>>>> RDF.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> by that you mean the content repository path? This means
>>>>>>>>>>>>>>> that I set
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> there the path to my content repository?
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Yes, you set there a path residing in the content
>>>>>>>>>>>>>>>> repository.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> I have set up a jackrabbit workspace with some toy nodes
>>>>>>>>>>>>>>> in it. To
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> access it remotely, I'd configure something like
>>>>>>>>>>>>>>>> http://[myserver]/server/
>>>>>>>>>>>>>>>> <http://lnv-89012.dfki.uni-sb.**
>>>>>>>>>>>>>>>> ****de:9002/server/default/****node1<
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> http://lnv-89012.dfki.**uni-**sb.de:9002/server/default/****
>>>>>>>>>>>>>>>> node1 <http://uni-sb.de:9002/server/default/**node1><
>>>>>>>>>>>>>>>> http://lnv-89012.dfki.**uni-sb.de:9002/server/default/**
>>>>>>>>>>>>>>>> node1<http://lnv-89012.dfki.uni-sb.de:9002/server/default/node1>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> ,
>>>>>>>>>>>>>>>>> but then
>>>>>>>>>>>>>>>> I can work with this repository exclusively, right?
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> I cannot access the URL you gave, but I guess you
>>>>>>>>>>>>>>>> should give
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> /node1
>>>>>>>>>>>>>>> path to export it as RDF. I didn't get your question about
>>>>>>>>>>>>>>> working
>>>>>>>>>>>>>>> exclusively with the repository. But, you already seem to work
>>>>>>>>>>>>>>> on the
>>>>>>>>>>>>>>> default repository of Jackrabbit running on your server.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> I tried with several paths, none will work.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>> My remote repository stub is
>>>>>>>>>>>>>> http://lnv-89012.dfki.uni-sb.******de:9002/rmi<http://lnv-**
>>>>>>>>>>>>>> 89012. <http://lnv-89012.>**
>>>>>>>>>>>>>> dfki.uni-sb.de:9002/rmi
>>>>>>>>>>>>>> <http://lnv-89012.dfki.uni-sb.**de:9002/rmi<http://lnv-89012.dfki.uni-sb.de:9002/rmi>
>>>>>>>>>>>>>> .
>>>>>>>>>>>>>> (you cannot access those URIs because they are in a closed
>>>>>>>>>>>>>> network)
>>>>>>>>>>>>>> For accessing the content repository, I should use (according
>>>>>>>>>>>>>> to my
>>>>>>>>>>>>>> jackrabbit guidelines):
>>>>>>>>>>>>>> http://lnv-89012.dfki.uni-sb.******de:9002/server<http://lnv-*
>>>>>>>>>>>>>> ***
>>>>>>>>>>>>>> 89012.dfki.uni-sb.de:9002/****server<http://89012.dfki.uni-sb.de:9002/**server>
>>>>>>>>>>>>>> <http://lnv-89012.dfki.**uni-sb.de:9002/server<http://lnv-89012.dfki.uni-sb.de:9002/server>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> to
>>>>>>>>>>>>>> access all workspaces of myJCR repository
>>>>>>>>>>>>>> http://lnv-89012.dfki.uni-sb.******de:9002/server/default/jcr:
>>>>>>>>>>>>>> ******
>>>>>>>>>>>>>> rootto<http://lnv-89012.dfki.****uni-sb.de:9002/server/**
>>>>>>>>>>>>>> default/** <http://uni-sb.de:9002/server/default/**>
>>>>>>>>>>>>>> jcr:rootto<http://lnv-89012.**dfki.uni-sb.de:9002/server/**
>>>>>>>>>>>>>> default/jcr:rootto<http://lnv-89012.dfki.uni-sb.de:9002/server/default/jcr:rootto>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> access
>>>>>>>>>>>>>> a single workspace (example with workspace named 'default'). ->
>>>>>>>>>>>>>> this
>>>>>>>>>>>>>> one is also where I can navigate to with my browser, so this
>>>>>>>>>>>>>> should
>>>>>>>>>>>>>> then be
>>>>>>>>>>>>>> the correct path I guess.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> But I always get the same error about
>>>>>>>>>>>>>> org.apache.stanbol.cmsadapter.******jcr.mapping.JCRRDFMapper
>>>>>>>>>>>>>> Failed to
>>>>>>>>>>>>>> retrieve node having path: <thePath> or its childr
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I'm an absolute beginner with content repositories, using
>>>>>>>>>>>>>> jackrabbit for
>>>>>>>>>>>>>> the first time and I'm really unsure of what would have to
>>>>>>>>>>>>>> work if
>>>>>>>>>>>>>> everything was correct, but I can see my repository in the
>>>>>>>>>>>>>> jackrabbit
>>>>>>>>>>>>>> console and I also can see that my nodes are existing, and the
>>>>>>>>>>>>>> info
>>>>>>>>>>>>>> command
>>>>>>>>>>>>>> tells me that everything looks like I would expect:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Repository:
>>>>>>>>>>>>>> http://lnv-89012.dfki.uni-sb.******de:9002/rmi<http://lnv-**
>>>>>>>>>>>>>> 89012. <http://lnv-89012.>**
>>>>>>>>>>>>>> dfki.uni-sb.de:9002/rmi
>>>>>>>>>>>>>> <http://lnv-89012.dfki.uni-sb.**de:9002/rmi<http://lnv-89012.dfki.uni-sb.de:9002/rmi>
>>>>>>>>>>>>>> User : admin
>>>>>>>>>>>>>> Workspace : default
>>>>>>>>>>>>>> Node : /
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I looked at your paper ("Semantic Content Management with
>>>>>>>>>>>>>> Apache
>>>>>>>>>>>>>> Stanbol") and saw that you used jackrabbit in the demo, too. Is
>>>>>>>>>>>>>> there some
>>>>>>>>>>>>>> publicly accessible repository I could use for testing (so
>>>>>>>>>>>>>> that I
>>>>>>>>>>>>>> see what
>>>>>>>>>>>>>> the path I have to specify looks like in a working example)?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> best,
>>>>>>>>>>>>>> melanie
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
Re: enhancer or contenthub problems?
Posted by Suat Gönül <su...@gmail.com>.
Hi Melanie,
On Thu, Sep 27, 2012 at 1:02 PM, Melanie Reiplinger <
melanie.reiplinger@dfki.de> wrote:
> Hi all,
>
> could someone please check on the contenthub items on
> http://dev.iks-project.eu:8081 <http://dev.iks-project.eu:**8081/<http://dev.iks-project.eu:8081/>>
> ?
>
> It seems, there are some error messages written to the html. E.g., the
> item page
>
> http://dev.iks-project.eu:**8081/contenthub/contenthub/**
> store/page/urn:content-item-**sha1-**7c41cece31c24a679b5ce60f3f01b5**
> 878a442d36<http://dev.iks-project.eu:8081/contenthub/contenthub/store/page/urn:content-item-sha1-7c41cece31c24a679b5ce60f3f01b5878a442d36>
It seems there is a bug in the ftl file drawing the details about the
ContentItem. Could you please open an issue and specify the steps i.e the
content itself, how it is sent to Contenthub, etc. to reproduce this error.
Best,
Suat
>
>
> looks *really* strange.
>
>
> Best,
> Melanie
>
>
> Am 27.09.2012 11:19, schrieb Melanie Reiplinger:
>
>> Hi Suat and all,
>>
>> after updating, the build will not work any more.
>>
>> [ERROR] Failed to execute goal org.apache.sling:maven-**
>> launchpad-plugin:2.1.0:**prepare-package (prepare-package) on project
>> org.apache.stanbol.launchers.**stable: Unable to resolve artifact. Could
>> not transfer artifact org.apache.stanbol:org.apache.**
>> stanbol.entityhub.model.**clerezza:jar:0.10.0-incubating from/to central
>> (http://repo.maven.apache.org/**maven2<http://repo.maven.apache.org/maven2>):
>> Specified destination directory cannot be created:...
>>
>> Anybody else seen this problem?
>>
>> Best,
>> Melanie
>>
>> m 25.09.2012 16:48, schrieb Suat Gonul:
>>
>>> Hi Melanie,
>>>
>>> It seems I had overlooked the DELETE value for the
>>> Access-Control-Allow-Methods header. Now, you should be able to execute
>>> CORS request for the DELETE method.
>>>
>>> Best,
>>> Suat
>>>
>>> On 09/25/2012 11:02 AM, Melanie Reiplinger wrote:
>>>
>>>> Hi Suat,
>>>>
>>>> after a fresh checkout on the re-located source, I can delete items
>>>> via the REST interface. But when trying from jQuery, I can't get
>>>> through. Is it possible that CORS access has to be granted yet for the
>>>> CMSadapter? The Access-Control-Allow-Methods in the response header
>>>> seems to only contain GET, POST, and OPTIONS. I get 'Method DELETE is
>>>> not allowed by Access-Control-Allow-Methods'.
>>>>
>>>> Best,
>>>> Melanie
>>>>
>>>> Am 17.09.2012 12:17, schrieb Suat Gonul:
>>>>
>>>>> Hi Melanie,
>>>>>
>>>>> Yes, it was working for me. Please note that you should rebuild the
>>>>> Entityhub component, since the issue was related with the Entityhub, to
>>>>> test the deletion operation.
>>>>>
>>>>> Best,
>>>>> Suat
>>>>>
>>>>> On 09/17/2012 12:42 PM, Melanie Reiplinger wrote:
>>>>>
>>>>>> Hi Suat,
>>>>>>
>>>>>> I see that https://issues.apache.org/**jira/browse/STANBOL-727<https://issues.apache.org/jira/browse/STANBOL-727>is
>>>>>> solved. Does the deletion of repository items on the
>>>>>> cmsadapter/contenthubfeed work for you now?
>>>>>>
>>>>>> Best,
>>>>>> Melanie
>>>>>>
>>>>>>
>>>>>> Am 31.08.2012 14:27, schrieb Suat Gönül:
>>>>>>
>>>>>>> Hi Melanie,
>>>>>>>
>>>>>>> The deletion problems seems to be related with the bug described in
>>>>>>> STANBOL-727. Could you please retry after that bug is fixed?
>>>>>>>
>>>>>>> Best,
>>>>>>> Suat
>>>>>>>
>>>>>>> On Thu, Aug 30, 2012 at 1:00 PM, Melanie Reiplinger <
>>>>>>> melanie.reiplinger@dfki.de> wrote:
>>>>>>>
>>>>>>> Hi Suat,
>>>>>>>>
>>>>>>>> thank you a lot for demonstrating this. It seems my mistake was that
>>>>>>>> I did
>>>>>>>> not associate files with the nodes. For no specific reason I assumed
>>>>>>>> that
>>>>>>>> files would be created when the nodes were created. But then I guess
>>>>>>>> that
>>>>>>>> usually, it's the other way around: when building a repo, the
>>>>>>>> files are
>>>>>>>> already there and are then are used to build up the tree.
>>>>>>>>
>>>>>>>> Now how do you delete your 2 content items from the contenthub? The
>>>>>>>> documentation says it's the very same syntax as for submitting
>>>>>>>> items, just
>>>>>>>> using DELETE instead of POST, but that gives me a Bad Request with
>>>>>>>> java.lang.****IllegalArgumentException: No content found for any
>>>>>>>> of the
>>>>>>>> following parameters [entity, content].
>>>>>>>> It does also not work in the REST interface.
>>>>>>>>
>>>>>>>> Best,
>>>>>>>> Melanie
>>>>>>>>
>>>>>>>>
>>>>>>>> Am 27.08.2012 13:42, schrieb Suat Gonul:
>>>>>>>>
>>>>>>>> Hi Melanie,
>>>>>>>>
>>>>>>>>> It is true that a content repo is needed to run unit tests.
>>>>>>>>> Anyway, I
>>>>>>>>> tested the Jackrabbit and I shall share the steps with you. I hope
>>>>>>>>> they
>>>>>>>>> would work for you too.
>>>>>>>>>
>>>>>>>>> First of all, I was able to create nodes in Jackrabbit through
>>>>>>>>> the JCR
>>>>>>>>> API.
>>>>>>>>>
>>>>>>>>> - I ran the jackrabbit-standalone-2.4.2.****jar on the 8080 port.
>>>>>>>>> - Then created temporary nodes with the following code below. The
>>>>>>>>> code
>>>>>>>>> create two nodes to be submitted to the Contenthub under the "test"
>>>>>>>>> path. The nodes are associated with two files from the local file
>>>>>>>>> system. So, you should adapt the file paths. 3 external libraries
>>>>>>>>> are
>>>>>>>>> required to run this code: jackrabbit-jcr-rmi-2.2.*.jar,
>>>>>>>>> jcr-2.0.jar and
>>>>>>>>> slf4j-api-*.jar. They are already downloaded when you build Stanbol
>>>>>>>>> into
>>>>>>>>> the maven repository i.e the .m2 folder.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Repository repository = new URLRemoteRepository(
>>>>>>>>> "http://localhost:8080/rmi");
>>>>>>>>> Session session = repository.login(new
>>>>>>>>> SimpleCredentials("admin",
>>>>>>>>> "admin".toCharArray()));
>>>>>>>>>
>>>>>>>>> Node testNode = null;
>>>>>>>>> try {
>>>>>>>>> testNode = session.getNode("/test");
>>>>>>>>> testNode.remove();
>>>>>>>>> } catch (PathNotFoundException e) {
>>>>>>>>> // ignore
>>>>>>>>> }
>>>>>>>>> Node rootNode = session.getRootNode();
>>>>>>>>> testNode = rootNode.addNode("test");
>>>>>>>>>
>>>>>>>>> File f = new File(
>>>>>>>>> "/home/suat/Desktop/****technicalStuff/stanbolTests/**
>>>>>>>>> cmsAdapter/jackrabbit/news1.****txt");
>>>>>>>>> Node newsNode = testNode.addNode(f.getName(),
>>>>>>>>> "nt:file");
>>>>>>>>> Node resourceNode = newsNode.addNode("jcr:content"**
>>>>>>>>> **,
>>>>>>>>> "nt:resource");
>>>>>>>>> resourceNode.setProperty("jcr:****mimeType", "text/plain");
>>>>>>>>> Binary binary = session.getValueFactory().****
>>>>>>>>> createBinary(
>>>>>>>>> new FileInputStream(f));
>>>>>>>>> resourceNode.setProperty("jcr:****data", binary);
>>>>>>>>>
>>>>>>>>> f = new File(
>>>>>>>>> "/home/suat/Desktop/****technicalStuff/stanbolTests/**
>>>>>>>>> cmsAdapter/jackrabbit/news2.****txt");
>>>>>>>>> newsNode = testNode.addNode(f.getName(), "nt:file");
>>>>>>>>> resourceNode = newsNode.addNode("jcr:content"****,
>>>>>>>>> "nt:resource");
>>>>>>>>> resourceNode.setProperty("jcr:****mimeType", "text/plain");
>>>>>>>>> binary = session.getValueFactory().****
>>>>>>>>> createBinary(new
>>>>>>>>> FileInputStream(f));
>>>>>>>>> resourceNode.setProperty("jcr:****data", binary);
>>>>>>>>> session.save();
>>>>>>>>>
>>>>>>>>> - I ran the Stanbol on 8081 and executed the following commands:
>>>>>>>>> - curl -X GET -H "Accept: text/plain"
>>>>>>>>> "http://localhost:8081/****cmsadapter/session?****
>>>>>>>>> repositoryURL=http://**<http://localhost:8081/**cmsadapter/session?**repositoryURL=http://**>
>>>>>>>>>
>>>>>>>>> localhost:8080/rmi&username=****admin&password=admin&****
>>>>>>>>> connectionType=JCR<http://**localhost:8081/cmsadapter/**
>>>>>>>>> session?repositoryURL=http://**localhost:8080/rmi&username=**
>>>>>>>>> admin&password=admin&**connectionType=JCR<http://localhost:8081/cmsadapter/session?repositoryURL=http://localhost:8080/rmi&username=admin&password=admin&connectionType=JCR>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> "
>>>>>>>>> - curl -i -X POST --data
>>>>>>>>> "sessionKey=e92be985-e722-****419f-a1ad-5fe02628b537&path=/****
>>>>>>>>> test&recursive=true"
>>>>>>>>> http://localhost:8081/****cmsadapter/contenthubfeed<http://localhost:8081/**cmsadapter/contenthubfeed>
>>>>>>>>> <http**://localhost:8081/cmsadapter/**contenthubfeed<http://localhost:8081/cmsadapter/contenthubfeed>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> In the second command the result of the first command should be
>>>>>>>>> used.
>>>>>>>>> After executing these commands, I was able to see documents on
>>>>>>>>> http://localhost:8081/****contenthub/contenthub/store<http://localhost:8081/**contenthub/contenthub/store>
>>>>>>>>> <ht**tp://localhost:8081/**contenthub/contenthub/store<http://localhost:8081/contenthub/contenthub/store>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> .
>>>>>>>>>
>>>>>>>>> Best,
>>>>>>>>> Suat
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On 08/20/2012 01:11 PM, Melanie Reiplinger wrote:
>>>>>>>>>
>>>>>>>>> Hi Suat,
>>>>>>>>>>
>>>>>>>>>> Thanks for your reply.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Am 20.08.2012 11:55, schrieb Suat Gönül:
>>>>>>>>>>
>>>>>>>>>> Hi Melanie,
>>>>>>>>>>>
>>>>>>>>>>> Sorry, I could not answer you as I was in holiday. I will start
>>>>>>>>>>> to
>>>>>>>>>>> work on
>>>>>>>>>>> August 27. In my demonstration, I was using CRX CMS.
>>>>>>>>>>>
>>>>>>>>>>> That seems to be commercial software. I Cannot use that. So I'll
>>>>>>>>>> have
>>>>>>>>>> to find another way. Under these conditions, I'm not even sure it
>>>>>>>>>> makes much sense to create unit tests for the JavaScript
>>>>>>>>>> interface to
>>>>>>>>>> the cmsadapter, since whoever wanted to run them would need to
>>>>>>>>>> have a
>>>>>>>>>> content repo locally installed to connect stanbol to it. It makes
>>>>>>>>>> sense only if I could set up (or use) a remote repo that's
>>>>>>>>>> accessible
>>>>>>>>>> from wherever the test script is called...
>>>>>>>>>>
>>>>>>>>>> Best,
>>>>>>>>>> Melanie
>>>>>>>>>>
>>>>>>>>>> But to connect CRX, I
>>>>>>>>>>
>>>>>>>>>>> have and additional bundle to be added to the OSGi environment. I
>>>>>>>>>>> can
>>>>>>>>>>> provide you that bundle when I'm back.
>>>>>>>>>>>
>>>>>>>>>>> I did not access to the repo via HTTP. In my demonstration, a
>>>>>>>>>>> session is
>>>>>>>>>>> obtained together with a session key after giving the necessary
>>>>>>>>>>> credentials
>>>>>>>>>>> e.g username, password, rmi endpoint. And that session key is
>>>>>>>>>>> used by
>>>>>>>>>>> CMS
>>>>>>>>>>> Adapter to access to the repo.
>>>>>>>>>>>
>>>>>>>>>>> Best,
>>>>>>>>>>> Suat
>>>>>>>>>>>
>>>>>>>>>>> On Mon, Aug 20, 2012 at 12:11 PM, Melanie Reiplinger <
>>>>>>>>>>> melanie.reiplinger@dfki.de> wrote:
>>>>>>>>>>>
>>>>>>>>>>> Hi Suat,
>>>>>>>>>>>
>>>>>>>>>>>> I cannot access my jackrabbit repo via xmlhttp either (although
>>>>>>>>>>>> curl
>>>>>>>>>>>> works
>>>>>>>>>>>> fine), so this might as well be a CORS access problem. In your
>>>>>>>>>>>> demo,
>>>>>>>>>>>> did
>>>>>>>>>>>> you have to somehow provide access to the repo (by setting
>>>>>>>>>>>> headers
>>>>>>>>>>>> etc)?
>>>>>>>>>>>>
>>>>>>>>>>>> Best,
>>>>>>>>>>>> Melanie
>>>>>>>>>>>>
>>>>>>>>>>>> Am 15.08.2012 11:15, schrieb Melanie Reiplinger:
>>>>>>>>>>>>
>>>>>>>>>>>> Hi Suat,
>>>>>>>>>>>>
>>>>>>>>>>>> Am 13.08.2012 13:35, schrieb Suat Gonul:
>>>>>>>>>>>>>
>>>>>>>>>>>>> In any case, I guess that you
>>>>>>>>>>>>>
>>>>>>>>>>>>>> need to configure a RDF Bridge through the
>>>>>>>>>>>>>> {stanbol}/system/console/******configMgr interface. There you
>>>>>>>>>>>>>> should
>>>>>>>>>>>>>> find
>>>>>>>>>>>>>> the
>>>>>>>>>>>>>> "Apache Stanbol CMS Adapter Default RDF Bridge
>>>>>>>>>>>>>> Configurations". In
>>>>>>>>>>>>>> that
>>>>>>>>>>>>>> configuration you specify the root path in the CMS to be
>>>>>>>>>>>>>> exported
>>>>>>>>>>>>>> to the
>>>>>>>>>>>>>> RDF.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> by that you mean the content repository path? This means
>>>>>>>>>>>>>> that I set
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> there the path to my content repository?
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Yes, you set there a path residing in the content
>>>>>>>>>>>>>>> repository.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I have set up a jackrabbit workspace with some toy nodes
>>>>>>>>>>>>>> in it. To
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> access it remotely, I'd configure something like
>>>>>>>>>>>>>>> http://[myserver]/server/
>>>>>>>>>>>>>>> <http://lnv-89012.dfki.uni-sb.**
>>>>>>>>>>>>>>> ****de:9002/server/default/****node1<
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> http://lnv-89012.dfki.**uni-**sb.de:9002/server/default/****
>>>>>>>>>>>>>>> node1 <http://uni-sb.de:9002/server/default/**node1><
>>>>>>>>>>>>>>> http://lnv-89012.dfki.**uni-sb.de:9002/server/default/**
>>>>>>>>>>>>>>> node1<http://lnv-89012.dfki.uni-sb.de:9002/server/default/node1>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> ,
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> but then
>>>>>>>>>>>>>>> I can work with this repository exclusively, right?
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> I cannot access the URL you gave, but I guess you
>>>>>>>>>>>>>>> should give
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>> /node1
>>>>>>>>>>>>>> path to export it as RDF. I didn't get your question about
>>>>>>>>>>>>>> working
>>>>>>>>>>>>>> exclusively with the repository. But, you already seem to work
>>>>>>>>>>>>>> on the
>>>>>>>>>>>>>> default repository of Jackrabbit running on your server.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I tried with several paths, none will work.
>>>>>>>>>>>>>>
>>>>>>>>>>>>> My remote repository stub is
>>>>>>>>>>>>> http://lnv-89012.dfki.uni-sb.******de:9002/rmi<http://lnv-**
>>>>>>>>>>>>> 89012. <http://lnv-89012.>**
>>>>>>>>>>>>> dfki.uni-sb.de:9002/rmi
>>>>>>>>>>>>> <http://lnv-89012.dfki.uni-sb.**de:9002/rmi<http://lnv-89012.dfki.uni-sb.de:9002/rmi>
>>>>>>>>>>>>> >>
>>>>>>>>>>>>> .
>>>>>>>>>>>>> (you cannot access those URIs because they are in a closed
>>>>>>>>>>>>> network)
>>>>>>>>>>>>> For accessing the content repository, I should use (according
>>>>>>>>>>>>> to my
>>>>>>>>>>>>> jackrabbit guidelines):
>>>>>>>>>>>>> http://lnv-89012.dfki.uni-sb.******de:9002/server<http://lnv-*
>>>>>>>>>>>>> ***
>>>>>>>>>>>>> 89012.dfki.uni-sb.de:9002/****server<http://89012.dfki.uni-sb.de:9002/**server>
>>>>>>>>>>>>> <http://lnv-89012.dfki.**uni-sb.de:9002/server<http://lnv-89012.dfki.uni-sb.de:9002/server>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> to
>>>>>>>>>>>>>>
>>>>>>>>>>>>> access all workspaces of myJCR repository
>>>>>>>>>>>>> http://lnv-89012.dfki.uni-sb.******de:9002/server/default/jcr:
>>>>>>>>>>>>> ******
>>>>>>>>>>>>> rootto<http://lnv-89012.dfki.****uni-sb.de:9002/server/**
>>>>>>>>>>>>> default/** <http://uni-sb.de:9002/server/default/**>
>>>>>>>>>>>>> jcr:rootto<http://lnv-89012.**dfki.uni-sb.de:9002/server/**
>>>>>>>>>>>>> default/jcr:rootto<http://lnv-89012.dfki.uni-sb.de:9002/server/default/jcr:rootto>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> access
>>>>>>>>>>>>>>
>>>>>>>>>>>>> a single workspace (example with workspace named 'default'). ->
>>>>>>>>>>>>> this
>>>>>>>>>>>>> one is also where I can navigate to with my browser, so this
>>>>>>>>>>>>> should
>>>>>>>>>>>>> then be
>>>>>>>>>>>>> the correct path I guess.
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> But I always get the same error about
>>>>>>>>>>>>> org.apache.stanbol.cmsadapter.******jcr.mapping.JCRRDFMapper
>>>>>>>>>>>>> Failed to
>>>>>>>>>>>>> retrieve node having path: <thePath> or its childr
>>>>>>>>>>>>>
>>>>>>>>>>>>> I'm an absolute beginner with content repositories, using
>>>>>>>>>>>>> jackrabbit for
>>>>>>>>>>>>> the first time and I'm really unsure of what would have to
>>>>>>>>>>>>> work if
>>>>>>>>>>>>> everything was correct, but I can see my repository in the
>>>>>>>>>>>>> jackrabbit
>>>>>>>>>>>>> console and I also can see that my nodes are existing, and the
>>>>>>>>>>>>> info
>>>>>>>>>>>>> command
>>>>>>>>>>>>> tells me that everything looks like I would expect:
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Repository:
>>>>>>>>>>>>> http://lnv-89012.dfki.uni-sb.******de:9002/rmi<http://lnv-**
>>>>>>>>>>>>> 89012. <http://lnv-89012.>**
>>>>>>>>>>>>> dfki.uni-sb.de:9002/rmi
>>>>>>>>>>>>> <http://lnv-89012.dfki.uni-sb.**de:9002/rmi<http://lnv-89012.dfki.uni-sb.de:9002/rmi>
>>>>>>>>>>>>> >>
>>>>>>>>>>>>> User : admin
>>>>>>>>>>>>> Workspace : default
>>>>>>>>>>>>> Node : /
>>>>>>>>>>>>>
>>>>>>>>>>>>> I looked at your paper ("Semantic Content Management with
>>>>>>>>>>>>> Apache
>>>>>>>>>>>>> Stanbol") and saw that you used jackrabbit in the demo, too. Is
>>>>>>>>>>>>> there some
>>>>>>>>>>>>> publicly accessible repository I could use for testing (so
>>>>>>>>>>>>> that I
>>>>>>>>>>>>> see what
>>>>>>>>>>>>> the path I have to specify looks like in a working example)?
>>>>>>>>>>>>>
>>>>>>>>>>>>> best,
>>>>>>>>>>>>> melanie
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>
>>
>
enhancer or contenthub problems?
Posted by Melanie Reiplinger <me...@dfki.de>.
Hi all,
could someone please check on the contenthub items on
http://dev.iks-project.eu:8081 <http://dev.iks-project.eu:8081/> ?
It seems, there are some error messages written to the html. E.g., the
item page
http://dev.iks-project.eu:8081/contenthub/contenthub/store/page/urn:content-item-sha1-7c41cece31c24a679b5ce60f3f01b5878a442d36
looks *really* strange.
Best,
Melanie
Am 27.09.2012 11:19, schrieb Melanie Reiplinger:
> Hi Suat and all,
>
> after updating, the build will not work any more.
>
> [ERROR] Failed to execute goal
> org.apache.sling:maven-launchpad-plugin:2.1.0:prepare-package
> (prepare-package) on project org.apache.stanbol.launchers.stable:
> Unable to resolve artifact. Could not transfer artifact
> org.apache.stanbol:org.apache.stanbol.entityhub.model.clerezza:jar:0.10.0-incubating
> from/to central (http://repo.maven.apache.org/maven2): Specified
> destination directory cannot be created:...
>
> Anybody else seen this problem?
>
> Best,
> Melanie
>
> m 25.09.2012 16:48, schrieb Suat Gonul:
>> Hi Melanie,
>>
>> It seems I had overlooked the DELETE value for the
>> Access-Control-Allow-Methods header. Now, you should be able to execute
>> CORS request for the DELETE method.
>>
>> Best,
>> Suat
>>
>> On 09/25/2012 11:02 AM, Melanie Reiplinger wrote:
>>> Hi Suat,
>>>
>>> after a fresh checkout on the re-located source, I can delete items
>>> via the REST interface. But when trying from jQuery, I can't get
>>> through. Is it possible that CORS access has to be granted yet for the
>>> CMSadapter? The Access-Control-Allow-Methods in the response header
>>> seems to only contain GET, POST, and OPTIONS. I get 'Method DELETE is
>>> not allowed by Access-Control-Allow-Methods'.
>>>
>>> Best,
>>> Melanie
>>>
>>> Am 17.09.2012 12:17, schrieb Suat Gonul:
>>>> Hi Melanie,
>>>>
>>>> Yes, it was working for me. Please note that you should rebuild the
>>>> Entityhub component, since the issue was related with the
>>>> Entityhub, to
>>>> test the deletion operation.
>>>>
>>>> Best,
>>>> Suat
>>>>
>>>> On 09/17/2012 12:42 PM, Melanie Reiplinger wrote:
>>>>> Hi Suat,
>>>>>
>>>>> I see that https://issues.apache.org/jira/browse/STANBOL-727 is
>>>>> solved. Does the deletion of repository items on the
>>>>> cmsadapter/contenthubfeed work for you now?
>>>>>
>>>>> Best,
>>>>> Melanie
>>>>>
>>>>>
>>>>> Am 31.08.2012 14:27, schrieb Suat Gönül:
>>>>>> Hi Melanie,
>>>>>>
>>>>>> The deletion problems seems to be related with the bug described in
>>>>>> STANBOL-727. Could you please retry after that bug is fixed?
>>>>>>
>>>>>> Best,
>>>>>> Suat
>>>>>>
>>>>>> On Thu, Aug 30, 2012 at 1:00 PM, Melanie Reiplinger <
>>>>>> melanie.reiplinger@dfki.de> wrote:
>>>>>>
>>>>>>> Hi Suat,
>>>>>>>
>>>>>>> thank you a lot for demonstrating this. It seems my mistake was
>>>>>>> that
>>>>>>> I did
>>>>>>> not associate files with the nodes. For no specific reason I
>>>>>>> assumed
>>>>>>> that
>>>>>>> files would be created when the nodes were created. But then I
>>>>>>> guess
>>>>>>> that
>>>>>>> usually, it's the other way around: when building a repo, the
>>>>>>> files are
>>>>>>> already there and are then are used to build up the tree.
>>>>>>>
>>>>>>> Now how do you delete your 2 content items from the contenthub? The
>>>>>>> documentation says it's the very same syntax as for submitting
>>>>>>> items, just
>>>>>>> using DELETE instead of POST, but that gives me a Bad Request with
>>>>>>> java.lang.**IllegalArgumentException: No content found for any
>>>>>>> of the
>>>>>>> following parameters [entity, content].
>>>>>>> It does also not work in the REST interface.
>>>>>>>
>>>>>>> Best,
>>>>>>> Melanie
>>>>>>>
>>>>>>>
>>>>>>> Am 27.08.2012 13:42, schrieb Suat Gonul:
>>>>>>>
>>>>>>> Hi Melanie,
>>>>>>>> It is true that a content repo is needed to run unit tests.
>>>>>>>> Anyway, I
>>>>>>>> tested the Jackrabbit and I shall share the steps with you. I hope
>>>>>>>> they
>>>>>>>> would work for you too.
>>>>>>>>
>>>>>>>> First of all, I was able to create nodes in Jackrabbit through
>>>>>>>> the JCR
>>>>>>>> API.
>>>>>>>>
>>>>>>>> - I ran the jackrabbit-standalone-2.4.2.**jar on the 8080 port.
>>>>>>>> - Then created temporary nodes with the following code below. The
>>>>>>>> code
>>>>>>>> create two nodes to be submitted to the Contenthub under the
>>>>>>>> "test"
>>>>>>>> path. The nodes are associated with two files from the local file
>>>>>>>> system. So, you should adapt the file paths. 3 external libraries
>>>>>>>> are
>>>>>>>> required to run this code: jackrabbit-jcr-rmi-2.2.*.jar,
>>>>>>>> jcr-2.0.jar and
>>>>>>>> slf4j-api-*.jar. They are already downloaded when you build
>>>>>>>> Stanbol
>>>>>>>> into
>>>>>>>> the maven repository i.e the .m2 folder.
>>>>>>>>
>>>>>>>>
>>>>>>>> Repository repository = new URLRemoteRepository(
>>>>>>>> "http://localhost:8080/rmi");
>>>>>>>> Session session = repository.login(new
>>>>>>>> SimpleCredentials("admin",
>>>>>>>> "admin".toCharArray()));
>>>>>>>>
>>>>>>>> Node testNode = null;
>>>>>>>> try {
>>>>>>>> testNode = session.getNode("/test");
>>>>>>>> testNode.remove();
>>>>>>>> } catch (PathNotFoundException e) {
>>>>>>>> // ignore
>>>>>>>> }
>>>>>>>> Node rootNode = session.getRootNode();
>>>>>>>> testNode = rootNode.addNode("test");
>>>>>>>>
>>>>>>>> File f = new File(
>>>>>>>> "/home/suat/Desktop/**technicalStuff/stanbolTests/**
>>>>>>>> cmsAdapter/jackrabbit/news1.**txt");
>>>>>>>> Node newsNode = testNode.addNode(f.getName(),
>>>>>>>> "nt:file");
>>>>>>>> Node resourceNode = newsNode.addNode("jcr:content"**,
>>>>>>>> "nt:resource");
>>>>>>>> resourceNode.setProperty("jcr:**mimeType", "text/plain");
>>>>>>>> Binary binary =
>>>>>>>> session.getValueFactory().**createBinary(
>>>>>>>> new FileInputStream(f));
>>>>>>>> resourceNode.setProperty("jcr:**data", binary);
>>>>>>>>
>>>>>>>> f = new File(
>>>>>>>> "/home/suat/Desktop/**technicalStuff/stanbolTests/**
>>>>>>>> cmsAdapter/jackrabbit/news2.**txt");
>>>>>>>> newsNode = testNode.addNode(f.getName(), "nt:file");
>>>>>>>> resourceNode = newsNode.addNode("jcr:content"**,
>>>>>>>> "nt:resource");
>>>>>>>> resourceNode.setProperty("jcr:**mimeType", "text/plain");
>>>>>>>> binary = session.getValueFactory().**createBinary(new
>>>>>>>> FileInputStream(f));
>>>>>>>> resourceNode.setProperty("jcr:**data", binary);
>>>>>>>> session.save();
>>>>>>>>
>>>>>>>> - I ran the Stanbol on 8081 and executed the following commands:
>>>>>>>> - curl -X GET -H "Accept: text/plain"
>>>>>>>> "http://localhost:8081/**cmsadapter/session?**repositoryURL=http://**
>>>>>>>>
>>>>>>>>
>>>>>>>> localhost:8080/rmi&username=**admin&password=admin&**connectionType=JCR<http://localhost:8081/cmsadapter/session?repositoryURL=http://localhost:8080/rmi&username=admin&password=admin&connectionType=JCR>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> "
>>>>>>>> - curl -i -X POST --data
>>>>>>>> "sessionKey=e92be985-e722-**419f-a1ad-5fe02628b537&path=/**
>>>>>>>> test&recursive=true"
>>>>>>>> http://localhost:8081/**cmsadapter/contenthubfeed<http://localhost:8081/cmsadapter/contenthubfeed>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> In the second command the result of the first command should be
>>>>>>>> used.
>>>>>>>> After executing these commands, I was able to see documents on
>>>>>>>> http://localhost:8081/**contenthub/contenthub/store<http://localhost:8081/contenthub/contenthub/store>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> .
>>>>>>>>
>>>>>>>> Best,
>>>>>>>> Suat
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On 08/20/2012 01:11 PM, Melanie Reiplinger wrote:
>>>>>>>>
>>>>>>>>> Hi Suat,
>>>>>>>>>
>>>>>>>>> Thanks for your reply.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Am 20.08.2012 11:55, schrieb Suat Gönül:
>>>>>>>>>
>>>>>>>>>> Hi Melanie,
>>>>>>>>>>
>>>>>>>>>> Sorry, I could not answer you as I was in holiday. I will
>>>>>>>>>> start to
>>>>>>>>>> work on
>>>>>>>>>> August 27. In my demonstration, I was using CRX CMS.
>>>>>>>>>>
>>>>>>>>> That seems to be commercial software. I Cannot use that. So I'll
>>>>>>>>> have
>>>>>>>>> to find another way. Under these conditions, I'm not even sure it
>>>>>>>>> makes much sense to create unit tests for the JavaScript
>>>>>>>>> interface to
>>>>>>>>> the cmsadapter, since whoever wanted to run them would need to
>>>>>>>>> have a
>>>>>>>>> content repo locally installed to connect stanbol to it. It makes
>>>>>>>>> sense only if I could set up (or use) a remote repo that's
>>>>>>>>> accessible
>>>>>>>>> from wherever the test script is called...
>>>>>>>>>
>>>>>>>>> Best,
>>>>>>>>> Melanie
>>>>>>>>>
>>>>>>>>> But to connect CRX, I
>>>>>>>>>> have and additional bundle to be added to the OSGi
>>>>>>>>>> environment. I
>>>>>>>>>> can
>>>>>>>>>> provide you that bundle when I'm back.
>>>>>>>>>>
>>>>>>>>>> I did not access to the repo via HTTP. In my demonstration, a
>>>>>>>>>> session is
>>>>>>>>>> obtained together with a session key after giving the necessary
>>>>>>>>>> credentials
>>>>>>>>>> e.g username, password, rmi endpoint. And that session key is
>>>>>>>>>> used by
>>>>>>>>>> CMS
>>>>>>>>>> Adapter to access to the repo.
>>>>>>>>>>
>>>>>>>>>> Best,
>>>>>>>>>> Suat
>>>>>>>>>>
>>>>>>>>>> On Mon, Aug 20, 2012 at 12:11 PM, Melanie Reiplinger <
>>>>>>>>>> melanie.reiplinger@dfki.de> wrote:
>>>>>>>>>>
>>>>>>>>>> Hi Suat,
>>>>>>>>>>> I cannot access my jackrabbit repo via xmlhttp either (although
>>>>>>>>>>> curl
>>>>>>>>>>> works
>>>>>>>>>>> fine), so this might as well be a CORS access problem. In your
>>>>>>>>>>> demo,
>>>>>>>>>>> did
>>>>>>>>>>> you have to somehow provide access to the repo (by setting
>>>>>>>>>>> headers
>>>>>>>>>>> etc)?
>>>>>>>>>>>
>>>>>>>>>>> Best,
>>>>>>>>>>> Melanie
>>>>>>>>>>>
>>>>>>>>>>> Am 15.08.2012 11:15, schrieb Melanie Reiplinger:
>>>>>>>>>>>
>>>>>>>>>>> Hi Suat,
>>>>>>>>>>>
>>>>>>>>>>>> Am 13.08.2012 13:35, schrieb Suat Gonul:
>>>>>>>>>>>>
>>>>>>>>>>>> In any case, I guess that you
>>>>>>>>>>>>> need to configure a RDF Bridge through the
>>>>>>>>>>>>> {stanbol}/system/console/****configMgr interface. There you
>>>>>>>>>>>>> should
>>>>>>>>>>>>> find
>>>>>>>>>>>>> the
>>>>>>>>>>>>> "Apache Stanbol CMS Adapter Default RDF Bridge
>>>>>>>>>>>>> Configurations". In
>>>>>>>>>>>>> that
>>>>>>>>>>>>> configuration you specify the root path in the CMS to be
>>>>>>>>>>>>> exported
>>>>>>>>>>>>> to the
>>>>>>>>>>>>> RDF.
>>>>>>>>>>>>>
>>>>>>>>>>>>> by that you mean the content repository path? This means
>>>>>>>>>>>>> that I set
>>>>>>>>>>>>>> there the path to my content repository?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Yes, you set there a path residing in the content
>>>>>>>>>>>>>> repository.
>>>>>>>>>>>>> I have set up a jackrabbit workspace with some toy
>>>>>>>>>>>>> nodes
>>>>>>>>>>>>> in it. To
>>>>>>>>>>>>>
>>>>>>>>>>>>>> access it remotely, I'd configure something like
>>>>>>>>>>>>>> http://[myserver]/server/
>>>>>>>>>>>>>> <http://lnv-89012.dfki.uni-sb.****de:9002/server/default/**node1<
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> http://lnv-89012.dfki.**uni-sb.de:9002/server/default/**node1<http://lnv-89012.dfki.uni-sb.de:9002/server/default/node1>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> ,
>>>>>>>>>>>>>> but then
>>>>>>>>>>>>>> I can work with this repository exclusively, right?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I cannot access the URL you gave, but I guess you
>>>>>>>>>>>>>> should give
>>>>>>>>>>>>> /node1
>>>>>>>>>>>>> path to export it as RDF. I didn't get your question about
>>>>>>>>>>>>> working
>>>>>>>>>>>>> exclusively with the repository. But, you already seem to
>>>>>>>>>>>>> work
>>>>>>>>>>>>> on the
>>>>>>>>>>>>> default repository of Jackrabbit running on your server.
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> I tried with several paths, none will work.
>>>>>>>>>>>> My remote repository stub is
>>>>>>>>>>>> http://lnv-89012.dfki.uni-sb.****de:9002/rmi<http://lnv-89012.**
>>>>>>>>>>>>
>>>>>>>>>>>> dfki.uni-sb.de:9002/rmi
>>>>>>>>>>>> <http://lnv-89012.dfki.uni-sb.de:9002/rmi>>
>>>>>>>>>>>> .
>>>>>>>>>>>> (you cannot access those URIs because they are in a closed
>>>>>>>>>>>> network)
>>>>>>>>>>>> For accessing the content repository, I should use (according
>>>>>>>>>>>> to my
>>>>>>>>>>>> jackrabbit guidelines):
>>>>>>>>>>>> http://lnv-89012.dfki.uni-sb.****de:9002/server<http://lnv-**
>>>>>>>>>>>> 89012.dfki.uni-sb.de:9002/**server<http://lnv-89012.dfki.uni-sb.de:9002/server>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>> to
>>>>>>>>>>>> access all workspaces of myJCR repository
>>>>>>>>>>>> http://lnv-89012.dfki.uni-sb.****de:9002/server/default/jcr:****
>>>>>>>>>>>>
>>>>>>>>>>>> rootto<http://lnv-89012.dfki.**uni-sb.de:9002/server/default/**
>>>>>>>>>>>>
>>>>>>>>>>>> jcr:rootto<http://lnv-89012.dfki.uni-sb.de:9002/server/default/jcr:rootto>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>> access
>>>>>>>>>>>> a single workspace (example with workspace named
>>>>>>>>>>>> 'default'). ->
>>>>>>>>>>>> this
>>>>>>>>>>>> one is also where I can navigate to with my browser, so this
>>>>>>>>>>>> should
>>>>>>>>>>>> then be
>>>>>>>>>>>> the correct path I guess.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> But I always get the same error about
>>>>>>>>>>>> org.apache.stanbol.cmsadapter.****jcr.mapping.JCRRDFMapper
>>>>>>>>>>>> Failed to
>>>>>>>>>>>> retrieve node having path: <thePath> or its childr
>>>>>>>>>>>>
>>>>>>>>>>>> I'm an absolute beginner with content repositories, using
>>>>>>>>>>>> jackrabbit for
>>>>>>>>>>>> the first time and I'm really unsure of what would have to
>>>>>>>>>>>> work if
>>>>>>>>>>>> everything was correct, but I can see my repository in the
>>>>>>>>>>>> jackrabbit
>>>>>>>>>>>> console and I also can see that my nodes are existing, and the
>>>>>>>>>>>> info
>>>>>>>>>>>> command
>>>>>>>>>>>> tells me that everything looks like I would expect:
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> Repository:
>>>>>>>>>>>> http://lnv-89012.dfki.uni-sb.****de:9002/rmi<http://lnv-89012.**
>>>>>>>>>>>>
>>>>>>>>>>>> dfki.uni-sb.de:9002/rmi
>>>>>>>>>>>> <http://lnv-89012.dfki.uni-sb.de:9002/rmi>>
>>>>>>>>>>>> User : admin
>>>>>>>>>>>> Workspace : default
>>>>>>>>>>>> Node : /
>>>>>>>>>>>>
>>>>>>>>>>>> I looked at your paper ("Semantic Content Management with
>>>>>>>>>>>> Apache
>>>>>>>>>>>> Stanbol") and saw that you used jackrabbit in the demo,
>>>>>>>>>>>> too. Is
>>>>>>>>>>>> there some
>>>>>>>>>>>> publicly accessible repository I could use for testing (so
>>>>>>>>>>>> that I
>>>>>>>>>>>> see what
>>>>>>>>>>>> the path I have to specify looks like in a working example)?
>>>>>>>>>>>>
>>>>>>>>>>>> best,
>>>>>>>>>>>> melanie
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>
>
Re: cmsadapter STANBOL-727
Posted by Melanie Reiplinger <me...@dfki.de>.
anyway, I deleted all the stanbol related files in .m2, and then the
build succeeded.
Thank you guys :-)
Am 27.09.2012 12:52, schrieb Suat Gönül:
> On Thu, Sep 27, 2012 at 1:49 PM, Fabian Christ <christ.fabian@googlemail.com
>> wrote:
>> 2012/9/27 Suat Gönül <su...@gmail.com>:
>>> It seem your code still has some artifact versions including "incubating"
>>> word. This should not be the case. Incubating keyword has been removed
>> from
>>> all of the Stanbol artifacts after graduation. I guess you need a
>> complete
>>> update.
>> No this is not entirely true. Dependencies to already released
>> bundles, like
>> org.apache.stanbol:org.apache.stanbol.entityhub.model.clerezza:jar:0.10.0-incubating
>> (this is no SNAPSHOT dep), still have the incubating. So the dep seems
>> to be correct. And it is still available in Maven central.
>>
> Ah, you're right. I had missed that...
>
>
>> I don't know where this failure comes from? Broken internet connection?
>>
>> --
>> Fabian
>> http://twitter.com/fctwitt
>>
Re: cmsadapter STANBOL-727
Posted by Suat Gönül <su...@gmail.com>.
On Thu, Sep 27, 2012 at 1:49 PM, Fabian Christ <christ.fabian@googlemail.com
> wrote:
> 2012/9/27 Suat Gönül <su...@gmail.com>:
> > It seem your code still has some artifact versions including "incubating"
> > word. This should not be the case. Incubating keyword has been removed
> from
> > all of the Stanbol artifacts after graduation. I guess you need a
> complete
> > update.
>
> No this is not entirely true. Dependencies to already released
> bundles, like
> org.apache.stanbol:org.apache.stanbol.entityhub.model.clerezza:jar:0.10.0-incubating
> (this is no SNAPSHOT dep), still have the incubating. So the dep seems
> to be correct. And it is still available in Maven central.
>
Ah, you're right. I had missed that...
>
> I don't know where this failure comes from? Broken internet connection?
>
> --
> Fabian
> http://twitter.com/fctwitt
>
Re: cmsadapter STANBOL-727
Posted by Fabian Christ <ch...@googlemail.com>.
2012/9/27 Suat Gönül <su...@gmail.com>:
> It seem your code still has some artifact versions including "incubating"
> word. This should not be the case. Incubating keyword has been removed from
> all of the Stanbol artifacts after graduation. I guess you need a complete
> update.
No this is not entirely true. Dependencies to already released
bundles, like org.apache.stanbol:org.apache.stanbol.entityhub.model.clerezza:jar:0.10.0-incubating
(this is no SNAPSHOT dep), still have the incubating. So the dep seems
to be correct. And it is still available in Maven central.
I don't know where this failure comes from? Broken internet connection?
--
Fabian
http://twitter.com/fctwitt
Re: cmsadapter STANBOL-727
Posted by Suat Gönül <su...@gmail.com>.
On Thu, Sep 27, 2012 at 1:25 PM, Melanie Reiplinger <
melanie.reiplinger@dfki.de> wrote:
> Am 27.09.2012 12:21, schrieb Suat Gönül:
>
>> On Thu, Sep 27, 2012 at 12:19 PM, Melanie Reiplinger <
>> melanie.reiplinger@dfki.de> wrote:
>>
>> Hi Suat and all,
>>>
>>> after updating, the build will not work any more.
>>>
>>> [ERROR] Failed to execute goal org.apache.sling:maven-**
>>> launchpad-plugin:2.1.0:****prepare-package (prepare-package) on project
>>> org.apache.stanbol.launchers.****stable: Unable to resolve artifact.
>>> Could
>>> not transfer artifact org.apache.stanbol:org.apache.****
>>> stanbol.entityhub.model.****clerezza:jar:0.10.0-incubating from/to
>>> central (
>>> http://repo.maven.apache.org/****maven2<http://repo.maven.apache.org/**maven2>
>>> <http://repo.maven.**apache.org/maven2<http://repo.maven.apache.org/maven2>
>>> >):
>>>
>>> Specified destination directory cannot be created:...
>>>
>>> It seem your code still has some artifact versions including
>> "incubating"
>> word. This should not be the case. Incubating keyword has been removed
>> from
>> all of the Stanbol artifacts after graduation. I guess you need a complete
>> update.
>>
>
> strange. In fact, I did not only do a complete fresh checkout of the data
> after the migration, but I also did a complete update this morning. I did
> that specifically in order to avoid any of the old stuff blocking the
> build. It also tells me that
>
> Specified destination directory cannot be created:
> /home/mere01/.m2/repository/**org/apache/stanbol/org.apache.**
> stanbol.entityhub.model.**clerezza/0.10.0-incubating
>
> So maybe I should completely delete this .m2 dir, since that was always
> used in building the incubating version?
>
If you have the latest code, then I am really sure about this cause of the
problem. I think you don't have to delete all .m2 directory. But you can
try deleting only stanbol related folder e.g the one having the path
.../.m2/org/apache/stanbol .
>
> Best,
>> Suat
>>
>>
>> Anybody else seen this problem?
>>>
>>> Best,
>>> Melanie
>>>
>>> m 25.09.2012 16:48, schrieb Suat Gonul:
>>>
>>> Hi Melanie,
>>>
>>>> It seems I had overlooked the DELETE value for the
>>>> Access-Control-Allow-Methods header. Now, you should be able to execute
>>>> CORS request for the DELETE method.
>>>>
>>>> Best,
>>>> Suat
>>>>
>>>> On 09/25/2012 11:02 AM, Melanie Reiplinger wrote:
>>>>
>>>> Hi Suat,
>>>>>
>>>>> after a fresh checkout on the re-located source, I can delete items
>>>>> via the REST interface. But when trying from jQuery, I can't get
>>>>> through. Is it possible that CORS access has to be granted yet for the
>>>>> CMSadapter? The Access-Control-Allow-Methods in the response header
>>>>> seems to only contain GET, POST, and OPTIONS. I get 'Method DELETE is
>>>>> not allowed by Access-Control-Allow-Methods'.
>>>>>
>>>>> Best,
>>>>> Melanie
>>>>>
>>>>> Am 17.09.2012 12:17, schrieb Suat Gonul:
>>>>>
>>>>> Hi Melanie,
>>>>>>
>>>>>> Yes, it was working for me. Please note that you should rebuild the
>>>>>> Entityhub component, since the issue was related with the Entityhub,
>>>>>> to
>>>>>> test the deletion operation.
>>>>>>
>>>>>> Best,
>>>>>> Suat
>>>>>>
>>>>>> On 09/17/2012 12:42 PM, Melanie Reiplinger wrote:
>>>>>>
>>>>>> Hi Suat,
>>>>>>>
>>>>>>> I see that https://issues.apache.org/****jira/browse/STANBOL-727<https://issues.apache.org/**jira/browse/STANBOL-727>
>>>>>>> <https:**//issues.apache.org/jira/**browse/STANBOL-727<https://issues.apache.org/jira/browse/STANBOL-727>
>>>>>>> >is
>>>>>>>
>>>>>>> solved. Does the deletion of repository items on the
>>>>>>> cmsadapter/contenthubfeed work for you now?
>>>>>>>
>>>>>>> Best,
>>>>>>> Melanie
>>>>>>>
>>>>>>>
>>>>>>> Am 31.08.2012 14:27, schrieb Suat Gönül:
>>>>>>>
>>>>>>> Hi Melanie,
>>>>>>>>
>>>>>>>> The deletion problems seems to be related with the bug described in
>>>>>>>> STANBOL-727. Could you please retry after that bug is fixed?
>>>>>>>>
>>>>>>>> Best,
>>>>>>>> Suat
>>>>>>>>
>>>>>>>> On Thu, Aug 30, 2012 at 1:00 PM, Melanie Reiplinger <
>>>>>>>> melanie.reiplinger@dfki.de> wrote:
>>>>>>>>
>>>>>>>> Hi Suat,
>>>>>>>>
>>>>>>>>> thank you a lot for demonstrating this. It seems my mistake was
>>>>>>>>> that
>>>>>>>>> I did
>>>>>>>>> not associate files with the nodes. For no specific reason I
>>>>>>>>> assumed
>>>>>>>>> that
>>>>>>>>> files would be created when the nodes were created. But then I
>>>>>>>>> guess
>>>>>>>>> that
>>>>>>>>> usually, it's the other way around: when building a repo, the
>>>>>>>>> files are
>>>>>>>>> already there and are then are used to build up the tree.
>>>>>>>>>
>>>>>>>>> Now how do you delete your 2 content items from the contenthub? The
>>>>>>>>> documentation says it's the very same syntax as for submitting
>>>>>>>>> items, just
>>>>>>>>> using DELETE instead of POST, but that gives me a Bad Request with
>>>>>>>>> java.lang.******IllegalArgumentException: No content found for
>>>>>>>>> any of
>>>>>>>>>
>>>>>>>>> the
>>>>>>>>> following parameters [entity, content].
>>>>>>>>> It does also not work in the REST interface.
>>>>>>>>>
>>>>>>>>> Best,
>>>>>>>>> Melanie
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Am 27.08.2012 13:42, schrieb Suat Gonul:
>>>>>>>>>
>>>>>>>>> Hi Melanie,
>>>>>>>>>
>>>>>>>>> It is true that a content repo is needed to run unit tests.
>>>>>>>>>> Anyway, I
>>>>>>>>>> tested the Jackrabbit and I shall share the steps with you. I hope
>>>>>>>>>> they
>>>>>>>>>> would work for you too.
>>>>>>>>>>
>>>>>>>>>> First of all, I was able to create nodes in Jackrabbit through
>>>>>>>>>> the JCR
>>>>>>>>>> API.
>>>>>>>>>>
>>>>>>>>>> - I ran the jackrabbit-standalone-2.4.2.******jar on the 8080
>>>>>>>>>> port.
>>>>>>>>>>
>>>>>>>>>> - Then created temporary nodes with the following code below. The
>>>>>>>>>> code
>>>>>>>>>> create two nodes to be submitted to the Contenthub under the
>>>>>>>>>> "test"
>>>>>>>>>> path. The nodes are associated with two files from the local file
>>>>>>>>>> system. So, you should adapt the file paths. 3 external libraries
>>>>>>>>>> are
>>>>>>>>>> required to run this code: jackrabbit-jcr-rmi-2.2.*.jar,
>>>>>>>>>> jcr-2.0.jar and
>>>>>>>>>> slf4j-api-*.jar. They are already downloaded when you build
>>>>>>>>>> Stanbol
>>>>>>>>>> into
>>>>>>>>>> the maven repository i.e the .m2 folder.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Repository repository = new URLRemoteRepository(
>>>>>>>>>> "http://localhost:8080/rmi");
>>>>>>>>>> Session session = repository.login(new
>>>>>>>>>> SimpleCredentials("admin",
>>>>>>>>>> "admin".toCharArray()));
>>>>>>>>>>
>>>>>>>>>> Node testNode = null;
>>>>>>>>>> try {
>>>>>>>>>> testNode = session.getNode("/test");
>>>>>>>>>> testNode.remove();
>>>>>>>>>> } catch (PathNotFoundException e) {
>>>>>>>>>> // ignore
>>>>>>>>>> }
>>>>>>>>>> Node rootNode = session.getRootNode();
>>>>>>>>>> testNode = rootNode.addNode("test");
>>>>>>>>>>
>>>>>>>>>> File f = new File(
>>>>>>>>>> "/home/suat/Desktop/****
>>>>>>>>>> technicalStuff/stanbolTests/**
>>>>>>>>>> cmsAdapter/jackrabbit/news1.******txt");
>>>>>>>>>>
>>>>>>>>>> Node newsNode = testNode.addNode(f.getName(),
>>>>>>>>>> "nt:file");
>>>>>>>>>> Node resourceNode = newsNode.addNode("jcr:content"**
>>>>>>>>>> ****,
>>>>>>>>>> "nt:resource");
>>>>>>>>>> resourceNode.setProperty("jcr:******mimeType",
>>>>>>>>>> "text/plain");
>>>>>>>>>> Binary binary = session.getValueFactory().****
>>>>>>>>>> createBinary(
>>>>>>>>>> new FileInputStream(f));
>>>>>>>>>> resourceNode.setProperty("jcr:******data", binary);
>>>>>>>>>>
>>>>>>>>>> f = new File(
>>>>>>>>>> "/home/suat/Desktop/****
>>>>>>>>>> technicalStuff/stanbolTests/**
>>>>>>>>>> cmsAdapter/jackrabbit/news2.******txt");
>>>>>>>>>>
>>>>>>>>>> newsNode = testNode.addNode(f.getName(), "nt:file");
>>>>>>>>>> resourceNode = newsNode.addNode("jcr:content"******,
>>>>>>>>>> "nt:resource");
>>>>>>>>>> resourceNode.setProperty("jcr:******mimeType",
>>>>>>>>>> "text/plain");
>>>>>>>>>> binary = session.getValueFactory().******
>>>>>>>>>> createBinary(new
>>>>>>>>>> FileInputStream(f));
>>>>>>>>>> resourceNode.setProperty("jcr:******data", binary);
>>>>>>>>>>
>>>>>>>>>> session.save();
>>>>>>>>>>
>>>>>>>>>> - I ran the Stanbol on 8081 and executed the following commands:
>>>>>>>>>> - curl -X GET -H "Accept: text/plain"
>>>>>>>>>> "http://localhost:8081/******cmsadapter/session?****<http://localhost:8081/****cmsadapter/session?****>
>>>>>>>>>> repositoryURL=http://**<http:/**/localhost:8081/**cmsadapter/**
>>>>>>>>>> session?**repositoryURL=http:/**/**<http://localhost:8081/**cmsadapter/session?**repositoryURL=http://**>
>>>>>>>>>> >
>>>>>>>>>>
>>>>>>>>>> localhost:8080/rmi&username=******admin&password=admin&****
>>>>>>>>>> connectionType=JCR<http://****localhost:8081/cmsadapter/**
>>>>>>>>>> session?repositoryURL=http://****localhost:8080/rmi&username=****
>>>>>>>>>>
>>>>>>>>>> admin&password=admin&****connectionType=JCR<http://**
>>>>>>>>>> localhost:8081/cmsadapter/**session?repositoryURL=http://**
>>>>>>>>>> localhost:8080/rmi&username=**admin&password=admin&**
>>>>>>>>>> connectionType=JCR<http://localhost:8081/cmsadapter/session?repositoryURL=http://localhost:8080/rmi&username=admin&password=admin&connectionType=JCR>
>>>>>>>>>> >
>>>>>>>>>>
>>>>>>>>>> "
>>>>>>>>>> - curl -i -X POST --data
>>>>>>>>>> "sessionKey=e92be985-e722-******419f-a1ad-5fe02628b537&path=/***
>>>>>>>>>> ***
>>>>>>>>>> test&recursive=true"
>>>>>>>>>> http://localhost:8081/******cmsadapter/contenthubfeed<http://localhost:8081/****cmsadapter/contenthubfeed>
>>>>>>>>>> <http**://localhost:8081/****cmsadapter/contenthubfeed<http://localhost:8081/**cmsadapter/contenthubfeed>
>>>>>>>>>> >
>>>>>>>>>> <http**://localhost:8081/**cmsadapter/**contenthubfeed<ht**
>>>>>>>>>> tp://localhost:8081/**cmsadapter/contenthubfeed<http://localhost:8081/cmsadapter/contenthubfeed>
>>>>>>>>>> >
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> In the second command the result of the first command should be
>>>>>>>>>> used.
>>>>>>>>>> After executing these commands, I was able to see documents on
>>>>>>>>>> http://localhost:8081/******contenthub/contenthub/store<http://localhost:8081/****contenthub/contenthub/store>
>>>>>>>>>> <ht**tp://localhost:8081/****contenthub/contenthub/store<http://localhost:8081/**contenthub/contenthub/store>
>>>>>>>>>> >
>>>>>>>>>> <ht**tp://localhost:8081/****contenthub/contenthub/store<ht**
>>>>>>>>>> tp://localhost:8081/**contenthub/contenthub/store<http://localhost:8081/contenthub/contenthub/store>
>>>>>>>>>> >
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> .
>>>>>>>>>>
>>>>>>>>>> Best,
>>>>>>>>>> Suat
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On 08/20/2012 01:11 PM, Melanie Reiplinger wrote:
>>>>>>>>>>
>>>>>>>>>> Hi Suat,
>>>>>>>>>>
>>>>>>>>>>> Thanks for your reply.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Am 20.08.2012 11:55, schrieb Suat Gönül:
>>>>>>>>>>>
>>>>>>>>>>> Hi Melanie,
>>>>>>>>>>>
>>>>>>>>>>>> Sorry, I could not answer you as I was in holiday. I will start
>>>>>>>>>>>> to
>>>>>>>>>>>> work on
>>>>>>>>>>>> August 27. In my demonstration, I was using CRX CMS.
>>>>>>>>>>>>
>>>>>>>>>>>> That seems to be commercial software. I Cannot use that. So
>>>>>>>>>>>> I'll
>>>>>>>>>>>>
>>>>>>>>>>> have
>>>>>>>>>>> to find another way. Under these conditions, I'm not even sure it
>>>>>>>>>>> makes much sense to create unit tests for the JavaScript
>>>>>>>>>>> interface to
>>>>>>>>>>> the cmsadapter, since whoever wanted to run them would need to
>>>>>>>>>>> have a
>>>>>>>>>>> content repo locally installed to connect stanbol to it. It makes
>>>>>>>>>>> sense only if I could set up (or use) a remote repo that's
>>>>>>>>>>> accessible
>>>>>>>>>>> from wherever the test script is called...
>>>>>>>>>>>
>>>>>>>>>>> Best,
>>>>>>>>>>> Melanie
>>>>>>>>>>>
>>>>>>>>>>> But to connect CRX, I
>>>>>>>>>>>
>>>>>>>>>>> have and additional bundle to be added to the OSGi environment.
>>>>>>>>>>>> I
>>>>>>>>>>>> can
>>>>>>>>>>>> provide you that bundle when I'm back.
>>>>>>>>>>>>
>>>>>>>>>>>> I did not access to the repo via HTTP. In my demonstration, a
>>>>>>>>>>>> session is
>>>>>>>>>>>> obtained together with a session key after giving the necessary
>>>>>>>>>>>> credentials
>>>>>>>>>>>> e.g username, password, rmi endpoint. And that session key is
>>>>>>>>>>>> used by
>>>>>>>>>>>> CMS
>>>>>>>>>>>> Adapter to access to the repo.
>>>>>>>>>>>>
>>>>>>>>>>>> Best,
>>>>>>>>>>>> Suat
>>>>>>>>>>>>
>>>>>>>>>>>> On Mon, Aug 20, 2012 at 12:11 PM, Melanie Reiplinger <
>>>>>>>>>>>> melanie.reiplinger@dfki.de> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>> Hi Suat,
>>>>>>>>>>>>
>>>>>>>>>>>> I cannot access my jackrabbit repo via xmlhttp either (although
>>>>>>>>>>>>> curl
>>>>>>>>>>>>> works
>>>>>>>>>>>>> fine), so this might as well be a CORS access problem. In your
>>>>>>>>>>>>> demo,
>>>>>>>>>>>>> did
>>>>>>>>>>>>> you have to somehow provide access to the repo (by setting
>>>>>>>>>>>>> headers
>>>>>>>>>>>>> etc)?
>>>>>>>>>>>>>
>>>>>>>>>>>>> Best,
>>>>>>>>>>>>> Melanie
>>>>>>>>>>>>>
>>>>>>>>>>>>> Am 15.08.2012 11:15, schrieb Melanie Reiplinger:
>>>>>>>>>>>>>
>>>>>>>>>>>>> Hi Suat,
>>>>>>>>>>>>>
>>>>>>>>>>>>> Am 13.08.2012 13:35, schrieb Suat Gonul:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> In any case, I guess that you
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> need to configure a RDF Bridge through the
>>>>>>>>>>>>>>> {stanbol}/system/console/********configMgr interface. There
>>>>>>>>>>>>>>> you
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> should
>>>>>>>>>>>>>>> find
>>>>>>>>>>>>>>> the
>>>>>>>>>>>>>>> "Apache Stanbol CMS Adapter Default RDF Bridge
>>>>>>>>>>>>>>> Configurations". In
>>>>>>>>>>>>>>> that
>>>>>>>>>>>>>>> configuration you specify the root path in the CMS to be
>>>>>>>>>>>>>>> exported
>>>>>>>>>>>>>>> to the
>>>>>>>>>>>>>>> RDF.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> by that you mean the content repository path? This means
>>>>>>>>>>>>>>> that I set
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> there the path to my content repository?
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Yes, you set there a path residing in the content
>>>>>>>>>>>>>>>> repository.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> I have set up a jackrabbit workspace with some toy
>>>>>>>>>>>>>>> nodes
>>>>>>>>>>>>>>> in it. To
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> access it remotely, I'd configure something like
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> http://[myserver]/server/
>>>>>>>>>>>>>>>> <http://lnv-89012.dfki.uni-sb.**
>>>>>>>>>>>>>>>> ******de:9002/server/default/****
>>>>>>>>>>>>>>>> **node1<
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> http://lnv-89012.dfki.**uni-****
>>>>>>>>>>>>>>>> sb.de:9002/server/default/****<http://sb.de:9002/server/default/****>
>>>>>>>>>>>>>>>> node1 <http://uni-sb.de:9002/server/**default/**node1<http://uni-sb.de:9002/server/default/**node1>
>>>>>>>>>>>>>>>> ><
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> http://lnv-89012.dfki.**uni-**sb.de:9002/server/default/***
>>>>>>>>>>>>>>>> *node1 <http://uni-sb.de:9002/server/default/**node1><
>>>>>>>>>>>>>>>> http://lnv-89012.dfki.**uni-sb.de:9002/server/default/**
>>>>>>>>>>>>>>>> node1<http://lnv-89012.dfki.uni-sb.de:9002/server/default/node1>
>>>>>>>>>>>>>>>> >
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> ,
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> but then
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> I can work with this repository exclusively, right?
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> I cannot access the URL you gave, but I guess you
>>>>>>>>>>>>>>>> should give
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> /node1
>>>>>>>>>>>>>>> path to export it as RDF. I didn't get your question about
>>>>>>>>>>>>>>> working
>>>>>>>>>>>>>>> exclusively with the repository. But, you already seem to
>>>>>>>>>>>>>>> work
>>>>>>>>>>>>>>> on the
>>>>>>>>>>>>>>> default repository of Jackrabbit running on your server.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> I tried with several paths, none will work.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> My remote repository stub is
>>>>>>>>>>>>>> http://lnv-89012.dfki.uni-sb.********de:9002/rmi<http://lnv-
>>>>>>>>>>>>>> **
>>>>>>>>>>>>>> 89012. <http://lnv-89012.>**
>>>>>>>>>>>>>> dfki.uni-sb.de:9002/rmi
>>>>>>>>>>>>>> <http://lnv-89012.dfki.uni-sb.****de:9002/rmi<http://lnv-**
>>>>>>>>>>>>>> 89012.dfki.uni-sb.de:9002/rmi<http://lnv-89012.dfki.uni-sb.de:9002/rmi>
>>>>>>>>>>>>>> >
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> .
>>>>>>>>>>>>>> (you cannot access those URIs because they are in a closed
>>>>>>>>>>>>>> network)
>>>>>>>>>>>>>> For accessing the content repository, I should use (according
>>>>>>>>>>>>>> to my
>>>>>>>>>>>>>> jackrabbit guidelines):
>>>>>>>>>>>>>> http://lnv-89012.dfki.uni-sb.********de:9002/server<http://**
>>>>>>>>>>>>>> lnv- <http://lnv->**
>>>>>>>>>>>>>> **
>>>>>>>>>>>>>> 89012.dfki.uni-sb.de:9002/******server<http://89012.dfki.uni-sb.de:9002/****server>
>>>>>>>>>>>>>> <http://89012.dfki.uni-**sb.de:9002/**server<http://89012.dfki.uni-sb.de:9002/**server>
>>>>>>>>>>>>>> >
>>>>>>>>>>>>>> <http://lnv-89012.dfki.**uni-**sb.de:9002/server<http://uni-sb.de:9002/server>
>>>>>>>>>>>>>> <http://lnv-**89012.dfki.uni-sb.de:9002/**server<http://lnv-89012.dfki.uni-sb.de:9002/server>
>>>>>>>>>>>>>> >
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> to
>>>>>>>>>>>>>> access all workspaces of myJCR repository
>>>>>>>>>>>>>> http://lnv-89012.dfki.uni-sb.********de:9002/server/default/*
>>>>>>>>>>>>>> *jcr:*
>>>>>>>>>>>>>> *****
>>>>>>>>>>>>>> rootto<http://lnv-89012.dfki.******uni-sb.de:9002/server/**
>>>>>>>>>>>>>> default/** <http://uni-sb.de:9002/server/**default/**<http://uni-sb.de:9002/server/default/**>
>>>>>>>>>>>>>> >
>>>>>>>>>>>>>> jcr:rootto<http://lnv-89012.****dfki.uni-sb.de:9002/server/**<http://dfki.uni-sb.de:9002/server/**>
>>>>>>>>>>>>>> default/jcr:rootto<http://lnv-**89012.dfki.uni-sb.de:9002/**
>>>>>>>>>>>>>> server/default/jcr:rootto<http://lnv-89012.dfki.uni-sb.de:9002/server/default/jcr:rootto>
>>>>>>>>>>>>>> >
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> access
>>>>>>>>>>>>>> a single workspace (example with workspace named 'default').
>>>>>>>>>>>>>> ->
>>>>>>>>>>>>>> this
>>>>>>>>>>>>>> one is also where I can navigate to with my browser, so this
>>>>>>>>>>>>>> should
>>>>>>>>>>>>>> then be
>>>>>>>>>>>>>> the correct path I guess.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> But I always get the same error about
>>>>>>>>>>>>>> org.apache.stanbol.cmsadapter.**
>>>>>>>>>>>>>> ******jcr.mapping.JCRRDFMapper
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Failed to
>>>>>>>>>>>>>> retrieve node having path: <thePath> or its childr
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I'm an absolute beginner with content repositories, using
>>>>>>>>>>>>>> jackrabbit for
>>>>>>>>>>>>>> the first time and I'm really unsure of what would have to
>>>>>>>>>>>>>> work if
>>>>>>>>>>>>>> everything was correct, but I can see my repository in the
>>>>>>>>>>>>>> jackrabbit
>>>>>>>>>>>>>> console and I also can see that my nodes are existing, and the
>>>>>>>>>>>>>> info
>>>>>>>>>>>>>> command
>>>>>>>>>>>>>> tells me that everything looks like I would expect:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Repository:
>>>>>>>>>>>>>> http://lnv-89012.dfki.uni-sb.********de:9002/rmi<http://lnv-
>>>>>>>>>>>>>> **
>>>>>>>>>>>>>> 89012. <http://lnv-89012.>**
>>>>>>>>>>>>>> dfki.uni-sb.de:9002/rmi
>>>>>>>>>>>>>> <http://lnv-89012.dfki.uni-sb.****de:9002/rmi<http://lnv-**
>>>>>>>>>>>>>> 89012.dfki.uni-sb.de:9002/rmi<http://lnv-89012.dfki.uni-sb.de:9002/rmi>
>>>>>>>>>>>>>> >
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> User : admin
>>>>>>>>>>>>>> Workspace : default
>>>>>>>>>>>>>> Node : /
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I looked at your paper ("Semantic Content Management with
>>>>>>>>>>>>>> Apache
>>>>>>>>>>>>>> Stanbol") and saw that you used jackrabbit in the demo, too.
>>>>>>>>>>>>>> Is
>>>>>>>>>>>>>> there some
>>>>>>>>>>>>>> publicly accessible repository I could use for testing (so
>>>>>>>>>>>>>> that I
>>>>>>>>>>>>>> see what
>>>>>>>>>>>>>> the path I have to specify looks like in a working example)?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> best,
>>>>>>>>>>>>>> melanie
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>
Re: cmsadapter STANBOL-727
Posted by Melanie Reiplinger <me...@dfki.de>.
Am 27.09.2012 12:21, schrieb Suat Gönül:
> On Thu, Sep 27, 2012 at 12:19 PM, Melanie Reiplinger <
> melanie.reiplinger@dfki.de> wrote:
>
>> Hi Suat and all,
>>
>> after updating, the build will not work any more.
>>
>> [ERROR] Failed to execute goal org.apache.sling:maven-**
>> launchpad-plugin:2.1.0:**prepare-package (prepare-package) on project
>> org.apache.stanbol.launchers.**stable: Unable to resolve artifact. Could
>> not transfer artifact org.apache.stanbol:org.apache.**
>> stanbol.entityhub.model.**clerezza:jar:0.10.0-incubating from/to central (
>> http://repo.maven.apache.org/**maven2<http://repo.maven.apache.org/maven2>):
>> Specified destination directory cannot be created:...
>>
> It seem your code still has some artifact versions including "incubating"
> word. This should not be the case. Incubating keyword has been removed from
> all of the Stanbol artifacts after graduation. I guess you need a complete
> update.
strange. In fact, I did not only do a complete fresh checkout of the
data after the migration, but I also did a complete update this morning.
I did that specifically in order to avoid any of the old stuff blocking
the build. It also tells me that
Specified destination directory cannot be created:
/home/mere01/.m2/repository/org/apache/stanbol/org.apache.stanbol.entityhub.model.clerezza/0.10.0-incubating
So maybe I should completely delete this .m2 dir, since that was always
used in building the incubating version?
> Best,
> Suat
>
>
>> Anybody else seen this problem?
>>
>> Best,
>> Melanie
>>
>> m 25.09.2012 16:48, schrieb Suat Gonul:
>>
>> Hi Melanie,
>>> It seems I had overlooked the DELETE value for the
>>> Access-Control-Allow-Methods header. Now, you should be able to execute
>>> CORS request for the DELETE method.
>>>
>>> Best,
>>> Suat
>>>
>>> On 09/25/2012 11:02 AM, Melanie Reiplinger wrote:
>>>
>>>> Hi Suat,
>>>>
>>>> after a fresh checkout on the re-located source, I can delete items
>>>> via the REST interface. But when trying from jQuery, I can't get
>>>> through. Is it possible that CORS access has to be granted yet for the
>>>> CMSadapter? The Access-Control-Allow-Methods in the response header
>>>> seems to only contain GET, POST, and OPTIONS. I get 'Method DELETE is
>>>> not allowed by Access-Control-Allow-Methods'.
>>>>
>>>> Best,
>>>> Melanie
>>>>
>>>> Am 17.09.2012 12:17, schrieb Suat Gonul:
>>>>
>>>>> Hi Melanie,
>>>>>
>>>>> Yes, it was working for me. Please note that you should rebuild the
>>>>> Entityhub component, since the issue was related with the Entityhub, to
>>>>> test the deletion operation.
>>>>>
>>>>> Best,
>>>>> Suat
>>>>>
>>>>> On 09/17/2012 12:42 PM, Melanie Reiplinger wrote:
>>>>>
>>>>>> Hi Suat,
>>>>>>
>>>>>> I see that https://issues.apache.org/**jira/browse/STANBOL-727<https://issues.apache.org/jira/browse/STANBOL-727>is
>>>>>> solved. Does the deletion of repository items on the
>>>>>> cmsadapter/contenthubfeed work for you now?
>>>>>>
>>>>>> Best,
>>>>>> Melanie
>>>>>>
>>>>>>
>>>>>> Am 31.08.2012 14:27, schrieb Suat Gönül:
>>>>>>
>>>>>>> Hi Melanie,
>>>>>>>
>>>>>>> The deletion problems seems to be related with the bug described in
>>>>>>> STANBOL-727. Could you please retry after that bug is fixed?
>>>>>>>
>>>>>>> Best,
>>>>>>> Suat
>>>>>>>
>>>>>>> On Thu, Aug 30, 2012 at 1:00 PM, Melanie Reiplinger <
>>>>>>> melanie.reiplinger@dfki.de> wrote:
>>>>>>>
>>>>>>> Hi Suat,
>>>>>>>> thank you a lot for demonstrating this. It seems my mistake was that
>>>>>>>> I did
>>>>>>>> not associate files with the nodes. For no specific reason I assumed
>>>>>>>> that
>>>>>>>> files would be created when the nodes were created. But then I guess
>>>>>>>> that
>>>>>>>> usually, it's the other way around: when building a repo, the
>>>>>>>> files are
>>>>>>>> already there and are then are used to build up the tree.
>>>>>>>>
>>>>>>>> Now how do you delete your 2 content items from the contenthub? The
>>>>>>>> documentation says it's the very same syntax as for submitting
>>>>>>>> items, just
>>>>>>>> using DELETE instead of POST, but that gives me a Bad Request with
>>>>>>>> java.lang.****IllegalArgumentException: No content found for any of
>>>>>>>> the
>>>>>>>> following parameters [entity, content].
>>>>>>>> It does also not work in the REST interface.
>>>>>>>>
>>>>>>>> Best,
>>>>>>>> Melanie
>>>>>>>>
>>>>>>>>
>>>>>>>> Am 27.08.2012 13:42, schrieb Suat Gonul:
>>>>>>>>
>>>>>>>> Hi Melanie,
>>>>>>>>
>>>>>>>>> It is true that a content repo is needed to run unit tests.
>>>>>>>>> Anyway, I
>>>>>>>>> tested the Jackrabbit and I shall share the steps with you. I hope
>>>>>>>>> they
>>>>>>>>> would work for you too.
>>>>>>>>>
>>>>>>>>> First of all, I was able to create nodes in Jackrabbit through
>>>>>>>>> the JCR
>>>>>>>>> API.
>>>>>>>>>
>>>>>>>>> - I ran the jackrabbit-standalone-2.4.2.****jar on the 8080 port.
>>>>>>>>> - Then created temporary nodes with the following code below. The
>>>>>>>>> code
>>>>>>>>> create two nodes to be submitted to the Contenthub under the "test"
>>>>>>>>> path. The nodes are associated with two files from the local file
>>>>>>>>> system. So, you should adapt the file paths. 3 external libraries
>>>>>>>>> are
>>>>>>>>> required to run this code: jackrabbit-jcr-rmi-2.2.*.jar,
>>>>>>>>> jcr-2.0.jar and
>>>>>>>>> slf4j-api-*.jar. They are already downloaded when you build Stanbol
>>>>>>>>> into
>>>>>>>>> the maven repository i.e the .m2 folder.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Repository repository = new URLRemoteRepository(
>>>>>>>>> "http://localhost:8080/rmi");
>>>>>>>>> Session session = repository.login(new
>>>>>>>>> SimpleCredentials("admin",
>>>>>>>>> "admin".toCharArray()));
>>>>>>>>>
>>>>>>>>> Node testNode = null;
>>>>>>>>> try {
>>>>>>>>> testNode = session.getNode("/test");
>>>>>>>>> testNode.remove();
>>>>>>>>> } catch (PathNotFoundException e) {
>>>>>>>>> // ignore
>>>>>>>>> }
>>>>>>>>> Node rootNode = session.getRootNode();
>>>>>>>>> testNode = rootNode.addNode("test");
>>>>>>>>>
>>>>>>>>> File f = new File(
>>>>>>>>> "/home/suat/Desktop/****
>>>>>>>>> technicalStuff/stanbolTests/**
>>>>>>>>> cmsAdapter/jackrabbit/news1.****txt");
>>>>>>>>> Node newsNode = testNode.addNode(f.getName(),
>>>>>>>>> "nt:file");
>>>>>>>>> Node resourceNode = newsNode.addNode("jcr:content"****,
>>>>>>>>> "nt:resource");
>>>>>>>>> resourceNode.setProperty("jcr:****mimeType",
>>>>>>>>> "text/plain");
>>>>>>>>> Binary binary = session.getValueFactory().****
>>>>>>>>> createBinary(
>>>>>>>>> new FileInputStream(f));
>>>>>>>>> resourceNode.setProperty("jcr:****data", binary);
>>>>>>>>>
>>>>>>>>> f = new File(
>>>>>>>>> "/home/suat/Desktop/****
>>>>>>>>> technicalStuff/stanbolTests/**
>>>>>>>>> cmsAdapter/jackrabbit/news2.****txt");
>>>>>>>>> newsNode = testNode.addNode(f.getName(), "nt:file");
>>>>>>>>> resourceNode = newsNode.addNode("jcr:content"****,
>>>>>>>>> "nt:resource");
>>>>>>>>> resourceNode.setProperty("jcr:****mimeType",
>>>>>>>>> "text/plain");
>>>>>>>>> binary = session.getValueFactory().****createBinary(new
>>>>>>>>> FileInputStream(f));
>>>>>>>>> resourceNode.setProperty("jcr:****data", binary);
>>>>>>>>> session.save();
>>>>>>>>>
>>>>>>>>> - I ran the Stanbol on 8081 and executed the following commands:
>>>>>>>>> - curl -X GET -H "Accept: text/plain"
>>>>>>>>> "http://localhost:8081/****cmsadapter/session?****
>>>>>>>>> repositoryURL=http://**<http://localhost:8081/**cmsadapter/session?**repositoryURL=http://**>
>>>>>>>>>
>>>>>>>>> localhost:8080/rmi&username=****admin&password=admin&****
>>>>>>>>> connectionType=JCR<http://**localhost:8081/cmsadapter/**
>>>>>>>>> session?repositoryURL=http://**localhost:8080/rmi&username=**
>>>>>>>>> admin&password=admin&**connectionType=JCR<http://localhost:8081/cmsadapter/session?repositoryURL=http://localhost:8080/rmi&username=admin&password=admin&connectionType=JCR>
>>>>>>>>>
>>>>>>>>> "
>>>>>>>>> - curl -i -X POST --data
>>>>>>>>> "sessionKey=e92be985-e722-****419f-a1ad-5fe02628b537&path=/****
>>>>>>>>> test&recursive=true"
>>>>>>>>> http://localhost:8081/****cmsadapter/contenthubfeed<http://localhost:8081/**cmsadapter/contenthubfeed>
>>>>>>>>> <http**://localhost:8081/cmsadapter/**contenthubfeed<http://localhost:8081/cmsadapter/contenthubfeed>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> In the second command the result of the first command should be
>>>>>>>>> used.
>>>>>>>>> After executing these commands, I was able to see documents on
>>>>>>>>> http://localhost:8081/****contenthub/contenthub/store<http://localhost:8081/**contenthub/contenthub/store>
>>>>>>>>> <ht**tp://localhost:8081/**contenthub/contenthub/store<http://localhost:8081/contenthub/contenthub/store>
>>>>>>>>>
>>>>>>>>> .
>>>>>>>>>
>>>>>>>>> Best,
>>>>>>>>> Suat
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On 08/20/2012 01:11 PM, Melanie Reiplinger wrote:
>>>>>>>>>
>>>>>>>>> Hi Suat,
>>>>>>>>>> Thanks for your reply.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Am 20.08.2012 11:55, schrieb Suat Gönül:
>>>>>>>>>>
>>>>>>>>>> Hi Melanie,
>>>>>>>>>>> Sorry, I could not answer you as I was in holiday. I will start to
>>>>>>>>>>> work on
>>>>>>>>>>> August 27. In my demonstration, I was using CRX CMS.
>>>>>>>>>>>
>>>>>>>>>>> That seems to be commercial software. I Cannot use that. So I'll
>>>>>>>>>> have
>>>>>>>>>> to find another way. Under these conditions, I'm not even sure it
>>>>>>>>>> makes much sense to create unit tests for the JavaScript
>>>>>>>>>> interface to
>>>>>>>>>> the cmsadapter, since whoever wanted to run them would need to
>>>>>>>>>> have a
>>>>>>>>>> content repo locally installed to connect stanbol to it. It makes
>>>>>>>>>> sense only if I could set up (or use) a remote repo that's
>>>>>>>>>> accessible
>>>>>>>>>> from wherever the test script is called...
>>>>>>>>>>
>>>>>>>>>> Best,
>>>>>>>>>> Melanie
>>>>>>>>>>
>>>>>>>>>> But to connect CRX, I
>>>>>>>>>>
>>>>>>>>>>> have and additional bundle to be added to the OSGi environment. I
>>>>>>>>>>> can
>>>>>>>>>>> provide you that bundle when I'm back.
>>>>>>>>>>>
>>>>>>>>>>> I did not access to the repo via HTTP. In my demonstration, a
>>>>>>>>>>> session is
>>>>>>>>>>> obtained together with a session key after giving the necessary
>>>>>>>>>>> credentials
>>>>>>>>>>> e.g username, password, rmi endpoint. And that session key is
>>>>>>>>>>> used by
>>>>>>>>>>> CMS
>>>>>>>>>>> Adapter to access to the repo.
>>>>>>>>>>>
>>>>>>>>>>> Best,
>>>>>>>>>>> Suat
>>>>>>>>>>>
>>>>>>>>>>> On Mon, Aug 20, 2012 at 12:11 PM, Melanie Reiplinger <
>>>>>>>>>>> melanie.reiplinger@dfki.de> wrote:
>>>>>>>>>>>
>>>>>>>>>>> Hi Suat,
>>>>>>>>>>>
>>>>>>>>>>>> I cannot access my jackrabbit repo via xmlhttp either (although
>>>>>>>>>>>> curl
>>>>>>>>>>>> works
>>>>>>>>>>>> fine), so this might as well be a CORS access problem. In your
>>>>>>>>>>>> demo,
>>>>>>>>>>>> did
>>>>>>>>>>>> you have to somehow provide access to the repo (by setting
>>>>>>>>>>>> headers
>>>>>>>>>>>> etc)?
>>>>>>>>>>>>
>>>>>>>>>>>> Best,
>>>>>>>>>>>> Melanie
>>>>>>>>>>>>
>>>>>>>>>>>> Am 15.08.2012 11:15, schrieb Melanie Reiplinger:
>>>>>>>>>>>>
>>>>>>>>>>>> Hi Suat,
>>>>>>>>>>>>
>>>>>>>>>>>> Am 13.08.2012 13:35, schrieb Suat Gonul:
>>>>>>>>>>>>> In any case, I guess that you
>>>>>>>>>>>>>
>>>>>>>>>>>>>> need to configure a RDF Bridge through the
>>>>>>>>>>>>>> {stanbol}/system/console/******configMgr interface. There you
>>>>>>>>>>>>>> should
>>>>>>>>>>>>>> find
>>>>>>>>>>>>>> the
>>>>>>>>>>>>>> "Apache Stanbol CMS Adapter Default RDF Bridge
>>>>>>>>>>>>>> Configurations". In
>>>>>>>>>>>>>> that
>>>>>>>>>>>>>> configuration you specify the root path in the CMS to be
>>>>>>>>>>>>>> exported
>>>>>>>>>>>>>> to the
>>>>>>>>>>>>>> RDF.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> by that you mean the content repository path? This means
>>>>>>>>>>>>>> that I set
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> there the path to my content repository?
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Yes, you set there a path residing in the content
>>>>>>>>>>>>>>> repository.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I have set up a jackrabbit workspace with some toy nodes
>>>>>>>>>>>>>> in it. To
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> access it remotely, I'd configure something like
>>>>>>>>>>>>>>> http://[myserver]/server/
>>>>>>>>>>>>>>> <http://lnv-89012.dfki.uni-sb.******de:9002/server/default/**
>>>>>>>>>>>>>>> **node1<
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> http://lnv-89012.dfki.**uni-**sb.de:9002/server/default/****
>>>>>>>>>>>>>>> node1 <http://uni-sb.de:9002/server/default/**node1><
>>>>>>>>>>>>>>> http://lnv-89012.dfki.**uni-sb.de:9002/server/default/**node1<http://lnv-89012.dfki.uni-sb.de:9002/server/default/node1>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> ,
>>>>>>>>>>>>>>>> but then
>>>>>>>>>>>>>>> I can work with this repository exclusively, right?
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> I cannot access the URL you gave, but I guess you
>>>>>>>>>>>>>>> should give
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>> /node1
>>>>>>>>>>>>>> path to export it as RDF. I didn't get your question about
>>>>>>>>>>>>>> working
>>>>>>>>>>>>>> exclusively with the repository. But, you already seem to work
>>>>>>>>>>>>>> on the
>>>>>>>>>>>>>> default repository of Jackrabbit running on your server.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I tried with several paths, none will work.
>>>>>>>>>>>>>>
>>>>>>>>>>>>> My remote repository stub is
>>>>>>>>>>>>> http://lnv-89012.dfki.uni-sb.******de:9002/rmi<http://lnv-**
>>>>>>>>>>>>> 89012. <http://lnv-89012.>**
>>>>>>>>>>>>> dfki.uni-sb.de:9002/rmi
>>>>>>>>>>>>> <http://lnv-89012.dfki.uni-sb.**de:9002/rmi<http://lnv-89012.dfki.uni-sb.de:9002/rmi>
>>>>>>>>>>>>> .
>>>>>>>>>>>>> (you cannot access those URIs because they are in a closed
>>>>>>>>>>>>> network)
>>>>>>>>>>>>> For accessing the content repository, I should use (according
>>>>>>>>>>>>> to my
>>>>>>>>>>>>> jackrabbit guidelines):
>>>>>>>>>>>>> http://lnv-89012.dfki.uni-sb.******de:9002/server<http://lnv-**
>>>>>>>>>>>>> **
>>>>>>>>>>>>> 89012.dfki.uni-sb.de:9002/****server<http://89012.dfki.uni-sb.de:9002/**server>
>>>>>>>>>>>>> <http://lnv-89012.dfki.**uni-sb.de:9002/server<http://lnv-89012.dfki.uni-sb.de:9002/server>
>>>>>>>>>>>>>
>>>>>>>>>>>>> to
>>>>>>>>>>>>> access all workspaces of myJCR repository
>>>>>>>>>>>>> http://lnv-89012.dfki.uni-sb.******de:9002/server/default/jcr:*
>>>>>>>>>>>>> *****
>>>>>>>>>>>>> rootto<http://lnv-89012.dfki.****uni-sb.de:9002/server/**
>>>>>>>>>>>>> default/** <http://uni-sb.de:9002/server/default/**>
>>>>>>>>>>>>> jcr:rootto<http://lnv-89012.**dfki.uni-sb.de:9002/server/**
>>>>>>>>>>>>> default/jcr:rootto<http://lnv-89012.dfki.uni-sb.de:9002/server/default/jcr:rootto>
>>>>>>>>>>>>>
>>>>>>>>>>>>> access
>>>>>>>>>>>>> a single workspace (example with workspace named 'default'). ->
>>>>>>>>>>>>> this
>>>>>>>>>>>>> one is also where I can navigate to with my browser, so this
>>>>>>>>>>>>> should
>>>>>>>>>>>>> then be
>>>>>>>>>>>>> the correct path I guess.
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> But I always get the same error about
>>>>>>>>>>>>> org.apache.stanbol.cmsadapter.******jcr.mapping.JCRRDFMapper
>>>>>>>>>>>>> Failed to
>>>>>>>>>>>>> retrieve node having path: <thePath> or its childr
>>>>>>>>>>>>>
>>>>>>>>>>>>> I'm an absolute beginner with content repositories, using
>>>>>>>>>>>>> jackrabbit for
>>>>>>>>>>>>> the first time and I'm really unsure of what would have to
>>>>>>>>>>>>> work if
>>>>>>>>>>>>> everything was correct, but I can see my repository in the
>>>>>>>>>>>>> jackrabbit
>>>>>>>>>>>>> console and I also can see that my nodes are existing, and the
>>>>>>>>>>>>> info
>>>>>>>>>>>>> command
>>>>>>>>>>>>> tells me that everything looks like I would expect:
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Repository:
>>>>>>>>>>>>> http://lnv-89012.dfki.uni-sb.******de:9002/rmi<http://lnv-**
>>>>>>>>>>>>> 89012. <http://lnv-89012.>**
>>>>>>>>>>>>> dfki.uni-sb.de:9002/rmi
>>>>>>>>>>>>> <http://lnv-89012.dfki.uni-sb.**de:9002/rmi<http://lnv-89012.dfki.uni-sb.de:9002/rmi>
>>>>>>>>>>>>> User : admin
>>>>>>>>>>>>> Workspace : default
>>>>>>>>>>>>> Node : /
>>>>>>>>>>>>>
>>>>>>>>>>>>> I looked at your paper ("Semantic Content Management with Apache
>>>>>>>>>>>>> Stanbol") and saw that you used jackrabbit in the demo, too. Is
>>>>>>>>>>>>> there some
>>>>>>>>>>>>> publicly accessible repository I could use for testing (so
>>>>>>>>>>>>> that I
>>>>>>>>>>>>> see what
>>>>>>>>>>>>> the path I have to specify looks like in a working example)?
>>>>>>>>>>>>>
>>>>>>>>>>>>> best,
>>>>>>>>>>>>> melanie
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
Re: cmsadapter STANBOL-727
Posted by Suat Gönül <su...@gmail.com>.
On Thu, Sep 27, 2012 at 12:19 PM, Melanie Reiplinger <
melanie.reiplinger@dfki.de> wrote:
> Hi Suat and all,
>
> after updating, the build will not work any more.
>
> [ERROR] Failed to execute goal org.apache.sling:maven-**
> launchpad-plugin:2.1.0:**prepare-package (prepare-package) on project
> org.apache.stanbol.launchers.**stable: Unable to resolve artifact. Could
> not transfer artifact org.apache.stanbol:org.apache.**
> stanbol.entityhub.model.**clerezza:jar:0.10.0-incubating from/to central (
> http://repo.maven.apache.org/**maven2<http://repo.maven.apache.org/maven2>):
> Specified destination directory cannot be created:...
>
It seem your code still has some artifact versions including "incubating"
word. This should not be the case. Incubating keyword has been removed from
all of the Stanbol artifacts after graduation. I guess you need a complete
update.
Best,
Suat
>
> Anybody else seen this problem?
>
> Best,
> Melanie
>
> m 25.09.2012 16:48, schrieb Suat Gonul:
>
> Hi Melanie,
>>
>> It seems I had overlooked the DELETE value for the
>> Access-Control-Allow-Methods header. Now, you should be able to execute
>> CORS request for the DELETE method.
>>
>> Best,
>> Suat
>>
>> On 09/25/2012 11:02 AM, Melanie Reiplinger wrote:
>>
>>> Hi Suat,
>>>
>>> after a fresh checkout on the re-located source, I can delete items
>>> via the REST interface. But when trying from jQuery, I can't get
>>> through. Is it possible that CORS access has to be granted yet for the
>>> CMSadapter? The Access-Control-Allow-Methods in the response header
>>> seems to only contain GET, POST, and OPTIONS. I get 'Method DELETE is
>>> not allowed by Access-Control-Allow-Methods'.
>>>
>>> Best,
>>> Melanie
>>>
>>> Am 17.09.2012 12:17, schrieb Suat Gonul:
>>>
>>>> Hi Melanie,
>>>>
>>>> Yes, it was working for me. Please note that you should rebuild the
>>>> Entityhub component, since the issue was related with the Entityhub, to
>>>> test the deletion operation.
>>>>
>>>> Best,
>>>> Suat
>>>>
>>>> On 09/17/2012 12:42 PM, Melanie Reiplinger wrote:
>>>>
>>>>> Hi Suat,
>>>>>
>>>>> I see that https://issues.apache.org/**jira/browse/STANBOL-727<https://issues.apache.org/jira/browse/STANBOL-727>is
>>>>> solved. Does the deletion of repository items on the
>>>>> cmsadapter/contenthubfeed work for you now?
>>>>>
>>>>> Best,
>>>>> Melanie
>>>>>
>>>>>
>>>>> Am 31.08.2012 14:27, schrieb Suat Gönül:
>>>>>
>>>>>> Hi Melanie,
>>>>>>
>>>>>> The deletion problems seems to be related with the bug described in
>>>>>> STANBOL-727. Could you please retry after that bug is fixed?
>>>>>>
>>>>>> Best,
>>>>>> Suat
>>>>>>
>>>>>> On Thu, Aug 30, 2012 at 1:00 PM, Melanie Reiplinger <
>>>>>> melanie.reiplinger@dfki.de> wrote:
>>>>>>
>>>>>> Hi Suat,
>>>>>>>
>>>>>>> thank you a lot for demonstrating this. It seems my mistake was that
>>>>>>> I did
>>>>>>> not associate files with the nodes. For no specific reason I assumed
>>>>>>> that
>>>>>>> files would be created when the nodes were created. But then I guess
>>>>>>> that
>>>>>>> usually, it's the other way around: when building a repo, the
>>>>>>> files are
>>>>>>> already there and are then are used to build up the tree.
>>>>>>>
>>>>>>> Now how do you delete your 2 content items from the contenthub? The
>>>>>>> documentation says it's the very same syntax as for submitting
>>>>>>> items, just
>>>>>>> using DELETE instead of POST, but that gives me a Bad Request with
>>>>>>> java.lang.****IllegalArgumentException: No content found for any of
>>>>>>> the
>>>>>>> following parameters [entity, content].
>>>>>>> It does also not work in the REST interface.
>>>>>>>
>>>>>>> Best,
>>>>>>> Melanie
>>>>>>>
>>>>>>>
>>>>>>> Am 27.08.2012 13:42, schrieb Suat Gonul:
>>>>>>>
>>>>>>> Hi Melanie,
>>>>>>>
>>>>>>>> It is true that a content repo is needed to run unit tests.
>>>>>>>> Anyway, I
>>>>>>>> tested the Jackrabbit and I shall share the steps with you. I hope
>>>>>>>> they
>>>>>>>> would work for you too.
>>>>>>>>
>>>>>>>> First of all, I was able to create nodes in Jackrabbit through
>>>>>>>> the JCR
>>>>>>>> API.
>>>>>>>>
>>>>>>>> - I ran the jackrabbit-standalone-2.4.2.****jar on the 8080 port.
>>>>>>>> - Then created temporary nodes with the following code below. The
>>>>>>>> code
>>>>>>>> create two nodes to be submitted to the Contenthub under the "test"
>>>>>>>> path. The nodes are associated with two files from the local file
>>>>>>>> system. So, you should adapt the file paths. 3 external libraries
>>>>>>>> are
>>>>>>>> required to run this code: jackrabbit-jcr-rmi-2.2.*.jar,
>>>>>>>> jcr-2.0.jar and
>>>>>>>> slf4j-api-*.jar. They are already downloaded when you build Stanbol
>>>>>>>> into
>>>>>>>> the maven repository i.e the .m2 folder.
>>>>>>>>
>>>>>>>>
>>>>>>>> Repository repository = new URLRemoteRepository(
>>>>>>>> "http://localhost:8080/rmi");
>>>>>>>> Session session = repository.login(new
>>>>>>>> SimpleCredentials("admin",
>>>>>>>> "admin".toCharArray()));
>>>>>>>>
>>>>>>>> Node testNode = null;
>>>>>>>> try {
>>>>>>>> testNode = session.getNode("/test");
>>>>>>>> testNode.remove();
>>>>>>>> } catch (PathNotFoundException e) {
>>>>>>>> // ignore
>>>>>>>> }
>>>>>>>> Node rootNode = session.getRootNode();
>>>>>>>> testNode = rootNode.addNode("test");
>>>>>>>>
>>>>>>>> File f = new File(
>>>>>>>> "/home/suat/Desktop/****
>>>>>>>> technicalStuff/stanbolTests/**
>>>>>>>> cmsAdapter/jackrabbit/news1.****txt");
>>>>>>>> Node newsNode = testNode.addNode(f.getName(),
>>>>>>>> "nt:file");
>>>>>>>> Node resourceNode = newsNode.addNode("jcr:content"****,
>>>>>>>> "nt:resource");
>>>>>>>> resourceNode.setProperty("jcr:****mimeType",
>>>>>>>> "text/plain");
>>>>>>>> Binary binary = session.getValueFactory().****
>>>>>>>> createBinary(
>>>>>>>> new FileInputStream(f));
>>>>>>>> resourceNode.setProperty("jcr:****data", binary);
>>>>>>>>
>>>>>>>> f = new File(
>>>>>>>> "/home/suat/Desktop/****
>>>>>>>> technicalStuff/stanbolTests/**
>>>>>>>> cmsAdapter/jackrabbit/news2.****txt");
>>>>>>>> newsNode = testNode.addNode(f.getName(), "nt:file");
>>>>>>>> resourceNode = newsNode.addNode("jcr:content"****,
>>>>>>>> "nt:resource");
>>>>>>>> resourceNode.setProperty("jcr:****mimeType",
>>>>>>>> "text/plain");
>>>>>>>> binary = session.getValueFactory().****createBinary(new
>>>>>>>> FileInputStream(f));
>>>>>>>> resourceNode.setProperty("jcr:****data", binary);
>>>>>>>> session.save();
>>>>>>>>
>>>>>>>> - I ran the Stanbol on 8081 and executed the following commands:
>>>>>>>> - curl -X GET -H "Accept: text/plain"
>>>>>>>> "http://localhost:8081/****cmsadapter/session?****
>>>>>>>> repositoryURL=http://**<http://localhost:8081/**cmsadapter/session?**repositoryURL=http://**>
>>>>>>>>
>>>>>>>> localhost:8080/rmi&username=****admin&password=admin&****
>>>>>>>> connectionType=JCR<http://**localhost:8081/cmsadapter/**
>>>>>>>> session?repositoryURL=http://**localhost:8080/rmi&username=**
>>>>>>>> admin&password=admin&**connectionType=JCR<http://localhost:8081/cmsadapter/session?repositoryURL=http://localhost:8080/rmi&username=admin&password=admin&connectionType=JCR>
>>>>>>>> >
>>>>>>>>
>>>>>>>>
>>>>>>>> "
>>>>>>>> - curl -i -X POST --data
>>>>>>>> "sessionKey=e92be985-e722-****419f-a1ad-5fe02628b537&path=/****
>>>>>>>> test&recursive=true"
>>>>>>>> http://localhost:8081/****cmsadapter/contenthubfeed<http://localhost:8081/**cmsadapter/contenthubfeed>
>>>>>>>> <http**://localhost:8081/cmsadapter/**contenthubfeed<http://localhost:8081/cmsadapter/contenthubfeed>
>>>>>>>> >
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> In the second command the result of the first command should be
>>>>>>>> used.
>>>>>>>> After executing these commands, I was able to see documents on
>>>>>>>> http://localhost:8081/****contenthub/contenthub/store<http://localhost:8081/**contenthub/contenthub/store>
>>>>>>>> <ht**tp://localhost:8081/**contenthub/contenthub/store<http://localhost:8081/contenthub/contenthub/store>
>>>>>>>> >
>>>>>>>>
>>>>>>>>
>>>>>>>> .
>>>>>>>>
>>>>>>>> Best,
>>>>>>>> Suat
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On 08/20/2012 01:11 PM, Melanie Reiplinger wrote:
>>>>>>>>
>>>>>>>> Hi Suat,
>>>>>>>>>
>>>>>>>>> Thanks for your reply.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Am 20.08.2012 11:55, schrieb Suat Gönül:
>>>>>>>>>
>>>>>>>>> Hi Melanie,
>>>>>>>>>>
>>>>>>>>>> Sorry, I could not answer you as I was in holiday. I will start to
>>>>>>>>>> work on
>>>>>>>>>> August 27. In my demonstration, I was using CRX CMS.
>>>>>>>>>>
>>>>>>>>>> That seems to be commercial software. I Cannot use that. So I'll
>>>>>>>>> have
>>>>>>>>> to find another way. Under these conditions, I'm not even sure it
>>>>>>>>> makes much sense to create unit tests for the JavaScript
>>>>>>>>> interface to
>>>>>>>>> the cmsadapter, since whoever wanted to run them would need to
>>>>>>>>> have a
>>>>>>>>> content repo locally installed to connect stanbol to it. It makes
>>>>>>>>> sense only if I could set up (or use) a remote repo that's
>>>>>>>>> accessible
>>>>>>>>> from wherever the test script is called...
>>>>>>>>>
>>>>>>>>> Best,
>>>>>>>>> Melanie
>>>>>>>>>
>>>>>>>>> But to connect CRX, I
>>>>>>>>>
>>>>>>>>>> have and additional bundle to be added to the OSGi environment. I
>>>>>>>>>> can
>>>>>>>>>> provide you that bundle when I'm back.
>>>>>>>>>>
>>>>>>>>>> I did not access to the repo via HTTP. In my demonstration, a
>>>>>>>>>> session is
>>>>>>>>>> obtained together with a session key after giving the necessary
>>>>>>>>>> credentials
>>>>>>>>>> e.g username, password, rmi endpoint. And that session key is
>>>>>>>>>> used by
>>>>>>>>>> CMS
>>>>>>>>>> Adapter to access to the repo.
>>>>>>>>>>
>>>>>>>>>> Best,
>>>>>>>>>> Suat
>>>>>>>>>>
>>>>>>>>>> On Mon, Aug 20, 2012 at 12:11 PM, Melanie Reiplinger <
>>>>>>>>>> melanie.reiplinger@dfki.de> wrote:
>>>>>>>>>>
>>>>>>>>>> Hi Suat,
>>>>>>>>>>
>>>>>>>>>>> I cannot access my jackrabbit repo via xmlhttp either (although
>>>>>>>>>>> curl
>>>>>>>>>>> works
>>>>>>>>>>> fine), so this might as well be a CORS access problem. In your
>>>>>>>>>>> demo,
>>>>>>>>>>> did
>>>>>>>>>>> you have to somehow provide access to the repo (by setting
>>>>>>>>>>> headers
>>>>>>>>>>> etc)?
>>>>>>>>>>>
>>>>>>>>>>> Best,
>>>>>>>>>>> Melanie
>>>>>>>>>>>
>>>>>>>>>>> Am 15.08.2012 11:15, schrieb Melanie Reiplinger:
>>>>>>>>>>>
>>>>>>>>>>> Hi Suat,
>>>>>>>>>>>
>>>>>>>>>>> Am 13.08.2012 13:35, schrieb Suat Gonul:
>>>>>>>>>>>>
>>>>>>>>>>>> In any case, I guess that you
>>>>>>>>>>>>
>>>>>>>>>>>>> need to configure a RDF Bridge through the
>>>>>>>>>>>>> {stanbol}/system/console/******configMgr interface. There you
>>>>>>>>>>>>> should
>>>>>>>>>>>>> find
>>>>>>>>>>>>> the
>>>>>>>>>>>>> "Apache Stanbol CMS Adapter Default RDF Bridge
>>>>>>>>>>>>> Configurations". In
>>>>>>>>>>>>> that
>>>>>>>>>>>>> configuration you specify the root path in the CMS to be
>>>>>>>>>>>>> exported
>>>>>>>>>>>>> to the
>>>>>>>>>>>>> RDF.
>>>>>>>>>>>>>
>>>>>>>>>>>>> by that you mean the content repository path? This means
>>>>>>>>>>>>> that I set
>>>>>>>>>>>>>
>>>>>>>>>>>>>> there the path to my content repository?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Yes, you set there a path residing in the content
>>>>>>>>>>>>>> repository.
>>>>>>>>>>>>>>
>>>>>>>>>>>>> I have set up a jackrabbit workspace with some toy nodes
>>>>>>>>>>>>> in it. To
>>>>>>>>>>>>>
>>>>>>>>>>>>> access it remotely, I'd configure something like
>>>>>>>>>>>>>> http://[myserver]/server/
>>>>>>>>>>>>>> <http://lnv-89012.dfki.uni-sb.******de:9002/server/default/**
>>>>>>>>>>>>>> **node1<
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> http://lnv-89012.dfki.**uni-**sb.de:9002/server/default/****
>>>>>>>>>>>>>> node1 <http://uni-sb.de:9002/server/default/**node1><
>>>>>>>>>>>>>> http://lnv-89012.dfki.**uni-sb.de:9002/server/default/**node1<http://lnv-89012.dfki.uni-sb.de:9002/server/default/node1>
>>>>>>>>>>>>>> >
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> ,
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> but then
>>>>>>>>>>>>>> I can work with this repository exclusively, right?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I cannot access the URL you gave, but I guess you
>>>>>>>>>>>>>> should give
>>>>>>>>>>>>>>
>>>>>>>>>>>>> /node1
>>>>>>>>>>>>> path to export it as RDF. I didn't get your question about
>>>>>>>>>>>>> working
>>>>>>>>>>>>> exclusively with the repository. But, you already seem to work
>>>>>>>>>>>>> on the
>>>>>>>>>>>>> default repository of Jackrabbit running on your server.
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> I tried with several paths, none will work.
>>>>>>>>>>>>>
>>>>>>>>>>>> My remote repository stub is
>>>>>>>>>>>> http://lnv-89012.dfki.uni-sb.******de:9002/rmi<http://lnv-**
>>>>>>>>>>>> 89012. <http://lnv-89012.>**
>>>>>>>>>>>> dfki.uni-sb.de:9002/rmi
>>>>>>>>>>>> <http://lnv-89012.dfki.uni-sb.**de:9002/rmi<http://lnv-89012.dfki.uni-sb.de:9002/rmi>
>>>>>>>>>>>> >>
>>>>>>>>>>>> .
>>>>>>>>>>>> (you cannot access those URIs because they are in a closed
>>>>>>>>>>>> network)
>>>>>>>>>>>> For accessing the content repository, I should use (according
>>>>>>>>>>>> to my
>>>>>>>>>>>> jackrabbit guidelines):
>>>>>>>>>>>> http://lnv-89012.dfki.uni-sb.******de:9002/server<http://lnv-**
>>>>>>>>>>>> **
>>>>>>>>>>>> 89012.dfki.uni-sb.de:9002/****server<http://89012.dfki.uni-sb.de:9002/**server>
>>>>>>>>>>>> <http://lnv-89012.dfki.**uni-sb.de:9002/server<http://lnv-89012.dfki.uni-sb.de:9002/server>
>>>>>>>>>>>> >
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> to
>>>>>>>>>>>>>
>>>>>>>>>>>> access all workspaces of myJCR repository
>>>>>>>>>>>> http://lnv-89012.dfki.uni-sb.******de:9002/server/default/jcr:*
>>>>>>>>>>>> *****
>>>>>>>>>>>> rootto<http://lnv-89012.dfki.****uni-sb.de:9002/server/**
>>>>>>>>>>>> default/** <http://uni-sb.de:9002/server/default/**>
>>>>>>>>>>>> jcr:rootto<http://lnv-89012.**dfki.uni-sb.de:9002/server/**
>>>>>>>>>>>> default/jcr:rootto<http://lnv-89012.dfki.uni-sb.de:9002/server/default/jcr:rootto>
>>>>>>>>>>>> >
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> access
>>>>>>>>>>>>>
>>>>>>>>>>>> a single workspace (example with workspace named 'default'). ->
>>>>>>>>>>>> this
>>>>>>>>>>>> one is also where I can navigate to with my browser, so this
>>>>>>>>>>>> should
>>>>>>>>>>>> then be
>>>>>>>>>>>> the correct path I guess.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> But I always get the same error about
>>>>>>>>>>>> org.apache.stanbol.cmsadapter.******jcr.mapping.JCRRDFMapper
>>>>>>>>>>>> Failed to
>>>>>>>>>>>> retrieve node having path: <thePath> or its childr
>>>>>>>>>>>>
>>>>>>>>>>>> I'm an absolute beginner with content repositories, using
>>>>>>>>>>>> jackrabbit for
>>>>>>>>>>>> the first time and I'm really unsure of what would have to
>>>>>>>>>>>> work if
>>>>>>>>>>>> everything was correct, but I can see my repository in the
>>>>>>>>>>>> jackrabbit
>>>>>>>>>>>> console and I also can see that my nodes are existing, and the
>>>>>>>>>>>> info
>>>>>>>>>>>> command
>>>>>>>>>>>> tells me that everything looks like I would expect:
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> Repository:
>>>>>>>>>>>> http://lnv-89012.dfki.uni-sb.******de:9002/rmi<http://lnv-**
>>>>>>>>>>>> 89012. <http://lnv-89012.>**
>>>>>>>>>>>> dfki.uni-sb.de:9002/rmi
>>>>>>>>>>>> <http://lnv-89012.dfki.uni-sb.**de:9002/rmi<http://lnv-89012.dfki.uni-sb.de:9002/rmi>
>>>>>>>>>>>> >>
>>>>>>>>>>>> User : admin
>>>>>>>>>>>> Workspace : default
>>>>>>>>>>>> Node : /
>>>>>>>>>>>>
>>>>>>>>>>>> I looked at your paper ("Semantic Content Management with Apache
>>>>>>>>>>>> Stanbol") and saw that you used jackrabbit in the demo, too. Is
>>>>>>>>>>>> there some
>>>>>>>>>>>> publicly accessible repository I could use for testing (so
>>>>>>>>>>>> that I
>>>>>>>>>>>> see what
>>>>>>>>>>>> the path I have to specify looks like in a working example)?
>>>>>>>>>>>>
>>>>>>>>>>>> best,
>>>>>>>>>>>> melanie
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>
>
Re: cmsadapter STANBOL-727
Posted by Melanie Reiplinger <me...@dfki.de>.
Hi Suat and all,
after updating, the build will not work any more.
[ERROR] Failed to execute goal
org.apache.sling:maven-launchpad-plugin:2.1.0:prepare-package
(prepare-package) on project org.apache.stanbol.launchers.stable: Unable
to resolve artifact. Could not transfer artifact
org.apache.stanbol:org.apache.stanbol.entityhub.model.clerezza:jar:0.10.0-incubating
from/to central (http://repo.maven.apache.org/maven2): Specified
destination directory cannot be created:...
Anybody else seen this problem?
Best,
Melanie
m 25.09.2012 16:48, schrieb Suat Gonul:
> Hi Melanie,
>
> It seems I had overlooked the DELETE value for the
> Access-Control-Allow-Methods header. Now, you should be able to execute
> CORS request for the DELETE method.
>
> Best,
> Suat
>
> On 09/25/2012 11:02 AM, Melanie Reiplinger wrote:
>> Hi Suat,
>>
>> after a fresh checkout on the re-located source, I can delete items
>> via the REST interface. But when trying from jQuery, I can't get
>> through. Is it possible that CORS access has to be granted yet for the
>> CMSadapter? The Access-Control-Allow-Methods in the response header
>> seems to only contain GET, POST, and OPTIONS. I get 'Method DELETE is
>> not allowed by Access-Control-Allow-Methods'.
>>
>> Best,
>> Melanie
>>
>> Am 17.09.2012 12:17, schrieb Suat Gonul:
>>> Hi Melanie,
>>>
>>> Yes, it was working for me. Please note that you should rebuild the
>>> Entityhub component, since the issue was related with the Entityhub, to
>>> test the deletion operation.
>>>
>>> Best,
>>> Suat
>>>
>>> On 09/17/2012 12:42 PM, Melanie Reiplinger wrote:
>>>> Hi Suat,
>>>>
>>>> I see that https://issues.apache.org/jira/browse/STANBOL-727 is
>>>> solved. Does the deletion of repository items on the
>>>> cmsadapter/contenthubfeed work for you now?
>>>>
>>>> Best,
>>>> Melanie
>>>>
>>>>
>>>> Am 31.08.2012 14:27, schrieb Suat Gönül:
>>>>> Hi Melanie,
>>>>>
>>>>> The deletion problems seems to be related with the bug described in
>>>>> STANBOL-727. Could you please retry after that bug is fixed?
>>>>>
>>>>> Best,
>>>>> Suat
>>>>>
>>>>> On Thu, Aug 30, 2012 at 1:00 PM, Melanie Reiplinger <
>>>>> melanie.reiplinger@dfki.de> wrote:
>>>>>
>>>>>> Hi Suat,
>>>>>>
>>>>>> thank you a lot for demonstrating this. It seems my mistake was that
>>>>>> I did
>>>>>> not associate files with the nodes. For no specific reason I assumed
>>>>>> that
>>>>>> files would be created when the nodes were created. But then I guess
>>>>>> that
>>>>>> usually, it's the other way around: when building a repo, the
>>>>>> files are
>>>>>> already there and are then are used to build up the tree.
>>>>>>
>>>>>> Now how do you delete your 2 content items from the contenthub? The
>>>>>> documentation says it's the very same syntax as for submitting
>>>>>> items, just
>>>>>> using DELETE instead of POST, but that gives me a Bad Request with
>>>>>> java.lang.**IllegalArgumentException: No content found for any of the
>>>>>> following parameters [entity, content].
>>>>>> It does also not work in the REST interface.
>>>>>>
>>>>>> Best,
>>>>>> Melanie
>>>>>>
>>>>>>
>>>>>> Am 27.08.2012 13:42, schrieb Suat Gonul:
>>>>>>
>>>>>> Hi Melanie,
>>>>>>> It is true that a content repo is needed to run unit tests.
>>>>>>> Anyway, I
>>>>>>> tested the Jackrabbit and I shall share the steps with you. I hope
>>>>>>> they
>>>>>>> would work for you too.
>>>>>>>
>>>>>>> First of all, I was able to create nodes in Jackrabbit through
>>>>>>> the JCR
>>>>>>> API.
>>>>>>>
>>>>>>> - I ran the jackrabbit-standalone-2.4.2.**jar on the 8080 port.
>>>>>>> - Then created temporary nodes with the following code below. The
>>>>>>> code
>>>>>>> create two nodes to be submitted to the Contenthub under the "test"
>>>>>>> path. The nodes are associated with two files from the local file
>>>>>>> system. So, you should adapt the file paths. 3 external libraries
>>>>>>> are
>>>>>>> required to run this code: jackrabbit-jcr-rmi-2.2.*.jar,
>>>>>>> jcr-2.0.jar and
>>>>>>> slf4j-api-*.jar. They are already downloaded when you build Stanbol
>>>>>>> into
>>>>>>> the maven repository i.e the .m2 folder.
>>>>>>>
>>>>>>>
>>>>>>> Repository repository = new URLRemoteRepository(
>>>>>>> "http://localhost:8080/rmi");
>>>>>>> Session session = repository.login(new
>>>>>>> SimpleCredentials("admin",
>>>>>>> "admin".toCharArray()));
>>>>>>>
>>>>>>> Node testNode = null;
>>>>>>> try {
>>>>>>> testNode = session.getNode("/test");
>>>>>>> testNode.remove();
>>>>>>> } catch (PathNotFoundException e) {
>>>>>>> // ignore
>>>>>>> }
>>>>>>> Node rootNode = session.getRootNode();
>>>>>>> testNode = rootNode.addNode("test");
>>>>>>>
>>>>>>> File f = new File(
>>>>>>>
>>>>>>> "/home/suat/Desktop/**technicalStuff/stanbolTests/**
>>>>>>> cmsAdapter/jackrabbit/news1.**txt");
>>>>>>> Node newsNode = testNode.addNode(f.getName(), "nt:file");
>>>>>>> Node resourceNode = newsNode.addNode("jcr:content"**,
>>>>>>> "nt:resource");
>>>>>>> resourceNode.setProperty("jcr:**mimeType", "text/plain");
>>>>>>> Binary binary = session.getValueFactory().**createBinary(
>>>>>>> new FileInputStream(f));
>>>>>>> resourceNode.setProperty("jcr:**data", binary);
>>>>>>>
>>>>>>> f = new File(
>>>>>>>
>>>>>>> "/home/suat/Desktop/**technicalStuff/stanbolTests/**
>>>>>>> cmsAdapter/jackrabbit/news2.**txt");
>>>>>>> newsNode = testNode.addNode(f.getName(), "nt:file");
>>>>>>> resourceNode = newsNode.addNode("jcr:content"**,
>>>>>>> "nt:resource");
>>>>>>> resourceNode.setProperty("jcr:**mimeType", "text/plain");
>>>>>>> binary = session.getValueFactory().**createBinary(new
>>>>>>> FileInputStream(f));
>>>>>>> resourceNode.setProperty("jcr:**data", binary);
>>>>>>> session.save();
>>>>>>>
>>>>>>> - I ran the Stanbol on 8081 and executed the following commands:
>>>>>>> - curl -X GET -H "Accept: text/plain"
>>>>>>> "http://localhost:8081/**cmsadapter/session?**repositoryURL=http://**
>>>>>>>
>>>>>>> localhost:8080/rmi&username=**admin&password=admin&**connectionType=JCR<http://localhost:8081/cmsadapter/session?repositoryURL=http://localhost:8080/rmi&username=admin&password=admin&connectionType=JCR>
>>>>>>>
>>>>>>>
>>>>>>> "
>>>>>>> - curl -i -X POST --data
>>>>>>> "sessionKey=e92be985-e722-**419f-a1ad-5fe02628b537&path=/**
>>>>>>> test&recursive=true"
>>>>>>> http://localhost:8081/**cmsadapter/contenthubfeed<http://localhost:8081/cmsadapter/contenthubfeed>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> In the second command the result of the first command should be
>>>>>>> used.
>>>>>>> After executing these commands, I was able to see documents on
>>>>>>> http://localhost:8081/**contenthub/contenthub/store<http://localhost:8081/contenthub/contenthub/store>
>>>>>>>
>>>>>>>
>>>>>>> .
>>>>>>>
>>>>>>> Best,
>>>>>>> Suat
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On 08/20/2012 01:11 PM, Melanie Reiplinger wrote:
>>>>>>>
>>>>>>>> Hi Suat,
>>>>>>>>
>>>>>>>> Thanks for your reply.
>>>>>>>>
>>>>>>>>
>>>>>>>> Am 20.08.2012 11:55, schrieb Suat Gönül:
>>>>>>>>
>>>>>>>>> Hi Melanie,
>>>>>>>>>
>>>>>>>>> Sorry, I could not answer you as I was in holiday. I will start to
>>>>>>>>> work on
>>>>>>>>> August 27. In my demonstration, I was using CRX CMS.
>>>>>>>>>
>>>>>>>> That seems to be commercial software. I Cannot use that. So I'll
>>>>>>>> have
>>>>>>>> to find another way. Under these conditions, I'm not even sure it
>>>>>>>> makes much sense to create unit tests for the JavaScript
>>>>>>>> interface to
>>>>>>>> the cmsadapter, since whoever wanted to run them would need to
>>>>>>>> have a
>>>>>>>> content repo locally installed to connect stanbol to it. It makes
>>>>>>>> sense only if I could set up (or use) a remote repo that's
>>>>>>>> accessible
>>>>>>>> from wherever the test script is called...
>>>>>>>>
>>>>>>>> Best,
>>>>>>>> Melanie
>>>>>>>>
>>>>>>>> But to connect CRX, I
>>>>>>>>> have and additional bundle to be added to the OSGi environment. I
>>>>>>>>> can
>>>>>>>>> provide you that bundle when I'm back.
>>>>>>>>>
>>>>>>>>> I did not access to the repo via HTTP. In my demonstration, a
>>>>>>>>> session is
>>>>>>>>> obtained together with a session key after giving the necessary
>>>>>>>>> credentials
>>>>>>>>> e.g username, password, rmi endpoint. And that session key is
>>>>>>>>> used by
>>>>>>>>> CMS
>>>>>>>>> Adapter to access to the repo.
>>>>>>>>>
>>>>>>>>> Best,
>>>>>>>>> Suat
>>>>>>>>>
>>>>>>>>> On Mon, Aug 20, 2012 at 12:11 PM, Melanie Reiplinger <
>>>>>>>>> melanie.reiplinger@dfki.de> wrote:
>>>>>>>>>
>>>>>>>>> Hi Suat,
>>>>>>>>>> I cannot access my jackrabbit repo via xmlhttp either (although
>>>>>>>>>> curl
>>>>>>>>>> works
>>>>>>>>>> fine), so this might as well be a CORS access problem. In your
>>>>>>>>>> demo,
>>>>>>>>>> did
>>>>>>>>>> you have to somehow provide access to the repo (by setting
>>>>>>>>>> headers
>>>>>>>>>> etc)?
>>>>>>>>>>
>>>>>>>>>> Best,
>>>>>>>>>> Melanie
>>>>>>>>>>
>>>>>>>>>> Am 15.08.2012 11:15, schrieb Melanie Reiplinger:
>>>>>>>>>>
>>>>>>>>>> Hi Suat,
>>>>>>>>>>
>>>>>>>>>>> Am 13.08.2012 13:35, schrieb Suat Gonul:
>>>>>>>>>>>
>>>>>>>>>>> In any case, I guess that you
>>>>>>>>>>>> need to configure a RDF Bridge through the
>>>>>>>>>>>> {stanbol}/system/console/****configMgr interface. There you
>>>>>>>>>>>> should
>>>>>>>>>>>> find
>>>>>>>>>>>> the
>>>>>>>>>>>> "Apache Stanbol CMS Adapter Default RDF Bridge
>>>>>>>>>>>> Configurations". In
>>>>>>>>>>>> that
>>>>>>>>>>>> configuration you specify the root path in the CMS to be
>>>>>>>>>>>> exported
>>>>>>>>>>>> to the
>>>>>>>>>>>> RDF.
>>>>>>>>>>>>
>>>>>>>>>>>> by that you mean the content repository path? This means
>>>>>>>>>>>> that I set
>>>>>>>>>>>>> there the path to my content repository?
>>>>>>>>>>>>>
>>>>>>>>>>>>> Yes, you set there a path residing in the content
>>>>>>>>>>>>> repository.
>>>>>>>>>>>> I have set up a jackrabbit workspace with some toy nodes
>>>>>>>>>>>> in it. To
>>>>>>>>>>>>
>>>>>>>>>>>>> access it remotely, I'd configure something like
>>>>>>>>>>>>> http://[myserver]/server/
>>>>>>>>>>>>> <http://lnv-89012.dfki.uni-sb.****de:9002/server/default/**node1<
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> http://lnv-89012.dfki.**uni-sb.de:9002/server/default/**node1<http://lnv-89012.dfki.uni-sb.de:9002/server/default/node1>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>>> ,
>>>>>>>>>>>>> but then
>>>>>>>>>>>>> I can work with this repository exclusively, right?
>>>>>>>>>>>>>
>>>>>>>>>>>>> I cannot access the URL you gave, but I guess you
>>>>>>>>>>>>> should give
>>>>>>>>>>>> /node1
>>>>>>>>>>>> path to export it as RDF. I didn't get your question about
>>>>>>>>>>>> working
>>>>>>>>>>>> exclusively with the repository. But, you already seem to work
>>>>>>>>>>>> on the
>>>>>>>>>>>> default repository of Jackrabbit running on your server.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> I tried with several paths, none will work.
>>>>>>>>>>> My remote repository stub is
>>>>>>>>>>> http://lnv-89012.dfki.uni-sb.****de:9002/rmi<http://lnv-89012.**
>>>>>>>>>>> dfki.uni-sb.de:9002/rmi
>>>>>>>>>>> <http://lnv-89012.dfki.uni-sb.de:9002/rmi>>
>>>>>>>>>>> .
>>>>>>>>>>> (you cannot access those URIs because they are in a closed
>>>>>>>>>>> network)
>>>>>>>>>>> For accessing the content repository, I should use (according
>>>>>>>>>>> to my
>>>>>>>>>>> jackrabbit guidelines):
>>>>>>>>>>> http://lnv-89012.dfki.uni-sb.****de:9002/server<http://lnv-**
>>>>>>>>>>> 89012.dfki.uni-sb.de:9002/**server<http://lnv-89012.dfki.uni-sb.de:9002/server>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>> to
>>>>>>>>>>> access all workspaces of myJCR repository
>>>>>>>>>>> http://lnv-89012.dfki.uni-sb.****de:9002/server/default/jcr:****
>>>>>>>>>>> rootto<http://lnv-89012.dfki.**uni-sb.de:9002/server/default/**
>>>>>>>>>>> jcr:rootto<http://lnv-89012.dfki.uni-sb.de:9002/server/default/jcr:rootto>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>> access
>>>>>>>>>>> a single workspace (example with workspace named 'default'). ->
>>>>>>>>>>> this
>>>>>>>>>>> one is also where I can navigate to with my browser, so this
>>>>>>>>>>> should
>>>>>>>>>>> then be
>>>>>>>>>>> the correct path I guess.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> But I always get the same error about
>>>>>>>>>>> org.apache.stanbol.cmsadapter.****jcr.mapping.JCRRDFMapper
>>>>>>>>>>> Failed to
>>>>>>>>>>> retrieve node having path: <thePath> or its childr
>>>>>>>>>>>
>>>>>>>>>>> I'm an absolute beginner with content repositories, using
>>>>>>>>>>> jackrabbit for
>>>>>>>>>>> the first time and I'm really unsure of what would have to
>>>>>>>>>>> work if
>>>>>>>>>>> everything was correct, but I can see my repository in the
>>>>>>>>>>> jackrabbit
>>>>>>>>>>> console and I also can see that my nodes are existing, and the
>>>>>>>>>>> info
>>>>>>>>>>> command
>>>>>>>>>>> tells me that everything looks like I would expect:
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Repository:
>>>>>>>>>>> http://lnv-89012.dfki.uni-sb.****de:9002/rmi<http://lnv-89012.**
>>>>>>>>>>> dfki.uni-sb.de:9002/rmi
>>>>>>>>>>> <http://lnv-89012.dfki.uni-sb.de:9002/rmi>>
>>>>>>>>>>> User : admin
>>>>>>>>>>> Workspace : default
>>>>>>>>>>> Node : /
>>>>>>>>>>>
>>>>>>>>>>> I looked at your paper ("Semantic Content Management with Apache
>>>>>>>>>>> Stanbol") and saw that you used jackrabbit in the demo, too. Is
>>>>>>>>>>> there some
>>>>>>>>>>> publicly accessible repository I could use for testing (so
>>>>>>>>>>> that I
>>>>>>>>>>> see what
>>>>>>>>>>> the path I have to specify looks like in a working example)?
>>>>>>>>>>>
>>>>>>>>>>> best,
>>>>>>>>>>> melanie
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>
Re: cmsadapter STANBOL-727
Posted by Suat Gonul <su...@gmail.com>.
Hi Melanie,
I think the "http://lnv-89012.dfki.uni-sb.de:9002/server/default/test"
is the dereferencable URL of your resources. However, CMS Adapter
processes the actual paths of content repository items within the
repository. So, could you please just configuring the path just with the
"/test" value?
Best,
Suat
On 10/2/2012 12:22 PM, Melanie Reiplinger wrote:
> Hi Suat,
>
> it seems the path that I specified is wrong.
> I'm presently using
> "http://lnv-89012.dfki.uni-sb.de:9002/server/default/test", because
> that's where my test nodes are located within the repo. But the logs
> say its an invalid path.
>
> 02.10.2012 12:13:33.153 *INFO* [CM Event Dispatcher (Fire
> ConfigurationEvent:
> pid=org.apache.stanbol.cmsadapter.core.mapping.DefaultRDFBridgeImpl.92bdd0c3-49ad-482d-a6fd-11e7ed3d5048)]
> org.apache.stanbol.cmsadapter.core Service
> [org.apache.stanbol.cmsadapter.core.mapping.DefaultRDFBridgeImpl,176]
> ServiceEvent UNREGISTERING
> 02.10.2012 12:13:33.175 *INFO* [CM Event Dispatcher (Fire
> ConfigurationEvent:
> pid=org.apache.stanbol.cmsadapter.core.mapping.DefaultRDFBridgeImpl.92bdd0c3-49ad-482d-a6fd-11e7ed3d5048)]
> org.apache.stanbol.cmsadapter.core Service
> [org.apache.stanbol.cmsadapter.core.mapping.DefaultRDFBridgeImpl.92bdd0c3-49ad-482d-a6fd-11e7ed3d5048,235]
> ServiceEvent REGISTERED
> 02.10.2012 12:14:00.126 *WARN* [11888397@qtp-25389802-160]
> org.apache.stanbol.cmsadapter.jcr.mapping.JCRRDFMapper Failed to
> retrieve node having path:
> http://lnv-89012.dfki.uni-sb.de:9002/server/default/test or its children
> 02.10.2012 12:14:00.127 *WARN* [11888397@qtp-25389802-160]
> org.apache.stanbol.cmsadapter.web.resources.RDFMapperResource Error
> while generating RDF from repository
> org.apache.stanbol.cmsadapter.servicesapi.mapping.RDFBridgeException:
> Failed to node having path:
> http://lnv-89012.dfki.uni-sb.de:9002/server/default/test or its children
> at
> org.apache.stanbol.cmsadapter.jcr.mapping.JCRRDFMapper.generateRDFFromRepository(JCRRDFMapper.java:337)
> at
> org.apache.stanbol.cmsadapter.core.mapping.RDFBridgeManager.generateRDFFromRepository(RDFBridgeManager.java:199)
> at
> org.apache.stanbol.cmsadapter.core.mapping.RDFBridgeManager.generateRDFFromRepository(RDFBridgeManager.java:167)
> at
> org.apache.stanbol.cmsadapter.web.resources.RDFMapperResource.mapRepositoryToRDF(RDFMapperResource.java:276)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:616)
> at
> com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
> at
> com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
> at
> com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
> at
> com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
> at
> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
> at
> com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
> at
> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
> at
> com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
> at
> com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1483)
> at
> com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1414)
> at
> com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1363)
> at
> com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1353)
> at
> com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:414)
> at
> com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
> at
> com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:708)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> at
> org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(ServletHandler.java:96)
> at
> org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:79)
> at
> org.apache.felix.http.base.internal.dispatch.ServletPipeline.handle(ServletPipeline.java:42)
> at
> org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:49)
> at
> org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33)
> at
> org.apache.stanbol.commons.security.auth.AuthenticatingFilter$1.run(AuthenticatingFilter.java:157)
> at java.security.AccessController.doPrivileged(Native Method)
> at javax.security.auth.Subject.doAsPrivileged(Subject.java:537)
> at
> org.apache.stanbol.commons.security.auth.AuthenticatingFilter.doFilter(AuthenticatingFilter.java:153)
> at
> org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:88)
> at
> org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:76)
> at
> org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:47)
> at
> org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33)
> at
> org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:78)
> at
> org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:47)
> at
> org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33)
> at
> org.apache.stanbol.commons.httpqueryheaders.impl.QueryHeadersFilter.doFilter(QueryHeadersFilter.java:75)
> at
> org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:88)
> at
> org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:76)
> at
> org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:47)
> at
> org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33)
> at
> org.apache.felix.http.base.internal.dispatch.FilterPipeline.dispatch(FilterPipeline.java:48)
> at
> org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:39)
> at
> org.apache.felix.http.base.internal.DispatcherServlet.service(DispatcherServlet.java:67)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> at
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
> at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
> at
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
> at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
> at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
> at org.mortbay.jetty.Server.handle(Server.java:326)
> at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
> at
> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:943)
> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
> at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
> at
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
> at
> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
> Caused by: javax.jcr.RepositoryException: Invalid
> path:http://lnv-89012.dfki.uni-sb.de:9002/server/default/test
> at
> org.apache.jackrabbit.rmi.server.ServerObject.getRepositoryException(ServerObject.java:145)
> at
> org.apache.jackrabbit.rmi.server.ServerSession.getNode(ServerSession.java:216)
> at sun.reflect.GeneratedMethodAccessor221.invoke(Unknown Source)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:616)
> at
> sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)
> at sun.rmi.transport.Transport$1.run(Transport.java:177)
> at java.security.AccessController.doPrivileged(Native Method)
> at sun.rmi.transport.Transport.serviceCall(Transport.java:173)
> at
> sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:553)
> at
> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:808)
> at
> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:667)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:679)
> at
> sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:273)
> at
> sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:251)
> at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:160)
> at
> org.apache.jackrabbit.rmi.server.ServerXASession_Stub.getNode(Unknown
> Source)
> at
> org.apache.jackrabbit.rmi.client.ClientSession.getNode(ClientSession.java:209)
> at
> org.apache.stanbol.cmsadapter.jcr.mapping.JCRRDFMapper.generateRDFFromRepository(JCRRDFMapper.java:334)
> ... 61 more
>
>
> Am 02.10.2012 10:47, schrieb Suat Gönül:
>> Hi Melanie,
>>
>> Currently that service works for me. Are you configuring a path from the
>> Felix Configuration console i.e {stanbol_host}/system/console/configMgr
>> through the "Apache Stanbol CMS Adapter Default RDF Bridge
>> Configurations"
>> item? You should specify a valid "Content Repository Path" there. If you
>> already do so, could you send the error log?
>>
>> Best,
>> Suat
>>
>>
>> On Mon, Oct 1, 2012 at 12:59 PM, Melanie Reiplinger <
>> melanie.reiplinger@dfki.de> wrote:
>>
>>> Hi Suat,
>>>
>>> thank you. After a rebuild, I got it working, I can now delete items
>>> via
>>> CORS and the cmsadapter/contenthubfeed. :-)
>>>
>>> Now there is one more thing on the cmsadapter that does not work for
>>> me,
>>> the mapping from a repository unto RDF. I keep getting a 500 Internal
>>> Server Error.
>>> You already told me that I should be able to specify any URI as
>>> baseURI,
>>> but whatever I pass, it's the 500.
>>> Does it work for you when you test it?
>>>
>>> Best,
>>> Melanie
>>>
>>>
>>> Am 25.09.2012 16:48, schrieb Suat Gonul:
>>>
>>>> Hi Melanie,
>>>>
>>>> It seems I had overlooked the DELETE value for the
>>>> Access-Control-Allow-Methods header. Now, you should be able to
>>>> execute
>>>> CORS request for the DELETE method.
>>>>
>>>> Best,
>>>> Suat
>>>>
>>>
>
>
Re: cmsadapter STANBOL-727
Posted by Melanie Reiplinger <me...@dfki.de>.
Hi Suat,
it seems the path that I specified is wrong.
I'm presently using
"http://lnv-89012.dfki.uni-sb.de:9002/server/default/test", because
that's where my test nodes are located within the repo. But the logs say
its an invalid path.
02.10.2012 12:13:33.153 *INFO* [CM Event Dispatcher (Fire
ConfigurationEvent:
pid=org.apache.stanbol.cmsadapter.core.mapping.DefaultRDFBridgeImpl.92bdd0c3-49ad-482d-a6fd-11e7ed3d5048)]
org.apache.stanbol.cmsadapter.core Service
[org.apache.stanbol.cmsadapter.core.mapping.DefaultRDFBridgeImpl,176]
ServiceEvent UNREGISTERING
02.10.2012 12:13:33.175 *INFO* [CM Event Dispatcher (Fire
ConfigurationEvent:
pid=org.apache.stanbol.cmsadapter.core.mapping.DefaultRDFBridgeImpl.92bdd0c3-49ad-482d-a6fd-11e7ed3d5048)]
org.apache.stanbol.cmsadapter.core Service
[org.apache.stanbol.cmsadapter.core.mapping.DefaultRDFBridgeImpl.92bdd0c3-49ad-482d-a6fd-11e7ed3d5048,235]
ServiceEvent REGISTERED
02.10.2012 12:14:00.126 *WARN* [11888397@qtp-25389802-160]
org.apache.stanbol.cmsadapter.jcr.mapping.JCRRDFMapper Failed to
retrieve node having path:
http://lnv-89012.dfki.uni-sb.de:9002/server/default/test or its children
02.10.2012 12:14:00.127 *WARN* [11888397@qtp-25389802-160]
org.apache.stanbol.cmsadapter.web.resources.RDFMapperResource Error
while generating RDF from repository
org.apache.stanbol.cmsadapter.servicesapi.mapping.RDFBridgeException:
Failed to node having path:
http://lnv-89012.dfki.uni-sb.de:9002/server/default/test or its children
at
org.apache.stanbol.cmsadapter.jcr.mapping.JCRRDFMapper.generateRDFFromRepository(JCRRDFMapper.java:337)
at
org.apache.stanbol.cmsadapter.core.mapping.RDFBridgeManager.generateRDFFromRepository(RDFBridgeManager.java:199)
at
org.apache.stanbol.cmsadapter.core.mapping.RDFBridgeManager.generateRDFFromRepository(RDFBridgeManager.java:167)
at
org.apache.stanbol.cmsadapter.web.resources.RDFMapperResource.mapRepositoryToRDF(RDFMapperResource.java:276)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at
com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
at
com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
at
com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
at
com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
at
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at
com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
at
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at
com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
at
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1483)
at
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1414)
at
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1363)
at
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1353)
at
com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:414)
at
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
at
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:708)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at
org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(ServletHandler.java:96)
at
org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:79)
at
org.apache.felix.http.base.internal.dispatch.ServletPipeline.handle(ServletPipeline.java:42)
at
org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:49)
at
org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33)
at
org.apache.stanbol.commons.security.auth.AuthenticatingFilter$1.run(AuthenticatingFilter.java:157)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:537)
at
org.apache.stanbol.commons.security.auth.AuthenticatingFilter.doFilter(AuthenticatingFilter.java:153)
at
org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:88)
at
org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:76)
at
org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:47)
at
org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33)
at
org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:78)
at
org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:47)
at
org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33)
at
org.apache.stanbol.commons.httpqueryheaders.impl.QueryHeadersFilter.doFilter(QueryHeadersFilter.java:75)
at
org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:88)
at
org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:76)
at
org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:47)
at
org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33)
at
org.apache.felix.http.base.internal.dispatch.FilterPipeline.dispatch(FilterPipeline.java:48)
at
org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:39)
at
org.apache.felix.http.base.internal.DispatcherServlet.service(DispatcherServlet.java:67)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:943)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Caused by: javax.jcr.RepositoryException: Invalid
path:http://lnv-89012.dfki.uni-sb.de:9002/server/default/test
at
org.apache.jackrabbit.rmi.server.ServerObject.getRepositoryException(ServerObject.java:145)
at
org.apache.jackrabbit.rmi.server.ServerSession.getNode(ServerSession.java:216)
at sun.reflect.GeneratedMethodAccessor221.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)
at sun.rmi.transport.Transport$1.run(Transport.java:177)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:173)
at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:553)
at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:808)
at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:667)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:679)
at
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:273)
at
sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:251)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:160)
at
org.apache.jackrabbit.rmi.server.ServerXASession_Stub.getNode(Unknown
Source)
at
org.apache.jackrabbit.rmi.client.ClientSession.getNode(ClientSession.java:209)
at
org.apache.stanbol.cmsadapter.jcr.mapping.JCRRDFMapper.generateRDFFromRepository(JCRRDFMapper.java:334)
... 61 more
Am 02.10.2012 10:47, schrieb Suat Gönül:
> Hi Melanie,
>
> Currently that service works for me. Are you configuring a path from the
> Felix Configuration console i.e {stanbol_host}/system/console/configMgr
> through the "Apache Stanbol CMS Adapter Default RDF Bridge Configurations"
> item? You should specify a valid "Content Repository Path" there. If you
> already do so, could you send the error log?
>
> Best,
> Suat
>
>
> On Mon, Oct 1, 2012 at 12:59 PM, Melanie Reiplinger <
> melanie.reiplinger@dfki.de> wrote:
>
>> Hi Suat,
>>
>> thank you. After a rebuild, I got it working, I can now delete items via
>> CORS and the cmsadapter/contenthubfeed. :-)
>>
>> Now there is one more thing on the cmsadapter that does not work for me,
>> the mapping from a repository unto RDF. I keep getting a 500 Internal
>> Server Error.
>> You already told me that I should be able to specify any URI as baseURI,
>> but whatever I pass, it's the 500.
>> Does it work for you when you test it?
>>
>> Best,
>> Melanie
>>
>>
>> Am 25.09.2012 16:48, schrieb Suat Gonul:
>>
>>> Hi Melanie,
>>>
>>> It seems I had overlooked the DELETE value for the
>>> Access-Control-Allow-Methods header. Now, you should be able to execute
>>> CORS request for the DELETE method.
>>>
>>> Best,
>>> Suat
>>>
>>
Re: cmsadapter STANBOL-727
Posted by Suat Gönül <su...@gmail.com>.
Hi Melanie,
Currently that service works for me. Are you configuring a path from the
Felix Configuration console i.e {stanbol_host}/system/console/configMgr
through the "Apache Stanbol CMS Adapter Default RDF Bridge Configurations"
item? You should specify a valid "Content Repository Path" there. If you
already do so, could you send the error log?
Best,
Suat
On Mon, Oct 1, 2012 at 12:59 PM, Melanie Reiplinger <
melanie.reiplinger@dfki.de> wrote:
> Hi Suat,
>
> thank you. After a rebuild, I got it working, I can now delete items via
> CORS and the cmsadapter/contenthubfeed. :-)
>
> Now there is one more thing on the cmsadapter that does not work for me,
> the mapping from a repository unto RDF. I keep getting a 500 Internal
> Server Error.
> You already told me that I should be able to specify any URI as baseURI,
> but whatever I pass, it's the 500.
> Does it work for you when you test it?
>
> Best,
> Melanie
>
>
> Am 25.09.2012 16:48, schrieb Suat Gonul:
>
>> Hi Melanie,
>>
>> It seems I had overlooked the DELETE value for the
>> Access-Control-Allow-Methods header. Now, you should be able to execute
>> CORS request for the DELETE method.
>>
>> Best,
>> Suat
>>
>
>
Re: cmsadapter STANBOL-727
Posted by Melanie Reiplinger <me...@dfki.de>.
Hi Suat,
thank you. After a rebuild, I got it working, I can now delete items via
CORS and the cmsadapter/contenthubfeed. :-)
Now there is one more thing on the cmsadapter that does not work for me,
the mapping from a repository unto RDF. I keep getting a 500 Internal
Server Error.
You already told me that I should be able to specify any URI as baseURI,
but whatever I pass, it's the 500.
Does it work for you when you test it?
Best,
Melanie
Am 25.09.2012 16:48, schrieb Suat Gonul:
> Hi Melanie,
>
> It seems I had overlooked the DELETE value for the
> Access-Control-Allow-Methods header. Now, you should be able to execute
> CORS request for the DELETE method.
>
> Best,
> Suat
Re: cmsadapter STANBOL-727
Posted by Suat Gonul <su...@gmail.com>.
Hi Melanie,
It seems I had overlooked the DELETE value for the
Access-Control-Allow-Methods header. Now, you should be able to execute
CORS request for the DELETE method.
Best,
Suat
On 09/25/2012 11:02 AM, Melanie Reiplinger wrote:
> Hi Suat,
>
> after a fresh checkout on the re-located source, I can delete items
> via the REST interface. But when trying from jQuery, I can't get
> through. Is it possible that CORS access has to be granted yet for the
> CMSadapter? The Access-Control-Allow-Methods in the response header
> seems to only contain GET, POST, and OPTIONS. I get 'Method DELETE is
> not allowed by Access-Control-Allow-Methods'.
>
> Best,
> Melanie
>
> Am 17.09.2012 12:17, schrieb Suat Gonul:
>> Hi Melanie,
>>
>> Yes, it was working for me. Please note that you should rebuild the
>> Entityhub component, since the issue was related with the Entityhub, to
>> test the deletion operation.
>>
>> Best,
>> Suat
>>
>> On 09/17/2012 12:42 PM, Melanie Reiplinger wrote:
>>> Hi Suat,
>>>
>>> I see that https://issues.apache.org/jira/browse/STANBOL-727 is
>>> solved. Does the deletion of repository items on the
>>> cmsadapter/contenthubfeed work for you now?
>>>
>>> Best,
>>> Melanie
>>>
>>>
>>> Am 31.08.2012 14:27, schrieb Suat Gönül:
>>>> Hi Melanie,
>>>>
>>>> The deletion problems seems to be related with the bug described in
>>>> STANBOL-727. Could you please retry after that bug is fixed?
>>>>
>>>> Best,
>>>> Suat
>>>>
>>>> On Thu, Aug 30, 2012 at 1:00 PM, Melanie Reiplinger <
>>>> melanie.reiplinger@dfki.de> wrote:
>>>>
>>>>> Hi Suat,
>>>>>
>>>>> thank you a lot for demonstrating this. It seems my mistake was that
>>>>> I did
>>>>> not associate files with the nodes. For no specific reason I assumed
>>>>> that
>>>>> files would be created when the nodes were created. But then I guess
>>>>> that
>>>>> usually, it's the other way around: when building a repo, the
>>>>> files are
>>>>> already there and are then are used to build up the tree.
>>>>>
>>>>> Now how do you delete your 2 content items from the contenthub? The
>>>>> documentation says it's the very same syntax as for submitting
>>>>> items, just
>>>>> using DELETE instead of POST, but that gives me a Bad Request with
>>>>> java.lang.**IllegalArgumentException: No content found for any of the
>>>>> following parameters [entity, content].
>>>>> It does also not work in the REST interface.
>>>>>
>>>>> Best,
>>>>> Melanie
>>>>>
>>>>>
>>>>> Am 27.08.2012 13:42, schrieb Suat Gonul:
>>>>>
>>>>> Hi Melanie,
>>>>>> It is true that a content repo is needed to run unit tests.
>>>>>> Anyway, I
>>>>>> tested the Jackrabbit and I shall share the steps with you. I hope
>>>>>> they
>>>>>> would work for you too.
>>>>>>
>>>>>> First of all, I was able to create nodes in Jackrabbit through
>>>>>> the JCR
>>>>>> API.
>>>>>>
>>>>>> - I ran the jackrabbit-standalone-2.4.2.**jar on the 8080 port.
>>>>>> - Then created temporary nodes with the following code below. The
>>>>>> code
>>>>>> create two nodes to be submitted to the Contenthub under the "test"
>>>>>> path. The nodes are associated with two files from the local file
>>>>>> system. So, you should adapt the file paths. 3 external libraries
>>>>>> are
>>>>>> required to run this code: jackrabbit-jcr-rmi-2.2.*.jar,
>>>>>> jcr-2.0.jar and
>>>>>> slf4j-api-*.jar. They are already downloaded when you build Stanbol
>>>>>> into
>>>>>> the maven repository i.e the .m2 folder.
>>>>>>
>>>>>>
>>>>>> Repository repository = new URLRemoteRepository(
>>>>>> "http://localhost:8080/rmi");
>>>>>> Session session = repository.login(new
>>>>>> SimpleCredentials("admin",
>>>>>> "admin".toCharArray()));
>>>>>>
>>>>>> Node testNode = null;
>>>>>> try {
>>>>>> testNode = session.getNode("/test");
>>>>>> testNode.remove();
>>>>>> } catch (PathNotFoundException e) {
>>>>>> // ignore
>>>>>> }
>>>>>> Node rootNode = session.getRootNode();
>>>>>> testNode = rootNode.addNode("test");
>>>>>>
>>>>>> File f = new File(
>>>>>>
>>>>>> "/home/suat/Desktop/**technicalStuff/stanbolTests/**
>>>>>> cmsAdapter/jackrabbit/news1.**txt");
>>>>>> Node newsNode = testNode.addNode(f.getName(), "nt:file");
>>>>>> Node resourceNode = newsNode.addNode("jcr:content"**,
>>>>>> "nt:resource");
>>>>>> resourceNode.setProperty("jcr:**mimeType", "text/plain");
>>>>>> Binary binary = session.getValueFactory().**createBinary(
>>>>>> new FileInputStream(f));
>>>>>> resourceNode.setProperty("jcr:**data", binary);
>>>>>>
>>>>>> f = new File(
>>>>>>
>>>>>> "/home/suat/Desktop/**technicalStuff/stanbolTests/**
>>>>>> cmsAdapter/jackrabbit/news2.**txt");
>>>>>> newsNode = testNode.addNode(f.getName(), "nt:file");
>>>>>> resourceNode = newsNode.addNode("jcr:content"**,
>>>>>> "nt:resource");
>>>>>> resourceNode.setProperty("jcr:**mimeType", "text/plain");
>>>>>> binary = session.getValueFactory().**createBinary(new
>>>>>> FileInputStream(f));
>>>>>> resourceNode.setProperty("jcr:**data", binary);
>>>>>> session.save();
>>>>>>
>>>>>> - I ran the Stanbol on 8081 and executed the following commands:
>>>>>> - curl -X GET -H "Accept: text/plain"
>>>>>> "http://localhost:8081/**cmsadapter/session?**repositoryURL=http://**
>>>>>>
>>>>>> localhost:8080/rmi&username=**admin&password=admin&**connectionType=JCR<http://localhost:8081/cmsadapter/session?repositoryURL=http://localhost:8080/rmi&username=admin&password=admin&connectionType=JCR>
>>>>>>
>>>>>>
>>>>>> "
>>>>>> - curl -i -X POST --data
>>>>>> "sessionKey=e92be985-e722-**419f-a1ad-5fe02628b537&path=/**
>>>>>> test&recursive=true"
>>>>>> http://localhost:8081/**cmsadapter/contenthubfeed<http://localhost:8081/cmsadapter/contenthubfeed>
>>>>>>
>>>>>>
>>>>>>
>>>>>> In the second command the result of the first command should be
>>>>>> used.
>>>>>> After executing these commands, I was able to see documents on
>>>>>> http://localhost:8081/**contenthub/contenthub/store<http://localhost:8081/contenthub/contenthub/store>
>>>>>>
>>>>>>
>>>>>> .
>>>>>>
>>>>>> Best,
>>>>>> Suat
>>>>>>
>>>>>>
>>>>>>
>>>>>> On 08/20/2012 01:11 PM, Melanie Reiplinger wrote:
>>>>>>
>>>>>>> Hi Suat,
>>>>>>>
>>>>>>> Thanks for your reply.
>>>>>>>
>>>>>>>
>>>>>>> Am 20.08.2012 11:55, schrieb Suat Gönül:
>>>>>>>
>>>>>>>> Hi Melanie,
>>>>>>>>
>>>>>>>> Sorry, I could not answer you as I was in holiday. I will start to
>>>>>>>> work on
>>>>>>>> August 27. In my demonstration, I was using CRX CMS.
>>>>>>>>
>>>>>>> That seems to be commercial software. I Cannot use that. So I'll
>>>>>>> have
>>>>>>> to find another way. Under these conditions, I'm not even sure it
>>>>>>> makes much sense to create unit tests for the JavaScript
>>>>>>> interface to
>>>>>>> the cmsadapter, since whoever wanted to run them would need to
>>>>>>> have a
>>>>>>> content repo locally installed to connect stanbol to it. It makes
>>>>>>> sense only if I could set up (or use) a remote repo that's
>>>>>>> accessible
>>>>>>> from wherever the test script is called...
>>>>>>>
>>>>>>> Best,
>>>>>>> Melanie
>>>>>>>
>>>>>>> But to connect CRX, I
>>>>>>>> have and additional bundle to be added to the OSGi environment. I
>>>>>>>> can
>>>>>>>> provide you that bundle when I'm back.
>>>>>>>>
>>>>>>>> I did not access to the repo via HTTP. In my demonstration, a
>>>>>>>> session is
>>>>>>>> obtained together with a session key after giving the necessary
>>>>>>>> credentials
>>>>>>>> e.g username, password, rmi endpoint. And that session key is
>>>>>>>> used by
>>>>>>>> CMS
>>>>>>>> Adapter to access to the repo.
>>>>>>>>
>>>>>>>> Best,
>>>>>>>> Suat
>>>>>>>>
>>>>>>>> On Mon, Aug 20, 2012 at 12:11 PM, Melanie Reiplinger <
>>>>>>>> melanie.reiplinger@dfki.de> wrote:
>>>>>>>>
>>>>>>>> Hi Suat,
>>>>>>>>> I cannot access my jackrabbit repo via xmlhttp either (although
>>>>>>>>> curl
>>>>>>>>> works
>>>>>>>>> fine), so this might as well be a CORS access problem. In your
>>>>>>>>> demo,
>>>>>>>>> did
>>>>>>>>> you have to somehow provide access to the repo (by setting
>>>>>>>>> headers
>>>>>>>>> etc)?
>>>>>>>>>
>>>>>>>>> Best,
>>>>>>>>> Melanie
>>>>>>>>>
>>>>>>>>> Am 15.08.2012 11:15, schrieb Melanie Reiplinger:
>>>>>>>>>
>>>>>>>>> Hi Suat,
>>>>>>>>>
>>>>>>>>>> Am 13.08.2012 13:35, schrieb Suat Gonul:
>>>>>>>>>>
>>>>>>>>>> In any case, I guess that you
>>>>>>>>>>> need to configure a RDF Bridge through the
>>>>>>>>>>> {stanbol}/system/console/****configMgr interface. There you
>>>>>>>>>>> should
>>>>>>>>>>> find
>>>>>>>>>>> the
>>>>>>>>>>> "Apache Stanbol CMS Adapter Default RDF Bridge
>>>>>>>>>>> Configurations". In
>>>>>>>>>>> that
>>>>>>>>>>> configuration you specify the root path in the CMS to be
>>>>>>>>>>> exported
>>>>>>>>>>> to the
>>>>>>>>>>> RDF.
>>>>>>>>>>>
>>>>>>>>>>> by that you mean the content repository path? This means
>>>>>>>>>>> that I set
>>>>>>>>>>>> there the path to my content repository?
>>>>>>>>>>>>
>>>>>>>>>>>> Yes, you set there a path residing in the content
>>>>>>>>>>>> repository.
>>>>>>>>>>> I have set up a jackrabbit workspace with some toy nodes
>>>>>>>>>>> in it. To
>>>>>>>>>>>
>>>>>>>>>>>> access it remotely, I'd configure something like
>>>>>>>>>>>> http://[myserver]/server/
>>>>>>>>>>>> <http://lnv-89012.dfki.uni-sb.****de:9002/server/default/**node1<
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> http://lnv-89012.dfki.**uni-sb.de:9002/server/default/**node1<http://lnv-89012.dfki.uni-sb.de:9002/server/default/node1>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>>> ,
>>>>>>>>>>>> but then
>>>>>>>>>>>> I can work with this repository exclusively, right?
>>>>>>>>>>>>
>>>>>>>>>>>> I cannot access the URL you gave, but I guess you
>>>>>>>>>>>> should give
>>>>>>>>>>> /node1
>>>>>>>>>>> path to export it as RDF. I didn't get your question about
>>>>>>>>>>> working
>>>>>>>>>>> exclusively with the repository. But, you already seem to work
>>>>>>>>>>> on the
>>>>>>>>>>> default repository of Jackrabbit running on your server.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> I tried with several paths, none will work.
>>>>>>>>>> My remote repository stub is
>>>>>>>>>> http://lnv-89012.dfki.uni-sb.****de:9002/rmi<http://lnv-89012.**
>>>>>>>>>> dfki.uni-sb.de:9002/rmi
>>>>>>>>>> <http://lnv-89012.dfki.uni-sb.de:9002/rmi>>
>>>>>>>>>> .
>>>>>>>>>> (you cannot access those URIs because they are in a closed
>>>>>>>>>> network)
>>>>>>>>>> For accessing the content repository, I should use (according
>>>>>>>>>> to my
>>>>>>>>>> jackrabbit guidelines):
>>>>>>>>>> http://lnv-89012.dfki.uni-sb.****de:9002/server<http://lnv-**
>>>>>>>>>> 89012.dfki.uni-sb.de:9002/**server<http://lnv-89012.dfki.uni-sb.de:9002/server>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> to
>>>>>>>>>> access all workspaces of myJCR repository
>>>>>>>>>> http://lnv-89012.dfki.uni-sb.****de:9002/server/default/jcr:****
>>>>>>>>>> rootto<http://lnv-89012.dfki.**uni-sb.de:9002/server/default/**
>>>>>>>>>> jcr:rootto<http://lnv-89012.dfki.uni-sb.de:9002/server/default/jcr:rootto>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> access
>>>>>>>>>> a single workspace (example with workspace named 'default'). ->
>>>>>>>>>> this
>>>>>>>>>> one is also where I can navigate to with my browser, so this
>>>>>>>>>> should
>>>>>>>>>> then be
>>>>>>>>>> the correct path I guess.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> But I always get the same error about
>>>>>>>>>> org.apache.stanbol.cmsadapter.****jcr.mapping.JCRRDFMapper
>>>>>>>>>> Failed to
>>>>>>>>>> retrieve node having path: <thePath> or its childr
>>>>>>>>>>
>>>>>>>>>> I'm an absolute beginner with content repositories, using
>>>>>>>>>> jackrabbit for
>>>>>>>>>> the first time and I'm really unsure of what would have to
>>>>>>>>>> work if
>>>>>>>>>> everything was correct, but I can see my repository in the
>>>>>>>>>> jackrabbit
>>>>>>>>>> console and I also can see that my nodes are existing, and the
>>>>>>>>>> info
>>>>>>>>>> command
>>>>>>>>>> tells me that everything looks like I would expect:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Repository:
>>>>>>>>>> http://lnv-89012.dfki.uni-sb.****de:9002/rmi<http://lnv-89012.**
>>>>>>>>>> dfki.uni-sb.de:9002/rmi
>>>>>>>>>> <http://lnv-89012.dfki.uni-sb.de:9002/rmi>>
>>>>>>>>>> User : admin
>>>>>>>>>> Workspace : default
>>>>>>>>>> Node : /
>>>>>>>>>>
>>>>>>>>>> I looked at your paper ("Semantic Content Management with Apache
>>>>>>>>>> Stanbol") and saw that you used jackrabbit in the demo, too. Is
>>>>>>>>>> there some
>>>>>>>>>> publicly accessible repository I could use for testing (so
>>>>>>>>>> that I
>>>>>>>>>> see what
>>>>>>>>>> the path I have to specify looks like in a working example)?
>>>>>>>>>>
>>>>>>>>>> best,
>>>>>>>>>> melanie
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>
>
>
Re: cmsadapter STANBOL-727
Posted by Melanie Reiplinger <me...@dfki.de>.
Hi Suat,
after a fresh checkout on the re-located source, I can delete items via
the REST interface. But when trying from jQuery, I can't get through. Is
it possible that CORS access has to be granted yet for the CMSadapter?
The Access-Control-Allow-Methods in the response header seems to only
contain GET, POST, and OPTIONS. I get 'Method DELETE is not allowed by
Access-Control-Allow-Methods'.
Best,
Melanie
Am 17.09.2012 12:17, schrieb Suat Gonul:
> Hi Melanie,
>
> Yes, it was working for me. Please note that you should rebuild the
> Entityhub component, since the issue was related with the Entityhub, to
> test the deletion operation.
>
> Best,
> Suat
>
> On 09/17/2012 12:42 PM, Melanie Reiplinger wrote:
>> Hi Suat,
>>
>> I see that https://issues.apache.org/jira/browse/STANBOL-727 is
>> solved. Does the deletion of repository items on the
>> cmsadapter/contenthubfeed work for you now?
>>
>> Best,
>> Melanie
>>
>>
>> Am 31.08.2012 14:27, schrieb Suat Gönül:
>>> Hi Melanie,
>>>
>>> The deletion problems seems to be related with the bug described in
>>> STANBOL-727. Could you please retry after that bug is fixed?
>>>
>>> Best,
>>> Suat
>>>
>>> On Thu, Aug 30, 2012 at 1:00 PM, Melanie Reiplinger <
>>> melanie.reiplinger@dfki.de> wrote:
>>>
>>>> Hi Suat,
>>>>
>>>> thank you a lot for demonstrating this. It seems my mistake was that
>>>> I did
>>>> not associate files with the nodes. For no specific reason I assumed
>>>> that
>>>> files would be created when the nodes were created. But then I guess
>>>> that
>>>> usually, it's the other way around: when building a repo, the files are
>>>> already there and are then are used to build up the tree.
>>>>
>>>> Now how do you delete your 2 content items from the contenthub? The
>>>> documentation says it's the very same syntax as for submitting
>>>> items, just
>>>> using DELETE instead of POST, but that gives me a Bad Request with
>>>> java.lang.**IllegalArgumentException: No content found for any of the
>>>> following parameters [entity, content].
>>>> It does also not work in the REST interface.
>>>>
>>>> Best,
>>>> Melanie
>>>>
>>>>
>>>> Am 27.08.2012 13:42, schrieb Suat Gonul:
>>>>
>>>> Hi Melanie,
>>>>> It is true that a content repo is needed to run unit tests. Anyway, I
>>>>> tested the Jackrabbit and I shall share the steps with you. I hope
>>>>> they
>>>>> would work for you too.
>>>>>
>>>>> First of all, I was able to create nodes in Jackrabbit through the JCR
>>>>> API.
>>>>>
>>>>> - I ran the jackrabbit-standalone-2.4.2.**jar on the 8080 port.
>>>>> - Then created temporary nodes with the following code below. The code
>>>>> create two nodes to be submitted to the Contenthub under the "test"
>>>>> path. The nodes are associated with two files from the local file
>>>>> system. So, you should adapt the file paths. 3 external libraries are
>>>>> required to run this code: jackrabbit-jcr-rmi-2.2.*.jar,
>>>>> jcr-2.0.jar and
>>>>> slf4j-api-*.jar. They are already downloaded when you build Stanbol
>>>>> into
>>>>> the maven repository i.e the .m2 folder.
>>>>>
>>>>>
>>>>> Repository repository = new URLRemoteRepository(
>>>>> "http://localhost:8080/rmi");
>>>>> Session session = repository.login(new
>>>>> SimpleCredentials("admin",
>>>>> "admin".toCharArray()));
>>>>>
>>>>> Node testNode = null;
>>>>> try {
>>>>> testNode = session.getNode("/test");
>>>>> testNode.remove();
>>>>> } catch (PathNotFoundException e) {
>>>>> // ignore
>>>>> }
>>>>> Node rootNode = session.getRootNode();
>>>>> testNode = rootNode.addNode("test");
>>>>>
>>>>> File f = new File(
>>>>> "/home/suat/Desktop/**technicalStuff/stanbolTests/**
>>>>> cmsAdapter/jackrabbit/news1.**txt");
>>>>> Node newsNode = testNode.addNode(f.getName(), "nt:file");
>>>>> Node resourceNode = newsNode.addNode("jcr:content"**,
>>>>> "nt:resource");
>>>>> resourceNode.setProperty("jcr:**mimeType", "text/plain");
>>>>> Binary binary = session.getValueFactory().**createBinary(
>>>>> new FileInputStream(f));
>>>>> resourceNode.setProperty("jcr:**data", binary);
>>>>>
>>>>> f = new File(
>>>>> "/home/suat/Desktop/**technicalStuff/stanbolTests/**
>>>>> cmsAdapter/jackrabbit/news2.**txt");
>>>>> newsNode = testNode.addNode(f.getName(), "nt:file");
>>>>> resourceNode = newsNode.addNode("jcr:content"**,
>>>>> "nt:resource");
>>>>> resourceNode.setProperty("jcr:**mimeType", "text/plain");
>>>>> binary = session.getValueFactory().**createBinary(new
>>>>> FileInputStream(f));
>>>>> resourceNode.setProperty("jcr:**data", binary);
>>>>> session.save();
>>>>>
>>>>> - I ran the Stanbol on 8081 and executed the following commands:
>>>>> - curl -X GET -H "Accept: text/plain"
>>>>> "http://localhost:8081/**cmsadapter/session?**repositoryURL=http://**
>>>>> localhost:8080/rmi&username=**admin&password=admin&**connectionType=JCR<http://localhost:8081/cmsadapter/session?repositoryURL=http://localhost:8080/rmi&username=admin&password=admin&connectionType=JCR>
>>>>>
>>>>> "
>>>>> - curl -i -X POST --data
>>>>> "sessionKey=e92be985-e722-**419f-a1ad-5fe02628b537&path=/**
>>>>> test&recursive=true"
>>>>> http://localhost:8081/**cmsadapter/contenthubfeed<http://localhost:8081/cmsadapter/contenthubfeed>
>>>>>
>>>>>
>>>>> In the second command the result of the first command should be used.
>>>>> After executing these commands, I was able to see documents on
>>>>> http://localhost:8081/**contenthub/contenthub/store<http://localhost:8081/contenthub/contenthub/store>
>>>>>
>>>>> .
>>>>>
>>>>> Best,
>>>>> Suat
>>>>>
>>>>>
>>>>>
>>>>> On 08/20/2012 01:11 PM, Melanie Reiplinger wrote:
>>>>>
>>>>>> Hi Suat,
>>>>>>
>>>>>> Thanks for your reply.
>>>>>>
>>>>>>
>>>>>> Am 20.08.2012 11:55, schrieb Suat Gönül:
>>>>>>
>>>>>>> Hi Melanie,
>>>>>>>
>>>>>>> Sorry, I could not answer you as I was in holiday. I will start to
>>>>>>> work on
>>>>>>> August 27. In my demonstration, I was using CRX CMS.
>>>>>>>
>>>>>> That seems to be commercial software. I Cannot use that. So I'll have
>>>>>> to find another way. Under these conditions, I'm not even sure it
>>>>>> makes much sense to create unit tests for the JavaScript interface to
>>>>>> the cmsadapter, since whoever wanted to run them would need to have a
>>>>>> content repo locally installed to connect stanbol to it. It makes
>>>>>> sense only if I could set up (or use) a remote repo that's accessible
>>>>>> from wherever the test script is called...
>>>>>>
>>>>>> Best,
>>>>>> Melanie
>>>>>>
>>>>>> But to connect CRX, I
>>>>>>> have and additional bundle to be added to the OSGi environment. I
>>>>>>> can
>>>>>>> provide you that bundle when I'm back.
>>>>>>>
>>>>>>> I did not access to the repo via HTTP. In my demonstration, a
>>>>>>> session is
>>>>>>> obtained together with a session key after giving the necessary
>>>>>>> credentials
>>>>>>> e.g username, password, rmi endpoint. And that session key is
>>>>>>> used by
>>>>>>> CMS
>>>>>>> Adapter to access to the repo.
>>>>>>>
>>>>>>> Best,
>>>>>>> Suat
>>>>>>>
>>>>>>> On Mon, Aug 20, 2012 at 12:11 PM, Melanie Reiplinger <
>>>>>>> melanie.reiplinger@dfki.de> wrote:
>>>>>>>
>>>>>>> Hi Suat,
>>>>>>>> I cannot access my jackrabbit repo via xmlhttp either (although
>>>>>>>> curl
>>>>>>>> works
>>>>>>>> fine), so this might as well be a CORS access problem. In your
>>>>>>>> demo,
>>>>>>>> did
>>>>>>>> you have to somehow provide access to the repo (by setting headers
>>>>>>>> etc)?
>>>>>>>>
>>>>>>>> Best,
>>>>>>>> Melanie
>>>>>>>>
>>>>>>>> Am 15.08.2012 11:15, schrieb Melanie Reiplinger:
>>>>>>>>
>>>>>>>> Hi Suat,
>>>>>>>>
>>>>>>>>> Am 13.08.2012 13:35, schrieb Suat Gonul:
>>>>>>>>>
>>>>>>>>> In any case, I guess that you
>>>>>>>>>> need to configure a RDF Bridge through the
>>>>>>>>>> {stanbol}/system/console/****configMgr interface. There you
>>>>>>>>>> should
>>>>>>>>>> find
>>>>>>>>>> the
>>>>>>>>>> "Apache Stanbol CMS Adapter Default RDF Bridge
>>>>>>>>>> Configurations". In
>>>>>>>>>> that
>>>>>>>>>> configuration you specify the root path in the CMS to be exported
>>>>>>>>>> to the
>>>>>>>>>> RDF.
>>>>>>>>>>
>>>>>>>>>> by that you mean the content repository path? This means
>>>>>>>>>> that I set
>>>>>>>>>>> there the path to my content repository?
>>>>>>>>>>>
>>>>>>>>>>> Yes, you set there a path residing in the content repository.
>>>>>>>>>> I have set up a jackrabbit workspace with some toy nodes
>>>>>>>>>> in it. To
>>>>>>>>>>
>>>>>>>>>>> access it remotely, I'd configure something like
>>>>>>>>>>> http://[myserver]/server/
>>>>>>>>>>> <http://lnv-89012.dfki.uni-sb.****de:9002/server/default/**node1<
>>>>>>>>>>>
>>>>>>>>>>> http://lnv-89012.dfki.**uni-sb.de:9002/server/default/**node1<http://lnv-89012.dfki.uni-sb.de:9002/server/default/node1>
>>>>>>>>>>>
>>>>>>>>>>>>> ,
>>>>>>>>>>> but then
>>>>>>>>>>> I can work with this repository exclusively, right?
>>>>>>>>>>>
>>>>>>>>>>> I cannot access the URL you gave, but I guess you
>>>>>>>>>>> should give
>>>>>>>>>> /node1
>>>>>>>>>> path to export it as RDF. I didn't get your question about
>>>>>>>>>> working
>>>>>>>>>> exclusively with the repository. But, you already seem to work
>>>>>>>>>> on the
>>>>>>>>>> default repository of Jackrabbit running on your server.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> I tried with several paths, none will work.
>>>>>>>>> My remote repository stub is
>>>>>>>>> http://lnv-89012.dfki.uni-sb.****de:9002/rmi<http://lnv-89012.**
>>>>>>>>> dfki.uni-sb.de:9002/rmi
>>>>>>>>> <http://lnv-89012.dfki.uni-sb.de:9002/rmi>>
>>>>>>>>> .
>>>>>>>>> (you cannot access those URIs because they are in a closed
>>>>>>>>> network)
>>>>>>>>> For accessing the content repository, I should use (according
>>>>>>>>> to my
>>>>>>>>> jackrabbit guidelines):
>>>>>>>>> http://lnv-89012.dfki.uni-sb.****de:9002/server<http://lnv-**
>>>>>>>>> 89012.dfki.uni-sb.de:9002/**server<http://lnv-89012.dfki.uni-sb.de:9002/server>
>>>>>>>>>
>>>>>>>>>> to
>>>>>>>>> access all workspaces of myJCR repository
>>>>>>>>> http://lnv-89012.dfki.uni-sb.****de:9002/server/default/jcr:****
>>>>>>>>> rootto<http://lnv-89012.dfki.**uni-sb.de:9002/server/default/**
>>>>>>>>> jcr:rootto<http://lnv-89012.dfki.uni-sb.de:9002/server/default/jcr:rootto>
>>>>>>>>>
>>>>>>>>>> access
>>>>>>>>> a single workspace (example with workspace named 'default'). ->
>>>>>>>>> this
>>>>>>>>> one is also where I can navigate to with my browser, so this
>>>>>>>>> should
>>>>>>>>> then be
>>>>>>>>> the correct path I guess.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> But I always get the same error about
>>>>>>>>> org.apache.stanbol.cmsadapter.****jcr.mapping.JCRRDFMapper
>>>>>>>>> Failed to
>>>>>>>>> retrieve node having path: <thePath> or its childr
>>>>>>>>>
>>>>>>>>> I'm an absolute beginner with content repositories, using
>>>>>>>>> jackrabbit for
>>>>>>>>> the first time and I'm really unsure of what would have to work if
>>>>>>>>> everything was correct, but I can see my repository in the
>>>>>>>>> jackrabbit
>>>>>>>>> console and I also can see that my nodes are existing, and the
>>>>>>>>> info
>>>>>>>>> command
>>>>>>>>> tells me that everything looks like I would expect:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Repository:
>>>>>>>>> http://lnv-89012.dfki.uni-sb.****de:9002/rmi<http://lnv-89012.**
>>>>>>>>> dfki.uni-sb.de:9002/rmi
>>>>>>>>> <http://lnv-89012.dfki.uni-sb.de:9002/rmi>>
>>>>>>>>> User : admin
>>>>>>>>> Workspace : default
>>>>>>>>> Node : /
>>>>>>>>>
>>>>>>>>> I looked at your paper ("Semantic Content Management with Apache
>>>>>>>>> Stanbol") and saw that you used jackrabbit in the demo, too. Is
>>>>>>>>> there some
>>>>>>>>> publicly accessible repository I could use for testing (so that I
>>>>>>>>> see what
>>>>>>>>> the path I have to specify looks like in a working example)?
>>>>>>>>>
>>>>>>>>> best,
>>>>>>>>> melanie
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>
Re: cmsadapter STANBOL-727
Posted by Suat Gonul <su...@gmail.com>.
Hi Melanie,
Yes, it was working for me. Please note that you should rebuild the
Entityhub component, since the issue was related with the Entityhub, to
test the deletion operation.
Best,
Suat
On 09/17/2012 12:42 PM, Melanie Reiplinger wrote:
> Hi Suat,
>
> I see that https://issues.apache.org/jira/browse/STANBOL-727 is
> solved. Does the deletion of repository items on the
> cmsadapter/contenthubfeed work for you now?
>
> Best,
> Melanie
>
>
> Am 31.08.2012 14:27, schrieb Suat Gönül:
>> Hi Melanie,
>>
>> The deletion problems seems to be related with the bug described in
>> STANBOL-727. Could you please retry after that bug is fixed?
>>
>> Best,
>> Suat
>>
>> On Thu, Aug 30, 2012 at 1:00 PM, Melanie Reiplinger <
>> melanie.reiplinger@dfki.de> wrote:
>>
>>> Hi Suat,
>>>
>>> thank you a lot for demonstrating this. It seems my mistake was that
>>> I did
>>> not associate files with the nodes. For no specific reason I assumed
>>> that
>>> files would be created when the nodes were created. But then I guess
>>> that
>>> usually, it's the other way around: when building a repo, the files are
>>> already there and are then are used to build up the tree.
>>>
>>> Now how do you delete your 2 content items from the contenthub? The
>>> documentation says it's the very same syntax as for submitting
>>> items, just
>>> using DELETE instead of POST, but that gives me a Bad Request with
>>> java.lang.**IllegalArgumentException: No content found for any of the
>>> following parameters [entity, content].
>>> It does also not work in the REST interface.
>>>
>>> Best,
>>> Melanie
>>>
>>>
>>> Am 27.08.2012 13:42, schrieb Suat Gonul:
>>>
>>> Hi Melanie,
>>>> It is true that a content repo is needed to run unit tests. Anyway, I
>>>> tested the Jackrabbit and I shall share the steps with you. I hope
>>>> they
>>>> would work for you too.
>>>>
>>>> First of all, I was able to create nodes in Jackrabbit through the JCR
>>>> API.
>>>>
>>>> - I ran the jackrabbit-standalone-2.4.2.**jar on the 8080 port.
>>>> - Then created temporary nodes with the following code below. The code
>>>> create two nodes to be submitted to the Contenthub under the "test"
>>>> path. The nodes are associated with two files from the local file
>>>> system. So, you should adapt the file paths. 3 external libraries are
>>>> required to run this code: jackrabbit-jcr-rmi-2.2.*.jar,
>>>> jcr-2.0.jar and
>>>> slf4j-api-*.jar. They are already downloaded when you build Stanbol
>>>> into
>>>> the maven repository i.e the .m2 folder.
>>>>
>>>>
>>>> Repository repository = new URLRemoteRepository(
>>>> "http://localhost:8080/rmi");
>>>> Session session = repository.login(new
>>>> SimpleCredentials("admin",
>>>> "admin".toCharArray()));
>>>>
>>>> Node testNode = null;
>>>> try {
>>>> testNode = session.getNode("/test");
>>>> testNode.remove();
>>>> } catch (PathNotFoundException e) {
>>>> // ignore
>>>> }
>>>> Node rootNode = session.getRootNode();
>>>> testNode = rootNode.addNode("test");
>>>>
>>>> File f = new File(
>>>> "/home/suat/Desktop/**technicalStuff/stanbolTests/**
>>>> cmsAdapter/jackrabbit/news1.**txt");
>>>> Node newsNode = testNode.addNode(f.getName(), "nt:file");
>>>> Node resourceNode = newsNode.addNode("jcr:content"**,
>>>> "nt:resource");
>>>> resourceNode.setProperty("jcr:**mimeType", "text/plain");
>>>> Binary binary = session.getValueFactory().**createBinary(
>>>> new FileInputStream(f));
>>>> resourceNode.setProperty("jcr:**data", binary);
>>>>
>>>> f = new File(
>>>> "/home/suat/Desktop/**technicalStuff/stanbolTests/**
>>>> cmsAdapter/jackrabbit/news2.**txt");
>>>> newsNode = testNode.addNode(f.getName(), "nt:file");
>>>> resourceNode = newsNode.addNode("jcr:content"**,
>>>> "nt:resource");
>>>> resourceNode.setProperty("jcr:**mimeType", "text/plain");
>>>> binary = session.getValueFactory().**createBinary(new
>>>> FileInputStream(f));
>>>> resourceNode.setProperty("jcr:**data", binary);
>>>> session.save();
>>>>
>>>> - I ran the Stanbol on 8081 and executed the following commands:
>>>> - curl -X GET -H "Accept: text/plain"
>>>> "http://localhost:8081/**cmsadapter/session?**repositoryURL=http://**
>>>> localhost:8080/rmi&username=**admin&password=admin&**connectionType=JCR<http://localhost:8081/cmsadapter/session?repositoryURL=http://localhost:8080/rmi&username=admin&password=admin&connectionType=JCR>
>>>>
>>>> "
>>>> - curl -i -X POST --data
>>>> "sessionKey=e92be985-e722-**419f-a1ad-5fe02628b537&path=/**
>>>> test&recursive=true"
>>>> http://localhost:8081/**cmsadapter/contenthubfeed<http://localhost:8081/cmsadapter/contenthubfeed>
>>>>
>>>>
>>>> In the second command the result of the first command should be used.
>>>> After executing these commands, I was able to see documents on
>>>> http://localhost:8081/**contenthub/contenthub/store<http://localhost:8081/contenthub/contenthub/store>
>>>>
>>>> .
>>>>
>>>> Best,
>>>> Suat
>>>>
>>>>
>>>>
>>>> On 08/20/2012 01:11 PM, Melanie Reiplinger wrote:
>>>>
>>>>> Hi Suat,
>>>>>
>>>>> Thanks for your reply.
>>>>>
>>>>>
>>>>> Am 20.08.2012 11:55, schrieb Suat Gönül:
>>>>>
>>>>>> Hi Melanie,
>>>>>>
>>>>>> Sorry, I could not answer you as I was in holiday. I will start to
>>>>>> work on
>>>>>> August 27. In my demonstration, I was using CRX CMS.
>>>>>>
>>>>> That seems to be commercial software. I Cannot use that. So I'll have
>>>>> to find another way. Under these conditions, I'm not even sure it
>>>>> makes much sense to create unit tests for the JavaScript interface to
>>>>> the cmsadapter, since whoever wanted to run them would need to have a
>>>>> content repo locally installed to connect stanbol to it. It makes
>>>>> sense only if I could set up (or use) a remote repo that's accessible
>>>>> from wherever the test script is called...
>>>>>
>>>>> Best,
>>>>> Melanie
>>>>>
>>>>> But to connect CRX, I
>>>>>> have and additional bundle to be added to the OSGi environment. I
>>>>>> can
>>>>>> provide you that bundle when I'm back.
>>>>>>
>>>>>> I did not access to the repo via HTTP. In my demonstration, a
>>>>>> session is
>>>>>> obtained together with a session key after giving the necessary
>>>>>> credentials
>>>>>> e.g username, password, rmi endpoint. And that session key is
>>>>>> used by
>>>>>> CMS
>>>>>> Adapter to access to the repo.
>>>>>>
>>>>>> Best,
>>>>>> Suat
>>>>>>
>>>>>> On Mon, Aug 20, 2012 at 12:11 PM, Melanie Reiplinger <
>>>>>> melanie.reiplinger@dfki.de> wrote:
>>>>>>
>>>>>> Hi Suat,
>>>>>>> I cannot access my jackrabbit repo via xmlhttp either (although
>>>>>>> curl
>>>>>>> works
>>>>>>> fine), so this might as well be a CORS access problem. In your
>>>>>>> demo,
>>>>>>> did
>>>>>>> you have to somehow provide access to the repo (by setting headers
>>>>>>> etc)?
>>>>>>>
>>>>>>> Best,
>>>>>>> Melanie
>>>>>>>
>>>>>>> Am 15.08.2012 11:15, schrieb Melanie Reiplinger:
>>>>>>>
>>>>>>> Hi Suat,
>>>>>>>
>>>>>>>> Am 13.08.2012 13:35, schrieb Suat Gonul:
>>>>>>>>
>>>>>>>> In any case, I guess that you
>>>>>>>>> need to configure a RDF Bridge through the
>>>>>>>>> {stanbol}/system/console/****configMgr interface. There you
>>>>>>>>> should
>>>>>>>>> find
>>>>>>>>> the
>>>>>>>>> "Apache Stanbol CMS Adapter Default RDF Bridge
>>>>>>>>> Configurations". In
>>>>>>>>> that
>>>>>>>>> configuration you specify the root path in the CMS to be exported
>>>>>>>>> to the
>>>>>>>>> RDF.
>>>>>>>>>
>>>>>>>>> by that you mean the content repository path? This means
>>>>>>>>> that I set
>>>>>>>>>> there the path to my content repository?
>>>>>>>>>>
>>>>>>>>>> Yes, you set there a path residing in the content repository.
>>>>>>>>> I have set up a jackrabbit workspace with some toy nodes
>>>>>>>>> in it. To
>>>>>>>>>
>>>>>>>>>> access it remotely, I'd configure something like
>>>>>>>>>> http://[myserver]/server/
>>>>>>>>>> <http://lnv-89012.dfki.uni-sb.****de:9002/server/default/**node1<
>>>>>>>>>>
>>>>>>>>>> http://lnv-89012.dfki.**uni-sb.de:9002/server/default/**node1<http://lnv-89012.dfki.uni-sb.de:9002/server/default/node1>
>>>>>>>>>>
>>>>>>>>>>>> ,
>>>>>>>>>> but then
>>>>>>>>>> I can work with this repository exclusively, right?
>>>>>>>>>>
>>>>>>>>>> I cannot access the URL you gave, but I guess you
>>>>>>>>>> should give
>>>>>>>>> /node1
>>>>>>>>> path to export it as RDF. I didn't get your question about
>>>>>>>>> working
>>>>>>>>> exclusively with the repository. But, you already seem to work
>>>>>>>>> on the
>>>>>>>>> default repository of Jackrabbit running on your server.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> I tried with several paths, none will work.
>>>>>>>> My remote repository stub is
>>>>>>>> http://lnv-89012.dfki.uni-sb.****de:9002/rmi<http://lnv-89012.**
>>>>>>>> dfki.uni-sb.de:9002/rmi
>>>>>>>> <http://lnv-89012.dfki.uni-sb.de:9002/rmi>>
>>>>>>>> .
>>>>>>>> (you cannot access those URIs because they are in a closed
>>>>>>>> network)
>>>>>>>> For accessing the content repository, I should use (according
>>>>>>>> to my
>>>>>>>> jackrabbit guidelines):
>>>>>>>> http://lnv-89012.dfki.uni-sb.****de:9002/server<http://lnv-**
>>>>>>>> 89012.dfki.uni-sb.de:9002/**server<http://lnv-89012.dfki.uni-sb.de:9002/server>
>>>>>>>>
>>>>>>>>> to
>>>>>>>> access all workspaces of myJCR repository
>>>>>>>> http://lnv-89012.dfki.uni-sb.****de:9002/server/default/jcr:****
>>>>>>>> rootto<http://lnv-89012.dfki.**uni-sb.de:9002/server/default/**
>>>>>>>> jcr:rootto<http://lnv-89012.dfki.uni-sb.de:9002/server/default/jcr:rootto>
>>>>>>>>
>>>>>>>>> access
>>>>>>>> a single workspace (example with workspace named 'default'). ->
>>>>>>>> this
>>>>>>>> one is also where I can navigate to with my browser, so this
>>>>>>>> should
>>>>>>>> then be
>>>>>>>> the correct path I guess.
>>>>>>>>
>>>>>>>>
>>>>>>>> But I always get the same error about
>>>>>>>> org.apache.stanbol.cmsadapter.****jcr.mapping.JCRRDFMapper
>>>>>>>> Failed to
>>>>>>>> retrieve node having path: <thePath> or its childr
>>>>>>>>
>>>>>>>> I'm an absolute beginner with content repositories, using
>>>>>>>> jackrabbit for
>>>>>>>> the first time and I'm really unsure of what would have to work if
>>>>>>>> everything was correct, but I can see my repository in the
>>>>>>>> jackrabbit
>>>>>>>> console and I also can see that my nodes are existing, and the
>>>>>>>> info
>>>>>>>> command
>>>>>>>> tells me that everything looks like I would expect:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Repository:
>>>>>>>> http://lnv-89012.dfki.uni-sb.****de:9002/rmi<http://lnv-89012.**
>>>>>>>> dfki.uni-sb.de:9002/rmi
>>>>>>>> <http://lnv-89012.dfki.uni-sb.de:9002/rmi>>
>>>>>>>> User : admin
>>>>>>>> Workspace : default
>>>>>>>> Node : /
>>>>>>>>
>>>>>>>> I looked at your paper ("Semantic Content Management with Apache
>>>>>>>> Stanbol") and saw that you used jackrabbit in the demo, too. Is
>>>>>>>> there some
>>>>>>>> publicly accessible repository I could use for testing (so that I
>>>>>>>> see what
>>>>>>>> the path I have to specify looks like in a working example)?
>>>>>>>>
>>>>>>>> best,
>>>>>>>> melanie
>>>>>>>>
>>>>>>>>
>>>>>>>>
>
>
Re: cmsadapter STANBOL-727
Posted by Melanie Reiplinger <me...@dfki.de>.
Hi Suat,
I see that https://issues.apache.org/jira/browse/STANBOL-727 is solved.
Does the deletion of repository items on the cmsadapter/contenthubfeed
work for you now?
Best,
Melanie
Am 31.08.2012 14:27, schrieb Suat Gönül:
> Hi Melanie,
>
> The deletion problems seems to be related with the bug described in
> STANBOL-727. Could you please retry after that bug is fixed?
>
> Best,
> Suat
>
> On Thu, Aug 30, 2012 at 1:00 PM, Melanie Reiplinger <
> melanie.reiplinger@dfki.de> wrote:
>
>> Hi Suat,
>>
>> thank you a lot for demonstrating this. It seems my mistake was that I did
>> not associate files with the nodes. For no specific reason I assumed that
>> files would be created when the nodes were created. But then I guess that
>> usually, it's the other way around: when building a repo, the files are
>> already there and are then are used to build up the tree.
>>
>> Now how do you delete your 2 content items from the contenthub? The
>> documentation says it's the very same syntax as for submitting items, just
>> using DELETE instead of POST, but that gives me a Bad Request with
>> java.lang.**IllegalArgumentException: No content found for any of the
>> following parameters [entity, content].
>> It does also not work in the REST interface.
>>
>> Best,
>> Melanie
>>
>>
>> Am 27.08.2012 13:42, schrieb Suat Gonul:
>>
>> Hi Melanie,
>>> It is true that a content repo is needed to run unit tests. Anyway, I
>>> tested the Jackrabbit and I shall share the steps with you. I hope they
>>> would work for you too.
>>>
>>> First of all, I was able to create nodes in Jackrabbit through the JCR
>>> API.
>>>
>>> - I ran the jackrabbit-standalone-2.4.2.**jar on the 8080 port.
>>> - Then created temporary nodes with the following code below. The code
>>> create two nodes to be submitted to the Contenthub under the "test"
>>> path. The nodes are associated with two files from the local file
>>> system. So, you should adapt the file paths. 3 external libraries are
>>> required to run this code: jackrabbit-jcr-rmi-2.2.*.jar, jcr-2.0.jar and
>>> slf4j-api-*.jar. They are already downloaded when you build Stanbol into
>>> the maven repository i.e the .m2 folder.
>>>
>>>
>>> Repository repository = new URLRemoteRepository(
>>> "http://localhost:8080/rmi");
>>> Session session = repository.login(new SimpleCredentials("admin",
>>> "admin".toCharArray()));
>>>
>>> Node testNode = null;
>>> try {
>>> testNode = session.getNode("/test");
>>> testNode.remove();
>>> } catch (PathNotFoundException e) {
>>> // ignore
>>> }
>>> Node rootNode = session.getRootNode();
>>> testNode = rootNode.addNode("test");
>>>
>>> File f = new File(
>>> "/home/suat/Desktop/**technicalStuff/stanbolTests/**
>>> cmsAdapter/jackrabbit/news1.**txt");
>>> Node newsNode = testNode.addNode(f.getName(), "nt:file");
>>> Node resourceNode = newsNode.addNode("jcr:content"**,
>>> "nt:resource");
>>> resourceNode.setProperty("jcr:**mimeType", "text/plain");
>>> Binary binary = session.getValueFactory().**createBinary(
>>> new FileInputStream(f));
>>> resourceNode.setProperty("jcr:**data", binary);
>>>
>>> f = new File(
>>> "/home/suat/Desktop/**technicalStuff/stanbolTests/**
>>> cmsAdapter/jackrabbit/news2.**txt");
>>> newsNode = testNode.addNode(f.getName(), "nt:file");
>>> resourceNode = newsNode.addNode("jcr:content"**, "nt:resource");
>>> resourceNode.setProperty("jcr:**mimeType", "text/plain");
>>> binary = session.getValueFactory().**createBinary(new
>>> FileInputStream(f));
>>> resourceNode.setProperty("jcr:**data", binary);
>>> session.save();
>>>
>>> - I ran the Stanbol on 8081 and executed the following commands:
>>> - curl -X GET -H "Accept: text/plain"
>>> "http://localhost:8081/**cmsadapter/session?**repositoryURL=http://**
>>> localhost:8080/rmi&username=**admin&password=admin&**connectionType=JCR<http://localhost:8081/cmsadapter/session?repositoryURL=http://localhost:8080/rmi&username=admin&password=admin&connectionType=JCR>
>>> "
>>> - curl -i -X POST --data
>>> "sessionKey=e92be985-e722-**419f-a1ad-5fe02628b537&path=/**
>>> test&recursive=true"
>>> http://localhost:8081/**cmsadapter/contenthubfeed<http://localhost:8081/cmsadapter/contenthubfeed>
>>>
>>> In the second command the result of the first command should be used.
>>> After executing these commands, I was able to see documents on
>>> http://localhost:8081/**contenthub/contenthub/store<http://localhost:8081/contenthub/contenthub/store>
>>> .
>>>
>>> Best,
>>> Suat
>>>
>>>
>>>
>>> On 08/20/2012 01:11 PM, Melanie Reiplinger wrote:
>>>
>>>> Hi Suat,
>>>>
>>>> Thanks for your reply.
>>>>
>>>>
>>>> Am 20.08.2012 11:55, schrieb Suat Gönül:
>>>>
>>>>> Hi Melanie,
>>>>>
>>>>> Sorry, I could not answer you as I was in holiday. I will start to
>>>>> work on
>>>>> August 27. In my demonstration, I was using CRX CMS.
>>>>>
>>>> That seems to be commercial software. I Cannot use that. So I'll have
>>>> to find another way. Under these conditions, I'm not even sure it
>>>> makes much sense to create unit tests for the JavaScript interface to
>>>> the cmsadapter, since whoever wanted to run them would need to have a
>>>> content repo locally installed to connect stanbol to it. It makes
>>>> sense only if I could set up (or use) a remote repo that's accessible
>>>> from wherever the test script is called...
>>>>
>>>> Best,
>>>> Melanie
>>>>
>>>> But to connect CRX, I
>>>>> have and additional bundle to be added to the OSGi environment. I can
>>>>> provide you that bundle when I'm back.
>>>>>
>>>>> I did not access to the repo via HTTP. In my demonstration, a session is
>>>>> obtained together with a session key after giving the necessary
>>>>> credentials
>>>>> e.g username, password, rmi endpoint. And that session key is used by
>>>>> CMS
>>>>> Adapter to access to the repo.
>>>>>
>>>>> Best,
>>>>> Suat
>>>>>
>>>>> On Mon, Aug 20, 2012 at 12:11 PM, Melanie Reiplinger <
>>>>> melanie.reiplinger@dfki.de> wrote:
>>>>>
>>>>> Hi Suat,
>>>>>> I cannot access my jackrabbit repo via xmlhttp either (although curl
>>>>>> works
>>>>>> fine), so this might as well be a CORS access problem. In your demo,
>>>>>> did
>>>>>> you have to somehow provide access to the repo (by setting headers
>>>>>> etc)?
>>>>>>
>>>>>> Best,
>>>>>> Melanie
>>>>>>
>>>>>> Am 15.08.2012 11:15, schrieb Melanie Reiplinger:
>>>>>>
>>>>>> Hi Suat,
>>>>>>
>>>>>>> Am 13.08.2012 13:35, schrieb Suat Gonul:
>>>>>>>
>>>>>>> In any case, I guess that you
>>>>>>>> need to configure a RDF Bridge through the
>>>>>>>> {stanbol}/system/console/****configMgr interface. There you should
>>>>>>>> find
>>>>>>>> the
>>>>>>>> "Apache Stanbol CMS Adapter Default RDF Bridge Configurations". In
>>>>>>>> that
>>>>>>>> configuration you specify the root path in the CMS to be exported
>>>>>>>> to the
>>>>>>>> RDF.
>>>>>>>>
>>>>>>>> by that you mean the content repository path? This means that I set
>>>>>>>>> there the path to my content repository?
>>>>>>>>>
>>>>>>>>> Yes, you set there a path residing in the content repository.
>>>>>>>> I have set up a jackrabbit workspace with some toy nodes in it. To
>>>>>>>>
>>>>>>>>> access it remotely, I'd configure something like
>>>>>>>>> http://[myserver]/server/
>>>>>>>>> <http://lnv-89012.dfki.uni-sb.****de:9002/server/default/**node1<
>>>>>>>>> http://lnv-89012.dfki.**uni-sb.de:9002/server/default/**node1<http://lnv-89012.dfki.uni-sb.de:9002/server/default/node1>
>>>>>>>>>>> ,
>>>>>>>>> but then
>>>>>>>>> I can work with this repository exclusively, right?
>>>>>>>>>
>>>>>>>>> I cannot access the URL you gave, but I guess you should give
>>>>>>>> /node1
>>>>>>>> path to export it as RDF. I didn't get your question about working
>>>>>>>> exclusively with the repository. But, you already seem to work on the
>>>>>>>> default repository of Jackrabbit running on your server.
>>>>>>>>
>>>>>>>>
>>>>>>>> I tried with several paths, none will work.
>>>>>>> My remote repository stub is
>>>>>>> http://lnv-89012.dfki.uni-sb.****de:9002/rmi<http://lnv-89012.**
>>>>>>> dfki.uni-sb.de:9002/rmi <http://lnv-89012.dfki.uni-sb.de:9002/rmi>>
>>>>>>> .
>>>>>>> (you cannot access those URIs because they are in a closed network)
>>>>>>> For accessing the content repository, I should use (according to my
>>>>>>> jackrabbit guidelines):
>>>>>>> http://lnv-89012.dfki.uni-sb.****de:9002/server<http://lnv-**
>>>>>>> 89012.dfki.uni-sb.de:9002/**server<http://lnv-89012.dfki.uni-sb.de:9002/server>
>>>>>>>> to
>>>>>>> access all workspaces of myJCR repository
>>>>>>> http://lnv-89012.dfki.uni-sb.****de:9002/server/default/jcr:****
>>>>>>> rootto<http://lnv-89012.dfki.**uni-sb.de:9002/server/default/**
>>>>>>> jcr:rootto<http://lnv-89012.dfki.uni-sb.de:9002/server/default/jcr:rootto>
>>>>>>>> access
>>>>>>> a single workspace (example with workspace named 'default'). -> this
>>>>>>> one is also where I can navigate to with my browser, so this should
>>>>>>> then be
>>>>>>> the correct path I guess.
>>>>>>>
>>>>>>>
>>>>>>> But I always get the same error about
>>>>>>> org.apache.stanbol.cmsadapter.****jcr.mapping.JCRRDFMapper Failed to
>>>>>>> retrieve node having path: <thePath> or its childr
>>>>>>>
>>>>>>> I'm an absolute beginner with content repositories, using
>>>>>>> jackrabbit for
>>>>>>> the first time and I'm really unsure of what would have to work if
>>>>>>> everything was correct, but I can see my repository in the jackrabbit
>>>>>>> console and I also can see that my nodes are existing, and the info
>>>>>>> command
>>>>>>> tells me that everything looks like I would expect:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Repository:
>>>>>>> http://lnv-89012.dfki.uni-sb.****de:9002/rmi<http://lnv-89012.**
>>>>>>> dfki.uni-sb.de:9002/rmi <http://lnv-89012.dfki.uni-sb.de:9002/rmi>>
>>>>>>> User : admin
>>>>>>> Workspace : default
>>>>>>> Node : /
>>>>>>>
>>>>>>> I looked at your paper ("Semantic Content Management with Apache
>>>>>>> Stanbol") and saw that you used jackrabbit in the demo, too. Is
>>>>>>> there some
>>>>>>> publicly accessible repository I could use for testing (so that I
>>>>>>> see what
>>>>>>> the path I have to specify looks like in a working example)?
>>>>>>>
>>>>>>> best,
>>>>>>> melanie
>>>>>>>
>>>>>>>
>>>>>>>
Re: cmsadapter
Posted by Melanie Reiplinger <me...@dfki.de>.
Hi Suat,
Am 04.09.2012 16:27, schrieb Suat Gonul:
> Hi Melanie,
>
> While submitting content items from CMS to Contenthub, the identifiers
> of the items in the CMS are used.
ah, I see, that's where the urn:content-item-{} comes from. Sorry, I
thought the ids were assigned by the contenthub like in creating content
items without a user-specified id. I think the documentation hints to
this circumstance in the paragraph:
"If|id|parameter is set, the target object is obtained from the content
repository according to its ID. If|path|parameter is set, first the ID
of target object is obtained from the content repository and then the
retrieved ID is used in submission of content item."
(/cmsadapter/contenthubfeed#)
So this means then that I can submit items by knowing only their path,
but in order to fetch them back I need to also know their id. Ok.
thanks a lot
Melanie
> The same id can be used to fetch
> documents from Contenthub. To get identifier of a JCR node you can use
> Node#getIdentifier() method.
>
> If you remove the nodes from CMS and create same nodes in same paths
> their identifiers are changed. After that if you resubmit them to
> Contenthub, new ContentItems are created (I think this is the case for
> you). However, if you don't remove the items in the CMS but only update
> them and then do the resubmission, the existing ContentItems will be
> overwritten.
>
> You can update an item in the Jackrabbit using a code snippet as follows:
>
> Node testNode = rootNode.getNode("test");
> Node jcrContent =
> testNode.getNode("news1.txt").getNode("jcr:content");
>
> File f = new File(
>
> "/home/suat/Desktop/technicalStuff/stanbolTests/cmsAdapter/jackrabbit/news3.txt");
> Binary binary = session.getValueFactory().createBinary(
> new FileInputStream(f));
> jcrContent.setProperty("jcr:data", binary);
> session.save();
>
> Best,
> Suat
>
> On 09/03/2012 12:27 PM, Melanie Reiplinger wrote:
>> Hi again Suat,
>>
>> sorry, I have to be more accurate here: when re-submitting, a new item
>> is only created on the contenthub if the repo item has changed, e.g.
>> if its document file contains a new or additional sentence. So there
>> are no simple duplicates of repo items, but new items for updated
>> versions of the same item.
>>
>>
>> Am 03.09.2012 10:54, schrieb Melanie Reiplinger:
>>> Hi Suat,
>>>
>>> ok, I will retry deletion later.
>>> In the meantime - is it possible to submit a content repo item under
>>> a specific urn to the contenthub? If I re-submit the same items, they
>>> are stored under the same title, but with different urns. In order to
>>> get a specific document back from the contenthub, I always used an id
>>> that I specified at creation. Can I also specify a urn for my repo
>>> items when submitting them via contenthubfeed? I know that this might
>>> be problematic when submitting subtrees recursively, because then
>>> only the root node would have the corresponding urn, but it would
>>> also prevent me from re-submitting the same subtree over and over
>>> again. Btw, the POST does not return the content-id like it does on
>>> the contenthub, so if I don't specify an id at submission, I won't be
>>> able to fetch the item back from the contenthub.
>>>
>>> One more thing: suppose the deletion worked - would then all the
>>> duplicates of my content item on the contenthub (created by duplicate
>>> submission of the same subtree) be deleted at once ? (since the
>>> deletion works by path or id which the item has in the content repo)
>>>
>>> Thanks,
>>> Melanie
>>>
>>>
>>> Am 31.08.2012 14:27, schrieb Suat Gönül:
>>>> Hi Melanie,
>>>>
>>>> The deletion problems seems to be related with the bug described in
>>>> STANBOL-727. Could you please retry after that bug is fixed?
>>>>
>>>> Best,
>>>> Suat
>>>>
>>>> On Thu, Aug 30, 2012 at 1:00 PM, Melanie Reiplinger <
>>>> melanie.reiplinger@dfki.de> wrote:
>>>>
>>>>> Hi Suat,
>>>>>
>>>>> thank you a lot for demonstrating this. It seems my mistake was
>>>>> that I did
>>>>> not associate files with the nodes. For no specific reason I
>>>>> assumed that
>>>>> files would be created when the nodes were created. But then I
>>>>> guess that
>>>>> usually, it's the other way around: when building a repo, the files
>>>>> are
>>>>> already there and are then are used to build up the tree.
>>>>>
>>>>> Now how do you delete your 2 content items from the contenthub? The
>>>>> documentation says it's the very same syntax as for submitting
>>>>> items, just
>>>>> using DELETE instead of POST, but that gives me a Bad Request with
>>>>> java.lang.**IllegalArgumentException: No content found for any of the
>>>>> following parameters [entity, content].
>>>>> It does also not work in the REST interface.
>>>>>
>>>>> Best,
>>>>> Melanie
>>>>>
>>>>>
>>>>> Am 27.08.2012 13:42, schrieb Suat Gonul:
>>>>>
>>>>> Hi Melanie,
>>>>>> It is true that a content repo is needed to run unit tests. Anyway, I
>>>>>> tested the Jackrabbit and I shall share the steps with you. I hope
>>>>>> they
>>>>>> would work for you too.
>>>>>>
>>>>>> First of all, I was able to create nodes in Jackrabbit through the
>>>>>> JCR
>>>>>> API.
>>>>>>
>>>>>> - I ran the jackrabbit-standalone-2.4.2.**jar on the 8080 port.
>>>>>> - Then created temporary nodes with the following code below. The
>>>>>> code
>>>>>> create two nodes to be submitted to the Contenthub under the "test"
>>>>>> path. The nodes are associated with two files from the local file
>>>>>> system. So, you should adapt the file paths. 3 external libraries are
>>>>>> required to run this code: jackrabbit-jcr-rmi-2.2.*.jar,
>>>>>> jcr-2.0.jar and
>>>>>> slf4j-api-*.jar. They are already downloaded when you build
>>>>>> Stanbol into
>>>>>> the maven repository i.e the .m2 folder.
>>>>>>
>>>>>>
>>>>>> Repository repository = new URLRemoteRepository(
>>>>>> "http://localhost:8080/rmi");
>>>>>> Session session = repository.login(new
>>>>>> SimpleCredentials("admin",
>>>>>> "admin".toCharArray()));
>>>>>>
>>>>>> Node testNode = null;
>>>>>> try {
>>>>>> testNode = session.getNode("/test");
>>>>>> testNode.remove();
>>>>>> } catch (PathNotFoundException e) {
>>>>>> // ignore
>>>>>> }
>>>>>> Node rootNode = session.getRootNode();
>>>>>> testNode = rootNode.addNode("test");
>>>>>>
>>>>>> File f = new File(
>>>>>> "/home/suat/Desktop/**technicalStuff/stanbolTests/**
>>>>>> cmsAdapter/jackrabbit/news1.**txt");
>>>>>> Node newsNode = testNode.addNode(f.getName(), "nt:file");
>>>>>> Node resourceNode = newsNode.addNode("jcr:content"**,
>>>>>> "nt:resource");
>>>>>> resourceNode.setProperty("jcr:**mimeType", "text/plain");
>>>>>> Binary binary = session.getValueFactory().**createBinary(
>>>>>> new FileInputStream(f));
>>>>>> resourceNode.setProperty("jcr:**data", binary);
>>>>>>
>>>>>> f = new File(
>>>>>> "/home/suat/Desktop/**technicalStuff/stanbolTests/**
>>>>>> cmsAdapter/jackrabbit/news2.**txt");
>>>>>> newsNode = testNode.addNode(f.getName(), "nt:file");
>>>>>> resourceNode = newsNode.addNode("jcr:content"**,
>>>>>> "nt:resource");
>>>>>> resourceNode.setProperty("jcr:**mimeType", "text/plain");
>>>>>> binary = session.getValueFactory().**createBinary(new
>>>>>> FileInputStream(f));
>>>>>> resourceNode.setProperty("jcr:**data", binary);
>>>>>> session.save();
>>>>>>
>>>>>> - I ran the Stanbol on 8081 and executed the following commands:
>>>>>> - curl -X GET -H "Accept: text/plain"
>>>>>> "http://localhost:8081/**cmsadapter/session?**repositoryURL=http://**
>>>>>> localhost:8080/rmi&username=**admin&password=admin&**connectionType=JCR<http://localhost:8081/cmsadapter/session?repositoryURL=http://localhost:8080/rmi&username=admin&password=admin&connectionType=JCR>
>>>>>>
>>>>>> "
>>>>>> - curl -i -X POST --data
>>>>>> "sessionKey=e92be985-e722-**419f-a1ad-5fe02628b537&path=/**
>>>>>> test&recursive=true"
>>>>>> http://localhost:8081/**cmsadapter/contenthubfeed<http://localhost:8081/cmsadapter/contenthubfeed>
>>>>>>
>>>>>>
>>>>>> In the second command the result of the first command should be used.
>>>>>> After executing these commands, I was able to see documents on
>>>>>> http://localhost:8081/**contenthub/contenthub/store<http://localhost:8081/contenthub/contenthub/store>
>>>>>>
>>>>>> .
>>>>>>
>>>>>> Best,
>>>>>> Suat
>>>>>>
>>>>>>
>>>>>>
>>>>>> On 08/20/2012 01:11 PM, Melanie Reiplinger wrote:
>>>>>>
>>>>>>> Hi Suat,
>>>>>>>
>>>>>>> Thanks for your reply.
>>>>>>>
>>>>>>>
>>>>>>> Am 20.08.2012 11:55, schrieb Suat Gönül:
>>>>>>>
>>>>>>>> Hi Melanie,
>>>>>>>>
>>>>>>>> Sorry, I could not answer you as I was in holiday. I will start to
>>>>>>>> work on
>>>>>>>> August 27. In my demonstration, I was using CRX CMS.
>>>>>>>>
>>>>>>> That seems to be commercial software. I Cannot use that. So I'll
>>>>>>> have
>>>>>>> to find another way. Under these conditions, I'm not even sure it
>>>>>>> makes much sense to create unit tests for the JavaScript
>>>>>>> interface to
>>>>>>> the cmsadapter, since whoever wanted to run them would need to
>>>>>>> have a
>>>>>>> content repo locally installed to connect stanbol to it. It makes
>>>>>>> sense only if I could set up (or use) a remote repo that's
>>>>>>> accessible
>>>>>>> from wherever the test script is called...
>>>>>>>
>>>>>>> Best,
>>>>>>> Melanie
>>>>>>>
>>>>>>> But to connect CRX, I
>>>>>>>> have and additional bundle to be added to the OSGi environment.
>>>>>>>> I can
>>>>>>>> provide you that bundle when I'm back.
>>>>>>>>
>>>>>>>> I did not access to the repo via HTTP. In my demonstration, a
>>>>>>>> session is
>>>>>>>> obtained together with a session key after giving the necessary
>>>>>>>> credentials
>>>>>>>> e.g username, password, rmi endpoint. And that session key is
>>>>>>>> used by
>>>>>>>> CMS
>>>>>>>> Adapter to access to the repo.
>>>>>>>>
>>>>>>>> Best,
>>>>>>>> Suat
>>>>>>>>
>>>>>>>> On Mon, Aug 20, 2012 at 12:11 PM, Melanie Reiplinger <
>>>>>>>> melanie.reiplinger@dfki.de> wrote:
>>>>>>>>
>>>>>>>> Hi Suat,
>>>>>>>>> I cannot access my jackrabbit repo via xmlhttp either (although
>>>>>>>>> curl
>>>>>>>>> works
>>>>>>>>> fine), so this might as well be a CORS access problem. In your
>>>>>>>>> demo,
>>>>>>>>> did
>>>>>>>>> you have to somehow provide access to the repo (by setting headers
>>>>>>>>> etc)?
>>>>>>>>>
>>>>>>>>> Best,
>>>>>>>>> Melanie
>>>>>>>>>
>>>>>>>>> Am 15.08.2012 11:15, schrieb Melanie Reiplinger:
>>>>>>>>>
>>>>>>>>> Hi Suat,
>>>>>>>>>
>>>>>>>>>> Am 13.08.2012 13:35, schrieb Suat Gonul:
>>>>>>>>>>
>>>>>>>>>> In any case, I guess that you
>>>>>>>>>>> need to configure a RDF Bridge through the
>>>>>>>>>>> {stanbol}/system/console/****configMgr interface. There you
>>>>>>>>>>> should
>>>>>>>>>>> find
>>>>>>>>>>> the
>>>>>>>>>>> "Apache Stanbol CMS Adapter Default RDF Bridge
>>>>>>>>>>> Configurations". In
>>>>>>>>>>> that
>>>>>>>>>>> configuration you specify the root path in the CMS to be
>>>>>>>>>>> exported
>>>>>>>>>>> to the
>>>>>>>>>>> RDF.
>>>>>>>>>>>
>>>>>>>>>>> by that you mean the content repository path? This means
>>>>>>>>>>> that I set
>>>>>>>>>>>> there the path to my content repository?
>>>>>>>>>>>>
>>>>>>>>>>>> Yes, you set there a path residing in the content repository.
>>>>>>>>>>> I have set up a jackrabbit workspace with some toy nodes
>>>>>>>>>>> in it. To
>>>>>>>>>>>
>>>>>>>>>>>> access it remotely, I'd configure something like
>>>>>>>>>>>> http://[myserver]/server/
>>>>>>>>>>>> <http://lnv-89012.dfki.uni-sb.****de:9002/server/default/**node1<
>>>>>>>>>>>>
>>>>>>>>>>>> http://lnv-89012.dfki.**uni-sb.de:9002/server/default/**node1<http://lnv-89012.dfki.uni-sb.de:9002/server/default/node1>
>>>>>>>>>>>>
>>>>>>>>>>>>>> ,
>>>>>>>>>>>> but then
>>>>>>>>>>>> I can work with this repository exclusively, right?
>>>>>>>>>>>>
>>>>>>>>>>>> I cannot access the URL you gave, but I guess you
>>>>>>>>>>>> should give
>>>>>>>>>>> /node1
>>>>>>>>>>> path to export it as RDF. I didn't get your question about
>>>>>>>>>>> working
>>>>>>>>>>> exclusively with the repository. But, you already seem to
>>>>>>>>>>> work on the
>>>>>>>>>>> default repository of Jackrabbit running on your server.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> I tried with several paths, none will work.
>>>>>>>>>> My remote repository stub is
>>>>>>>>>> http://lnv-89012.dfki.uni-sb.****de:9002/rmi<http://lnv-89012.**
>>>>>>>>>> dfki.uni-sb.de:9002/rmi
>>>>>>>>>> <http://lnv-89012.dfki.uni-sb.de:9002/rmi>>
>>>>>>>>>> .
>>>>>>>>>> (you cannot access those URIs because they are in a closed
>>>>>>>>>> network)
>>>>>>>>>> For accessing the content repository, I should use (according
>>>>>>>>>> to my
>>>>>>>>>> jackrabbit guidelines):
>>>>>>>>>> http://lnv-89012.dfki.uni-sb.****de:9002/server<http://lnv-**
>>>>>>>>>> 89012.dfki.uni-sb.de:9002/**server<http://lnv-89012.dfki.uni-sb.de:9002/server>
>>>>>>>>>>
>>>>>>>>>>> to
>>>>>>>>>> access all workspaces of myJCR repository
>>>>>>>>>> http://lnv-89012.dfki.uni-sb.****de:9002/server/default/jcr:****
>>>>>>>>>> rootto<http://lnv-89012.dfki.**uni-sb.de:9002/server/default/**
>>>>>>>>>> jcr:rootto<http://lnv-89012.dfki.uni-sb.de:9002/server/default/jcr:rootto>
>>>>>>>>>>
>>>>>>>>>>> access
>>>>>>>>>> a single workspace (example with workspace named 'default').
>>>>>>>>>> -> this
>>>>>>>>>> one is also where I can navigate to with my browser, so this
>>>>>>>>>> should
>>>>>>>>>> then be
>>>>>>>>>> the correct path I guess.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> But I always get the same error about
>>>>>>>>>> org.apache.stanbol.cmsadapter.****jcr.mapping.JCRRDFMapper
>>>>>>>>>> Failed to
>>>>>>>>>> retrieve node having path: <thePath> or its childr
>>>>>>>>>>
>>>>>>>>>> I'm an absolute beginner with content repositories, using
>>>>>>>>>> jackrabbit for
>>>>>>>>>> the first time and I'm really unsure of what would have to
>>>>>>>>>> work if
>>>>>>>>>> everything was correct, but I can see my repository in the
>>>>>>>>>> jackrabbit
>>>>>>>>>> console and I also can see that my nodes are existing, and the
>>>>>>>>>> info
>>>>>>>>>> command
>>>>>>>>>> tells me that everything looks like I would expect:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Repository:
>>>>>>>>>> http://lnv-89012.dfki.uni-sb.****de:9002/rmi<http://lnv-89012.**
>>>>>>>>>> dfki.uni-sb.de:9002/rmi
>>>>>>>>>> <http://lnv-89012.dfki.uni-sb.de:9002/rmi>>
>>>>>>>>>> User : admin
>>>>>>>>>> Workspace : default
>>>>>>>>>> Node : /
>>>>>>>>>>
>>>>>>>>>> I looked at your paper ("Semantic Content Management with Apache
>>>>>>>>>> Stanbol") and saw that you used jackrabbit in the demo, too. Is
>>>>>>>>>> there some
>>>>>>>>>> publicly accessible repository I could use for testing (so that I
>>>>>>>>>> see what
>>>>>>>>>> the path I have to specify looks like in a working example)?
>>>>>>>>>>
>>>>>>>>>> best,
>>>>>>>>>> melanie
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>
Re: cmsadapter
Posted by Suat Gonul <su...@gmail.com>.
Hi Melanie,
While submitting content items from CMS to Contenthub, the identifiers
of the items in the CMS are used. The same id can be used to fetch
documents from Contenthub. To get identifier of a JCR node you can use
Node#getIdentifier() method.
If you remove the nodes from CMS and create same nodes in same paths
their identifiers are changed. After that if you resubmit them to
Contenthub, new ContentItems are created (I think this is the case for
you). However, if you don't remove the items in the CMS but only update
them and then do the resubmission, the existing ContentItems will be
overwritten.
You can update an item in the Jackrabbit using a code snippet as follows:
Node testNode = rootNode.getNode("test");
Node jcrContent =
testNode.getNode("news1.txt").getNode("jcr:content");
File f = new File(
"/home/suat/Desktop/technicalStuff/stanbolTests/cmsAdapter/jackrabbit/news3.txt");
Binary binary = session.getValueFactory().createBinary(
new FileInputStream(f));
jcrContent.setProperty("jcr:data", binary);
session.save();
Best,
Suat
On 09/03/2012 12:27 PM, Melanie Reiplinger wrote:
> Hi again Suat,
>
> sorry, I have to be more accurate here: when re-submitting, a new item
> is only created on the contenthub if the repo item has changed, e.g.
> if its document file contains a new or additional sentence. So there
> are no simple duplicates of repo items, but new items for updated
> versions of the same item.
>
>
> Am 03.09.2012 10:54, schrieb Melanie Reiplinger:
>> Hi Suat,
>>
>> ok, I will retry deletion later.
>> In the meantime - is it possible to submit a content repo item under
>> a specific urn to the contenthub? If I re-submit the same items, they
>> are stored under the same title, but with different urns. In order to
>> get a specific document back from the contenthub, I always used an id
>> that I specified at creation. Can I also specify a urn for my repo
>> items when submitting them via contenthubfeed? I know that this might
>> be problematic when submitting subtrees recursively, because then
>> only the root node would have the corresponding urn, but it would
>> also prevent me from re-submitting the same subtree over and over
>> again. Btw, the POST does not return the content-id like it does on
>> the contenthub, so if I don't specify an id at submission, I won't be
>> able to fetch the item back from the contenthub.
>>
>> One more thing: suppose the deletion worked - would then all the
>> duplicates of my content item on the contenthub (created by duplicate
>> submission of the same subtree) be deleted at once ? (since the
>> deletion works by path or id which the item has in the content repo)
>>
>> Thanks,
>> Melanie
>>
>>
>> Am 31.08.2012 14:27, schrieb Suat Gönül:
>>> Hi Melanie,
>>>
>>> The deletion problems seems to be related with the bug described in
>>> STANBOL-727. Could you please retry after that bug is fixed?
>>>
>>> Best,
>>> Suat
>>>
>>> On Thu, Aug 30, 2012 at 1:00 PM, Melanie Reiplinger <
>>> melanie.reiplinger@dfki.de> wrote:
>>>
>>>> Hi Suat,
>>>>
>>>> thank you a lot for demonstrating this. It seems my mistake was
>>>> that I did
>>>> not associate files with the nodes. For no specific reason I
>>>> assumed that
>>>> files would be created when the nodes were created. But then I
>>>> guess that
>>>> usually, it's the other way around: when building a repo, the files
>>>> are
>>>> already there and are then are used to build up the tree.
>>>>
>>>> Now how do you delete your 2 content items from the contenthub? The
>>>> documentation says it's the very same syntax as for submitting
>>>> items, just
>>>> using DELETE instead of POST, but that gives me a Bad Request with
>>>> java.lang.**IllegalArgumentException: No content found for any of the
>>>> following parameters [entity, content].
>>>> It does also not work in the REST interface.
>>>>
>>>> Best,
>>>> Melanie
>>>>
>>>>
>>>> Am 27.08.2012 13:42, schrieb Suat Gonul:
>>>>
>>>> Hi Melanie,
>>>>> It is true that a content repo is needed to run unit tests. Anyway, I
>>>>> tested the Jackrabbit and I shall share the steps with you. I hope
>>>>> they
>>>>> would work for you too.
>>>>>
>>>>> First of all, I was able to create nodes in Jackrabbit through the
>>>>> JCR
>>>>> API.
>>>>>
>>>>> - I ran the jackrabbit-standalone-2.4.2.**jar on the 8080 port.
>>>>> - Then created temporary nodes with the following code below. The
>>>>> code
>>>>> create two nodes to be submitted to the Contenthub under the "test"
>>>>> path. The nodes are associated with two files from the local file
>>>>> system. So, you should adapt the file paths. 3 external libraries are
>>>>> required to run this code: jackrabbit-jcr-rmi-2.2.*.jar,
>>>>> jcr-2.0.jar and
>>>>> slf4j-api-*.jar. They are already downloaded when you build
>>>>> Stanbol into
>>>>> the maven repository i.e the .m2 folder.
>>>>>
>>>>>
>>>>> Repository repository = new URLRemoteRepository(
>>>>> "http://localhost:8080/rmi");
>>>>> Session session = repository.login(new
>>>>> SimpleCredentials("admin",
>>>>> "admin".toCharArray()));
>>>>>
>>>>> Node testNode = null;
>>>>> try {
>>>>> testNode = session.getNode("/test");
>>>>> testNode.remove();
>>>>> } catch (PathNotFoundException e) {
>>>>> // ignore
>>>>> }
>>>>> Node rootNode = session.getRootNode();
>>>>> testNode = rootNode.addNode("test");
>>>>>
>>>>> File f = new File(
>>>>> "/home/suat/Desktop/**technicalStuff/stanbolTests/**
>>>>> cmsAdapter/jackrabbit/news1.**txt");
>>>>> Node newsNode = testNode.addNode(f.getName(), "nt:file");
>>>>> Node resourceNode = newsNode.addNode("jcr:content"**,
>>>>> "nt:resource");
>>>>> resourceNode.setProperty("jcr:**mimeType", "text/plain");
>>>>> Binary binary = session.getValueFactory().**createBinary(
>>>>> new FileInputStream(f));
>>>>> resourceNode.setProperty("jcr:**data", binary);
>>>>>
>>>>> f = new File(
>>>>> "/home/suat/Desktop/**technicalStuff/stanbolTests/**
>>>>> cmsAdapter/jackrabbit/news2.**txt");
>>>>> newsNode = testNode.addNode(f.getName(), "nt:file");
>>>>> resourceNode = newsNode.addNode("jcr:content"**,
>>>>> "nt:resource");
>>>>> resourceNode.setProperty("jcr:**mimeType", "text/plain");
>>>>> binary = session.getValueFactory().**createBinary(new
>>>>> FileInputStream(f));
>>>>> resourceNode.setProperty("jcr:**data", binary);
>>>>> session.save();
>>>>>
>>>>> - I ran the Stanbol on 8081 and executed the following commands:
>>>>> - curl -X GET -H "Accept: text/plain"
>>>>> "http://localhost:8081/**cmsadapter/session?**repositoryURL=http://**
>>>>> localhost:8080/rmi&username=**admin&password=admin&**connectionType=JCR<http://localhost:8081/cmsadapter/session?repositoryURL=http://localhost:8080/rmi&username=admin&password=admin&connectionType=JCR>
>>>>>
>>>>> "
>>>>> - curl -i -X POST --data
>>>>> "sessionKey=e92be985-e722-**419f-a1ad-5fe02628b537&path=/**
>>>>> test&recursive=true"
>>>>> http://localhost:8081/**cmsadapter/contenthubfeed<http://localhost:8081/cmsadapter/contenthubfeed>
>>>>>
>>>>>
>>>>> In the second command the result of the first command should be used.
>>>>> After executing these commands, I was able to see documents on
>>>>> http://localhost:8081/**contenthub/contenthub/store<http://localhost:8081/contenthub/contenthub/store>
>>>>>
>>>>> .
>>>>>
>>>>> Best,
>>>>> Suat
>>>>>
>>>>>
>>>>>
>>>>> On 08/20/2012 01:11 PM, Melanie Reiplinger wrote:
>>>>>
>>>>>> Hi Suat,
>>>>>>
>>>>>> Thanks for your reply.
>>>>>>
>>>>>>
>>>>>> Am 20.08.2012 11:55, schrieb Suat Gönül:
>>>>>>
>>>>>>> Hi Melanie,
>>>>>>>
>>>>>>> Sorry, I could not answer you as I was in holiday. I will start to
>>>>>>> work on
>>>>>>> August 27. In my demonstration, I was using CRX CMS.
>>>>>>>
>>>>>> That seems to be commercial software. I Cannot use that. So I'll
>>>>>> have
>>>>>> to find another way. Under these conditions, I'm not even sure it
>>>>>> makes much sense to create unit tests for the JavaScript
>>>>>> interface to
>>>>>> the cmsadapter, since whoever wanted to run them would need to
>>>>>> have a
>>>>>> content repo locally installed to connect stanbol to it. It makes
>>>>>> sense only if I could set up (or use) a remote repo that's
>>>>>> accessible
>>>>>> from wherever the test script is called...
>>>>>>
>>>>>> Best,
>>>>>> Melanie
>>>>>>
>>>>>> But to connect CRX, I
>>>>>>> have and additional bundle to be added to the OSGi environment.
>>>>>>> I can
>>>>>>> provide you that bundle when I'm back.
>>>>>>>
>>>>>>> I did not access to the repo via HTTP. In my demonstration, a
>>>>>>> session is
>>>>>>> obtained together with a session key after giving the necessary
>>>>>>> credentials
>>>>>>> e.g username, password, rmi endpoint. And that session key is
>>>>>>> used by
>>>>>>> CMS
>>>>>>> Adapter to access to the repo.
>>>>>>>
>>>>>>> Best,
>>>>>>> Suat
>>>>>>>
>>>>>>> On Mon, Aug 20, 2012 at 12:11 PM, Melanie Reiplinger <
>>>>>>> melanie.reiplinger@dfki.de> wrote:
>>>>>>>
>>>>>>> Hi Suat,
>>>>>>>> I cannot access my jackrabbit repo via xmlhttp either (although
>>>>>>>> curl
>>>>>>>> works
>>>>>>>> fine), so this might as well be a CORS access problem. In your
>>>>>>>> demo,
>>>>>>>> did
>>>>>>>> you have to somehow provide access to the repo (by setting headers
>>>>>>>> etc)?
>>>>>>>>
>>>>>>>> Best,
>>>>>>>> Melanie
>>>>>>>>
>>>>>>>> Am 15.08.2012 11:15, schrieb Melanie Reiplinger:
>>>>>>>>
>>>>>>>> Hi Suat,
>>>>>>>>
>>>>>>>>> Am 13.08.2012 13:35, schrieb Suat Gonul:
>>>>>>>>>
>>>>>>>>> In any case, I guess that you
>>>>>>>>>> need to configure a RDF Bridge through the
>>>>>>>>>> {stanbol}/system/console/****configMgr interface. There you
>>>>>>>>>> should
>>>>>>>>>> find
>>>>>>>>>> the
>>>>>>>>>> "Apache Stanbol CMS Adapter Default RDF Bridge
>>>>>>>>>> Configurations". In
>>>>>>>>>> that
>>>>>>>>>> configuration you specify the root path in the CMS to be
>>>>>>>>>> exported
>>>>>>>>>> to the
>>>>>>>>>> RDF.
>>>>>>>>>>
>>>>>>>>>> by that you mean the content repository path? This means
>>>>>>>>>> that I set
>>>>>>>>>>> there the path to my content repository?
>>>>>>>>>>>
>>>>>>>>>>> Yes, you set there a path residing in the content repository.
>>>>>>>>>> I have set up a jackrabbit workspace with some toy nodes
>>>>>>>>>> in it. To
>>>>>>>>>>
>>>>>>>>>>> access it remotely, I'd configure something like
>>>>>>>>>>> http://[myserver]/server/
>>>>>>>>>>> <http://lnv-89012.dfki.uni-sb.****de:9002/server/default/**node1<
>>>>>>>>>>>
>>>>>>>>>>> http://lnv-89012.dfki.**uni-sb.de:9002/server/default/**node1<http://lnv-89012.dfki.uni-sb.de:9002/server/default/node1>
>>>>>>>>>>>
>>>>>>>>>>>>> ,
>>>>>>>>>>> but then
>>>>>>>>>>> I can work with this repository exclusively, right?
>>>>>>>>>>>
>>>>>>>>>>> I cannot access the URL you gave, but I guess you
>>>>>>>>>>> should give
>>>>>>>>>> /node1
>>>>>>>>>> path to export it as RDF. I didn't get your question about
>>>>>>>>>> working
>>>>>>>>>> exclusively with the repository. But, you already seem to
>>>>>>>>>> work on the
>>>>>>>>>> default repository of Jackrabbit running on your server.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> I tried with several paths, none will work.
>>>>>>>>> My remote repository stub is
>>>>>>>>> http://lnv-89012.dfki.uni-sb.****de:9002/rmi<http://lnv-89012.**
>>>>>>>>> dfki.uni-sb.de:9002/rmi
>>>>>>>>> <http://lnv-89012.dfki.uni-sb.de:9002/rmi>>
>>>>>>>>> .
>>>>>>>>> (you cannot access those URIs because they are in a closed
>>>>>>>>> network)
>>>>>>>>> For accessing the content repository, I should use (according
>>>>>>>>> to my
>>>>>>>>> jackrabbit guidelines):
>>>>>>>>> http://lnv-89012.dfki.uni-sb.****de:9002/server<http://lnv-**
>>>>>>>>> 89012.dfki.uni-sb.de:9002/**server<http://lnv-89012.dfki.uni-sb.de:9002/server>
>>>>>>>>>
>>>>>>>>>> to
>>>>>>>>> access all workspaces of myJCR repository
>>>>>>>>> http://lnv-89012.dfki.uni-sb.****de:9002/server/default/jcr:****
>>>>>>>>> rootto<http://lnv-89012.dfki.**uni-sb.de:9002/server/default/**
>>>>>>>>> jcr:rootto<http://lnv-89012.dfki.uni-sb.de:9002/server/default/jcr:rootto>
>>>>>>>>>
>>>>>>>>>> access
>>>>>>>>> a single workspace (example with workspace named 'default').
>>>>>>>>> -> this
>>>>>>>>> one is also where I can navigate to with my browser, so this
>>>>>>>>> should
>>>>>>>>> then be
>>>>>>>>> the correct path I guess.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> But I always get the same error about
>>>>>>>>> org.apache.stanbol.cmsadapter.****jcr.mapping.JCRRDFMapper
>>>>>>>>> Failed to
>>>>>>>>> retrieve node having path: <thePath> or its childr
>>>>>>>>>
>>>>>>>>> I'm an absolute beginner with content repositories, using
>>>>>>>>> jackrabbit for
>>>>>>>>> the first time and I'm really unsure of what would have to
>>>>>>>>> work if
>>>>>>>>> everything was correct, but I can see my repository in the
>>>>>>>>> jackrabbit
>>>>>>>>> console and I also can see that my nodes are existing, and the
>>>>>>>>> info
>>>>>>>>> command
>>>>>>>>> tells me that everything looks like I would expect:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Repository:
>>>>>>>>> http://lnv-89012.dfki.uni-sb.****de:9002/rmi<http://lnv-89012.**
>>>>>>>>> dfki.uni-sb.de:9002/rmi
>>>>>>>>> <http://lnv-89012.dfki.uni-sb.de:9002/rmi>>
>>>>>>>>> User : admin
>>>>>>>>> Workspace : default
>>>>>>>>> Node : /
>>>>>>>>>
>>>>>>>>> I looked at your paper ("Semantic Content Management with Apache
>>>>>>>>> Stanbol") and saw that you used jackrabbit in the demo, too. Is
>>>>>>>>> there some
>>>>>>>>> publicly accessible repository I could use for testing (so that I
>>>>>>>>> see what
>>>>>>>>> the path I have to specify looks like in a working example)?
>>>>>>>>>
>>>>>>>>> best,
>>>>>>>>> melanie
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>
>
>
Re: cmsadapter
Posted by Melanie Reiplinger <me...@dfki.de>.
Hi again Suat,
sorry, I have to be more accurate here: when re-submitting, a new item
is only created on the contenthub if the repo item has changed, e.g. if
its document file contains a new or additional sentence. So there are no
simple duplicates of repo items, but new items for updated versions of
the same item.
Am 03.09.2012 10:54, schrieb Melanie Reiplinger:
> Hi Suat,
>
> ok, I will retry deletion later.
> In the meantime - is it possible to submit a content repo item under a
> specific urn to the contenthub? If I re-submit the same items, they
> are stored under the same title, but with different urns. In order to
> get a specific document back from the contenthub, I always used an id
> that I specified at creation. Can I also specify a urn for my repo
> items when submitting them via contenthubfeed? I know that this might
> be problematic when submitting subtrees recursively, because then only
> the root node would have the corresponding urn, but it would also
> prevent me from re-submitting the same subtree over and over again.
> Btw, the POST does not return the content-id like it does on the
> contenthub, so if I don't specify an id at submission, I won't be able
> to fetch the item back from the contenthub.
>
> One more thing: suppose the deletion worked - would then all the
> duplicates of my content item on the contenthub (created by duplicate
> submission of the same subtree) be deleted at once ? (since the
> deletion works by path or id which the item has in the content repo)
>
> Thanks,
> Melanie
>
>
> Am 31.08.2012 14:27, schrieb Suat Gönül:
>> Hi Melanie,
>>
>> The deletion problems seems to be related with the bug described in
>> STANBOL-727. Could you please retry after that bug is fixed?
>>
>> Best,
>> Suat
>>
>> On Thu, Aug 30, 2012 at 1:00 PM, Melanie Reiplinger <
>> melanie.reiplinger@dfki.de> wrote:
>>
>>> Hi Suat,
>>>
>>> thank you a lot for demonstrating this. It seems my mistake was that
>>> I did
>>> not associate files with the nodes. For no specific reason I assumed
>>> that
>>> files would be created when the nodes were created. But then I guess
>>> that
>>> usually, it's the other way around: when building a repo, the files are
>>> already there and are then are used to build up the tree.
>>>
>>> Now how do you delete your 2 content items from the contenthub? The
>>> documentation says it's the very same syntax as for submitting
>>> items, just
>>> using DELETE instead of POST, but that gives me a Bad Request with
>>> java.lang.**IllegalArgumentException: No content found for any of the
>>> following parameters [entity, content].
>>> It does also not work in the REST interface.
>>>
>>> Best,
>>> Melanie
>>>
>>>
>>> Am 27.08.2012 13:42, schrieb Suat Gonul:
>>>
>>> Hi Melanie,
>>>> It is true that a content repo is needed to run unit tests. Anyway, I
>>>> tested the Jackrabbit and I shall share the steps with you. I hope
>>>> they
>>>> would work for you too.
>>>>
>>>> First of all, I was able to create nodes in Jackrabbit through the JCR
>>>> API.
>>>>
>>>> - I ran the jackrabbit-standalone-2.4.2.**jar on the 8080 port.
>>>> - Then created temporary nodes with the following code below. The code
>>>> create two nodes to be submitted to the Contenthub under the "test"
>>>> path. The nodes are associated with two files from the local file
>>>> system. So, you should adapt the file paths. 3 external libraries are
>>>> required to run this code: jackrabbit-jcr-rmi-2.2.*.jar,
>>>> jcr-2.0.jar and
>>>> slf4j-api-*.jar. They are already downloaded when you build Stanbol
>>>> into
>>>> the maven repository i.e the .m2 folder.
>>>>
>>>>
>>>> Repository repository = new URLRemoteRepository(
>>>> "http://localhost:8080/rmi");
>>>> Session session = repository.login(new
>>>> SimpleCredentials("admin",
>>>> "admin".toCharArray()));
>>>>
>>>> Node testNode = null;
>>>> try {
>>>> testNode = session.getNode("/test");
>>>> testNode.remove();
>>>> } catch (PathNotFoundException e) {
>>>> // ignore
>>>> }
>>>> Node rootNode = session.getRootNode();
>>>> testNode = rootNode.addNode("test");
>>>>
>>>> File f = new File(
>>>> "/home/suat/Desktop/**technicalStuff/stanbolTests/**
>>>> cmsAdapter/jackrabbit/news1.**txt");
>>>> Node newsNode = testNode.addNode(f.getName(), "nt:file");
>>>> Node resourceNode = newsNode.addNode("jcr:content"**,
>>>> "nt:resource");
>>>> resourceNode.setProperty("jcr:**mimeType", "text/plain");
>>>> Binary binary = session.getValueFactory().**createBinary(
>>>> new FileInputStream(f));
>>>> resourceNode.setProperty("jcr:**data", binary);
>>>>
>>>> f = new File(
>>>> "/home/suat/Desktop/**technicalStuff/stanbolTests/**
>>>> cmsAdapter/jackrabbit/news2.**txt");
>>>> newsNode = testNode.addNode(f.getName(), "nt:file");
>>>> resourceNode = newsNode.addNode("jcr:content"**,
>>>> "nt:resource");
>>>> resourceNode.setProperty("jcr:**mimeType", "text/plain");
>>>> binary = session.getValueFactory().**createBinary(new
>>>> FileInputStream(f));
>>>> resourceNode.setProperty("jcr:**data", binary);
>>>> session.save();
>>>>
>>>> - I ran the Stanbol on 8081 and executed the following commands:
>>>> - curl -X GET -H "Accept: text/plain"
>>>> "http://localhost:8081/**cmsadapter/session?**repositoryURL=http://**
>>>> localhost:8080/rmi&username=**admin&password=admin&**connectionType=JCR<http://localhost:8081/cmsadapter/session?repositoryURL=http://localhost:8080/rmi&username=admin&password=admin&connectionType=JCR>
>>>>
>>>> "
>>>> - curl -i -X POST --data
>>>> "sessionKey=e92be985-e722-**419f-a1ad-5fe02628b537&path=/**
>>>> test&recursive=true"
>>>> http://localhost:8081/**cmsadapter/contenthubfeed<http://localhost:8081/cmsadapter/contenthubfeed>
>>>>
>>>>
>>>> In the second command the result of the first command should be used.
>>>> After executing these commands, I was able to see documents on
>>>> http://localhost:8081/**contenthub/contenthub/store<http://localhost:8081/contenthub/contenthub/store>
>>>>
>>>> .
>>>>
>>>> Best,
>>>> Suat
>>>>
>>>>
>>>>
>>>> On 08/20/2012 01:11 PM, Melanie Reiplinger wrote:
>>>>
>>>>> Hi Suat,
>>>>>
>>>>> Thanks for your reply.
>>>>>
>>>>>
>>>>> Am 20.08.2012 11:55, schrieb Suat Gönül:
>>>>>
>>>>>> Hi Melanie,
>>>>>>
>>>>>> Sorry, I could not answer you as I was in holiday. I will start to
>>>>>> work on
>>>>>> August 27. In my demonstration, I was using CRX CMS.
>>>>>>
>>>>> That seems to be commercial software. I Cannot use that. So I'll have
>>>>> to find another way. Under these conditions, I'm not even sure it
>>>>> makes much sense to create unit tests for the JavaScript interface to
>>>>> the cmsadapter, since whoever wanted to run them would need to have a
>>>>> content repo locally installed to connect stanbol to it. It makes
>>>>> sense only if I could set up (or use) a remote repo that's accessible
>>>>> from wherever the test script is called...
>>>>>
>>>>> Best,
>>>>> Melanie
>>>>>
>>>>> But to connect CRX, I
>>>>>> have and additional bundle to be added to the OSGi environment. I
>>>>>> can
>>>>>> provide you that bundle when I'm back.
>>>>>>
>>>>>> I did not access to the repo via HTTP. In my demonstration, a
>>>>>> session is
>>>>>> obtained together with a session key after giving the necessary
>>>>>> credentials
>>>>>> e.g username, password, rmi endpoint. And that session key is
>>>>>> used by
>>>>>> CMS
>>>>>> Adapter to access to the repo.
>>>>>>
>>>>>> Best,
>>>>>> Suat
>>>>>>
>>>>>> On Mon, Aug 20, 2012 at 12:11 PM, Melanie Reiplinger <
>>>>>> melanie.reiplinger@dfki.de> wrote:
>>>>>>
>>>>>> Hi Suat,
>>>>>>> I cannot access my jackrabbit repo via xmlhttp either (although
>>>>>>> curl
>>>>>>> works
>>>>>>> fine), so this might as well be a CORS access problem. In your
>>>>>>> demo,
>>>>>>> did
>>>>>>> you have to somehow provide access to the repo (by setting headers
>>>>>>> etc)?
>>>>>>>
>>>>>>> Best,
>>>>>>> Melanie
>>>>>>>
>>>>>>> Am 15.08.2012 11:15, schrieb Melanie Reiplinger:
>>>>>>>
>>>>>>> Hi Suat,
>>>>>>>
>>>>>>>> Am 13.08.2012 13:35, schrieb Suat Gonul:
>>>>>>>>
>>>>>>>> In any case, I guess that you
>>>>>>>>> need to configure a RDF Bridge through the
>>>>>>>>> {stanbol}/system/console/****configMgr interface. There you
>>>>>>>>> should
>>>>>>>>> find
>>>>>>>>> the
>>>>>>>>> "Apache Stanbol CMS Adapter Default RDF Bridge
>>>>>>>>> Configurations". In
>>>>>>>>> that
>>>>>>>>> configuration you specify the root path in the CMS to be exported
>>>>>>>>> to the
>>>>>>>>> RDF.
>>>>>>>>>
>>>>>>>>> by that you mean the content repository path? This means
>>>>>>>>> that I set
>>>>>>>>>> there the path to my content repository?
>>>>>>>>>>
>>>>>>>>>> Yes, you set there a path residing in the content repository.
>>>>>>>>> I have set up a jackrabbit workspace with some toy nodes
>>>>>>>>> in it. To
>>>>>>>>>
>>>>>>>>>> access it remotely, I'd configure something like
>>>>>>>>>> http://[myserver]/server/
>>>>>>>>>> <http://lnv-89012.dfki.uni-sb.****de:9002/server/default/**node1<
>>>>>>>>>>
>>>>>>>>>> http://lnv-89012.dfki.**uni-sb.de:9002/server/default/**node1<http://lnv-89012.dfki.uni-sb.de:9002/server/default/node1>
>>>>>>>>>>
>>>>>>>>>>>> ,
>>>>>>>>>> but then
>>>>>>>>>> I can work with this repository exclusively, right?
>>>>>>>>>>
>>>>>>>>>> I cannot access the URL you gave, but I guess you
>>>>>>>>>> should give
>>>>>>>>> /node1
>>>>>>>>> path to export it as RDF. I didn't get your question about
>>>>>>>>> working
>>>>>>>>> exclusively with the repository. But, you already seem to work
>>>>>>>>> on the
>>>>>>>>> default repository of Jackrabbit running on your server.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> I tried with several paths, none will work.
>>>>>>>> My remote repository stub is
>>>>>>>> http://lnv-89012.dfki.uni-sb.****de:9002/rmi<http://lnv-89012.**
>>>>>>>> dfki.uni-sb.de:9002/rmi
>>>>>>>> <http://lnv-89012.dfki.uni-sb.de:9002/rmi>>
>>>>>>>> .
>>>>>>>> (you cannot access those URIs because they are in a closed
>>>>>>>> network)
>>>>>>>> For accessing the content repository, I should use (according
>>>>>>>> to my
>>>>>>>> jackrabbit guidelines):
>>>>>>>> http://lnv-89012.dfki.uni-sb.****de:9002/server<http://lnv-**
>>>>>>>> 89012.dfki.uni-sb.de:9002/**server<http://lnv-89012.dfki.uni-sb.de:9002/server>
>>>>>>>>
>>>>>>>>> to
>>>>>>>> access all workspaces of myJCR repository
>>>>>>>> http://lnv-89012.dfki.uni-sb.****de:9002/server/default/jcr:****
>>>>>>>> rootto<http://lnv-89012.dfki.**uni-sb.de:9002/server/default/**
>>>>>>>> jcr:rootto<http://lnv-89012.dfki.uni-sb.de:9002/server/default/jcr:rootto>
>>>>>>>>
>>>>>>>>> access
>>>>>>>> a single workspace (example with workspace named 'default'). ->
>>>>>>>> this
>>>>>>>> one is also where I can navigate to with my browser, so this
>>>>>>>> should
>>>>>>>> then be
>>>>>>>> the correct path I guess.
>>>>>>>>
>>>>>>>>
>>>>>>>> But I always get the same error about
>>>>>>>> org.apache.stanbol.cmsadapter.****jcr.mapping.JCRRDFMapper
>>>>>>>> Failed to
>>>>>>>> retrieve node having path: <thePath> or its childr
>>>>>>>>
>>>>>>>> I'm an absolute beginner with content repositories, using
>>>>>>>> jackrabbit for
>>>>>>>> the first time and I'm really unsure of what would have to work if
>>>>>>>> everything was correct, but I can see my repository in the
>>>>>>>> jackrabbit
>>>>>>>> console and I also can see that my nodes are existing, and the
>>>>>>>> info
>>>>>>>> command
>>>>>>>> tells me that everything looks like I would expect:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Repository:
>>>>>>>> http://lnv-89012.dfki.uni-sb.****de:9002/rmi<http://lnv-89012.**
>>>>>>>> dfki.uni-sb.de:9002/rmi
>>>>>>>> <http://lnv-89012.dfki.uni-sb.de:9002/rmi>>
>>>>>>>> User : admin
>>>>>>>> Workspace : default
>>>>>>>> Node : /
>>>>>>>>
>>>>>>>> I looked at your paper ("Semantic Content Management with Apache
>>>>>>>> Stanbol") and saw that you used jackrabbit in the demo, too. Is
>>>>>>>> there some
>>>>>>>> publicly accessible repository I could use for testing (so that I
>>>>>>>> see what
>>>>>>>> the path I have to specify looks like in a working example)?
>>>>>>>>
>>>>>>>> best,
>>>>>>>> melanie
>>>>>>>>
>>>>>>>>
>>>>>>>>
>
Re: cmsadapter
Posted by Melanie Reiplinger <me...@dfki.de>.
Hi Suat,
ok, I will retry deletion later.
In the meantime - is it possible to submit a content repo item under a
specific urn to the contenthub? If I re-submit the same items, they are
stored under the same title, but with different urns. In order to get a
specific document back from the contenthub, I always used an id that I
specified at creation. Can I also specify a urn for my repo items when
submitting them via contenthubfeed? I know that this might be
problematic when submitting subtrees recursively, because then only the
root node would have the corresponding urn, but it would also prevent me
from re-submitting the same subtree over and over again. Btw, the POST
does not return the content-id like it does on the contenthub, so if I
don't specify an id at submission, I won't be able to fetch the item
back from the contenthub.
One more thing: suppose the deletion worked - would then all the
duplicates of my content item on the contenthub (created by duplicate
submission of the same subtree) be deleted at once ? (since the deletion
works by path or id which the item has in the content repo)
Thanks,
Melanie
Am 31.08.2012 14:27, schrieb Suat Gönül:
> Hi Melanie,
>
> The deletion problems seems to be related with the bug described in
> STANBOL-727. Could you please retry after that bug is fixed?
>
> Best,
> Suat
>
> On Thu, Aug 30, 2012 at 1:00 PM, Melanie Reiplinger <
> melanie.reiplinger@dfki.de> wrote:
>
>> Hi Suat,
>>
>> thank you a lot for demonstrating this. It seems my mistake was that I did
>> not associate files with the nodes. For no specific reason I assumed that
>> files would be created when the nodes were created. But then I guess that
>> usually, it's the other way around: when building a repo, the files are
>> already there and are then are used to build up the tree.
>>
>> Now how do you delete your 2 content items from the contenthub? The
>> documentation says it's the very same syntax as for submitting items, just
>> using DELETE instead of POST, but that gives me a Bad Request with
>> java.lang.**IllegalArgumentException: No content found for any of the
>> following parameters [entity, content].
>> It does also not work in the REST interface.
>>
>> Best,
>> Melanie
>>
>>
>> Am 27.08.2012 13:42, schrieb Suat Gonul:
>>
>> Hi Melanie,
>>> It is true that a content repo is needed to run unit tests. Anyway, I
>>> tested the Jackrabbit and I shall share the steps with you. I hope they
>>> would work for you too.
>>>
>>> First of all, I was able to create nodes in Jackrabbit through the JCR
>>> API.
>>>
>>> - I ran the jackrabbit-standalone-2.4.2.**jar on the 8080 port.
>>> - Then created temporary nodes with the following code below. The code
>>> create two nodes to be submitted to the Contenthub under the "test"
>>> path. The nodes are associated with two files from the local file
>>> system. So, you should adapt the file paths. 3 external libraries are
>>> required to run this code: jackrabbit-jcr-rmi-2.2.*.jar, jcr-2.0.jar and
>>> slf4j-api-*.jar. They are already downloaded when you build Stanbol into
>>> the maven repository i.e the .m2 folder.
>>>
>>>
>>> Repository repository = new URLRemoteRepository(
>>> "http://localhost:8080/rmi");
>>> Session session = repository.login(new SimpleCredentials("admin",
>>> "admin".toCharArray()));
>>>
>>> Node testNode = null;
>>> try {
>>> testNode = session.getNode("/test");
>>> testNode.remove();
>>> } catch (PathNotFoundException e) {
>>> // ignore
>>> }
>>> Node rootNode = session.getRootNode();
>>> testNode = rootNode.addNode("test");
>>>
>>> File f = new File(
>>> "/home/suat/Desktop/**technicalStuff/stanbolTests/**
>>> cmsAdapter/jackrabbit/news1.**txt");
>>> Node newsNode = testNode.addNode(f.getName(), "nt:file");
>>> Node resourceNode = newsNode.addNode("jcr:content"**,
>>> "nt:resource");
>>> resourceNode.setProperty("jcr:**mimeType", "text/plain");
>>> Binary binary = session.getValueFactory().**createBinary(
>>> new FileInputStream(f));
>>> resourceNode.setProperty("jcr:**data", binary);
>>>
>>> f = new File(
>>> "/home/suat/Desktop/**technicalStuff/stanbolTests/**
>>> cmsAdapter/jackrabbit/news2.**txt");
>>> newsNode = testNode.addNode(f.getName(), "nt:file");
>>> resourceNode = newsNode.addNode("jcr:content"**, "nt:resource");
>>> resourceNode.setProperty("jcr:**mimeType", "text/plain");
>>> binary = session.getValueFactory().**createBinary(new
>>> FileInputStream(f));
>>> resourceNode.setProperty("jcr:**data", binary);
>>> session.save();
>>>
>>> - I ran the Stanbol on 8081 and executed the following commands:
>>> - curl -X GET -H "Accept: text/plain"
>>> "http://localhost:8081/**cmsadapter/session?**repositoryURL=http://**
>>> localhost:8080/rmi&username=**admin&password=admin&**connectionType=JCR<http://localhost:8081/cmsadapter/session?repositoryURL=http://localhost:8080/rmi&username=admin&password=admin&connectionType=JCR>
>>> "
>>> - curl -i -X POST --data
>>> "sessionKey=e92be985-e722-**419f-a1ad-5fe02628b537&path=/**
>>> test&recursive=true"
>>> http://localhost:8081/**cmsadapter/contenthubfeed<http://localhost:8081/cmsadapter/contenthubfeed>
>>>
>>> In the second command the result of the first command should be used.
>>> After executing these commands, I was able to see documents on
>>> http://localhost:8081/**contenthub/contenthub/store<http://localhost:8081/contenthub/contenthub/store>
>>> .
>>>
>>> Best,
>>> Suat
>>>
>>>
>>>
>>> On 08/20/2012 01:11 PM, Melanie Reiplinger wrote:
>>>
>>>> Hi Suat,
>>>>
>>>> Thanks for your reply.
>>>>
>>>>
>>>> Am 20.08.2012 11:55, schrieb Suat Gönül:
>>>>
>>>>> Hi Melanie,
>>>>>
>>>>> Sorry, I could not answer you as I was in holiday. I will start to
>>>>> work on
>>>>> August 27. In my demonstration, I was using CRX CMS.
>>>>>
>>>> That seems to be commercial software. I Cannot use that. So I'll have
>>>> to find another way. Under these conditions, I'm not even sure it
>>>> makes much sense to create unit tests for the JavaScript interface to
>>>> the cmsadapter, since whoever wanted to run them would need to have a
>>>> content repo locally installed to connect stanbol to it. It makes
>>>> sense only if I could set up (or use) a remote repo that's accessible
>>>> from wherever the test script is called...
>>>>
>>>> Best,
>>>> Melanie
>>>>
>>>> But to connect CRX, I
>>>>> have and additional bundle to be added to the OSGi environment. I can
>>>>> provide you that bundle when I'm back.
>>>>>
>>>>> I did not access to the repo via HTTP. In my demonstration, a session is
>>>>> obtained together with a session key after giving the necessary
>>>>> credentials
>>>>> e.g username, password, rmi endpoint. And that session key is used by
>>>>> CMS
>>>>> Adapter to access to the repo.
>>>>>
>>>>> Best,
>>>>> Suat
>>>>>
>>>>> On Mon, Aug 20, 2012 at 12:11 PM, Melanie Reiplinger <
>>>>> melanie.reiplinger@dfki.de> wrote:
>>>>>
>>>>> Hi Suat,
>>>>>> I cannot access my jackrabbit repo via xmlhttp either (although curl
>>>>>> works
>>>>>> fine), so this might as well be a CORS access problem. In your demo,
>>>>>> did
>>>>>> you have to somehow provide access to the repo (by setting headers
>>>>>> etc)?
>>>>>>
>>>>>> Best,
>>>>>> Melanie
>>>>>>
>>>>>> Am 15.08.2012 11:15, schrieb Melanie Reiplinger:
>>>>>>
>>>>>> Hi Suat,
>>>>>>
>>>>>>> Am 13.08.2012 13:35, schrieb Suat Gonul:
>>>>>>>
>>>>>>> In any case, I guess that you
>>>>>>>> need to configure a RDF Bridge through the
>>>>>>>> {stanbol}/system/console/****configMgr interface. There you should
>>>>>>>> find
>>>>>>>> the
>>>>>>>> "Apache Stanbol CMS Adapter Default RDF Bridge Configurations". In
>>>>>>>> that
>>>>>>>> configuration you specify the root path in the CMS to be exported
>>>>>>>> to the
>>>>>>>> RDF.
>>>>>>>>
>>>>>>>> by that you mean the content repository path? This means that I set
>>>>>>>>> there the path to my content repository?
>>>>>>>>>
>>>>>>>>> Yes, you set there a path residing in the content repository.
>>>>>>>> I have set up a jackrabbit workspace with some toy nodes in it. To
>>>>>>>>
>>>>>>>>> access it remotely, I'd configure something like
>>>>>>>>> http://[myserver]/server/
>>>>>>>>> <http://lnv-89012.dfki.uni-sb.****de:9002/server/default/**node1<
>>>>>>>>> http://lnv-89012.dfki.**uni-sb.de:9002/server/default/**node1<http://lnv-89012.dfki.uni-sb.de:9002/server/default/node1>
>>>>>>>>>>> ,
>>>>>>>>> but then
>>>>>>>>> I can work with this repository exclusively, right?
>>>>>>>>>
>>>>>>>>> I cannot access the URL you gave, but I guess you should give
>>>>>>>> /node1
>>>>>>>> path to export it as RDF. I didn't get your question about working
>>>>>>>> exclusively with the repository. But, you already seem to work on the
>>>>>>>> default repository of Jackrabbit running on your server.
>>>>>>>>
>>>>>>>>
>>>>>>>> I tried with several paths, none will work.
>>>>>>> My remote repository stub is
>>>>>>> http://lnv-89012.dfki.uni-sb.****de:9002/rmi<http://lnv-89012.**
>>>>>>> dfki.uni-sb.de:9002/rmi <http://lnv-89012.dfki.uni-sb.de:9002/rmi>>
>>>>>>> .
>>>>>>> (you cannot access those URIs because they are in a closed network)
>>>>>>> For accessing the content repository, I should use (according to my
>>>>>>> jackrabbit guidelines):
>>>>>>> http://lnv-89012.dfki.uni-sb.****de:9002/server<http://lnv-**
>>>>>>> 89012.dfki.uni-sb.de:9002/**server<http://lnv-89012.dfki.uni-sb.de:9002/server>
>>>>>>>> to
>>>>>>> access all workspaces of myJCR repository
>>>>>>> http://lnv-89012.dfki.uni-sb.****de:9002/server/default/jcr:****
>>>>>>> rootto<http://lnv-89012.dfki.**uni-sb.de:9002/server/default/**
>>>>>>> jcr:rootto<http://lnv-89012.dfki.uni-sb.de:9002/server/default/jcr:rootto>
>>>>>>>> access
>>>>>>> a single workspace (example with workspace named 'default'). -> this
>>>>>>> one is also where I can navigate to with my browser, so this should
>>>>>>> then be
>>>>>>> the correct path I guess.
>>>>>>>
>>>>>>>
>>>>>>> But I always get the same error about
>>>>>>> org.apache.stanbol.cmsadapter.****jcr.mapping.JCRRDFMapper Failed to
>>>>>>> retrieve node having path: <thePath> or its childr
>>>>>>>
>>>>>>> I'm an absolute beginner with content repositories, using
>>>>>>> jackrabbit for
>>>>>>> the first time and I'm really unsure of what would have to work if
>>>>>>> everything was correct, but I can see my repository in the jackrabbit
>>>>>>> console and I also can see that my nodes are existing, and the info
>>>>>>> command
>>>>>>> tells me that everything looks like I would expect:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Repository:
>>>>>>> http://lnv-89012.dfki.uni-sb.****de:9002/rmi<http://lnv-89012.**
>>>>>>> dfki.uni-sb.de:9002/rmi <http://lnv-89012.dfki.uni-sb.de:9002/rmi>>
>>>>>>> User : admin
>>>>>>> Workspace : default
>>>>>>> Node : /
>>>>>>>
>>>>>>> I looked at your paper ("Semantic Content Management with Apache
>>>>>>> Stanbol") and saw that you used jackrabbit in the demo, too. Is
>>>>>>> there some
>>>>>>> publicly accessible repository I could use for testing (so that I
>>>>>>> see what
>>>>>>> the path I have to specify looks like in a working example)?
>>>>>>>
>>>>>>> best,
>>>>>>> melanie
>>>>>>>
>>>>>>>
>>>>>>>
Re: cmsadapter
Posted by Suat Gönül <su...@gmail.com>.
Hi Melanie,
The deletion problems seems to be related with the bug described in
STANBOL-727. Could you please retry after that bug is fixed?
Best,
Suat
On Thu, Aug 30, 2012 at 1:00 PM, Melanie Reiplinger <
melanie.reiplinger@dfki.de> wrote:
> Hi Suat,
>
> thank you a lot for demonstrating this. It seems my mistake was that I did
> not associate files with the nodes. For no specific reason I assumed that
> files would be created when the nodes were created. But then I guess that
> usually, it's the other way around: when building a repo, the files are
> already there and are then are used to build up the tree.
>
> Now how do you delete your 2 content items from the contenthub? The
> documentation says it's the very same syntax as for submitting items, just
> using DELETE instead of POST, but that gives me a Bad Request with
> java.lang.**IllegalArgumentException: No content found for any of the
> following parameters [entity, content].
> It does also not work in the REST interface.
>
> Best,
> Melanie
>
>
> Am 27.08.2012 13:42, schrieb Suat Gonul:
>
> Hi Melanie,
>>
>> It is true that a content repo is needed to run unit tests. Anyway, I
>> tested the Jackrabbit and I shall share the steps with you. I hope they
>> would work for you too.
>>
>> First of all, I was able to create nodes in Jackrabbit through the JCR
>> API.
>>
>> - I ran the jackrabbit-standalone-2.4.2.**jar on the 8080 port.
>> - Then created temporary nodes with the following code below. The code
>> create two nodes to be submitted to the Contenthub under the "test"
>> path. The nodes are associated with two files from the local file
>> system. So, you should adapt the file paths. 3 external libraries are
>> required to run this code: jackrabbit-jcr-rmi-2.2.*.jar, jcr-2.0.jar and
>> slf4j-api-*.jar. They are already downloaded when you build Stanbol into
>> the maven repository i.e the .m2 folder.
>>
>>
>> Repository repository = new URLRemoteRepository(
>> "http://localhost:8080/rmi");
>> Session session = repository.login(new SimpleCredentials("admin",
>> "admin".toCharArray()));
>>
>> Node testNode = null;
>> try {
>> testNode = session.getNode("/test");
>> testNode.remove();
>> } catch (PathNotFoundException e) {
>> // ignore
>> }
>> Node rootNode = session.getRootNode();
>> testNode = rootNode.addNode("test");
>>
>> File f = new File(
>> "/home/suat/Desktop/**technicalStuff/stanbolTests/**
>> cmsAdapter/jackrabbit/news1.**txt");
>> Node newsNode = testNode.addNode(f.getName(), "nt:file");
>> Node resourceNode = newsNode.addNode("jcr:content"**,
>> "nt:resource");
>> resourceNode.setProperty("jcr:**mimeType", "text/plain");
>> Binary binary = session.getValueFactory().**createBinary(
>> new FileInputStream(f));
>> resourceNode.setProperty("jcr:**data", binary);
>>
>> f = new File(
>> "/home/suat/Desktop/**technicalStuff/stanbolTests/**
>> cmsAdapter/jackrabbit/news2.**txt");
>> newsNode = testNode.addNode(f.getName(), "nt:file");
>> resourceNode = newsNode.addNode("jcr:content"**, "nt:resource");
>> resourceNode.setProperty("jcr:**mimeType", "text/plain");
>> binary = session.getValueFactory().**createBinary(new
>> FileInputStream(f));
>> resourceNode.setProperty("jcr:**data", binary);
>> session.save();
>>
>> - I ran the Stanbol on 8081 and executed the following commands:
>> - curl -X GET -H "Accept: text/plain"
>> "http://localhost:8081/**cmsadapter/session?**repositoryURL=http://**
>> localhost:8080/rmi&username=**admin&password=admin&**connectionType=JCR<http://localhost:8081/cmsadapter/session?repositoryURL=http://localhost:8080/rmi&username=admin&password=admin&connectionType=JCR>
>> "
>> - curl -i -X POST --data
>> "sessionKey=e92be985-e722-**419f-a1ad-5fe02628b537&path=/**
>> test&recursive=true"
>> http://localhost:8081/**cmsadapter/contenthubfeed<http://localhost:8081/cmsadapter/contenthubfeed>
>>
>> In the second command the result of the first command should be used.
>> After executing these commands, I was able to see documents on
>> http://localhost:8081/**contenthub/contenthub/store<http://localhost:8081/contenthub/contenthub/store>
>> .
>>
>> Best,
>> Suat
>>
>>
>>
>> On 08/20/2012 01:11 PM, Melanie Reiplinger wrote:
>>
>>> Hi Suat,
>>>
>>> Thanks for your reply.
>>>
>>>
>>> Am 20.08.2012 11:55, schrieb Suat Gönül:
>>>
>>>> Hi Melanie,
>>>>
>>>> Sorry, I could not answer you as I was in holiday. I will start to
>>>> work on
>>>> August 27. In my demonstration, I was using CRX CMS.
>>>>
>>>
>>> That seems to be commercial software. I Cannot use that. So I'll have
>>> to find another way. Under these conditions, I'm not even sure it
>>> makes much sense to create unit tests for the JavaScript interface to
>>> the cmsadapter, since whoever wanted to run them would need to have a
>>> content repo locally installed to connect stanbol to it. It makes
>>> sense only if I could set up (or use) a remote repo that's accessible
>>> from wherever the test script is called...
>>>
>>> Best,
>>> Melanie
>>>
>>> But to connect CRX, I
>>>> have and additional bundle to be added to the OSGi environment. I can
>>>> provide you that bundle when I'm back.
>>>>
>>>> I did not access to the repo via HTTP. In my demonstration, a session is
>>>> obtained together with a session key after giving the necessary
>>>> credentials
>>>> e.g username, password, rmi endpoint. And that session key is used by
>>>> CMS
>>>> Adapter to access to the repo.
>>>>
>>>> Best,
>>>> Suat
>>>>
>>>> On Mon, Aug 20, 2012 at 12:11 PM, Melanie Reiplinger <
>>>> melanie.reiplinger@dfki.de> wrote:
>>>>
>>>> Hi Suat,
>>>>>
>>>>> I cannot access my jackrabbit repo via xmlhttp either (although curl
>>>>> works
>>>>> fine), so this might as well be a CORS access problem. In your demo,
>>>>> did
>>>>> you have to somehow provide access to the repo (by setting headers
>>>>> etc)?
>>>>>
>>>>> Best,
>>>>> Melanie
>>>>>
>>>>> Am 15.08.2012 11:15, schrieb Melanie Reiplinger:
>>>>>
>>>>> Hi Suat,
>>>>>
>>>>>> Am 13.08.2012 13:35, schrieb Suat Gonul:
>>>>>>
>>>>>> In any case, I guess that you
>>>>>>> need to configure a RDF Bridge through the
>>>>>>> {stanbol}/system/console/****configMgr interface. There you should
>>>>>>> find
>>>>>>> the
>>>>>>> "Apache Stanbol CMS Adapter Default RDF Bridge Configurations". In
>>>>>>> that
>>>>>>> configuration you specify the root path in the CMS to be exported
>>>>>>> to the
>>>>>>> RDF.
>>>>>>>
>>>>>>> by that you mean the content repository path? This means that I set
>>>>>>>> there the path to my content repository?
>>>>>>>>
>>>>>>>> Yes, you set there a path residing in the content repository.
>>>>>>>
>>>>>>> I have set up a jackrabbit workspace with some toy nodes in it. To
>>>>>>>
>>>>>>>> access it remotely, I'd configure something like
>>>>>>>> http://[myserver]/server/
>>>>>>>> <http://lnv-89012.dfki.uni-sb.****de:9002/server/default/**node1<
>>>>>>>> http://lnv-89012.dfki.**uni-sb.de:9002/server/default/**node1<http://lnv-89012.dfki.uni-sb.de:9002/server/default/node1>
>>>>>>>> >>,
>>>>>>>>
>>>>>>>> but then
>>>>>>>> I can work with this repository exclusively, right?
>>>>>>>>
>>>>>>>> I cannot access the URL you gave, but I guess you should give
>>>>>>> /node1
>>>>>>> path to export it as RDF. I didn't get your question about working
>>>>>>> exclusively with the repository. But, you already seem to work on the
>>>>>>> default repository of Jackrabbit running on your server.
>>>>>>>
>>>>>>>
>>>>>>> I tried with several paths, none will work.
>>>>>> My remote repository stub is
>>>>>> http://lnv-89012.dfki.uni-sb.****de:9002/rmi<http://lnv-89012.**
>>>>>> dfki.uni-sb.de:9002/rmi <http://lnv-89012.dfki.uni-sb.de:9002/rmi>>
>>>>>> .
>>>>>> (you cannot access those URIs because they are in a closed network)
>>>>>> For accessing the content repository, I should use (according to my
>>>>>> jackrabbit guidelines):
>>>>>> http://lnv-89012.dfki.uni-sb.****de:9002/server<http://lnv-**
>>>>>> 89012.dfki.uni-sb.de:9002/**server<http://lnv-89012.dfki.uni-sb.de:9002/server>
>>>>>> >to
>>>>>> access all workspaces of myJCR repository
>>>>>> http://lnv-89012.dfki.uni-sb.****de:9002/server/default/jcr:****
>>>>>> rootto<http://lnv-89012.dfki.**uni-sb.de:9002/server/default/**
>>>>>> jcr:rootto<http://lnv-89012.dfki.uni-sb.de:9002/server/default/jcr:rootto>
>>>>>> >access
>>>>>> a single workspace (example with workspace named 'default'). -> this
>>>>>> one is also where I can navigate to with my browser, so this should
>>>>>> then be
>>>>>> the correct path I guess.
>>>>>>
>>>>>>
>>>>>> But I always get the same error about
>>>>>> org.apache.stanbol.cmsadapter.****jcr.mapping.JCRRDFMapper Failed to
>>>>>> retrieve node having path: <thePath> or its childr
>>>>>>
>>>>>> I'm an absolute beginner with content repositories, using
>>>>>> jackrabbit for
>>>>>> the first time and I'm really unsure of what would have to work if
>>>>>> everything was correct, but I can see my repository in the jackrabbit
>>>>>> console and I also can see that my nodes are existing, and the info
>>>>>> command
>>>>>> tells me that everything looks like I would expect:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Repository:
>>>>>> http://lnv-89012.dfki.uni-sb.****de:9002/rmi<http://lnv-89012.**
>>>>>> dfki.uni-sb.de:9002/rmi <http://lnv-89012.dfki.uni-sb.de:9002/rmi>>
>>>>>> User : admin
>>>>>> Workspace : default
>>>>>> Node : /
>>>>>>
>>>>>> I looked at your paper ("Semantic Content Management with Apache
>>>>>> Stanbol") and saw that you used jackrabbit in the demo, too. Is
>>>>>> there some
>>>>>> publicly accessible repository I could use for testing (so that I
>>>>>> see what
>>>>>> the path I have to specify looks like in a working example)?
>>>>>>
>>>>>> best,
>>>>>> melanie
>>>>>>
>>>>>>
>>>>>>
>>>
>
Re: cmsadapter
Posted by Melanie Reiplinger <me...@dfki.de>.
Hi Suat,
thank you a lot for demonstrating this. It seems my mistake was that I
did not associate files with the nodes. For no specific reason I assumed
that files would be created when the nodes were created. But then I
guess that usually, it's the other way around: when building a repo, the
files are already there and are then are used to build up the tree.
Now how do you delete your 2 content items from the contenthub? The
documentation says it's the very same syntax as for submitting items,
just using DELETE instead of POST, but that gives me a Bad Request with
java.lang.IllegalArgumentException: No content found for any of the
following parameters [entity, content].
It does also not work in the REST interface.
Best,
Melanie
Am 27.08.2012 13:42, schrieb Suat Gonul:
> Hi Melanie,
>
> It is true that a content repo is needed to run unit tests. Anyway, I
> tested the Jackrabbit and I shall share the steps with you. I hope they
> would work for you too.
>
> First of all, I was able to create nodes in Jackrabbit through the JCR API.
>
> - I ran the jackrabbit-standalone-2.4.2.jar on the 8080 port.
> - Then created temporary nodes with the following code below. The code
> create two nodes to be submitted to the Contenthub under the "test"
> path. The nodes are associated with two files from the local file
> system. So, you should adapt the file paths. 3 external libraries are
> required to run this code: jackrabbit-jcr-rmi-2.2.*.jar, jcr-2.0.jar and
> slf4j-api-*.jar. They are already downloaded when you build Stanbol into
> the maven repository i.e the .m2 folder.
>
>
> Repository repository = new URLRemoteRepository(
> "http://localhost:8080/rmi");
> Session session = repository.login(new SimpleCredentials("admin",
> "admin".toCharArray()));
>
> Node testNode = null;
> try {
> testNode = session.getNode("/test");
> testNode.remove();
> } catch (PathNotFoundException e) {
> // ignore
> }
>
> Node rootNode = session.getRootNode();
> testNode = rootNode.addNode("test");
>
> File f = new File(
>
> "/home/suat/Desktop/technicalStuff/stanbolTests/cmsAdapter/jackrabbit/news1.txt");
> Node newsNode = testNode.addNode(f.getName(), "nt:file");
> Node resourceNode = newsNode.addNode("jcr:content", "nt:resource");
> resourceNode.setProperty("jcr:mimeType", "text/plain");
> Binary binary = session.getValueFactory().createBinary(
> new FileInputStream(f));
> resourceNode.setProperty("jcr:data", binary);
>
> f = new File(
>
> "/home/suat/Desktop/technicalStuff/stanbolTests/cmsAdapter/jackrabbit/news2.txt");
> newsNode = testNode.addNode(f.getName(), "nt:file");
> resourceNode = newsNode.addNode("jcr:content", "nt:resource");
> resourceNode.setProperty("jcr:mimeType", "text/plain");
> binary = session.getValueFactory().createBinary(new
> FileInputStream(f));
> resourceNode.setProperty("jcr:data", binary);
>
> session.save();
>
> - I ran the Stanbol on 8081 and executed the following commands:
> - curl -X GET -H "Accept: text/plain"
> "http://localhost:8081/cmsadapter/session?repositoryURL=http://localhost:8080/rmi&username=admin&password=admin&connectionType=JCR"
> - curl -i -X POST --data
> "sessionKey=e92be985-e722-419f-a1ad-5fe02628b537&path=/test&recursive=true"
> http://localhost:8081/cmsadapter/contenthubfeed
>
> In the second command the result of the first command should be used.
> After executing these commands, I was able to see documents on
> http://localhost:8081/contenthub/contenthub/store.
>
> Best,
> Suat
>
>
>
> On 08/20/2012 01:11 PM, Melanie Reiplinger wrote:
>> Hi Suat,
>>
>> Thanks for your reply.
>>
>>
>> Am 20.08.2012 11:55, schrieb Suat Gönül:
>>> Hi Melanie,
>>>
>>> Sorry, I could not answer you as I was in holiday. I will start to
>>> work on
>>> August 27. In my demonstration, I was using CRX CMS.
>>
>> That seems to be commercial software. I Cannot use that. So I'll have
>> to find another way. Under these conditions, I'm not even sure it
>> makes much sense to create unit tests for the JavaScript interface to
>> the cmsadapter, since whoever wanted to run them would need to have a
>> content repo locally installed to connect stanbol to it. It makes
>> sense only if I could set up (or use) a remote repo that's accessible
>> from wherever the test script is called...
>>
>> Best,
>> Melanie
>>
>>> But to connect CRX, I
>>> have and additional bundle to be added to the OSGi environment. I can
>>> provide you that bundle when I'm back.
>>>
>>> I did not access to the repo via HTTP. In my demonstration, a session is
>>> obtained together with a session key after giving the necessary
>>> credentials
>>> e.g username, password, rmi endpoint. And that session key is used by
>>> CMS
>>> Adapter to access to the repo.
>>>
>>> Best,
>>> Suat
>>>
>>> On Mon, Aug 20, 2012 at 12:11 PM, Melanie Reiplinger <
>>> melanie.reiplinger@dfki.de> wrote:
>>>
>>>> Hi Suat,
>>>>
>>>> I cannot access my jackrabbit repo via xmlhttp either (although curl
>>>> works
>>>> fine), so this might as well be a CORS access problem. In your demo,
>>>> did
>>>> you have to somehow provide access to the repo (by setting headers
>>>> etc)?
>>>>
>>>> Best,
>>>> Melanie
>>>>
>>>> Am 15.08.2012 11:15, schrieb Melanie Reiplinger:
>>>>
>>>> Hi Suat,
>>>>> Am 13.08.2012 13:35, schrieb Suat Gonul:
>>>>>
>>>>>> In any case, I guess that you
>>>>>> need to configure a RDF Bridge through the
>>>>>> {stanbol}/system/console/**configMgr interface. There you should find
>>>>>> the
>>>>>> "Apache Stanbol CMS Adapter Default RDF Bridge Configurations". In
>>>>>> that
>>>>>> configuration you specify the root path in the CMS to be exported
>>>>>> to the
>>>>>> RDF.
>>>>>>
>>>>>>> by that you mean the content repository path? This means that I set
>>>>>>> there the path to my content repository?
>>>>>>>
>>>>>> Yes, you set there a path residing in the content repository.
>>>>>>
>>>>>> I have set up a jackrabbit workspace with some toy nodes in it. To
>>>>>>> access it remotely, I'd configure something like
>>>>>>> http://[myserver]/server/
>>>>>>> <http://lnv-89012.dfki.uni-sb.**de:9002/server/default/node1<http://lnv-89012.dfki.uni-sb.de:9002/server/default/node1>>,
>>>>>>>
>>>>>>> but then
>>>>>>> I can work with this repository exclusively, right?
>>>>>>>
>>>>>> I cannot access the URL you gave, but I guess you should give
>>>>>> /node1
>>>>>> path to export it as RDF. I didn't get your question about working
>>>>>> exclusively with the repository. But, you already seem to work on the
>>>>>> default repository of Jackrabbit running on your server.
>>>>>>
>>>>>>
>>>>> I tried with several paths, none will work.
>>>>> My remote repository stub is
>>>>> http://lnv-89012.dfki.uni-sb.**de:9002/rmi<http://lnv-89012.dfki.uni-sb.de:9002/rmi>
>>>>> .
>>>>> (you cannot access those URIs because they are in a closed network)
>>>>> For accessing the content repository, I should use (according to my
>>>>> jackrabbit guidelines):
>>>>> http://lnv-89012.dfki.uni-sb.**de:9002/server<http://lnv-89012.dfki.uni-sb.de:9002/server>to
>>>>> access all workspaces of myJCR repository
>>>>> http://lnv-89012.dfki.uni-sb.**de:9002/server/default/jcr:**rootto<http://lnv-89012.dfki.uni-sb.de:9002/server/default/jcr:rootto>access
>>>>> a single workspace (example with workspace named 'default'). -> this
>>>>> one is also where I can navigate to with my browser, so this should
>>>>> then be
>>>>> the correct path I guess.
>>>>>
>>>>>
>>>>> But I always get the same error about
>>>>> org.apache.stanbol.cmsadapter.**jcr.mapping.JCRRDFMapper Failed to
>>>>> retrieve node having path: <thePath> or its childr
>>>>>
>>>>> I'm an absolute beginner with content repositories, using
>>>>> jackrabbit for
>>>>> the first time and I'm really unsure of what would have to work if
>>>>> everything was correct, but I can see my repository in the jackrabbit
>>>>> console and I also can see that my nodes are existing, and the info
>>>>> command
>>>>> tells me that everything looks like I would expect:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Repository:
>>>>> http://lnv-89012.dfki.uni-sb.**de:9002/rmi<http://lnv-89012.dfki.uni-sb.de:9002/rmi>
>>>>> User : admin
>>>>> Workspace : default
>>>>> Node : /
>>>>>
>>>>> I looked at your paper ("Semantic Content Management with Apache
>>>>> Stanbol") and saw that you used jackrabbit in the demo, too. Is
>>>>> there some
>>>>> publicly accessible repository I could use for testing (so that I
>>>>> see what
>>>>> the path I have to specify looks like in a working example)?
>>>>>
>>>>> best,
>>>>> melanie
>>>>>
>>>>>
>>
Re: cmsadapter
Posted by Suat Gonul <su...@gmail.com>.
Hi Melanie,
It is true that a content repo is needed to run unit tests. Anyway, I
tested the Jackrabbit and I shall share the steps with you. I hope they
would work for you too.
First of all, I was able to create nodes in Jackrabbit through the JCR API.
- I ran the jackrabbit-standalone-2.4.2.jar on the 8080 port.
- Then created temporary nodes with the following code below. The code
create two nodes to be submitted to the Contenthub under the "test"
path. The nodes are associated with two files from the local file
system. So, you should adapt the file paths. 3 external libraries are
required to run this code: jackrabbit-jcr-rmi-2.2.*.jar, jcr-2.0.jar and
slf4j-api-*.jar. They are already downloaded when you build Stanbol into
the maven repository i.e the .m2 folder.
Repository repository = new URLRemoteRepository(
"http://localhost:8080/rmi");
Session session = repository.login(new SimpleCredentials("admin",
"admin".toCharArray()));
Node testNode = null;
try {
testNode = session.getNode("/test");
testNode.remove();
} catch (PathNotFoundException e) {
// ignore
}
Node rootNode = session.getRootNode();
testNode = rootNode.addNode("test");
File f = new File(
"/home/suat/Desktop/technicalStuff/stanbolTests/cmsAdapter/jackrabbit/news1.txt");
Node newsNode = testNode.addNode(f.getName(), "nt:file");
Node resourceNode = newsNode.addNode("jcr:content", "nt:resource");
resourceNode.setProperty("jcr:mimeType", "text/plain");
Binary binary = session.getValueFactory().createBinary(
new FileInputStream(f));
resourceNode.setProperty("jcr:data", binary);
f = new File(
"/home/suat/Desktop/technicalStuff/stanbolTests/cmsAdapter/jackrabbit/news2.txt");
newsNode = testNode.addNode(f.getName(), "nt:file");
resourceNode = newsNode.addNode("jcr:content", "nt:resource");
resourceNode.setProperty("jcr:mimeType", "text/plain");
binary = session.getValueFactory().createBinary(new
FileInputStream(f));
resourceNode.setProperty("jcr:data", binary);
session.save();
- I ran the Stanbol on 8081 and executed the following commands:
- curl -X GET -H "Accept: text/plain"
"http://localhost:8081/cmsadapter/session?repositoryURL=http://localhost:8080/rmi&username=admin&password=admin&connectionType=JCR"
- curl -i -X POST --data
"sessionKey=e92be985-e722-419f-a1ad-5fe02628b537&path=/test&recursive=true"
http://localhost:8081/cmsadapter/contenthubfeed
In the second command the result of the first command should be used.
After executing these commands, I was able to see documents on
http://localhost:8081/contenthub/contenthub/store.
Best,
Suat
On 08/20/2012 01:11 PM, Melanie Reiplinger wrote:
> Hi Suat,
>
> Thanks for your reply.
>
>
> Am 20.08.2012 11:55, schrieb Suat Gönül:
>> Hi Melanie,
>>
>> Sorry, I could not answer you as I was in holiday. I will start to
>> work on
>> August 27. In my demonstration, I was using CRX CMS.
>
>
> That seems to be commercial software. I Cannot use that. So I'll have
> to find another way. Under these conditions, I'm not even sure it
> makes much sense to create unit tests for the JavaScript interface to
> the cmsadapter, since whoever wanted to run them would need to have a
> content repo locally installed to connect stanbol to it. It makes
> sense only if I could set up (or use) a remote repo that's accessible
> from wherever the test script is called...
>
> Best,
> Melanie
>
>> But to connect CRX, I
>> have and additional bundle to be added to the OSGi environment. I can
>> provide you that bundle when I'm back.
>>
>> I did not access to the repo via HTTP. In my demonstration, a session is
>> obtained together with a session key after giving the necessary
>> credentials
>> e.g username, password, rmi endpoint. And that session key is used by
>> CMS
>> Adapter to access to the repo.
>>
>> Best,
>> Suat
>>
>> On Mon, Aug 20, 2012 at 12:11 PM, Melanie Reiplinger <
>> melanie.reiplinger@dfki.de> wrote:
>>
>>> Hi Suat,
>>>
>>> I cannot access my jackrabbit repo via xmlhttp either (although curl
>>> works
>>> fine), so this might as well be a CORS access problem. In your demo,
>>> did
>>> you have to somehow provide access to the repo (by setting headers
>>> etc)?
>>>
>>> Best,
>>> Melanie
>>>
>>> Am 15.08.2012 11:15, schrieb Melanie Reiplinger:
>>>
>>> Hi Suat,
>>>> Am 13.08.2012 13:35, schrieb Suat Gonul:
>>>>
>>>>> In any case, I guess that you
>>>>> need to configure a RDF Bridge through the
>>>>> {stanbol}/system/console/**configMgr interface. There you should find
>>>>> the
>>>>> "Apache Stanbol CMS Adapter Default RDF Bridge Configurations". In
>>>>> that
>>>>> configuration you specify the root path in the CMS to be exported
>>>>> to the
>>>>> RDF.
>>>>>
>>>>>> by that you mean the content repository path? This means that I set
>>>>>> there the path to my content repository?
>>>>>>
>>>>> Yes, you set there a path residing in the content repository.
>>>>>
>>>>> I have set up a jackrabbit workspace with some toy nodes in it. To
>>>>>> access it remotely, I'd configure something like
>>>>>> http://[myserver]/server/
>>>>>> <http://lnv-89012.dfki.uni-sb.**de:9002/server/default/node1<http://lnv-89012.dfki.uni-sb.de:9002/server/default/node1>>,
>>>>>>
>>>>>> but then
>>>>>> I can work with this repository exclusively, right?
>>>>>>
>>>>> I cannot access the URL you gave, but I guess you should give
>>>>> /node1
>>>>> path to export it as RDF. I didn't get your question about working
>>>>> exclusively with the repository. But, you already seem to work on the
>>>>> default repository of Jackrabbit running on your server.
>>>>>
>>>>>
>>>> I tried with several paths, none will work.
>>>> My remote repository stub is
>>>> http://lnv-89012.dfki.uni-sb.**de:9002/rmi<http://lnv-89012.dfki.uni-sb.de:9002/rmi>
>>>> .
>>>> (you cannot access those URIs because they are in a closed network)
>>>> For accessing the content repository, I should use (according to my
>>>> jackrabbit guidelines):
>>>> http://lnv-89012.dfki.uni-sb.**de:9002/server<http://lnv-89012.dfki.uni-sb.de:9002/server>to
>>>> access all workspaces of myJCR repository
>>>> http://lnv-89012.dfki.uni-sb.**de:9002/server/default/jcr:**rootto<http://lnv-89012.dfki.uni-sb.de:9002/server/default/jcr:rootto>access
>>>> a single workspace (example with workspace named 'default'). -> this
>>>> one is also where I can navigate to with my browser, so this should
>>>> then be
>>>> the correct path I guess.
>>>>
>>>>
>>>> But I always get the same error about
>>>> org.apache.stanbol.cmsadapter.**jcr.mapping.JCRRDFMapper Failed to
>>>> retrieve node having path: <thePath> or its childr
>>>>
>>>> I'm an absolute beginner with content repositories, using
>>>> jackrabbit for
>>>> the first time and I'm really unsure of what would have to work if
>>>> everything was correct, but I can see my repository in the jackrabbit
>>>> console and I also can see that my nodes are existing, and the info
>>>> command
>>>> tells me that everything looks like I would expect:
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Repository:
>>>> http://lnv-89012.dfki.uni-sb.**de:9002/rmi<http://lnv-89012.dfki.uni-sb.de:9002/rmi>
>>>> User : admin
>>>> Workspace : default
>>>> Node : /
>>>>
>>>> I looked at your paper ("Semantic Content Management with Apache
>>>> Stanbol") and saw that you used jackrabbit in the demo, too. Is
>>>> there some
>>>> publicly accessible repository I could use for testing (so that I
>>>> see what
>>>> the path I have to specify looks like in a working example)?
>>>>
>>>> best,
>>>> melanie
>>>>
>>>>
>
>
Re: cmsadapter
Posted by Melanie Reiplinger <me...@dfki.de>.
Hi Suat,
Thanks for your reply.
Am 20.08.2012 11:55, schrieb Suat Gönül:
> Hi Melanie,
>
> Sorry, I could not answer you as I was in holiday. I will start to work on
> August 27. In my demonstration, I was using CRX CMS.
That seems to be commercial software. I Cannot use that. So I'll have to
find another way. Under these conditions, I'm not even sure it makes
much sense to create unit tests for the JavaScript interface to the
cmsadapter, since whoever wanted to run them would need to have a
content repo locally installed to connect stanbol to it. It makes sense
only if I could set up (or use) a remote repo that's accessible from
wherever the test script is called...
Best,
Melanie
> But to connect CRX, I
> have and additional bundle to be added to the OSGi environment. I can
> provide you that bundle when I'm back.
>
> I did not access to the repo via HTTP. In my demonstration, a session is
> obtained together with a session key after giving the necessary credentials
> e.g username, password, rmi endpoint. And that session key is used by CMS
> Adapter to access to the repo.
>
> Best,
> Suat
>
> On Mon, Aug 20, 2012 at 12:11 PM, Melanie Reiplinger <
> melanie.reiplinger@dfki.de> wrote:
>
>> Hi Suat,
>>
>> I cannot access my jackrabbit repo via xmlhttp either (although curl works
>> fine), so this might as well be a CORS access problem. In your demo, did
>> you have to somehow provide access to the repo (by setting headers etc)?
>>
>> Best,
>> Melanie
>>
>> Am 15.08.2012 11:15, schrieb Melanie Reiplinger:
>>
>> Hi Suat,
>>> Am 13.08.2012 13:35, schrieb Suat Gonul:
>>>
>>>> In any case, I guess that you
>>>> need to configure a RDF Bridge through the
>>>> {stanbol}/system/console/**configMgr interface. There you should find
>>>> the
>>>> "Apache Stanbol CMS Adapter Default RDF Bridge Configurations". In that
>>>> configuration you specify the root path in the CMS to be exported to the
>>>> RDF.
>>>>
>>>>> by that you mean the content repository path? This means that I set
>>>>> there the path to my content repository?
>>>>>
>>>> Yes, you set there a path residing in the content repository.
>>>>
>>>> I have set up a jackrabbit workspace with some toy nodes in it. To
>>>>> access it remotely, I'd configure something like
>>>>> http://[myserver]/server/
>>>>> <http://lnv-89012.dfki.uni-sb.**de:9002/server/default/node1<http://lnv-89012.dfki.uni-sb.de:9002/server/default/node1>>,
>>>>> but then
>>>>> I can work with this repository exclusively, right?
>>>>>
>>>> I cannot access the URL you gave, but I guess you should give /node1
>>>> path to export it as RDF. I didn't get your question about working
>>>> exclusively with the repository. But, you already seem to work on the
>>>> default repository of Jackrabbit running on your server.
>>>>
>>>>
>>> I tried with several paths, none will work.
>>> My remote repository stub is http://lnv-89012.dfki.uni-sb.**de:9002/rmi<http://lnv-89012.dfki.uni-sb.de:9002/rmi>
>>> .
>>> (you cannot access those URIs because they are in a closed network)
>>> For accessing the content repository, I should use (according to my
>>> jackrabbit guidelines):
>>> http://lnv-89012.dfki.uni-sb.**de:9002/server<http://lnv-89012.dfki.uni-sb.de:9002/server>to access all workspaces of myJCR repository
>>> http://lnv-89012.dfki.uni-sb.**de:9002/server/default/jcr:**rootto<http://lnv-89012.dfki.uni-sb.de:9002/server/default/jcr:rootto>access a single workspace (example with workspace named 'default'). -> this
>>> one is also where I can navigate to with my browser, so this should then be
>>> the correct path I guess.
>>>
>>>
>>> But I always get the same error about
>>> org.apache.stanbol.cmsadapter.**jcr.mapping.JCRRDFMapper Failed to
>>> retrieve node having path: <thePath> or its childr
>>>
>>> I'm an absolute beginner with content repositories, using jackrabbit for
>>> the first time and I'm really unsure of what would have to work if
>>> everything was correct, but I can see my repository in the jackrabbit
>>> console and I also can see that my nodes are existing, and the info command
>>> tells me that everything looks like I would expect:
>>>
>>>
>>>
>>>
>>>
>>> Repository: http://lnv-89012.dfki.uni-sb.**de:9002/rmi<http://lnv-89012.dfki.uni-sb.de:9002/rmi>
>>> User : admin
>>> Workspace : default
>>> Node : /
>>>
>>> I looked at your paper ("Semantic Content Management with Apache
>>> Stanbol") and saw that you used jackrabbit in the demo, too. Is there some
>>> publicly accessible repository I could use for testing (so that I see what
>>> the path I have to specify looks like in a working example)?
>>>
>>> best,
>>> melanie
>>>
>>>
Re: cmsadapter
Posted by Suat Gönül <su...@gmail.com>.
Hi Melanie,
Sorry, I could not answer you as I was in holiday. I will start to work on
August 27. In my demonstration, I was using CRX CMS. But to connect CRX, I
have and additional bundle to be added to the OSGi environment. I can
provide you that bundle when I'm back.
I did not access to the repo via HTTP. In my demonstration, a session is
obtained together with a session key after giving the necessary credentials
e.g username, password, rmi endpoint. And that session key is used by CMS
Adapter to access to the repo.
Best,
Suat
On Mon, Aug 20, 2012 at 12:11 PM, Melanie Reiplinger <
melanie.reiplinger@dfki.de> wrote:
> Hi Suat,
>
> I cannot access my jackrabbit repo via xmlhttp either (although curl works
> fine), so this might as well be a CORS access problem. In your demo, did
> you have to somehow provide access to the repo (by setting headers etc)?
>
> Best,
> Melanie
>
> Am 15.08.2012 11:15, schrieb Melanie Reiplinger:
>
> Hi Suat,
>>
>> Am 13.08.2012 13:35, schrieb Suat Gonul:
>>
>>> In any case, I guess that you
>>> need to configure a RDF Bridge through the
>>> {stanbol}/system/console/**configMgr interface. There you should find
>>> the
>>> "Apache Stanbol CMS Adapter Default RDF Bridge Configurations". In that
>>> configuration you specify the root path in the CMS to be exported to the
>>> RDF.
>>>
>>>> by that you mean the content repository path? This means that I set
>>>> there the path to my content repository?
>>>>
>>> Yes, you set there a path residing in the content repository.
>>>
>>> I have set up a jackrabbit workspace with some toy nodes in it. To
>>>> access it remotely, I'd configure something like
>>>> http://[myserver]/server/
>>>> <http://lnv-89012.dfki.uni-sb.**de:9002/server/default/node1<http://lnv-89012.dfki.uni-sb.de:9002/server/default/node1>>,
>>>> but then
>>>> I can work with this repository exclusively, right?
>>>>
>>> I cannot access the URL you gave, but I guess you should give /node1
>>> path to export it as RDF. I didn't get your question about working
>>> exclusively with the repository. But, you already seem to work on the
>>> default repository of Jackrabbit running on your server.
>>>
>>>
>> I tried with several paths, none will work.
>> My remote repository stub is http://lnv-89012.dfki.uni-sb.**de:9002/rmi<http://lnv-89012.dfki.uni-sb.de:9002/rmi>
>> .
>> (you cannot access those URIs because they are in a closed network)
>> For accessing the content repository, I should use (according to my
>> jackrabbit guidelines):
>> http://lnv-89012.dfki.uni-sb.**de:9002/server<http://lnv-89012.dfki.uni-sb.de:9002/server>to access all workspaces of myJCR repository
>> http://lnv-89012.dfki.uni-sb.**de:9002/server/default/jcr:**rootto<http://lnv-89012.dfki.uni-sb.de:9002/server/default/jcr:rootto>access a single workspace (example with workspace named 'default'). -> this
>> one is also where I can navigate to with my browser, so this should then be
>> the correct path I guess.
>>
>>
>> But I always get the same error about
>> org.apache.stanbol.cmsadapter.**jcr.mapping.JCRRDFMapper Failed to
>> retrieve node having path: <thePath> or its childr
>>
>> I'm an absolute beginner with content repositories, using jackrabbit for
>> the first time and I'm really unsure of what would have to work if
>> everything was correct, but I can see my repository in the jackrabbit
>> console and I also can see that my nodes are existing, and the info command
>> tells me that everything looks like I would expect:
>>
>>
>>
>>
>>
>> Repository: http://lnv-89012.dfki.uni-sb.**de:9002/rmi<http://lnv-89012.dfki.uni-sb.de:9002/rmi>
>> User : admin
>> Workspace : default
>> Node : /
>>
>> I looked at your paper ("Semantic Content Management with Apache
>> Stanbol") and saw that you used jackrabbit in the demo, too. Is there some
>> publicly accessible repository I could use for testing (so that I see what
>> the path I have to specify looks like in a working example)?
>>
>> best,
>> melanie
>>
>>
>
Re: cmsadapter
Posted by Melanie Reiplinger <me...@dfki.de>.
Hi Suat,
I cannot access my jackrabbit repo via xmlhttp either (although curl
works fine), so this might as well be a CORS access problem. In your
demo, did you have to somehow provide access to the repo (by setting
headers etc)?
Best,
Melanie
Am 15.08.2012 11:15, schrieb Melanie Reiplinger:
> Hi Suat,
>
> Am 13.08.2012 13:35, schrieb Suat Gonul:
>> In any case, I guess that you
>> need to configure a RDF Bridge through the
>> {stanbol}/system/console/configMgr interface. There you should find the
>> "Apache Stanbol CMS Adapter Default RDF Bridge Configurations". In that
>> configuration you specify the root path in the CMS to be exported to the
>> RDF.
>>> by that you mean the content repository path? This means that I set
>>> there the path to my content repository?
>> Yes, you set there a path residing in the content repository.
>>
>>> I have set up a jackrabbit workspace with some toy nodes in it. To
>>> access it remotely, I'd configure something like
>>> http://[myserver]/server/
>>> <http://lnv-89012.dfki.uni-sb.de:9002/server/default/node1>, but then
>>> I can work with this repository exclusively, right?
>> I cannot access the URL you gave, but I guess you should give /node1
>> path to export it as RDF. I didn't get your question about working
>> exclusively with the repository. But, you already seem to work on the
>> default repository of Jackrabbit running on your server.
>>
>
> I tried with several paths, none will work.
> My remote repository stub is http://lnv-89012.dfki.uni-sb.de:9002/rmi.
> (you cannot access those URIs because they are in a closed network)
> For accessing the content repository, I should use (according to my
> jackrabbit guidelines):
> http://lnv-89012.dfki.uni-sb.de:9002/server to access all workspaces
> of myJCR repository
> http://lnv-89012.dfki.uni-sb.de:9002/server/default/jcr:rootto access
> a single workspace (example with workspace named 'default'). -> this
> one is also where I can navigate to with my browser, so this should
> then be the correct path I guess.
>
>
> But I always get the same error about
> org.apache.stanbol.cmsadapter.jcr.mapping.JCRRDFMapper Failed to
> retrieve node having path: <thePath> or its childr
>
> I'm an absolute beginner with content repositories, using jackrabbit
> for the first time and I'm really unsure of what would have to work if
> everything was correct, but I can see my repository in the jackrabbit
> console and I also can see that my nodes are existing, and the info
> command tells me that everything looks like I would expect:
>
>
>
>
>
> Repository: http://lnv-89012.dfki.uni-sb.de:9002/rmi
> User : admin
> Workspace : default
> Node : /
>
> I looked at your paper ("Semantic Content Management with Apache
> Stanbol") and saw that you used jackrabbit in the demo, too. Is there
> some publicly accessible repository I could use for testing (so that I
> see what the path I have to specify looks like in a working example)?
>
> best,
> melanie
>
Re: cmsadapter
Posted by Melanie Reiplinger <me...@dfki.de>.
Hi Suat,
Am 13.08.2012 13:35, schrieb Suat Gonul:
> In any case, I guess that you
> need to configure a RDF Bridge through the
> {stanbol}/system/console/configMgr interface. There you should find the
> "Apache Stanbol CMS Adapter Default RDF Bridge Configurations". In that
> configuration you specify the root path in the CMS to be exported to the
> RDF.
>> by that you mean the content repository path? This means that I set
>> there the path to my content repository?
> Yes, you set there a path residing in the content repository.
>
>> I have set up a jackrabbit workspace with some toy nodes in it. To
>> access it remotely, I'd configure something like
>> http://[myserver]/server/
>> <http://lnv-89012.dfki.uni-sb.de:9002/server/default/node1>, but then
>> I can work with this repository exclusively, right?
> I cannot access the URL you gave, but I guess you should give /node1
> path to export it as RDF. I didn't get your question about working
> exclusively with the repository. But, you already seem to work on the
> default repository of Jackrabbit running on your server.
>
I tried with several paths, none will work.
My remote repository stub is http://lnv-89012.dfki.uni-sb.de:9002/rmi.
(you cannot access those URIs because they are in a closed network)
For accessing the content repository, I should use (according to my
jackrabbit guidelines):
http://lnv-89012.dfki.uni-sb.de:9002/server to access all workspaces of
myJCR repository
http://lnv-89012.dfki.uni-sb.de:9002/server/default/jcr:rootto access a
single workspace (example with workspace named 'default'). -> this one
is also where I can navigate to with my browser, so this should then be
the correct path I guess.
But I always get the same error about
org.apache.stanbol.cmsadapter.jcr.mapping.JCRRDFMapper Failed to
retrieve node having path: <thePath> or its childr
I'm an absolute beginner with content repositories, using jackrabbit for
the first time and I'm really unsure of what would have to work if
everything was correct, but I can see my repository in the jackrabbit
console and I also can see that my nodes are existing, and the info
command tells me that everything looks like I would expect:
Repository: http://lnv-89012.dfki.uni-sb.de:9002/rmi
User : admin
Workspace : default
Node : /
I looked at your paper ("Semantic Content Management with Apache
Stanbol") and saw that you used jackrabbit in the demo, too. Is there
some publicly accessible repository I could use for testing (so that I
see what the path I have to specify looks like in a working example)?
best,
melanie
Re: cmsadapter
Posted by Suat Gonul <su...@gmail.com>.
Hi,
On 08/13/2012 01:44 PM, Melanie Reiplinger wrote:
> Hi Suat,
>
> Am 13.08.2012 11:20, schrieb Suat Gonul:
>> Hi again Melanie,
>>
>> On 08/11/2012 04:30 PM, Melanie Reiplinger wrote:
>>> Hi Stanbol people,
>>>
>>> I have a few questions concerning the cmsadapter.
>>>
>>> 1)
>>> To map a content repository to an RDF graph,
>>>
>>> curl -i -X POST -d
>>> "sessionKey=eec8ff46-aaf9-485f-a7b5-452c1d7197d0&baseURI=[some_uri]&store=true"
>>>
>>> http://[stanbol]/cmsadapter/map/cms
>>>
>>> does not work for me. (I get 500 internal server error)
>> Maybe the logs may indicate something.
> log is:
>
> 13.08.2012 13:43:26.423 *WARN* [30251362@qtp-23261232-111]
> org.apache.stanbol.cmsadapter.jcr.mapping.JCRRDFMapper Failed to
> retrieve node having path: /rdfmaptest or its children
>
> ok, so I need to configure the path.
>
>> In any case, I guess that you
>> need to configure a RDF Bridge through the
>> {stanbol}/system/console/configMgr interface. There you should find the
>> "Apache Stanbol CMS Adapter Default RDF Bridge Configurations". In that
>> configuration you specify the root path in the CMS to be exported to the
>> RDF.
>
> by that you mean the content repository path? This means that I set
> there the path to my content repository?
Yes, you set there a path residing in the content repository.
> I have set up a jackrabbit workspace with some toy nodes in it. To
> access it remotely, I'd configure something like
> http://[myserver]/server/
> <http://lnv-89012.dfki.uni-sb.de:9002/server/default/node1>, but then
> I can work with this repository exclusively, right?
I cannot access the URL you gave, but I guess you should give /node1
path to export it as RDF. I didn't get your question about working
exclusively with the repository. But, you already seem to work on the
default repository of Jackrabbit running on your server.
Best,
Suat
>
>>> The documentation says:
>>> *"baseURI*is a mandatory parameter that is used as the base URI of the
>>> RDF to be generated."
>>>
>>> Why is this baseURI needed here as mandatory parameter, if the RDF
>>> graph is returned to the user in application/rdf+xml format?
>>>
>>> And what can I specify as baseURI (does it work with a local file path
>>> or directory path)?
>> You should be able to specify any URI for the base URI. While
>> transforming the nodes to RDF, corresponding rdf:resources are
>> identified by appending the identifiers of the nodes to the baseURI e.g.
>> <rdf:Description
>> rdf:about="http://www.apache.org/stanbol/cms#432271b6-80a5-41e9-89c0-bc8623c1ad97">
>>
>> ....
>>
>>> 2)
>>> For the contenthubfeed, I wanted to submit a content item with path
>>> 'node1/node2' from my repository with:
>>> curl -i -X POST --data
>>> "sessionKey=5d934b53-dc33-4d9c-884f-c16c8ba872af&path=/node1/node2&recursive=true"
>>>
>>> http://lnv-89012.dfki.uni-sb.de:9001/cmsadapter/contenthubfeed
>>> I get 200 OK, but when I look on the contenthub, nothing has changed,
>>> no new items are listed.
>>>
>>> Would it notify me in case it cannot find my repository item (e.g. for
>>> wrong name or wrong path)?
>> This can be seen from the logs.
>
> ok, it couldn't resolve the path:
>
> 13.08.2012 13:43:32.576 *WARN* [30251362@qtp-23261232-111]
> org.apache.stanbol.cmsadapter.jcr.mapping.JCRContenthubFeeder Failed
> to obtain the item specified by the path: /node1/node2
> javax.jcr.PathNotFoundException: /node1/node2
>
> but that's also due to the wrong content repository path.
>
> g
> melanie
>
>> Considering the possibility of checking
>> multiple items when recursive=true, I had not passed the exception to
>> the client side. Maybe this should be improved...
>>
>> Best,
>> Suat
>>
>>> (I was trying for JCR/RMI)
>>>
>>> Thanks,
>>> melanie
>>>
>
>
Re: cmsadapter
Posted by Melanie Reiplinger <me...@dfki.de>.
Hi Suat,
Am 13.08.2012 11:20, schrieb Suat Gonul:
> Hi again Melanie,
>
> On 08/11/2012 04:30 PM, Melanie Reiplinger wrote:
>> Hi Stanbol people,
>>
>> I have a few questions concerning the cmsadapter.
>>
>> 1)
>> To map a content repository to an RDF graph,
>>
>> curl -i -X POST -d
>> "sessionKey=eec8ff46-aaf9-485f-a7b5-452c1d7197d0&baseURI=[some_uri]&store=true"
>> http://[stanbol]/cmsadapter/map/cms
>>
>> does not work for me. (I get 500 internal server error)
> Maybe the logs may indicate something.
log is:
13.08.2012 13:43:26.423 *WARN* [30251362@qtp-23261232-111]
org.apache.stanbol.cmsadapter.jcr.mapping.JCRRDFMapper Failed to
retrieve node having path: /rdfmaptest or its children
ok, so I need to configure the path.
> In any case, I guess that you
> need to configure a RDF Bridge through the
> {stanbol}/system/console/configMgr interface. There you should find the
> "Apache Stanbol CMS Adapter Default RDF Bridge Configurations". In that
> configuration you specify the root path in the CMS to be exported to the
> RDF.
by that you mean the content repository path? This means that I set
there the path to my content repository? I have set up a jackrabbit
workspace with some toy nodes in it. To access it remotely, I'd
configure something like http://[myserver]/server/
<http://lnv-89012.dfki.uni-sb.de:9002/server/default/node1>, but then I
can work with this repository exclusively, right?
>> The documentation says:
>> *"baseURI*is a mandatory parameter that is used as the base URI of the
>> RDF to be generated."
>>
>> Why is this baseURI needed here as mandatory parameter, if the RDF
>> graph is returned to the user in application/rdf+xml format?
>>
>> And what can I specify as baseURI (does it work with a local file path
>> or directory path)?
> You should be able to specify any URI for the base URI. While
> transforming the nodes to RDF, corresponding rdf:resources are
> identified by appending the identifiers of the nodes to the baseURI e.g.
> <rdf:Description
> rdf:about="http://www.apache.org/stanbol/cms#432271b6-80a5-41e9-89c0-bc8623c1ad97">
> ....
>
>> 2)
>> For the contenthubfeed, I wanted to submit a content item with path
>> 'node1/node2' from my repository with:
>> curl -i -X POST --data
>> "sessionKey=5d934b53-dc33-4d9c-884f-c16c8ba872af&path=/node1/node2&recursive=true"
>> http://lnv-89012.dfki.uni-sb.de:9001/cmsadapter/contenthubfeed
>> I get 200 OK, but when I look on the contenthub, nothing has changed,
>> no new items are listed.
>>
>> Would it notify me in case it cannot find my repository item (e.g. for
>> wrong name or wrong path)?
> This can be seen from the logs.
ok, it couldn't resolve the path:
13.08.2012 13:43:32.576 *WARN* [30251362@qtp-23261232-111]
org.apache.stanbol.cmsadapter.jcr.mapping.JCRContenthubFeeder Failed to
obtain the item specified by the path: /node1/node2
javax.jcr.PathNotFoundException: /node1/node2
but that's also due to the wrong content repository path.
g
melanie
> Considering the possibility of checking
> multiple items when recursive=true, I had not passed the exception to
> the client side. Maybe this should be improved...
>
> Best,
> Suat
>
>> (I was trying for JCR/RMI)
>>
>> Thanks,
>> melanie
>>
Re: cmsadapter
Posted by Suat Gonul <su...@gmail.com>.
Hi again Melanie,
On 08/11/2012 04:30 PM, Melanie Reiplinger wrote:
> Hi Stanbol people,
>
> I have a few questions concerning the cmsadapter.
>
> 1)
> To map a content repository to an RDF graph,
>
> curl -i -X POST -d
> "sessionKey=eec8ff46-aaf9-485f-a7b5-452c1d7197d0&baseURI=[some_uri]&store=true"
> http://[stanbol]/cmsadapter/map/cms
>
> does not work for me. (I get 500 internal server error)
Maybe the logs may indicate something. In any case, I guess that you
need to configure a RDF Bridge through the
{stanbol}/system/console/configMgr interface. There you should find the
"Apache Stanbol CMS Adapter Default RDF Bridge Configurations". In that
configuration you specify the root path in the CMS to be exported to the
RDF.
> The documentation says:
> *"baseURI*is a mandatory parameter that is used as the base URI of the
> RDF to be generated."
>
> Why is this baseURI needed here as mandatory parameter, if the RDF
> graph is returned to the user in application/rdf+xml format?
>
> And what can I specify as baseURI (does it work with a local file path
> or directory path)?
You should be able to specify any URI for the base URI. While
transforming the nodes to RDF, corresponding rdf:resources are
identified by appending the identifiers of the nodes to the baseURI e.g.
<rdf:Description
rdf:about="http://www.apache.org/stanbol/cms#432271b6-80a5-41e9-89c0-bc8623c1ad97">
....
>
> 2)
> For the contenthubfeed, I wanted to submit a content item with path
> 'node1/node2' from my repository with:
> curl -i -X POST --data
> "sessionKey=5d934b53-dc33-4d9c-884f-c16c8ba872af&path=/node1/node2&recursive=true"
> http://lnv-89012.dfki.uni-sb.de:9001/cmsadapter/contenthubfeed
> I get 200 OK, but when I look on the contenthub, nothing has changed,
> no new items are listed.
>
> Would it notify me in case it cannot find my repository item (e.g. for
> wrong name or wrong path)?
This can be seen from the logs. Considering the possibility of checking
multiple items when recursive=true, I had not passed the exception to
the client side. Maybe this should be improved...
Best,
Suat
>
> (I was trying for JCR/RMI)
>
> Thanks,
> melanie
>