Coldfusion session variables being lost

ok so when my users login I establish session variables. one of these is employee id. in my Application.cfc I have this at the top:
<cfscript>
this.name = "My App";
this.sessiontimeout=CreateTimeSpan("0", "0", "45", "0");
this.SESSIONMANAGEMENT="YES";
this.SetClientCookies = "true";
this.setDomainCookies = "true";
</cfscript>
i also set the timeout for sessions at 45 in the CFadmin too.
after a successfull login i capture their session.employeenumber by authenticating through our corporate LDAP. no problem there. note: this app has run smoothly for 6+ years now but something has recently gone wrong.
on every page i reference a file in my application directory called "check_session.cfm" like this:
<cfmodule template="/myApp/Tags/check_session.cfm">
In that file I have code that checks for the existence of the session.employee_number. if it doesn't exist they either timed out or book-marked a page in the app in which they need to be logged in to view:
<cflock timeout="30" throwontimeout="Yes" type="READONLY" scope="SESSION">
<!--- Checks to make sure the user has a session--->
<CFIF NOT IsDefined("Session.employee_number")>
     <CFLOCATION URL="http://#cgi.HTTP_HOST#/myApp/LoginAgain.cfm">
</CFIF>
</cflock>
every now and then (i'd say on average 5 times per week) i get an error message from a user (i re-direct all errors to my email with diagnostic info). the error reads "Element EMPLOYEE_NUMBER is undefined in SESSION". when i look at the page the error came from i see my call to the check_session.cfm file about 50 lines above where this error happened when i tried to reference session.employee_number. why wouldn't it not find it and re-direct the user to the timeout page? i can never duplicate this error on my machine either... i always get the right result without the error message. its a random, sporadic, intermittent error.

Here is the diagnostic error information. Where you see [omitted] i've changed the URL for the purposes of displaying this detail in a public forum:
struct
Browser
Mozilla/4.0   (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR   2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0;   InfoPath.2; .NET4.0C; .NET4.0E; MS-RTC LM 8)
DateTime
{ts   '2011-02-21 20:59:21'}
Diagnostics
Element   EMPLOYEENUMBER is undefined in SESSION. <br>The error occurred on line   162.
GeneratedContent
<!DOCTYPE   html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">   <html xmlns="http://www.w3.org/1999/xhtml">   <!-- DW6 --> <head> <!-- Copyright 2005 Macromedia, Inc. All   rights reserved. --> <title>My Home</title> <meta   http-equiv="Content-Type" content="text/html;   charset=iso-8859-1" /> <link rel="stylesheet"   href="mm_training.css" type="text/css" /> <link   rel="stylesheet" type="text/css" href="../template/organized.css">   </head> <body bgcolor="#ffffff"   onLoad="onInit()">
HTTPReferer
http://[omitted]/mypage/myhome.cfm?CFID=101686&CFTOKEN=53097237
Mailto
[empty   string]
Message
Element   EMPLOYEENUMBER is undefined in SESSION.
QueryString
[empty   string]
RemoteAddress
10.x.x.x   [remote address omitted for purposes of this forum]
RootCause
struct
Detail
[empty     string]
ErrNumber
0
Message
Element     EMPLOYEENUMBER is undefined in SESSION.
Resolvedname
SESSION
StackTrace
coldfusion.runtime.UndefinedElementException:     Element EMPLOYEENUMBER is undefined in SESSION. at     coldfusion.runtime.CfJspPage.resolveCanonicalName(CfJspPage.java:1659) at     coldfusion.runtime.CfJspPage._resolve(CfJspPage.java:1612) at     coldfusion.runtime.CfJspPage._resolveAndAutoscalarize(CfJspPage.java:1747)     at     coldfusion.runtime.CfJspPage._resolveAndAutoscalarize(CfJspPage.java:1740)     at cfmyhome2ecfm1641837815._factor14(D:\[path_omitted]\mypage\myhome.cfm:162)     at cfmyhome2ecfm1641837815.runPage(D:\[path_omitted]\mypage\myhome.cfm:1)     at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:196) at     coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:370) at     coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65) at     coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:273) at     coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)     at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at     coldfusion.filter.PathFilter.invoke(PathFilter.java:86) at     coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70) at     coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:2 8)     at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) at     coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46) at     coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) at     coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at     coldfusion.CfmServlet.service(CfmServlet.java:175) at     coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89) at     jrun.servlet.FilterChain.doFilter(FilterChain.java:86) at     coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42 )     at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)     at jrun.servlet.FilterChain.doFilter(FilterChain.java:94) at     jrun.servlet.FilterChain.service(FilterChain.java:101) at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)     at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at     jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)     at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)     at     jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)     at     jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)     at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)     at     jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)     at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
TagContext
array
1
struct
COLUMN
0
ID
LINE
162
RAW_TRACE
at         cfmyhome2ecfm1641837815._factor14(D:\[path_omitted]\mypage\myhome.cfm:162)
TEMPLATE
D:\[path_omitted]\mypage\myhome.cfm
TYPE
CFML
2
struct
COLUMN
0
ID
CF_MYHOME
LINE
1
RAW_TRACE
at         cfmyhome2ecfm1641837815.runPage(D:\[path_omitted]\mypage\myhome.cfm:1)
TEMPLATE
D:\[path_omitted]\mypage\myhome.cfm
TYPE
CFML
Type
Expression
element
EMPLOYEENUMBER
objectType
object of java.lang.Class
Class       Name
java.lang.Class
Methods
Method
Return Type
asSubclass(java.lang.Class)
java.lang.Class
cast(java.lang.Object)
java.lang.Object
desiredAssertionStatus()
boolean
forName(java.lang.String,         boolean, java.lang.ClassLoader)
java.lang.Class
forName(java.lang.String)
java.lang.Class
getAnnotation(java.lang.Class)
java.lang.annotation.Annotation
getAnnotations()
java.lang.annotation.Annotation[]
getCanonicalName()
java.lang.String
getClassLoader()
java.lang.ClassLoader
getClasses()
java.lang.Class[]
getComponentType()
java.lang.Class
getConstructor(java.lang.Class[])
java.lang.reflect.Constructor
getConstructors()
java.lang.reflect.Constructor[]
getDeclaredAnnotations()
java.lang.annotation.Annotation[]
getDeclaredClasses()
java.lang.Class[]
getDeclaredConstructor(java.lang.Class[])
java.lang.reflect.Constructor
getDeclaredConstructors()
java.lang.reflect.Constructor[]
getDeclaredField(java.lang.String)
java.lang.reflect.Field
getDeclaredFields()
java.lang.reflect.Field[]
getDeclaredMethod(java.lang.String,         java.lang.Class[])
java.lang.reflect.Method
getDeclaredMethods()
java.lang.reflect.Method[]
getDeclaringClass()
java.lang.Class
getEnclosingClass()
java.lang.Class
getEnclosingConstructor()
java.lang.reflect.Constructor
getEnclosingMethod()
java.lang.reflect.Method
getEnumConstants()
java.lang.Object[]
getField(java.lang.String)
java.lang.reflect.Field
getFields()
java.lang.reflect.Field[]
getGenericInterfaces()
java.lang.reflect.Type[]
getGenericSuperclass()
java.lang.reflect.Type
getInterfaces()
java.lang.Class[]
getMethod(java.lang.String,         java.lang.Class[])
java.lang.reflect.Method
getMethods()
java.lang.reflect.Method[]
getModifiers()
int
getName()
java.lang.String
getPackage()
java.lang.Package
getProtectionDomain()
java.security.ProtectionDomain
getResource(java.lang.String)
java.net.URL
getResourceAsStream(java.lang.String)
java.io.InputStream
getSigners()
java.lang.Object[]
getSimpleName()
java.lang.String
getSuperclass()
java.lang.Class
getTypeParameters()
java.lang.reflect.TypeVariable[]
isAnnotation()
boolean
isAnnotationPresent(java.lang.Class)
boolean
isAnonymousClass()
boolean
isArray()
boolean
isAssignableFrom(java.lang.Class)
boolean
isEnum()
boolean
isInstance(java.lang.Object)
boolean
isInterface()
boolean
isLocalClass()
boolean
isMemberClass()
boolean
isPrimitive()
boolean
isSynthetic()
boolean
newInstance()
java.lang.Object
toString()
java.lang.String
StackTrace
coldfusion.runtime.UndefinedElementException:   Element EMPLOYEENUMBER is undefined in SESSION. at coldfusion.runtime.CfJspPage.resolveCanonicalName(CfJspPage.java:1659)   at coldfusion.runtime.CfJspPage._resolve(CfJspPage.java:1612) at   coldfusion.runtime.CfJspPage._resolveAndAutoscalarize(CfJspPage.java:1747) at   coldfusion.runtime.CfJspPage._resolveAndAutoscalarize(CfJspPage.java:1740) at   cfmyhome2ecfm1641837815._factor14(D:\[path_omitted]\mypage\myhome.cfm:162) at   cfmyhome2ecfm1641837815.runPage(D:\[path_omitted]\mypage\myhome.cfm:1) at   coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:196) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:370)   at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65) at   coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:273) at   coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)   at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at   coldfusion.filter.PathFilter.invoke(PathFilter.java:86) at   coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70) at   coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:2 8)   at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) at   coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46) at   coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) at   coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at   coldfusion.CfmServlet.service(CfmServlet.java:175) at   coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89) at   jrun.servlet.FilterChain.doFilter(FilterChain.java:86) at   coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42 )   at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46) at   jrun.servlet.FilterChain.doFilter(FilterChain.java:94) at jrun.servlet.FilterChain.service(FilterChain.java:101)   at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106) at   jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at   jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286) at   jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543) at   jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)   at   jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)   at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)   at   jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)   at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
TagContext
array
1
struct
COLUMN
0
ID
LINE
162
RAW_TRACE
at       cfmyhome2ecfm1641837815._factor14(D:\[path_omitted]\mypage\myhome.cfm:162)
TEMPLATE
D:\[path_omitted]\mypage\myhome.cfm
TYPE
CFML
2
struct
COLUMN
0
ID
CF_MYHOME
LINE
1
RAW_TRACE
at       cfmyhome2ecfm1641837815.runPage(D:\[path_omitted]\mypage\myhome.cfm:1)
TEMPLATE
D:\[path_omitted]\mypage\myhome.cfm
TYPE
CFML
Template
/[omitted]/mypage/myhome.cfm
Type
coldfusion.runtime.CfErrorWrapper

