Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement on Documentation and error handling #34

Open
HiranChaudhuri opened this issue May 10, 2023 · 2 comments
Open

Improvement on Documentation and error handling #34

HiranChaudhuri opened this issue May 10, 2023 · 2 comments

Comments

@HiranChaudhuri
Copy link

This documentation seems outdated:
https://github.com/h-thurow/Simple-JNDI/wiki/DataSource-Configuration-DBCP-2-and-Commons-Pool-2-(New-in-0.15.0)

When following this, I experienced an error in my logfile stating:

ERROR org.osjava.sj.loader.SJDataSourceConverter - Incomplete arguments provided <some more text>

There was no hint as of what exactly was missing. Checking https://github.com/h-thurow/Simple-JNDI/blob/master/src/main/java/org/osjava/sj/loader/convert/SJDataSourceConverter.java#L46 I found out that the properties file should contain these values:

type=javax.sql.DataSource
driver=org.mariadb.jdbc.Driver
url=jdbc:mariadb://localhost/testdb
user=user_name
password=password

So it might be nice to have the documentation updated.
I also noted there are IllegalArgumentExceptions thrown, but these must have been caught/hidden in the Simple-JNDI startup code. Please make them visible so it is more straightforward fixing issues.

@h-thurow
Copy link
Owner

When you can access the datasource ignore the message.

@HiranChaudhuri
Copy link
Author

HiranChaudhuri commented May 13, 2023

I was not able to access the datasource before reading the source code to understand what was missing.
The log message was not sufficient, and the exception never shown. It must have been swallosed somewhere else.

Is that intended?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants