Problem with BatchDriver API

I am trying to download a txt file in the workspace of Hyperion.

Follow steps below:

1 has created a batch_driver.cf control file with sub content

file data uploaded with BatchDriver name=sqr^path=/BatchDriver^file=D:\UnxUtils\sqr\sqr.txt^desc=Text ^ go = true ^ keyword = txt

and placed in the D:\UnxUtils\sqr

2. has created a folder in the root directory of Workpsace named BatchDriver

3. on the target server from the navigation

C:\Oracle\Middleware\user_projects\epmsystem1\bin\ReportingAnalysis\SDK

and command executed under

execapi.bat BatchDriver admin Admin123 6800 D:\UnxUtils\sqr\batch_driver.cf D:\UnxUtils\sqr\batch_driver.log localhost

But got the error below

Exception in thread "main" java.lang.NoClassDefFoundError: BatchDriver

Caused by: java.lang.ClassNotFoundException: BatchDriver

in java.net.URLClassLoader$ 1.run(URLClassLoader.java:202)

at java.security.AccessController.doPrivileged (Native Met

at java.net.URLClassLoader.findClass(URLClassLoader.java:)

at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

to Sun.misc.Launcher$appclassloader$ AppClassLoader.loadClass (Launcher.ja

at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

The main class is not found: BatchDriver.  Program ends.

I also tried the execution of rmapi.jar which has BatchDriver.class file using below command

java-jar C:\Oracle\Middleware\EPMSystem11R1\common\raframeworkrt\11.1.2.0\lib\rmapi.jar

had error below

Failed to load the Main-Class manifest attribute

C:\Oracle\Middleware\EPMSystem11R1\common\raframeworkrt\11.1.2.0\lib\rmapi.jar

Highly appreciated your help in this regard

Thank you

Aravind

Aravind

Compile BatchDriver.java using the jc.bat file (or you can compile the regular way) and you should be good to go.

Concerning

Celvin Kattookaran

Tags: Business Intelligence

Similar Questions

  • Problem with user API 5.0 interface components

    Hello!

    I have a problem with the user interface components.

    My application needs of the analogues of the toolbar and PaneManager (as in api 6 and higher) in BB API 5, but I have no idea how to make them.

    Please, need help

    Toolbar can be made with evenlyspacedhorizontalfieldmanager in the Advanced UI package available on the java dev site of bb.

  • problem with the API FileI/O

    I want to download an image and stored in the folder on the SD card, using the API File I / o.

    is not working with blackberry.io.file.saveFile (filePath, blob);

    Here is my code:

    filePath = "file:///store/home/user/myPicture/sample.png"; var

    $.get (url, {function (data)})

    If (data! = null) {blackberry.io.file.saveFile (filePath, data) ;}}

    Alert ("file saved");

    },

    "png");

    I have this Exception:

    java.lang.IllegalArgumentException: invalid type - class java.lang.String running on line 277:

    blackberry.io.file.saveFile(filePath,data);.

    Help me plaiz

    I managed to solve the problem

    I analyzed the api data in blob with gear

    Request.onreadystatechange = {function (callback)}
    If (request.readyState is 4
    (& (request.status == 200 | request.status == 0)) {}

    If {(request.responseBlob)
    Alert ("request." "") "'BLOB');
    blackberry.io.file.saveFile (filePath, request.responseBlob);
    Alert ("file saved");
    } else {}
    Alert ("no request");
    }
    }
    };
    Request.Send (null);
    }

  • Problem with "correspondence with Contact" using BlackBerryContactList API in v4.2.0 Perle

    Hi all

    1. work on (BB Pearl 8100 Simulator) version is v4.2.02.

    2 opportunity BB JDE v4.2.0

    3A signature permissions

    4. the request is:

    I tested Simulator only.

    Opportunity API - BlackBerryContactList.items (strPhoneNumber)

    I have a phone number with "12345", if I said Dáil with the same number with ' 12, 123, 234, 345 "or anything what a game atleast 2 or 3 digits API above that the contact is exist."» It must match when I dail with number '12345' but why is - that behave like that?

    That's the problem with v4.2.0 or do I have to use different APIs

    Please help me on this.

    Here's something that I just created for you, probably does not compile, but you get the idea.

    Note that you must test this code in 4.6, I think that there is a problem experienced with obtaining the phone number - a funny character is inserted in it. You may find reference to this problem if you search around the forum.  But test your code and see what you see.

    I don't understand what you mean by:

    «Note: for the PIMItem, I can spend either MOBILE/HOME/HOME2/WORK/WORK2 something should be to create dynamically PIMItem.»

    Here is the code, no guarantee, I hope useful.

    Enumeration enumerate = bbContactList.items(number);
    BlackBerryContact matchingContact = null;
    
    //iterate through contacts
    while (enumerate.hasMoreElements() && matchingContact == null) {
    
        // Extract all telephone numbers and check these
        BlackBerryContact bbContact = (BlackBerryContact)enumerate.nextElement();
    
        for ( int atrCount = 0; atrCount < bbContact.countValues(BlackBerryContact.TEL); ++atrCount) {
            String numberToMatch = bbContact.getString(BlackBerryContact.TEL, atrCount);
            if ( numberToMatch != null &&
                 numberToMatch.equals(number) ) {
                matchingContact = bbContact;
            }
        }
    }
    

    Edit:

    Adding a "pause:" after "matchingContact = bbContact;" could save some processing too.

  • Problems with the news in bulk Api v2.0

    I recently started using the new bulk Api 2 in order to synchronize the activities of return. However, I came across a couple of major problems with some of the returned data.

    Referencing the docs:

    http://docs.Oracle.com/cloud/latest/marketingcs_gs/OMCBB/index.html#D_Reference/activity-fields.htm%3FTocPath%3DReferenc...

    1. The bounceback, subscribe and unsubscribe activities do not allow a ContactId field to use, while doing other activities. This information must be available, as you can get it from the api REST and Insight reporting. The EmailSend type allows more contact IDs, but it lacks documentation.
    2. Do return the activities of bounceback hard rebounds, not soft. Why? There are also no information that describes the reason for the bounce back for example. "mailbox unavailable" (that you fall into the other api)
    3. There is a serious bug in the information coming back from bouncebacks. Instead of the e-mail address of the recipient, I get the sender e-mail address ([email protected]) on some issues. This effectively makes it unnecessary because without the right email address or id of contact, there is no way, this goes back to original recipient.


    I'm hoping someone will be able to give an overview of these issues. Any help would be with recognition has.

    Thank you

    James Franklin


    fsakr

    TJ fields-Oracle

    Hi James,

    Regarding your questions about activities:

    (1) you are right that ContactId is not currently available to be included in these activities.  We are working on obtaining of their added in a later version.  Email address is available on these activities and can be used to link the activity to a specific contact.

    (2) currently only hard bounces are included.  We are working on adding soft bounces and the reason code in a future release.

    (3) it has not been reported previously, thanks for sharing.

  • Problems with migration from LabVIEW 2012 VBAI 2012.

    Hello.

    Someone had problems with the migration of the VBAI 2012, 2012 to labview?
    I'm filing this disadvantage when use migration in VBAI everything works fine, when I use LabVIEW with 'Vision Acquisition Express' for example, everything works as it should.
     
    The solution I've done has been to work with the control VBAI API and it worked perfectly, but I wonder, if a bug or a known error on this process.

    Thank you.

    Finally, I solved it by installing the "Vision Development Module 2012 SP1". With this update worked correctly migration.

  • Problems with encoder motor switching noise readings

    Hi all

    I wanted to ask advice with a hardware problem which seems to be pretty common.

    Here I describe my request:

    We are controlling an electric actuator for robotics application. We use encoders to take position readings, and we need to perform analog acquisition for other measures (for example, the force measured using strain gauges).

    The problem is:

    In summary, I have problems to properly acquire position readings of a linear encoders quadrature and also a few analog inputs. The cause is the switching noise generated by the drive motor that we use (which is an engine without Stricker of CC Moog BN-23-23).

    Our acquisition platform is an NI PXI-8106 with a PXI-1042 q chassis. We have two possibilities to acquire the signals. We have a multifunction DAQ series NI PXI-6259 M and a FlexRIO NI PXI-7951R with one module DIO NI PXI-6581R.

    The switching noise have a frequency of 30 kHz. In a scope, we see a series of peaks of noise which are present only during a short period of time (approximately 1/10th of the duration of the noise). The rest of the time the noise is not present.

    The Accelnet amplification module that powers the electric motor gives us a clock signal synchronized with the noise (whose frequency is approximately 1/4 frequency noise). This clock signal provides a way to solve the problem of analog acquisition. We can use this clock to make an acquisition stamped with an external clock in LabView connecting the clock on a spit of PFI or FPGA card. But the noise is also corrupt this clock signal (we get an error daqmx us warning of possible defects in the clock signal and also to stop the acquisition). I believe that to solve the problem of encoder we can also solve the problem of the analog acquisition.

    In the encoder readings noise makes our County to counter upward or backward gradually fast enough. We can get an increase in the position of about 10 cm per second with no appreciable movement in the linear actuator.

    It would be a great help if someone could put the solution he uses to solve this problem.

    Thanks in advance for your help,

    jespestana

    PS: I stress my conviction that we have a hardware problem, because we have only bad readings when the electric motor does not work. I am therefore convinced because we have already done reading encoder and analog with the help of other players, such as hydraulic cylinders. So, I think that it is not a problem with our software (of our LabView VI).

    Hi jespestana,

    I don't know why the noise could be the cause of your encoder can increase more slowly...  However I have a suggestion on the map of the M series (6259):

    M-series cards have a digital filter integrated on the lines of the PFI (see the user manual of M series).  Looks like the noise is a series of 3 ~ US of impulses (1/10 to 1/30 kHz).  Of the available filtering frequencies that you can set on your M series is 6,425 US, which must ignore the impulses (high or low) that are less than 6,425 US. You can configure the digital filtering with a property node DAQmx:

    One caveat is that the driver only allows you to configure the digital filtering for entries counter on M Series devices.  For example, you can use a digital filtering directly on your task of encoder, but not for your sample clock HAVE.  A workaround can be found here, which is to set up a dummy counter job to define the PFI filter for your task to HAVE.  If you use the same PFI line for your encoder and the task to HAVE it, you should be able to just set up the PFI filter through the task of the encoder and worry for the workaround.

    Regarding the RIO Flex, I think that you could implement something similar on the FPGA, but I'm probably not the best person to comment on this subject.  It would be probably a lot more work to use the DAQmx API's built-in filtering.

    Best regards

  • Problems with video recording

    Hello

    I have some problems with the video recording on the BlackBerry.

    On the BB 9700 my application crashes when I try to stop recording. The file produced
    the app is empty.
    On BB 9800 I have the same problem unless I have explicitly defined the video resolution, but
    in this case, the resolution of the resulting video is different from what I
    specify (640 x 480 instead of 320 x 240).
    On BB 9300 an application works without problem.

    Here's the example I use:

    //////////////////////////////////////// App.java
    VCR package;

    Import net.rim.device.api.ui.UiApplication;

    public class App extends UiApplication
    {

    Public Shared Sub main (String [] args)
    {
    final App app = new App();
    app.enterEventDispatcher ();
    }

    public App()
    {
    last screen VideoRecorderScreen = new VideoRecorderScreen();
    pushScreen (screen);
    }

    }

    VideoRecorderScreen.java
    VCR package;

    import java.io.IOException;
    import java.util.Timer.
    java.util.TimerTask to import;

    Import javax.microedition.media.MediaException;

    Import net.rim.device.api.ui.UiApplication;
    Import net.rim.device.api.ui.component.Dialog;
    Import net.rim.device.api.ui.container.MainScreen;

    / public final class VideoRecorderScreen extends screen
    {

    Private final int DELAY = 1000;

    Private final String VIDEO_PATH = "file:///SDCard/BlackBerry/videos/video.3gp";
    Private final String VIDEO_ENCODING = "video/3gpp";
    Private final int VIDEO_DURATION = 5000;
    Private final int VIDEO_WIDTH = 320;
    Private final int VIDEO_HEIGHT = 240;

    recorder recorder private;

    Public Sub onDisplay()
    {
    new timer() .schedule (new TimerTask() {}
    public void run() {}
    Start();
    }
    (}, DELAY);
    }

    private void start()
    {
    Exception Exception = null;
    try {}
    This.Recorder = new recorder (this. VIDEO_ENCODING, this. VIDEO_WIDTH, this. VIDEO_HEIGHT);
    This.Recorder.record (this.) VIDEO_PATH);
    } catch (MediaException ex) {}
    Exception = ex;
    } catch (IOException ex) {}
    Exception = ex;
    }

    If (exception! = null) {}
    Warn (exception);
    return;
    }

    new timer() .schedule (new TimerTask() {}
    public void run() {}
    try {}
    VideoRecorderScreen.this.recorder.end ();
    warn ("check");
    } catch (IOException ex) {}
    Warn (ex);
    }
    }
    }, this. VIDEO_DURATION);
    }

    private void warn (Object, object)
    {
    the final String message = String.valueOf (object);
    UiApplication.getApplication () .invokeLater (new Runnable() {}
    public void run() {}
    Dialog.Alert (message);
    }
    });
    }

    }

    Recorder.Java
    VCR package;

    import java.io.IOException;

    Import javax.microedition.media.Manager;
    Import javax.microedition.media.MediaException;
    Import javax.microedition.media.Player;
    Import javax.microedition.media.control.RecordControl;

    public class logger
    {

    Final private player vp;

    private RecordControl rc;

    Recorder of public (encoding String, int w, int h)
    throws MediaException, IOException
    {
    This.VP = Manager.createPlayer ("capture://video?encoding=" + coding
    + '&' + 'Width' + '=' + w
    + '&' + 'height' + '=' + h);
    }

    public void save (String path)
    throws MediaException, IOException
    {
    This.VP.Start ();

    This.RC = this.vp.getControl ("RecordControl") (RecordControl);
    If (this.rc == null) {}
    throw new MediaException ("RecordControl could not be obtained");
    }

    this.rc.setRecordLocation (path);
    this.rc.startRecord ();
    }

    public void end()
    throws IOException
    {
    If (this.rc == null) {}
    throw new IllegalStateException ("RecordControl not initialized");
    }

    this.rc.stopRecord ();
    This.rc.Commit ();

    //
    This.VP.Close ();
    }

    }

    Upgrade to an operating system that has the fix is the only solution I'm aware of, but depending on who may or may not be an option.

  • Problem with PopupScreen.updateLayout)

    Hello guys '

    I have a problem with PopupScreen. I'm doing the cursor on the PopupScreen. This popupScreen includes BitmapField with transparent image. And the main screen is BitmapField larger than the size of the screen. I want to move the cursor (PopupScreen) on the BitmapField.

    You see what I'm doing here. And I found the solution how to move PopupScreen since the last post. Now, I am facing the problem when the cursor (PopupScreen) on the left. In other words, when I move the slider to the left, it is not clear previous position. I don't know why.

    It works fine when moves right.

    And it is not clear the previous, when position moves to the left.

    So, you can see the code that I use.

    import net.rim.device.api.ui.component.*;import net.rim.device.api.ui.container.*;import net.rim.device.api.ui.*;import net.rim.device.api.system.Bitmap;import net.rim.device.api.system.KeyListener;
    
    public class CursorField extends UiApplication {
    
      private InfoPopupScreen progressPopup;    int x = 180;  int y = 120;  ManagedScreen managedScreen;  Bitmap _bitmap1;  Bitmap _bitmap2;  Bitmap _bitmap;   int [] fillTrans = new int[100];
    
      public CursorField() {
    
          _bitmap = Bitmap.getBitmapResource("cursor1.png");        _bitmap1 = Bitmap.getBitmapResource("cursor1.png");       _bitmap2 = Bitmap.getBitmapResource("cursor2.png");
    
          for(int i = 0; i < 100; i++) {         fillTrans[i] = 0xFFFFFF;      }
    
          managedScreen = new ManagedScreen();      pushScreen(managedScreen);    }
    
      private class InfoPopupScreen extends PopupScreen implements KeyListener {
    
          protected void applyTheme() {         //Nothing     }
    
          public boolean keyStatus(int keycode, int time) {         return false;     }
    
          public boolean keyRepeat(int keycode, int time) {         return false;     }
    
          public boolean keyUp(int keycode, int time) {         return false;     }
    
          public InfoPopupScreen(Manager manager){          super(manager);       }
    
          protected boolean navigationMovement(int dx, int dy, int status, int time) {
    
              return true;      }
    
          protected void paintBackground(Graphics graphics) {           graphics.setBackgroundColor(16777215);        }
    
          public void sublayout(int width, int height){         super.sublayout(width, height);           setPosition(x, y);        }
    
          public boolean keyDown(int keycode, int time) {
    
              char key =  net.rim.device.api.ui.KeypadUtil.getKeyChar(keycode, net.rim.device.api.ui.KeypadUtil.MODE_UI_CURRENT_LOCALE);            //To left         if(key == 79 || key == 111) {             x = x - 5;                progressPopup.updateLayout();         }                      if(key == 73 || key == 105) {             x = x + 10;               progressPopup.updateLayout();         }
    
              if(key == net.rim.device.api.system.Characters.ESCAPE) {              this.close();         }         return true;      }
    
          public boolean keyChar(char key, int status, int time) {          return false;     }
    
          public boolean trackwheelRoll(int amount, int status, int time) {         return false;     }
    
          public boolean trackwheelUnclick( int status, int time ) {            return false;     }
    
          public boolean trackwheelClick( int status, int time ) {          super.trackwheelClick(status, time);          return true;      } }
    
      private class ManagedScreen extends MainScreen {      private BitmapField _cursorField;
    
          public ManagedScreen() {
    
              _cursorField = new BitmapField(_bitmap) {             public void paint(Graphics graphics) {                    graphics.setBackgroundColor(16777215);                    super.paint(graphics);                }         };
    
              FlowFieldManager manager = new FlowFieldManager(FlowFieldManager.USE_ALL_HEIGHT | FlowFieldManager.USE_ALL_WIDTH) {               public void paint(Graphics graphics) {                    graphics.setBackgroundColor(16777215);                    super.paint(graphics);                }         };
    
              manager.add(_cursorField);            progressPopup = new InfoPopupScreen(manager);
    
              Bitmap pic = Bitmap.getBitmapResource("background.jpg");          BitmapField picField = new BitmapField(pic);          add(picField);
    
              ButtonField _closeButton = new ButtonField("Push screen", ButtonField.CONSUME_CLICK | ButtonField.FIELD_HCENTER);         _closeButton.setChangeListener(new FieldChangeListener() {                public void fieldChanged(Field field, int context) {                  pushScreen(progressPopup);                }         });
    
              add(_closeButton);        } }
    
      public static void main(String[] args) {      CursorField application = new CursorField();      application.enterEventDispatcher();   }}
    

    I hope you can solve my problem.

    TNX in advance"

    Ttry this...   In paintBackground(), call clear after you set the background color.

  • Problem with the ObjectListField

    Hello

    I have problems with the method getSelectedIndex() ObjectListField.
    Supposedly, when there is no index selected, it returns-1. But how come it always returns the index of the last element?

    To illustrate, I created my own dialog that has similar functionality to the "device window select" Bluetooth BB application. I have an ObjectListField and a Cancel button. What I did simply, is to change the label of the button to show the selected index. I have attached my sample code below.

    public class MyDialog extends dialog
    {
    private ObjectListField m_list;
    private ButtonField m_btn;

    public MyDialog)
    {
    Super ("Select Device:", null, null, 0, Bitmap.getBitmapResource ("bluetoothIcon.PNG"), Manager.FOCUSABLE);

    m_List = new ObjectListField();
    m_btn = new ButtonField ("Cancel", Field.FIELD_HCENTER);
    m_List.set (new String [] {"first", "second"});

    Add (m_List);
    Add (m_btn);
    }

    protected boolean navigationClick (int status, int time)
    {
    m_btn.setLabel (Integer.ToString (m_List.getSelectedIndex ()));

    Returns true;
    }
    }

    Can someone help me on this problem? Is there something wrong with my code, or is the buggy API? All I want to do is to return an index of-1 if there is no selected item in the list.

    Also, I tried the isFocus() method to check if the list is being concentrated, it always returns false even if the list is OBVIOUSLY being focused. I'm running out of options on how to determine the solution to this problem. Help, please!

    Thank you very much.

    @jacylan - I do not use isFocus() to determine if the ListField is net.  Take a look at the following code, I think that with this, you can force-1 when the ListField is not the point.

        protected boolean navigationClick(int status, int time)
        {
            int selectedIndex = m_list.getSelectedIndex();
            boolean listInFocusOption1 = false;
            if ( this.getLeafFieldWithFocus() == m_list ) {
                listInFocusOption1 = true;
            }
            boolean listInFocusOption2 = false;
            if ( m_list.isFocus() ) {
                listInFocusOption2 = true;
            }
            m_btn.setLabel(Integer.toString(selectedIndex) + ":" + listInFocusOption1 + ":" +listInFocusOption2);
    
            return true;
        }
    
  • Problems with GZip &amp; FTP

    Hello

    in my application, I need to send a file compressed using ftp.

    To do this, I used a class initially write to use with J2SE (SimpleFTP)

    I have change for use with RIM API and it work with file bit compressed (like 4 KB) but when I try to send one just a little big (12Ko) I have a problem to decompress: gzip - me to say end of file unexpected.

    It is a bit of cod used:

    //In a thread i create the connection and change to BIN
    ftp.connect(ip, port, user, psw, true, apn, apnUser, apnPsw);
    ftp.cwd(dir);
    ftp.bin();
    
    //here I obtain a csv representation of my object and store it in a //String var
    String csv = r.toCSV();
    
    //this method ask to ftp object to store a ByteArray in the file named //file and i want to zip it and return true if all is ok
    if (ftp.stor(new ByteArrayInputStream(csv.getBytes("UTF-8")),file,true))
    //...do things
    

    the method of object ftp stor have this code:

    /**
     * Sends a file to be stored on the FTP server. Returns true if the file
     * transfer was successful. The file is sent in passive mode to avoid NAT or
     * firewall problems at the client end.
     */
    public synchronized boolean stor(InputStream inputStream, String filename, boolean zipped) throws IOException {
    
        sendLine("PASV");
        String response = readLine();
        if (!response.startsWith("227 ")) {
            throw new IOException("SimpleFTP could not request passive mode: " + response);
        }
        String ip = null;
        int port = -1;
        int opening = response.indexOf('(');
        int closing = response.indexOf(')', opening + 1);
        if (closing > 0) {
            String dataLink = response.substring(opening + 1, closing);
            String[] tokenizer = Functions.splitString(dataLink, ',', -1);
            try {
                ip = tokenizer[0] + "." + tokenizer[1] + "." + tokenizer[2] + "." + tokenizer[3];
                port = Integer.parseInt(tokenizer[4]) * 256 + Integer.parseInt(tokenizer[5]);
            } catch (Exception e) {
                throw new IOException("SimpleFTP received bad data link information: " + response);
            }
        }
        String url = "socket://" + ip + ":" + port + urlParam;
        Logger.log(this, "Try to open passive connection to "+url);
        SocketConnection dataSocket = (SocketConnection) Connector.open(url);
        dataSocket.setSocketOption(SocketConnection.LINGER, 5);
        dataSocket.setSocketOption(SocketConnection.DELAY, 5);
    
        sendLine("STOR " + filename);
    
        response = readLine();
        if (!response.startsWith("125 ")&&!response.startsWith("150 ")) {
            dataSocket.close();
            dataSocket=null;
            throw new IOException("SimpleFTP was not allowed to send the file: " + response);
        }
        Logger.log(this, "Connected to "+url);
    
        OutputStream output;
        if (zipped)
            output = new GZIPOutputStream(dataSocket.openOutputStream(),GZIPOutputStream.COMPRESSION_BEST);
        else
            output = dataSocket.openOutputStream();
    
        byte[] buffer = new byte[512];
        int bytesRead = 0;
    
        while ((bytesRead = inputStream.read(buffer)) != -1) {
            output.write(buffer, 0, bytesRead);
        }
    
        output.flush();
        output.close();
        output = null;
        dataSocket.close();
        dataSocket=null;
    
        response = readLine();
        return response.startsWith("226 ");
    }
    

    The readline() and sendline("") methods read or write to the ftp decision-making, a line ended with CR and I so need to send FTP commands

    I think that everything is ok, for this problem I find in a forum that the problem will be the use of ASCII in FTP method, but I change to BIN

    Any idea?

    Thank you in advance!

    Hello

    Finally, I solved the problem.

    I find the solution in the documentation GZIPOutputStream

    You must pass OutputStream to GZIPOutputStream, zipping it and then you must close GZIPOutputStream but you must use the original OutputStream.

    So in my SimpleFTP class I have to write about gzip, close it then flush() and close() the original outputstream.

    Knit

    I had the new method of stor() here to see

    /**
         * Sends a file to be stored on the FTP server. Returns true if the file
         * transfer was successful. The file is sent in passive mode to avoid NAT or
         * firewall problems at the client end.
         */
        public synchronized boolean stor(InputStream inputStream, String filename, boolean zipped) throws IOException {
    
            sendLine("PASV");
            String response = readLine();
            if (!response.startsWith("227 ")) {
                throw new IOException("SimpleFTP could not request passive mode: " + response);
            }
    
            String ip = null;
            int port = -1;
            int opening = response.indexOf('(');
            int closing = response.indexOf(')', opening + 1);
            if (closing > 0) {
                String dataLink = response.substring(opening + 1, closing);
                String[] tokenizer = Functions.splitString(dataLink, ',', -1);
                try {
                    ip = tokenizer[0] + "." + tokenizer[1] + "." + tokenizer[2] + "." + tokenizer[3];
                    port = Integer.parseInt(tokenizer[4]) * 256 + Integer.parseInt(tokenizer[5]);
                } catch (Exception e) {
                    throw new IOException("SimpleFTP received bad data link information: " + response);
                }
            }
            String url = "socket://" + ip + ":" + port + urlParam;
            Logger.log(this, "Try to open passive connection to "+url);
            SocketConnection dataSocket = (SocketConnection) Connector.open(url);
            dataSocket.setSocketOption(SocketConnection.LINGER, 5);
            dataSocket.setSocketOption(SocketConnection.DELAY, 5);
    
            sendLine("STOR " + filename);
    
            response = readLine();
            if (!response.startsWith("125 ")&&!response.startsWith("150 ")) {
                dataSocket.close();
                dataSocket=null;
                throw new IOException("SimpleFTP was not allowed to send the file: " + response);
            }
            Logger.log(this, "Connected to "+url);
    
            OutputStream output = dataSocket.openOutputStream();
            byte[] buffer = new byte[512];
            int bytesRead = 0;
    
            if (zipped){
                GZIPOutputStream zipOutput = new GZIPOutputStream(output,6, GZIPOutputStream.MAX_LOG2_WINDOW_LENGTH);;
                while (!isAskForAbort() && (bytesRead = inputStream.read(buffer)) != -1) {
                    zipOutput.write(buffer, 0, bytesRead);
                }
                zipOutput.close();
            } else {
                while (!isAskForAbort() && (bytesRead = inputStream.read(buffer)) != -1) {
                    output.write(buffer, 0, bytesRead);
                }
            }
            if (isAskForAbort()){
                abor();
                output.close();
                output = null;
                dataSocket.close();
                dataSocket=null;
                try {
                    setAskForAbort(false);
                } catch (BbException e) {/*nothing to do. Here ftp is conected*/}
                return false;
            }
            output.flush();
            output.close();
            output = null;
            dataSocket.close();
            dataSocket=null;
    
            response = readLine();
            return response.startsWith("226 ");
        }
    

    Thank you much for the help.

  • Problem with BBUI / Web database / asychronous timing: untreated by BBUI.js query in HTML format

    I think I solved most of my problems with getting my data to be used in various functions, etc... but the problem now (which may have been the problem basic all along) is related to the asynchronous nature of the treatment of Web database.

    I get my markup returned as a

    with all the 'data-bb-type' attributes etc, but based on the statements of 'alert' I sprinkled throughout my code, database results are processed after the 'onscreenready' event is over and "ondomready" began.

    I know that if you generate markup for use with BBUI.js, he must enter the screen "" before the screen "" is passed to BBUI.js BBUI can do everything it's the stuff of fantasy for her.

    I tried to make sense, but it escapes me. Maybe someone could point me in the right direction for a good tutorial that explains clearly what is happening behind the scenes, and then I guess I'll have to rip my code share and put back... or at least call functions in a different way or from a different location or use the callbacks more liberally (I'm not exactly clear on the use of reminders either).

    The approach you describe would be necessary in the sense that an asynchronous call in the onscreenready function will allow this function to progress / probably finish and BBUI continue on treatment until you can completely change the elements with the data returned by the database.

    Content, while not ideal, front-loading is a valid route.

    The other option, depending on which time of control you're filling, would wait for ondomready and then use the JavaScript APIs for the control (if any) to be completed after the fact. For example, the ImageList controls have JavaScript APIs to refresh their content with an array of elements, once the element has been created / BBUI-means.

  • Problem with criteria, GPS, with plugins Eclipse Simulator.

    Hello

    I work with Eclipse and I do an application that I use the GPS API.

    My problem is that always the LocationProvider.getInstance (new Criteria()) return null.

    The Simulator model 8830, GPS location is a location's the JDE 4.5.0

    Do I need any specific configuration?

    Thank you.

    It is a problem with the BlackBerry itself Simulator.  You can test the GPS using another Simulator model BlackBerry (for example BlackBerry 8310).

  • Problem with parsing XML with html as part of the node content

    Hi all

    I am facing problem with XML parsin when the node has a HTML content, if the node does not have any html content then it works fine. Similar analysis logic works for Java Standard, but not for the Blackberry API. I have an obligation to remove not HTML content prior to analysis. As that would display in the browser.

                              String xml="" +
                    "<p> Dummy content </p> " +
                    "" +
                    "";
                              DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
                DocumentBuilder dBuilder;
                Document doc;
                bis = new ByteArrayInputStream(xml.getBytes("UTF-8")); 
    
                dBuilder = dbFactory.newDocumentBuilder();
    
                doc = dBuilder.parse(bis);
                doc.getDocumentElement().normalize();
    
                NodeList nList = doc.getElementsByTagName("disclaimer");
    
                Element activeTagElmnt = (Element) nList.item(0);
                NodeList activeTag = activeTagElmnt.getChildNodes(); 
    
                tagValue=((Node) activeTag.item(0)).getNodeValue();
                              System.out.println(tagValue); //This prints "<" with HTML content. If i remove HTML then "Dummy Content" is printed
    

    If I need to remove html content, then I would need to reformat the content according to the HTML as the newline to a linebreak.

    Any suggestions would be helpful.

    Thank you

    Sandeep

    I feel xml parser was mature enough to handle these characters if sills, you get the error explore CDATA. It might help you.

  • Problem with HorizantalFieldManager

    I am facing a lot of problem with my problem only East of the presentations

    I want to add 3 buttons in a horizantalfieldmanager with 3 positions different say left, Center and right of the screen. How can I do?

    Hello

    mainHorizontalManager = new HorizontalFieldManager (Field.USE_ALL_WIDTH |) VerticalFieldManager.VERTICAL_SCROLL | VerticalFieldManager.VERTICAL_SCROLLBAR);
    ButtonField bf = new NewLayout ("add");
    ButtonField bf1 = new NewLayout ("sub");
    ButtonField bf2 = new NewLayout ("div");
    mainHorizontalManager.add (bf);
    mainHorizontalManager.add (bf1);
    mainHorizontalManager.add (bf2);
    Add (mainHorizontalManager);

    class NewLayout extends ButtonField {}
       
    defaultFont fonts private;
    private string text;
    NewLayout (String text) {}
    Super (Text);
       
               
    }
    Protected Sub layout (int width, int height) {}
              
    Width = net. RIM. Device.API.UI.Graphics.getScreenWidth () / 3;
    height = super.getPreferredHeight ();
    Super.Layout (width, height);
    super.setExtent (width, height);
    }
         
         
    }

    change the width accordingly... Thanks... If got a solution marked as resolved thn... cordially

    Natural

