Ask a Question

Failed to obtain JDBC Connection / Failed do update dashboard db?

prometheus
Occasional Contributor

Failed to obtain JDBC Connection / Failed do update dashboard db?

I asked question earlier Re: Failed to import a definition / no subject alt... - SmartBear Community

Briefly description: I try to make a API call via HTTPS, the definition of URL couldn't import and parsed successfully.

The testing environment, both the web service server and testtool client are within private network.

 

I followed some suggestion to enable log (cmd > ready-api.bat>C:\log.txt 2>&1)

And found there are several ERROR related to DB as the following.  

What's the dashboad db?

Should I setup a JDBC connection before call API?

I thought JDBC connection is only for DataSource purpose, am I wrong?

Are those ERRORS the causes that I always get the invalid responses?

 

ERROR [DashboardSchemaChecker] Failed do update dashboard db.
ERROR [SoapUI] An error occurred [Failed to obtain JDBC Connection; nested
exception is org.h2.jdbc.JdbcSQLNonTransientConnectionException: Database
may be already in use: "Locked by another process:
C:/Users/Administrator/.readyapi/db/dashboard.lock.db". Possible solutions:
close all other connection(s); use the server mode [90020-200]], see error
log for details
08:56:14,969 ERROR [errorlog]
org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain
JDBC Connection; nested exception is
org.h2.jdbc.JdbcSQLNonTransientConnectionException: Database may be already
in use: "Locked by another process:
C:/Users/Administrator/.readyapi/db/dashboard.lock.db". Possible solutions:
close all other connection(s); use the server mode [90020-200]
org. springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain
JDBC Connection; nested exception is
org.h2.jdbc.JdbcSQLNonTransientConnectionException: Database may be already
in use: "Locked by another process:
C:/Users/Administrator/.readyapi/db/dashboard.lock.db". Possible solutions:
close all other connection(s); use the server mode [90020-200]
ERROR [MixpanelCustomEngine] analytics01.smartbear.com

5 REPLIES 5
richie
Community Hero

Re: Failed to obtain JDBC Connection / Failed do update dashboard db?

Hey @prometheus,

So you have REST API and youre attemping to poke the endpoint via HTTPS rather than HTTP, but when you submit the REST request youre getting an error response that reads something like as follows:

"the definition of URL couldn't import and parsed successfully."

Is my understanding correct?

If it is correct, where is this error response being reported? In the ReadyAPI logs / Error log?

If im not correct could you please clarify? Im sorry im making you repeat yourself.

Regarding jdbc. JDBC stands for java database connectivity and is the java version of odbc and is the.wrapper that includes driver and other stuff to enable connecting to a database and querying (using SQL) a database.

You only need to setup a JDBC connection if you are gonna be using SQL to query a database directly (so either creating, updating, deleting or retrieving data). You do NOT need to setup a JDBC connection if, for example you are making changes to a database (e.g. creating, updating, deleting, or retrieving) but the changes are done via HTTP methods (create=POST, update=PUT/PATCH, delete=DELETE, retrieve data=GET), so from what youve described, i cant see why youd need a JDBC connection

From what you said it appears you piped the logging to output the logging to a log file (is that right?) so you can see whats going on in the logging.


The error log indicates a resource attempting to be updated, but couldnt be updated due to some pessimistic locking.

Exactly what did you do immediately before this log was generated?

The logging reports the db error relates to an h2 database. Is the system youre trying to hit (via the REST endpoint) supported by an h2 database?

Again this brings me back to needing more information. You havent mentioned a database before. Also id be surprised if the ReadyAPI logging included an external database connection issue....making me wonder if this is actually an internal component that supports ReadyAPI itself.

If you could lay everythjnt out in words of 1 letter so people with very small brains can understand, im sure we can nail this down. I juat need a lot more specific info to ensure i understand properly.

Cheers,

Rich
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
prometheus
Occasional Contributor

Re: Failed to obtain JDBC Connection / Failed do update dashboard db?

Hey @richie 

 

The failure message when I import the URL are "Failed to import a definition" and ""smartbear javax.net.ssl.SSLHandshakeException no subject alternative names matching".

They are pop-up messages.

I have raise the question here:

Failed to import a definition / no subject alterna... - SmartBear Community

 

I also agreed with that for current test steps, I don't need the JDBC connection yet. But maybe ReadyAPI will check it every time when user import the URL?

 

we don't have h2 db. We use other proprietary DB.

 

I asked these questions just because I want to determine why I can't import the URL successfully. And it was not parsed, I need to add the key column at each request manually. I guess it's due to I haven't import the client certificate for HTTPS authentication.

I haven't try it, I will do it later.

 

 

 

richie
Community Hero

Re: Failed to obtain JDBC Connection / Failed do update dashboard db?

Hey @prometheus,

Sorry to have to come back. For my own education can you explain exactly what youre doing when you say youre "importing the URL". I dont know what that means in the context of ReadyAPI.
What are you actually doing when you "import the URL"?
What are you trying to do when you "import the URL"?

I just wanna make sure i understand so i dont steer you the wrong way

Ta

Rich
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
prometheus
Occasional Contributor

Re: Failed to obtain JDBC Connection / Failed do update dashboard db?

Hey @richie 

 

Like this, at the very beginning of a test, user need to enter the URL.

 

截圖 2021-10-13 上午10.46.27.png

richie
Community Hero

Re: Failed to obtain JDBC Connection / Failed do update dashboard db?

Hey @prometheus 

 

aah!  ok - so at least I understand now - you are trying to add in a new URL for a security test!  I didn't get that from what we discussed previously!

 

Anyway - I've just attempted to add in the URL for a new security tests (I used the petstore one you specified in the screenshot) - but I'm afraid I dont get any error response generated.

 

For example:

 

Capture.PNG

 

then, when I hit the 'Next' button on the wizard it successfully launches

 

Capture1.PNG

 

You didn't get to this second page did you I'm assuming?  Yeah - I had no problems at all.

 

What version of ReadyAPI are you using?  I'm running v3.10.0 and I didnt get any error responses generated (well - up to this point anyway)

 

Cheers,

 

Rich

 

if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
cancel
Showing results for 
Search instead for 
Did you mean: