Uploadedfile does not retain its value

Hi,
I am using the following to upload a Excel file:
*<af:inputFile label="File to Upload" columns="30" value="#{backing_dataUpload.file}"/>*
Here is how I 'put' save the file for later use, in hte sesion:
**public void processExcelHeader() {**
UploadedFile file = getFile();
AdfFacesContext.getCurrentInstance().getViewScope().put("uploadedFileKey",file);//
Here is how I retrieve it:
*public void beginUpload() {//=======TBD=======*
UploadedFile uploadFile = (UploadedFile)AdfFacesContext.getCurrentInstance().getViewScope().get("uploadedFileKey");
if (uploadFile != null)
*try {*
ProcessExcelWorksheet pexcel = new ProcessExcelWorksheet();
java.io.InputStream in = uploadFile.getInputStream();
PROBLEM is the value java.io.InputStream in returns NULL. PLease note that the scope tof the Bean is 'Session'.
I Looked into the debugger the 'uploadFile' in hte beginUpload() has all the entries except the 'buffer' is NULL, and hte length is zero.
Please note that after the out there is some processing and the control exits back to screen, and on pressing another Command Button it returns to the
beginUoload() function.
Any Ideas......
Thanks......

Anil:
No, I don't think the 2 backing bean method is out of scope. I guess the framework implicitly close the stream in the first event handler. Because the framework might think you're done with it. After all the Session scope is the second largest scope and only shorter than Application scope.
The behavior may be related how the framework dispatch the servicing back bean to handle your event. Even thoug it might be using the same backing bean instance, the framework may clean it up after the completion of each round of servicing.
Your probably need to put the instance of the opened InputStream into ViewScope so that the inputstream will not be closed since it is still referenced. But you need to remember to close it after using in the second method which is beginUpload().
So in
public void processExcelHeader() {**
UploadedFile file = getFile();
InputStream is = file.getInputStream();
AdfFacesContext.getCurrentInstance().getViewScope().put("uploadedFileStream",is);//
Then:
public void beginUpload() {//=======TBD=======
InputStream inputStream = (UploadedFile)AdfFacesContext.getCurrentInstance().getViewScope().get("uploadedFileStream");
inputStream.close();
If you don't close it after using, you should experience serious memory leak.
Good luck,
Alex

Similar Messages

  • Tokenizer not retaining its value

    Again another issue I do not understand! Would anybody understand this?
    The Tokenizer does not retain its value!? Why it does not?
    15,XCV, Some Other String, 10',389.5,4194.0
    while ((rec = aPrintData[rIndex].toString()) != null){
         Iterator tokZ = new myNewGetToken(rec, patS, retD);
             for(; tokZ.hasNext();){               // here I got the value 15
                  tokZorRetD = (String)tokZ.next();     // here I got "NULL"???
                  if (tokZorRetD == null) {
                       patScount--;
                       mCount--;
                  }else{
                       switch(patScount){
    public class myNewGetToken implements Iterator{
    //          class RETokenizer implements Iterator{
              private CharSequence in;
              private Matcher mt;
              boolean retD;
              private String delim;
              private String match;
              private int lastEnd = 0;
              public myNewGetToken(CharSequence in, String patS, boolean retD){
                  this.in = in;
                  this.retD = retD;
                  Pattern pattern = Pattern.compile(patS);
                  mt = pattern.matcher(in);
              public boolean hasNext(){
                   if(mt == null){
                        return false;
                   if(delim != null || match != null){
                        return true;
                   if(mt.find()){
                        if(retD){
                             delim = in.subSequence(lastEnd, mt.start()).toString();
                        match = mt.group();
                        lastEnd = mt.end();
                   }else if(retD && lastEnd < in.length()){
                        delim = in.subSequence(lastEnd, in.length()).toString();
                        lastEnd = in.length();
                        mt = null;
                   return delim != null || mt != null;
              public Object next(){    // the value is not there anymore
                   String result = null;
                   if(delim != null){
                        result = delim;
                        delim = null;
                   }else if(match != null){
                        result = match;
                        match = null;
                   return result;
              public boolean isNextToken(){
                   return delim == null && match != null;
              public void remove(){
                   throw new UnsupportedOperationException();
         }I renamed it because I might need to modify or find out why it does not keeps the value!

    dubwai, I am sure you doubt the programming solutions
    that I come up with BUT while I run into many problems
    to get the results right it seems like that has to be
    done what the man has to do!I don't doubt it. I'm 100% absolutely sure that your 'fix' doesn't change anything.
    Let me explain line by line:
    tempToken = tokZ.next();   //  do Not convert do Not cast, keep it as ObjectThe Object is what it is. Casting the Object doesn't change it. All it does at runtime is check to see
    that the given Object is String or what ever you cast it to: Try the following:
    Object o = "test";
    String s = (String) o;
    System.out.println("o and s are the same Object? " + o == s);
    tokZorRetD = (String)tempToken.toString();  // Now, convert and cast
    // would that have to do anything with StrongTyping?Given that your previous code was not throwing a ClassCastException, the Iterator is already
    a String. Calling toString on a String just returns this:
    String s = "test"
    System.out.println("s.toString returns s? " + s == s.toString());Also, toString returns a String. There's no need to cast a String to String.
    And if s is null (which it appears to sometimes be) calling toString() will throw a NullPointerException.
    In short, if your code has been fixed, it was something else.

  • Scroll bar does not retain its position after or before pack

    Hi
    My Scroll bar does not retain its position after pack in my application.
    But i need to retain its state.
    My code snippet is :
    System.out.println("VAlue--->" + getHXValue());
    scrollPane.getHorizontalScrollBar().setValue(getHXValue());
    pack();
    My VAlue printed is 100.
    But my positon of scroll bar is at 0 th location.
    Can any one help me.....

    Swing related questions should be posted in the Swing forum.
    My code snippet is :Snippets don't help.
    If you need further help then you need to create a "Short, Self Contained, Compilable and Executable, Example Program (SSCCE)",
    see http://homepage1.nifty.com/algafield/sscce.html,
    that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.
    Don't forget to use the "Code Formatting Tags",
    see http://forum.java.sun.com/help.jspa?sec=formatting,
    so the posted code retains its original formatting.

  • I am using CS6 and when I go to save an image for Web the image does not retain its quality

    I am using CS6 and when I go to save an image for Web the image does not retain its quality. The first week I did this it worked just fine and now the images save very pixely.
    Here is a screenshot of my image on the artboard as I am editing it
    Here is a screenshot of the image as I'm trying to save it for Web
    As you can see, the image becomes pixely. I have tried to save it as every type of png and jpeg but nothing seems to work. I have no idea why it has started to do this. Please help!

    Change None to Art optimized then click apply(alteast in CS5 there was an apply, believe they removed that in CS6 as so many people missed that part).

  • Immediate postback does not retain field values under a dataTable

    A fairly common input dialog requirement is allowing the user to enter a variable number of rows of data -- as a concrete example say the form has one <h:inputText/> for a subject followed by a <h:dataTable/> initially with one <h:inputText/> for a URL, with a <h:commandButton immediate="true"/> called "Add Row". The user fills in subject, enters a URL, and then pushes "Add Row" to allow the entry of a second URL. This is an "immediate" button, and the action just adds a new element to the backing bean property which is a list of URL's.
    This almost+ does what the developer wants -- the form is redisplayed with a new empty URL row, the subject field remains filled in with what the user already entered, but the problem is the already filled in URL field is reset to blank.
    So it appears that input fields inside of a <h:dataTable/> do not retain user input if the form is submitted in immediate mode, but fields outside of <h:dataTable/> are preserved.
    I am using Sun's RI JSF 1.2, and it is not clear if this is just a bug, or some fundamental limitation. Given that the input fields in a data table have unique names that include the row index it seems possible that the posted parameters for the rows in a data table that remain after the action method adds or removes a row can be applied to the new view, just like for fields outside of the data table, and furthermore, this is what the user and developer would expect.
    The questions are:
    <ol><li>Is this a bug?</li>
    <li>If it is not a bug, what is another way to achieve the desired behavior?</li>
    </ol>

    EEG wrote:
    Hello.
    I'm using Apex 4.1.0 on Oracle 10.2.0.5 and Oracle app server (mod_plsq).
    Unfortunately, whenever I change this field to "InActive" in an existing row and then click my "Add Row" button, the tabular form re-appears with a new row but the modified row still has "Active" as the setting.
    I checked the values in my COL_CHOICES collection to be sure that the "active_status" field actually changed from "Active" to "InActive" for the existing/modified row. And it did. The modified row in the collection shows "InActive" as the value, even though the page displays "Active" for the value.
    How then can I make this drop down show the actual modified value?
    I've looked at the APEX_ITEM docs and have tried various combinations of the parameters but nothing works.The second parameter to <tt>apex_item.select_list</tt> is the value for the control. Your code has
    apex_item.select_list(16, null, 'Active;Y,InActive;N', 'style="color:darkred;"', 'NO', '%NULL%', '%', 'f16_' || '#ROWNUM#', NULL, 'NO') active_statusThis will always have the value NULL and thus default to the first option "Active". You need to use the appropriate column from the collection here instead of NULL:
    apex_item.select_list(16, c021, 'Active;Y,InActive;N', 'style="color:darkred;"', 'NO', '%NULL%', '%', 'f16_' || '#ROWNUM#', NULL

  • IWeb header does not retain its altered width when publishing to a folder

    I already had assistance to widen the web page header, and thought the problem was solved as below:
    I want to use Watercolor template in iWeb 3.0.4 but when I widen the page the full image does not follow.  Is there anything that can be done?
    iMac 7,1 Intel Core 2 Duo, Mac OS X (10.6.8), 2.4Ghz
    This solved my question by Roddy  on Apr 6, 2012 1:04 PM 
    If, for example, you mean the header background image you would need to go into the iWeb package contents and replace the image with a wider one.
    Here's an example of a page that's the "standard" 980 px wide instead of the iWeb default of 700px.
    Control click the iWeb application and select "Show Package Contents"
    Drill down through Contents/Resources/Themes
    Control click  "Watercolor.webtheme" and "Show Package Contents"
    Open the "Shared" folder to get the image
    I used EasyCrop to crop and resize the image to 980px X 90px and replaced the original with this wider one.
    However, when I publish the site to a folder, the old size is retained.  I have created new pages using the new enlarged header, but alas it is not retained when I publish.
    I have noticed the privileges of the altered file have changed. Originally it was assigned to be read by Wheel. But as soon as the file is altered, Wheel no longer exists.  Could this be the problem?  Is there a work around?
    Thanks

    Is there a work around?
    you can change it with javascript:
    http://temp.cyclosaurus.com/revolving/1px_line_border2.html
    copy the code in my page.
    add an html snippet to your page, paste in the code, click apply button.

  • Routine does not get its value from: quantity* net price

    Dear all,
    I have a problem with routine. Could you suggest me any solution for it.
    If quantity =1 there is no problem. But if quantity different than 1 routine still calculates as quantity 1.
    What migh be problem here?
    I have routine as:xkwert = xworkk - xworki.
    I assigned it YODI condition.
    To give an example: xkwert = xworkk - xworki.
    NETW                                              200,00
    OWST                         16,00
         Sub Total                               216,00 = XWORKK
    YOFI                         100,00 =XWORKI
    YODI                                                   8,00 =XKWERT*Here routine calculates as XWORKK=108 and XWORKI= 100.
    How can  I fix it?
    Kind Regards,
    Edited by: Fsmehmet on May 13, 2011 7:02 AM

    Dear Amit,
    My routine: xkwert = xworkk - xworki. And it works when quantity is 1.
    But when quantity is different then one, calclation is wrong.
    For example;
    Quantity=2 Net Price=100 And NETW=2100=200*
    OWST 16,00
    Sub Total 216,00 = XWORKK
    YOFI 100,00 =XWORKI
    YODI 8,00 =XKWERT*Here routine calculates as XWORKK=108 and XWORKI= 100.
    Regards,

  • Report similar to MC$4 that does not show absolute values

    Hi all,
    We need a report similar to Report similar to MC$4 which has the same drilldown capabilities but does not show absolute values, and instead shows the proper (actual) values.
    Or if its possible to change something in the MC$4 report to show the actual values and not the absolute.
    Thanks in advance!
    George

    HI
    Your input criteria should contain all plant numbers and the period to be analyzed.  Execute the report and then select:  Plant Analysis\Export\Transfer to XXL\Deselect all options and tick Plant, Storage Location and Month.  Follow the options to export to Excel.  Report will be based on Plant, Storage location and Month.
    Regards

  • ME23n , Does not shows the values correctly in print preview

    Hi,
    When viewing a PO using ME23n , it does not shows the values correctly in the print preview.
    For example;
    This is the vendor & its address.  (check attached image img1.jpg)
    ZERANDIB BUSINESS APPLIANCES
    Number-122/A
    PO BOX 41,112,REID AVENUE
    COLOMBO-04
    When displaying the print preview, it shows only some parts of the above address
    Shows only; (check attached image img2.jpg)
    ZERANDIB BUSINESS APPLIANCES
    PO BOX 41,112,REID AVENUE
    These values are getting from a table called LFA1. I have checked that table & in that table all the values exists correctly.
    I have noted issue is with, having only a single word. (If address or name having only a single word, that is without spaces, it will not going to show in the print preview) -
    In the above example, it is not showing Number-122/A and  COLOMBO-04 (Its a single word. No spaces there)
    If its like --> Number - 122/A   &  COLOMBO - 04 ,  then it will display in the print preview correctly (where there are spaces after - mark)
    check img3.jpg
    If its having more than one word, then it will display correctly in the print preview.  As below;
    ZERANDIB BUSINESS APPLIANCES
    Number - 122/A
    PO BOX 41,112,REID AVENUE
    COLOMBO - 04
    If its 2 or more words, it shows correctly.
    If its 1 word, then its not showing!
    Why it is happening like that? Any ideas how to resolve this issue?
    regards.
    zerandib

    It turns out that this problem went away after the program crashed.  Everything seems to be working well now.

  • Multiple select list not retaining the value for the first time

    Hi,
    I have a 3 select list depends on each other. select_list1 -- > select_list2 --> multiselect3. I have use denes example to create them.
    For the first time when I select values from 1,2,3 and runs a report based on it, it works fine but *does not retain the selected value in multiselect3.
    for the second time submit the process, it retails value in multiselect3. Please tell me if you came across this issue before
    Here is the code.
    function get_select_list_xml_VL(pThis,pSelect,pSelect1,pSelect2){
    var l_Return = null;
    var l_Select = html_GetElement(pSelect);
    var l_Select1 = html_GetElement(pSelect1);
    var l_Select2 = html_GetElement(pSelect2);
    var get = new htmldb_Get(null,html_GetElement('pFlowId').value,
    'APPLICATION_PROCESS=Cascading_Select_List_VL',0);
    get.add('F660_CASCADING_TEST',l_Select1.value + '_' + pThis.value + '_' + l_Select2.value);
    alert(l_Select1.value + '_' + pThis.value + '_' + l_Select2.value);
    // alert(document.getElementById("F660_CASCADING_TEST").value);
    gReturn = get.get('XML');
    if(gReturn && l_Select ){
    var l_Count = gReturn.getElementsByTagName("option").length;
    l_Select.length = 0;
    for(var i=0;i<l_Count;i++){
    var l_Opt_Xml = gReturn.getElementsByTagName("option");
    appendToSelect(l_Select, l_Opt_Xml.getAttribute('value'),
    l_Opt_Xml.firstChild.nodeValue)
    get = null;
    function appendToSelect(pSelect, pValue, pContent) {
    var l_Opt = document.createElement("option");
    l_Opt.value = pValue;
    if(document.all){
    pSelect.options.add(l_Opt);
    l_Opt.innerText = pContent;
    }else{
    l_Opt.appendChild(document.createTextNode(pContent));
    pSelect.appendChild(l_Opt);

    Please ask any question if you dont understand about the problem.
    Thanks

  • Function Does Not Return any value .

    Hi ,
    I am wrtting the below funtion without using any cursor to return any message if the value enters by parameters
    does not match with the value reterived by the function select statement or it does not reterive any value that
    for the parameters entered .
    E.g:
    CREATE OR REPLACE FUNCTION TEST_DNAME
    (p_empno IN NUMBER,p_deptno IN NUMBER)
    RETURN VARCHAR2
    IS
    v_dname varchar2(50);
    v_empno varchar2(50);
    V_err varchar2(100);
    v_cnt NUMBER := 0;
    BEGIN
    SELECT d.dname,e.empno
    INTO v_dname ,v_empno
    FROM scott.emp e , scott.dept d
    WHERE e.empno=p_empno
    AND d.deptno=p_deptno;
    --RETURN v_dname;
    IF p_empno IS NOT NULL AND p_deptno IS NOT NULL
    THEN IF v_dname is NULL THEN
    v_err :='Not Valid';
    RETURN v_err;END IF;
    ELSIF p_empno IS NOT NULL AND p_deptno IS NOT NULL
    THEN IF v_dname is NOT NULL THEN
    RETURN v_dname; END IF;
    ELSE
    RETURN v_dname;
    END IF;
    END;
    Sql Statement
    SELECT TEST_DNAME(1234,30) FROM dual
    AND IF I enter a valid combination of parameter then I get the below error :
    e.g:
    SQL> SELECT TEST_DNAME(7369,20) FROM dual
    2 .
    SQL> /
    SELECT TEST_DNAME(7369,20) FROM dual
    ERROR at line 1:
    ORA-06503: PL/SQL: Function returned without value
    ORA-06512: at "SCOTT.TEST_DNAME", line 24
    Where I am missing .
    Thanks,

    Format you code properly and look at it:
    CREATE OR REPLACE
       FUNCTION TEST_DNAME(
                           p_empno IN NUMBER,
                           p_deptno IN NUMBER
        RETURN VARCHAR2
        IS
            v_dname varchar2(50);
            v_empno varchar2(50);
            V_err varchar2(100);
            v_cnt NUMBER := 0;
        BEGIN
            SELECT  d.dname,
                    e.empno
              INTO  v_dname,
                    v_empno
              FROM  scott.emp e,
                    scott.dept d
              WHERE e.deptno=d.deptno
                AND e.empno=p_empno
                AND d.deptno=p_deptno;
            --RETURN v_dname;
            IF p_empno IS NOT NULL AND p_deptno IS NOT NULL
              THEN
                IF v_dname is NULL
                  THEN
                    v_err :='Not Valid';
                    RETURN v_err;
                END IF;
            ELSIF p_empno IS NOT NULL AND p_deptno IS NOT NULL
              THEN
                IF v_dname is NOT NULL
                  THEN
                    RETURN v_dname;
                END IF;
             ELSE
               RETURN v_dname;
           END IF;
    END;
    /Both p_empno and p_deptno in
    SELECT TEST_DNAME(7369,20) FROM dualare not null. So SELECT will fetch some v_dname and v_empno. Since p_empno and p_deptno iare not null your code will go inside outer IF stmt and will execute its THEN branch. That branch consist of nothing but inner IF statement. And since v_dname is NOT NULL it will bypass that inner IF and exit the outer IF. And there is no RETURN stmt after that outer IF. As a result you get what you get - ORA-06503. Also, both if and elsif in your code check same set of conditions which makes no sense.
    SY.

  • Imqobjmgr does not recognize the value of java.naming.provider.url property

    On Windows, I am running imqobjmgr 4.3
    when I run imqobjmgr -i list.properties, I am getting the following error
    Error [A3052]: imqobjmgr does not recognize the value of java.naming.provider.url property.
    Why is that?
    classpath
    C:\Sun\SDK\imq\lib\jms.jar;C:\Sun\SDK\imq\lib\imq.jar;C:\Sun\SDK\imq\lib\fsconte
    xt.jar;.
    contents of list.properties
    # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    # Copyright 2000-2008 Sun Microsystems, Inc. All rights reserved.
    # The contents of this file are subject to the terms of either the GNU
    # General Public License Version 2 only ("GPL") or the Common Development
    # and Distribution License ("CDDL") (collectively, the "License"). You may
    # not use this file except in compliance with the License. You can obtain
    # a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
    # or mq/legal/LICENSE.txt. See the License for the specific language
    # governing permissions and limitations under the License.
    # When distributing the software, include this License Header Notice in each
    # file and include the License file at mq/legal/LICENSE.txt. Sun designates
    # this particular file as subject to the "Classpath" exception as provided by
    # Sun in the GPL Version 2 section of the License file that accompanied this
    # code. If applicable, add the following below the License Header, with the
    # fields enclosed by brackets [] replaced by your own identifying information:
    # "Portions Copyrighted [year] [name of copyright owner]"
    # Contributor(s):
    # If you wish your version of this file to be governed by only the CDDL or
    # only the GPL Version 2, indicate your decision by adding "[Contributor]
    # elects to include this software in this distribution under the [CDDL or GPL
    # Version 2] license." If you don't indicate a single choice of license, a
    # recipient has the option to distribute your version of this file under
    # either the CDDL, the GPL Version 2 or to extend the choice of license to
    # its licensees as provided above. However, if you add GPL Version 2 code
    # and therefore, elected the GPL Version 2 license, then the option applies
    # only if the new code is made subject to such option by the copyright holder.
    # @(#)list.properties     1.11 07/02/07
    # This property file will list administered objects
    # Version of command file
    # NOTE: This is not the version of the Sun Java(tm) System Message Queue product
    version=2.0
    cmdtype=list
    # If you want to only list a particular type of administered
    # object, uncomment the following line and specify the type.
    # Acceptable values for the type property are: t, q, tf, and qf,
    # where t = topic, q = queue, tf = topic connection factory, and
    # qf = queue connection factory.
    #obj.type=
    # To use the LDAP service provider implementation from
    # Sun Microsystems, uncomment the following two property lines
    # and set the url property correctly.
    objstore.attrs.java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory
    objstore.attrs.java.naming.provider.url=ldap://localhost:389/ou=imqobjmgr,o=sun.com
    # To use the File System service provider implementation from
    # Sun Microsystems on Solaris, uncomment the following two
    # property lines and set the url property correctly.
    # *** Note that the url syntax here is platform specific. ***
    #objstore.attrs.java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory
    #objstore.attrs.java.naming.provider.url=file:///home/foo/imq_admin_objects
    # To use the File System service provider implementation from
    # Sun Microsystems on Windows, uncomment the following two
    # property lines and set the url property correctly.
    # *** Note that the url syntax here is platform specific. ***
    #objstore.attrs.java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory
    #objstore.attrs.java.naming.provider.url=file:///C:/imq_admin_objects
    #objstore.attrs.java.naming.security.authentication=
    #objstore.attrs.java.naming.security.principal=
    #objstore.attrs.java.naming.security.credentials=

    I see you're using Sun Java System Message Queue. There's a forum specific to that product over at [http://forums.sun.com/forum.jspa?forumID=711&start=0|http://forums.sun.com/forum.jspa?forumID=711&start=0] . You could try asking there.
    Nigel

  • Visual Studio 2012 SharePoint Project Error : The partial project item type does not have a value for this property

    Hi,
    I am getting this error from visual studio 2012 whenever i try to create the following project types:
    - Workflow Custom activity
    - Web parts
    The error is as mentioned below
    "The partial project item type does not have a value for this property"
    Due to this the when I add above type of items in my project, they show a red cross icon against them.
    Please let me know If have you any solution?

    Hi
    I had same issue. Below is the solution
    Installing
    "Visual Studio 2012 Update 3" usually solves this problem. (You can download it through microsoft's official site at
    "http://www.microsoft.com/en-in/download/details.aspx?id=39305")
    Hansraj Rathva

  • In a purchase order for 3 GR's Quantity does not equal the value

    Hi,
    I have found the difference in one purchase order, there have been 3 GRs where the Qty does not equal the Value.  How has this happened?
    Any guesses why the difference has come.
    Thanks&regards,
    Veena

    Hi Vishal,
    In po history for agt 3 Gr's  Quantity does not equal the values. I hope the difference is Movement types. But exactly where to check this movements i am not getting.
    Can you tell me this which T.code.
    Tx,

  • MW64,  cs6 bridge when I move or copy files the  context menu does not retain  recent folder destinations after I close the program

    W64,  cs6 bridge when I move or copy files the  context menu does not retain  recent folder destinations after I close the program. The context options that show are the ones from original install. The workspace I set up is also gone. I have every explorer box and cleaner checked to save recent. Had to disable nivedia desktop software because of weird display conflict. Have Dell pro support and they cannot fix. Any ideas to help me with this would be appreciated.

    Self-solved!  I work in column view in Finder so get there in a Finder window with folders and files appearing.
    There really is no problem, just select an ITEM in the COLUMN before right-clicking!
    The "old" context menu will appear. If you click in the white space in that column (or anywhere in a Finder window) and then place the cursor over a folder or file WITHOUT selecting it and right-click you will bring up the secondary context menu - Open, Copy, Duplicate, View Options and a greyed out Labels option. No "Move to Trash".

Maybe you are looking for