1. Jesse Busker
  2. PowerServer
  3. Tuesday, 7 December 2021 02:25 AM UTC

I am trying to setup PowerServer on my local machine and have come across an error that I can't find any information about.  When trying to connect to Oracle or SQL Server the same box comes up.  "No data provider of database type 'Oracle' is found, you need to add a data provider before using the database."  If a SQL Server is chosen the message changes the one word to 'SqlServer'

When I go to the Database Configuration both connections test successfully.  When I change the cache name to the other and the connection string in the app open I get the error.  When running the program through the IDE as a standard client both transactions connect with no issues.

 

Looking at the localhost IIS log I see the connection get request followed by a fail line.

dbug: PowerServer.Api.ServerApiController[0]
'PowerServer.Api.ServerApiController.CreateSessionAsync (PowerServer.Api)' get request ({
"reqData": {
"Type": 31,
"Content": {
"CreateSession": {
"ApplicationName": null,
"SecureString": "Blah Blah Blah",
"SessionId": null
}
},
"ClientIPAddress": "",
"ServerIPAddress": "",
"ServerPort": 0,
"AppName": "TestApp",
"NamespaceName": "TestApp",
"SecureSession": "",
"Version": "1.0",
"RequestId": "0D9A3FC2-D44E-4dd5-84A1-5EBEE1FDA12D",
"Transaction": null
}
}).
dbug: PowerServer.Api.ServerApiController[0]
'PowerServer.Api.ServerApiController.CreateSessionAsync (PowerServer.Api)' get result ({
"IsSuccess": true,
"ErrorCode": 0,
"ErrorMessage": null,
"Version": "1.0",
"RequestId": "0D9A3FC2-D44E-4dd5-84A1-5EBEE1FDA12D",
"AppName": "TestApp",
"Session": {
"ErrCode": 0,
"ErrMsg": null,
"SessionId": null
},
"Type": 31,
"Transaction": {
"TransactionId": null,
"SQLCode": 0,
"SQLDBCode": 0,
"SQLErrText": null,
"SQLNRows": 0,
"SQLReturnData": null
},
"Content": {
"SessionState": null,
"SessionInfo": {
"SessionId": "0528CF3F-7B18-4EEB-A00C-5E1DF996DEB5"
},
"GracePeriod": {
"Remind": false,
"RemainingDays": 0
},
"PsVersion": "1.1.0",
"Watermark": "For Development Use Only",
"LicenseMode": "Subscription",
"SecureString": "Blah Blah Blah",
"RequestTimeout": 3600
},
"Namespace": "TestApp"
}).
info: Microsoft.AspNetCore.Mvc.Infrastructure.ObjectResultExecutor[1]
Executing ObjectResult, writing value of type '♣ '.
info: Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker[2]
Executed action PowerServer.Api.ServerApiController.CreateSessionAsync (PowerServer.Api) in 197.5154ms
info: Microsoft.AspNetCore.Routing.EndpointMiddleware[1]
Executed endpoint 'PowerServer.Api.ServerApiController.CreateSessionAsync (PowerServer.Api)'
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
Request finished in 324.8729ms 200 application/json; charset=utf-8
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
Request starting HTTP/1.1 POST http://localhost:5000/api/ServerApi/ConnectAndCreateTransaction application/json;charset=UTF-8 1216
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
Request starting HTTP/1.1 POST http://localhost:5000/api/ServerApi/VerificationFiles application/json;charset=UTF-8 0
info: Microsoft.AspNetCore.Authorization.DefaultAuthorizationService[1]
Authorization was successful.
info: Microsoft.AspNetCore.Authorization.DefaultAuthorizationService[1]
Authorization was successful.
info: Microsoft.AspNetCore.Routing.EndpointMiddleware[0]
Executing endpoint 'PowerServer.Api.ServerApiController.VerificationFilesAsync (PowerServer.Api)'
info: Microsoft.AspNetCore.Routing.EndpointMiddleware[0]
Executing endpoint 'PowerServer.Api.ServerApiController.ConnectAndCreateTransactionAsync (PowerServer.Api)'
info: Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker[3]
Route matched with {action = "VerificationFiles", controller = "ServerApi"}. Executing controller action with signature System.Threading.Tasks.Task`1[System.String] VerificationFilesAsync() on controller PowerServer.Api.ServerApiController (PowerServer.Api).
info: Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker[3]
Route matched with {action = "ConnectAndCreateTransaction", controller = "ServerApi"}. Executing controller action with signature System.Threading.Tasks.Task`1[PowerServer.Core.IBaseResult] ConnectAndCreateTransactionAsync(PowerServer.Core.RequestConnect) on controller PowerServer.Api.ServerApiController (PowerServer.Api).
info: Microsoft.AspNetCore.Mvc.Infrastructure.ObjectResultExecutor[1]
Executing ObjectResult, writing value of type 'System.String'.
info: Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker[2]
Executed action PowerServer.Api.ServerApiController.VerificationFilesAsync (PowerServer.Api) in 17.3216ms
info: Microsoft.AspNetCore.Routing.EndpointMiddleware[1]
Executed endpoint 'PowerServer.Api.ServerApiController.VerificationFilesAsync (PowerServer.Api)'
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
Request finished in 48.4714ms 200 text/plain; charset=utf-8
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
Request starting HTTP/1.1 POST http://localhost:5000/api/ServerApi/verificationresult application/json;charset=UTF-8 0
info: Microsoft.AspNetCore.Authorization.DefaultAuthorizationService[1]
Authorization was successful.
info: Microsoft.AspNetCore.Routing.EndpointMiddleware[0]
Executing endpoint 'PowerServer.Api.ServerApiController.VerificationResultAsync (PowerServer.Api)'
info: Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker[3]
Route matched with {action = "VerificationResult", controller = "ServerApi"}. Executing controller action with signature System.Threading.Tasks.Task`1[System.String] VerificationResultAsync() on controller PowerServer.Api.ServerApiController (PowerServer.Api).
info: Microsoft.AspNetCore.Mvc.Infrastructure.ObjectResultExecutor[1]
Executing ObjectResult, writing value of type 'System.String'.
dbug: PowerServer.Api.ServerApiController[0]
'PowerServer.Api.ServerApiController.ConnectAndCreateTransactionAsync (PowerServer.Api)' get request ({
"reqData": {
"Type": 7,
"Content": {
"Connect": {
"ApplicationName": null,
"CacheName": "",
"CacheGroup": "",
"TransactionName": "sqlca",
"Transaction": {
"AutoCommit": false,
"Database": "",
"DBMS": "ODBC",
"DBParm2": null,
"dbparm": "ConnectString='DSN=Summit;UID= ****;PWD=****",
"DBPass": "",
"Lock": "",
"LogID": "",
"LogPass": "",
"ServerName": "",
"SQLCode": 0,
"SQLDBCode": 0,
"SQLErrText": null,
"SQLNRows": 0,
"SQLReturnData": null,
"UserID": ""
}
}
},
"AppName": "TestApp",
"NamespaceName": "TestApp",
"SecureSession": "Blah Blah Blah",
"Version": "1.0",
"RequestId": "98836696-9D71-40c2-B2B1-2A6ABA1B9FD6",
"Transaction": null
}
}).
info: Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker[2]
Executed action PowerServer.Api.ServerApiController.VerificationResultAsync (PowerServer.Api) in 3.4522ms
info: Microsoft.AspNetCore.Routing.EndpointMiddleware[1]
Executed endpoint 'PowerServer.Api.ServerApiController.VerificationResultAsync (PowerServer.Api)'
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
Request finished in 20.0042ms 200 text/plain; charset=utf-8
dbug: PowerServer[0]
Validate Session Id: '0528CF3F-7B18-4EEB-A00C-5E1DF996DEB5' Session Status: 'Created' Session Last Visit Time: '12/7/2021 2:13:25 AM'
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
Request starting HTTP/1.1 POST http://localhost:5000/api/ServerApi/verify application/json;charset=UTF-8 19814
info: Microsoft.AspNetCore.Authorization.DefaultAuthorizationService[1]
Authorization was successful.
info: Microsoft.AspNetCore.Routing.EndpointMiddleware[0]
Executing endpoint 'PowerServer.Api.ServerApiController.VerifyAsync (PowerServer.Api)'
info: Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker[3]
Route matched with {action = "Verify", controller = "ServerApi"}. Executing controller action with signature System.Threading.Tasks.Task`1[System.String] VerifyAsync(PowerServer.Core.RequestSecurityVerification) on controller PowerServer.Api.ServerApiController (PowerServer.Api).
info: Microsoft.AspNetCore.Mvc.Infrastructure.ObjectResultExecutor[1]
Executing ObjectResult, writing value of type 'System.String'.
info: Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker[2]
Executed action PowerServer.Api.ServerApiController.VerifyAsync (PowerServer.Api) in 7.309ms
info: Microsoft.AspNetCore.Routing.EndpointMiddleware[1]
Executed endpoint 'PowerServer.Api.ServerApiController.VerifyAsync (PowerServer.Api)'
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
Request finished in 21.9043ms 200 text/plain; charset=utf-8
fail: PowerServer.Api.ServerApiController[0]
'PowerServer.Api.ServerApiController.ConnectAndCreateTransactionAsync (PowerServer.Api)' get result ({
"IsSuccess": false,
"ErrorCode": 0,
"ErrorMessage": "No data provider of database type `SqlServer' is found, you need to add a data provider before using the database",
"Version": "1.0",
"RequestId": "98836696-9D71-40c2-B2B1-2A6ABA1B9FD6",
"AppName": "TestApp",
"Session": {
"ErrCode": 0,
"ErrMsg": null,
"SessionId": "0528CF3F-7B18-4EEB-A00C-5E1DF996DEB5"
},
"Type": 7,
"Transaction": {
"TransactionId": null,
"SQLCode": -1,
"SQLDBCode": -1,
"SQLErrText": "No data provider of database type `SqlServer' is found, you need to add a data provider before using the database",
"SQLNRows": 0,
"SQLReturnData": null
},
"Content": {
"ServerConfig": {
"DelimitIdentifier": "no",
"Ojsyntax": null,
"CaseConversion": 0,
"Dbms": null
}
},
"Namespace": "TestApp"
}).
info: Microsoft.AspNetCore.Mvc.Infrastructure.ObjectResultExecutor[1]
Executing ObjectResult, writing value of type '♣ '.
info: Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker[2]
Executed action PowerServer.Api.ServerApiController.ConnectAndCreateTransactionAsync (PowerServer.Api) in 108.9313ms
info: Microsoft.AspNetCore.Routing.EndpointMiddleware[1]
Executed endpoint 'PowerServer.Api.ServerApiController.ConnectAndCreateTransactionAsync (PowerServer.Api)'
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
Request finished in 140.6482ms 200 application/json; charset=utf-8

