• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

read and display the content of .owl file in server

 
Saloon Keeper
Posts: 7585
176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As the error message says, http-method is not allowed there (it is part of the security configuration, which you should not use at this point).
 
Ranch Hand
Posts: 384
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please help me with this. As of now i just want not display a hello world which i am not able to do till now. Please suggest me a example to follow for creating a web app maven in eclipse. I followed the following url but couldn't achieve. helloworld
 
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Take out the line from there, and show us the servlet code once again.
 
Gayathri Gayu
Ranch Hand
Posts: 384
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the help . The code works fine now. I am pasting the web.xml code.


Following is my App.java file code



Is it possible to load an existing owl file in the above code and display its content?
 
Swastik Dey
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sure why not.
 
Gayathri Gayu
Ranch Hand
Posts: 384
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I just edited the same code trying to load an local owl file to display the contents.



I got the following error. Do i need to install or add any library files/jar files?
err1.png
[Thumbnail for err1.png]
NoClassDefFoundError
 
Swastik Dey
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes you need to add the required library file.
 
Rancher
Posts: 4801
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When posting exceptions and errors can you copy and paste them here rather than screenshots.
They're easier to read, and we can copy and paste from them as needed.
 
Gayathri Gayu
Ranch Hand
Posts: 384
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok here after i will just copy paste the error messages. And coming to the library /.m2/repository/net/sourceforge/owlapi/owlapi-api/5.0.0/owlapi-api-5.0.0.jar file is present in the java build path  under libraries tab
 
Swastik Dey
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The file should be in WEB-INF\lib
 
Gayathri Gayu
Ranch Hand
Posts: 384
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Swastik Dey wrote:The file should be in WEB-INF\lib


So shall I remove the owlapi-api-5.0.0.jar and owlapi-apibinding-5.0.0.jar from the other path and add those two in WEB-INF/lib. Or without removing shall i add in java build path from /home/gayathri/eclipse-workspace/Newwebapp/WebContent/WEB-INF/lib my path right?
 
Swastik Dey
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Either way it should work
 
Gayathri Gayu
Ranch Hand
Posts: 384
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Swastik Dey wrote:Either way it should work



Thanks for the help it worked. Again i got another error java.lang.ClassNotFoundException: javax.inject.Provider. I know i have to add owl api jar for using owl in java. But what error is this? Hope its not any jar/library file. Also pom.xml file is not there in my project.
 
Swastik Dey
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
But I think yes, it's looking for some library reference.
 
Gayathri Gayu
Ranch Hand
Posts: 384
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Swastik Dey wrote:But I think yes, it's looking for some library reference.

pom.xml is not there. That's not a issue na? I will check what else library file i have to add. As i browsed pom in pom file they are adding dependencies. So only I am asking.
 
Swastik Dey
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I haven't worked on this but you probably need this

http://www.java2s.com/Code/Jar/j/Downloadjavaxinjectjar.htm
 
Gayathri Gayu
Ranch Hand
Posts: 384
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Swastik Dey wrote:I haven't worked on this but you probably need this

http://www.java2s.com/Code/Jar/j/Downloadjavaxinjectjar.htm

 Thanks for the reply. The error went. But again i am getting the java.lang.NoClassDefFoundError: org/semanticweb/owlapi/apibinding/OWLManager error. I have added the apibinding path from WEB-INF/lib. And i didn't remove the existing path. I am not sure whether running the project takes the old path. So idon't know whether to remove the existing path or not. Please suggest me.
 
Swastik Dey
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your jar files should be present in WEB-INF\lib, that's what I can say.  My suggestion would be do a do it in a fresh project, as you are now aware of all steps, so chances of messing up will be less.
 
Gayathri Gayu
Ranch Hand
Posts: 384
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Swastik Dey wrote:Your jar files should be present in WEB-INF\lib, that's what I can say.  My suggestion would be do a do it in a fresh project, as you are now aware of all steps, so chances of messing up will be less.

Ok. Thanks for your help. I will create a new project and follow the steps.
 
Gayathri Gayu
Ranch Hand
Posts: 384
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is converting maven project to dynamic web app and creating dynamic web project both are same or different?
 
Gayathri Gayu
Ranch Hand
Posts: 384
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
java.lang.ClassNotFoundException: uk.ac.manchester.cs.owl.owlapi.concurrent.Concurrency I have included the required libraries. But i couldn't understand what it is still searching for. Is tat also some jar file?
 
Swastik Dey
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Seems like it's looking for some library reference, you can take a look here

https://jar-download.com/artifacts/net.sourceforge.owlapi/owlapi-apibinding
 
Gayathri Gayu
Ranch Hand
Posts: 384
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is pom.xml file mandatory to the project? I am just going through the link you referred. Because in pom.xml we will add all the dependencies na.
 
Gayathri Gayu
Ranch Hand
Posts: 384
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the link @Swastik. That link helped me in adding the missing dependencies. I am getting java.io.FileNotFoundException: in which i have specified the full path to the file File file = new File("/home/gayathri/eclipse-workspace/steels2.owl");

Complete error
Is it just file not found error or i need to add some more jar files?
 
Swastik Dey
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, library referencing problem is solved, it's failing to locate the file.
 
Swastik Dey
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try with absolute path like

e.g.
c:\<path to your file>
 
Gayathri Gayu
Ranch Hand
Posts: 384
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Swastik Dey wrote:Try with absolute path like

e.g.
c:\<path to your file>



Thanks for the reply. I gave the absolute path and it works fine. Sorry for asking so my questions. But seriously I don't have any idea of how the output file will be. The following is my output.Ontology(OntologyID(OntologyIRI(<http://www.w3.org/2002/07/SteelOnto>;) VersionIRI(<http://www.w3.org/2002/07/SteelOntov0>;))) [Axioms: 4415 Logical Axioms: 3866] Is it the right one or will it display any webpage kind of output?
 
Swastik Dey
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@Gayatri

You are always welcome to ask as many as questions as you want.  Can you post the servlet code once again please.  Although I haven't worked with particular api, but no harm in giving a look.
 
Gayathri Gayu
Ranch Hand
Posts: 384
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Swastik Dey wrote:@Gayatri

You are always welcome to ask as many as questions as you want.  Can you post the servlet code once again please.  Although I haven't worked with particular api, but no harm in giving a look.



Thank you so much @Swastik. Thank you so much for helping.
I am pasting the servlet code here.

 
Swastik Dey
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome once again Gayatri.  As per your code the output is correct.  However if you wish to learn more on this particular (owl) api, you may have to do more research.  However if you are new to servlets, I would suggest to concentrate more on this part.
 
Gayathri Gayu
Ranch Hand
Posts: 384
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks again. I will start exploring servlets and the owl api.
 
Swastik Dey
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sounds good.
 
Gayathri Gayu
Ranch Hand
Posts: 384
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to display what are the 461 axioms for adding/removing further. I couldn't able to display the 461 axioms. Please tell me where i am wrong.
 
Tim Moores
Saloon Keeper
Posts: 7585
176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That question is specific to this rather uncommon API - you're probably better off asking the question wherever that API is supported.
 
Gayathri Gayu
Ranch Hand
Posts: 384
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Moores wrote:That question is specific to this rather uncommon API - you're probably better off asking the question wherever that API is supported.


Sorry I couldn't understand.
 
Swastik Dey
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The API you are using is a not a very common api in use, and probably most of us are not aware of that.  So you might find some documentation/information in their site/discussion/support forums.
 
reply
    Bookmark Topic Watch Topic
  • New Topic