BitSet values ObjectOutputStream operation!

I am using ObjectInputStream /ObjectOutputStream to read/write a set of objects in a TreeSet to a file. Everything works fine except for one field of BitSet. The values of BitSet are not preserved. Am I doing something wrong or is this not possible?
If this is not possible is there any other way to do this, i.e. use another method of writing the objects to the file? Thanks for your help.

Yes you can use it that way... maybe you could post your code as there may be another problem. The following code produces the correct result:
  public static void main( String[] args ) throws Exception {
    File f = new File( "c:/bitset" );
    ObjectOutputStream out = new ObjectOutputStream( new FileOutputStream( f ) );
    BitSet set = new BitSet(3);
    set.set(0);
    set.set(2);
    System.out.println( set );
    out.writeObject(set);
    out.close();
    ObjectInputStream in = new ObjectInputStream( new FileInputStream(f) );
    BitSet set2 = (BitSet)in.readObject();
    System.out.println( set2 );
    in.close();
  }

Similar Messages

  • Condition VPRS value in operating concern currency.

    Hi,
    We've encountered the following problem. I was wondering if anyone of you had a similar one and how did you go about it:
    1. We've defined second local currency for our company codes = currency type 30 = USD
    2. CO-PA stores both company code currency = currency type 10 and op. concern currency B0=USD
    3. When we post goods issue to a customer, COGS is posted in FI in both currencies 10 and 30.
    4. Then when we run billing COGS condition VPRS is transfered to CO-PA in company code currency and operating concern currency. The value in company code currency is equal to the value during goods issue posting, however the value in operating concern currency (B0=USD) is calculated using the current exchange rate type 'M'. As a result VPRS value in CO-PA in B0=USD is not the same as the value of COGS in FI for currency type 30=USD (as the exchange rate is different during billing).
    It makes it impossible to reconcile COGS between FI and CO-PA in USD.
    For direct posting to CO-PA from MM and FI, SAP provides notes 604936 and 1066394 which solve the issue if B0=30. However those notes do not provide solution for billing documents and VPRS.
    We were advised that this problem can be solved using CO-PA enhacement COPA0005.
    Have you ever done it? Any tips on codeing this user exit? Any sample code?
    Regards,
    SZ

    Hi,
    Currency options in operating concern enables you to view the data  in copa. Activation or deactivation of the additional currencies here wont impact base data from any documents.
    If u r business doesnt have the profit center valuation or group valuation u can deactivate other currencies.
    Regards
    Sudhakar Reddy

  • BitSet values lost during ObjectOutputStream operation!

    I am using ObjectInputStream /ObjectOutputStream to read/write a set of objects in a TreeSet to a file. Everything works fine except for one field of BitSet. The values of BitSet are not preserved. Am I doing something wrong or is this not possible?
    If this is not possible is there any other way to do this, i.e. use another method of writing the objects to the file? Thanks for your help.

    I found the problem. For anyone interested, the problem was that I forgot to define the class, where the BitSet data member was, as serializable. As the result I lost the values of the BitSet data when I worte it into a file.

  • What are the values for operation code in order import open interface

    Hi,
    I am trying to create the sales order by populating the interface table and run the request import order i.e. open interace without standard OE APIs.
    I am also populating the actions interface table i.e. OE_ACTIONS_IFACE_ALL along with header, line, & price adjustment tables to hold the order. The sales order creates successfully but it fails at holding action due to invalid operation code. It has been tried with ‘CREATE’, ‘UPDATE, ‘INSERT’ for operation code in action interface table but no use.
    So my concern is what value needs to pass for operation code in action interface table.
    Any help would appreciate.
    Thanks,
    Sai Krishna

    If you are planning to apply holds, For holds the action is OE_Globals.G_APPLY_HOLD or APPLY_HOLD.
    Thanks
    Nagamohan

  • How to add new value in operator in search parameter in web ui

    Hi,
    I have a requirement to add values (equal ,not equal ) in operator drop-down field of
    search parameter in search of web ui page.
    Can someone guide me to proceed on this.
    Thanks
    Viren

    Hi,
    here an example how to add operator "contains pattern" to attribute prospect name in the opportunity search.
    Hopefully it will work similar for your issue:
    1) Launch transaction 'sm34'
    2) Enter view cluster name as 'CRMVC_DQ' and click on 'Maintain'
    3) Find DQuery Object Name for example 'BTQOpp' under Comp Name 'BT' and click on'exceptions per attribute.'
    4) Find the Attribute Name for example 'PROSPECT_NAME'
    5) Check the box 'CP' to enable to 'contains' operator.
    Kind regards
    Manfred

  • No value for operating unit found in Receivable system options

    All,
    Please help. R11i
    After setting up inventory organization, operating unit, legal entity, set of books under HR > workstructures > organization > description.
    MO: operating unit defined and default MO operating unit also defined.
    HR: User type = HR user
    HR: security profile also set
    I cannot find the operating unit in Receivable > setup > system options
    FM-41830: List of values contain no entries.
    When goto Order Management > System > System parameter, the operating unit is blank as well.
    Please help to suggest which setup I missed.
    Many thanks.

    What is the output of this sql?
    SELECT o.organization_id organization_id
    , otl.name name
    , o3.org_information2 legal_entity_id
    , le.name legal_entity_name
    FROM hr_all_organization_units o,
    hr_all_organization_units_tl otl,
    hr_organization_information o2,
    hr_organization_information o3,
    hr_all_organization_units_tl le
    WHERE le.organization_id = O3.org_information2
    AND le.language = USERENV('LANG')
    AND o.organization_id = o2.organization_id
    AND o.organization_id = o3.organization_id
    AND o2.org_information_context = 'CLASS'
    AND o3.org_information_context = 'Operating Unit Information'
    AND o2.org_information1 ='OPERATING_UNIT'
    AND o2.org_information2 = 'Y'
    AND o.organization_id = otl.organization_id
    AND otl.language = USERENV('LANG')
    -- AND hr.name = x_sp_name
    AND o.business_group_id = &bg_id; --Since you are using business group as security profile                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Default Value in Operation Tab for Work and Numbers

    Hi All,
    When i save maintenance order, Work and Number column in operation tab defaulted with values as 2 & 1. Due to this duration is 2HR.
    Calculation key is set as Calculate Duration in configuration.
    Any Idea how Work and Number column in operation tab defaulted with values as 2 & 1 ??

    Sunil,
    This is not standard..
    Go to the Planning tab and click on the <SELECT ALL> button to see if any task lists have been automatically assigned. If so, then have a look at user-exits IWO10020/21.
    In addition to the checks above, also check if you are using transaction variants or GuiXT.
    PeteA

  • IMAQ GrayMorphology VI: values of operation

    I'm using the Imaq GrayMorphology VI (in Labview 2009), and connected a
    control to 'operation'. This control shows more values than displayed in
    the help function. What are these other values?
    Attached please find a print screen of the overview of 'operation' in the help function on the left, and all the values in the control on the right.
    Attachments:
    operation.jpg ‏52 KB

    Thanks,
    I found the details in IMAQ Morphology VI: (dear Labview people, maybe the IMAQ GrayMorphology VI should be updated to also contain this information)
    AutoM (0)
    Auto median
    Close (1)
    Dilation followed by an
    erosion
    Dilate (2)
    Dilation (the opposite of an
    erosion)
    Erode (3)
    Erosion that eliminates isolated
    background pixels
    Gradient (4)
    Extraction of internal and external
    contours of a particle
    Gradient out (5)
    Extraction of exterior contours of a
    particle
    Gradient in (6)
    Extraction of interior contours of a
    particle
    Hit Miss (7)
    Elimination of all pixels that do not have
    the same pattern as found in the structuring element
    Open (8)
    Erosion followed by a
    dilation
    PClose (9)
    A succession of seven closings and
    openings
    POpen (10)
    A succession of seven openings and
    closings
    Thick (11)
    Activation of all pixels matching the
    pattern in the structuring element
    Thin (12)
    Activation of all pixels matching the
    pattern in the structuring element

  • No Default Value Maintained for Operation

    Hi Experts,
    System is showing an error when we are trying to create the process order, hence we are unable to create the process order.
    When we save the process order, system is showing below error:
    " No Default Value Maintained for Op.generation for order type xxxx (mat XXXXXXXXXXXXXXXXXX)"
    We have searched the existing threads, as per them we have checked all the check points like Master recipe, Production version Validity, Control keys, all are available with available validity dates.
    Once Master recipe is there, still system is looking for the default value for operation, this is something which is confusing us.
    Can you please guide us to resolve this issue.
    Thanks in advance.

    Hi Raj
    For some reason your master recipe is not being selected. Generally, this is caused by status, validity, production version or customizing.
    If you have created the recipe with a change number, check if a released is assigned.
    Also, since you mentioned that you already checked averything, you may try to create a new master recipe.
    BR
    Caetano

  • Error message if invalid characters entered in PM order oper.short text fld

    Hi ALL,
    I need to display a error message, when user enters the invalid characters in work order operation short text field. The error message should be displayed during work order u201CSaveu201D (during creation and change mode).
    Kindly let me know is there is any user exit / BADI can be used for this.
    Note: I have checked some user exit, such as IWO10009 but I am not getting the value of Operation short text (AFVGD-LTXA1) to compare and throw the error message
    Regards
    Ramu

    hi
    the exit is correct but don't use structure field,
    follow this to get text
    get AUFPL(Routing number of operations in the order)from  CAUFV and paa it in AFVC -AUFPLyou get the short text
    it can be usefull
    -ashok

  • NULL Value in Journal Entry and Wrong Tax Summary

    Hi people,
    I need your expert help for a big problem that appens to some customers.
    They run SAP BO 8.8 SP:00 PL:12
    This is the scenario:
    You insert a new documet,  A/R Invoice or A/P Invoice is the same, problem appear in all of them.
    After you insert the document, using SQL Server Management try this Select statment:
    Select * from JDT1 where JDT1.debit is null OR JDT1.credit is null
    A list of record where listed. And, this is the problem, NULL values are all in the VAT Lines in debit or credit colums.
    If you try to make a SUM(debit-credit) you discovery that, 1000,00-null=null
    Consequently, TAX Sumary report, that probably use arithmetic operation like me in SELECT statment,  count a wrong number when null values in DEBIT or CREDIT column in JDT1 for VAT declaration.
    How could I solve? And how i can make invoices store 0 rather than NULL in the VAT Line?
    Thanks in advance for your tips and solutions

    Thaks Neetu for your answer.
    I thinks there is a misurandertanding.
    My problem is not SQL.
    My problem is the SAP TAX Report.
    I used SQL only for check data and discover why SAP raise a wrong TAX Summary report.
    So, my question is: Why invoices write null values in journal entry, and how I can solve the problem that TAX summary report use null value in operations so the results are wrong.
    Thanks,
    Jonny Cortonicchi

  • Replacing web.xml values with a deployment plan.  Not working on WL 10.3.2

    Hi All-
    I am trying to replace a value from web.xml with one in a weblogic deployment plan. I deployed the application on WL 10.3.2 and used the deployment plan below. No matter what I do it doesn't seem to want to take the value.
    web.xml:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <context-param>
    <param-name>TokenGroup</param-name>
    <param-value>oldvalue</param-value>
    </context-param>
    </web-app>
    Deployment Plan:
    <?xml version='1.0' encoding='UTF-8'?>
    <deployment-plan xmlns="http://xmlns.oracle.com/weblogic/deployment-plan"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://xmlns.oracle.com/weblogic/deployment-plan http://xmlns.oracle.com/weblogic/deployment-plan/1.0/deployment-plan.xsd"
    global-variables="false">
    <application-name>APPName</application-name>
    <variable-definition>
    <variable>
    <name>TokenGroup</name>
    <value>Key123456</value>
    </variable>
    </variable-definition>
    <module-override>
    <module-name>APPName.war</module-name>
    <module-type>war</module-type>
    <module-descriptor external="false">
    <root-element>web-app</root-element>
    <uri>WEB-INF/web.xml</uri>
    <variable-assignment>
    <name>TokenGroup</name>
    <xpath>/web-app/context-param/[param-name="TokenGroup"]/param-value</xpath>
    <operation>replace</operation>
    </variable-assignment>
    </module-descriptor>
    </module-override>
    </deployment-plan>
    I've also tried other formats for the xpath such as:
    /web-app/context-param/{param-name="TokenGroup"}/param-value
    /web-app/context-param[param-name="TokenGroup"]/param-value
    Any ideas why this doesnt work?
    Thanks,
    Joe

    "web.xml"
    <?xml version='1.0' encoding='WINDOWS-1252'?>
    <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <context-param>
    <param-name>name</param-name>
    <param-value>Joe</param-value>
    </context-param>
    <context-param>
    <param-name>password</param-name>
    <param-value>password</param-value>
    </context-param>
    <servlet>
    <servlet-name>ParameterServlet</servlet-name>
    <servlet-class>ParameterServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>ParameterServlet</servlet-name>
    <url-pattern>/ParameterServlet</url-pattern>
    </servlet-mapping>
    </web-app>
    ParameterServlet
    import java.io.IOException;
    import javax.servlet.ServletConfig;
    import javax.servlet.ServletContext;
    import javax.servlet.ServletException;
    import javax.servlet.ServletOutputStream;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    public class ParameterServlet extends HttpServlet {
    private String dbName = "";
    private String dbPassword = "";
    public void init(ServletConfig config) throws ServletException {
    super.init(config);
    ServletContext context = getServletContext();
    dbName = context.getInitParameter("name");
    dbPassword = context.getInitParameter("password");
    public void doGet(HttpServletRequest req, HttpServletResponse res)
    throws IOException {
    ServletOutputStream out = res.getOutputStream();
    res.setContentType("text/html");
    out.println("<html><head><title>Basic Servlet</title></head>");
    out.println("<body>Database username is <b>" + dbName);
    out.println("</b><br>Database password is <b>" + dbPassword + "</b>");
    out.println("</body></html>");
    "Plan.xml"
    <?xml version='1.0' encoding='UTF-8'?>
    <deployment-plan xmlns="http://xmlns.oracle.com/weblogic/deployment-plan" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/deployment-plan http://xmlns.oracle.com/weblogic/deployment-plan/1.0/deployment-plan.xsd" global-variables="false">
    <application-name>virtual</application-name>
    <variable-definition>
    <variable>
         <name>name</name>
         <value>akshay1</value>
         </variable>
         <variable>
         <name>password</name>
         <value>koul1</value>
         </variable>
    </variable-definition>
    <module-override>
    <module-name>virtual</module-name>
    <module-type>war</module-type>
    <module-descriptor external="false">
    <root-element>web-app</root-element>
    <uri>WEB-INF/web.xml</uri>
         <variable-assignment>
              <name>name</name>
              <xpath>/web-app/context-param/[param-name="name"]/param-value</xpath>
              <operation>replace</operation>
         </variable-assignment>
         <variable-assignment>
              <name>password</name>
              <xpath>/web-app/context-param/[param-name="password"]/param-value</xpath>
              <operation>replace</operation>
         </variable-assignment>
    </module-descriptor>
    </module-override>
    <config-root>C:\DOCUME~1\user\LOCALS~1\Temp\user\.\config\deployments\virtual\plan</config-root>
    </deployment-plan>
    It works for me... I think your "web.xml" is causing the issue.
    Try replacing
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    with
    <?xml version='1.0' encoding='WINDOWS-1252'?>
    <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    Hope this helps.
    -Akshay

  • In Logic account the operator function is not working properly

    Hi all ,
    When am defiining the logic accounts using a operator as Function ,it is not working at all showing a red border in the cell and not able to update the grid .
    InValue/Exp-> am using a function -> CurVal > 0 then Result=CurVal else Result ="skip" endif
    Please suggest me if there is some workaround available for this ?

    Thanks for the Link!!
    We are using the FDM version 11.1.1.3 and Target as HFM .
    Now i am creating a logic account say Item - L1100 ,Type-IN, Criteria value-1100,Operator-Function(Not working),
    Value/Exp->If CURVAL > 0 Then      RESULT = CURVAL Else Result=”Skip” End If.
    As soon as i select the operator(Function) ,it shows a red border on the operator cell and couldn't able to update the grid .
    Have searched the OTN discussion forumns and find no answer for this !! Could you please sugesst me if any workaround available for this piece ?
    Thanks
    Kenny

  • Passing multiple values to a parmeters in Discoverer 4i

    Hi Friends,
    I have a requirement of passing multiple values (Operating Unit Names) to the parameter(P_Opr_Unit) in Discoverer.
    I am using PL/SQL function to get the data in Discoverer.Function is working fine for multiple values from Database(SQL Developer).
    When i am trying to pass multiple values from discoverer ...it is accepting only the first parameter value of Operating Unit.
    Need your Expertise on this issue.
    Thanks In Advance.
    Thanks & Regards
    Ramya Nomula

    Hi,
    You can only pass one parameter value into a function. When you have a multi-valued parameter it enables you to create the condition: item IN (:param) which Discoverer expands to the condition: item IN ('val1', 'val2', 'val3') where these are the values the user has picked from the list of values.
    Now if you have a calculation containing a function and a parameter: my_func(:param) then Discoverer has to map the parameter in the function an item in the worksheet. So if the param is from a multi-valued list it can only pass one value and so expands the calculation to my_func('val1') where val1 is the first item picked from the list.
    Rod West

  • Difference between AP Operational Status and Registered Controller

    When reviewing the AP Details page in Prime there are two fields I'm not sure what they mean specifically:
    1) Operational Status - Registered
    2) Registered Controller - Not Associated
    Any clarity or document references would be greatly appreciated.           

    This is in CPI viewing the AP Details tab.
    The only valid values for Operational Status are Registered/Not Registered.
    The only valid values for Registered Controller are Associated/Not Associated
    The IP address is not a valid input.
    It is still unclear to me what the specific and fuctional differences and impacts are between Operational Status and
    Registered Controller? How do the values of each impact the client device?
    Thank You.

Maybe you are looking for

  • Export Video Quality

    Hi, I am new to FCE4 and need a little help exporting video. I have edited sequence videos that upon exporting to quicktime movie-importing to imovie so i could add title screens. (when I tried in FCE4 Boris Title 3D quality was very fuzzy at that ti

  • Transfer Order Confirmation

    Hi, When confirming transfer order, what is the significance of confirming internally.  It doesn't ask any pick qty. Moreover, my client asked me to check if any TO confirmation is done for short quantity, the idoc should trigger the error message wh

  • Uninstall or Migrate CA from Win2003 DC

    I have an old Win2003 DC that has a CA running on it.  I think it was installed specifically for RADIUS use with authenticated Wifi clients on a Cisco WLC.  The Win2003 DC is now the last of the Win2003 Servers on the domain and am looking at getting

  • Cannot assign active correlation

    Hi, I would like to assign an existing correlation to "Active correlation" property box, but I can't. The problem is I can see and select correlation in the combo box but when I click on anyother place on the screen, it goes away. What can cause the

  • Oracle archive error

    Dear friends, i got one error in sap with database is oracle error at line 1; ora-16038: log1 sequence #2533 cannot be archived ora-19504: failed to create file "" ora-00312 : online log 1 thread 1:D:\oracle\ecc\origloga\log_gllm1.dbf' ora-00312 : on