Fancy A "Fun" Debugging Challenge?
Yesterday I debugged a particularly nasty issue. The solution to which I thought I'd share with the world. Before I do I thought it would be fun to reproduce the problem, by way of a challenge for you guys.
Fancy yourself as a half decent hacker? Take a look at the the following link:
http://www.codestore.net/apps/applets.nsf/view
Pressing the Refresh button on the Action Bar should simply refresh the view. It doesn't. It just empties it. See if you can work out why. Muhaha.
Your only clue: it has nothing to do with the Domino side of it!
Update: Some of you have noticed it's not broken. Therein lies clue 2: it won't affect all of you.
is the view categorised and you loose the category when you press refresh?
Reply
Nope. It's a flat view. Nothing at all out of the ordinary about the view. Just two simple document and two simple columns.
Reply
lose!
Reply
Is it actually a view you are displaying? Or a page that is showing an embedded view?
I tried "Outputformat=JSON" and it throws an error, which it shouldn't on a view.
Reply
What you see is a Form called "$$ViewTemplate for View"
Here's a copy of the same view (but without a view template):
http://www.codestore.net/apps/applets.nsf/view2
Reply
I'm using chrome, but from my point of view, nothing is broken. I click refresh an still see 2 document?
Maybe a older cached applet in your browser? Clear browser and java cache, myabe that works?
Reply
Aha. I didn't want to give much away by saying it won't be broken for everybody.
Clue 2: It has nothing to do with the browser you're using either.
Reply
On my Chrome the docs vanish. Same on Opera and Firefox. I'm suspecting a Java issue.
And who in their right mind uses Java views anyhow?
Reply
Show the rest of this thread
Without seeing a fail can I figure out why it is failing?
Reply
I'd be very, very impressed if you could ;-)
Upgrade Java to JRE 1.6_26 or greater to see it fail.
Reply
Show the rest of this thread
It looks like that there is a java.security.AccesControlException when I click the Refresh button.
The first time the applet is loaded, it connects to www.codestore.net while when refreshing the view, it tries to open a connection using your IP address.
As I have an "Entry cache not found" error (translated from french message, so it might be different) regarding a "crossdomain.xml" file, and as it seems from interne/Google search, you will need to add such a file in order for the applet to be allowed to connect to the Domino Server.
And ... this feature (the cross-domain.xml support) is new with Java 6. So that not every codestore reader may experience the error.
Reply
Getting close. You're barking up the right tree!
In fact adding a crossdomain.xml file may well solve it but what I didn't get was why it would be needed at all, as the Applet is loaded from the same server (URL) and is fetching data from the same server/URL.
To add to the confusion -- why does the applet load the content view first time round without any issues?
I'm not sure you're right about it connecting via the IP address when Refresh is pressed. On my Java Console it says:
Connecting http://www.codestore.net/apps/apple.. ..t=1&Navigate=15&Count=40&SkipNavigate=32784&SkipCount=0 with proxy=DIRECT
While your suggestion may be a solution it's the exact detail of what it's an issue in the first place that of "interest" here.
Reply
Show the rest of this thread
Another clue:
When I first started debugging this I did so on a server on my local network called "dover" which is also known as "dover.rockalldesign.com" - both point to the same IP address via DNS.
The applets worked when using "dover" but not when visiting "dover.rockalldesign.com"
Go figure.
Reply
Show the rest of this thread
I've found that there's a Java setting that's on by default in newer JVMs, which breaks more than half the applets that are in use out there. It's something like, "Use the next generation of Java applets".
Reply
I'm curious. This is probably the reason that some of our Customers Portals do not allow our Customer Service to upgrade Java. Chrysler doesn't let us go past v5 I think it is.
Reply
(One of) the best tips I ever got from Codestore was never to use these wretched things. - Never have.
When I started (4x) the official web dev lierature promoted them as being wonderful.
Thanks for straightening me out on that one all those years ago.
Reply