Similar Messages

  • Session variables being lost in IE7

    has anyone else experienced, heard of, or solved this issue?
    I have a web app thats been running fine for 5+ years and using session variables (i'm currently using CF8).
    When a user goes from page to page the session is carried with them so i know their login info. However, recently some users (and not all) have complained that after logging in fine (meaning the sessions variables are created) and go to another page off of the main one only to get a timeout issue. I've compared everything from IE settings to server settings, etc. but found no differences. It's like once they navigate to another page in the app the sessions are not carried to the next page.
    My timeout code is written so that if the session variables that are created at login are not present the message will show.
    Some users had to revert back to IE6 and it worked fine. Is there something they did wrong with ther IE update or is there some sort of server hot fix for this?
    Hope someone can help... i'm baffled.

    That forum you posted is definitely my issue! However it still is unresolved and the users have yet to pinpoint the cause (just like me). I too firmly believe its due to an IE7 upgrade b/c that is when this happens.
    I've checked out the user cookies. I used this script and put it on my server and had the user try it:
    http://www.bennadel.com/blog/730-Testing-ColdFusion-Session-Cookie-Acceptance.htm
    The cookies are passing over to the next pages fine (this script showed a success on the user machines). But ye the sessions are lost in my app. the CFID and CFTOKEN are changing when the user clicks to go to another page after login.
    In fact I have the CF8 server monitor up and running and when someone logs in I can see the their session info under the MEMORY USAGE --> Sessions by memory usage.
    I'm finding that users with this issue can log in fine but the session never gets registered with the server?!? Their CFID and CFTOKEN is not showing as an active session and when they click to another page their CFID is always different than their original?
    Any thoughts?

  • Session variables being lost

    In my onApplicationStart method (which should tell you I'm
    using an Application.cfC, not cfM), I have a cfif loop that passes
    a value to a custom tag and returns a form variable. I'm then
    reassigning that variable to a session variable. In IE, this works
    just fine; in Firefox, though, the session variable is NOT being
    set.
    What might be causing this, and is there a workaround?

    The issue referred to an external CF custom tag, which called
    another demo application to set a testing user. However, after
    further testing, I realize that demo app won't function properly
    with this application, so I've removed it.
    Authentication is being set by an LDAP query; this
    application that I am working on is going to be a sub-application
    of a larger application, and the authenticated user is being set as
    a session variable as well (I think...). However, I'm creating a
    new session variable for this application, and simply passing the
    authenticated user into my app (the outer app uses the variable
    auth_user; I'm using the variable authuser, so there is no name
    conflict).
    Again, it is IE that is not persisting the session. Firefox
    is doing so. I have looked in the advanced settings for IE, and
    there is nothing about persisting session variables to check or
    uncheck. Also, this application will probably be used mostly by
    users using IE 6 with default settings, so I'm going to need to
    find a workaround for IE.
    Your help is most appreciated.

  • Session variable being lost between parent and include file

    I am running into the following scenario: Page 1 includes page 2, on both pages a session variable is returned to the screen. On occasions, page 2 throws an error on the session variable even though it was successfully called on page 1.
    It only happens occassionally, and is very difficult to recreate in order to debug it in realtime. Has anyone run into something like this before? Thanks!

    semi star gazer wrote:
    I am running into the following scenario: Page 1 includes page 2, on both pages a session variable is returned to the screen. On occasions, page 2 throws an error on the session variable even though it was successfully called on page 1.
    It only happens occassionally, and is very difficult to recreate in order to debug it in realtime. Has anyone run into something like this before? Thanks!
    I suspect it has less to do with page-inclusion, more to do with the code on page 2. Suppose, instead of using cfinclude, you had copied the code from page 2 into page 1, and made 1 page of it. Then the error would still have occurred. That's at least my theory.
    Have a look at how the code in page 2 handles the session. There is bound to be something not quite right about it. What kind of error do you get anyway?
    Runtime debugging can be as simple as this:
    <cftry>
    <cfinclude template="page2.cfm">
    <cfcatch type="any">
    <cfdump var="#cfcatch#"><cfabort>
    </cfcatch>
    <cftry>

  • Session variable is lost

    I have developed a system and it had been used for 6 month
    already, it started had problem last week, user can log in system ,
    but after they click the each menu tab, the system give message
    "please login system" because the session variable is lost.
    I tried to debug the file and find that the session.userID is
    there in the file where I set it, but it become empty in other
    page.
    The weird thing is that it did not happen to everyone, most
    of user don't have problem, only a few user login and the session
    variable is lost after they move from login page to different page,
    when I did cfdump to output all session varibale, I found that
    seesionid changed from page to page for those user who had problem,
    the user who had problem now did not had problem before and I did
    not change any code, I tried the internet setting which still did
    not fix problem.
    I am wondering whether it is related to cold fusion server
    setting.
    Please give some advice.

    A good place to ask questions and advice about web development is at the mozillaZine Web Development/Standards Evangelism forum.<br />
    The helpers at that forum are more knowledgeable about web development issues.<br />
    You need to register at the mozillaZine forum site in order to post at that forum.<br />
    See http://forums.mozillazine.org/viewforum.php?f=25

  • Restricting particular session variables being shared

    i am using weblogic 10.3.
    I have an EAR with has 2 WAR in it , with session sharing enabled in the weblogic-application.xml . I understand that this will make all the variables that are added in the session to be shared by both WAR, but i want a particular variable added in the session not to shared by both WAR, it should be accessible by only WAR1.
    Please help me
    Zeeshan

    "Restricting particular session variables being shared"
    You can use the 'transient' keyword for this purpose, for example,
    public class Example implements Serializable {
        private String replicate;
        private transient String notReplicate;
    }The 'replicate' attribute is replicated when the Example object is put in the session, the 'notReplicate' attribute is not.

  • Session Variables Randomly  Lost between Pages

    My web page uses a session to keep track of who logged in.
    What I noticed is that the session variables stored appears and
    disappears randomly on different pages. The wierd thing is that my
    code is very simple.
    For the life of me I can not figure this out....

    I go through a hosting company and do not expect them to do
    any load balancing.
    What are sticky sessions?
    The cflocation tag also has the addtoken="yes" to it now and
    symptoms persist.
    I tested the case with
    sessiontimeout=#CreateTimeSpan(0,2,0,0)# instead of the
    sessiontimeout=#CreateTimeSpan(0,0,120,0)# and symptoms still
    persist.
    Any other suggestions? I think I ran into a wall
    here....

  • Session is being lost between GET and POST

    My application is being developed in Tomcat 4.1.18.
    I have a servlet that acts as a Controller and JSP's that make up the View. Basically, the session gets lost in the following manner:
    The application's web.xml file is set with Authentication method of Unspecified. Basically, it's not a high security application, we just need to make sure that the user maintains a session throughout the application.
    User is presented with a page (login.jsp). They present their credentials. The controller does an include (RequestDispatcher.include) on a jsp (this jsp simply does a setProperty *) to fill the bean. Then, the controller passes control (through RequestDispatcher.forward) to the Action servlet. The Action does some processing and forwards to the next destination. Next, the user clicks on a link (GET) (this causes the URL to be rewritten with the correct session ID). In this particular instance, the user is presented with a form to fill out. The user fills out the form and it POSTS to the controller. At this point, the controller attempts to access the session and it is lost!
    Frustrating. Please feel free to email at [email protected] Thanks.

    I just tried encoding the FORM ACTION and no dice. I'm pretty new to JSP's so I'm wondering if its something stupid that I'm doing (or not). I've never had this problem using straight servlets before.
    It would be hard for me to justify getting rid of the JSP's and going with a straight servlet solution.
    I'm also wondering if my Authentication:Unspecified in the web.xml file has anything to do with my current troubles.

  • Variable being Lost

    When I run the following script, the variable userParty is lost between the scoreCalculate function and the bottom of the script, where it should set the value of the quizVariable.party for the URLloader to function correctly.
    //Variables
    var userParty;
    //Event Listeners
    addEventListener(Event.ENTER_FRAME,scoreCalculate);
    addEventListener(Event.ENTER_FRAME,partyPicker);
    testClip.stop();
    //Work Out Which Party the User is Suited for
    function scoreCalculate(event:Event) {
        if (theScore<=10) {
            userParty="liberaldemocrat";
            removeEventListener(Event.ENTER_FRAME,scoreCalculate);
            //trace(userParty);
        } else if (theScore <= 20 && theScore > 10) {
            userParty="labour";
            removeEventListener(Event.ENTER_FRAME,scoreCalculate);
            trace(userParty);
        } else if (theScore <= 30 && theScore > 20) {
            userParty="conservative";
            removeEventListener(Event.ENTER_FRAME,scoreCalculate);
            //trace(userParty);
    //Send Party to DB
    var myURLRequest:URLRequest = new URLRequest(".../major/partyhandler.php");
    var quizVariables:URLVariables = new URLVariables();
    quizVariables.party = userParty;
    myURLRequest.data =quizVariables;
    myURLRequest.method = URLRequestMethod.POST;
    var loader:URLLoader = new URLLoader();
    loader.load(myURLRequest);

    Then the same applies for that picker function as well... it doesn't need to be a function either, and both can be combined into one set of conditionals.  Probably the most important line added for trying to resolve your problem is shown in red...
    trace(theScore);  // what does this show?
    var userParty;
       if (theScore<=10) {
              userParty="liberaldemocrat";
              liberaldemocrat_clip.play();
        } else if (theScore <= 20 && theScore > 10) {
              userParty="labour";
              labour_clip.play();
        } else if (theScore <= 30 && theScore > 20) {
              userParty="conservative";
              conservative_clip.play();
    //Send Party to DB
    var myURLRequest:URLRequest = new URLRequest(".../major/partyhandler.php");
    var quizVariables:URLVariables = new URLVariables();
    quizVariables.party = userParty;
    myURLRequest.data =quizVariables;
    myURLRequest.method = URLRequestMethod.POST;
    var loader:URLLoader = new URLLoader();
    loader.load(myURLRequest);

  • Variable being lost after CONNECT BY...PRIOR query

    Im having an issue with the following code (snippet posted):
    SELECT ewpm_project_id INTO pro_id FROM ewpm_work_package WHERE
    ewpm_work_package_id = wp_id;
    --can return pro_id here
    SELECT ewpm_work_package_prefix, LEVEL INTO parent_prefix,
    parent_level
    FROM ewpm_work_package
    WHERE ewpm_project_id = temp_pro_id
    AND ewpm_work_package_id = wp_id
    START WITH ewpm_work_package_id = pack_id
    CONNECT BY PRIOR ewpm_work_package_id = ewpm_work_package_parent_id;
    RETURN pro_id;
    The pro_id value is correctly set during the first select statement, I
    can return the pro_id in the commented position. However, I can not
    return the value after the second select statement. All I am getting
    back is a null value. If I remove the START WITH.. CONNECT BY
    clauses in the second query, the pro_id value is returned correcly.
    Has anyone experienced this before, or know what could be causing it?

    However, I can not
    return the value after the second select statement. All I am getting
    back is a null value. If I remove the START WITH.. CONNECT BY
    clauses in the second query, the pro_id value is returned correcly.How do you use this function ? If you use it in SQL query then any
    SQL statement raising NO_DATA_FOUND exception leads to NULL returning
    as a result (like the subquery in a selection list which returns no one row):
    SQL> create function get_number
      2  return number
      3  is
      4   ret_val number;
      5  begin
      6  
      7   select 1 into ret_val from dual;
      8   return ret_val;
      9  end;
    10  /
    Function created.
    SQL> select get_number from dual;
    GET_NUMBER
             1
    SQL> create or replace function get_number
      2  return number
      3  is
      4   ret_val number;
      5   p number;
      6  begin
      7  
      8   select 1 into ret_val from dual;
      9 
    10   --This statement raises NO_DATA_FOUND
    11   select 1 into p from dual where rownum = 0;
    12 
    13   return ret_val;
    14  end;
    15  /
    Function created.
    SQL> select get_number from dual;
    GET_NUMBER
    ----------Check does
    SELECT ewpm_work_package_prefix, LEVEL
    FROM ewpm_work_package
    WHERE ewpm_project_id = temp_pro_id
    AND ewpm_work_package_id = wp_id
    START WITH ewpm_work_package_id = pack_id
    CONNECT BY PRIOR ewpm_work_package_id = ewpm_work_package_parent_id
    query return anything ?
    Rgds.

  • How to call a session variable into sql?

    for example, I have a coldfusion session variable - session.testvar
    I am writing a Stored procedure in sql server 2000. The query within my stored procedure needs to insert a value into a table. The value needs to be my CF session variable. I have no idea how this is done, does anyone else have a hunch?
    I am using coldfusion 8 and sql server 2000.

    Pass it to the SP as a variable
    - there are examples in the cf docs

  • The session variable has no value definition

    Hi Gurus,
    For all Dashboard reports and Adhoc reports suddenly we are facing the below error for some users
    A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 23006] The session variable, NQ_SESSION.AREA, has no value definition.Please have your System Administrator look at the log for more details on this error. (HY000)
    In those dashboard reports we are not using any Area prompts even if we take only area column in analysis also it is showing the same error. But for admin the reports are coming fine only for some users it is showing like that but previously it was fine.
    Regards,

    Hi,
    this means your init block is not working. Check the init block why its not resulting in any data.
    only when init block doesn't  not result in data , server checks for default value for the variable.
    Since there is no default value, you get this error.
    Init blocks can fail because
    1. connection pool is not working.
    2. The table or view does not exist
    3. no data in the table
    4. filter in the sql in init block is not initialized if its coming from another session variable.
    typically no data should bring no results in a report.
    Since you have a session variable being part of the report, and that variable failed to initialize you get this error.
    Thanks,
    Satya Ranki Reddy

  • Problem retrieving Session variables in Flex from Coldfusion

    For about a year I've been using a cfc that allows me to remote call from within Flex to retrieve session-level variables.  I much prefer this to using FlashVars because with the remote call the session values don't show up in the page source.
    This was working fine when I was using an Application.cfm file to manage my Coldfusion pages.  However when I switched to using an Application.cfc file, the cfc stopped working.  Neither the cfc or the cfm file contain any code to manage these session variables (they are set in other pages), so the only real difference seems to be changing from Application.cfm to Application.cfc.
    Any thoughts why?  Thanks.

    Ok, this is resolved.
    The problem seems to have been related to the scope of Application.cfc and Application.cfm.  The directory which contained the cfc files had an Application.cfm controlling the session, while the directory with the pages that included the flex swf files had an Application.cfc file.  Apparently these two don't talk to each other.
    The solution is to use either Application.cfc or Application.cfm files, but not to mix them.  In other words, use either -- but be consistent.

  • Printing a Web Report Using Firefox Results in Lost Session Variables

    Post Author: AVXFlyer
    CA Forum: .NET
    I'm  having a problem with Firefox users printing a Crystal Report from a web site. 
    The first page of the web site collects information to be used in the report generation, for example, start date, end date, type of report etc.  These are all various text boxes, drop down lists, radio buttons and check boxes.  When the user clicks to show the report, everything works fine and the first page of the report will display. The code behind this page takes care of saving al the session variables into hidden fields on the page so the settings will be accessible when the user clicks to view the next page of the report.
    On clicking to view the next page of the report, everything is still fine and the process works beautifully and I've had no problems. 
    A new problem has surfaced during the printing of these reports.  Users who use IE6.0 or IE 7.0 do not have a problem, however, users who use Firefox do have a problem.
    It seems that the print dialog which appears as part of the the Crystal web control manages to 'lose" the variables which were present on the calling page.  It only does this with the Firefox browser.  Calls on postback to retrieve the variables from the hidden fields result in 0's or empty strings ("").
    Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init .... ....  If Me.IsPostBack = False Then ... ...        strDiscontinuedOnly = Request.Form.Item("ddlInvStatus")             If strDiscontinuedOnly = Nothing Then                 isDiscontinuedOnly = False             Else                 Select Case strDiscontinuedOnly                     Case 0 'All Inventory                         isDiscontinuedOnly = False                     Case 1 'Discontinued Inventory                         isDiscontinuedOnly = True                     Case 2 'Active Inventory                         isDiscontinuedOnly = False                 End Select             End If Else 'Postback is true             intRequestedReport = Request.Form.Item("fldReportID")             strDiscontinuedOnly = Request.Form.Item("fldInvDiscItemsOnly")             isDiscontinuedOnly = Request.Form.Item("fldInvDiscItemsOnly") ... ... end if

    Can't explain it, but here are a few tests;
    1) Try to print a saved data report
    2) Try to print a report that is not using parameters
    3) Try a different printer driver as "default"
    4) Enable the option "Dissociate Formatting Page Size and Printer Paper Size" on the report
    5) What format do you export to?
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

  • Purchased ColdFusion 10: Having problem with session variables

    My Dept. has just bought CF10 and I'm finally updating my existing web app to CF10 from CF8. My First Problem with CF10 is using session variables.
    When using the lower version of CF (since CF 4 to 8) I have never had any problem setting up session variables and getting or using these variables in other pages after a successful login but with CF 10 it seems setting session variables and using them in other pages are a major problems. I'm not sure where have I done wrong in the codes.
    First I'm setting the session in my Application.cfc This way:
    <cfcomponent displayname="Application" output="true">
      <cfset THIS.Name ="MyNewApp"/>
      <cfset THIS.ApplicationTimeout = CreateTimeSpan(0,0,20,0) />
      <cfset THIS.SessionManagement ="YES"/>
      <cfset THIS.SessionTimeout = CreateTimeSpan( 0, 0, 20, 0 ) />
      <cfset THIS.SetClientCookies = false />
    <cffunction name="OnApplicationStart" access="public" returntype="boolean" output="false">
    <cfset application.Main_DSN = "TESTDB">
    <cfreturn true />
    </cffunction>
    <cffunction name="onApplicationEnd" output="false">
          <cfargument name="applicationScope" required="true">
        </cffunction>
    <cffunction name="OnSessionStart" access="public" returntype="void" output="false" hint="Fires when user session initializes.">
    <cfset session.loggedin = "NO">
    <cfset session.username = "">
    <cfset session.userrights = "">
    <cfset session.usergroup = "">
    </cffunction>
    </cfcomponent>
    After login, user is validated and set values to those session.variables:
    ........user validation codes here......................
    <cfif mylogin NEQ true>
          <cflocation url="/login/login.cfm">
          <cfabort
    <cfelse>
          <cfset session.loggedin="Yes">
          <cfset session.username="#Trim(Form.username)#">
         <CFSET qUserRights = LoginObj.getUserRights('#Trim(Form.username)#')>
         <cfset session.userrights = qUserRights><!--- it's a query --->
        <CFSET qUserGroup = LoginObj.getUserGroup('#Trim(Form.username)#')>
            <cfloop query="qUserGroup">
               <cfset session.usergroup = user_group>
               <cfbreak>
            </cfloop>
        <!--- ****************** ???????????????????????????????????????????????????????????????????????????
        When I do cfdump in at this level, I can see that all of these session variables have been assigned to their values.
        But these session variables are not accessible from other pages. Other pages still show these session variable without its value.
        So, when I use these cfdumps in the index.cfm it is shown as they're not yet assigned with any values   ****************** --->
       <cfdump var="#session.loggedin#">
       <cfdump var="#session.username#">
       <cfdump var="#session.userright#">
       <cfdump var="#session.usergroup#">
    </cfif>
    In index.cfm, Before Login I got:
    session.loggedin = NO
    session.username = ["empty string"]
    session.userrights = ["empty string"]
    session.usergroup = ["empty string"]
    After a successful Login:
    session.loggedin = NO
    session.username = ["empty string"]
    session.userrights = ["empty string"]
    session.usergroup = ["empty string"]
    Have I done something wrong? These codes work on CF8. Please help.
    I need to mentioned:
    CF10 is in Linux and my web app is under https not http. But these session variables should be shared bentween http and https because some older application are still in http.

    On which page is the following code?
    After login, user is validated and set values to those session.variables:
    ........user validation codes here......................
    <cfif mylogin NEQ true>
          <cflocation url="/login/login.cfm">
          <cfabort
    <cfelse>
          <cfset session.loggedin="Yes">
          <cfset session.username="#Trim(Form.username)#">
         <CFSET qUserRights = LoginObj.getUserRights('#Trim(Form.username)#')>
         <cfset session.userrights = qUserRights><!--- it's a query --->
        <CFSET qUserGroup = LoginObj.getUserGroup('#Trim(Form.username)#')>
            <cfloop query="qUserGroup">
               <cfset session.usergroup = user_group>
               <cfbreak>
            </cfloop>
        <!--- ****************** ???????????????????????????????????????????????????????????????????????????
        When I do cfdump in at this level, I can see that all of these session variables have been assigned to their values.
        But these session variables are not accessible from other pages. Other pages still show these session variable without its value.
        So, when I use these cfdumps in the index.cfm it is shown as they're not yet assigned with any values   ****************** --->
       <cfdump var="#session.loggedin#">
       <cfdump var="#session.username#">
       <cfdump var="#session.userright#">
       <cfdump var="#session.usergroup#">
    </cfif>

