Re: [OWLIM-discussion] Problem after compiling user defined ruleset

2008-04-11 Thread Chris Halaschek
Hi Damyan,

Thank you for your prompt response. This has resolved the issue
related to compiling my custom rulesets, as well as the problem with
setting partialRDFS=false.

Regarding the overhead of compiling custom defined rules...this should
not be a big issue for our current use, so this distribution should be
great.

Thanks again for your help.

Best,
Chris

-- 
Christian Halaschek-Wiener, Ph.D.
Web page: http://www.mindswap.org/~chris



On Fri, Apr 11, 2008 at 5:20 AM, Damyan Ognyanoff <[EMAIL PROTECTED]> wrote:
> Hi Chris,
>
> the custom ruleset was not compiled due to the way we find the right jar to
> put it into the classpath of the javac - in short the spaces in the path
> broke it (these were escaped to %20).
>
> I've updated the distribution on
> http://www.ontotext.com/public_html/owlim/v3.0.a/owlim-beta5-sesame-2.0.zip
>
>
> about the partialRDFS=false - the precompiled sets were included in the
> distribution but for some stupid reason those were never instantiated - the
> fixes are also part of the above distribution...
>
> it also contain a simple check whether to permutate all possible rule
> variants to choose the best one so to place it in the compiled ruleset -
> this naive approach caused very slow compilations of custom rulesets that
> have rules with more than 10 premises ...
>
> to avoid that  - now one should use -Doptimize.rules=false in the jvm
> runtime parameters/options - it switches to more simple strategy to achieve
> the same - but it could fail to select the best option in some border cases
> ... still needs some more work to replace the old approach completely
>
> let me know if the above distribution suits you and works for you...
>
> regards,
> Damyan
>
>
>
> - Original Message - From: "Chris Halaschek" <[EMAIL PROTECTED]>
> To: "Damyan Ognyanoff" <[EMAIL PROTECTED]>; 
> Sent: Friday, April 11, 2008 6:40 AM
> Subject: Problem after compiling user defined ruleset
>
>
>
>
> > Hi,
> >
> > I'm observing some issues when trying to compile my own ruleset in
> > OWLIM. Currently, I'm running OWLIM 3.0 Beta 4, Sesame 2.0, & Tomcat
> > 6, and I've followed the basic instructions to configure OWLIM by
> > copying the OWLIM jars into the necessary Tomcat folders. I've
> > additionally followed the necessary steps provided in
> >
> http://ontotext.com/pipermail/owlim-discussion_ontotext.com/2008-March/000117.html
> > and have sucessfully used Sesame's console to create a repository
> > backed by OWLIM. The errors seem to be thrown when I then browse to
> > the repository using the Sesame workbench web-app.
> >
> > I've checked the logs and it appears that my new ruleset compiles ok,
> > however, I get classpath errors right after the compilation. I have
> > confirmed that all of the necessary jar files are in the Sesame
> > WEB-INF\lib\ folder in Tomcat, so I'm not sure what the problem could
> > be. It's also strange as it appears that the rules compile ok
> > initially, which would indicate that the classpaths are set up fine. I
> > have included the output in the Tomcat logs at the end of this email.
> >
> > Another related issue I'm observing is that if I simply change the
> > 'partialsRDFS' setting to 'false' in my Sesame repository template, I
> > get the same errors. The template file I'm using (originally taken
> > from the OWLIM distribution) with this minor modification is provided
> > below:
> >
> > # Sesame configuration template for a owlim repository
> > #
> > @prefix rdfs: .
> > @prefix rep: .
> > @prefix sr: .
> > @prefix sail: .
> > @prefix owlim: .
> >
> > [] a rep:Repository ;
> >  rep:repositoryID "owlim_repository" ;
> >  rdfs:label "Test Repository" ;
> >  rep:repositoryImpl [
> > rep:repositoryType "openrdf:SailRepository" ;
> > sr:sailImpl [
> >sail:sailType "owlim:Sail" ;
> >owlim:ruleset "owl-max" ;
> >owlim:partialRDFS  "false";
> >owlim:noPersist "false" ;
> >owlim:storage-folder "junit-storage" ;
> >owlim:base-URL "http://example.com#"; ;
> >owlim:new-triples-file "new-triples-file.nt" ;
> >owlim:entity-index-size "20" ;
> >owlim:jobsize "500" ;
> >owlim:repository-type "in-memory-repository" ;
> >owlim:defaultNS "http://www.w3.org/2002/07/owl#";
> > ]
> >  ].
> >
> > I'm guessing that you have only pre-compiled the rulesets for the case
> > when the 'partialsRDFS' setting is 'true'. One reason why I've tried
> > to change this configuration is because it appears that an owl:Thing
> > subclass assertion is not added for anything of type owl:Class that I
> > load into OWLIM. This is strange as it looks like this should be added
> > by the OWL-Horst rule with id 'owl_Thing1' (in the 'Rules_builtin.pie'
> > ruleset in the OWIM beta 4 relea

Re: [OWLIM-discussion] Class cast exception in OWLIM 3.0

2008-04-11 Thread Damyan Ognyanoff
Hi Chris,

it was a bug - the updated distribution (there was typo in the link from the 
previous mail to the list)

http://www.ontotext.com/owlim/v3.0.a/owlim-beta5-sesame-2.0.zip


contain also a fix for this issue

regards,
Damyan
- Original Message - 
From: "Chris Halaschek" <[EMAIL PROTECTED]>
To: 
Sent: Wednesday, April 09, 2008 10:59 PM
Subject: [OWLIM-discussion] Class cast exception in OWLIM 3.0


> Hi,
>
> I seem to get a class cast exception when browsing my OWLIM KB via the
> Sesame Workbench web app. Currently, my configuration is as follows:
>
> - OWLIM 3.0 Beta 4
> - Sesame 2.0
> - Tomcat 6
>
> The exception shows up in the OWLIM and Tomcat logs when I browse to
> various object properties in the KB. I've also tried to issue SPARQL
> queries for triples involving the object properties in the KB that
> cause the exception when browsed to in the Workbench web app and no
> results are returned even though the original OWL ontology contains
> various assertions involving these properties (clearly, at minimum
> there should be basic rdf type and subproperty assertions).
>
> I looked into our ontology (which is perfectly valid RDF) and was able
> to isolate the problem to what appears to be interactions between
> inverse and symmetric properties. Perhaps this is causing a problem
> when loading the KB into OWLIM (note however, that I do not see any
> errors related to this in the log files).
>
> Below is a trivial ontology that causes the issue. Clearly, one can
> remove the inverse property assertion for
> 'http://example.com#sampleInverseProperty' on itself, however this
> should still be valid RDF and not cause problems for OWLIM (at least
> that's my understanding). Interestingly, if this assertion is removed,
> then the problem is resolved.
>
>
> 
>
> http://www.w3.org/2002/07/owl#"; >
>http://www.w3.org/1999/02/22-rdf-syntax-ns#"; >
> ]>
>
> http://example.com#";
> xml:base="http://example.com#";
> xmlns:owl="http://www.w3.org/2002/07/owl#";
> xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";>
>
>
>
>
>
>
>
>
>
>
>
>
> 
>
>
>
> Additionally, here is the actual exception thrown when browsing to the
> property 'http://example.com#sampleInverseProperty':
>
>
> Exeception:
> -
>
> org.springframework.web.util.NestedServletException: Request
> processing failed; nested exception is java.lang.ClassCastException:
> org.openrdf.model.impl.URIImpl cannot be cast to
> org.openrdf.model.Literal
> org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:472)
> org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:415)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>
>
> root cause
>
> java.lang.ClassCastException: org.openrdf.model.impl.URIImpl cannot be
> cast to org.openrdf.model.Literal
> com.ontotext.trree.owlim_ext.CustomLiteralImpl.getLabel(Unknown Source)
> org.openrdf.rio.turtle.TurtleWriter.writeLiteral(TurtleWriter.java:355)
> org.openrdf.rio.turtle.TurtleWriter.writeValue(TurtleWriter.java:302)
> org.openrdf.rio.turtle.TurtleWriter.handleStatement(TurtleWriter.java:230)
> org.openrdf.rio.trig.TriGWriter.handleStatement(TriGWriter.java:129)
> org.openrdf.repository.sail.SailRepositoryConnection.exportStatements(SailRepositoryConnection.java:209)
> org.openrdf.http.server.repository.statements.ExportStatementsView.render(ExportStatementsView.java:99)
> org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1123)
> org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:860)
> org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:774)
> org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:460)
> org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:415)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>
>
>
> Any help you can offer would be greatly appreciated.
>
> Best,
> Chris
>
> -- 
> Christian Halaschek-Wiener, Ph.D.
> Web page: http://www.mindswap.org/~chris
>
> ___
> OWLIM-discussion mailing list
> OWLIM-discussion@ontotext.com
> http://ontotext.com/mailman/listinfo/owlim-discussion_ontotext.com 