Maybe you are looking for

  • Cannot delete a bookmark - why?

    I select a bookmark that I want to delete, then click the star, then select delete the bookmark. The bookmark is still there. Several attempts with the same bookmark, multiple failures. In addition, if I < display all bookmarks > none of my favorites

  • Research Assistant is not in the .java (a text file) files.

    With the help of "Research Assistant", I am unable to search and find words in documents with the extension: 'java' even when I choose 'all files and folders ". What should I do to make a search in the .java files? I noticed that the 'File Type' drop

  • bug in settings after update 4.2.2

    Hello guys, I have a bug in my Xperia L in the settings after update to Android 4.2.2The problem is in storage that I can't transfer data to the sd card. When I click it, it crashes with a message "Unfortunately the parameters have stopped."Any idea

  • Upgrading processors m9040n elite

    I have a m9040n Elite with the Intel Core 2 Quad Q6600 2.4 GHz processor. I want to move on to the Intel Core 2 Quad Q9650 3.0 GHz processor. The two processors are the same type of the wattage (95W) and socket 775. Memory was assessed a maximum of 8

  • Audio does not play is not so from a different frame of 1

    Hello. I added audio on my calendar and it starts at frame 1. However, if I move the playback cursor to a senior at 1 and play my scene, I hear no audio. How can I report this bug? I use Adobe animate CC on a Mac.Thank youMaikel Nabil Sanad