Sales Api Is not working After Intializing(Please help it's urgent)

Hi all,
When i am executing an sales api to create lead in sql+ it s executing fine,but when i am executing the same api after intializing in SQL+ or in concurrent request,it is troughing an error like
AS_SALES_MEMBER_PVT Using Fn....
Please help Me and also look into the code...
DECLARE
q_sales_lead_id NUMBER (8);
q_sales_lead_line_out_tb VARCHAR2 (300);
q_sales_lead_cnt_out_tbl VARCHAR2 (500);
q_return_status VARCHAR2 (10);
q_msg_count NUMBER (10);
q_msg_data VARCHAR2 (800);
a_return_status VARCHAR2 (10);
a_msg_count NUMBER (10);
a_msg_data VARCHAR2 (800);
q_noteid NUMBER (4);
x_sales_lead_line_out_tbl as_sales_leads_pub.sales_lead_line_out_tbl_type;
x_sales_lead_cnt_out_tbl as_sales_leads_pub.sales_lead_cnt_out_tbl_type;
l_sales_lead_rec as_sales_leads_pub.sales_lead_rec_type;
l_sales_lead_line_tb1 as_sales_leads_pub.sales_lead_line_tbl_type;
v_party_id NUMBER (10);
v_resource_id NUMBER (10);
v_group_id NUMBER (10);
v_person_id NUMBER (10);
v_org_id NUMBER (10);
v_customer_id NUMBER (10);
v_primary_application VARCHAR2 (150);
v_secondary_application VARCHAR2 (150);
v_lead_provider_type VARCHAR2 (150);
v_nomenclature_final VARCHAR2 (150);
v_segment VARCHAR2 (150);
v_nomenclature VARCHAR2 (150);
v_nomenclature_1 VARCHAR2 (150);
v_segment_1 VARCHAR2 (150);
v_fleet_mix VARCHAR2 (150);
v_category_set_id NUMBER (10);
v_category_id NUMBER (10);
e_msg VARCHAR2 (500);
v_party_name VARCHAR2(150);
out_param VARCHAR2(150);
CURSOR c1 IS
SELECT a.*, ROWID
FROM al_vendor_sms_crmlead_in a
WHERE a.msg_flag = 'N' AND a.customer_code IS NOT NULL
AND a.models IS NOT NULL
AND a.fleet_mix IS NOT NULL
AND a.segments IS NOT NULL
AND a.lead_provider IS NOT NULL
AND a.secondary_app IS NOT NULL
AND a.cp_mobile_no IS NOT NULL
AND a.id='L';
BEGIN
For i in c1 LOOP
BEGIN
out_param :='phone validation';
SELECT ppf.party_id
INTO v_party_id
FROM per_phones pp, per_all_people_f ppf
WHERE ppf.person_id = pp.parent_id
AND pp.phone_type = 'M'
AND pp.phone_number = i.cp_mobile_no
               and rownum<=1;
out_param:='Resource_invalid';
SELECT jtf.resource_id, jtm.GROUP_ID, jtf.source_business_grp_id,
jtf.source_id
INTO v_resource_id, v_group_id, v_org_id,
v_person_id
FROM apps.jtf_rs_resource_extns jtf, apps.jtf_rs_group_members jtm
WHERE jtf.resource_id = jtm.resource_id
AND jtf.end_date_active IS NULL
AND jtm.delete_flag = 'N'
AND jtf.user_name NOT LIKE 'ALM%'
--AND jtf.attribute5='Sales'
AND jtf.person_party_id = v_party_id
AND ROWNUM <= 1;
out_param:='Party_invalid';
SELECT party_id,party_name
INTO v_customer_id,v_party_name
FROM apps.hz_parties
WHERE status = 'A' AND party_number = i.customer_code;
out_param:='Sec_prim_application_invalid';
SELECT parent_flex_value_low, flex_value
INTO v_primary_application, v_secondary_application
FROM apps.fnd_flex_values_vl
WHERE parent_flex_value_low IN (
SELECT flex_value
FROM apps.fnd_flex_values_vl
WHERE flex_value_set_id = 1009667
AND enabled_flag = 'Y')
AND enabled_flag = 'Y'
AND TO_NUMBER (TRUNC (SUBSTR (attribute1, 1, 2))) =
i.secondary_app ;
out_param:='Segment_map_invalid';
SELECT Upper(REPLACE (regexp_replace (i.models, '(\s*[[:punct:]])'), ' '))
INTO v_nomenclature
FROM DUAL;
SELECT flex_value
INTO v_nomenclature_final
FROM apps.fnd_flex_values_vl
WHERE flex_value_set_id = 1009798
AND enabled_flag = 'Y'
AND end_date_active IS NULL
AND REPLACE (regexp_replace (flex_value, '(\s*[[:punct:]])'), ' ') =
v_nomenclature
AND ROWNUM <= 1;
SELECT flex_value
INTO v_segment
FROM apps.fnd_flex_values_vl
WHERE flex_value_set_id = 1009632
AND enabled_flag = 'Y'
AND end_date_active IS NULL
AND TO_NUMBER (TRUNC (SUBSTR (flex_value, 1, 2))) = i.SEGMENTS;
SELECT ffvh.flex_value, ffv.flex_value
INTO v_nomenclature_1, v_segment_1
FROM apps.fnd_flex_values_vl ffvh, apps.fnd_flex_values_vl ffv
WHERE ffv.flex_value = ffvh.parent_flex_value_low
AND ffvh.enabled_flag = 'Y'
AND ffv.flex_value_set_id = 1009632
AND ffv.enabled_flag = 'Y'
AND ffvh.flex_value_set_id = 1009798
AND ffvh.parent_flex_value_low = v_segment
AND ffvh.flex_value = v_nomenclature_final;
out_param:='Lead_provider_invalid';
SELECT flex_value
INTO v_lead_provider_type
FROM apps.fnd_flex_values_vl
WHERE flex_value_set_id = 1009718
AND end_date_active IS NULL
AND TO_NUMBER (TRUNC (SUBSTR (flex_value, 1, 2))) =
i.lead_provider;
out_param:='vehicle_res_invalid';
SELECT lookup_code
INTO v_fleet_mix
FROM apps.fnd_lookup_values_vl
WHERE lookup_type = 'VEHICLE_RESPONSE_CODE'
AND enabled_flag = 'Y'
AND TO_NUMBER (TRUNC (SUBSTR (description, 1, 2))) = i.fleet_mix;
out_param:='Category_invalid';
SELECT mic.category_set_id, mic.category_id
INTO v_category_set_id, v_category_id
FROM apps.mtl_item_categories mic, apps.mtl_categories_tl mc
WHERE mic.category_id = mc.category_id
AND organization_id = 106
AND description = v_nomenclature_final
AND ROWNUM <= 1;
out_param:='api-Error';
l_sales_lead_rec.customer_id := v_customer_id;
l_sales_lead_rec.status_code := 'NEW';
l_sales_lead_rec.attribute15 := v_segment_1;
l_sales_lead_rec.attribute12:=To_Char( i.expected_closedate,'YYYY/MM/DD HH24:MI:SS');
l_sales_lead_rec.attribute10 := v_lead_provider_type;
l_sales_lead_rec.attribute9 := v_secondary_application;
l_sales_lead_rec.attribute8 := v_primary_application;
l_sales_lead_rec.assign_to_salesforce_id := v_resource_id;
l_sales_lead_rec.assign_sales_group_id := v_group_id;
l_sales_lead_rec.assign_to_person_id := v_person_id;
l_sales_lead_rec.vehicle_response_code := v_fleet_mix;
l_sales_lead_rec.description:=v_party_name||' '||v_nomenclature;
l_sales_lead_line_tb1 (1).category_id := v_category_id;
l_sales_lead_line_tb1 (1).category_set_id := v_category_set_id;
l_sales_lead_line_tb1 (1).organization_id := v_org_id;
l_sales_lead_line_tb1 (1).quantity:=1;
as_sales_leads_pub.create_sales_lead
(p_api_version_number => 2.0,
p_init_msg_list => fnd_api.g_false,
p_commit => fnd_api.g_true,
p_validation_level => fnd_api.g_valid_level_full,
p_check_access_flag => 'Y',
p_admin_flag => 'Y',
p_admin_group_id => v_group_id,
p_identity_salesforce_id => v_resource_id,
p_sales_lead_profile_tbl => as_utility_pub.g_miss_profile_tbl,
p_sales_lead_rec => l_sales_lead_rec,
p_sales_lead_line_tbl => l_sales_lead_line_tb1,
p_sales_lead_contact_tbl => as_sales_leads_pub.g_miss_sales_lead_contact_tbl,
x_sales_lead_id => q_sales_lead_id,
x_sales_lead_line_out_tbl => x_sales_lead_line_out_tbl,
x_sales_lead_cnt_out_tbl => x_sales_lead_cnt_out_tbl,
x_return_status => q_return_status,
x_msg_count => q_msg_count,
x_msg_data => q_msg_data);
as_sales_leads_pub.Build_Lead_Sales_Team (
P_Api_Version_Number =>2.0,
P_Init_Msg_List=>FND_API.G_TRUE,
p_Commit=>FND_API.G_TRUE,
p_Validation_Level=> FND_API.G_VALID_LEVEL_FULL,
P_Admin_Group_Id =>v_group_id,
P_identity_salesforce_id=>v_resource_id,
P_salesgroup_id=> v_group_id,
P_Sales_Lead_Id=>q_sales_lead_id,
X_Return_Status=>q_return_status,
X_Msg_Count=>a_msg_count,
X_Msg_Data =>a_msg_data);
IF q_return_status = 'S'
THEN
UPDATE al_vendor_sms_crmlead_in
SET conv_status = 'S'
WHERE unique_identifier = i.unique_identifier AND ROWID = i.ROWID;
ELSE
UPDATE al_vendor_sms_crmlead_in
SET conv_status = 'E' WHERE unique_identifier = i.unique_identifier AND ROWID = i.ROWID;
END IF;
EXCEPTION
WHEN No_Data_Found THEN
UPDATE al_vendor_sms_crmlead_in a
SET a.conv_status = 'ERROR',error_description=out_param
WHERE unique_identifier = i.unique_identifier AND ROWID = i.ROWID;
COMMIT;
END;
UPDATE al_vendor_sms_crmlead_in SET msg_flag='Y' WHERE unique_identifier = i.unique_identifier AND ROWID = i.ROWID;
END LOOP;
END;

Please post this question in the CRM On Demand Integration Development forum.

Similar Messages

  • Bluetooth Driver In Windows 8.1 is Not Working after upgrading please help (pavilion g6 2008Tx)

    Bluetooth Driver In Windows 8.1 is Not Working after upgrading please help (pavilion g6 2008Tx)
    what cAN i do to make it work?please help

    Hi:
    If your model uses a Ralink wireless card, see if installing this bluetooth driver works.
    http://h20565.www2.hp.com/hpsc/swd/public/detail?swItemId=ob_135494_1

  • SA30 USB do not work after reinstall, please help!!

    Hi, my SA30's USB do not work at all after reintalling, I do not have the original CD with the laptop as it is a gift from my mate.... I couldnt find the driver from the website, please could anyone help me???
    I could use the USB mouse but when I plug the external hard disk in, it has no responses, I tried to search for new hardware, it couldnt detect it. Any information would be appreciate, cheers.

    When you instll another OS than the recovery OEM OS you have to install the drivers and tools in a right order!
    This order is on the Tools & Utilities CD in a html file! When you follow these order all hardware should be detect!
    Also you can go to http://eu.computers.toshiba-europe.com and download the drivers
    Bye Hans

  • 5g 30gig iPod not working after update, Please Help!

    I have a 5th gen 30gig iPod and a yesterday I tried to update it. During the update after it shut itself off and started back up the updater froze around 20%. After about two hours of waiting I forced the updater to quit (restarted it with menu/select) and then tried to turn it back on to no avail. So right now the iPod is dead.
    I've tried the whole hold menu/select to reset (even for up to a min) then I did the flip hold on and off and try again method. I also tried with the iPod plugged into my PC and my Mac. I also tried using the AC adapter. All attempts resulted in failure. Because it stopped working after the update I'm confident that it isn't the battery or that the iPod is physically damaged and that this is just a software issue.
    Any help would be greatly appreciated. I've had the iPod for a little over a year and therefore have no warranty for it.

    I am having the same exact problem as you, it just won't boot up. The apple logo lights up on the screen for a little while and tried to boot up, then the screen goes black, and it starts over, the ipod trying,(and failing)to boot up. This goes on like this until the battery is dead. I'll repost if I figure out how to fix this.

  • I recently downloaded iMovie on my iPhone 5 and it is telling me to connect to wifi or use itunes to download iMovie well I have done both and it is still not working can someone please help me?

    I recently downloaded iMovie on my iPhone 5 and it is telling me to connect to wifi or use itunes to download iMovie well I have done both and it is still not working can someone please help me?

    Hi troy157,
    I'm sorry you are having issues with the iMovie app you purchased for your iPhone5.
    The first thing I would suggest is to log out of your iTunes Account on your iPhone, turn the iPhone off and then on again, and see if app finishes downloading/updating.
    Settings > iTunes & App Stores > Tap on your Apple ID account > Tap Sign Out
    If the issues persists, the article below will give you a few more troubleshooting steps:
    iOS: Troubleshooting applications purchased from the App Store
    Try the following steps to resolve your issue, testing the app after each step.
    1. Update your device software
    Update your device to the latest version of iOS.
    2. Check for app updates
    Ensure that your apps are up to date:
    Open the App Store and tap Updates. If updates are available, tap Update All.
    When prompted, enter your iTunes Store account information. App Store will then download and install the application updates.
    Note: Some applications may require a Wi-Fi connection to update.3. Install another app from the App Store
    4. Restart the application
    If the issue affects only a single app, try closing just that app:
    Press the Home button to return to the Home screen.
    Double-tap the Home button to display recent apps.
    Tap and hold the affected app until the red minus appears.
    Tap the red minus to quit the app.
    Press the Home button, then restart the app.
    5. Restart your device
    Hold the Sleep/Wake button until "slide to power off" appears. Slide to power off your device. When it is off, press the Sleep/Wake button to turn it back on.6. Reinstall the affected application
    Remove the application from your device and reinstall it.
    Touch and hold any application icon on the Home Screen until the icons start to wiggle.
    Tap the "x" in the corner of the application you want to delete.
    Tap Delete to remove the application and all of its data from your device.
    Press the Home button.
    Go to the App Store.
    Search for the application and then download it again.
    Note: If it is a paid app, ensure you are using the iTunes account you purchased the app with originally. If it is not, you will be charged for the app again. For more information regarding downloading previously purchased items, see this article.
    I hope this information helps ....
    Have a great day!
    - Judy

  • Hello, the 'Save As' dialog box used to allow the backspace button to go up one level in the directory when the focus is in the folder contents box but it does not work any more, please help.

    Hello, the 'Save As' dialog box used to allow the backspace button to go up one level in the directory when the focus is in the folder contents box but it does not work any more, please help. BTW the same 'Save As' dialog in other applications still allow the backspace button to go up one level in the directory.

    cor-el,
    I kept forgetting and procrastinating about following your instructions, since I have internet access only for limited amounts of time and usually I am busy with important tasks when I am.
    Out of the blue, the problem corrected itself (the Save As box started to open full screen, then shrunk down to a normal size and the edges can now be dragged to a custom size).
    Even the copy and paste problem in the filenaming area seems to have been less troublesome lately even though there have been no updates to Firefox in a few weeks.
    Even though I marked the solution as not helpful, the problem has in fact been resolved. I will save the solution instructions in case the issue returns.

  • TS3297 I want to buy the double coins from the game subway surfers! But they told me to contact the itunes support! I don't know why it's not working.. Please help! iPhone 4ss

    I want to buy the double coins from the game subway surfers! But they told me to contact the itunes support! I don't know why it's not working.. Please help! iPhone 4ss

    These are user-to-user forums, you are not talking to Apple here. You can contact iTunes support via this page and ask them why the message is appearing : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then probably Purchases, Billing & Redemption

  • My factory unlocked iphone 4s mms is not working with tmobile, please help...

    my factory unlocked iphone 4s mms is not working with tmobile, please help...

    Check out this link. It should fix the problem
    http://support.t-mobile.com/thread/17918?tstart=0

  • My iTunes, on my computer is not syncing anything at all. We have tried re-downloading it but it does not work. Someone please help me?

    My iTunes, on my computer is not syncing anything at all. We have tried re-downloading it but it does not work. Someone please help me?

    Here:
    iOS: Device not recognized in iTunes for Windows
    or
    iPhone, iPad, iPod touch: Device not recognized in iTunes for Mac OS X

  • Why does iMessages does not work properly ? Please help me ! Its works better with the previous version if compared with the latest iOS

    Why does iMessages does not work properly ? Please help me ! Its works better with the previous version if compared with the latest iOS

    Many, many thanks for both of you Todd and Rick.
    to Rick:
    I suppose you mean the Color Settings in Project Settings as follows:
    - Working Space: None
    - Match Legacy ... Gamma Adjustments checked ON
    But it does not correct the colors in effects. And checking or unchecking Make Movie/Output Module Settings/Color Management/Profile/Preserve RGB does not make any difference.
    to both of you:
    Those parts of the video image that does not have color effects are just fine. In these parts the color is preserved when reimporting to FCP. However, those parts having color effects (except Levels, as decribed earlier) have altered color results. So, only the parts having effects affecting color are misinterpreted in the image area. The mismatch is of course seen in AE, before making the movie.
    What I ment with "Color Management not working properly" is that (instead of "disabling" it) Color Management does not seem to be able to correct this "misinterpretation" or difference in effect handling between AE 6 and 10.
    So, would you have any solution for this problem?
    Again, many thanks for your fast replies!

  • I was trying to put music to my iPhone, but my iTunes don't recognize my iPhone. I tried to restart my iPhone, iMac, reinstalled iTunes..but still not working. can anyone please help?

    i was trying to put music to my iPhone, but my iTunes don't recognize my iPhone. I tried to restart my iPhone, iMac, reinstalled iTunes..but still not working. can anyone please help?

    This forum is for questions from those managing sites on iTunes U, Apple's service for colleges and universities to post educational material in the iTunes Store. You'll be most likely to get help with this issue if you ask in the general iTunes or iPhone forums.
    Regards.

  • Usbs not working very frustrating please help

    My usbs have all stopped working for no reason just after i did my last windows update even with a roll back it still says this error in the picture very frustrating i updated bios on my motherboard and downloaded usb drives but still did not fix the issue
    please help it says unknown usb device(device descriptor failed)whn i plug hard drives in the usb has power but it wont show up on my pc also happens with my keyboard and mouse even after driver re installs please help.

    Hi,
    For this issue,please let us know the error code.
    Meanwhile, I suggest we disable and re-enable the USB controller to check the result.
    This lets the controllers recover the USB port from its unresponsive condition.
    To disable and re-enable the USB controllers, follow these steps:
    1.Press Win+X,and select Device Manager.
    2.Expand Universal Serial Bus controllers.
    Note You might have to scroll down the list to find this item.
    3.Right-click the first USB controller under Universal Serial Bus controllers, and then click Uninstall to remove it.
    4.Repeat step 3 for each USB controller that is listed under Universal Serial Bus controllers.
    5.Restart the computer. After the computer starts, Windows will automatically scan for hardware changes and reinstall all the USB controllers that you uninstalled.
    6.Check the USB device to see whether it is working.
    Regards,
    Kelvin hsu
    TechNet Community Support

  • Number 4 on my wireless keyboard is not working can someone please help

    number 4 on my wireless keyboard is not working can someone please help

    You do know with absolute certainty he, that the mic does not work at all? Have you tried recording a video with sound to test to make sure that the microphone isn't working?
    if you have tried recording a video with sound and that did not work, have you tried any troubleshooting steps at all? Have you looked to see if there is any debris covering the mic? Or do you have a cover that could be interfering with the microphone?
    you can start with a reset of the iPad if you haven't done anything else. Hold down on the sleep and home buttons at the same time, for about 10 seconds, until the Apple logo appears on the screen. When you see the Apple logo on the screen, you can let go of the buttons and let the iPad start up. Try the microphone after the iPad starts up again.
    You could try restoring the iPad to factory settings and see if that recovers the microphone for you.
    Use iTunes to restore your iOS device to factory settings - Apple Support
    It is also possible that you could have a hardware issue which you will not be able to resolve on your own. If you cannot find any other way to get the microphone to work you may end up having to take it to an Apple store and let an Apple genius evaluate the device.

  • VideoFormat.RLE is not working..  please help

    Hi all,
    I am creating AVI file from Bitmap that are compressed(As well as non-compressed) throught RLE Algorithm
    Code makes .AVI file. But this file is not accurate..
    Please help me..
    I am attaching the code with it.
    ========================================================
    package animation;
    import java.io.*;
    import java.awt.Color;
    import java.awt.Dimension;
    import javax.media.*;
    import javax.media.control.*;
    import javax.media.protocol.*;
    import javax.media.datasink.*;
    import javax.media.format.VideoFormat;
    import bmpCreation.BitmapImage;
    public class AviCreator implements ControllerListener, DataSinkListener {
    private Object waitSync = new Object();
    private boolean stateTransitionOK = true;
    private Object waitFileSync = new Object();
    private boolean fileDone = false;
    private boolean fileSuccess = true;
    * A DataSource to read from a list of BITMAP Images
    * turn that into a stream of JMF buffers.
    * The DataSource is not seekable or positionable.
    private class ImageDataSource extends PullBufferDataSource
    private ImageSourceStream streams[];
    ImageDataSource(int width, int height, int frameRate)
    streams = new ImageSourceStream[1];
    streams[0] = new ImageSourceStream(width, height, frameRate);
    public void setLocator(MediaLocator source)
    public MediaLocator getLocator()
    return null;
    * Content type is of RAW since we are sending buffers of video
    * frames without a container format.
    public String getContentType()
    return ContentDescriptor.RAW;
    public void connect()
    public void disconnect()
    public void start()
    public void stop()
    * Return the ImageSourceStreams.
    public PullBufferStream[] getStreams()
    return streams;
    * We could have derived the duration from the number of
    * frames and frame rate. But for the purpose of this program,
    * it's not necessary.
    public Time getDuration()
    System.out.println("dur is " + streams[0].nextImage);
    //return new Time(1000000000);
    return DURATION_UNKNOWN;
    public Object[] getControls()
    return new Object[0];
    public Object getControl(String type)
    return null;
    * The source stream to go along with ImageDataSource.
    private class ImageSourceStream implements PullBufferStream
    final int width, height;
    final VideoFormat format;
    // ColorPalette clrPal;
    float frameRate;
    long seqNo = 0;
    int nextImage = 0; // index of the next image to be read.
    boolean ended = false;
    public ImageSourceStream(int width, int height, int frameRate)
    this.width = width;
    this.height = height;
    // Bug fix from Forums (next line)
    this.frameRate = (float) frameRate;
    System.out.println("FrameRate = " + frameRate);
    format = new javax.media.format.VideoFormat(VideoFormat.RLE,new Dimension(width, height),
                                                           Format.NOT_SPECIFIED,Format.byteArray,frameRate);
    * We should never need to block assuming data are read from files.
    public boolean willReadBlock()
    return false;
    * This is called from the Processor to read a frame worth
    * of video data.
    public void read(Buffer buf) throws IOException
    // Check if we've finished all the frames.
    if (nextImage >= 20)
    // We are done. Set EndOfMedia.
    System.err.println("Done reading all images.");
    buf.setEOM(true);
    buf.setOffset(0);
    buf.setLength(0);
    ended = true;
    return;
    //System.out.println("nextImage := " + nextImage);
    nextImage++;
    byte data[] = null;
    byte data_copy[] = null;
    // Check the input buffer type & size.
    if (buf.getData() instanceof byte[])
    data = (byte[]) buf.getData();
    // Check to see the given buffer is big enough for the frame.
    BitmapImage imgLoaded = new BitmapImage();
    //Note that loadBitmapImage is my own function and works fine.
    imgLoaded.loadBitmapImage("E:/Images/untitled.bmp");
    int nDataLength = imgLoaded.getByteArray().length;
    if (data == null || (data.length<nDataLength-118))
    data           = new byte[ nDataLength - 118];
    Here I am not much sure but I think Bitmap Header will be 118 Bytes.
         //Consider
    data_copy      = new byte[nDataLength];
    buf.setData(data);
    // Bug fix from Forums ( next 3 lines).
    long time = (long) (seqNo * (1000 / frameRate) * 1000000);
    buf.setTimeStamp(time);
    buf.setSequenceNumber(seqNo++);
    ("E:/ApplicationDemo/ApplicationDemo/Compressed.bmp");
    data_copy = imgLoaded.getByteArray();      
    for(int nCount=118;nCount<nDataLength;nCount++)
         data[nCount-118] = data_copy[nCount];
    buf.setOffset(0);
    buf.setLength(nDataLength-118);
    buf.setFormat(format);
    buf.setFlags(buf.getFlags() | Buffer.FLAG_KEY_FRAME);
    * Return the format of each video frame. That will be JPEG.
    public Format getFormat()
    return format;
    public ContentDescriptor getContentDescriptor()
    return new ContentDescriptor(ContentDescriptor.RAW);
    public long getContentLength()
    return 0;
    public boolean endOfStream()
    return ended;
    public Object[] getControls()
    return new Object[0];
    public Object getControl(String type)
    return null;
         @Override
         public void controllerUpdate(ControllerEvent evt) {
         if (evt instanceof ConfigureCompleteEvent
         || evt instanceof RealizeCompleteEvent
         || evt instanceof PrefetchCompleteEvent)
         synchronized (waitSync)
         stateTransitionOK = true;
         waitSync.notifyAll();
         else if (evt instanceof ResourceUnavailableEvent)
         synchronized (waitSync)
         stateTransitionOK = false;
         waitSync.notifyAll();
         else if (evt instanceof EndOfMediaEvent)
         evt.getSourceController().stop();
         evt.getSourceController().close();
         @Override
         public void dataSinkUpdate(DataSinkEvent evt) {
    if (evt instanceof EndOfStreamEvent)
    synchronized (waitFileSync)
    fileDone = true;
    waitFileSync.notifyAll();
    else if (evt instanceof DataSinkErrorEvent)
    synchronized (waitFileSync)
    fileDone = true;
    fileSuccess = false;
    waitFileSync.notifyAll();
         public boolean createAvi(int width, int height, int frameRate, String outputFile){
    // Generate the output media locators.
    MediaLocator oml;
    if ((oml = createMediaLocator(outputFile)) == null)
    System.err.println("Cannot build media locator from: " + outputFile);
    System.exit(0);
    doIt(width, height, frameRate, oml);
              return true;
         * Create a media locator from the given string.
         private static MediaLocator createMediaLocator(String url) {
              MediaLocator ml;
    //          if (url.indexOf(":") > 0 && (ml = new MediaLocator(url)) != null)
    //               return ml;
    //          if (url.startsWith(File.separator))
    //               if ((ml = new MediaLocator("file:" + url)) != null)
    //                    return ml;
    //          else
                   String file =
                        "file:" + /*System.getProperty("user.dir") + File.separator +*/ url;
                   if ((ml = new MediaLocator(file)) != null)
                        return ml;
              return null;
    private boolean doIt( int width, int height, int frameRate, MediaLocator outML) {
    ImageDataSource ids = new ImageDataSource(width, height, frameRate);
    Processor p;
    try
    System.err.println(
    "- create processor for the image datasource ...");
    p = Manager.createProcessor(ids);
    catch (Exception e)
    System.err.println(
    "Yikes! Cannot create a processor from the data source.");
    return false;
    p.addControllerListener(this);
    // Put the Processor into configured state so we can set
    // some processing options on the processor.
    p.configure();
    if (!waitForState(p, Processor.Configured))
    System.err.println("Failed to configure the processor.");
    return false;
    // Set the output content descriptor to QuickTime.
    p.setContentDescriptor(
    new ContentDescriptor(FileTypeDescriptor.MSVIDEO));
    // Query for the processor for supported formats.
    // Then set it on the processor.
    TrackControl tcs[] = p.getTrackControls();
    // for (int i = 0; i < tcs.length; i++) {
    // Format format = tcs.getFormat();
    // if (tcs[i].isEnabled() && format instanceof VideoFormat) {
    //Dimension size = ((VideoFormat)format).getSize();
    //float frameRate = ((VideoFormat)format).getFrameRate();
    //int w = (size.width % 8 == 0 ? size.width :(int)(size.width / 8) * 8);
    //int h = (size.height % 8 == 0 ? size.height :(int)(size.height / 8) * 8);
    // VideoFormat jpegFormat = new VideoFormat(
    // VideoFormat.JPEG_RTP, new Dimension(w, h), Format.NOT_SPECIFIED, Format.byteArray, frameRate);
    /// messageLabel.setText("Status: Video transmitted as: " + jpegFormat.toString());
    //int nLength = tcs.length;
    // System.out.println(nLength);
    Format f[] = tcs[0].getSupportedFormats();
    if (f == null || f.length <= 0)
    System.err.println(
    "The mux does not support the input format: "
    + tcs[0].getFormat());
    return false;
    tcs[0].setFormat(f[0]);
    System.err.println("Setting the track format to: " + f[0]);
    // We are done with programming the processor. Let's just
    // realize it.
    p.realize();
    if (!waitForState(p, Processor.Realized))
    System.err.println("Failed to realize the processor.");
    return false;
    // Now, we'll need to create a DataSink.
    DataSink dsink;
    if ((dsink = createDataSink(p, outML)) == null)
    System.err.println(
    "Failed to create a DataSink for the given output MediaLocator: "
    + outML);
    return false;
    dsink.addDataSinkListener(this);
    fileDone = false;
    System.err.println("start processing...");
    // OK, we can now start the actual transcoding.
    try
    p.start();
    dsink.start();
    catch (IOException e)
    System.err.println("IO error during processing");
    return false;
    // Wait for EndOfStream event.
    waitForFileDone();
    // Cleanup.
    try
    dsink.close();
    catch (Exception e)
    p.removeControllerListener(this);
    System.err.println("...done processing.");
    return true;
    * Block until the processor has transitioned to the given state.
    * Return false if the transition failed.
    private boolean waitForState(Processor p, int state)
    synchronized (waitSync)
    try
    while (p.getState() < state && stateTransitionOK)
    waitSync.wait();
    catch (Exception e)
    return stateTransitionOK;
    * Create the DataSink.
    private DataSink createDataSink(Processor p, MediaLocator outML)
    DataSource ds;
    if ((ds = p.getDataOutput()) == null)
    System.err.println(
    "Something is really wrong: the processor does not have an output DataSource");
    return null;
    DataSink dsink;
    try
    System.err.println("- create DataSink for: " + outML);
    dsink = Manager.createDataSink(ds, outML);
    dsink.open();
    catch (Exception e)
    System.err.println("Cannot create the DataSink: " + e);
    return null;
    return dsink;
    * Block until file writing is done.
    private boolean waitForFileDone()
    synchronized (waitFileSync)
    try
    while (!fileDone)
    waitFileSync.wait();
    catch (Exception e)
    return fileSuccess;

    As I know getSupportedFormats doesn't support BMP files.

  • After pres star, my macbook pro 15inc, making beep sound sevral times, but display remain black, and led light blink, inside fan is runing sounds starup come, but display not working :( any one please help me

    I have mac book pro, 15inch server color, 2008 modal, few days before I was watching movie at the same time I was chating on face book, suddenly my mac stuck so I just tried to force shutdown, by pressing shadown key for 7sec, and after I try to turn on, but nothing comes on display it's black ad if it's off, but laptop fan is on the led is on its heat is as if it's working, after I tried to reset then it's started making beep noses for ten times and again same thing nothing comes on display black, but sounds like fan is on and led blink, please help me

    Hi Aparana.rahul,
    The beeps during the startup of your MacBook Pro indicate that it may need to be serviced. See this article for further information -
    OS X Mavericks: If you hear beeps when your computer starts up
    http://support.apple.com/kb/PH14206
    Note that while the article title says it is for computers running Mac OS X 10.9 Mavericks, the same information applies to other versions.
    Thanks for using Apple Support Communities.
    Best,
    Brett L

Maybe you are looking for

  • OADialogpage:......and code not Executing in if loop..........help me out

    if("linkRepairOrder".equals(pageContext.getParameter(EVENT_PARAM))) String csdRepairNumber=pageContext.getParameter("csdRepairNumber"); oracle.apps.fnd.common.MessageToken tokens[] = { new MessageToken("csdRepairNumber", csdRepairNumber) }; OAExcepti

  • Time Dimension with Hourly base level

    Hi all I need to analyze data at Hour, Day, Month, and Year levels. The data in the fact and dimension tables are at the 'Hour' level with DATE datatype, such as: 02-SEP-10 10:00:00 AM 02-SEP-10 11:00:00 AM To use Time-Series type calculations, I und

  • Adding a panel over other components in the main mxml application

    Hi, I've created a main mxml file that contains,among other things, a button, and another mxml that contains a panel with some options. I want to be able to add that panel to the main mxml OVER all other components in the main mxml file with a mouse

  • Forgot my email address and password for old accou...

    I have forgotten my email address and password for my old skype account. -_-" I made this one so I could post on here. I was wondering if I could get my old account back. The username is kaseynevada. I would greatly appreciate it. And even if you can

  • Newbie Question about InterConnect

    1. We need to exchange data via ftp and in CSV format. It seems that FTP Adapter only workds with XML. Any suggestion on CSV files over ftp? 2. Where can I find document about iStudio SDK and Adapter SDK? I am quite new to InterConnect, I appriciate