___
OWLIM-discussion mailing list
OWLIM-discussion@ontotext.com
http://ontotext.com/mailman/listinfo/owlim-discussion_ontotext.com


Re: [OWLIM-discussion] Owlim 3.0 beta-4 Sesam2 Apache Tomcat

2008-04-11 Thread Damyan Ognyanoff
Hi Arnim,

(sorry for the late reply)

I do not know whether the openrdf-sesame or openrdf-workbench webapps provide 
an UI to create repositories ...

but you could look the the code of the org.openrdf.console.Console class / 
createRepository(String) method / and do the same yourself - just prepare the 
(.ttl) configuration, parse it into a Graph instance and then add it to the 
SYSTEM repository.

regards,
Damyan

  - Original Message - 
  From: Arnim Bleier 
  To: owlim-discussion@ontotext.com 
  Sent: Friday, April 04, 2008 7:22 PM
  Subject: [OWLIM-discussion] Owlim 3.0 beta-4 Sesam2 Apache Tomcat


  Hi (Damyan),

  I tried out the Owlim 3.0 beta-4 for sesame 2
  http://www.ontotext.com/owlim/v3.0.a/owlim-beta4-sesame-2.0.zip.
  and followed the instructions in the previous mails.
  Everything went fine
  -  I can create an owlim repository via the console and access it -
  thank you so fare.

  However, is it possible to use the sesame server
  to create a owlim repository.
  What do I have to do to cope with the classpath?

  Best regards,
  Arnim


