Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [rdf4j-dev] Error: Sail is not initialized or has been shut down

Hi Håvard,

I crean up my code. Do I need delete that AbstractShaclFowardChainingInferencerConnection class? Now I am working on 
Implement a minimal AST to support minCount and Make ShaclSail generate the AST from a shacl file sub tasks.

Thank you,
regards,
Heshan

On Mon, Jun 5, 2017 at 4:21 PM, Håvard Ottestad <hmottestad@xxxxxxxxx> wrote:
That's much better :)

Can you clean up your code, so it's as short as possible. You should be left with only the following classes:

Main2
ShaclSail
ShaclSailConnection

And delete any unused code.

I've attached some diagrams for the next steps. Page numbers are listed for some of the tasks.

Next goal is to manage to validate minCount: 

 - Implement a minimal AST to support minCount (page 1)
 - Make ShaclSail generate the AST from a shacl file
 - Implement a minimal set of classes to support a plan (page 2)
 - Make your AST generate the plan (page 2)
 - Call your plan on connection.commit() and throw an exception if the data is invalid (page 3)

When this works and you've created a couple of tests you can continue onto the next steps. Goal is to query from the base sail and the added/removed statements together:

 - Store your added statements (minus deleted statements) in a new SailRepository(new MemoryStore()) in ShaclConnection
 - Make your AST generate a more optimal plan that queries both the base sail and your added/removed sail (page 4)

When this works and you have even more tests, you can continue onto the final steps for completing minCount:

 - Create an optimizer that can rewrite the plan
 - Create a rule for optimizing minCount using a VALUES sparql query (page 5)
 - Get statistics from the base sail, or collect your own statistics when adding data to trigger the optimization.


I'm a bit busy next week, but I can meet you on Friday or Sunday. This should give you time to get a bit more understanding of the task. Don't hesitate to ask if you need any help.


Håvard

 





On Mon, Jun 5, 2017 at 9:31 AM, Heshan Jayasinghe <shanujse@xxxxxxxxx> wrote:
Hi Håvard,

I print all added and removed statements using AbstractShaclFowardChainingInferencerConnection class.please check the code now.please let me know if there any mistakes in the code.

Thank you!
regards,
Heshan

On Sun, Jun 4, 2017 at 7:29 PM, Håvard Ottestad <hmottestad@xxxxxxxxx> wrote:
Hi Heshan,

I renamed your main.java file to Main.java. It wouldn't compile with the old name.

I also created a new file Main2.java to test if your printing worked. 

Your code doesn't print anything when I add statements to a shacl sail, but I can see that you have gotten further than last time.

Keep working to get it to print all added and removed statements. Main2.java is an example, to get the printing working you shouldn't need to make any changes to that file.

Håvard

On Sun, Jun 4, 2017 at 2:52 PM, Heshan Jayasinghe <shanujse@xxxxxxxxx> wrote:

On Sun, Jun 4, 2017 at 5:47 PM, Håvard Ottestad <hmottestad@xxxxxxxxx> wrote:
Can you please give me write access to your repo?

On Sun, Jun 4, 2017 at 7:44 AM, Heshan Jayasinghe <shanujse@xxxxxxxxx> wrote:
Hi Håvard,

Sorry for late reply.I had my university project report submission yesterday.Thank you Håvard your comment help me.I think I finish my 1st task.Can you please check and let me the status. if there any mistakes please let me know with some informations i'll try to fixed it soon.if you think that task is completed I like to take next task.I have only few days for my 1st evaluation but I didnt do any big things in the project.Can you please give me feedback on current task and some informations about next task.I'll try to give my full effort to complete those tasks.

Thank you,
regards,
Heshan

On Sat, Jun 3, 2017 at 6:07 PM, Håvard Ottestad <hmottestad@xxxxxxxxx> wrote:
Did it help?

Håvard

On 2 Jun 2017, at 09:09, Heshan Jayasinghe <shanujse@xxxxxxxxx> wrote:

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
Exception in thread "main" java.lang.IllegalStateException: Sail is not initialized or has been shut down
at org.eclipse.rdf4j.sail.helpers.AbstractSail.getConnection(AbstractSail.java:277)
at org.eclipse.rdf4j.sail.helpers.AbstractNotifyingSail.getConnection(AbstractNotifyingSail.java:46)
at org.eclipse.rdf4j.sail.helpers.AbstractNotifyingSail.getConnection(AbstractNotifyingSail.java:27)
at org.eclipse.rdf4j.sail.helpers.SailWrapper.getConnection(SailWrapper.java:123)
at org.eclipse.rdf4j.sail.helpers.NotifyingSailWrapper.getConnection(NotifyingSailWrapper.java:60)
at org.eclipse.rdf4j.validation.ShaclSail.getConnection(ShaclSail.java:41)
at org.eclipse.rdf4j.validation.ShaclSail.getConnection(ShaclSail.java:25)
at org.eclipse.rdf4j.repository.sail.SailRepository.getConnection(SailRepository.java:204)
at org.eclipse.rdf4j.Main.addStatement(Main.java:53)
at org.eclipse.rdf4j.Main.main(Main.java:44)

On Fri, Jun 2, 2017 at 10:59 AM, Håvard Ottestad <hmottestad@xxxxxxxxx> wrote:
Can you send me the stack trace?

Håvard

On 2 Jun 2017, at 06:06, Heshan Jayasinghe <shanujse@xxxxxxxxx> wrote:

Hi Håvard,

I read some classes and I could able to identify some patterns previously used to create statements.I created new class called ShaclNotifyingSailConneectionBase using AbstractSailConnection and shaclNotifyingSailConnection.I access those files from main class.AbstractSailConnection class need AbstractSail object for its constructor.so I create another ShaclAbstactSail class and extend AbstractSail. After that I pass that Object to AbstractSailConnection class.in that time it gives error Sail is not initialized or has been shut down.initialize AbstractSail but it gives that error.can you please tell me how to avoid this error.

Thank you,
regards,
Heshan









Back to the top