Cannot run a jsp a second time in WebLogic Portal 10.3

I have an index.jsp that has bunch of links that build pdfs.
here's the code from the jsp that builds the links
<netui:anchor action="openDocumentForView" target="new">view
     <netui:parameter value="${container.index}" name="id"/>
<netui:parameter value="${container.item.documentType}" name="type"/>
<netui:parameter value="${container.item.imageToken}" name="imageToken"/>
<netui:parameter value="${container.item.tokenId}" name="
</netui:anchor>
the idea is that it opens a new window and streams a pdf.
The action in the jpf does the forward like this
     URI uri = new URI("showImage.jsp");
     System.out.println("uri = " + uri.toString());
     return new Forward(uri, true);
the showImage.jsp looks like this:
<%@ page import="java.io.*, java.util.*"%>
<%
System.out.println("showImage.jsp ran....");
response.setContentType("application/pdf");
byte[] pdf = (byte[]) request.getSession(false).getAttribute("imageObject");
request.getSession(false).removeAttribute("imageObject");
response.getOutputStream().write(pdf);
response.getOutputStream().flush();
response.getOutputStream().close();
%>
What happens is:
I click on one link
the new window opens
in the controller the pdf is built & put in the session
in the new window, showImage.jsp is loaded and the pdf is displayed.
Then I close the showImage.jsp window, in the first window I click another link
in the controller the new pdf is built & put in the session
in the new window the previous pdf is sent to the user.
the jsp doesn't run a second time ( there's a print statement that never runs, so I know the jsp never runs, and a few other tests).
It's not cached in the browser, I've used response.setHeader to prevent other caching.
so I'm stumped.
Does anyone know how to get this jsp to run everytime it's called?
Thanks
John
Edited by: user11142479 on Mar 9, 2011 12:51 PM

I don't recall the product shipping a facet called Mobility Framework. This might have come from another product called WebLogic Mobility Server. I do not believe that this product exists anymore since the Oracle purchase of BEA. This product came from a partner called MobileAware and I think you can still purchase it from them if you require it.
However, you might want to read about the native capabilities in WLP for handling multiple devices. Read:
http://download.oracle.com/docs/cd/E13155_01/wlp/docs103/portals/multichannel.html to see if this is sufficient for your requirements.
Brad

Similar Messages

  • My Pavilion G7 Suddenly Cannot Recognize WiFi Signal For Second Time In A Year

    Hi All,
    My Pavilion is about two years old and the
    motherboard was replaced by HP while under
    warranty. 
    For the second time in about nine months the notebook suddenly cannot recognize my router's 
    WiFi signal. This time if I do a system recovery I will have to reinstall 50 apps! I am trying to avoid this if possible. I understand that changing the bios settings may fix wifi issue but no idea how this step will affect (delete/save) files. Upgraded from WIN7 to 8 to 8.1. Please help. Thanks so much.
    This question was solved.
    View Solution.

    Hi @actionrob 
    Welcome to the HP Community.  I hope you enjoy your experience with us.  To help you get the most out of the HP Forums I would like to direct your attention to the HP Forums Guide First Time Here? Learn How to Post and More.
    I saw your post regarding the problems connecting to your router.  I will be happy to help you with that.  I will need to know what the product number is for your notebook as there are a number of models in the g7 series.  Try the troubleshooting steps in this HP document Troubleshooting Wireless Network and Internet.
    Here are some generic steps that you can try as well:
    Power cycle the network: (Do this even if you have other devices that work properly with the router as it will interact with each piece of hardware differently)
    1. Shut down your notebook.
    2. Unplug the power to your router.
    3. Unplug the power to your modem.
    4. Wait at least 45 seconds.
    5. Plug in the modem, and wait for it to come back online.
    6. Plug in the router, and wait for it to come back online.
    7. Turn on your notebook, and test your connection.
    Reset the TCP/IP settings:
    1. Go to your start screen/menu and type CMD.
    2. Right click on the command prompt icon and chose Run as administrator.
    3. In the window that opens type "netsh int ip reset resetlog.txt" without quotes, and press enter.
    4. Restart your PC and test.
    Reset the winsock catalogue:
    1. Go to your start screen/menu and type CMD.
    2. Right click on the command prompt icon and chose Run as administrator.
    3. In the window that opens type "netsh winsock reset" without quotes, and press enter.
    4. Restart your PC and test.
    Please click “Accept as Solution ” if you feel my post solved your issue.
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
    Thank you,
    BHK6
    I work on behalf of HP

  • Error While running the prgram in Second time...Frank Could u pls check th

    Hi,
    I am using JDeveloper 11g.
    I have created a web application using ADF Business Components. Here I created a Bar Graph. When I am running the first it works fine. But when I try to run the second time it is giving some errors like Error 500 - Internal Server Error.
    Kindly help me...
    Thanks in Advance
    Regards,
    Jithesh.

    Hi Timo,
    Thanks a lot for the response.
    I am searched as per your advise but still ma problem is there... I am not getting any proper solution for this
    In the setDomainEnv.cmd file I am unable to find the PermGen size as you said...In the file I got the following line.
    set MEM_PERM_SIZE=-XX:PermSize=48m
    Is this I hv to change or something else. I am attaching the same file contents. Kindly help me....
    set ORACLE_HOME=C:\Oracle\Middleware\jdeveloper
    set WL_HOME=C:\Oracle\Middleware\wlserver_10.3
    for %%i in ("%WL_HOME%") do set WL_HOME=%%~fsi
    set BEA_JAVA_HOME=
    set SUN_JAVA_HOME=C:\Oracle\Middleware\jdk160_05
    if "%JAVA_VENDOR%"=="BEA" (
         set JAVA_HOME=%BEA_JAVA_HOME%
    ) else (
         if "%JAVA_VENDOR%"=="Sun" (
              set JAVA_HOME=%SUN_JAVA_HOME%
         ) else (
              set JAVA_VENDOR=Sun
              set JAVA_HOME=C:\Oracle\Middleware\jdk160_05
    @REM We need to reset the value of JAVA_HOME to get it shortened AND
    @REM we can not shorten it above because immediate variable expansion will blank it
    set JAVA_HOME=%JAVA_HOME%
    for %%i in ("%JAVA_HOME%") do set JAVA_HOME=%%~fsi
    set SAMPLES_HOME=%WL_HOME%\samples
    set DOMAIN_HOME=C:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.88\DefaultDomain
    for %%i in ("%DOMAIN_HOME%") do set DOMAIN_HOME=%%~fsi
    set LONG_DOMAIN_HOME=C:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.88\DefaultDomain
    if "%DEBUG_PORT%"=="" (
         set DEBUG_PORT=8453
    if "%SERVER_NAME%"=="" (
         set SERVER_NAME=DefaultServer
    set POINTBASE_FLAG=false
    set enableHotswapFlag=
    set PRODUCTION_MODE=
    set doExitFlag=false
    set verboseLoggingFlag=false
    for %%p in (%*) do call :SET_PARAM %%p
    GOTO :CMD_LINE_DONE
         :SET_PARAM
         for %%q in (%1) do set noQuotesParam=%%~q
         if /i "%noQuotesParam%" == "nodebug" (
              set debugFlag=false
              GOTO :EOF
         if /i "%noQuotesParam%" == "production" (
              set DOMAIN_PRODUCTION_MODE=true
              GOTO :EOF
         if /i "%noQuotesParam%" == "notestconsole" (
              set testConsoleFlag=false
              GOTO :EOF
         if /i "%noQuotesParam%" == "noiterativedev" (
              set iterativeDevFlag=false
              GOTO :EOF
         if /i "%noQuotesParam%" == "noLogErrorsToConsole" (
              set logErrorsToConsoleFlag=false
              GOTO :EOF
         if /i "%noQuotesParam%" == "nopointbase" (
              set POINTBASE_FLAG=false
              GOTO :EOF
         if /i "%noQuotesParam%" == "doExit" (
              set doExitFlag=true
              GOTO :EOF
         if /i "%noQuotesParam%" == "noExit" (
              set doExitFlag=false
              GOTO :EOF
         if /i "%noQuotesParam%" == "verbose" (
              set verboseLoggingFlag=true
              GOTO :EOF
         if /i "%noQuotesParam%" == "enableHotswap" (
              set enableHotswapFlag=-javaagent:%WL_HOME%\server\lib\diagnostics-agent.jar
              GOTO :EOF
         ) else (
              set PROXY_SETTINGS=%PROXY_SETTINGS% %1
         GOTO :EOF
    :CMD_LINE_DONE
    set MEM_DEV_ARGS=
    if "%DOMAIN_PRODUCTION_MODE%"=="true" (
         set PRODUCTION_MODE=%DOMAIN_PRODUCTION_MODE%
    if "%PRODUCTION_MODE%"=="true" (
         set debugFlag=false
         set testConsoleFlag=false
         set iterativeDevFlag=false
    @REM If you want to override the default Patch Classpath, Library Path and Path for this domain,
    @REM Please uncomment the following lines and add a valid value for the environment variables
    @REM set PATCH_CLASSPATH=[myPatchClasspath] (windows)
    @REM set PATCH_LIBPATH=[myPatchLibpath] (windows)
    @REM set PATCH_PATH=[myPatchPath] (windows)
    @REM PATCH_CLASSPATH=[myPatchClasspath] (unix)
    @REM PATCH_LIBPATH=[myPatchLibpath] (unix)
    @REM PATCH_PATH=[myPatchPath] (unix)
    call "%WL_HOME%\common\bin\commEnv.cmd"
    set WLS_HOME=%WL_HOME%\server
    set MEM_ARGS=-Xms256m -Xmx512m
    set MEM_PERM_SIZE=-XX:PermSize=48m
    set MEM_MAX_PERM_SIZE=-XX:MaxPermSize=128m
    if "%JAVA_VENDOR%"=="Sun" (
         if "%PRODUCTION_MODE%"=="" (
              set MEM_DEV_ARGS=-XX:CompileThreshold=8000 %MEM_PERM_SIZE%
    @REM Had to have a separate test here BECAUSE of immediate variable expansion on windows
    if "%JAVA_VENDOR%"=="Sun" (
         set MEM_ARGS=%MEM_ARGS% %MEM_DEV_ARGS% %MEM_MAX_PERM_SIZE%
    if "%JAVA_VENDOR%"=="HP" (
         set MEM_ARGS=%MEM_ARGS% %MEM_MAX_PERM_SIZE%
    @REM IF USER_MEM_ARGS the environment variable is set, use it to override ALL MEM_ARGS values
    if NOT "%USER_MEM_ARGS%"=="" (
         set MEM_ARGS=%USER_MEM_ARGS%
    set JAVA_PROPERTIES=-Dplatform.home=%WL_HOME% -Dwls.home=%WLS_HOME% -Dweblogic.home=%WLS_HOME%
    @REM To use Java Authorization Contract for Containers (JACC) in this domain,
    @REM please uncomment the following section. If there are multiple machines in
    @REM your domain, be sure to edit the setDomainEnv in the associated domain on
    @REM each machine.
    @REM
    @REM -Djava.security.manager
    @REM -Djava.security.policy=location of weblogic.policy
    @REM -Djavax.security.jacc.policy.provider=weblogic.security.jacc.simpleprovider.SimpleJACCPolicy
    @REM -Djavax.security.jacc.PolicyConfigurationFactory.provider=weblogic.security.jacc.simpleprovider.PolicyConfigurationFactoryImpl
    @REM -Dweblogic.security.jacc.RoleMapperFactory.provider=weblogic.security.jacc.simpleprovider.RoleMapperFactoryImpl
    set EXTRA_JAVA_PROPERTIES=-Ddomain.home=%DOMAIN_HOME% -Doracle.home=%ORACLE_HOME% -Doracle.security.jps.config=%DOMAIN_HOME%\config\oracle\jps-config.xml -Doracle.dms.context=OFF -Djava.protocol.handler.pkgs=oracle.mds.net.protocol %EXTRA_JAVA_PROPERTIES%
    set JAVA_PROPERTIES=%JAVA_PROPERTIES% %EXTRA_JAVA_PROPERTIES%
    set ARDIR=%WL_HOME%\server\lib
    pushd %LONG_DOMAIN_HOME%
    @REM Clustering support (edit for your cluster!)
    if "%ADMIN_URL%"=="" (
         @REM The then part of this block is telling us we are either starting an admin server OR we are non-clustered
         set CLUSTER_PROPERTIES=-Dweblogic.management.discover=true
    ) else (
         set CLUSTER_PROPERTIES=-Dweblogic.management.discover=false -Dweblogic.management.server=%ADMIN_URL%
    if NOT "%LOG4J_CONFIG_FILE%"=="" (
         set JAVA_PROPERTIES=%JAVA_PROPERTIES% -Dlog4j.configuration=file:%LOG4J_CONFIG_FILE%
    set JAVA_PROPERTIES=%JAVA_PROPERTIES% %CLUSTER_PROPERTIES%
    @REM Clear the pre_classpath here in case an application template wants to set it before the larger pre_classpath is invoked below
    set PRE_CLASSPATH=
    set JAVA_DEBUG=
    if "%debugFlag%"=="true" (
         set JAVA_DEBUG=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=%DEBUG_PORT%,server=y,suspend=n -Djava.compiler=NONE
         set JAVA_OPTIONS=%JAVA_OPTIONS% %enableHotswapFlag% -ea -da:com.bea... -da:javelin... -da:weblogic... -ea:com.bea.wli... -ea:com.bea.broker... -ea:com.bea.sbconsole...
    ) else (
         set JAVA_OPTIONS=%JAVA_OPTIONS% %enableHotswapFlag% -da
    if NOT exist %JAVA_HOME%\lib (
         echo The JRE was not found in directory %JAVA_HOME%. ^(JAVA_HOME^)
         echo Please edit your environment and set the JAVA_HOME
         echo variable to point to the root directory of your Java installation.
         popd
         pause
         GOTO :EOF
    if "%POINTBASE_FLAG%"=="true" (
         set DATABASE_CLASSPATH=%POINTBASE_CLASSPATH%
    ) else (
         set DATABASE_CLASSPATH=%POINTBASE_CLIENT_CLASSPATH%
    set POST_CLASSPATH=
    set POST_CLASSPATH=%ORACLE_HOME%\modules\features\adf.share_11.1.1.jar;%POST_CLASSPATH%
    set POST_CLASSPATH=%POST_CLASSPATH%;%DATABASE_CLASSPATH%;%ARDIR%\xqrl.jar
    @REM PROFILING SUPPORT
    set JAVA_PROFILE=
    set SERVER_CLASS=weblogic.Server
    set JAVA_PROPERTIES=%JAVA_PROPERTIES% %WLP_JAVA_PROPERTIES%
    set JAVA_OPTIONS=%JAVA_OPTIONS% %JAVA_PROPERTIES% -Dwlw.iterativeDev=%iterativeDevFlag% -Dwlw.testConsole=%testConsoleFlag% -Dwlw.logErrorsToConsole=%logErrorsToConsoleFlag%
    @REM -- Setup properties so that we can save stdout and stderr to files
    if NOT "%WLS_STDOUT_LOG%"=="" (
         echo Logging WLS stdout to %WLS_STDOUT_LOG%
         set JAVA_OPTIONS=%JAVA_OPTIONS% -Dweblogic.Stdout=%WLS_STDOUT_LOG%
    if NOT "%WLS_STDERR_LOG%"=="" (
         echo Logging WLS stderr to %WLS_STDERR_LOG%
         set JAVA_OPTIONS=%JAVA_OPTIONS% -Dweblogic.Stderr=%WLS_STDERR_LOG%
    @REM ADD EXTENSIONS TO CLASSPATHS
    if NOT "%EXT_PRE_CLASSPATH%"=="" (
         set PRE_CLASSPATH=%EXT_PRE_CLASSPATH%;%PRE_CLASSPATH%
    if NOT "%EXT_POST_CLASSPATH%"=="" (
         set POST_CLASSPATH=%POST_CLASSPATH%;%EXT_POST_CLASSPATH%
    if NOT "%WEBLOGIC_EXTENSION_DIRS%"=="" (
         set JAVA_OPTIONS=%JAVA_OPTIONS% -Dweblogic.ext.dirs=%WEBLOGIC_EXTENSION_DIRS%
    set JAVA_OPTIONS=%JAVA_OPTIONS%
    @REM SET THE CLASSPATH
    set CLASSPATH=%PRE_CLASSPATH%;%WEBLOGIC_CLASSPATH%;%POST_CLASSPATH%;%WLP_POST_CLASSPATH%
    set JAVA_VM=%JAVA_VM% %JAVA_DEBUG% %JAVA_PROFILE%
    Jithesh.

  • Error While running the prgram in Second time..Frank Could u pls check this

    Hi,
    I am using JDeveloper 11g.
    I have created a web application using ADF Business Components in JSF pages(Created the Bar Graph). When I am running the first it works fine. But when I try to run the second time it is giving some errors like Error 500 - Internal Server Error.
    Kindly help me...
    Thanks in Advance
    Regards,
    Jithesh.

    So what do you find in the log files, or console output?
    --olaf                                                                                                                                                                                               

  • How to run a thread for second time ?

    I have a written a ThreadPool, but I found that basically a thread is not running for the second time. i.e First i call run() method and call stop(). If i call again run() method for the same thread, it is not running. What should I do, If i want to run the thread for the second time ?
    class NewThread implements Runnable {
    String name;
    NewThread(String a) {
    name=a;
    public void run() {
    try{
    for(int i=0;i<5;i++) {
    System.out.println("Thread :" + name + " #" +i);
    Thread.sleep(5);
    catch (Exception e) {
    e.printStackTrace();
    class threadRunnableTest {
    public static void main (String args[]) {
    Runnable runnable=new NewThread("BaSkAr");
    Thread thread = new Thread(runnable);
    try{
    System.out.println("First Thread is starting !!!");
    thread.start();
    Thread.sleep(2000);
    System.out.println("First Thread it to be stopped!!");
    thread.stop();
    System.out.println("Second Thread is starting !!!");
    thread.start();
    Thread.sleep(2000);
    System.out.println("Second Thread it to be stopped!!");
    thread.stop();
    catch (Exception e) {
    e.printStackTrace();

    baskark wrote:
    I have a written a ThreadPool, but I found that basically a thread is not running for the second time. i.e First i call run() method and call stop(). If i call again run() method for the same thread, it is not running. What should I do, If i want to run the thread for the second time ?
    class NewThread implements Runnable {
    String name;
    NewThread(String a) {
    name=a;
    public void run() {
    try{
    for(int i=0;i<5;i++) {
    System.out.println("Thread :" + name + " #" +i);
    Thread.sleep(5);
    catch (Exception e) {
    e.printStackTrace();
    class threadRunnableTest {
    public static void main (String args[]) {
    Runnable runnable=new NewThread("BaSkAr");
    Thread thread = new Thread(runnable);
    try{
    System.out.println("First Thread is starting !!!");
    thread.start();
    Thread.sleep(2000);
    System.out.println("First Thread it to be stopped!!");
    thread.stop();
    System.out.println("Second Thread is starting !!!");
    thread.start();
    Thread.sleep(2000);
    System.out.println("Second Thread it to be stopped!!");
    thread.stop();
    catch (Exception e) {
    e.printStackTrace();
    It's usually helpful to check the documentation:
    [http://java.sun.com/javase/6/docs/api/java/lang/Thread.html#start()|http://java.sun.com/javase/6/docs/api/java/lang/Thread.html#start()]
    start
    public void start()Causes this thread to begin execution; the Java Virtual Machine calls the run method of this thread.
    The result is that two threads are running concurrently: the current thread (which returns from the call to the start method) and the other thread (which executes its run method).
    It is never legal to start a thread more than once. In particular, a thread may not be restarted once it has completed execution.
    So, make a new java.lang.Thread

  • How we can reduce the star-up time of weblogic portal server

    weblogic portal server takes 8-10 minutes to start on portal server
    can anybody suggest any remedy by which I can cring down this startup time bye 3-4 minutes.
    Thanks
    Ashish

    The reason portal server takes so much time is because in the background its starting many services and waiting for them to start completely.
    The services are - Autonomy search engine, which has 4-5 compoments, if you are using pointbase then it will start pointbase DB.
    To reduce the startup time you can disable autonomy, similarly you can use oracle or some other DB.
    Server opens connections at startup according to whats defined in JDBC connection pool configuration, you can tune this too.

  • Running New-MailBoxExportRequest a second time to same PST(s)

    Originally asked in SBS 2011 forum yesterday - Now asking here: I recently moved a small accounting firm (18 staff) from SBS 2003 to SBS 2011. Having purchased SBS 2011 Standard over a year ago knowing end-of-support for Exchange 2003 SP3 was 8th April
    2014. Today its 11th May and everything is working fairly well - except the usual suspects (WSUS) & daily network report errors (I read how to suppress those - cool - will do so soon). So, for a few dollars I have AD, Exchange 2010 SP3, wsus and this setup
    is perfect for this small company. Other 2012 servers do LOB apps. SBS does Exchange. Excellent.
    This was not a migration (too many things to go wrong IMHO). So I did a controlled train wreck by building a *new* Virtual Server SBS 2011 standard on one of 2 new Windows 2012 physical servers with plenty of grunt 12 TB 64 GB RAM (2 physical servers
    for redundancy.) These run on the same subnet and are not domain joined - that's what I want. They are 'aloof' and I can toss VMs around at will using Hyper-V. Just thought I would describe that as it works great. I export the critical VM's monthly. Fabulous
    way of backing up / disaster recovery IMHO.
    As ExMerge said "are you joking!" when I tried to write out one of the partners mailboxes (7 GB lol). I had to manually export each staff member using Outlook 2010. It worked - took A WHILE. :-) But was
    robust. So, over Easter I was able to import all staff PST's to Exchange 2010 SP3 on SBS 2011 - again using Outlook - logging on as each user with reboots etc.
    New-MailExportRequest scripts cycling through users. OK, I can do that, and there are nice vintage 2011 PowerShell scripts for this BUT it takes TWO Hours & would wear out the HDD and probably ruin an SSD in a couple of years running this daily.
    OK, my question. Having searched the internet for a couple of days I can't seem to find out what happens when I
    simply run the (7 GB partners) Mailbox export to the same location the next day. Is the file overwritten? Does the script silently abort as (OMG) the PST file exists! Or, does it SYNC the PST file with all
    changes (new email sent /rec / calendar updates etc.). I mean, wouldn't that be fabulous! That would be so cool as a default. Can anyone help me by explaining what a "double export" wil do to the existing PST file?
    I know I can filter just todays email for an export at say 2 AM for each user. But then I need to manage little PST files all over the place - until, say, next Sunday when I do a full export again. Like incremental backups in the old days.
    Sorry for the wordy post but I wanted to explain this issue. A great answer, I would venture to say, would help many 'admins' in this exact predicament.
    Many thanks,
    Ken
    KeBugCheck(42);

    Troy, I would expect to indeed write out two new files. The 2nd one overwriting the first one; both times, with exactly the range asked for. After all, these files are used for legal purposes. If the date range contained history items simply
    because the IT admin didn't erase the earlier export, that would be poor functionality.
    When I did the first export of this company, the whole process took 1 hour and 50 mins. It now just takes 40 minutes. Other factors though! The VM disk is self expanding on the Backup VM. So it would have had to grow the first time.
    If I get a chance I will do your test, but I would then be looking at reporting this as a
    bug to Microsoft! If the file just updated!
    Not specifying a date range (with export to same PST file) should be covered in the documentation. One would expect the file to be "re-done". However watching the target file, it just sits there around 8.4 GB with just a few KB being added on the
    second run through. It 'looks' like it is being updated intelligently. That is, existing items are not overwritten. With the PST file structure being fairly complicated (not just a linear file), we need someone who knows to chime in and let us know what is
    happening.
    I haven't tried doing just this mailbox. I will do that on one of the exported SBS 2011 sets of Hyper-V files. I will run that up on an isolated virtual private network and do some tests.
    The bottom line though is because I am asking about an undocumented 'feature' :-) I was hoping someone who knew exacty what was going on could answer this. Thanks for your thoughts.
    Ken
    KeBugCheck(42);

  • Cannot run viewer.jsp (crystal report)

    Hi,
    I'm using eclipse SDK 3.5. I already create report using crystal report, report name "RepCustomer"  but when i run
    RepCustomer-viewer.jsp this error come out = com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: Could not initialize class com.crystaldecisions.reports.dataengine.DataSourceManager---- Error code:-2147467259 Error code name:failed.
    Please help me.

    Thanks so much D Pavan K.
    It's work now. 

  • Query runs much slower the second time!

    I am doing a simple SELECT on a fairly complex view:
    select * from balances where day = date'2011-08-15';The results are correct, and they arrive in about 3 seconds. However, immediately repeating the exact same query takes about 3 minutes!
    Using a different SELECT list and/or WHERE clause gives a quick result, but only once; repeating any past query triggers the big slowdown.
    Doing ANALYZE TABLE on any of the tables involved in the view seems to reset things and the queries become fast again, but still only once for each specific query.
    This view worked fine on 9i and has only started doing this since we moved to 11g.
    Weird, eh?

    Here's EXPLAIN PLAN, which is the same before the fast query, before the slow query, and after the slow query.
    | Id  | Operation                         | Name                  | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT                  |                       |   184K|    11M|       |   364K  (1)| 01:12:52 |
    |   1 |  HASH GROUP BY                    |                       |   184K|    11M|    13M|   364K  (1)| 01:12:52 |
    |*  2 |   FILTER                          |                       |       |       |       |            |          |
    |   3 |    NESTED LOOPS OUTER             |                       |   184K|    11M|       |   361K  (1)| 01:12:17 |
    |   4 |     NESTED LOOPS                  |                       |  3071 | 82917 |       |    27   (0)| 00:00:01 |
    |   5 |      TABLE ACCESS BY INDEX ROWID  | GL_DAYS               |     1 |    12 |       |     2   (0)| 00:00:01 |
    |*  6 |       INDEX UNIQUE SCAN           | GL_DAYS_DAY           |     1 |       |       |     1   (0)| 00:00:01 |
    |*  7 |      TABLE ACCESS FULL            | GL_ACCOUNTS           |  3071 | 46065 |       |    25   (0)| 00:00:01 |
    |   8 |     VIEW                          |                       |    60 |  2340 |       |   118   (0)| 00:00:02 |
    |*  9 |      FILTER                       |                       |       |       |       |            |          |
    |* 10 |       TABLE ACCESS BY INDEX ROWID | GL_ENTRIES            |    60 |  1380 |       |    28   (0)| 00:00:01 |
    |* 11 |        INDEX RANGE SCAN           | GL_ENTRIES_BY_ACCOUNT |    46 |       |       |     2   (0)| 00:00:01 |
    |  12 |       NESTED LOOPS                |                       |     1 |    15 |       |     3   (0)| 00:00:01 |
    |  13 |        TABLE ACCESS BY INDEX ROWID| GL_VOUCHERS           |     1 |     7 |       |     2   (0)| 00:00:01 |
    |* 14 |         INDEX UNIQUE SCAN         | GL_VOUCHERS_PK        |     1 |       |       |     1   (0)| 00:00:01 |
    |* 15 |        TABLE ACCESS BY INDEX ROWID| GL_PERIODS            |   104 |   832 |       |     1   (0)| 00:00:01 |
    |* 16 |         INDEX UNIQUE SCAN         | GL_PERIODS_PK         |     1 |       |       |     0   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       2 - filter(TO_DATE(' 2011-08-15 00:00:00', 'syyyy-mm-dd hh24:mi:ss')<CURRENT_DATE+730)
       6 - access("D"."DAY"=TO_DATE(' 2011-08-15 00:00:00', 'syyyy-mm-dd hh24:mi:ss'))
           filter("D"."DAY"<CURRENT_DATE+730)
       7 - filter("A"."HAS_SUB"=0)
       9 - filter("D"."FISCAL_YEAR"= (SELECT "P"."FISCAL_YEAR" FROM MFA4."GL_PERIODS" "P",MFA4."GL_VOUCHERS"
                  "V" WHERE "V"."ID"=:B1 AND "P"."ID"="V"."PERIOD_ID" AND "P"."PERIOD_NO"<13))
      10 - filter("E"."ENTRY_DATE"<="D"."DAY")
      11 - access("E"."ACCOUNT_ID"="A"."ID")
      14 - access("V"."ID"=:B1)
      15 - filter("P"."PERIOD_NO"<13)
      16 - access("P"."ID"="V"."PERIOD_ID")As for the trace file, did you want the raw .trc file or the tkprof output?

  • Is it safe to run migration assistant a second time?

    When I ran migration assistant a few days ago, my documents didn't migrate.
    Is this normal/ expected?
    If it is normal/expected, how do I copy documents from one machine to the other?
    if it is not normal, can I safely run migration assistant once again to try and migrate these documents?
    Ta, muchly!

    It's safe. Turn off both Macs and start the migration again by Ethernet or FireWire. See > http://support.apple.com/kb/HT4889?viewlocale=en_US&locale=en_US

  • Select Query taking long time to run second time

    Hi All,
    I have Oracle 11gR1 in windows server 2008 R2 .
    I have some tables with 10 million records . When i run the select query for those tables first time it gives me result in 15 seconds but if i am running the same script second time from the same session I am getting the result in 15 minutes to complete ..
    Why it is happening? What may be the solution for this ?
    Thanks & Regards,
    Vikash jain(Junior DBA)

    Hi Mohamed,
    I just saw that both the times for the same query execution plan is different ..
    here are the details :
    First time Second Time
    g84m3qqjv2p3q g84m3qqjv2p3q
    2733045235 1310485984
    So plz tell me how should i force database to use the first execution plan ?
    I got this script for forcing the Db to use the same execution plan
    accept sql_id -
    prompt 'Enter value for sql_id: ' -
    default 'X0X0X0X0'
    accept plan_hash_value -
    prompt 'Enter value for plan_hash_value: ' -
    default 'X0X0X0X0'
    accept fixed -
    prompt 'Enter value for fixed (NO): ' -
    default 'NO'
    accept enabled -
    prompt 'Enter value for enabled (YES): ' -
    default 'YES'
    accept plan_name -
    prompt 'Enter value for plan_name (ID_sqlid_planhashvalue): ' -
    default 'X0X0X0X0'
    set feedback off
    set sqlblanklines on
    set serveroutput on
    declare
    l_plan_name varchar2(40);
    l_old_plan_name varchar2(40);
    l_sql_handle varchar2(40);
    ret binary_integer;
    l_sql_id varchar2(13);
    l_plan_hash_value number;
    l_fixed varchar2(3);
    l_enabled varchar2(3);
    major_release varchar2(3);
    minor_release varchar2(3);
    begin
    select regexp_replace(version,'\..*'), regexp_substr(version,'[0-9]+',1,2) into major_release, minor_release from v$instance;
    minor_release := 2;
    l_sql_id := '&&sql_id';
    l_plan_hash_value := to_number('&&plan_hash_value');
    l_fixed := '&&fixed';
    l_enabled := '&&enabled';
    ret := dbms_spm.load_plans_from_cursor_cache(
    sql_id=>l_sql_id,
    plan_hash_value=>l_plan_hash_value,
    fixed=>l_fixed,
    enabled=>l_enabled);
    if minor_release = '1' then
    -- 11gR1 has a bug that prevents renaming Baselines
    dbms_output.put_line(' ');
    dbms_output.put_line('Baseline created.');
    dbms_output.put_line(' ');
    else
    -- This statements looks for Baselines create in the last 4 seconds
    select sql_handle, plan_name,
    decode('&&plan_name','X0X0X0X0','SQLID_'||'&&sql_id'||'_'||'&&plan_hash_value','&&plan_name')
    into l_sql_handle, l_old_plan_name, l_plan_name
    from dba_sql_plan_baselines spb
    where created > sysdate-(1/24/60/15);
    ret := dbms_spm.alter_sql_plan_baseline(
    sql_handle=>l_sql_handle,
    plan_name=>l_old_plan_name,
    attribute_name=>'PLAN_NAME',
    attribute_value=>l_plan_name);
    dbms_output.put_line(' ');
    dbms_output.put_line('Baseline '||upper(l_plan_name)||' created.');
    dbms_output.put_line(' ');
    end if;
    end;
    undef sql_id
    undef plan_hash_value
    undef plan_name
    undef fixed
    set feedback on
    Output:
    Enter value for sql_id: g84m3qqjv2p3q
    Enter value for plan_hash_value: 2733045235
    Enter value for fixed (NO):
    Enter value for enabled (YES):
    Enter value for plan_name (ID_sqlid_planhashvalue): g84m3qqjv2p3q
    old 16: l_sql_id := '&&sql_id';
    new 16: l_sql_id := 'g84m3qqjv2p3q';
    old 17: l_plan_hash_value := to_number('&&plan_hash_value');
    new 17: l_plan_hash_value := to_number('2733045235');
    old 18: l_fixed := '&&fixed';
    new 18: l_fixed := 'NO';
    old 19: l_enabled := '&&enabled';
    new 19: l_enabled := 'YES';
    old 40: decode('&&plan_name','X0X0X0X0','SQLID_'||'&&sql_id'||'_'||'&&plan_hash_value','&&plan_name')
    new 40: decode('g84m3qqjv2p3q','X0X0X0X0','SQLID_'||'g84m3qqjv2p3q'||'_'||'2733045235','g84m3qqjv2p3q')
    declare
    ERROR at line 1:
    ORA-01403: no data found
    ORA-06512: at line 39
    Kindly help me to resolve the issue ..
    Thanks & Regards,
    Vikash Jain(Junior DBA)

  • Power supply freezes after running vi second time

    Hello,
    I am just starting my adventures in brave new world of LabView and I run into a problem with my first serious vi which is controling CPX400DP power supply and DPO4104 oscyloscope.
    What my vi should be doing:
    First it sets current levels of both channels of power supply (e.g. 5V on first, 0V on second) and size of the jump (e.g. 0.5V). Then vi should change both current levels by size of the jump and repeat till the current levels of both channels would be reverse to the start value (in this case, 0V on first channel, 5V on second). Also before every current change the vi would save to file mean of measurements out of the waveform from oscyloscope.
    What my vi is doing:
    At first run it seems that it's doing everything in order (new text file with resonable numbers is created). However, when I try to run the vi a second time my power supply freezes short after few current changes. I can stop the execution of the vi in LabView (it does take a while though) but to successfully run the vi again I must reset my power supply (turn it off and on).
    I tried to go around this problem by modyfing the vi in a way that it would do what I want multiple times during running the vi only once but unfortunately that didn't work.
    If anyone would have any suggestions about what I am doing wrong or how to help fix this problem feel free to share I don't bite... much  But seriously, I'm stuck with this problem for over a week and I'll be glad for any tips 
    Thanks!
    Waldek.
    PS Sorry if I am not clear somewhere but I'm not used to talk about programing in English
    PSS In attachments are my main vi and two sub vis.
    Solved!
    Go to Solution.
    Attachments:
    controling_power_supply_NEW.vi ‏29 KB
    current_changer.vi ‏17 KB
    waveform_reader_saver.vi ‏21 KB

    Revan-Ghost wrote:
    Thanks for a suggestion Bill but could you elaborate a bit on "try inserting ;*OPC? after every setup command"? I understand what that would do, concept wise, but as a new user I don't know how to do that in LabView. And Good Uncle Google doesn't say anything about " ;*OPC? " and insist on talking about OPC servers instead.
    I'm sorry - I was looking at the manual and failed to realize that the missing subVIs from your code were actually drivers for your power supply, so you may not be able to implement this (unless the drivers themselves have the "Operation Complete" capability - hopefully the drivers came with documentation).  Else, you may be stuck having to hardcode waits after each command.
    If you wrote your own drivers, this is how you would send the command to set output 1 to 1 Volt:
    V1 1;*OPC?
    The V1 1 sets your voltage to 1 Volt.  To tack on another command, you use the semicolon.  The *OPC? command forces it to return send a "1."  SInce the commands are acted upon sequentially, the power supply can't send the "1" until it is done processing the command to set it to 1 Volt.  After that command is complete, the "1" is sent, you read the 1 out of the buffer and move on.  This avoids issues where you pile on too many commands at once.  I checked the manual and it supports this feature.
    Bill
    (Mid-Level minion.)
    My support system ensures that I don't look totally incompetent.
    Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

  • JDev9i-Beta;How could I run two JSP applications in Jdev enviroment at the same time?

    Hi,
    I have two JSP applications located on different directories. I wanted to run both applications at the same time in Jdev enviroment. But the second one failed.
    More info:
    I successfully ran Application1, then minimized the browser and ran Application2, then again minimized the second browser. After I maximized the first browser(Application1) and tried to go thro pages, I received page not found. Because Jdev sat up the Class Path for the newer application(Application2) and looks for pages there. I believe thats why I could not run both at the same time. How could I get around of this?

    hi,
    can you provide more details on this. Are these jsp files part of the same project or different projects. I can not duplicate this issue. Please provide us more information.
    Thank you

  • After Photoshop Elements quit working for the second time in three months, I uninstalled it and now cannot get it to reinstall from the disc. Nothing happens when I insert the disc. All I can do is look at the folders and files and see nothing that tells

    After Photoshop Elements quit working for the second time in three months, I uninstalled it and now cannot get it to reinstall from the disc. Nothing happens when I insert the disc. All I can do is look at the folders and files and see nothing that tells me how to start the installation. Clicking "open with Auto play" gives me irrelevant options, view photos, share, etc. I'm running Windows 8. This program has worked, although buggy, for the past year.

    reinstall by clicking setup on your disk or downloading and installing,
    Downloads available:
    Suites and Programs:  CC | CS6 | CS5.5 | CS5 | CS4 | CS3
    Acrobat:  XI, X | 9,8 | 9 standard
    Premiere Elements:  12 | 11, 10 | 9, 8, 7
    Photoshop Elements:  12 | 11, 10 | 9,8,7
    Lightroom:  5 | 4 | 3
    Captivate:  8 | 7 | 6 | 5
    Contribute:  CS5 | CS4, CS3
    Download and installation help for Adobe links
    Download and installation help for Prodesigntools links are listed on most linked pages.  They are critical; especially steps 1, 2 and 3.  If you click a link that does not have those steps listed, open a second window using the Lightroom 3 link to see those 'Important Instructions'.

  • I saved my Form Central spreadsheet file once as a excel file but it will not allow me to save it a second time as an excel file.  It says that I cannot complete this action because the file me be open in another application, but it is not open in another

    I saved my Form Central spreadsheet file once as a excel file but Forms Central will not allow me to save the file a second time as an excel file.  I am informed that I cannot complete this action because the file me be open in another application, but it is not open in another application. What is the problem, and how do I solve the problem.  Thank you. Jeff

    First check the version of the document with Jongware's script "Identify.jsx" (ExtendScript/JavaScript).
    You can find it here:
    [Ann] Identify Your InDesign File
    If it is CS 5.5 or above, you need someone to open it in the version the script says and export an IDML representation from that. Another way would be to install a 30days version of CS6 or above (CC) and do it yourself.
    In regards of the script showing a result for InDesign files higher than CS6:
    CS7 = CC v9
    CS8 = CC v10 = CC-2014 or CC2014.1
    Uwe

Maybe you are looking for

  • How do i make it so it ask me to save all open tabs when i close firefox.

    it use to do this automatically when i had the old Firefox but now it never ask i like this feature and would like to know were it is hidden in new Firefox or if it is no longer available is there a add-on that does the same thing

  • How do I get a voice memo to my computer?

    I need to get the recorded into my MacBook Pro. Lion, 10.7.5. Can't send email, too long. Need this in my computer today. Thanks

  • AMOUNT IN BACK GROUND

    Hi friends, i got some problem in alv grid while i am running it in back ground. my report contains some currency(amount) field in out put. when i am removing the amount field it is good result in back ground. but when it consist of amount field it i

  • Can't change DataTable properties the first time the table is loaded.

    Hi all! I just want to change dynamically the value of columClasses in my DataTable with dataTable1.setColumnClasses(mystylesheet). It works fine when i use any link or button on my page, but the first loaded, the dataTable never change. I put my cod

  • SD Over to Cost structures

    Hi guys, Please any one can send me the SD  (Over to Cost) structures.