OutOfMemory error when trying to display large tables

We use JDeveloper 10.1.3. Our project uses ADF Faces + EJB3 Session Facade + TopLink.
We have a large table (over 100K rows) which we try to show to the user via an ADF Read-only Table. We build the page by dragging the facade findAllXXX method's result onto the page and choosing "ADF Read-only Table".
The problem is that during execution we get an OutOfMemory error. The Facade method attempts to extract the whole result set and to transfer it to a List. But the result set is simply too large. There's not enough memory.
Initially, I was under the impression that the table iterator would be running queries that automatically fetch just a chunk of the db table data at a time. Sadly, this is not the case. Apparently, all the data gets fetched. And then the iterator simply iterates through a List in memory. This is not what we needed.
So, I'd like to ask: is there a way for us to show a very large database table inside an ADF Table? And when the user clicks on "Next", to have the iterator automatically execute queries against the database and fetch the next chunk of data, if necessary?
If that is not possible with ADF components, it looks like we'll have to either write our own component or simply use the old code that we have which supports paging for huge tables by simply running new queries whenever necessary. Alternatively, each time the user clicks on "Next" or "Previous", we might have to intercept the event and manually send range information to a facade method which would then fetch the appropriate data from the database. I don't know how easy or difficult that would be to implement.
Naturally, I'd prefer to have that functionality available in ADF Faces. I hope there's a way to do this. But I'm still a novice and I would appreciate any advice.

Hi Shay,
We do use search pages and we do give the users the opportunity to specify search criteria.
The trouble comes when the search criteria are not specific enough and the result set is huge. Transferring the whole result set into memory will be disastrous, especially for servers used by hundreds of users simultaneously. So, we'll have to limit the number of rows fetched at a time. We should do this either by setting the Maximum Rows option for the TopLink query (or using rownum<=XXX inside the SQL), or through using a data provider that supports paging.
I don't like the first approach very much because I don't have a good recipe for calculating the optimum number of Maximum Rows for each query. By specifying some average number of, say, 500 rows, I risk fetching too many rows at once and I also risk filling the TopLink cache with objects that are not necessary. I can use methods like query.dontMaintainCache() but in my case this is a workaround, not a solution.
I would prefer fetching relatively small chunks of data at a time and not limiting the user to a certain number of maximum rows. Furthermore, this way I won't fetch large amounts of data at the very beginning and I won't be forced to turn off the caching for the query.
Regarding the "ADF Developer's Guide", I read there that "To create a table using a data control, you must bind to a method on the data control that returns a collection. JDeveloper allows you to do this declaratively by dragging and dropping a collection from the Data Control Palette."
So, it looks like I'll have to implement a collection which, in turn, implements the paging functionality that I need. Is the TopLink object you are referring to some type of collection? I know that I can specify a collection class that TopLink should use for queries through the query.useCollectionClass(...) method. But if TopLink doesn't provide the collection I need, I will have to write that collection myself. I still haven't found the section in the TopLink documentation that says what types of Collections are natively provided by TopLink. I can see other collections like oracle.toplink.indirection.IndirectList, for example. But I have not found a specific discussion on large result sets with the exception of Streams and Cursors and I feel uneasy about maintaining cursors between client requests.
And I completely agree with you about reading the docs first and doing the programming afterwards. Whenever time permits, I always do that. I have already read the "ADF Developer's Guide" with the exception of chapters 20 and 21. And I switched to the "TopLink Developer's Guide" because it seems that we must focus on the model. Unfortunately, because of the circumstances, I've spent a lot of time reading and not enough time practicing what I read. So, my knowledge is kind of shaky at the moment and perhaps I'm not seeing things that are obvious to you. That's why I tried using this forum -- to ask the experts for advice on the best method for implementing paging. And I'm thankful to everyone who replied to my post so far.