--


  ___
  OWLIM-discussion mailing list
  OWLIM-discussion@ontotext.com
  http://ontotext.com/mailman/listinfo/owlim-discussion_ontotext.com
___
OWLIM-discussion mailing list
OWLIM-discussion@ontotext.com
http://ontotext.com/mailman/listinfo/owlim-discussion_ontotext.com


Re: [OWLIM-discussion] Problem after compiling user defined ruleset

2008-04-11 Thread Damyan Ognyanoff
Hi Chris,

the custom ruleset was not compiled due to the way we find the right jar to 
put it into the classpath of the javac - in short the spaces in the path 
broke it (these were escaped to %20).

I've updated the distribution on 
http://www.ontotext.com/public_html/owlim/v3.0.a/owlim-beta5-sesame-2.0.zip


about the partialRDFS=false - the precompiled sets were included in the 
distribution but for some stupid reason those were never instantiated - the 
fixes are also part of the above distribution...

it also contain a simple check whether to permutate all possible rule 
variants to choose the best one so to place it in the compiled ruleset - 
this naive approach caused very slow compilations of custom rulesets that 
have rules with more than 10 premises ...

to avoid that  - now one should use -Doptimize.rules=false in the jvm 
runtime parameters/options - it switches to more simple strategy to achieve 
the same - but it could fail to select the best option in some border cases 
... still needs some more work to replace the old approach completely

let me know if the above distribution suits you and works for you...

regards,
Damyan



- Original Message - 
From: "Chris Halaschek" <[EMAIL PROTECTED]>
To: "Damyan Ognyanoff" <[EMAIL PROTECTED]>; 
Sent: Friday, April 11, 2008 6:40 AM
Subject: Problem after compiling user defined ruleset


> Hi,
>
> I'm observing some issues when trying to compile my own ruleset in
> OWLIM. Currently, I'm running OWLIM 3.0 Beta 4, Sesame 2.0, & Tomcat
> 6, and I've followed the basic instructions to configure OWLIM by
> copying the OWLIM jars into the necessary Tomcat folders. I've
> additionally followed the necessary steps provided in
> http://ontotext.com/pipermail/owlim-discussion_ontotext.com/2008-March/000117.html
> and have sucessfully used Sesame's console to create a repository
> backed by OWLIM. The errors seem to be thrown when I then browse to
> the repository using the Sesame workbench web-app.
>
> I've checked the logs and it appears that my new ruleset compiles ok,
> however, I get classpath errors right after the compilation. I have
> confirmed that all of the necessary jar files are in the Sesame
> WEB-INF\lib\ folder in Tomcat, so I'm not sure what the problem could
> be. It's also strange as it appears that the rules compile ok
> initially, which would indicate that the classpaths are set up fine. I
> have included the output in the Tomcat logs at the end of this email.
>
> Another related issue I'm observing is that if I simply change the
> 'partialsRDFS' setting to 'false' in my Sesame repository template, I
> get the same errors. The template file I'm using (originally taken
> from the OWLIM distribution) with this minor modification is provided
> below:
>
> # Sesame configuration template for a owlim repository
> #
> @prefix rdfs: .
> @prefix rep: .
> @prefix sr: .
> @prefix sail: .
> @prefix owlim: .
>
> [] a rep:Repository ;
>   rep:repositoryID "owlim_repository" ;
>   rdfs:label "Test Repository" ;
>   rep:repositoryImpl [
>  rep:repositoryType "openrdf:SailRepository" ;
>  sr:sailImpl [
> sail:sailType "owlim:Sail" ;
> owlim:ruleset "owl-max" ;
> owlim:partialRDFS  "false";
> owlim:noPersist "false" ;
> owlim:storage-folder "junit-storage" ;
> owlim:base-URL "http://example.com#"; ;
> owlim:new-triples-file "new-triples-file.nt" ;
> owlim:entity-index-size "20" ;
> owlim:jobsize "500" ;
> owlim:repository-type "in-memory-repository" ;
> owlim:defaultNS "http://www.w3.org/2002/07/owl#";
>  ]
>   ].
>
> I'm guessing that you have only pre-compiled the rulesets for the case
> when the 'partialsRDFS' setting is 'true'. One reason why I've tried
> to change this configuration is because it appears that an owl:Thing
> subclass assertion is not added for anything of type owl:Class that I
> load into OWLIM. This is strange as it looks like this should be added
> by the OWL-Horst rule with id 'owl_Thing1' (in the 'Rules_builtin.pie'
> ruleset in the OWIM beta 4 release). Perhaps this is not included in
> the owl-max ruleset when 'partialRDFS' is set to 'true'?
>
> Any advice you can offer on these issues would be greatly appreciated.
>
> Thanks,
> Chris
>
>
> -- 
> Christian Halaschek-Wiener, Ph.D.
> Web page: http://www.mindswap.org/~chris
>
>
>
>
> Tomcat Log:
> --
>
> sNewTriplesFileName=new-triples-file.nt
> bNoPersist=false
> ruleSet=owl-max-new, partialRdfs=false
> Compiled: 'owl-max-new.pie'
> package1:com/ontotext/trree/owlim_ext/rules/RuntimeInferencerCompiler.class
> url2= 
> jar:file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%206.0/webapps/openrdf-sesame/WEB-INF/lib/trree-3.0.beta4.jar!/