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.
|Summary:||Developing RESTful webservices with Database, the "new datasource" choice does not appear in dropdown|
|Component:||Persistence||Assignee:||Sergey Petrov <sj-nb>|
|Issue Type:||DEFECT||Exception Reporter:|
Example from Netbeans website step 2
Step One adding Persistence WEB SERVICE with REST to DB MS SQL SERVER - NOT WORKING
Result of trying to select MS SQL Server as Datasource but it's NOT an option
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.