Similar Messages

  • Error when trying to Display WSDL for Sender Agreement

    Hi,
    I'm getting an error when trying to display WSDL for a sender agreement. The error message is as follows:
    Adapter Engine af.xxx.yyy for communication channel not registered in SLD Unable to find the SLD element (SAP_XIAdapterFramework, [CreationClassName, SAP_XIAdapterFramework, string, Name, af.xxx.yyy, string], [AdapterType, SOAP, string])
    The SOAP adapter being used is from the non-central AE. I I immediately checked for inconsistent SLD components per note 746176 but everything is in order there. I tried re-registering manually the non-central AE manually as well.
    Anyone else ever had the same error? Any hints much appreciated!

    Hi Luqman,
    go to the sender channel and replace the Adapter Type.
    Select the type as SOAP from SWCV SAP BASIS 7.xx or SAP BASIS 3.0
    The channel is referring to a swcv which is not present in esr.
    As you might know, the adapter metadata is fetched from ESR/IR, so if the SWCV containing the metadata inside namespace http://sap.com/xi/XI/System etc, is not available then it will throw error.
    If you do not want to change the Adapter Type in the channel, import the swcv from SLD to ESR and create/import the respective adapter metadata.
    Should resolve your issue.
    Cheers!
    Souvik

  • Error when trying to display a report

    Hi,
    when trying to display a report in Forms 11g 11.1.1.4 the window do not shows anything, the weblogic 10.3.4 is installed on Windows Server 2008 R2
    The logs i saw are these, what could be the reason of the error, what should i do to fix it ??
    rwserver_diagnostic.log
    [2012-11-13T06:10:13.861-08:00] [WLS_REPORTS] [WARNING] [] [oracle.reports.server] [tid: 15] [userId: weblogic] [ecid: 8d029db4c88cfa6e:72f4635e:13ab3dc02b9:-8000-000000000000ccd7,0] [APP: reports#11.1.1.2.0] Multicast:init  java.net.SocketException: Unrecognized Windows Sockets error: 0: no Inet4Address associated with interface
    [2012-11-13T06:10:13.861-08:00] [WLS_REPORTS] [WARNING] [] [oracle.reports.server] [tid: 15] [userId: weblogic] [ecid: 8d029db4c88cfa6e:72f4635e:13ab3dc02b9:-8000-000000000000ccd7,0] [APP: reports#11.1.1.2.0] Multicast:init  java.net.SocketException: Unrecognized Windows Sockets error: 0: no Inet4Address associated with interface
    rwservlet_diagnostic.log
    [2012-11-13T06:10:10.272-08:00] [WLS_REPORTS] [WARNING] [] [oracle.reports.servlet] [tid: 11] [userId: weblogic] [ecid: 8d029db4c88cfa6e:72f4635e:13ab3dc02b9:-8000-000000000000ccd7,1:29117] [APP: reports#11.1.1.2.0] Multicast:init  java.net.SocketException: Unrecognized Windows Sockets error: 0: no Inet4Address associated with interface
    [2012-11-13T06:10:10.288-08:00] [WLS_REPORTS] [WARNING] [] [oracle.reports.servlet] [tid: 11] [userId: weblogic] [ecid: 8d029db4c88cfa6e:72f4635e:13ab3dc02b9:-8000-000000000000ccd7,1:29117] [APP: reports#11.1.1.2.0] Multicast:init  java.net.SocketException: Unrecognized Windows Sockets error: 0: no Inet4Address associated with interface
    [2012-11-13T06:10:13.689-08:00] [WLS_REPORTS] [WARNING] [] [oracle.reports.servlet] [tid: 11] [userId: weblogic] [ecid: 8d029db4c88cfa6e:72f4635e:13ab3dc02b9:-8000-000000000000ccd7,1:29117] [APP: reports#11.1.1.2.0] RWClient:startInProcessServer  start inprocess server rep_wls_reports_srvweblogic_asinst_1
    [2012-11-13T06:10:14.656-08:00] [WLS_REPORTS] [WARNING] [] [oracle.reports.servlet] [tid: 15] [userId: weblogic] [ecid: 8d029db4c88cfa6e:72f4635e:13ab3dc02b9:-8000-000000000000ccd7,0] [APP: reports#11.1.1.2.0] Multicast:init  java.net.SocketException: Unrecognized Windows Sockets error: 0: no Inet4Address associated with interface
    [2012-11-13T06:10:14.656-08:00] [WLS_REPORTS] [WARNING] [] [oracle.reports.servlet] [tid: 15] [userId: weblogic] [ecid: 8d029db4c88cfa6e:72f4635e:13ab3dc02b9:-8000-000000000000ccd7,0] [APP: reports#11.1.1.2.0] Multicast:init  java.net.SocketException: Unrecognized Windows Sockets error: 0: no Inet4Address associated with interface
    WLS_REPORTS-diagnostic.log
    [2012-11-09T13:44:41.421-08:00] [WLS_REPORTS] [NOTIFICATION] [] [oracle.reports.adminlogconfig] [tid: [ACTIVE].ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: <WLS Kernel>] [ecid: 0000Jfb8SNZ4YrWFLziOOA1GbN_0000002,0] [APP: reports#11.1.1.2.0] LogConfig.load: logging.xml
    [2012-11-13T06:10:14.032-08:00] [WLS_REPORTS] [NOTIFICATION] [] [oracle.security.oes.util.logging.Log4jConfigurator] [tid: Thread-36] [userId: weblogic] [ecid: 8d029db4c88cfa6e:72f4635e:13ab3dc02b9:-8000-000000000000ccd7,0] Could not find log4j configuration for MicroSM.
    [2012-11-13T06:10:14.235-08:00] [WLS_REPORTS] [NOTIFICATION] [JPS-03258] [oracle.jps.authorization.provider] [tid: Thread-36] [userId: weblogic] [ecid: 8d029db4c88cfa6e:72f4635e:13ab3dc02b9:-8000-000000000000ccd7,0] Initializing UserUtils; mbean: com.bea.security.providers.authorization.asi.ASIAuthorizationProviderMBeanImpl@f6467a1e([ASI Authorization Provider]), instance: null
    [2012-11-13T06:10:14.235-08:00] [WLS_REPORTS] [NOTIFICATION] [JPS-03258] [oracle.jps.authorization.provider] [tid: Thread-36] [userId: weblogic] [ecid: 8d029db4c88cfa6e:72f4635e:13ab3dc02b9:-8000-000000000000ccd7,0] Initializing UserUtils; using directory: RootOrg!AdminDir, anonymous user: anonymousRegards
    Carlos

    This is not really the correct forum to be posting Reports issues. However, if I were to guess, your issue is likely related to the known issues related to installing FMw11R1 on machines which had IPv6 enabled. In most cases, disabling IPv6 would correct the problem, however some issues were not resolved even after disabling IPv6 post-install. I would recommend patching to WLS 10.3.6 and FMw 11.1.1.6 as these versions include fixes for all of those issues as far as I recall.
    Consider referring to this MyOracleSupport document if you have access:
    Steps to Maintain Oracle Fusion Middleware 11g Release 1 (11.1.1) (Doc ID 1073776.1)

  • Fatal error when trying to add derived table

    Hello,
    I'm new at desiging a universe. I get the following a fatal error when trying to add a derived table to my universe:
    1 processor x Family 15 Model 0 Stepping 0
    Windows 2000 Workstation  v5.1 build 2600 (S)
    Physical Total/Avail: 2.097.151 Kb / 2.004.940 Kb
    Temp directory C:\DOCUME1\xxxxxx\LOCALS1\Temp\ (1 Kb available)
    'Unknown' video card
       1280 x 768 in true color
    (doesn't make sense to me)
    I use an ODBC connection that connects to a MySQL database. When I test the connection it's fine.
    I am trying to add a derived table because it seems that my universe cannot produce LEFT OUTER JOINS.  I read somewhere that I should set my ansi92 parameter to YES instead of NO. But, everytime I re-open my universe, it sets itself automatically to NO again.
    My utlimate goal is :
    For example, list ALL the people, left join my table to their websites, but return ALL the people, even if they don't have a website.
    I dont' understand, my join should be simple enough.
    Anybody knows what could be causing all these restrictions ?
    Thanks for you help.
    Edited by: Sose Canadian on Feb 9, 2009 9:40 PM

    Hi Sose,
    In BusinessObjects (Universe) Designer, the outer join option in a join is not available and is dimmed when using a Generic ODBC connection.
    Try Following Solutions:
    Solution : 1
    When using an ODBC connection the odbc.prm must be modified on the machine where BusinessObjects Designer is used.
    Use the following steps to modify odbc.prm:
    1. Locate odbc.prm in the following folder:
    \Business Objects\Business Objects Enterprise 11\win32_x86\dataAccess\Connection Server\odbc
    2. Open odbc.prm in a text editor and modify the parameter 'EXT_JOIN' so its value is 'YES' instead of 'NO'.The outer join option is now available in BusinessObjects Designer.
    If the outer join option is still not available after following the steps above. open odbc.prm in a text editor and modify the parameter OUTERJOINS_GENERATION. Change its value from 'NO' to either 'ANSI92' or 'ODBC'.
    Solution : 2
    This can occur when user is using a non-database specific middleware such as generic ODBC. Generic ODBC allows creating a successful connection and universe, however will not allow the Outer Join option.
    The syntax for outer joins is specific to each database and the Generic ODBC driver only lets you access standard common features of all ODBC data sources.
    Ensure that you are using the database specific middleware to create the connection.
    I Hope this Helpsu2026.
    Thanksu2026.
    Pratik

  • Getting Java console error when trying to display the PO

    Hi All,
    In the approved shopping cart when we select any item details and when we go and see the follow-on documents we get two options to select 1) Display as Graphic 2) Display as Table. When we are select the option 2 display as table we are able to see the shopping cart and also the PO and further when we click on the PO it is displaying the order details.
    However when we go by option 1 display as graphic, we are able to get the details of the shopping cart and PO, but when we try to click on the PO we get Java error indicating as follows. "Error. Click for details". when we click the on the error a window will apper and indicates that Application failed to run.
    we installed the latest version Java and tried still we are getting the same error. Can any body help me in this.
    Java Plug-in 1.6.0_18
    Using JRE version 1.6.0_18-b07 Java HotSpot(TM) Client VM
    User home directory = J:\Documents and Settings\****
    c:   clear console window
    f:   finalize objects on finalization queue
    g:   garbage collect
    h:   display this help message
    l:   dump classloader list
    m:   print memory usage
    o:   trigger logging
    q:   hide console
    r:   reload policy configuration
    s:   dump system and deployment properties
    t:   dump thread list
    v:   dump thread stack
    x:   clear classloader cache
    0-5: set trace level to <n>
    java.lang.StringIndexOutOfBoundsException: String index out of range: 0
         at java.lang.String.charAt(Unknown Source)
         at VisnetMain.readParameter(VisnetMain.java:141)
         at VisnetMain.init(VisnetMain.java:60)
         at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Exception: java.lang.StringIndexOutOfBoundsException: String index out of range: 0
    java.lang.NullPointerException
         at VisnetMain.start(VisnetMain.java:3770)
         at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Exception: java.lang.NullPointerException

    Hi psamp1,
       Were you able to solve this problem?
       We have exactly the same issue...
    Thanks
    John
    Edited by: John Chinnappan on Mar 29, 2011 8:06 AM

  • Error when trying to display a Webi report through the Folder iView

    Hi all
    I am getting the following error when Im trying to display a Webi report through the SAP Portal. We have installed the SAP Integration Kit and are able to see the content of the Infoview. However when we click on a Webi report, we receive the following error:
    Could not get page number. (Error: RWI 00223) (Error: INF)
    Have anyone else encountered this problem? Please assist! Any help will be rewarded.
    (We are running XI Rel 2).
    Addition from trace file (tomcat):
    com.businessobjects.rebean.wi.CommunicationException: Could not get page number. (Error: RWI 00223)
         at com.businessobjects.rebean.wi.occa.OccaReportComAdapter.setBlobKey(OccaReportComAdapter.java:542)
         at com.businessobjects.rebean.wi.occa.OccaReportComAdapter.getView(OccaReportComAdapter.java:376)
         at com.businessobjects.rebean.wi.occa.OccaReportComAdapter.getView(OccaReportComAdapter.java:297)
         at com.businessobjects.rebean.wi.ReportImpl.getView(ReportImpl.java:384)
         at com.businessobjects.rebean.wi.ReportImpl.getView(ReportImpl.java:407)
         at org.apache.jsp.viewers.cdz_005fadv.viewReport_jsp._jspService(viewReport_jsp.java:1182)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704)
         at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:474)
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:409)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
         at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:670)
         at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:637)
         at org.apache.jsp.viewers.cdz_005fadv.report_jsp._jspService(report_jsp.java:325)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         at java.lang.Thread.run(Thread.java:534)
    Furthermore I'd like to see an example of the cms_name entry. The documentation states: In addition, specify the Application Parameter for each iView. For this property, enter cms_name=[cms] for the fully qualified server name., but I have doubts as to what format to use.
    Kind regards,
    Martin Søgaard

    Hi Jim Ji
    The report can be displayed from the java infoview, no doubt, so the report itself works.
    But the report cannot be seen from the "SAP Infoview" (:/businessobjects/enterprise115/sap) which is the infoview, I reference from the Folder iView (through the system in the SAP portal). And since the SAP Portal Integration Kit seems very old - the Folder iView was created 12-08-2004 by Ingo Hilgefort - there might be an old version of the jar-files somewhere in the installation.
    I guess I should check the version of the jar-files in WEB-INF/lib of our web application (Tomcat) folder, and see if they have been overwritten by the SAP Portal Integration Installation or are an older version of the files in Program FilesBusiness Objectscommon3.5javalib? And also check if somewhere in the .../sap installation there are some old jar-files?
    Kind regards,
    Martin Søgaard

  • PC gets loaded when trying to display large data in graph

    PC gets loaded when i try to display large data in the graph, the shift register holding the data eats up all my virtual memory ,so my pc gets hangs,any ways to refresh the virtual memory using labview. The chart also cannot be replaced.

    Bharani wrote:
    The data size is appox 200 MB or more. The data is acquired in I32 format and store in file. During the playback , the file is read according to the sampling rate, converted to ascii ,send to Daqmx write and Graph simultaneously. In graph portion, the array holds(using shift register)  all the data in the graph.This holding the data loads the PC.Is there any way to refresh the virtual memory using labview.
    Is there really a good reason to send 200MB worth of I32 data to a graph? NO! Your graph most likely does not have more than about 1000 pixels across!
    Most likely, you have multiple copies if the data in memory. Do you convert the entire 200MB data to ASCII or each data point as needed? Have you done some profiling? What is the memory usage in "VI properties..Memor Usage"? Do you use local variables?
    Your best bet would be to analyse you code to optimize memory usage, avoid data copies, etc. Please attach you code so we can give some advice.
    LabVIEW Champion . Do more with less code and in less time .

  • Giving error when tried to display 500 records

    Hi,
    There is a MessageChoice and a table in my OA page.
    When I change the MessageChoice value, the coressponding records will display in the table.
    It is working fine for few options which have few records.
    But for one option there are 500 records, its giving 'Page cannot be displayed' error after some time.
    Can anyone help me on this.
    Thanks

    If your query is taking 6 minutes to execute, then try to tune it. I don't think any user will accept this and moreover its well over the page timeout time limit.
    --Shiv                                                                                                                                                                                                                                                                                                                                                       

  • MF Toolbox errors when trying to display scanner driver

    I have an ImageCLASS MF4890dw connected via wifi to a Windows 8.1 desktop.  I have installed the drivers and the MF Toolbox from the support site.  The printer function works fine.  And I seem to be able to scan a document by selecting PDF in the Toolbox and then pushing the green Start button. 
    However, if in the Toolbox I check "Display the Scanner Driver" and then select Start, I run into problems.  The scanner driver window opens, but when I select either Preview or Scan, the scan fails to complete and gives error code 155,0,0. 
    I have completely uninstalled the printer, drivers, and toolbox and then reinstalled them according to instructions I read on this site.  The only difference is than I have my printer connected via wifi rather than USB.
    Any Suggestions?

    Hi,
    I did find the line in the code that is giving this error. The problem is I am unable to figure out why it is giving error:
    The code fragment from http://doc.fumlersoft.dk/Java/jdk-1.2beta4/demo/jfc/Table/JDBCAdapter.java table model where the error lies is:
    public String dbRepresentation(int column, Object value) {
            int type;
            if (value == null) {
                return "null";
            try {
                 type = metaData.getColumnType(column+1);
            catch (SQLException e) {
                return value.toString();
            switch(type) {
            case Types.INTEGER:
            case Types.DOUBLE:
            case Types.FLOAT:
                return value.toString();
            case Types.BIT:
                return ((Boolean)value).booleanValue() ? "1" : "0";
            case Types.DATE:
                return value.toString(); // This will need some conversion.
            default:
                return "\""+value.toString()+"\"";
        }

  • User Authentication Failed error when trying to display a JSP portlet

    The steps carried out are as follows :
    1. Created a JSP file named "c.jsp" and deployed it under 902_MidTier_Home\j2ee\home\default-web-app\examples\jsp
    2. Created a table named USER_TABLE under Scott schema to store the usernames and passwords to validate this JSP application.
    3. Registered this JSP as an external application with the following values :
    Application Name           : RAGHU
    Login URL          : http://hostname:port/j2ee/examples/jsp/c.jsp
    User Name/ID Field Name     : username
    Password Field Name     : password
    Type of Authentication Used : POST
    3. Clicked on the External Application and entered the username as USER1 and password as USER1 ( These values are available
    under USER_TABLE for comparison ). Then it shows the message "Hi User1 .. Welcome message"
    4. Now created a directory named JSPSAMPLE under "WEB-INF\Providers" and put the provider.xml file under this.
    Created a raghu.properties file and placed it under "WEB-INF\deployment".
    5. Now tested the testpage using the URL " http://hostname:port/jpdk/providers/raghu " and it works fine.
    6. Registered this as a provider in Portal and added this portlet onto a page. Assigned this page to a newly created user.
    It gives the message " Authentication Failed - Update Login Information " which is expected. I click on the link and
    it takes me to the external application username password. I enter the credentials but this time it comes back again
    to the page with the same message " Authentication Failed - Update Login Information ".
    7. Basically the values are not passed to the Username and Password in jsp page which is why the problem occurs.
    The JSP Code used is as follows :
    <%@ page import="java.sql.*" %>
    <HTML>
    <HEAD><TITLE>DB Connectivity test</TITLE></HEAD>
    <BODY BGCOLOR="#FFFFFF">
    <CENTER>
    <B>user_table</B>
    <BR><BR>
    <%
    String username = request.getParameter("username");
    String password = request.getParameter("password");
    Connection conn = null;
    try
    Class.forName("oracle.jdbc.driver.OracleDriver");
    conn = DriverManager.getConnection("jdbc:oracle:thin:@hostname:1521:iasdb","scott","tiger");
    Statement stmt = conn.createStatement();
    String query = "SELECT * FROM user_table where userid= '"+ username +"' and passwd = '" + password + "' " ;
    ResultSet rs = stmt.executeQuery(query);
    while(rs.next())
    out.println("<TR>");
    out.println(" <TD> hi " + rs.getString("userid") + ", welcome</TD>");
    out.println("</TR>");
    out.println("</TABLE>");
    catch(SQLException e)
    out.println("SQLException: " + e.getMessage() + "<BR>");
    while((e = e.getNextException()) != null)
    out.println(e.getMessage() + "<BR>");
    out.println("invalid userid,password");
    catch(ClassNotFoundException e)
    out.println("ClassNotFoundException: " + e.getMessage() + "<BR>");
    finally
    //Clean up resources, close the connection.
    if(conn != null)
    try
    conn.close();
    catch (Exception ignored) {}
    %>
    </CENTER>
    </BODY>
    </HTML>
    The Provider.xml file used is as follows :
    <?xml version="1.0" encoding="UTF-8"?>
    <?providerDefinition version="3.1"?>
    <provider class="oracle.portal.provider.v2.http.URLProviderDefinition">
         <providerInstanceClass>oracle.portal.provider.v2.http.URLProviderInstance</providerInstanceClass>
         <session>true</session>
         <authentication class="oracle.portal.provider.v2.security.Authentication">
              <authType>ExternalApp</authType>
              <userFieldName>username</userFieldName>
              <userPwdName>password</userPwdName>
              <errorPageMessages>Raghu,Please sign in,Sign me up!</errorPageMessages>
         </authentication>
         <portlet class="oracle.portal.provider.v2.http.URLPortletDefinition">
              <id>1</id>
              <name>RaghuPortlet</name>
              <title>Raghu Mail Portlet</title>
              <description>This portlet is to test Integration services using mail.yahoo.com</description>
              <timeout>100</timeout>
              <timeoutMessage>Raghu timed out</timeoutMessage>
              <showEdit>false</showEdit>
              <showEditDefault>false</showEditDefault>
              <showPreview>false</showPreview>
              <showDetails>false</showDetails>
              <hasHelp>false</hasHelp>
              <hasAbout>false</hasAbout>
              <acceptContentType>text/html</acceptContentType>
              <registrationPortlet>false</registrationPortlet>
              <accessControl>public</accessControl>
              <renderer class="oracle.portal.provider.v2.render.RenderManager">
                   <showPage class="oracle.portal.provider.v2.render.http.URLRenderer">
                        <pageUrl>http://172.17.24.235:8888/c.jsp</pageUrl>
                        <contentType>text/html</contentType>
                        <filter class="oracle.portal.provider.v2.render.HtmlFilter">
                             <useAuthLinks>true</useAuthLinks>
                             <headerTrimTag>&lt;table width="100%" cellpadding=0 cellspacing=0 border=0>&lt;tr>&lt;td bgcolor=#9bbad6></headerTrimTag>
                             <footerTrimTag>&lt;table width="100%" cellpadding=2 cellspacing=1>&lt;tr>&lt;td bgcolor=#9bbad6></footerTrimTag>
                             <convertTarget>true</convertTarget>
                             <redirectUrlFieldName>.done</redirectUrlFieldName>
                        </filter>
                   </showPage>
              </renderer>
              <securityManager class="oracle.portal.provider.v2.security.URLSecurityManager">
                   <authorizType>registered</authorizType>
              </securityManager>
         </portlet>
    </provider>
    The Contents of raghu.properties file
    serviceClass=oracle.webdb.provider.v2.adapter.soapV1.ProviderAdapter
    loaderClass=oracle.portal.provider.v2.http.DefaultProviderLoader
    showTestPage=true
    definition=providers/raghu/provider.xml
    autoReload=true
    Any inputs regarding why the values are passed properly in case of External Application but not so when registered as
    a portlet in Portal.
    Regards
    Satish G

    As I can see from the information posted, you are trying to
    use URL-based portlet's SSO feature, though not in a correct
    way.
    The SSO feature of URL-based portlets relie on the usage
    of Cookies as authentication tokens. For example, in the
    present context, http://hostname:port/j2ee/examples/jsp/c.jsp
    will write a cookie to the client upon successfull authentication.
    Subsequent access to the same JSP or some other JSP in the same
    workspace should be checking for the existence of this particular
    cookie at the client side and if found should not prompt for
    user information again.
    If you can fine tune your existing applications as per above
    conditions, then everything should work fine. Else you might
    want to use page parameters to pass user information.
    For more information on page parameters, please visit
    http://portalstudio.oracle.com/servlet/page?_pageid=350&_dad=ops&_schema=OPSTUDIO&12678_PDKHOME902_39847486.p_subid=249821&12678_PDKHOME902_39847486.p_sub_siteid=73&12678_PDKHOME902_39847486.p_edit=0#NEW1

  • Why compilation error--when trying to access the table from itcsi schema

    Hi,
    when querying the table from itcsi.app iam able to see the data but used in proc saying invalid table name. Whats the problem
    when declared p_app_i_old app.app_i%type----It is throwing pls-00201 error
    1 Create or replace procedure Test_insert(p_app_i_old integer,
    2 p_app_i_new integer,
    3 p_APP_ISAC_CPT_I varchar2)
    4 is
    5 cursor c1 is
    6 select distinct table_name,owner
    7 from all_tab_columns
    8 where owner = 'ITCSI' and column_name='APP_I';
    9 t_tablename varchar2(25);
    10 t_string varchar2(300);
    11 t_num number;
    12 Begin
    13 For c2 in c1 loop
    14 t_num := 0;
    15 t_string := 'SELECT count(*) FROM ' || c2.owner ||'.'||c2.table_name||' WHERE APP_I = '||p_
    16 execute immediate t_string into t_num;
    17 if t_num > 0 then
    18 -- dbms_output.put_line('The table name is '||c1_rec.table_name);
    19 if c2.Table_name = 'APP' Then
    20 INSERT INTO itcsi.App
    21 SELECT p_app_i_new,
    22 app_acrnym_c,
    23 app_x,
    24 app_desc_t,
    25 app_ipads_t,
    26 app_prdcn_stat_t,
    27 app_prdcn_stat_d,
    28 app_isd_tier_c,
    29 app_bus_cont_c,
    30 app_extnl_cstm_c,
    31 app-ecrpt_lvl_c,
    32 app_isac_cpt_i,
    33 dsw_gpn_i,
    34 ed_cntnt_srce_t,
    35 usr_upd_uunm_i,
    36 ed_upd_m
    37 FROM itcsi.APP
    38 WHERE app_i = p_app_i_old;
    39 elsif c2.Table_name = 'APP_CETRN' Then
    40 Insert into itcsi.APP_CETRN
    41 select p_app_i_new,
    42 app_cetrn_i,
    43 app-curr_cmplnc_t,
    44 app_rqr_cmplnc_t,
    45 dsw_gpn_i,
    46 ed_cntnt_srce_t,
    47 usr_upd_uunm_i,
    48 ed_upd_m
    49 FROM itcsi.APP_CETRN
    50 WHERE app_i = p_app_i_old;
    51 elsif c2.Table_name = 'APP_GPC' Then
    52 Insert into itcsi.APP_GPC
    53 select p_app_i_new,
    54 gpc_dpnt_x,
    55 gpc_elemy_x,
    56 pro_i,
    57 dsw_gpn_i,
    58 ed_cntnt_srce_t,
    59 usr_usr_upd_uunm
    60 FROM itcsi.APP_GPC
    61 WHERE app_i = p_app_i_old;
    62 End if;
    63 End if;
    64 End loop;
    65 --Commit;
    66* End;
    SQL> /
    Warning: Procedure created with compilation errors.
    SQL> show errors
    Errors for PROCEDURE TEST_INSERT:
    LINE/COL ERROR
    20/2 PL/SQL: SQL Statement ignored
    37/23 PL/SQL: ORA-00942: table or view does not exist
    40/2 PL/SQL: SQL Statement ignored
    Thanks

    how do i check the grant?
    if am in my own schema,how do i connect to itcsi
    schema?if you are using a schema other than the ITCSI schema, you need to login as ITCSI. or if you have dba user account you can grant a privilege of
      GRANT ALL on ITCSI.APPS to <other SCHEMA>;

  • Error when trying to save in Table Layout

    Hi,
    I am using
    JDeveloper 10.1.3.1.0.3984 and
    JHeadstart 10.1.3.1 release 10.1.3.1.26
    I have some groups with Table and Form layout.
    In some table layout - Multi-Row Update is allowed.
    In those table layouts, if I want to save after update then it gives and error in Internet Explorer dialogue box:
    Line: 469
    Char: 5
    Error: Object doesn't support this action
    Code: 0
    I tried byr removing the group from Application Definition file and adding it again, but it was not fixed.
    Does anybody have any idea why it may happen?
    Thanks
    Syed Jabbar
    University of Windsor
    Windsor, ON, Canada

    Hi,
    It seems like a javascript error, probably from client side validation of faces components. Are you using a supported browser? Have a look here
    http://blogs.oracle.com/jheadstart/2007/12/supported_browsers_for_adf_fac.html
    This is probably not a JHeadstart specific problem, could you try to create the same page using ADF drag and drop and see if the problem persist. Also please post your question on the jdeveloper forum: JDeveloper and ADF
    Kind regards,
    Ruud Bijkerk

  • Interactive report errors when trying to query external table.

    I'm trying to create an interactive report against an external table and getting the following error. I see a note in metalink the describes its cause, but I doesn't seem to apply here.
    Query cannot be parsed, please check the syntax of your query. (ORA-06550: line 2, column 17: PLS-00302: component 'ODCIOBJECTLIST' must be declared ORA-06550: line 2, column 13: PL/SQL: Item ignored ORA-06550: line 4, column 18: PLS-00302: component 'ORACLE_LOADER' must be declared ORA-06550: line 4, column 6: PL/SQL: Statement ignored ORA-06550: line 5, column 12: PLS-00320: the declaration of the type of this expression is incomplete or malformed ORA-06550: line 5, column 6: PL/SQL: Statement ignored)
    Metalink Note:437896.1 identifies this same error related to external tables. It says the cause is an object named 'sys' that exist in the user's schema and must be removed. I checked dba_objects and there is no object named 'sys'

    Please ignore thread - operator error. There was an object named sys.

  • Error when trying to display original in WUI

    Hi All,
    I get an error message when I try to display originals in WUI (we are using SAP NW 7.0). 
    For example, when I try to display a xls file(The Document type is DRW) the following message occurs:
    -Data carrier type ZV and application XLS - application type 1 not defined  (message no. 26062)
    This problem only occurs when I am in WUI, in the GUI I am able to display the original.
    Furthermore when entering the customizing point,  (Path: spro -> SAP Reference IMG -> Cross-Application Components -> Document Mangagement -> General Data -> Define Data Carrier -> define data carrier type u201Cserver, front endu201D)
    this type ZV doen't exist.
    Why is the system not using the existing carrier type?
    Why do I only have the problem in the WUI?
    Any thoughts?
    Thanks in advance,
    Mikael

    Define data carrier type "server, front end"
    PC     Frontend PC     C:\temp\               X
    ---> DEFAULT     PC     Default PC
    ---> Default     PC     DEFAULT     Default for local PC
    Please Define workstation application
    something like this =>> PC     XLS       1     excel  %auto%

  • Error when trying to display video on the iPad

    Hi, I am uploading a video as a cover for my magazine, it's worked for me in the past, but now it keeps giving me the same error...
    The page loads and the creen is solid white, although I've told the video to play by itself on page load. So then I try tapping the page and if gives m an error saying "Unable to load media. Please check your internet connection or try again later."
    This is embeded so I really don't know why it needs the internet and have no idea what I'm doing wrong.
    I'm using V19 of producer tools and I'm testing on an iPad 3.
    Here is the info of the file (I have blurred out any client information):

    There are several reasons this problem may occur. jkuhns nailed one -- another reason is if you're tying to make videos too large for the device. The maximum resolution the iPad supports for video is 1080p. Please make sure you're using something sized correctly and H.264 encoded.

Maybe you are looking for

  • Macbook Pro shuts down constantly, and rarely starts. Should I reinstall OSX?

    Hi there, I have a early 2011 Macbook Pro 17" with OSX Lion 10.7.5 and a bootcamp partition running Windows 7. About three months ago some coffee was spilled on the keyboard, and afterwards was having some issues where it would shut down randomly. Af

  • How to do Customer document Reversals

    Hi... My user created a report for customer incoming payment according to their requirement which will show each bill wise. Now my problem is when they received money from the customer instead of entering one outstanding payment they entered another

  • Passing to a method.

    I have a String array in my main method called "names" it holds several names of people. What I want to be able to do is create a new method called doBubbleSort(). Creating the bubble sort is not a problem for me... but I don't know how to go about s

  • IChatUSBCam not supported by 10.4.3

    Hi all, I used to be able to use my Kritter USB web cam with OS 10.4.2 by using iChatUSBCam 2.0.3 along with ioxpertswebcam 1.1. However, since upgrading to OS 10.4.3, I get the following error message: "iChat USBCam cannot run with this version of i

  • Can't turn on ftp in pref's

    I need some help. I want to use my imac 17" 1ghz Imac with 10.3.9 to run an ftp site. I have adsl service and a zoom x5v modem/router. The router is set for dmz and that works good. Useing safari i can access the internet. I downloaded and installed