Accepted Answer
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 7 December 2021 21:20 PM UTC
  2. PowerServer
  3. # Permalink
Are you also using Oracle besides SQL Server? I see you have an Oracle connection cache and have Oracle DB driver checked. If yes, open up SnapDevelop and see that the Oracle NuGet package is appearing in the generated C# project. Just FYI, the connection in PB IDE being successful and the Web API running being successful are two separate things.
Comment
  1. Jesse Busker
  2. Tuesday, 7 December 2021 21:21 PM UTC
So I think something in the NuGet install has failed. I went looking for the packages and didn't see Oracle in the installed list, but when I look at the DB Drivers the checkmarks are there. I thought a complete uninstall and reinstall of the whole PB suite would remove the links indicating what has been downloaded and let me do it again but that didn't work. What eventually DID fix it was going back into the DB Drivers, removing all the entries, closing PB, going back to the DB Config and adding them again. This time it did ask to install the drivers and again said they were successful. Trying to run the project again ran with success.
  1. Helpful 1
  1. Armeen Mazda @Appeon
  2. Tuesday, 7 December 2021 21:31 PM UTC
Thanks for sharing the solution!
  1. Helpful
There are no comments made yet.
Jesse Busker Accepted Answer Pending Moderation
  1. Tuesday, 7 December 2021 18:35 PM UTC
  2. PowerServer
  3. # 1

