Setting a null(empty) binary stream in a PreparedStatement

How can I bind a null binary stream into a PreparedStatement?
In the following, if pMap is null how do I bind it? If I try to serialize a null pMap I get and error that not all columns bound.
if(pMap == null)
else
byte[] _bytes = SerializeUtility.serializeObject(pMap);
pStatement.setBinaryStream(pColCount, new ByteArrayInputStream(_bytes), _bytes.length);
Thanks,
David

I was too close to the monitor, couldn't see the big picture ! :-) Now it works.
Although, I still get that Websphere error:
7c7fc721 SharedPool I J2CA0086W: Shareable connection MCWrapper id 31c73d Managed connection comm.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl@2e55c73d State:STATE_TRAN_WRAPPER_INUSE from resource jdbc/ds was used within a local transaction containment boundary.
It use to work fine, no errors.
Any ideeas??
mihut

Similar Messages

  • Passing null/empty values from a actionscript VO to a Coldfusion ORM object

    This is the situation.
    If you have an actionscript VO that binds to a Coldfusion ORM object via the RemoteClass metadata and some of the values are not set, null, or empty strings and you pass it from Flex to Coldfusion then the Coldfusion deserialization barfs saying the values are not acceptable date values (for type="date") or valid emails (for validation="email") or other such validations, even if required="false" on the property.
    For instance, if you have the following actionscript VO:
    package vo
        [RemoteClass(alias="com.companyname.Person")]
        [Bindable]
        public class Person
            public var person_id:Number;
            public var last_name:String;
            public var first_name:String;
            public var email:String;
            public var created_date:date;
         public function Person() {}
    And you have the corresponding Coldfusion component:
    <cfcomponent displayname="person" output="false"
        alias="com.companyname.Person"
        schema="dbo" persistent="true"
        table="PERSON">
        <cfproperty name="person_id" type="numeric" fieldtype="id" validate="integer" required="true" column="PERSON_ID"/>
        <cfproperty name="last_name" type="string" column="LAST_NAME" required="true"/>
        <cfproperty name="first_name" type="string" required="true" column="FIRST_NAME"/>
        <cfproperty name="email" type="string" validate="email" required="false" column="EMAIL"/>
        <cfproperty name="date_created" type="date" required="false" column="DATE_CREATED"/>
    </cfcomponent>
    Then if you pass the actionscript VO as is to Coldfusion, the deserialization complains that you do not have a valid email or a valid date for date_created.  This is bad, bad, bad.  Essentially if you have a validation of certain types (email being one) or a date property, or probably some other cases, then you essentially can not make it not required, it automatically makes it required because the Coldfusion serializer considers null/empty values as invalid dates or emails.  But the serializer should not care for values that are not required, there has to be a way to pass null/empty values to these data types, but apparently there's not.  If you pass an empty string ("") you still have the same problem.  I know Coldfusion does not have null values, but there has to be a way to do this, otherwise it defeats the purpose of having required="false" and some kind of validation on the property.
    There seems to be two ways around it.  One is to override the implicit setters for the properties on the Coldfusion side and check for 0 length values yourself, then set the property if it is not, or create your own validation routine.  I ended up creating my own validation function since I didn't want to have to write a setter function for everyone of these cases and I can pass back user friendly validation messages.
    Have other people encountered this problem?  How have you gotten around it?  Thanks.

    I realize that I didn't clarify that I am using ColdFusion
    for getting the data. This class was generated by the Create CFC
    wizard in Flex Builder.
    package com.generated
    [Managed]
    [RemoteClass(alias="components.generated.clients.Clients")]
    public class Clients
    public var clientid:Number = 0;
    public var clientfirstname:String = "";
    public var clientlastname:String = "";
    public var clientaddress1:String = "";
    public var clientaddress2:String = "";
    public var clientcity:String = "";
    public var clientstate:String = "";
    public var clientzip:String = "";
    public var clientphone:String = "";
    public var clientemail:String = "";
    public function Clients()
    }

  • Passing null/empty values from Flex to a Coldfusion ORM object

    This is the situation.
    If you have an actionscript VO that binds to a Coldfusion ORM object via the RemoteClass metadata and some of the values are not set, null, or empty strings and you pass it from Flex to Coldfusion then the Coldfusion deserialization barfs saying the values are not acceptable date values (for type="date") or valid emails (for validation="email") or other such validations, even if required="false" on the property.
    For instance, if you have the following actionscript VO:
    package vo
        [RemoteClass(alias="com.companyname.Person")]
        [Bindable]
        public class Person
            public var person_id:Number;
            public var last_name:String;
            public var first_name:String;
            public var email:String;
            public var created_date:date;
         public function Person() {}
    And you have the corresponding Coldfusion component:
    <cfcomponent displayname="person" output="false"
        alias="com.companyname.Person"
        schema="dbo" persistent="true"
        table="PERSON">
        <cfproperty name="person_id" type="numeric" fieldtype="id" validate="integer" required="true" column="PERSON_ID"/>
        <cfproperty name="last_name" type="string" column="LAST_NAME" required="true"/>
        <cfproperty name="first_name" type="string" required="true" column="FIRST_NAME"/>
        <cfproperty name="email" type="string" validate="email" required="false" column="EMAIL"/>
        <cfproperty name="date_created" type="date" required="false" column="DATE_CREATED"/>
    </cfcomponent>
    Then if you pass the actionscript VO as is to Coldfusion, the deserialization complains that you do not have a valid email or a valid date for date_created.  This is bad, bad, bad.  Essentially if you have a validation of certain types (email being one) or a date property, or probably some other cases, then you essentially can not make it not required, it automatically makes it required because the Coldfusion serializer considers null/empty values as invalid dates or emails.  But the serializer should not care for values that are not required, there has to be a way to pass null/empty values to these data types, but apparently there's not.  If you pass an empty string ("") you still have the same problem.  I know Coldfusion does not have null values, but there has to be a way to do this, otherwise it defeats the purpose of having required="false" and some kind of validation on the property.
    There seems to be two ways around it.  One is to override the implicit setters for the properties on the Coldfusion side and check for 0 length values yourself, then set the property if it is not, or create your own validation routine.  I ended up creating my own validation function since I didn't want to have to write a setter function for everyone of these cases and I can pass back user friendly validation messages.
    Have other people encountered this problem?  How have you gotten around it?  Thanks.

    Looks like a known workaround to this issue is to wrap the Flex object in an array.
    The ColdFusion CFC will accept that as an array, with the first an only element being a struct, which is the object you built in Flex.

  • How to use an binary stream file to generate Arb from Agilent 33250A?

    I used Lv6.1 and ag33xxx.llb (download from NI web page). And I want to generate Arb waveform from Agilent33250A, this Arb according to an binary stream file, just like 0101110010100011.......
    I used "Getting Started 2.vi" module, to try first, and all setting used default value. Instrument can be remote controlled. But what I can see from oscilloscope is very strange. The waveform is start with several sine wave (at very high voltage even to 40Vpp!!) and then several sine wave (at low voltage), then at about 0v. It is not what I want!
    And, if I changed Frequecy or 0/1 data, NOTHING changed of output waveform.
    On Agilent web site, I found there are some vi examples for Agilent33250A. But I can NOT read it for all vi modules in ag33250a.llb. I'm puzzled about where can I find this file ag33250a.llb.
    I'm not sure what's the problem with "Getting Started 2.vi" module, or anything incorrect of my setting. And I want to know how can I do for my project right now?
    I appreciate the help.

    Thanks, Werner.
    I used Agilent54622D scope to check Agilent33250A output directly via coaxial-cable.
    Firstly, that's my mistake to not change scope setting "Probe scale" to 0.5:1, (default is 10:1).
    Then I opened LV ag33xxx.llb (download on NI web site) --> ag33xxx - Getting Started.vi.  Select "waveform shape" is Sine,  Freq is 1KHz, Amplitude is 1Vpp. Run this vi, I can get correct sine wave from scope. Then select some other waveform, such as square and triangle, all are correct.
    After above, I opened "ag33xxx - Getting Started 2.vi", it is used for Arb function. Run this vi directly, output waveform is in attachment. If I changed Freq, nothing changed of waveform.
    So, I'm puzzled about it. Where the issue is?
    You can use Arb mode successfully. How to do it?
    Regards,
    Yue
    Attachments:
    Arb_op.doc ‏26 KB

  • Error in setting a NULL !

    I am trying to set a NULL in a int column. The column allows nulls and has a foreign key.
    I tried cs.setNull(16,Types.INTEGER), still get this error:
    [IBM][SQLServer JDBC Driver][SQLServer]UPDATE statement conflicted with COLUMN FOREIGN KEY constraint.
    I get another error from Websphere :
    Shareable connection MCWrapper id 2c3c42f1 Managed connection com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl@2bc0c2f1 State:STATE_TRAN_WRAPPER_INUSE from resource jdbc/ds was used within a local transaction containment boundary.
    Any ideeas on how I can get around the foreign key constraint an set a NULL??
    Thanks,
    mihut_m

    I was too close to the monitor, couldn't see the big picture ! :-) Now it works.
    Although, I still get that Websphere error:
    7c7fc721 SharedPool I J2CA0086W: Shareable connection MCWrapper id 31c73d Managed connection comm.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl@2e55c73d State:STATE_TRAN_WRAPPER_INUSE from resource jdbc/ds was used within a local transaction containment boundary.
    It use to work fine, no errors.
    Any ideeas??
    mihut

  • At the time of SOAP message reception DataHandler[] It is set to null.

    It is DataHandler[] to the SOAP message from the Solaris environment. If it is used and a file is appended DataHandler[] which received It is set to null.
    The transmission to Windows from Windows is appended satisfactory. In case a file is appended to a SOAP message, is there any setup peculiar to OS?

    Hello,
    I'm not exactly sure as to your question; Windows works but the same
    code on Solaris fails?
    Concerning using the javax.activation.DataHandler data type, please see
    the docs here [1] and example [2].
    Hope this is of some value,
    Bruce
    [1]
    http://edocs.bea.com/wls/docs81/webserv/implement.html#1074372
    [2]
    http://manojc.com/?sample5
    Kenji Kashiwabara wrote:
    >
    It is DataHandler[] to the SOAP message from the Solaris environment. If it is used and a file is appended DataHandler[] which received It is set to null.
    The transmission to Windows from Windows is appended satisfactory. In case a file is appended to a SOAP message, is there any setup peculiar to OS?

  • Printing: print prepared binary stream with SAPWIN

    Hi .
    We have a lot of different documents(MS Word, MS Excel, TIFF, PDF etc.) stored in DMS.
    Now we need to print them from SAP applications using SAP printers.
    For that we have an external conversion server, that could convert files to any print stream data (PCL, PLC2, PCL5, Postscript, even simple PDF).
    If I use printer with simple device type (e.g. Sapscript driver is HP LaserJet PCL4/PCL5) , I just convert necessary docs into the PCL output, create programmatically a new Spool request with format G_RAW and BIN content and add PCL output to it. And this way works good. But not with SAPWIN device type.
    Does anybody know, if it's possible to print prepared binary stream (PCL, Postscript or other format) using printer with SAPWIN device type? And if yes, how should I create Spool request?
    Thanks in advance.

    Sorry for this up.
    But we still have the problem.
    Any ideas?

  • How do I set up a shared photo stream in iOS7?

    hi
    just upgrade my iPhone4 to iOS7, how do I set up a shared photo stream?
    thanks
    nick

    http://support.apple.com/kb/HT5902

  • QSettings::Sync: filename is null/empty

    Lately, I think: since the big testing-to-current operation, I've been getting error messages like this every time I open an application:
    QSettings::Sync: filename is null/empty
    QSettings::Sync: filename is null/empty
    QSettings::Sync: filename is null/empty
    QSettings::Sync: filename is null/empty
    QSettings::Sync: filename is null/empty
    QSettings::Sync: filename is null/empty
    Sometimes they only show up when I open the program from a console, other times (e.g. with the KDE System Guard), a warning window pops up.
    I see from the Trolltech support site (http://www.trolltech.com/developer/knowledgebase/642/) that this is caused by QSettings not being able to find the settings file, in any of the locations in the path, but it doesn't say which file it's looking for.
    Can anyone help me out here? The programs work without problem, but the error message tells me something is wrong...
    I don't know if it's related, but I've also had problems with making shortcut settings in KMail stay - they seem to be correctly entered in the various config/rc files, but they won't remain - sometimes not from session to session, other times not even for the duration of a single session.

    I have got fixed. http://www.trolltech.com/developer/knowledgebase/642/
    Owner of qtrc in /home/myusername/.qt/qtrc was root
    So eyolf change it to your username if it's same in your case.
    Last edited by Mindaugas (2007-04-21 01:26:10)

  • TS4425 can I set up i cloud photo stream with windows xp?

    Can I set up I cloud photo stream with windows XP

    Welcome to the Apple Support Communities
    iCloud Control Panel is only compatible with Windows Vista, 7 and 8, so you can't use Photo Stream on Windows XP

  • Session State is set to null when tab (from List) is clicked

    Hi Gurus, et al,
    Database: 10g Rel 2
    APEX: 4.1.2
    My application uses a tabbed navigation list to tab through different sections of the form. Each tab issues a doSubmit('tabname');. My application also uses Page 0 for regions that are common to several forms. When I tab through the form (called requisition), the session state for the page items is set to null while the page 0 remains intact. It seems like the doSubmit sets the page items to null. How can I prevent this from happening?
    Also, it still happens on APEX 4.2.1 because I put the application on APEX.ORACLE.COM:
    Workspace: RGWORK
    Application: CSRSR (Application 60220)
    Page: 8
    Username: tester
    Password: test123
    Please follow these steps for this issue to occur
    1. Run application 60220
    2. Select the only choice on the menu (Creative Services Design Requisition (PA 0879))
    3. List of Outstanding Requisitions is displayed
    4. Click the edit icon next to the requisition Project Description is 'zazaza'
    5. Change Date Needed to 3/31/2013
    6. Click on the Project Type tab
    7. All items are null for that tab (project type in the database = 'frame:dec')
    Robert
    http://apexjscss.blogspot.com

    Denes,
    While I appreciate your professional opinion, the issue still remains. I may not have the described the issue clearly. It seems that while the row is initially fetched (source type is only when null), project type and purpose items are not displayed initially with the infomation from the table when the appropriate tab is clicked. For example, while the row contains 'frame:dec' for project type, those checkboxes are checked on on the screen.
    The form is "complex" for the following reasons:
    1. Uses a wizard for new requisitions
    2. Uses tabs for updates
    3. Uses a Modal page to display outstanding requisitions for the user before the form is displayed
    4. Uses common regions (on page 0) with other pages (3 pages uses project information, delivery, requesting department, and chargecode regions.
    5. Authorized approvers popup list are populated
    6. Manual tabular form is used for framing information including collections
    I tried to uses application processes, application computations, package procedures and functions whenever possible.
    SOMEONE, PLEASE HELP!
    Robert
    http://apexjscss.blogspot.com

  • Setting the display to binary

    Does anyone know how to set the CWIMAQViewer Palette to binary using C++? I know how to do it in Visual Basic, but I can't figure it out in C++. I need to do it programatically. Thanks in advance.

    To Set the viewer to binary:
    m_cViewer.GetPalette().SetType(4096);
    I don't know where 4096 is defined...
    To Set the viewer to grayscale:
    m_cViewer.GetPalette().SetType(2048);
    Again, I don't know where this is defined. To get these values I just inserted the line,
    long paletteType=m_cViewer.GetPalette().GetType();
    and ran the debugger to see what it set paletteType to when I changed the palette using the viewer's palette menu.

  • Need some assistance in binary streaming and reading

    Hi,
    altough I studied the examples delivered with LabView (my current version is 6i) I have some challenges to face and I hope someone could help me. This challenges
    may be simple for professionals but I'm not already that experienced. I have an one channel AI input via a DAQ-card (E-series) and I want to write it to a binary file with only the really necessary headers. The data then stored in the binary shall than be displayed after user request to a graph and my client wants to have the possibility to srcoll through the hole stored data to seek some charakteristiks and then mark the area of interest with cursor to move this area to another graph for further analysis. My program is structured in a way that in a whi
    le loop I wait for user interaction i.e. buttons for saving and displaying data. It's for that, that I think I have to split the binary streaming in a sub-Vi that makes the needed preparation and another sub-Vi assosiated to the first that makes the file writuing and thats placed within the loop described above. Maybe I'm with my thoughts on the woodway and someone has better ideas. I tried many things but the result were always frustrating. I would be glad someone could give me some hints based on experience, and not just saying "Look to the delivered examples" as I already read in questions from other users. Thanks for your support.
    Chris

    I think you're going at this in a good way. One issue I see is that you are using version 6i and waiting for user input. Since Event Structures were not available in 6i, you will have to poll for user input and that could make your application slower. An upgrade to 6.1 would help you there.
    Besides that, I like your ideas. If you're sticking with 6i, use a case structure inside your while loop which executes a particular case based upon which button the user pressed. Then, in these cases, call the subVIs which you built. I hope this helps out.
    J.R. Allen

  • [svn:osmf:] 14823: Fix bug where canPause was not set to false for live streams.

    Revision: 14823
    Revision: 14823
    Author:   [email protected]
    Date:     2010-03-17 10:51:40 -0700 (Wed, 17 Mar 2010)
    Log Message:
    Fix bug where canPause was not set to false for live streams.
    Modified Paths:
        osmf/trunk/framework/OSMF/org/osmf/net/NetStreamPlayTrait.as
        osmf/trunk/framework/OSMFTest/org/osmf/elements/TestVideoElement.as

    Thanks for looking at this post. We have resolved the issue for ourselves by working with our DBAs to narrow down where the problem actually started. We found that the particular SQL we were looking at was not the issue. In a chart on a subsequent page (via a click through), we were actually running into where apex was starting to consuming memory but we were catching it later.
    What we found was that when we had a chart query that was SQL containing a pipeline function, the memory usage went up. And within 10 minutes, the server would crawl to a halt. To release the memory, the DBAs would have to bounce the Apex instance. When I changed the query to be a function returning SQL, the problem stopped. I don't know what the correlation was between SQL and moving to a PL/SQL function returning SQL.
    I am not even 100% positive of the pipeline function being the cause. I only know that this started happening about the same time as when I implemented the pipeline function. I understand you are leery of a one-second function/query running up that kind of utilization. No one here believed me either (including me really). We figured it HAD to be a coincidence. But once I changed the query from SQL to a function returning PL/SQL, our problem went away.
    Thanks to all who looked at and thought about this.
    Walter

  • How to make default selected "Set to Null" option in  Prompt screen?

    Hi,
         I have created Report using Bex Query. It has around 20 Optional variables.
        In the Prompt screen for Optional variables it is showing "Set to Null" Check box.
         I want to make this Check box selected by default when we preview. Kindly help me to make this option.
         Thanks for your support in advance.
    Thanks & Regards,
    Shiva

    Hi.
    If you mean on how to set default to date between dashboard prompt there is a Default to part in the prompt.
    Example - SQL Results:
    SELECT min(TIMES.TIME_ID) FROM "Presentation folder"
    SELECT max(TIMES.TIME_ID) FROM "Presentation folder"
    Or you can add repository variable as default for each date (from and to), etc.
    Regards
    Goran
    http://108obiee.blogspot.com

Maybe you are looking for

  • SOA Suite Issue in Oracle Application Server

    Can anyone tell me ? why it says opmctl.exe is not recognized command at sql prompt . let me know please . any help would be highly appreciated . C:\product\10.1.3.1\OracleAS_1>opmctl.exe startall 'opmctl.exe' is not recognized as an internal or exte

  • Error of e-mail configuration (.me) in Outlook 2010

    Hello everybody, I have a ME account previously configurated in Outlook 2010 (according to apple instructions in Support Web Page) for Windows, but, recently, this account had unexpected errors and password have been requested frecuently with out suc

  • JWSDP 1.2

    Hi Folks, I'm trying to get WLS8.1 to work with the latest web services developer pack. In particular I want to use the JAAS (SOAP with attachments) stuff. My servlet fails with method not found exceptions on some of the SOAPMessage stuff. Anyone get

  • OT question re: Firmtek vs Internal

    Good evening all. I have a firmtek SATA card in my DP 2.3 system and a firmtek 4 Drive SATA case running 3 500 GB and 1 150 10k drive which is running all audio files while the 3 500 is running sample libraries. Will I get better audio performance fr

  • Mail App Version 7.0 (1816) all e-Mail download to computer!

    I'm sorry for the broken english. Why dont option "Do not keep any copies messages" Mountain Lion Mail app on an earlier version of 6.0, which had such an option. But the new Mail app on the Mavericks do not have such an option on 7.0. All messages o