On Jan 7, 2011, at 6:56 AM, Vasanthamani L wrote:
> Hello,
>
>
> I have installed jdk 1.6, mule and maven and checked sample jersey
> projects. Its working fine.
>
> I would like to create web service using jersey json module. I need
> to connect mysql database to fetch values from database and return
> result as json format.
>
> So I have trying to connect jdbc connection in jacksonjsonprovider
> sample project. But it receives the error.
>
What error?
> Kindly suggest me how to connect jdbc connection using mysql in
> jacksonjsonprovider sample project.
>
We don't have any samples using JPA/JDBC to connect to a MySQL DB
(which is orthogonal to the use of Jersey). IIRC Arun (CC'ed) might be
able to help with this.
Note that the jacksonjsonprovider is not a web app which may make it
extra tricky for you to use JPA/JDBC.
There are two JPA-based samples you can look at:
http://download.java.net/maven/2/com/sun/jersey/samples/bookmark/1.4-ea06/bookmark-1.4-ea06-project.zip
http://download.java.net/maven/2/com/sun/jersey/samples/bookmark-em/1.4-ea06/bookmark-em-1.4-ea06-project.zip
Paul.