NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Help Needed (Desperate Student :(! ) Glassfish/Restful Webservice

 
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users
View previous topic :: View next topic  
Author Message
batman400



Joined: 07 Apr 2011
Posts: 1
Location: Ireland

PostPosted: Thu Apr 07, 2011 6:06 pm    Post subject: Help Needed (Desperate Student :(! ) Glassfish/Restful Webservice Reply with quote

Hi guys,

Quickly to explain what im trying to do,

- GOAL -
Create a Restful webservice with a persistent unit backend (mySQL server) which will produce JSON & XML objects, using glassfishv3 via Netbeans IDE 6.9.

I've been using the Wizard netbeans provides to setup this webservice.

To give a clear idea of what i have done already or tried ->

- I've followed numerious tutorials on setting up restful webservices
- I've established a connection in netbeans itself between my setup mySQL server and netbeans, and can view the tables + data.

- I've included the Jar connector etc
- I've updated Netbeans + glassfish
- Ive tried numerious connection source types,
- I've tried using an oracle database ( in college environment which was blocking my access to database).
* Ive opened the ports in windows aswell
* Ran as admin etc
*No Anti Spyware/virus

Anyway when I test the web service it launches into the web browser and lets me type in a hotel id , but when i click enter to try retrieve using the automatically generated get method, it crashes and i get the following error(s) in glassfish console

- " SEVERE: Mapped exception to response: 500 (Internal Server Error)"

- "SEVERE: A message body writer for Java class converter.HotelConverter, and Java type class converter.HotelConverter, and MIME media type application/xml was not found
SEVERE: The registered message body writers compatible with the MIME media type are: application/xml ->"

I'm totally at my end with this, I've tried my best and spent over a week of nonstop hard work trying to overcome this problem. (im new to netbeans + webservices etc). I cannot move on in my project without this aspect of the backend being complete, I would hugely appriciate any Insight or advice/ guidance into a solution or possible alternative methods of carrying out the task.

THANKS GUYS!!!!!!!!!!!!!!!!! <3
Back to top
Jeffrey Rubinoff
Posted via mailing list.





PostPosted: Fri Apr 08, 2011 5:42 pm    Post subject: Re: Help Needed (Desperate Student :(! ) Glassfish/Restful Webservice Reply with quote

I remember running into this but I can't remember the solution. However,
a Google search on "message body writer GlassFish NetBeans" gives this link:
http://jersey.576304.n2.nabble.com/JsonMessageWriter-not-working-under-Netbeans-6-9-1-td6005749.html
I seem to remember I did something much simpler, though. Maybe just
manually added some Jersey libraries to classpath.
I would try NetBeans 7.0rc1 or daily build with GF 3.1 if I were you.
I wouldn't worry about the connector or the database, I don't think
that's where the problem is. Entity classes on NB and MySQL should work
completely by default.

Jeff

batman400 wrote:

Quote:
Hi guys,

Quickly to explain what im trying to do,

- GOAL -
Create a Restful webservice with a persistent unit backend (mySQL server) which will produce JSON & XML objects, using glassfishv3 via Netbeans IDE 6.9.

I've been using the Wizard netbeans provides to setup this webservice.

To give a clear idea of what i have done already or tried ->

- I've followed numerious tutorials on setting up restful webservices
- I've established a connection in netbeans itself between my setup mySQL server and netbeans, and can view the tables + data.

- I've included the Jar connector etc
- I've updated Netbeans + glassfish
- Ive tried numerious connection source types,
- I've tried using an oracle database ( in college environment which was blocking my access to database).

Anyway when I test the web service it launches into the web browser and lets me type in a hotel id , but when i click enter to try retrieve using the automatically generated get method, it crashes and i get the following error(s) in glassfish console

- " SEVERE: Mapped exception to response: 500 (Internal Server Error)"

- "SEVERE: A message body writer for Java class converter.HotelConverter, and Java type class converter.HotelConverter, and MIME media type application/xml was not found
SEVERE: The registered message body writers compatible with the MIME media type are: application/xml ->"

I'm totally at my end with this, I've tried my best and spent over a week of nonstop hard work trying to overcome this problem. (im new to netbeans + webservices etc). I cannot move on in my project without this aspect of the backend being complete, I would hugely appriciate any Insight or advice/ guidance into a solution or possible alternative methods of carrying out the task.

THANKS GUYS!!!!!!!!!!!!!!!!! <3





Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo