Unable to run jasperreport using java application

I have created a report using jasperassistant.
But i could'nt run the report using my java
application.below given is the code sgment to call the
report.
try{
String rFile="/root/Production.jasper";
HashMap rptHash=null;
FileInputStream fs=new FileInputStream(rFile);
System.out.println("loading report file , read " +
fs.available());
JasperReport
template=(JasperReport)JRLoader.loadObject(fs);
System.out.println("Successfully created the report");
JasperPrint
report=JasperFillManager.fillReport(template,rptHash,conn);
System.out.println("Report filled with data");
}catch(JRException jex)
{System.out.println("Jasper Exception
:"+jex.getMessage());
System.out.println("Jasper Exception
:"+jex.fillnStackTrace());
System.out.println("Jasper Exception
:"+jex.getStackTrace());
System.out.println("Jasper Exception
:"+jex.getLocalizedMessage());
While running this application ,it throws into the
exception section.
Out put of the program is
Loading report file ,read 15275
Jasper Exception : Error loading object from
InputStream
Jasper Exception
:net.sf.jasperreports.engine.JRException :Error
loading object from InputStream
Jasper Exception
:[Ljava.lang.StackTraceElement;@e7b241
Jasper Exception :Error loading object from
InputStream
I request you to go through my code and give me some help to solve this asap.
thanking you

Hi Again Monty.
I may have given up too soon.
Click once on the downloaded TheGame.zip file to highlight it.
Press the Command⌘ + I keys, to Get Info.
Change Open With to Stuffit Expander.
Double-Click on TheGame.zip.
A folder titled TheGame will be created. Open that.
In there will be:
decks An Empty Folder
Game.jar
game.xml
images Folder This one has many sub entries.
preferences.properties
readme.txt
release_notes.txt
runme.bat
When I Get Info on Game.jar, Open With is set to Jar Launcher.
That's as far as I am going though. does that help any?
ali b

Similar Messages

  • Unable load jasperreports using java application

    I have created a report using jasperassistant.
    But i could'nt run the report using my java
    application.below given is the code sgment to call the
    report.
    try{
    String rFile="/root/Production.jasper";
    HashMap rptHash=null;
    FileInputStream fs=new FileInputStream(rFile);
    System.out.println("loading report file , read " +fs.available());
    JasperReport template=(JasperReport)JRLoader.loadObject(fs);
    System.out.println("Successfully created the report");
    JasperPrint report=JasperFillManager.fillReport(template,rptHash,conn);
    System.out.println("Report filled with data");
    }catch(JRException jex)
    System.out.println("Jasper Exception :"+jex.getMessage());
    System.out.println("Jasper Exception :"+jex.fillnStackTrace());
    System.out.println("Jasper Exception :"+jex.getStackTrace());
    System.out.println("Jasper Exception :"+jex.getLocalizedMessage());
    While running this application ,it throws into the
    exception section.
    Out put of the program is
    Loading report file ,read 15275
    Jasper Exception : Error loading object from InputStream
    Jasper Exception :net.sf.jasperreports.engine.JRException :Error loading object from InputStream Jasper Exception :[Ljava.lang.StackTraceElement;@e7b241
    Jasper Exception :Error loading object from InputStream
    I request you to go through my code and give me some help to solve this asap.
    thanking you

    Do you actually mean you want to make sure that only one instance of a GIVEN Java program is running at one time? If so then search this forum becuse this question comes up frequently.

  • How to run a pure java application client with ear deployed on 9ias

    Hello all,
    We want to run a pure java application client which is packed with target bean in the same ear file. In the application-client.xml we refer to some EJBs.
    We deployed the ear file which contains ejb jar module and application client module to oracle 9ias 904 through enterprise manager on unix. The jndi.properties we used looks like this
    java.naming.factory.initial=com.evermind.server.rmi.ApplciationClientInitialContextFactory
    java.naming.provider.url=opmn:ormi://opmn_host:opmn_port:oc4j_instance_name/application_name
    java.naming.security.principal=test
    java.naming.security.credentials=test
    Is there anybody knows how to run such an application client? Do we need to provide such a jndi.properties or not at all?
    Thanks,
    9ias user

    Refer OpenEJB User - Oracle ADF Essential and TomEE+
    Also refer Bug in tomee 1.5.2. Fixed in 1.6.
    https://issues.apache.org/jira/browse/TOMEE-756

  • Manage Windows Using Java Application

    Hi,
    I am now developing a project, where we need to track the total time working.
    Eg. If i am working with outlook in my machine in various times, at the end, it should give me the total time of working with outlook.
    For this, i need to get the Windows ID (this case outlook). How can i access OS windows using java applications.
    Any idea how to do this???

    Hello,
    Syntax for Running report as JSP is as follow. The parameters can be passed by using "+" or "&".
    http://server.com/Employee.jsp?server=sac&destype=cache&desformat=html&userid=scott/tiger@database
    Use can pass reference parameters(user parameters)while ruuning the report.
    User can use User Parameters in his reports:
    "select * from emp where hiredate = :P_1"
    User can pass this parameter to Reports(while running it as JSP)as a parameter.
    http://server.com/Employee.jsp?server=sac&destype=cache&desformat=html&userid=scott/tiger@database&P_1=17-09-2000
    With Regards
    Sachin

  • How to send attachments using java application and outlook

    Hi ,
    I created an application in java which is as
    on the Conference Tab i can schedule a conference and with the send command on page it map all the scheduled data to outlook(with all conference details) and using outlook send option the mails are send to appropriate user.
    but now i want to modify this application such as when i use the send command from my jsp page it should attach the file that is in .vcs or .ics format for auto updation of user calender.
    can any one know how to send attachment using java application .

    Last time I checked, SMS was a service between carriers and doing SMS yourself was really tricky. Some services existed to let you do it but as I recall they wanted non-trivial money.
    However, most phone carriers provide an email-to-SMS bridge of some kind.
    So the easiest thing is just to send an email.
    That's sending from a non-phone to a phone. There's a J2ME library to send/receive SMS from/to a phone.
    However, this is from memory, and a little out of date, so I could be entirely wrong. Hope it helps anyway.

  • Error on upgrade from 3.2 to 4 [Unable to run page sentry in application 45

    Hi Folks,
    To upgrade from 3.2 to Apex 4, I logged-in as sys and ran
    apexins SYSAUX SYSAUX TEMP /i/
    After installation when I tried accessing apex in browser, I am getting following error message
    * ORA-06508: PL/SQL: could not find program unit being called*
    * Unable to run page sentry in application 4500.*
    * Return to application.*
    * Application Express 4.0.0.00.46*
    * Workspace: User: *
    * Language: en | Copyright © 1999, 2010, Oracle. All rights reserved.*
    This statement is returning INVALID status
    SELECT STATUS FROM DBA_REGISTRY
    WHERE COMP_ID = 'APEX'
    The log is showing errors
    Errors for PACKAGE BODY SYS.WWV_DBMS_SQL:
    LINE/COL ERROR
    218/5 PL/SQL: Statement ignored
    218/5 PLS-00306: wrong number or types of arguments in call to
    'PARSE_AS_USER'
    256/5 PL/SQL: Statement ignored
    256/5 PLS-00306: wrong number or types of arguments in call to
    'PARSE_AS_USER'
    574/6 PL/SQL: Statement ignored
    574/6 PLS-00306: wrong number or types of arguments in call to
    'PARSE_AS_USER'
    Can someone here guide me how to resolve this? Shall I reinstalled APEX 4 or rollback to 3.2 or do I need to run any other file.
    Thanks in advance
    Aali

    Hi.
    I have the same problem too.
    i found this:
    http://forums.oracle.com/forums/thread.jspa?messageID=4390780
    The problem is by the oracle version. (al least in my case)
    apex 4.0 needs 10.2.0.3 and i have 10.2.0.1
    I'm going to deinstall, upgrade 10g and reinstall...
    Edited by: Andres Vilallave on 02-jul-2010 11:36

  • We have a requirement to print the w2 forms for employees using java application, how can i implement this. Please give some suggestion.

    We have a requirement to print the w2 forms for employees using java application, how can i implement this. Please give some suggestion.

    Anyone any ideas to help please?

  • How to import the image by using java application

    1.how to import the image by using java APPLICATION and display it on the textarea that you have been created.
    2.how to store the image into the file.
    3. what class should i used?
    4. how to create an object to keep track the image in java application.
    * important : not java applet.
    plzzzzzzz.
    regards fenny

    follow the link:
    http://java.sun.com/docs/books/tutorial/2d/images/index.html

  • How to invoke Default printer of my system by using java application

    I need to invoke default printer of my system by using java application ? could u plz help me out with sample code?

    VoodooMagic.getDefaultPrinter().print();
    http://www.javaworld.com/javaworld/jw-10-2000/jw-1020-print.html
    Look for more at Google.

  • Running files using java

    Please help, how can i run files using java.
    Files such as installers, batch files, or exe files....
    thanx

    Dear
    To run an EXE or COM or (other types of files other than BAT) use
    Runtime.exec("program-file-name.exe");
    while for running BAT files, always use this syntax
    Runtime.exec("bat-filenane", null, "bat-file-directory");
    Thats all.
    If your directory name or filename contains spaces, then surround the directoryname + filename within double quotes.
    Regard
    Dharmendra!
    Software Engineer(Java/J2EE)

  • Error while trying to run program using java.exe

    First of all I'd like to apoligize if this thread already exists here somewhere.. I've spent the last hours Googling and searching the forums for an answer, but haven't found one, so I posted a topic..
    The problem is the following:
    I'm using Netbeans 5.5 with JDK1.6.0. When I build/run a Java application in this IDE, I get no errors whatsoever..
    But, when I try to run it from the prompt, using following code (I copied the .class file into the same directory as the .java file)
    java -classpath . main.javaI get the following errors:
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Sour
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$000(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Metho
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Sourc
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)I'm quite sure that the problem is something I'm simply missing, since Netbeans runs everything without troubles..
    Anyone an idea how I could solve this problem? (Trust me, I checked the net, lots of people with this prob, but no decent solutions given)
    Thanks in advance (and once again sorry if this thread already existed).
    Greetings,
    Tribio

    Oh, forgot the first error line indeed, thanks for pointing that out.
    D:\Tribio\JPF\src\jpf>java -cp . main
    Exception in thread "main" java.lan.NoClassDefFoundError: main (wrong name: jpf/Main)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Sour
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$000(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Metho
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Sourc
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)And concerning the package question. In the code of main.java I define the package jpf as follows:
    package jpf;Hateful problem, and I so wanna use the prompt java once in a while instead of having to rely on NetBeans..
    And you're not at all looking at it too simple, any input on the matter is appreciated.. :)

  • Want to shutdown solaris 10 using java application

    Greetings all!
    I have been unsuccessful at creating my application to shut down a Solaris 10 server with a java application. I am hoping someone might be able to point me in a good direction here.
    I want to log on as a regular user and run a java application that monitors remote information (UPS battery voltage) and will gracefully shutdown the server if there is a problem. If I run my application as root all is well, except that I am running as root :)
    I can write code to access the shell:
    Process proc = Runtime.getRuntime().exec("ls");
    BufferedReader Input = new BufferedReader(new InputStreamReader(proc.getInputStream()));
    while ((s = Input.readLine()) != null) {out.println(s);}
    But I can't do a "su"?
    I've tried multiple examples out there of code that allows shell communication, and good examples of using Runtime.getRuntime()
    I think the conclusion is that you can't issue a su command via java application.
    I've also tried to telnet from a console to localhost and log in as root - no joy there either.
    Would someone have information that might point me in the right direction to solve this problem? Even better, if there is a sample snippet to go along with any help.
    Thank You very much!
    Ray

    Wow,
    Thank you for the very detailed response! I read the referenced web page last night, I'll read it again today too. RBAC sounds like a pretty complicated administrative tool. Coming from the Win32 domain, most of this security stuff is sadly uncharted territory for me (except for my mac).
    Let me see if I understand your method:
    Create a role, javarole, this role needs Primary Administrator priviliges (in order to invoke "shutdown -y -i5 -g0") only available to root
    Create a powerdown profile, essentially a script:
    this line creates the file:
    # echo "powerdown:::profile to powerdown server:help=powerdown.html" >> /etc/security/prof_attr
    I think this is the actual added script: (instead of the shutdown command just use init 5)
    # chmod 755 /usr/sbin/powerdown
    # cat > /usr/sbin/powerdown <<EOF
    #!/bin/sh
    /usr/sbin/init 5
    EOF
    This line is a bit confusing to me, is it also part of the script?
    # echo "powerdown:suser:cmd:::/usr/sbin/powerdown:uid=0" >> /etc/security/exec_attr
    I see the uid=0 (root)
    It seems obvious to me that I log in a root to create this script, which is the reason it has permission to shutdown...right?
    Also, I tried the su command using runTime.exec("su poweroff"); // a user I created to try poweroff scripts
    It seems that su is generally not available, I will create the role and try to telnet to it.
    What about creating a generic user script that includes the javarole name and password, and then run the script "/usr/sbin/powerdown"
    Yes, it leaves a role password exposed, however it is a very limited role, that is not accessible by a user login, but the turn off script is available to every user?
    Regards,
    Ray

  • Long running reports using java servlets

    Hello,
    I'm running into a problem using java servlets to produce database reports and sending them back to the client browser as excel or html. The problem comes into play when the user has submitted two reports then goes to run a third and the browser hangs. I realized now that this is because of the two active connections that the user already has to the app server. Does anyone have any suggestions on how to get around this? I'm trying to now write the report to the server, and provide the browser with a url, but it seams as though the connection isn't totally closed even though I close the response printwriter.... Any suggestions would be greatly appreciated....

    Unfortunately I dont have an answer to your question, but:
    If the reports are large/long running, should they be generated on demand? You could schedule the reports to be generated every day, month or whenever appropriate, stored on the server and then quickly pulled by the user whenever needed.

  • Error in sending mail Using java application using SMTP.

    Hi,
    I have created a java application of self user registration which also sends email to the user.
    I have also added two JAR files ie mail.jar and activation.jar under the PORTAL_INF/lib.
    The code works well in other servers but its showing the error-
    java.lang.NoSuchMethodError: com.sun.activation.registries.MailcapFile.getMailcapList(Ljava/lang/String;)Ljava/util/Map;
    Thanks & Regards,
    Amarys.

    Hi Amarys,
    Please check if you have configure the mail server in SAP protal.
    Refer to below documents:
    [Send email, using SMTP on remote host|Send email, using SMTP on remote host]
    [Mailing throw webdynpro for java|Mailing throw webdynpro for java]
    Best Regards
    Arun Jaiswal

  • Hardware identification using Java-application

    Hi,
    please help me! I would like to get some hardware-specific information using a Java-application? Is it possible?
    Thanks everybody,
    dzsitter

    Probably not, in pure Java. Depends on what the "hardware" is that you had in mind.

Maybe you are looking for

  • Is there a way for me to stop the iPad from automatically storing an email address I send mail to that is not in my contacts?

    The iPad seems to automatically store email addresses for ease of use. But what if there are ever email addresses for privacy reasons that I do not want the device to remember? Can I stop the device from storing addresses that I do not specifically o

  • Ultra 10 Problem

    Hi. I would very much appreciate any assistance with my problem. I have an Ultra 10 that i am trying to install Solaris on. I have tried Solaris 9 (which i used to install on another machine last week) and downloaded Solaris 10, both have shown the f

  • Romanian characters in Description and captions

    How do I get Romanian characters into the descriptions of my photos in iPhoto so they will appear in the captions of my slideshow? I need characters like the t with the squiggly underneath and the s with the squiggly, a with a hat, a with a u above i

  • SAPConnect - Difference between Sent & Transmitted

    Hello friends, Can someone please clarify between Sent & Transmitted status for emails in SAP. i checked few links and what i understand is in sent status it checks for message delivery report and status becomes diamond shape. in Transmitted status,

  • Statistical goods receipt inspection?

    Hi , If Vendor directly ship material to Customer. And in our company premises, we will only do "statistical goods receipt". Invoice will be take care through Statistical goods receipt. So How to generate inspection lot, when inventory is not receive