Unreachable catch block
Always contruct try-catch blocks in a way that assumes catching Exceptions from more detailed to more generic.
Example
try { String [] tab = null; System.out.println(tab[3]); } catch (Exception e) { System.out.println("Exception"); } catch (NullPointerException e) { System.out.println("NullPointerException"); }
The above presented snippet will cause compilation error:
…Unreachable catch block for NullPointerException. It is already handled by the catch block
Sun Certified Java Programmer
Okay, I’ve been working with Java for a few years now, starting from academia and ending with business solutions. So yeah, I think I can say I know Java and some of those technologies like J2SE, J2EE or J2ME, with their own standards and solutions. Therefore, I’ve decided I’d take Sun Certified Java Programmer (SCJP) in a few months.
If …
Create a report with Reporting Services
If you want to create a report in 5 mins, you should follow this tutorial.
All requirement software can be found there. I installed the following:
The tutorial instructs you how to create the report (RDL file): how to define the data source, layout and how to preview the report.
Once you’re done, you can use Report Manager to deploy …
Parser Error Message: This page allows a limit of 200 controls, and that limit has been exceeded.
By default, web.config of SharePoint (should be there: C:InetpubwwwrootwssVirtualDirectories80) defines the maximum number of controls as 200. Should you define more on a page you’ll probably get an error similar to this:
Solution
In order to fix it, edit this web.config. Find configurationSharePointSafeMode tag and change the MaxControls attribute to a bigger number. Once you do this, reload the …
Is it possible to fail a load test?
It’s not really possible to fail a load test because by default it always ends with status ‘Completed’. Because of that anytime a load test completes one musts analyze the results – if performance stayed at the acceptable level. So, despite being a powerful tool, load tests require human attention, which makes the whole testing process less automate.
Luckily, load …
What if you extend an abstract class and implement an interface when both define a method with the same name?
Imagine you need to implement a class that extends an abstract class and implements an interface when both define a method with the same name – test().
Example
interface Implementable { public void test(); } abstract class Superclass { public abstract void test(); } public class Test extends Superclass implements Implementable { /* definition of load method(s)..... */ }
The …
Ireland again
Greetings from Ireland!
It’s the second time I went to Galway, Ireland. Again the Green Island welcommed us with rain…
Again, I work as a researcher, Java programmer in Digital Enterprise Research Institute (DERI), Galway, Ireland. The main topic of my research is how to adopt Social Semantic Information Sources (SSIS) to e-Learning. Actually, this is the title of my …
Exeptions and Errors in Java
In the diagram below I present the hierarchy of most common Exceptions and Errors:
Object
|
|_ Throwable
|
|_ Error
| |
| |_ AssertionError
| |
| |_ LinkageError
| | |
| | |_ ExceptionInInitializerError
| | |
| | |_ NoClassDefFoundError
| | |
| |_ VirtualMachineError
| |
| |_ StackOverflowError
|
|_ Exception
|
… Test your Java experience for free – JavaBlackBelt
Recently I’ve come across another very interesting social service – JavaBlackBelt. Basically it gathers programmers who use Java language and related frameworks and aspects (OO programming, JSP, Struts, JSF, EJB). There are even exams on C#, Ruby, JavaScript, and AJAX but some of them are still beta versions.
Of course I’ve taken a couple of exams and this is my …
IKHarvester
Some time ago I wrote about Didaskon, a framework for composing curriculum for a specific user, basing on his profile and using formal and informal knowledge. I belong to team of the developers.
At the moment, I am developing the one of its component – IKHarvester (Informal Knowledge Harvester). It aims at collecting (harvesting) data from Social Semantic Information Sources …