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 252118 - Developing RESTful webservices with Database, the "new datasource" choice does not appear in dropdown
Summary: Developing RESTful webservices with Database, the "new datasource" choice doe...
Status: NEW
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 8.0.2
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Sergey Petrov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-27 16:39 UTC by pborregg
Modified: 2015-07-27 18:27 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Example from Netbeans website step 2 (25.99 KB, image/png)
2015-04-27 16:39 UTC, pborregg
Details
Step One adding Persistence WEB SERVICE with REST to DB MS SQL SERVER - NOT WORKING (63.13 KB, image/png)
2015-04-27 16:42 UTC, pborregg
Details
Result of trying to select MS SQL Server as Datasource but it's NOT an option (62.18 KB, image/png)
2015-04-27 16:43 UTC, pborregg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pborregg 2015-04-27 16:39:07 UTC
Created attachment 153411 [details]
Example from Netbeans website step 2

OK, here's what's happening:

I'm following the directions on: https://netbeans.org/kb/docs/websvc/rest.html

and when I get to STEP II (2), and I want to select a "new datasource..." that feature is not in the dropdown. (See attached pic)

So, I have connections to the following DBs:

1 - MS SQL SERVER - DONE
2 - MYSQL - DONE
3 - JDBC - to MS SQL SERVER - DONE
4 - JNDI - to MS SQL SERVER - NOT DONE

I need to be able to connect to my MS SQL SERVER to create the RESTFUL Web Service to Database but CANNOT.

See MY attached screen shot as well.

V/R

Peter
Comment 1 pborregg 2015-04-27 16:42:40 UTC
Created attachment 153412 [details]
Step One adding Persistence WEB SERVICE with REST to DB MS SQL SERVER - NOT WORKING

This is step one.... next attachment coming
Comment 2 pborregg 2015-04-27 16:43:49 UTC
Created attachment 153413 [details]
Result of trying to select MS SQL Server as Datasource but it's NOT an option

Neither is NEW datasource - it's NOT THERE as in your example on Netbeans.org
Comment 3 matthias42 2015-04-27 19:18:00 UTC
Reducing priority to P3 - being able to use Datasource from appserver is nice to have. Work-around: Create db connection in netbeans and generate entities with that connection.

------

I'm not sure what your report is really about. Is this about the error shown in the screenshot (https://bugzilla-attachments-252118.netbeans.org/bugzilla/attachment.cgi?id=153413).

I'll asume that for now: Can you please give the connection definition for the mssql connection from your application server?
Comment 4 pborregg 2015-04-28 05:27:57 UTC
Yes, it's about the error shown in the screen shot
Comment 5 matthias42 2015-04-28 20:40:05 UTC
Ok - I traced this through the code and I have a suspicion - I need the information I requested: How did you define the mssql connection in the JNDI? 

I suspect, that you did define a resource that is based on a DataSource or an XADataSource at least I don't see a good reason not to do that in an application server. But it looks like the code needs either

- an URL property on the database connection in the app server, that matches a locally defined database connection in netbeans OR
- the database connection needs to be defined based on a jdbc driver

This analysis was done for glassfish/payara. Without further information this is just a wild guess.
Comment 6 matthias42 2015-07-27 18:27:06 UTC
Reassigned to javaee team - it looks as if the database support for the javaee servers only works for jdbc-driver based connections and not for DataSources or XADatasources.