Hi George,

Here is something that might work, please give it a try.

1. Leave all the @prefix declarations pointing to the old namespace, both in 
the mapping file and in the assembler file:
http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#

2. In the assembler file, find the following line:

<> ja:imports d2rq: .

and change it to:

<> ja:imports <http://d2rq.org/terms/d2rq> .

If it works, please let me know and I’ll update that information in the 
documentation.

Thanks,
Richard



On 6 Dec 2013, at 22:36, Campbell,George <campb...@oclc.org> wrote:

> Richard,
> 
> The problem is the d2rq assembler spec file expects the namespaces to
> match:
> 
> ―――――――――――――
> @prefix : <#> .
> @prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
> @prefix d2rq: <http://d2rq.org/terms/d2rq> .    <― had to change this
> 
> <> ja:imports d2rq: .
> 
> :demoModel
>    a d2rq:D2RQModel;
>    d2rq:mappingFile <demo-mapping.ttl>;
>    d2rq:resourceBaseURI <http://localhost:8080/demo/>;
>    .
> 
> ―――――――――――――
> 
> 
> The demo mapping looks something like this:
> 
> ―――――――――――――
> 
> @prefix map: <#> .
> @prefix db: <> .
> @prefix vocab: <vocab/> .
> @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
> @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
> @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
> @prefix d2rq: <http://d2rq.org/terms/d2rq> .  <― had to change this,
> didn’t work with http://www.wiwiss...
> @prefix jdbc: <http://d2rq.org/terms/jdbc/> .
> 
> map:database a d2rq:Database;
>       d2rq:jdbcDriver "org.hsqldb.jdbc.JDBCDriver";
>       d2rq:jdbcDSN "jdbc:hsqldb:mem:demo_service_db";
>       d2rq:username "sa";
>       d2rq:password "";
>       jdbc:autoReconnect "true";
>       jdbc:zeroDateTimeBehavior "convertToNull";
>       .
> 
> # Table BOOK
> map:BOOK a d2rq:ClassMap;
>       d2rq:dataStorage map:database;
>       d2rq:uriPattern "books/@@BOOK.ID|urlify@@";
>       d2rq:class vocab:book;
>       d2rq:classDefinitionLabel "BOOK";
>       .
> ―――――――――――――
> 
> 
> 
> The error we get is:
> 
> 2013-12-06 17:29:26,486 ERROR [RMI TCP Connection(4)-127.0.0.1hread]
> ContextLoader - Context initialization failed
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'rdfService' defined in ServletContext resource
> [/WEB-INF/spring/dispatcher-servlet.xml]: Instantiation of bean failed;
> nested exception is org.springframework.beans.BeanInstantiationException:
> Could not instantiate bean class
> [org.oclc.platform.f4s.demo.service.RdfService]: Constructor threw
> exception; nested exception is
> com.hp.hpl.jena.assembler.exceptions.NoSpecificTypeException: the root
> file:////Users/campbelg/intellij_workspace/f4s/demo-service/webapp/target/p
> latform-f4s-demo-ws-0.1.0-SNAPSHOT/WEB-INF/classes/d2rq_assembler_spec.ttl#
> demoModel has no most specific type that is a subclass of ja:Object
> 
> 
> 
> Thanks,
> George
> -----------------------------------------------------------------------
> George Campbell
> Sr. Software Engineer
> OCLC Dublin, OH
> 614-764-6227
> 
> 
> 
> 
> On 12/6/13, 5:21 PM, "Richard Cyganiak" <rich...@cyganiak.de> wrote:
> 
>> George,
>> 
>> Could you maybe tell me what you’re doing and in what way exactly it is
>> failing? Then I can look for a workaround that works for you. Is it the
>> Jena assembler or something else?
>> 
>> (If it was just a matter of changing that one file, we would have done it
>> years ago. Updating the file will do nothing unless we update the D2RQ
>> source code too. Updating the source code will break all sorts of things
>> for users of D2RQ with existing mappings and existing code that interacts
>> with D2RQ. Changing a URI that has been hardcoded into production systems
>> for the last nine years requires a bit of thought and planning. I’d like
>> to focus on finding a workaround for the immediate problem, and solve the
>> underlying issue later.)
>> 
>> Best,
>> Richard
>> 
>> 
>> 
>> On 6 Dec 2013, at 21:42, Campbell,George <campb...@oclc.org> wrote:
>> 
>>> Richard,
>>> 
>>> I appreciate the response, and I know how hard it is to maintain a
>>> legacy
>>> project.
>>> 
>>> My understanding is that if we are going to host the d2rq namespace
>>> officially as http://d2rq.org/terms/d2rq instead of
>>> http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1, then the file
>>> located
>>> at http://d2rq.org/terms/d2rq has to be edited to remove all references
>>> (there are two) to http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1,
>>> and
>>> replace them with http://d2rq.org/terms/d2rq.
>>> 
>>> I¹ve attached a copy of http://d2rq.org/terms/d2rq which I believe is
>>> correct (lines 1 and 16 edited to remove references to
>>> http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1). If you can post
>>> that
>>> file, we can run tests against it and report back to you.
>>> 
>>> Thanks,
>>> George
>>> 
>>> -----------------------------------------------------------------------
>>> George Campbell
>>> Sr. Software Engineer
>>> OCLC Dublin, OH
>>> 614-764-6227
>>> 
>>> 
>>> 
>>> 
>>> On 12/6/13, 4:07 PM, "Richard Cyganiak" <rich...@cyganiak.de> wrote:
>>> 
>>>> George,
>>>> 
>>>> I¹m trying to get the redirect fixed, but all people involved in any
>>>> way
>>>> with D2RQ have left Free University Berlin years ago, and the web team
>>>> there doesn¹t seem to have a lot of interest in fixing problems for
>>>> someone who worked there in 2006.
>>>> 
>>>> It¹s clear that we need to change the namespace to something that¹s
>>>> more
>>>> directly under the project¹s control, but this will not happen
>>>> overnight.
>>>> 
>>>> Why exactly do you say that ³there is no way to use D2RQ² while the
>>>> redirect is broken? Nothing in D2RQ itself depends on downloading
>>>> anything from that location. Is it the Jena Assembler that¹s causing
>>>> you
>>>> the problem, or something else?
>>>> 
>>>> Best,
>>>> Richard
>>>> 
>>>> 
>>>> On 5 Dec 2013, at 15:23, Campbell,George <campb...@oclc.org> wrote:
>>>> 
>>>>> We enjoy using this excellent project.
>>>>> 
>>>>> However, I have a d2rq namespace issue.
>>>>> 
>>>>> We were referencing
>>>>> http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1,
>>>>> which since around late 2012 had been redirecting to
>>>>> http://d2rq.org/terms/d2rq.
>>>>> 
>>>>> Last week some time this redirect was broken. If the redirect cannot
>>>>> be
>>>>> restored, then we need to start referring to the new location
>>>>> directly.
>>>>> And if that is the case, the file at  http://d2rq.org/terms/d2rq needs
>>>>> to be edited so that it refers to namespaces at http://d2rq.org
>>>>> instead
>>>>> of http://www.wiwiss.fu-berlin.de.
>>>>> 
>>>>> As it stands today, there is no way to use d2rq.
>>>>> 
>>>>> Thank you.
>>>>> 
>>>>> -----------------------------------------------------------------------
>>>>> George Campbell
>>>>> Sr. Software Engineer
>>>>> OCLC Dublin, OH
>>>>> 614-764-6227
>>>>> 
>>>>> 
>>>>> -----------------------------------------------------------------------
>>>>> --
>>>>> -----
>>>>> Sponsored by Intel(R) XDK
>>>>> Develop, test and display web and hybrid apps with a single code base.
>>>>> Download it for free now!
>>>>> 
>>>>> 
>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.c
>>>>> lk
>>>>> trk_______________________________________________
>>>>> d2rq-map-devel mailing list
>>>>> d2rq-map-devel@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/d2rq-map-devel
>>>> 
>>> 
>>> 
>>> <d2rq.ttl>---------------------------------------------------------------
>>> ---------------
>>> Sponsored by Intel(R) XDK
>>> Develop, test and display web and hybrid apps with a single code base.
>>> Download it for free now!
>>> 
>>> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clk
>>> trk_______________________________________________
>>> d2rq-map-devel mailing list
>>> d2rq-map-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/d2rq-map-devel
>> 
> 


------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
d2rq-map-devel mailing list
d2rq-map-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/d2rq-map-devel

Reply via email to