Solved

unable to generate output of iRpot in JAVA JWS while outupt is generating when running application without JWS

Posted on 2015-02-05
24
34 Views
Last Modified: 2015-12-15
Dear Experts,
I have developed a application and generating report using iReport. I am able to generate report using iReport as a desktop java application but if I run the same application in browser using JWS the report is not generating. Other part of application is functioning normally in JWS.  If I copy all jasper and jrxml file at client machine than the output is generating..

Please help.
 
Thanks.

Regards
0
Comment
Question by:MILIND_JOG
  • 15
  • 9
24 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 40590782
I'm confused. What is iReport reporting on?
0
 

Author Comment

by:MILIND_JOG
ID: 40595836
Dear Sir,
As I said, I developed a application in JAVA Swing. I developed few reports for required output. The report I have developed is by using iReport 5.6.0. The report which I developed is working fine in the Desktop environment but when I publish the application using JWS, I am unable to get the desired output.

I hope
report.txt
0
 

Author Comment

by:MILIND_JOG
ID: 40595838
I hope I am able to explain you with the help of attachment. I am publishing the report using JNLP.

Regards
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 86

Expert Comment

by:CEHJ
ID: 40595857
I still don't  really know what you're reporting on (normally a database of course) and where it is?
0
 

Author Comment

by:MILIND_JOG
ID: 40596597
Sir,

I have a MySQL database. I am using iReport tool to develop reports like material ledge, account statements etc.
iReport generates .jrxml file as a normal xml file for data formatting and compiled file is with the extension .jasper. We use jasper libraries to invoke this compiled version i.e. .jasper to generate report from java.

Regards
0
 

Author Comment

by:MILIND_JOG
ID: 40597784
Please help

Regards
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 40597866
Well that tells me what you've got but not where it is. Am i to assume that every user of the app has their own DB or it there one server to which the app is meant to connect?
0
 

Author Comment

by:MILIND_JOG
ID: 40606334
Dear sir,
I have only one common database server and application published through JWS.
Regards,
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 40608608
Make sure you post all the error output: if it's not generating anything and there's NO error output, then there's something seriously wrong with code/exception handling.

For best results at this point, use javaws.exe at the command line with the url of the .jnlp file as its argument
0
 

Author Comment

by:MILIND_JOG
ID: 40644287
Dear Sir,

I sincerely appreciate your response but if some who is dealing  iReport (.jrxml) issues, can join us to resolve the issue than that will be even more better.

Regards
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 40644347
Please post the trace output from the Java console

http://technojeeves.com/index.php/aliasjava1/87-showing-the-java-applet-console

(same for JWS)
0
 

Author Comment

by:MILIND_JOG
ID: 41366500
My Question is still open and unable to generate jasperreport output .jrxml from jws application using jnlp

Please help
0
 

Author Comment

by:MILIND_JOG
ID: 41366503
MOST URGENT

Dear Experts,

I am running a java web application using JNLP locally on browser. Application is running fine but unable to run the report which is developed using Jasper. The reports are in extension of .jrxml and .jasper. The reports are part of JAR file and accessed from tomcat web server. I am trying to run the report but unable to do so.

Please help.

Regards
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 41366556
You didn't provide any feedback from my previous questions
0
 

Author Comment

by:MILIND_JOG
ID: 41367684
Dear Expert,

Good morning Mr.CEHJ.

Thanks for response.

In java console the message is as under

net.sf.jasperreports.engine.JRException: java.io.FileNotFoundException: jar:http:\192.168.1.101:8080\gloabapps\gloabapps.jar!\gloabapps\reports\gloabprintpo.jrxml (The filename, directory name, or volume label syntax is incorrect)

The gloabprintpo.jrxml and gloabprintpo.jasper is very much bundled in the .jar.


Regards
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 41367715
That can't be the message as the url is completely wrong - for starters, urls don't contain backslashes

Please copy and paste the errors at the very least. You can copy the whole console
0
 

Author Comment

by:MILIND_JOG
ID: 41367779
Ok Pl wt
0
 

Author Comment

by:MILIND_JOG
ID: 41367793
Dear CEHJ,

In java console I made ,

Debuging
            Enable Tracing                 ON
            Enable Logging                   ON

JAVA Console
            SHOW Console                ON


Output shows as under


************************************************************
Java Web Start 11.11.2.12
Using JRE version 1.8.0_11-b12 Java HotSpot(TM) Client VM
User home directory = C:\Users\admin
----------------------------------------------------
c:   clear console window
f:   finalize objects on finalization queue
g:   garbage collect
h:   display this help message
m:   print memory usage
o:   trigger logging
p:   reload proxy configuration
q:   hide console
r:   reload policy configuration
s:   dump system and deployment properties
t:   dump thread list
v:   dump thread stack
0-5: set trace level to <n>
******************************************************
There are so many lines which belongs to my system statements. But the last statement belongs to error is


*******************************************************
java.io.FileNotFoundException: jar:http:\192.168.1.101:8080\gloabapps\gloabapps.jar!\gloabapps\reports\gloabprintpo.jasper (The filename, directory name, or volume label syntax is incorrect)
**********************************************************

My programming unit is as under

jScrollPane1.setViewportView(jp1);
Connection c = dbconnection.DBInterface.getInstance().getConnection();
            String maildocno="";
            try {
               
            JasperReport jasperReport;
            JasperPrint jasperPrint;
            String jasperPrintf="";

            Map parameters = new HashMap();
            parameters.put("x_PONO", docno);
            parameters.put("x_AMTINWORD", amtinword);
            parameters.put("x_Entitycode", entity_code);
            FileInputStream fis = new FileInputStream(getClass().getResource("reports/gloabprintpo.jasper").toString());
            InputStream is=getClass().getResourceAsStream("http://192.168.1.101:8080/gloabapps/gloabapps/reports/gloabprintpo.jasper");

            jasperReport = JasperCompileManager.compileReport(rpname);
            JasperPrint print = JasperFillManager.fillReport(is, parameters, c);
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
            JasperViewer jv = new JasperViewer(print);
            jv.setSize(790, 550);
            jv.setEnabled(true);
            jv.repaint();
            jp1.add(jv.getContentPane());
            jp1.setVisible(true);
            jp1.repaint();
            jp1.repaint();
            this.repaint();
            this.repaint();
            pack();
            } catch (Exception e) {
            System.out.println(e);
        }



#######################
0
 

Author Comment

by:MILIND_JOG
ID: 41367799
I have so many different ways, but could not generate the report.  

Regards
0
 

Author Comment

by:MILIND_JOG
ID: 41367802
I mean to say I have applied so many different ways to generate the report but the result is zero.
 Regards
0
 
LVL 86

Accepted Solution

by:
CEHJ earned 500 total points
ID: 41367862
Get rid of the 'fis' line - it's wrong. The next line is potentially right, but needs to be specified from the package root. 'reports' should be at that root really. Then you'd have:

InputStream is = getClass().getResourceAsStream("/reports/gloabprintpo.jasper");

Open in new window

0
 

Author Comment

by:MILIND_JOG
ID: 41367890
Sir,

I will communicate after 2 Hrs.

Regards
0
 

Author Closing Comment

by:MILIND_JOG
ID: 41370973
Dear CEHJ,

Thanks for your support on this issue. My problem is solved. I would like to close the this issue.

Once again thank you very much for your suggestion which helped me in solving my problem.

Regards
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 41371179
:)
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question