Reports from Java and Oracle database

Hi
I need to generate couple of reports from my application, with Java as front end and oracle 11.2.0.3.0.  database . Reports are  having very simple select statements, using the criteria users enter from GUI. we don't need to execute a  direct select statement from Java, with the where clauses . I did some research and found out about Pipelined functions. I tested for a small set of records and it worked fine. Will this work for large data set? any drawbacks of using this method?  Any other methods for this requirement?
Thanks in advance
JP

Pipeline table functions do not sound like the appropriate approach. It is designed to primarily deal with data transformations. Using it as a rendering engine for report writing? There are fundamental problems with such an approach.
As Dave and Andre commented - the CORRECT means for PL/SQL to pass "data" to Java (or other client languages) is via reference cursors (pointers that the client can use for referencing SQL cursor programs on the server). And Java as a report writer does not really compare with the ease and flexibility that Oracle Apex (Application Express) provides as a reporting framework.

Similar Messages

  • Problem with Java and Oracle Database -  help !

    i keep getting a NullPointerException when trying to
    update a resultSet in a servlet. i am bringing in the data
    just fine from an Oracle database. but it chokes when trying
    to update it. can anybody tell me what is happening?
    thanks for any help
    Owen
    ResultSet rs = stmt.executeQuery( "select * from sw_assets" );
    rs.next();
    rs.updateString("name","XXX"); <--- BOOM !
    java.lang.NullPointerException
    at sun.jdbc.odbc.JdbcOdbcBoundCol.setRowValues(JdbcOdbcBoundCol.java:240)
    at sun.jdbc.odbc.JdbcOdbcResultSet.updateChar(JdbcOdbcResultSet.java:3767)
    at sun.jdbc.odbc.JdbcOdbcResultSet.updateString(JdbcOdbcResultSet.java:3257)
    at sun.jdbc.odbc.JdbcOdbcResultSet.updateString(JdbcOdbcResultSet.java:3848)
    at _0002fopen_0002ejspopen_jsp_3._jspService(_0002fopen_0002ejspopen_jsp_3.java:87)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
    at org.apache.tomcat.core.Handler.service(Handler.java:286)
    at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
    at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
    at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
    at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
    at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
    at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
    at java.lang.Thread.run(Thread.java:484)

    ResultSets based on a wildcard are generally treated as views by Oracle, meaning they are not updatable no matter how you create your statement. Try either "select swa.* from sw_assets swa" or "select all from sw_assets swa", that should get around the problem.
    Also (just being thorough) make sure that you specifically created your statement as being updatable (stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE) ).
    I would not normally expect a NullPointerException when encountering this "feature", but then I don't often use the ODBC bridge.
    Good luck! I hope this helps.

  • Oracle Assets Category-wise Report from FA and GL tables

    Hi,
    I am developing a customized report (Schedule of Fixed Assets) in the Oracle Assets Module, Which includes Category Wise Opening Balance, additions, adjustments, transfer IN, Transfer OUT and Retirements of Cost and Depreciations. I am using FA tables (FA_CATEGORY_BOOKS, FA_CATEGORIES_B) for category_id, category_name (segment1 of category combination) and book_type_code (Book Name). And I am also using GL tables (GL_BALANCES, GL_JE_HEADERS, GL_JE_LINES) for the amount of begin_balance_dr,begin_balance_cr,accounted_dr and accounted_cr.
    The report gets the category_id,category_name from FA_CATEGORIES_B and book_type_code, asset_account_ccid, reserve_account_ccid and book_type_code from FA_CATEGORY_BOOKS for a single book. The sum of accounted_dr or sum of accounted_cr is calculated for a single category_id whose asset_account_ccid is matched with code_combination_id of GL_JE_LINES.
    There are 15 books each have many projects (FA_CATEGORIE_B.segment6). This report is working as desired for 14 books but in one book there is same asset_account_ccid and reserve_account_ccid for more than one category_id(s). That’s why the same amount is displayed against the multiple category_ids .
    As functionally it is possible in Oracle Assets to have same asset_account_ccid or reserve_account_ccid for more than one category_ids, I want to know that is there any other attribute(except asset_account_ccid,reserve_account_ccid and code_combination_id) which can be used to get the separate data for each category_id from GL tables.
    Regards,
    Fahim
    [email protected]

    hi vijay,
    thanks for your quick reply,
    i'm preparing a reports,fields from bsis and bseg database tables,
    and,my select statement giving error,saying that cluster table can't be joined,
    my problem is,how to write the select statement without inner join those tables,is there any alternative,
    i heard there is 'select for all entries',but i don't know proper usage of that addition,
    regards,
    kc

  • Passing SQL-Parameters to Oracle-Reports from java

    hello,
    i want to write an application in the following way:
    on a java-frontend an user can select values for different
    parameters. these values should be to transferred to the sql-
    query of the reports rdf file. what is the syntax of an
    parameter passed from java to oracle reports.
    does this work with runtime.exec()... ?
    does anybody have an example.
    any help would be very appreciated.
    greetings
    Thorsten Lorenz

    In order to pass the parameters to report rdf, you can create user parameters in the oracle report builder, hook up the parameters with query. For example, you can create user parameter P_DEPTNO, then create a sql query: select * from dept where deptno = :P_DEPTNO. When you run this report, you give P_DEPTNO=10 as parameter, the rdf will generate report that only prints out department 10's information.
    Once you have this kind of report created, you have several ways to achieve what you want.
    1. use rwrun60. In your java program, you can invoke rwrun60 via runtime.exec(cmd) where cmd = rwrun60 report=dept.rdf userid=scott/tiger@orcl destype=file desformat=pdf desname=dept.pdf p_deptno=<value_from_java_app>
    2. similarly, use rwcli60. the cmd would be:
    cmd = rwcli60 server=repserver report=dept.rdf userid=scott/tiger@orcl destype=file desformat=pdf desname=dept.pdf p_deptno=<value_from_java_app>
    3. use rwcgi60. Instead of using runtime.exec, you should use java URL object to run the report in the web environment.
    option 2 & 3 takes advantage of powerful functionality of reports server, and it is much more scale than option 1.

  • Export database from BerkeleyDB to Oracle Database

    Hi,
    Within the framework of some projetc, for creating reports, I need to export data from BerkeleyDB to Oracle database.
    How can I do it ?

    Hello,
    One way to export data from a Berkeley DB database into an Oracle DB table
    is to use the OCI interface on the Oracle DB side and the C API on the Berkeley DB side. If you have access to "My Oracle Support" an example can be found in Note 797537.1.
    Thanks,
    Sandra

  • Accessing XML Publisher Reports from Java application

    How to accesss the XDO Reports from Java application?
    I am wondering that we need to get the URL for accessing the report and call the URL with in Java program?
    Is that right? Is there any other option? Any help is greatly appreciated.

    You need to write some class based on the BI Publisher APIs taking data, template, output format, etc.
    Pehaps the following Blog of Tim Dexter shines some light on your question
    http://blogs.oracle.com/xmlpublisher/2007/02/27#a166
    Marcos

  • Ajax with Ruby on Rails and Oracle Database

    Ajax may be used with Ruby on Rails and Oracle database.
    http://www.ftponline.com/channels/java/2007_02/dvohra/

    okay, that helped. Here's what I get:
    erik-petersons-computer:/usr/local/mysql/bin erikpeterson$ ls
    comp_err mysql_zap
    makesharedlibdistribution mysqlaccess
    makewin_bindist mysqlaccess.conf
    makewin_srcdistribution mysqladmin
    msql2mysql mysqlbinlog
    myprintdefaults mysqlbug
    myisam_ftdump mysqlcheck
    myisamchk mysqld
    myisamlog mysqld_multi
    myisampack mysqld_safe
    mysql mysqldump
    mysqlclienttest mysqldumpslow
    mysql_config mysqlhotcopy
    mysqlconvert_tableformat mysqlimport
    mysqlcreate_systemtables mysqlmanager
    mysqlexplainlog mysqlshow
    mysqlfindrows mysqltest
    mysqlfixextensions mysqltestmanager
    mysqlfix_privilegetables mysqltestmanager-pwgen
    mysqlsecureinstallation mysqltestmanagerc
    mysql_setpermission perror
    mysql_tableinfo replace
    mysqltzinfo_tosql resolvestackdump
    mysql_upgrade resolveip
    mysqlupgradeshell safe_mysqld
    mysql_waitpid
    erik-petersons-computer:/usr/local/mysql/bin erikpeterson$
    How would I create a new database from here?

  • CAN I INSTALL BOTH (ORACLE 9IAS AND ORACLE DATABASE )INTO SAME MACHINE.

    oracle 9ias and oracle 9i database in same machine Feb 25, 2003 11:22 PM
    Reply
    Dear Friends,
    I installed oracle 9ias. and then i hosted my form,report into that server . All was working properly.
    at this time my database was into another machine.
    then i installed oracle 9i database into the same machine
    (as the oracle 9ias was installed)
    at the instalation of oracle 9i database one error comes
    and shows that Agent configuration Assistant Installation
    fail.
    but After installation of database it work properly.
    there is no problem.
    but when I try to run from through web(by using oracle 9ias)
    it gives Internal error(500).
    i check and find that my appache server for 9ias is working properly and in services of windows 2000 no error comes.
    HOW CAN I INSTALL BOTH (ORACLE 9IAS AND ORACLE DATABASE )INTO SAME MACHINE.
    With regards
    Siddharth Singh
    [email protected]

    Hi James,
    Have u ever tried ORACLE 9iAS R2 on Redhat Linux ?
    If yes what is the version of RH Linux you were using ?
    Any docs for that ?
    [email protected]
    Regards
    Amudharasu

  • Using Coherence and Oracle Database as the CacheStore

    We are working on implementing a solution using Coherence and Oracle Database as the CacheStore. We initially implemented the Cache as a distributed-scheme which in turn uses the backing-map-scheme. We are trying to introduce transaction management and I used a scheme-ref in a transactional-scheme to point to an already existing distributed-scheme. However when I bring up the server, my custom coherence-cache-config.xml file is not recognized and Coherence comes up with the default setting. Given below is the snippet of my configuration file.
    1)     I would like to understand why the below configuration doesn’t work and am I doing it the right way? If not, what is the correct way of doing it?
    2)     There are a multiple transaction management options given in the documentation. Which are the ones that will work with a distributed-scheme and read-write-backing-map-scheme?
    3)     If transactional-schemes cannot work with distributed-scheme, what is the best way to have a distributed cache with a oracle database as a cache store?
    <caching-scheme-mapping>
    <cache-mapping>
    <cache-name>id<cache-name>
    <scheme-name>example-transactional<scheme-name>
    </cache-mapping>
    </caching-scheme-mapping>
    <caching-schemes>
    <transactional-scheme>
    <scheme-name>example-transactional</scheme-name>
    <scheme-ref>distributedcustomcache</scheme-ref>
    <thread-count>10</thread-count>
    </transactional-scheme>
    <distributed-scheme>
    <scheme-name>distributedcustomcache</scheme-name>
    <service-name>DistributedCache</service-name>
    <backing-map-scheme>
    <read-write-backing-map-scheme>
    <internal-cache-scheme>
    <local-scheme>
    <!--scheme-ref>categories-eviction</scheme-ref-->
    <scheme-name>inMemory</scheme-name>
    </local-scheme>
    </internal-cache-scheme>
    <cachestore-scheme>
    <class-scheme>
    <class-name>spring-bean:coherenceCacheStore</class-name>
    <init-params>
    <init-param>
    <param-name>setEntityName</param-name>
    <param-value>{cache-name}</param-value>
    </init-param>
    </init-params>
    </class-scheme>
    </cachestore-scheme>
    <!--refresh-ahead-factor>0.5</refresh-ahead-factor-->
    </read-write-backing-map-scheme>
    </backing-map-scheme>
    <autostart>true</autostart>
    </distributed-scheme>

    Hi,
    If you look at the documentation for transactional-scheme here: http://docs.oracle.com/cd/E24290_01/coh.371/e22837/appendix_cacheconfig.htm#BHCIABHA
    you will see that it says The transactional-scheme element defines a transactional cache, which is a specialized distributed cache. That means that a transactional-scheme is already a distributed-scheme.
    You will see from the same documentation above that there is no way in a transactional-scheme to configure things like cache-stores or listeners or even the backing-map-scheme as these are not supported on a transactional-scheme - so you cannot use a cache store.
    Personally I would not use transactional-scheme unless you have some really big reason to do so - the restrictions far outweigh any perceived advantage of having a transaction. There are better ways to build applications so they do not require transactions, that is what we have been doing for years with Coherence so far, and there is no real reason to change that.
    JK

  • Can i  use Oracle Database Audit Vault and Oracle Database Firewall on Solaris?

    Can i  use Oracle Database Audit Vault and Oracle Database Firewall on Solaris?

    4195bee8-4db0-4799-a674-18f89aa500cb wrote:
    i dont have access to My Oracle Support can u send text or html of document please?
    Moderator Action:
    No they cannot send you a document that is available only to those with access to MOS.
    That would violate the conditions of having such service contract credentials.
    Asking someone to violate such privileges is a serious offense and could get that other person's organization banned from all support and all their support contracts cancelled.
    Your post is locked.
    Your duplicate post that you placed into the Audit Vault forum space has been removed (it had no responses).
    This thread which you had placed in the Solaris 10 forum space is moved to the Audit Vault forum space.
    That's the proper location for Audit Vault questions.

  • Create PDF report with APEX and Oracle 11g doesn't work

    Hi everyone,
    I have a problem with the downloading of PDF reports from APEX with Oracle 11g.
    When I try to download a PDF, Acrobat Reader says it can not open the file.
    I have done the same test in an environment with APEX and Oracle 10g and it works perfectly.
    Does anyone know if there is a known bug for version 11g.
    Thank you very much.

    Hi Munky,
    I open the generated file the Notepad++ I can read the next message:
    *<HTML><HEAD><TITLE>500 Internal Server Error</TITLE></HEAD><BODY><H1>500 Internal Server Error</H1>OracleJSP:*
    An error occurred. Consult your application/system administrator for support. Programmers should consider setting the init-param <code>debug_mode</code> to "true" to see the complete exception message.</BODY></HTML>
    I have not idea can I solve the problem.
    Have you got any solution for this problem??
    Thank you so much.
    Victor Muñoz.

  • Problem when calling a report from java

    Hi all,
    i have created a report using ireport which contains arabic data.
    when i execute the report from ireport to generate a pdf file it works.
    however when i call this report from java i have an exception"
    Could not create the report Could not load the following font :
    pdfFontName : ARIAL.TTF
    pdfEncoding : Identity-H"
    the pdfFont i used it in ireport, also the pdfEncoding.
    did anyone passed with the same problem
    thanks for help

    Hello Oracle experts,
    The parameters are getting passed successfully in my report.
    But I want to know hous to use it in my query group.
    I just want the syntax.
    Thanks

  • How to relate java and Oracle

    i have to tried to make programs using java and oracle. if i give the values in the 'insert' statement it is getting updated in the original table in oracle but how to take the values from the text fields of java and insert into the tables in oracle. do we have any methods to convert the values into sql type. pl reply.

    Here is a sample of a Java program that uses JDBC and a PreparedStatement. This particular program does a select, but you can also use this for inserts. I'm not 100% this is what you are looking for, but if it isn't just let me know. I'll help if I can.
    Joel
    For inserts, just replace this code:
    ResultSet rs = ps.executeQuery();
    while (rs.next()) {
      System.out.println(rs.getInt(rs.findColumn("CNT")));
    }with this code (and obviously change the Select string to an Insert String):
    int rowcnt = ps.executeUpdate();Here is the whole program:
    import java.sql.*;
    import java.util.*;
    import java.text.*;
    class dbtest {
        public static void main(String args[]) throws SQLException {
            try {
                String timeString = new String("2000-11-01 23:59:59");
                SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd H:m:s");
                java.util.Date date = format.parse(timeString);
                Timestamp timestamp = new Timestamp(date.getTime());
                DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
                Connection conn =
                    DriverManager.getConnection(
                        "jdbc:oracle:thin:@riker:1521:mydb",
                        "myusername",
                        "mypassword");
                String sql =
                    "SELECT COUNT(*) CNT FROM SERVICE_ALARM "
                        + "WHERE TRANS_STREAM_NODE_ID = ? "
                        + "AND SERVICE_ID = ? "
                        + "AND ALARM_ID = ? "
                        + "AND RAISED > TO_DATE(?,'YYYY-MM-DD HH24:MI:SS')";
                PreparedStatement ps = conn.prepareStatement(sql);
                ps.setString(1, "ROW1");
                ps.setInt(2, 1);
                ps.setString(3, "ROW1");
                String myDate =
                    timestamp.toString().substring(0, timestamp.toString().length() - 2);
                System.out.println("myDate=(" + myDate + ")");
                ps.setString(4, myDate);
                ResultSet rs = ps.executeQuery();
                while (rs.next()) {
                    System.out.println(rs.getInt(rs.findColumn("CNT")));
                rs.close();
                ps.close();
            } catch (Exception e) {
                System.out.println("Java Exception caught, error message=" + e.getMessage());
    }

  • Java and oracle in linux

    hello frnds...i have installed oracle 10g in ubuntu 11.04....now i want to make database connection between java and oracle...so how can i do it??i know the java code..but the main problem is database driver..how can i give the classpath for specific jdbc dirver...pls tell me the steps to set classpath for jdbc driver...
    thnx in advance..

    884540 wrote:
    hello frnds...i have installed oracle 10g in ubuntu 11.04....now i want to make database connection between java and oracle...so how can i do it??i know the java code..but the main problem is database driver..how can i give the classpath for specific jdbc dirver...pls tell me the steps to set classpath for jdbc driver...
    thnx in advance..You can mention the classpath using the javac and java options:
    javac -cp .;<path> <ClassName>.java
    and
    java -cp .;<path> <ClassName>
    Or refer the below link to avoid mentioning classpath everytime you run/ compile the program
    http://www.linuxquestions.org/questions/linux-software-2/j2sdk-install-174483/#post898715

  • ECC 6.0 installation on HPUX Cluster and oracle database

    Hi,
    I need to install ECC6.0 installation on HPUX Cluster and oracle database. Can anybody plz suggest me or send any document to me ..
    Thanks,
    venkat.

    Hi Venkat,
    Please download installation guide from below link:-
    https://websmp105.sap-ag.de/instguides
    Regards,
    Anil

Maybe you are looking for

  • Suddenly my iTunes will no longer sync video taken on the iPhone. Why?

    Suddenly my iTunes will no longer sync video taken on the iPhone. Why?

  • Lookup Vs Join

    Hi, I want to know the basic difference between Lookup and Join in odi. Thanks

  • Error when deploying SSIS package in 2012

    Hi, I am trying to deploy a SSIS package to 2012 version. But i am getting error as  below, TITLE: SQL Server Integration Services There was an exception while loading Script Task from XML: System.IO.FileNotFoundException: Could not load file or asse

  • Error 824

    2015-01-29 17:10:48.72 spid54      Error: 824, Severity: 24, State: 2. 2015-01-29 17:10:48.72 spid54      SQL Server detected a logical consistency-based I/O error: incorrect checksum (expected: 0x1557bf72; actual: 0x38e9bca4). It occurred during a r

  • Workflow Approver Agent

    Hi All, I am working on a work flow scenario, where an a letter is generated as a PDF and is sent for approval to the manager. Once the manager (i.e. approver) accepts the letter, we send the letter to create a spool to be printed and in addition arc