Reading data from USB

hello, i dont sure that i am writing in the correct forum but i will try,
i have web camera connecting to my PC, and i want to record video-clip
by java program command, is it possible?
(is their driver,that i have to download first)

You don't need to shout!
You don't need to open three topics for exactly the same question!
This is still not the correct subforum for asking j2se related questions!
For the ISO/BULK question, you should check the USB documentation. I'm betting that the exception has something to do with it!

Similar Messages

  • Problem while reading data  from USB with JSR80

    Hi
    Iam using Fedora 9 with 32 bit.
    Iam using JSR80 api to read the data from USB devices.
    I successfully set-up the code as per given on JSR80 site on my eclipsce ide.
    below is my code which iam using to read data from usb
    import com.ibm.jusb.*;
    import java.util.List;
    import javax.usb.*;
    import java.util.List;
    public class USBReader {
    public static  UsbInterface interf = null;
         public static void main(String[] args) {
              try
            {// Access the system USB services, and access to the root
             // hub. Then traverse through the root hub.
               System.out.println("Application started");
             UsbServices services = UsbHostManager.getUsbServices();
             UsbHub rootHub = services.getRootUsbHub();
             traverse(rootHub);
             testIO(rootHub);
            } catch (Exception e) {
                 System.out.println("The Exception occured"+e.getMessage());
          public static void traverse(UsbDevice device){
               System.out.println("Iam in traverse ");
               if (device.isUsbHub()){  
                    // This is a USB Hub, traverse through the hub.
                    System.out.println("The device is hub");
                    List attachedDevices = ((UsbHub) device).getAttachedUsbDevices();
                    System.out.println("The attached devices size:"+attachedDevices.size());
                    for (int i=0; i<attachedDevices.size(); i++){
                         traverse((UsbDevice) attachedDevices.get(i));
                    if(attachedDevices !=null){
                         for(int j=0;j<attachedDevices.size();j++){
                              System.out.println("The device is"+attachedDevices.get(j));
           else{
              // This is a USB function, not a hub.
              // Do something.
                System.out.println("The device is not hub");
          public static void testIO(UsbDevice device) throws UsbClaimException, UsbNotActiveException, UsbDisconnectedException, UsbException{
               System.out.println("Iam in testIO");
              try{
                 // Access to the active configuration of the USB device, obtain
                 // all the interfaces available in that configuration.
                 UsbConfiguration config = device.getActiveUsbConfiguration();
                 List totalInterfaces = config.getUsbInterfaces();
                 System.out.println("The Total interfaces: "+totalInterfaces.size());
                 // Traverse through all the interfaces, and access the endpoints
                 // available to that interface for I/O.
                 for (int i=0; i<totalInterfaces.size(); i++){
                    interf = (UsbInterface) totalInterfaces.get(i);
                    System.out.println("The interfaces are "+totalInterfaces.get(i));
                    String strinf=interf.getInterfaceString();
                    System.out.println("Claimed Status: "+interf.isClaimed());
                    System.out.println("Active status : "+interf.isActive());
                    System.out.println("Settings :"+interf.getNumSettings());
                    //interf.release();
                    interf.claim();
                    List totalEndpoints = interf.getUsbEndpoints();
                    for (int j=0; j<totalEndpoints.size(); j++){
                       // Access the particular endpoint, determine the direction
                       // of its data flow, and type of data transfer, and open the
                       // data pipe for I/O.
                       UsbEndpoint ep = (UsbEndpoint) totalEndpoints.get(i);
                       int direction = ep.getDirection();
                       int type = ep.getType();
                       UsbPipe pipe = ep.getUsbPipe();
                       pipe.open();
                       // Perform I/O through the USB pipe here.
                       pipe.close();
                    interf.release();
              } catch (Exception e) {
                   System.out.println("Exception in TestIO"+e.getMessage());
                   e.printStackTrace();
    }When i execute the above code i get the following exception
    Exception in TestIOCannot claim an interface on a virtual root hub.
    javax.usb.UsbException: Cannot claim an interface on a virtual root hub.
         at com.ibm.jusb.VirtualRootUsbHubImp$VirtualRootUsbInterfaceOsImp.claim(VirtualRootUsbHubImp.java:143)
         at com.ibm.jusb.os.DefaultUsbInterfaceOsImp.claim(DefaultUsbInterfaceOsImp.java:54)
         at com.ibm.jusb.UsbInterfaceImp.claim(UsbInterfaceImp.java:109)
         at com.ibm.jusb.UsbInterfaceImp.claim(UsbInterfaceImp.java:83)
         at USBReader.testIO(USBReader.java:60)
         at USBReader.main(USBReader.java:15)iam not getting the clue for it .

    Cannot claim an interface on a virtual root hubSo don't do that? I have no idea how to tell, but clearly you need to test a few more attributes before you claim. Or else just log the claim error and continue with the next interface.

  • Help me,  How to read data from USB ???

    Help me, How to read data from USB ???

    If its a disk on key or some portable hard drive than once its connected to the usb and recognized by the system you can access it through java like you would access your hard drive.

  • How to read a data from USB port using JAVA

    hi all,
    i need to know how to read a data from USB port using java. any API are available for java ?.........please give your valuable ideas !!!!!!!!!
    Advance Thanks!!

    You can do this. Please use this link
    [http://www.google.co.in/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=uHu&q=java+read+data+from+usb+port&btnG=Search&meta=&aq=f&oq=]
    What research did you do of your own? Have you done some testing application and tried yourself??

  • Best way to control and read data from multiple instruments?

    Hello,
    I'm building an application to test power supplies involving multiple pieces of equipment over a couple of different comm busses. The application will also send control instructions to some of the instruments, and read data from some of the instruments. The reading and control profiles will not run on the same schedule (variable length control steps, configurable read interval).
    I was thinking of using a queued statemachine (producer/consumer) for the control profile and another to read the data, but I got concerned that there would be collisions between sending control commands and read commands to the same machine. Is there a suggested design pattern for implementing something like this?
    Timing of the commands isn't critical down to the milisecond, but I need to collect reasonably accurate timestamps when the data is read. The same is true for the control commands.
    Here are the instruments I'm going to use, if the are control, read, or both, and the communication method
    Instrument Funtions Comm Method
    Power Supply Read data Communicates to PMBus Adapter
    PMBus to USB Adapter Read data USB (Non-Visa)
    Switch control relays USB (VISA)
    Power Dist. Unit read data/control outlets SNMP (Ethernet)
    Electronic Load read data/control load GPIB (VISA)
    Thermal Chamber read data/control temp Ethernet (VISA)
    Thanks,
    Simon

    Hello, there is a template in LV called "Continuous measurement and Logging".
    It can give you some idea how to properly decouple the "GUI Event handler" top loop (where your Event structure is) from the DAQ and other loops.
    You do not need to totally replicate the above example, but you can find there nice tricks which can help you at certain points.
    The second loop from the top is the "UI message loop". It handles the commands coming from the top loop, and regarding to the local state machine and other possible conditions and states, it can command the other loops below.
    During normal run, the different instrument loops just do the data reading, but if you send a control command from the top loop to a certain instrument loop (use a separate Queue for every instrument loops), that loop will Dequeue the control command, execute it, and goes back to data reading mode (in data reading mode the loop Dequeu itself with a "data read" command automatically). In this way the control and data read modes happen in serial not in parallel which you want to avoid (but I think some instrument drivers can even handle parallel access, it will not happen in really parallel...).
    In every instrument loop when you read a value, attach a TimeStamp to it, and send this timestamp/value couple to the DataLogging loop via a Queue. You can use a cluster including 3 items: Source(instrument)/timestamp/value. All the instrument loops can use the same "Data logging" Queue. In the Datalogging while loop, after Dequeue-ing, you can Unbundle the cluster and save the timestamp and data-value into the required channel (different channel for every instrument) of a TDMS file.
    (Important: NEVER use 2 Event structures in the same top level "main" VI!)

  • Reading Data from SCXI 1600

    Hi Experts,
    I am new to this SCXI Interfacing. Kindly help me in the context
    I am developing an application which is going to be use  SCXI 1125 module and SCXI 1600 controller.In the application I want to allow the user to configure various Task in the front panel. 
    What are the controls needed in the front panel to allow the user to configure Task 
    How to read the data from SCXI 1600,
    How to differentiate eight channel data coming from SCXI 1125 thro SCXI 1600
    Thanks in advance
    Solved!
    Go to Solution.

    True, you cannot simulate the SCXI-1600. This means you will not be able to run your code without the hardware. For simulation purposes you can, however, use another device that would function in a similar manner to the SCXI-1600 in terms of triggering, resolution, and sampling rate.
    As for the programming, you would use DAQmx as I had mentioned. There are no examples that are specific to the SCXI-1600, but you don't really need them. The SCXI-1600 is fundamentally a data acquisition module that happens to be in a SCXI form factor with a USB connection. As far as your software is concerned you will use DAQmx to read data from it. So, take a look at the DAQmx examples that gather data from data acquisition devices.
    Your task will define how many channels you will be reading. Since you are reading a mixture of measurements (temperature, pressure, and possibly just plain voltages) you will need to decide whether to create separate tasks for each of these measurements that are configured to be specific to that measurement type, or to create one task that simply reads all unscaled channel values (i.e. raw voltages) and then you scale the values in your code. If you open the Example Finder and navigate the tree to Hardware Input and Output -> DAQmx -> Analog Measurements you will see categories for the different measurement types. Many of them have graphs. 
    If you have not already done so, you may want to start here: http://zone.ni.com/devzone/cda/tut/p/id/3116

  • Task Sequence failed to restore captured data from USB drive onto a new machine using UDI task requence

    Hi,
    Environment ConfigMgr 2012 R2
    Replace Scenario: Capture data to a USB external drive and Restore it from USB external drive.
    Steps taken:
    1) Created Computer Association with New computer and Source computer
    2) Deployed UDI replace Task Sequence to Source computer and captured data to a USB external drive
    3) Run UDI Task Sequence from Boot Media to Restore data from USB External drive which had the captured data.
    Issue:
    My task sequence failed to restore data from USB external drive.
    Is there a fix
    Any help is greatly appreciated it. 

    I created a query to see the deployment logs in real time. I see the TS fails when running "Request State Store" task. Here are the logs.
    Severity Type Site code Date / Time System Component Message ID Description
    Error Milestone POK 7/22/2014 4:13:15 PM MININT-P6E4T6G Task Sequence Engine 11141 The task sequence execution engine failed execution of a task sequence. The operating system reported error 1: Incorrect function.
    Error Milestone POK 7/22/2014 4:13:15 PM MININT-P6E4T6G Task Sequence Engine 11135 The task sequence execution engine failed executing the action (Error in the task sequence) in the group (Gather Logs and StateStore on Failure)
    with the error code 1  Action output: [ smsswd.exe ] PackageID = '' BaseVar = '', ContinueOnError='' ProgramName = 'cscript "C:\_SMSTaskSequence\WDPackage\scripts\ztierrormsg.wsf"' SwdAction = '0001' Set command line: Run command line Working dir 'not
    set' Executing command line: Run command line Process completed with exit code 1 Microsoft (R) Windows Script Host Version 5.8 Copyright (C) Microsoft Corporation. All rights reserved.  Microsoft Deployment Toolkit version: 6.2.5019.0 The task sequencer
    log is located at C:\WINDOWS\CCM\Logs\SMSTSLog\SMSTS.LOG.  For task sequence failures, please consult this log. ZTI deployment failed, Return Code = 1 Command line returned 1. The operating system reported error 1: Incorrect function.
    Information Milestone POK 7/22/2014 4:13:14 PM MININT-P6E4T6G Task Sequence Engine 11134 The task sequence execution engine successfully completed the action (Copy Logs) in the group (Gather Logs and StateStore on Failure)
    with exit code 0  Action output: ... 扴捡杫潲湵⹤潬⁧潴尠停䭏偃䍓䵃卐㄰䍜彍潓牵散尤协屄潌獧䍜剏ⵐ䠳䑗塐就瑺獩瑥慢正牧畯摮氮杯潃祰湩⁧㩃坜义佄南䍜䵃䱜杯屳䵓呓䱓杯穜楴慴潴⹯潬⁧潴尠停䭏偃䍓䵃卐㄰䍜彍潓牵散�潌獧䍜剏ⵐ䠳䑗塐就潃祰湩⁧㩃坜义佄南䍜䵃䱜杯屳䵓呓䱓杯作䑓敓畴坰穩牡⹤潬⁧潴尠停䭏偃䍓䵃卐㄰䍜彍潓牵散尤协屄潌獧䍜剏ⵐ䠳䑗塐就协卄瑥灵楗慺摲氮杯潃祰湩⁧㩃坜义佄南停湡桴�潬⁧潴尠停䭏偃䍓䵃卐㄰䍜彍潓牵散尤协屄潌獧䍜剏ⵐ䠳䑗塐就慐瑮敨屲湕瑡整摮䍇潃祰湩⁧潬⁧㩃坜义佄南䍜䵃䱜杯屳䵓呓䱓杯䉜䑄氮杯挠湯整瑮⁳潴尠停䭏偃䍓䵃卐㄰䍜彍潓牵散尤协屄潌�Console
    > Successfully resized the shadow copy storage association Return code from command = 0 Cleaning up default wallpaper registry keys Process completed with exit code 0 zticopylogs processing completed successfully. Command line returned 0.
    Information Milestone POK 7/22/2014 4:13:07 PM MININT-P6E4T6G Task Sequence Engine 11134 The task sequence execution engine successfully completed the action (Move State Store) in the group (Gather Logs and StateStore on Failure)
    with exit code 0  Action output: [ smsswd.exe ] PackageID = '' BaseVar = '', ContinueOnError='' ProgramName = 'cscript.exe "C:\_SMSTaskSequence\WDPackage\scripts\ztimovestatestore.wsf"' SwdAction = '0001' Command line for extension .exe is "%1" %* Set
    command line: Run command lineWorking dir 'not set' Executing command line: Run command line Process completed with exit code 0 Microsoft (R) Windows Script Host Version 5.8 Copyright (C) Microsoft Corporation. All rights reserved.  Microsoft Deployment
    Toolkit version: 6.2.5019.0 The task sequencer log is located at C:\WINDOWS\CCM\Logs\SMSTSLog\SMSTS.LOG.  For task sequence failures, please consult this log. ztimovestatestore processing completed successfully. Command line returned 0.
    Information Milestone POK 7/22/2014 4:13:07 PM MININT-P6E4T6G Task Sequence Engine 11134 The task sequence execution engine successfully completed the action (Gather) in the group (Gather Logs and StateStore on Failure) with
    exit code 0  Action output: ... (BIOS is 'DELL   - 1072009'). Property IsVM is now = False Finished getting virtualization info Connection succeeded to MicrosoftVolumeEncryption There are no encrypted drives Property IsBDE is now = False Processing
    the  phase. Determining theINI file to use. Using COMMAND LINE ARG: Ini file = CustomSettings.ini Finished determining the INI file to use. Added new custom property MYCUSTOMPROPERTY Using from [Settings]: Rule Priority = DEFAULT ------ Processing the
    [DEFAULT] section ------Process completed with exit code 0 ------ Done processing CustomSettings.ini ------ Remapping variables. Property TaskSequenceID is now =  Property DeploymentType is now = NEWCOMPUTER Finished remapping variables. ZTIGather processing
    completed successfully. Command line returned 0 ReleaseSource() for C:\_SMSTaskSequence\Packages\POK0000F. reference count 1 for the source C:\_SMSTaskSequence\Packages\POK0000F before releasing Released the resolved source C:\_SMSTaskSequence\Packages\POK0000F.
    Information Milestone POK 7/22/2014 4:13:03 PM MININT-P6E4T6G Task Sequence Engine 11130 The task sequence execution engine skipped the action (Use Toolkit Package) in the group (Gather Logs and StateStore on Failure) because
    the condition was evaluated to be false.
    Information Milestone POK 7/22/2014 4:13:02 PM MININT-P6E4T6G Task Sequence Engine 11134 The task sequence execution engine successfully completed the action (Set Error Code) in the group (Gather Logs and StateStore on Failure)
    with exit code 0  Action output: Finished with error code 0.
    Information Milestone POK 7/22/2014 4:13:02 PM MININT-P6E4T6G Task Sequence Engine 11124 The task sequence execution engine started the group (Gather Logs and StateStore on Failure).
    Information Milestone POK 7/22/2014 4:13:02 PM MININT-P6E4T6G Task Sequence Engine 11122 The task sequence execution engine skipped the group (Cancelled Wizard Group) because the condition was evaluated to be false.
    Error Milestone POK 7/22/2014 4:13:02 PM MININT-P6E4T6G Task Sequence Engine 11135 The task sequence execution engine failed executing the action (Connect to State Store) in the group (State Restore) with the error code 1 
    Action output: ... ( 0x80070035 ) , trying to connect without username.  The network path was not found.  Unable to connect to
    \\3807000000100000000000:\2fa390ff58558b49c45bf204dfa5717f.  Sleeping for 15 seconds. Unable to connect to share: The network path was notfound. ( 0x80070035 ) , trying to
    connect without username.  The network path was not found.  Unable to connect to
    \\3807000000100000000000:\2fa390ff58558b49c45bf204dfa5717f.  Sleeping for 20 seconds. Unable to connect to share: The network path wasnot found. ( 0x80070035 ) , trying to
    connect without username.  The network path was not found.  Unable to connect to
    \\3807000000100000000000:\2fa390ff58558b49c45bf204dfa5717f.  Sleeping for 25 seconds. Process completed with exit code 1 ERROR - Unable to map a network drive to
    \\3807000000100000000000:\2fa390ff58558b49c45bf204dfa5717f. Unable to connect to 563807000000100000000000:\2fa390ff58558b49c45bf204dfa5717f ZTI ERROR - Non-zero return code by ZTIConnect,
    rc = 1 Command line returned 1. The operating system reported error 1: Incorrect function.
    Warning Milestone POK 7/22/2014 4:11:46 PM MININT-P6E4T6G Task Sequence Engine 11138 The task sequence execution engine ignored execution failure of the action (Request State Store) in the group (State Restore).
    Error Milestone POK 7/22/2014 4:11:46 PM MININT-P6E4T6G Task Sequence Engine 11135 The task sequence execution engine failed executing the action (Request State Store) in the group (State Restore) with the error code 16389 
    Action output: ... etting Media Certificate. Sending request to MP
    http://abcdefg.xyx.xyz.local. Setting message signatures. Setting the authenticator. CLibSMSMessageWinHttpTransport::Send: URL: abcdefg.xyx.xyz.local:80  CCM_POST /ccm_system/requestRequest was successful. migInfoRequestMessage.DoRequest (m_sResponse,true),
    HRESULT=80004005 (e:\nts_sccm_release\sms\client\osdeployment\osdsmpclient\smpclient.cpp,1098) pClientRequestToMP->DoRequest(), HRESULT=80004005 (e:\nts_sccm_release\sms\client\osdeployment\osdsmpclient\smpclient.cpp,2778) ExecuteRestoreRequestToMP(migInfoFromMP),
    HRESULT=80004005 (e:\nts_sccm_release\sms\client\osdeployment\osdsmpclient\smpclient.cpp,2903) ExecuteRestoreRequest(), HRESULT=80004005 (e:\nts_sccm_release\sms\client\osdeployment\osdsmpclient\main.cpp,84) OSDSMPClient finished: 0x00004005 reply from server
    is 'NoReply' ClientRequestToMP::DoRequest failed (0x80004005). ExecuteRestoreRequestToMP failed (0x80004005). ExecuteRestoreRequest failed (0x80004005).. The operating system reported error 1: Incorrect function.

  • Reading data from mlx90129 rfid tag chip by using spi communication with labview?

    Hi,
     i have evb90129 evalution board in that mlx90129 chip and external memory (cat25128) and three external sensors are there, i am logging data from chip by using rfid reader it ok i am reading. at the same time i configured spi communication and  i am trying to read data i am reading data from internal memory not from external memory i tried but i didnt suceed , now can i use labview to read data from mlx chip and external memory. for spi communication i am using sparkfunction atmega168 microcontroller and also i have spi to usb cable? now can i communicate or i required any devies? is it possible?
    thanks in advance,
    biji.

    I suspect the culprit to be the first parameter to your function actually. Calling another function requires the caller to allocate any buffer with a big enough size for the function to write something into. Allocate that array by using Initialize Array with U8 as type and the correct number as size. Pass this size also as read_length. While your code doesn't make use of this I think the third parameter to your function is either wrong or unnecessary.
    As you use it now it is really nothing more than a local stack variable which you could declare inside the fucntion just as well. On the other hand what you probably want to do is have a function prototype like:
    extern "C" _declspec(dllexport) unsigned char read_Sensor(unsigned *char read_data, unsigned long read_length, unsigned long *byte_transfered);
    But you will have to do some modifications in your C code to support that parameter correctly.
    That all said, doing the same in LabVIEW using VISA functions would have been done with about two VISA nodes, no DLL headaches and probably already long ago working.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Slow Wifi speed when transfering data from USB drive?

    Hello guys,
    Am I the only one to get slow WiFi speed when transfering data from USB disks or keys?
    This is the new Mac Mini July 2011 (Macmini5,2)
    Intel Core i7, 2.7 Ghz
    8 Go 1333 MHz DDR3
    Mac OS X Lion 10.7 (11A2061)
    Thanks
    Nicolas.

    Hello again,
    I'm also having this issue when using a Bluetooth Magic Mouse when downloading file. Is it a problem with the firmware or the BUS?
    Anyone have the same issue?
    Thanks
    Nicolas.

  • View Object to read data from a java file

    Hi,
    I am using JDeveloper 11.1.1.4 and ADF-BC in my application.
    For one of my view objects , I want the data to be read from a java file which exposes some method to return a collection.
    I cannot use a static view object in this case.
    Please suggest the best way to implement this requirement.Basically build a view object that should read data from a java file.
    Thanks,
    Praveen

    Depending on your use case you can either use a programmatic VO or directly expose the JV class as a data control.
    http://docs.oracle.com/cd/E18941_01/tutorials/jdtut_11r2_36/jdtut_11r2_36.html

  • Read data from SAP R/3 Class-System

    Hello,
    first of all sorry when I posted this into the wrong subforum, but I wasn't sure about that. My Question is how to read data from the Classystem I have specified in my ABAP report.
    The goal is to read data from my individual class-system as well as data from MM and write them to a table that is to be read by another report. But right now I can't find information about the class system and abap. Maybe you know some tutorials or blogs about right that topic you can suggest?

    What class system have you specified in your report?
    Normally a class can be used by declaring a variable of type of the class in question, if this class can be instantiated this is. If your class can't be instantiated, but it has only class methods, you can call this method directly.
    But there is a lot more to this ABAP Object Oriented Programming, than just this short explanation. Search on SDN for some ABAP OO Tutorials.
    some links:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c3/225b5654f411d194a60000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b6cae890-0201-0010-ef8b-f970a9c41d47
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/1591ec90-0201-0010-3ba8-cdcd500b17cf
    Transacation ABAPDOCU.

  • Can not read data from URL!

    Hello,
    I want to read data from URL (http://84.100.130.82:8000/;stream.nsv). But can not do it. Because when try to call function openDataInputStream() shows this error: java.io.IOException: response does not start with HTTP it starts with: ICY. How I can fix this bug?
    HttpConnection c = null;
    InputStream is = null;
    OutputStream os = null;
    StringBuffer b = new StringBuffer();
    String           response,
    responseLitle;
    c = (HttpConnection)Connector.open(&#8220;http://84.100.130.82:8000/;stream.nsv&#8221;);
    os = c.openOutputStream();
    os.flush();
    is = c.openDataInputStream();     // ERROR CODE HERE
    int ch;
    // receive output
    while ((ch = is.read()) != -1)
    b.append((char) ch);
    response = b.toString();Regards, Ramunas

    Hi, I�m trying to do the same as above, get MP3 from a Shoutcast server.
    I got the same fault ("response does not start with HTTP it starts with: ICY") when I tried to open an HttpConnection as bellow:
    ============================================
    HttpConnection conn = (HttpConnection) Connector.open("http://64.236.34.196/stream/1074");
    Then I tried to open a socket connection as bellow:
    ======================================
    SocketConnection conn = (SocketConnection) Connector.open("socket://64.236.34.196:80");
    String get = "GET /stream/1074 HTTP/1.1";
    DataOutputStream os = conn.openDataOutputStream();
    os.writeUTF(get);
    InputStream is = conn.openInputStream();
    But then I got the following error:
    =========================
    java.lang.SecurityException: Target port denied to untrusted applications
    Could someone help me to find out what is going on?
    Thanks a lot!

  • Read data from excel sheet and then perform the required operations.

    Hi all
    I need to write a procedure which can read data from excel sheet.I have excel sheet in which i have to options one is modification and other is addition.so if it reads modification then i need to read the concerned table name then check its availability in pl-sql datbase.If table exists then reading the realated column in that row to fire the querry. The excel sheet is saved in local disk c.
    can anybody help me with this.How i need to start specialy to read the data from excel sheet saved in local disk c.
    Edited by: user13334062 on Jun 30, 2010 3:45 AM

    Hi
    If you can convert the excel to a csv format, then it can be simply query from DB Creating Oracle External Tables. Best part is that you may still change the CSV using EXCEL.
    Following action Points can be adopt;
    *1. Convert Excel File to a csv. File Save as CSV*
    *2. Create Oracle Directory* ( This has to be the location of your excel file )
    SQL> Create directory mydir as 'C:\testdb'; --- "testdb" is the location folder in win for your excel sheet.
    *3. Create the External Table*
    SQL> create table my_ext_tab (
    Field1 Datatype,
    Field2 Datatype,
    Field3 Datatype,
    Field4 Datatype,
    Field5 Datatype
    Organization external
    (type oracle_loader default directory mydir
    access parameters (records delimited by newline fields terminated by ',')
    location ('my_ext_tab.csv'))
    reject limit 100;
    *4. Now you can query the table "my_ext_tab"*
    Select * from "my_ext_tab";
    Please avoid the reformat the data column inside the spreadsheet (CSV).

  • Without loops how can i read data from associative Array??

    Hi all,
    I am facing scenario like...
    i need to read data from associative array  without using loops is it possible,
    CREATE OR REPLACE PACKAGE BODY test_pkg IS
        TYPE t1 IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
       -- in array we can expect more than one row or sometimes no data also.
      FUNCTION test1(vt1 T1 DEFAULT CAST(NULL AS t1)) RETURN NUMBER IS
      BEGIN
        -- basically in array we'll get data of column2
        -- this loop should satisfies table1.colum2 = nvl(NULL, table2.colum2 )if array is null.
        -- if array is not null then only compare with array values
        FOR i IN (SELECT t1.colum1,t1.column2
                         FROM table1 t1, table1 t2
                              WHERE t1.colum1 = t2.column1
                                AND t1.colum2 = nvl(vt1, t2.colum2)
          LOOP
            generateTEXT(i.colum1, i.colum2);
         END LOOP;
      END test1;
    END test_pkg;
    in table1 we have date like...
    colum1          column2
    Jan                  1
    Feb                  2
    Mar                  3
    if i call select test_pkg.test1(1) from dual then output should
    be Jan..
    and
    select test_pkg.test1(null) from dual then it should display all elements from table1.
    Jan                  1
    Feb                  2
    Mar                  3,
    Thanks for your quick replay..

    i need to read data from associative array  without using loops is it possible,
    No - you would need to create a SQL type and then use the TABLE operator to unnest the collection.
    create or replace TYPE my_nums IS TABLE OF INTEGER;
    DECLARE
    --  TYPE my_nums IS TABLE OF PLS_INTEGER INDEX BY PLS_INTEGER;
      v_nums my_nums := my_nums(1, 2, 3);
      v_total number;
    BEGIN
      select sum(column_value) into v_total from table(v_nums);
      DBMS_OUTPUT.PUT_LINE
        ('Sum of the numbers is ' || TO_CHAR(v_total));
    END;
    Sum of the numbers is 6

  • Read data from a Stored Procedure in Android

    I have a Stored Procedure say CustOrdersDetail. I have created a MBO for it in the workspace and deployed it on SAP Mobile Server. I am unable to read data from the stored procedure in code of the Android Application. If I pass a default load argument, then I am able to read data using findAll method. How to get the data from the stored procedure by passing it an argument in the Android Code ?
    Message was edited by: Abhijit Kadam

    Currently I am trying to call the stored procedure and retrieve the results. The stored procedure accepts 'orderId' as an argument and fetches the Product and Order Details.

Maybe you are looking for

  • File Receiver Adapter - writes empty message although ignore flag is set

    Hi, i have an file FTP receiver channel configured with content conversion. I also have set the "Empty-Message-Handling" flag to "Ignore", so empty messages with 0 kb are not written to the FTP server. My problem is now: empty file are written to FTP

  • Presence of multiref tag in soap response message

    We are having a problem when we try to call a web service in PI. The web services called is provided by an Axis server. We tried to use the plain HTTP protocol in the definition of the communication channel as shown here: Adapter type: SOAP Transport

  • SSI Status Number Range (0-9)

    Hi, In J1ID at vendor excise details u can find SSI Status. in the dropdown there is valid number range 0 to 9. There is no description about this number ranges. Can anyone please let us know that what this 0 to 9 means individually? Plz guide...

  • Serial Number overlapping in PRD server

    Hi Friends,              In DEV Server the program is working fine. But in PRD Server, the serial no of the last digit is getting interchanged when taking print out! How to solve this issue? Regards, K.S.Kannan. Edited by: kannan ks on Nov 18, 2008 1

  • How to open an Existing Excelsheet template and fill it will Data

    Hi All, I want to open an Existing Excelsheet template present on my Application or Presentation Server. And then i want to fill this sheet with data present in the system. How can i acheive this target. Is it possbile by using OPEN DATASET or do we