This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 179155 - Test Resful Service Postgresql does not retrieve data from tables
Summary: Test Resful Service Postgresql does not retrieve data from tables
Status: RESOLVED WORKSFORME
Alias: None
Product: webservices
Classification: Unclassified
Component: REST (show other bugs)
Version: 6.x
Hardware: Macintosh (x86) Mac OS X
: P1 normal (vote)
Assignee: Milan Kuchtiak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-02 13:22 UTC by rascalboy4321
Modified: 2010-01-07 07:25 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Postgres Data Source (100.18 KB, image/png)
2010-01-07 07:25 UTC, Milan Kuchtiak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rascalboy4321 2010-01-02 13:22:02 UTC
Works fine with MySQL. The same table, fields and data does not yield any table data with the JSon Get function, though every thing else appears to work.

All I get is the following:
{"@uri":"http://localhost:8080/WebApplication3/resources/projects/"}

For a single table database with fields:
ID (type big serial) as the primary key 
Name (type Text) as the only other field.

The table contains three records. An SQL query with netbeans yields the correct data. 

In Creating the Resful Web Services either from database or Entities, with all defaults. I tried all the combinations I could think of, with the same results or worse.
Comment 1 Milan Kuchtiak 2010-01-04 03:30:53 UTC
Hi,

Have you tested your application with another test tool, e.g. REST Client
( http://code.google.com/p/rest-client/downloads/list )
or curl command?


I'm trying to find if this is a problem of Netbeans JavaScript Tester, or some other issue related to that application.
Comment 2 Milan Kuchtiak 2010-01-07 07:23:52 UTC
Tested simple table created with Postgres database. 
Everything works fine.
 
I think, you may have a problem with setting up a data source for Postgres database.

This is achievable by using:

- New Entity Classes from Database wizard (Persistence catagory)
- in Data Source combo box select New Data Source (and specify correct values for your Postgres database)

When you deploy your application, the JDBC datasource as well as Connection pool should be visible in Services tab, under (GlassFish)Server node. See the picture.
Comment 3 Milan Kuchtiak 2010-01-07 07:25:45 UTC
Created attachment 93118 [details]
Postgres Data Source