jdbc connector issues?

366 views
Skip to first unread message

goo...@bgctnv.org

unread,
Sep 23, 2015, 11:28:39 AM9/23/15
to pwm-general
Hello pwm team, I have successfully installed PWM 1.7 nightly build and have it running on top of Windows Server 2012R2, Tomcat 7, and Java 1.8. I am attempting to configure MySQL to work with PWM. I installed the JDBC driver v5.1.36 MSI. Pointed PWM to the .jar driver via the configuration editor. After configuring the database driver, I receive the following popup message:


Error
RequestError: Unable to load ConfigEditor?processAction=databaseHealthCheck&pwmFormID=5Y7iBNJqgD0JHlSPlcWsldMCcggbeH3J14ffaab7dd7BIkXN&preventCache=1443020023873 status: 0


Clicking OK only brings me back to the database configuration editor page. Health status does not display on the Configuration Manager, only showing the following error with red background:


unable to load health data from server
9/23/2015, 10:59:15 AM retry


Removing the driver from Configuration Editor fixes the health display issues, but I can't connect to my DB without it.


Checking the PWM logs I see that java has a few exceptions thrown:


2015-09-23T10:47:54Z, ERROR, filter.ApplicationStatusFilter, error while trying to detect application status: javax.servlet.ServletException: Servlet execution threw an exception
2015-09-23T10:47:54Z, ERROR, filter.ApplicationStatusFilter, unable to satisfy incoming request, application is not available


I can attach the full stacktrace if need be, but I did find this piece of the trace to be of interest:


Caused by: java.lang.RuntimeException: Can't load resource bundle due to underlying exception java.util.MissingResourceException: Can't find bundle for base name com.mysql.jdbc.LocalizedErrorMessages, locale en
at com.mysql.jdbc.Messages.<clinit>(Messages.java:54)
... 70 more
Caused by: java.util.MissingResourceException: Can't find bundle for base name com.mysql.jdbc.LocalizedErrorMessages, locale en
at java.util.ResourceBundle.throwMissingResourceException(Unknown Source)
at java.util.ResourceBundle.getBundleImpl(Unknown Source)
at java.util.ResourceBundle.getBundle(Unknown Source)
at com.mysql.jdbc.Messages.<clinit>(Messages.java:52)
... 70 more


Googling this error shows a multitude of solutions for different Java applications, however since I'm not a developer, I'm not sure how (or even IF) it applies to the PWM application.

Any assistance would be greatly appreciated as I'm looking forward to deploying this software to my userbase ASAP.

cha...@gmail.com

unread,
Oct 19, 2015, 4:31:37 PM10/19/15
to pwm-general, goo...@bgctnv.org
Could any devs weigh in on this situation? I stood up an entirely new server with the same specs as above, just for testing and this issue still applies. I've tried putting the .jar file in WEB-INF/lib of the PWM app, in my JAVA_HOME/lib dir, and Tomcat's lib directory, but it seems to be an issue with the jar and Java, not necessarily the location.

Any help would be greatly appreciated!

Jason Rivard

unread,
Oct 20, 2015, 7:52:11 PM10/20/15
to pwm-general, goo...@bgctnv.org
Make sure your uploading the actual jdbc jar driver file to the pwm config editor, not the zip file you download from the website.  The jar will be inside.  Also if you are uploading the jar to the config editor you should not also copy it anywhere inside the tomcat or pwm folder structure.

cha...@gmail.com

unread,
Oct 21, 2015, 9:51:03 AM10/21/15
to pwm-general, goo...@bgctnv.org

Thanks Jason, but I do have the .jar file loaded:




I wasn't aware that I didn't need to manually put the .jar file into WEB-INF/lib so I removed all traces of it, but still experience the same issue.

I also noticed that I cannot log in with my domain credentials with the .jar file loaded through the config. I receive a similar popup as I do when I load the driver into the config:

Error
RequestError: Unable to load Login?processon=restLogin&
pwmFormID=DtrvzVTuPFKdMuzzYDcpKpjlEdz8K9D11508a8e843cGg3UU&
preventCache=1445434427184 status: 0



Again, these issues only occur when I have the .jar file loaded into PWM. I've attached a full trace from October 21st to this message for review. Thanks in advance for all assistance.
tracePWM.txt

cha...@gmail.com

unread,
Nov 9, 2015, 3:07:51 PM11/9/15
to pwm-general, goo...@bgctnv.org

I'm hoping to bump this thread back up for some assistance. I've attempted to connect mySQL to PWM on three different servers now, the first two being Windows 2012r2 and the third being an Ubuntu Server 14.04 machine with the latest .war file, jdk 1.7.0_85, and mySQL 5.5.46 (Ubuntu). Each time I attempt to upload the jdbc driver using PWM's web config, I receive the same message:

RequestError: Unable to load ConfigEditor?processAction=databaseHealthCheck&pwmFormID=Cmnl5bEOeJIH17qvS3WtMVD7zNR4bTX7150ed7dd0abSifIy&
preventCache=1447093602461 status: 0

This also causes PWM's health statistics to not show on the config manager page, only showing the message 'Unable to load health data'. I've tried multiple iterations of the driver, 5.0.8, 5.1.36, 5.1.37, but all versions gave the same message as above when attempting to test the database connectivity using the config. Is there any correlation between jdk and jdbc driver versions that might be causing this? I don't want to run the PWM database as LocaDB if I don't have to, but it seems I have no choice at the moment. I haven't tried loading an other databases (SQL, PostGres, etc) to see if this might have a resolution.
Is there a way to bypass the web config and upload the driver manually?








On Wednesday, September 23, 2015 at 11:28:39 AM UTC-4, goo...@bgctnv.org wrote:

Jason Rivard

unread,
Nov 9, 2015, 5:27:06 PM11/9/15
to pwm-general, goo...@bgctnv.org
Can you point to what jdbc driver your using so I can try it?  The error suggests that the jar file is missing some Resource files.  At the very least we should give a better error.

You can place the jdbc driver jar's in the pwm/WEB-INF/lib directory instead of uploading the gui.  

The LocalDB is always used by PWM, so not sure what you mean by use LocalDB "instead of".  I'm guessing you mean c/r storage, and that can be LocalDB, LDAP or Remote DB.

cha...@gmail.com

unread,
Nov 9, 2015, 9:58:48 PM11/9/15
to pwm-general, goo...@bgctnv.org

For my Ubuntu box I'm using v5.1.37 found here: http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.37.zip. I unzipped it as instructed and tried uploading the .jar file inside through config manager. That's when I receive the error.

Good news though. I placed the .jar file manually in the directory as specified below, changed my connection string to use
jdbc:mysql://localhost:3306/pwm instead of 127.0.0.1 or the server's IP and I get a successful connection. I'd still like to find out why the error appeared as it did to help any other folks having the same issues.


I meant that I would be using the LocalDB to hold responses versus using MySQL, as I would've liked. Apologies for the confusion.


Thanks again for all your assistance, Jason. You and your team have an awesome product!
Reply all
Reply to author
Forward
0 new messages