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.

Similar Messages

  • 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

  • Loading forms using Java 1.7

    Hello friends
    I've installed EBS 12.1.1 on OEL 5.5 (64 bit). I'm trying to load forms using Java version 1.7 but it shows error like "the jinitiator version is high", what I have to do to load forms using Java 1.7.
    Regards
    Aneel Ahmed

    I enabled java console it it shows some logs:
    oracle.forms.net.ConnectionException: Forms session <10> aborted: unable to communicate with runtime process.
      at oracle.forms.net.ConnectionException.createConnectionException(Unknown Source)
      at oracle.forms.net.HTTPNStream.getResponse(Unknown Source)
      at oracle.forms.net.HTTPNStream.doFlush(Unknown Source)
      at oracle.forms.net.HTTPNStream.flush(Unknown Source)
      at java.io.DataOutputStream.flush(Unknown Source)
      at oracle.forms.net.StreamMessageWriter.run(Unknown Source)
    java.io.EOFException
      at java.io.DataInputStream.readUnsignedByte(Unknown Source)
      at oracle.forms.engine.Message.readDetails(Unknown Source)
      at oracle.forms.engine.Message.readDetails(Unknown Source)
      at oracle.forms.net.StreamMessageReader.run(Unknown Source)
    basic: Applet made visible
    Regards
    Aneel Ahmed

  • How to Load Sound In Java Application?

    Hi, i dunno what the codes to load sound in java application, can anyone help me and provide me with the codes? Thanks a lot.

    http://search.java.sun.com/search/java/index.jsp?qp=&nh=10&qt=%2Btitle%3Aapplication+%2Btitle%3Asound&col=javaforums
    BTW: You can doo this yourself

  • 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.

  • 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.

  • 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

  • Load sound in java application without use of newAudioClip api.

    In personal java 1.2, (JDK1.1.8), the method newAudioClip is unavailable to load sound. What other api can one use to load sound into the java application in this case?

    there's nothing wrong with the old one, except that it's a api of the applet. If you try to run the applet thru' the java app. (without the browser or applet viewer), the getaudioclip api will fail.
    This is the limitation I am facing, 'cos I am developing in Personal Java1.2 env.

  • Images not getting Loaded while running Java Application through jar file

    Hello Friends,
    I have a problem while starting my application.I have written my application using pure java.There is no JSP or anything just pure swings.Mine is a standalone appplication.So i used to run it using a batch file.And when i used to start my application it used to not show me the images.so what i did was i mentioned the starting directory in the properties of the batch file (ie in the start in column field).But that was when i was using weblogic server.And i have lot of people working on the same application.so i used ZAC publisher in weblogic and along with that i used to publish the batch file also.so the users dint have any problem.But now what is my problem is i m trying to use JAVA Webstart instead of weblogic ZAC.Now in webstart what happens is that i have to run the appliaction thru jar file.so where do i mention the class path so that the images get loaded.As of now the imaes are not getting loaded.i feel this is a class path problem.but where do i mention it that is my problem.It would be really helpfule if someone could help me out.
    thanx and regards,
    [email protected]

    try out this
    ImageIcon img1=new ImageIcon(this.getClass().getResource(imagename));
    for exmaple
    Imageicon img1=new ImageIcon(this.getClass().getResource("name1.jpg"));
    dont 4get to include the image files in the jar file

  • Is there any way to load just ONE java application at the same time?

    I'm using 'jnlp' to load java applications and I want to load just one application at the same time.
    Is there any way to do that?
    I have been trying to use 'findLoadedClass' but it doesn't work.
    Also I've tried to make a file when a application is loading and delete when the application exits.
    but it has a problem when the user terminates the application.
    (the file can't be deleted...)
    The applications are using socket to receive data, all of them uses same port. That's why I want to load just one application at a time, otherwise they work wrong way.

    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.

  • 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

  • Calling Functions of Loading DLL using java

    I have a dll file
    I know the functions which are ther in the dll
    But how to call those functions using JAVA ?
    can anyone tell me how to do the same...
    Thanx in advance
    regards,
    Ritesh

    I assume that you have a regular DLL and that the functions in that DLL are exported and that you know the signatures of each function.
    With that in mind, you will need to use the Java Native Interface (JNI), to call those functions from Java. In a nutshell, you will need to create at least one class which declares some native methods, code a class static code block to load the JNI-DLL you are about to create, compile the class(es), run the javah tool supplied with the JDK which will emit a C compatible header file, implement the functions from the generated header file and compile that source file to into a DLL. It would be in this DLL that you would use the functions in the DLL that you ultimately want to access. So, what you wind up doing is creating a wrapper DLL.
    Take a look at the JNI tutorial trail from Sun at http://java.sun.com/docs/books/tutorial/native1.1/index.html.

  • 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 it possible to pass a formula value from a sub-report to a main report

    Hi there, Im trying to pass a formula value from a Sub-report back upto into my Main report but the value doesnt seem to be getting passed up. Ive tried it the other way around, that is, passing a value from the main report to the sub-report and that

  • How to get payment document number from paid column in monthly invoice

    Dear experts I use SBO japan version and i need to know how to get payment document number from paid column in monthly invoice ? in table MIN1, only contain invoice and credit note document number, there is no payment document number thank you for yo

  • SAPScript: How to INTENSITY in a specific line?

    Dears, In my forms i need to intensity the specific line of the window. Now I knew use /: BOX INTENSITY 10 to intensity the whole window,           But how to intensity a specific line? Thanks a lot. Sincerely, Julie

  • Web Dynpro for ABAP functionaility for HCM Proceseses & Forms in EhP4

    Dear Gurus, I read in one of the threads that HCM Processes & Forms are now Web Dynpro for ABAP based from EhP4 onwards. Can sameone provide me with any SAP link which corroborates this? Thanks. Regards, sameer Kadam

  • Trouble with Smart Albums

    I'm trying to create a smart album from within one of my projects.  The criteria I'm trying to use is the "Image Location" found in the IPTC data.  The image city is "Seattle", but when I try to create the smart album, it comes up empty.  No matter w