Maybe you are looking for

  • XI file adapter polling faster than poll interval

    Hi, We are facing a issue with the file adapter/authorization of the FTPUSER. We FTP a server and pick up a file from a particular folder. My polling interval is 2 minutes My retry interval is space. Processing mode : ARCHIVE We are archiving it on a

  • Error while posting in accounts: Condition type does not exist in COPA

    Hi, I'm trying to post an invoice into accounts but I'm constantly encountering a Error message as : Assign condition type in COPA. This error is appearing whenever I'm assigning the pricing procedure and KOFK account entries to a new sales organizat

  • ARE-3 n ARE-1 form

    Hi All What is the difference between ARE-1,ARE-3 and CT3 form and how to create it? What other documents are there for export and how to create it? Reward Points for helpful answer Regards Ashis

  • Crosstab query is it possible in BEX?

    Hi I am working with the Marketing attributes ODS 0ATR_DS01 and I want a query that has the partner in rows with the attribute name in columns showing the attribute values i.e. a crosstab query. I've been playing with BEx trying to create a crosstab

  • How come no drives are shown on Lion/Mac OS X 10.7.x's desktops anymore?

    Hello! I have been using old Mac OS X 10.5.x and 10.2.x for many years, but noticed 10.7.x/Lion do not show connected/mounted drives anymore on desktop. I do see them in Finder, but that's annoying now. Why did Apple change this design? Thank you in