Scenario -

  1. Jena API
  2. Play framework 2
  3. Database server - fuseki
  4. Database - TDB

Problem - I have insert query in module, when I fill information in HTML form I am getting error like [NullPointerException: null] error points at where I am closing my datasource which is at the bottom of method ds.close(); interesting thing is that when I commented //ds.close(); error shifts to the UpdateAction.parseExecute(query1, graph); and because of this I am not able to see filled form information.

Most interesting thing is that when I am writing select * where {?a ?b ?n} on fuseki database server I can see inserted data. Means data is getting stored.

I am really confused, any thought on this will be appreciated.

Thanks.

asked 24 Jul '12, 07:40

nishikant's gravatar image

nishikant
6916
accept rate: 0%

Could you add more of your code to your question.

(24 Jul '12, 10:04) Jerven Jerven's gravatar image

Imperium is a plugin for Play 1 which provides an alternate JPA implementation, one that is backed by any triple store supported by the Sesame or Jena APIs (via Empire), that you can use more or less the exact same way as you do with its current JPA support.

Imperium is a little out of date, it was not updated for the Play! 1 module registry, though that would be fairly straightforward to do. I don't know what would be entailed for updating it to Play! 2, I'm not aware of all the specifics regarding API changes between the two versions, but there's not a lot of glue code in Imperium so I bet it would be pretty easy to just port it over to Play! 2.

The convenience it provides it that you don't have to worry about the details of working with the triple store, you can do the normal CRUD operations on your Empire-annotated Java beans and it will handle the details of persisting them into your triplestore, TDB in this case. And if you need to switch off TDB for, say SDB, or a Sesame based database, you don't have to change your application code, only your Play! configuration.

I know that doesn't really address the NPE you're seeing, but you have not provided enough information to diagnose that. But I did want to let you know that there are options out there for integration between the Play! framework and the semantic web.

link

answered 24 Jul '12, 10:06

mhgrove's gravatar image

mhgrove
3.2k17
accept rate: 28%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×578
×60
×51
×18

Asked: 24 Jul '12, 07:40

Seen: 1,356 times

Last updated: 01 Nov '12, 06:11