[AAA-253] Logging in to the H2 database interface results in an "IO Exception" error Created: 22/Feb/23  Updated: 09/Mar/23

Status: In Review
Project: aaa
Component/s: None
Affects Version/s: 0.17.6
Fix Version/s: None

Type: Bug Priority: Medium
Reporter: Peter Suna Assignee: Peter Suna
Resolution: Unresolved Votes: 0
Labels: pick-next, pt
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

I am unable to log in to the H2 database using the default "foo:bar" credentials, as I assume it should be set up according to this code in the AAA repository:
https://github.com/opendaylight/aaa/blob/master/aaa-idm-store-h2/src/main/java/org/opendaylight/aaa/datastore/h2/H2Store.java#L37

Every login attempt results in the following error message:
`IO Exception: "/home/user/test outside /home/user/Projects/ODL/aaa/karaf/target/assembly/system/com/h2database/h2/2.1.210" [90028-210] 90028/90028`

Steps to reproduce:
1) Build the AAA project.

2) Run the following commands:

cd aaa/karaf/target/assembly/system/com/h2database/h2/2.1.210
java -cp h2-2.1.210.jar org.h2.tools.Server -trace -pg -web -webAllowOthers -baseDir `pwd` 

3) Open a browser and go to ` http://10.0.2.15:8082"
4) Try to log in with "foo:bar" or "admin:admin" credentials.



 Comments   
Comment by Ivan Hrasko [ 28/Feb/23 ]

You have hit: https://github.com/h2database/h2database/blob/1ba3590b5d29581a14b018b966e5da0a8ff2994c/h2/src/main/org/h2/engine/ConnectionInfo.java#L249.

Comment by Ivan Hrasko [ 28/Feb/23 ]

The message means that test database (located at your home) is outside of defined baseDir.

Comment by Ivan Hrasko [ 28/Feb/23 ]

We have to investigate how this works, for example:

when has test database been created?

how to move it to desired baseDir?

Comment by Ivan Hrasko [ 28/Feb/23 ]

And then write the finding into documentation, for example when you just delete baseDir from parameters then it works. Do we need to specify it? Does ODL have specific location for database? If yes use that.

Generated at Wed Feb 07 19:09:02 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.