Kumar, what is the line before:
"at org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:243) org.apache.jena.riot.adapters.RDFReaderRIOT.read(RDFReaderRIOT.java:70) com.hp.hpl.jena.rdf.model.impl.ModelCom.read(ModelCom.java:277) at tutorial.istmain.main(istmain.java:23)" in your error stack? Claude On Sat, Aug 15, 2015 at 9:08 PM, kumar rohit <[email protected]> wrote: > I think "Maybe Module.owl is OWL syntax, not RDF", this is right.. Protege > deals with Owl and not rdf. right? > > On Sat, Aug 15, 2015 at 6:04 PM, kumar rohit <[email protected]> > wrote: > > > Module,owl is a protege file placed in my desktop folder. > > > > On Sat, Aug 15, 2015 at 6:00 PM, Andy Seaborne <[email protected]> wrote: > > > >> On 15/08/15 17:38, kumar rohit wrote: > >> > >>> 2.13 is jena version.. I have not placed the Inputstream code in > >>> try/catch > >>> block, is it the problem? > >>> > >> > >> No idea. There isn't enough information; all this email thread says so > >> far is "there's an exception". > >> > >> Maybe "in" is null (=> not found) > >> > >> Maybe Module.owl has a syntax error in the RDF/XML > >> Maybe Module.owl is OWL syntax, not RDF. > >> > >> If Module.owl is a file and not a Java resource, then > >> > >> RDFDataMgr.read(model, "Module.owl", Lang.RDFXML) ; > >> > >> is simpler and more direct > >> > >> Andy > >> > >> > >> > >>> On Sat, Aug 15, 2015 at 5:12 PM, Andy Seaborne <[email protected]> > wrote: > >>> > >>> That looks like part of stacktace but missing the exception itself. > What > >>>> is > >>>> it? > >>>> > >>>> And which version of Jena are you running? > >>>> > >>>> On 16:26, Sat, 15 Aug 2015 kumar rohit <[email protected]> wrote: > >>>> > >>>> The closing braces are fine. Its only missed in my email. Actually it > >>>>> > >>>> gives > >>>> > >>>>> me the following error in eclipse. > >>>>> > >>>>> "at org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:243) > >>>>> > org.apache.jena.riot.adapters.RDFReaderRIOT.read(RDFReaderRIOT.java:70) > >>>>> com.hp.hpl.jena.rdf.model.impl.ModelCom.read(ModelCom.java:277) > >>>>> at tutorial.istmain.main(istmain.java:23)" > >>>>> > >>>>> On Sat, Aug 15, 2015 at 4:09 PM, Andy Seaborne <[email protected]> > >>>>> wrote: > >>>>> > >>>>> On 15/08/15 15:16, kumar rohit wrote: > >>>>>> > >>>>>> Hello, what is the problem with this code.. I can not understand > even > >>>>>>> > >>>>>> the > >>>>> > >>>>>> error message by eclipse. > >>>>>>> > >>>>>>> > >>>>>> What is the error you are seeing? > >>>>>> > >>>>>> (it's missing a closing "}" for start; if this is jena3, then the > >>>>>> > >>>>> imports > >>>> > >>>>> are wrong - but Eclipse will sort that out with shift-cntr-O) > >>>>>> > >>>>>> > >>>>>> > >>>>>> ______________________________________________ > >>>>>>> import java.io.InputStream; > >>>>>>> > >>>>>>> import com.hp.hpl.jena.rdf.model.Model; > >>>>>>> import com.hp.hpl.jena.rdf.model.ModelFactory; > >>>>>>> import com.hp.hpl.jena.util.FileManager; > >>>>>>> > >>>>>>> public class istmain > >>>>>>> { > >>>>>>> > >>>>>>> public static void main(String[] args) { > >>>>>>> > >>>>>>> Model model=ModelFactory.createDefaultModel(); > >>>>>>> > >>>>>>> InputStream in=FileManager.get().open("Module.owl"); > >>>>>>> model.read(in,null,"RDF/XML"); > >>>>>>> model.write(System.out); > >>>>>>> } > >>>>>>> > >>>>>>> _____________________________________________________ > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>> > >>>>> > >>>> > >>> > >> > > > -- I like: Like Like - The likeliest place on the web <http://like-like.xenei.com> LinkedIn: http://www.linkedin.com/in/claudewarren