On my development machine I had 19R3 installed as well as 2021 so prior to posting I decided to remove all R3 products and 21 PowerServer product.  Upon reinstalling PowerServer 21 it installed the 1311 build and the PowerBuilder build was still 1288.  As you can see from the original post the Database Config window is missing the DB Drivers button.  I had seen that in the upgrade doc as well in another help file, but wasn't showing for me.  When making the cache configuration PB did ask for the drivers to be installed from NuGet and were done successfully.  When looking through the update doc again I double checked and PowerBuilder was still on 1288.  Updating PB to 1311 to match the other products was then able to show the Database Configuration > DB Drivers button.  The checkboxes were marked, but the license checkbox was not.

The SnapDevelop settings were already done but I did a full build & deploy and upload new cloud launcher.  Installed the new cloud launcher update when running the project, but got the same error.

Comment
  1. Jesse Busker
  2. Tuesday, 7 December 2021 21:20 PM UTC
So I think something in the NuGet install has failed. I went looking for the packages and didn't see Oracle in the installed list, but when I look at the DB Drivers the checkmarks are there. I thought a complete uninstall and reinstall of the whole PB suite would remove the links indicating what has been downloaded and let me do it again but that didn't work. What eventually DID fix it was going back into the DB Drivers, removing all the entries, closing PB, going back to the DB Config and adding them again. This time it did ask to install the drivers and again said they were successful. Trying to run the project again ran with success.
  1. Helpful
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 7 December 2021 14:03 PM UTC
  2. PowerServer
  3. # 2
Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 7 December 2021 03:00 AM UTC
  2. PowerServer
  3. # 3

Hi Jesse;

   Looks like your on the original release of PS2021. I suspect might be that the issue is the DB drivers. I would suggest upgrading to MR01 (build 1311) of PS2021. That would then update the DB Cache dialogue so that the PS Project would then allow you to bring down the latest Oracle & SS DB driver Nuget packages.

HTH

Regards ... Chris

Comment
  1. David Xiong @Appeon
  2. Tuesday, 7 December 2021 07:50 AM UTC
Hi Jesse,

You can get the installer from our Downloads portal at https://account.appeon.com/download (login required).

Please follow the upgrade note to rebuild & deploy your apps after upgrading to PowerBuilder 2021 MR Build 1311.

https://docs.appeon.com/pb2021/release_bulletin_for_pb/Build-1311-Upgrade-Notes.html

Regards,

David
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.