riesvantwisk Posted August 26, 2008 Share Posted August 26, 2008 All,Often when I make a slight mistake in a report query or in a input control I always get the below error in JasperServer. How can I tell JasperServer to throw a usable message so i know what is actually wrong in my report rather then trying to guess at it? Ries HTTP Status 500 -type Exception reportmessagedescriptionThe server encountered an internal error () that prevented it from fulfilling this request.exceptionorg.apache.jasper.JasperException: java.lang.NullPointerException root causejava.lang.NullPointerException note The full stack traces of the exception and its root causes are available in the Sun Java System Application Server 9.1_01 logs.Sun Java System Application Server 9.1_01 Link to comment Share on other sites More sharing options...
anandharaj Posted August 27, 2008 Share Posted August 27, 2008 Hi,That is basically comes from JAVA, you can tune so that it wont appear on the screen but this is nothing to do with JS. Its fall back to JAVA itself and usually bases on the error message we can identify what is actuall problem. Link to comment Share on other sites More sharing options...
riesvantwisk Posted August 27, 2008 Author Share Posted August 27, 2008 Anandharaj SubramaniamWrote: Hi, That is basically comes from JAVA, you can tune so that it wont appear on the screen but this is nothing to do with JS. Its fall back to JAVA itself and usually bases on the error message we can identify what is actuall problem. Of course this comes from Java.... However it seems to happen when I make a mistake in a control or datasource or 'something'. However shouldn't JasperServer not catch ALL exceptions and tell me what is wrong rather then ignore the exception and bail out.Of course I can take a look at the glassfish logfile and see where/why it happens and in what module but honestly it's JasperServer that should give me a good message what is wrong.Ries Link to comment Share on other sites More sharing options...
anandharaj Posted September 4, 2008 Share Posted September 4, 2008 Hi, Normally this "NullPoiterException" is because of mission resource / input. To make it usefull error, perhaps Jasper team can come out with own error handling which will give a user-friendly message. Link to comment Share on other sites More sharing options...
swood Posted September 12, 2008 Share Posted September 12, 2008 The default behavior is to show that there was an exception and "Show Details" to see the stack trace, which I know is not friendly, but it is hard to deal with all errors.There may be some Glassfish specific issues that we do not catch, and so you are seeing more errors than what Tomcat installations would be seeing. Could you give us some examples of what is causing the errors? ShermanJaspersoft Link to comment Share on other sites More sharing options...
riesvantwisk Posted September 12, 2008 Author Share Posted September 12, 2008 Like what anandharaj was saying, it's mostly resources that are un-available.It's currently kinda hard to explain to our client what they are seeing is really there fault. They have questions how to get back (back button doesn't always work in that case), and they have questions why it cannot tell us what was wrong.I can currently think of two solutions: 1) Don't run the report in the web context, but seperate so that the exception can be caught and shown within the application rather then the application bailing out completely,2) Do a pre-flight check on the jrxml to see if everything is available to run the report. If not show a message of what was wrong. So far it seems to be only a case of missing re-sources though. Ries Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now