mysema / rdfbean

RDFBean - Object/RDF persistence for Java
19 stars 5 forks source link

RDFBean queries don't work with the Sesame HTTPRepository #42

Closed timowest closed 11 years ago

timowest commented 11 years ago

RDFBean creates Sesame queries programmatically, but those can't be serialized when the HTTPRepository type is used.

org.openrdf.repository.RepositoryException: Unknown query language: DIRECTQUERY
    at org.openrdf.http.client.HTTPClient.handleHTTPError(HTTPClient.java:953)
    at org.openrdf.http.client.HTTPClient.sendGraphQueryViaHttp(HTTPClient.java:847)
    at org.openrdf.http.client.HTTPClient.getRDFBackground(HTTPClient.java:741)
    at org.openrdf.http.client.HTTPClient.sendGraphQuery(HTTPClient.java:413)
    at org.openrdf.repository.http.HTTPGraphQuery.evaluate(HTTPGraphQuery.java:53)
    at com.mysema.rdfbean.sesame.GraphQueryImpl.getTriples(GraphQueryImpl.java:48)
    at com.mysema.rdfbean.model.RDFQueryImpl.construct(RDFQueryImpl.java:90)
    at com.mysema.rdfbean.object.SessionImpl.findInstances(SessionImpl.java:889)
    at com.mysema.rdfbean.object.SessionImpl.findInstances(SessionImpl.java:855)
    at org.springframework.data.rdf.repository.RdfRepositoryImpl.getAll(RdfRepositoryImpl.java:221)
    at org.springframework.data.rdf.repository.RdfRepositoryImpl.findAll(RdfRepositoryImpl.java:113)
    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:601)
    at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:333)
    at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:318)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
    at com.sun.proxy.$Proxy20.findAll(Unknown Source)
marek-surek commented 11 years ago

That is probably my case because I use HTTPRepository.

timowest commented 11 years ago

I will take a look at this in the weekend.

marek-surek commented 11 years ago

thank you

timowest commented 11 years ago

Should work better now. Could you try?

marek-surek commented 11 years ago

Sorry for late reply... today Im bit without internet. I run the problematic thing in our app and it worked as expected. Therefore I think we can consider it as fixed. Thank you. Tommorow I'll test it intensively. If any problem appear, I will inform you.

marek-surek commented 11 years ago

In all situations I've tested, it worked. I close this ticket.