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
27 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
Comment Utility
I'm confused. What is iReport reporting on?
0
 

Author Comment

by:MILIND_JOG
Comment Utility
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
Comment Utility
I hope I am able to explain you with the help of attachment. I am publishing the report using JNLP.

Regards
0
 
LVL 86

Expert Comment

by:CEHJ
Comment Utility
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
Comment Utility
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
Comment Utility
Please help

Regards
0
 
LVL 86

Expert Comment

by:CEHJ
Comment Utility
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
Comment Utility
Dear sir,
I have only one common database server and application published through JWS.
Regards,
0
 
LVL 86

Expert Comment

by:CEHJ
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
My Question is still open and unable to generate jasperreport output .jrxml from jws application using jnlp

Please help
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 

Author Comment

by:MILIND_JOG
Comment Utility
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
Comment Utility
You didn't provide any feedback from my previous questions
0
 

Author Comment

by:MILIND_JOG
Comment Utility
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
Comment Utility
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
Comment Utility
Ok Pl wt
0
 

Author Comment

by:MILIND_JOG
Comment Utility
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
Comment Utility
I have so many different ways, but could not generate the report.  

Regards
0
 

Author Comment

by:MILIND_JOG
Comment Utility
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
Comment Utility
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
Comment Utility
Sir,

I will communicate after 2 Hrs.

Regards
0
 

Author Closing Comment

by:MILIND_JOG
Comment Utility
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
Comment Utility
:)
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now