Java applet on Polish mBank bank page complains it cannot connect to database



Plugins Graveyard
Java (Java Embedding Plugin)
11 years ago
2 years ago


(Reporter: Dominik Wnęk, Unassigned)






11 years ago
User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; pl; rv: Gecko/20070725 Firefox/
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; pl; rv: Gecko/20070725 Firefox/

This is a page which shows details about an investment fund available through Polish bank mBank. They have dozens of funds and each of them has a page like this one; none of them work (well, I haven't actually tested ALL of them).

Reproducible: Always

Steps to Reproduce:
1. Go to the URL given
2. That's it!
Actual Results:  
The plugin says: "Wystapily problemy podczas komunikacji z baza danych", which means: "Problems during communication with the data base occured".

Expected Results:  
The applet, instead of the text, should show a graph demonstrating the value of the investment fund over time. All the other elements of the applet, like date range fields, buttons, etc appear correctly.

The page at the URL given is in Polish, sorry.

Doesn't work:
With Firefox under OS X 10.4.10. Also tested with Firefox 3.0a8pre and Seamonkey 2.0a1pre, both downloaded on 29.08.2007. Java installed is 1.5.0_07, latest provided by Apple.

In Safari on the same machine, with the same Java version. Also with Firefox in Linux, Windows, with various Java versions.
Assignee: blackconnect → smichaud
Component: Java-Implemented Plugins → Java Embedding Plugin
QA Contact: blackconnect → java.jep
I just tested (with this bug's URL) in Firefox on Mac OS X
10.4.10, and wasn't able to reproduce your problem.

It's possible that your original problem was caused by a temporary
glitch (probably on the server).

It's also possible that something's missing from your steps to
reproduce (I can't read Polish, so there's no way I can supply any
missing steps myself).

Comment 2

11 years ago
No, I've had this problem a long time now, and it's still the same.

Also, nothing is missing from the steps. It's just as simple as opening the URL (in my case, at least).

Is there any way I can see more of what is happening on my machine? Some sort of console, logfile, etc. which could point towards the problem?

Oops, I was wrong -- I didn't know where to look for your "problems
communicating with the database" error.  I'm able to reproduce your
problem on OS X 10.4.10 with Firefox and Camino 1.5.1 and
Seamonkey 1.1.4.  (And I don't see the problem in Safari, on in
Firefox on Linux (with Java 1.4.2) or Windows (with Java

You can turn on the Java Console to see a log of Java errors (run
Applications : Utilities : Java : J2SE 5.0 : Java Preferences, click
on the Advanced tab and choose Java console : Show console).  But no
errors appeared in my tests.

I suspect this is a problem with the Java applet used by this bank
site.  But, short of decompiling it and playing with the code, I have
no way to test my hunch.

I suggest you contact the bank, make them aware of the problem, and
ask them if they have any more information.  If they've found specific
problems with the Java Embedding Plugin and are able/willing to open
bugs on these problems, I will try to resolve them.

But it's just as likely that they've arbitrarily prevented the Java
Embedding Plugin from working with their systems -- many business
sites write Java applets that are designed to work only on "supported"
browsers and "supported" Java plugins.

In any case, I can't do anything without further information.  And I
suspect only the bank can provide it.

(By the way, I tried setting Firefox's user agent string to be the
same as Safari's -- this kind of trick sometimes gets around business
sites' attempts to limit what client software they support.  But it
didn't work in this case.)
Ever confirmed: true
Against my own better judgement, I downloaded the applet at this bug's
URL and decompiled it ... and discovered something interesting.  Now I
think this is probably a bug in the Java Embedding Plugin, but I'm
utterly mystified what the bug could be.

What I discovered is that the reason you get the "problems
communicating with database" error is that the "Od" (Polish "from"?)
and "Do" (Polish "to"?) fields in the applet are empty when the applet
is loaded into browsers on the Mac.  In Safari (and in browsers on other platforms) these dates are (by default)
set to today's date (in the "Do" field) and the date a year ago today
(in the "Od" field).  And if you set these dates by hand in browsers on the Mac and click the "Pokaz" button, the
applet now works properly (and you no longer see the "problems
communicating with database" error).

Comment 5

11 years ago
Confirmed, filling in the dates manually makes the applet function correctly. Never occured to me to do it before...

Thank you for pursuing this. :-)

"Od" is indeed "from". "Do" is indeed "to". "Pokaz" is "Show".

Actually I've now discovered another problem, which may underly (and
cause) the date problem:  It seems that, when running in
browsers on the Mac, the applet can't read (or doesn't read properly)
the "fund" names from the APPLET tag's "fundusze" and "fundusze1"
parameters -- when you first load the applet, the "fund" names are
"_ABCD1", "_ABCD2" and so forth.  (I'm just guessing that "fundusze"
means "fund".)
> It seems that, when running in browsers on the Mac, the
> applet can't read (or doesn't read properly) the "fund" names from
> the APPLET tag's "fundusze" and "fundusze1" parameters

Oops, this is wrong -- even in browsers, the first "fund"
name (if that's what it is) appears correctly in the two drop-down
lists at the bottom of the applet.

Comment 8

11 years ago
"Fundusze" is indeed "funds". "Fundusz" is singular.

I made a picture with the interface applet translated. Maybe it will be of some help to you. You can find it at
> I made a picture with the interface applet translated.

Thanks!  It will come in handy.

But I've already isolated the problem:  setText() is failing on the
"To" and "From" fields (TextField objects) when called from the
applet's init() method.  This doesn't happen if the same code is run
from the applet's start() method.

This identifies the problem as belonging to a well-known (at least to
me) but fortunately small set of problems that occur when an applet
starts up.

Basically, trying to start a Java applet in Apple's JVM on
browsers is like trying to fit a square peg into a round hole:
Apple's JVM's applet initialization code runs on secondary threads,
but browsers expect applets (and all plugin objects) to
load synchronously, on the main thread.  So, when loading an applet,
the Java Embedding Plugin must wait on the main thread (and spin the
OS's main-thread event loop) until the applet is "ready".

Currently the applet is considered "ready" sometime in the middle of
its init() method.  This works well in 99% of cases.  But there are
still a few applets (like this bug's applet) that have problems.

I'll try to fiddle with the "ready" boundary, to see if I can achieve
a better result.  But (of course) this will be very difficult (and
perhaps impossible) -- it's hard to improve on a success rate of 99%


8 years ago
Component: Java Embedding Plugin → Java (Java Embedding Plugin)
Product: Core → Plugins
The JEP is long gone.
Assignee: smichaud → nobody
Last Resolved: 3 years ago
Resolution: --- → INCOMPLETE


2 years ago
Product: Plugins → Plugins Graveyard
You need to log in before you can comment on or make changes to this bug.