Jump to content
Changes to the Jaspersoft community edition download ×

DB2 data source -- doesn't seem to save password


valeskyt

Recommended Posts

I'm using Jaspersoft Server Community Edition, version 7.1.0

I'm setting up a data source to connect to a DB2 server using a JDBC driver. The behavior I see is this

1) I fill in the fields of the "Set Data Source Type and Properties" screen

2) I click "Test Connection" on this screen, and it reports "connection passed"

3) I click "save"

4) I try to use the data source from a report, and my account gets locked. The error messages in the log report

Caused by: com.ibm.db2.jcc.a.co: [jcc][t4][2013][11249][4.3.111] Connection authorization failure occurred.  Reason: User ID or Password invalid. ERRORCODE=-4214, SQLSTATE=28000

 

Also, I find that if I reopen the data source using "edit", and try the "Test Connection" button again, it reports an error:

So, it seems as if it's not saving the credential. 

Does this error sound familiar to anyone? I really don't know how to fix it, as it seems that everything is configured correctly.

 

Also, I see this error in the log from when I was editing the data source. Could this be the server failing to successfully save my credential? (That would be odd, because it remembers all of the other config info for the data source)

2018-12-17 14:01:32,951 ERROR DiskStorageFactory,connection%002edescriptions.data:495 - Disk Write of 3b1d8c21-2d75-46cb-9a82-96842f27ebbe failed: 
java.io.NotSerializableException: com.jaspersoft.jasperserver.remote.connection.storage.ContextsStorageSecurityAspect$OwnedConnectionDataPair
    at java.io.ObjectOutputStream.writeObject0(Unknown Source)
    at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
    at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source)
    at net.sf.ehcache.Element.writeObject(Element.java:835)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
    at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
    at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
    at java.io.ObjectOutputStream.writeObject0(Unknown Source)
    at java.io.ObjectOutputStream.writeObject(Unknown Source)
    at net.sf.ehcache.util.MemoryEfficientByteArrayOutputStream.serialize(MemoryEfficientByteArrayOutputStream.java:97)
    at net.sf.ehcache.store.disk.DiskStorageFactory.serializeElement(DiskStorageFactory.java:405)
    at net.sf.ehcache.store.disk.DiskStorageFactory.write(DiskStorageFactory.java:384)
    at net.sf.ehcache.store.disk.DiskStorageFactory$DiskWriteTask.call(DiskStorageFactory.java:485)
    at net.sf.ehcache.store.disk.DiskStorageFactory$PersistentDiskWriteTask.call(DiskStorageFactory.java:1088)
    at net.sf.ehcache.store.disk.DiskStorageFactory$PersistentDiskWriteTask.call(DiskStorageFactory.java:1072)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
 

 

 

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

It could also be a UI problem upon saving. If it's a one off issue then its probably not worth pursuing but if it happens every time so that when you click on Save and then re-enter the data source page immediately (prior to running any reports) and see whether the username and password was saved or reset/blank, then at this point in time check whether the jasperserver log spits out consistent error messages at every replication. If it does then those errors should be targetted. If there are no consistent errors, then enable the browser F12 dev console and trace it from the client.  Tests should be using a direct server login..ie localhost on 8080.

Link to comment
Share on other sites

I fired up Wireshark and sniffed the conversations with the database. I found that when I enter the password and do "test", it uses the correct password. But when I close the pasword and reopen it, it's using an old, incorrect password. 

So now I'm trying to figure out where Jaspersoft saves the data source configuration information. Is it in a file, or in a database?

Link to comment
Share on other sites

Solved it.

I'm honestly not sure exactly what was causing the issue, but here is the background:

1) The Chrome browser had a cached password for another account with the same username. (That is Chrome had a cached password for the Jaspersoft local account, 'bob_smith')

2) The name of the account used for the DB2 connection was also 'bob_smith', but it was an account on the remote DB2 server, with a different password.

3) It seems that there was some sort of interaction between Chrome and Jaspersoft such that the Jaspersoft local account's password was used instead of the DB2 one, even though I entered the DB2 one in the form and successfully tested the connection with it. I'm not sure whether Jaspersoft was somehow obtaining and saving the Jaspersoft local password, or if it had been saved once and my save was failing to overwrite it.

4) At any rate, I logged in using a different browser, without the cached credential, and I was able to save the correct password without any issues.

A very strange problem, and if I hadn't used the packet sniffer I'd probably still be pulling my hair out trying to figure out what was going wrong.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...