6 Replies Latest reply: Apr 16, 2013 9:06 AM by Andy Tael-Oracle RSS

    Getting error trying to install Midlet

    Andy Tael-Oracle
      Hello,
      I am trying to install a Midlet on my Raspberry Pi (ME 3.3) by doing the following:
      pi@raspberrypi ~/java_me_3.3/bin $ ./installMidlet.sh /home/pi/apps/TMP36rpi.jar
      configdb_load_to_db error: Unable to open file, trying to recover from the temporal one
      configdb_load_to_db error: temporal settings file is unavailable
      ERROR: Unable to read configuration file(s).  Check that ini file(s) exists in your application directory.
      javacall_initialize_configurations_from_file failed
      pi@raspberrypi ~/java_me_3.3/bin $
      In the directory /home/pi/apps I have the following files:
      pi@raspberrypi ~/java_me_3.3/bin $ ls /home/pi/apps
      TMP36rpi.jad  TMP36rpi.jar
      pi@raspberrypi ~/java_me_3.3/bin $
      It doesn't work and I don't know what I am doing wrong.

      Thanks
      Andy
        • 1. Re: Getting error trying to install Midlet
          andrey_p
          Please check that you have the jwc_properties.ini file in your binary directory (~/java_me_3.3/bin) and please verify that you are running under the user which has proper permissions to write into this file. E.g. typical problem that if you once ran JMEE under super-user it will change the owner of the file to root. So in order to run JMEE again under normal user it's needed to either change the owner back or to chmod to something like 777. The same problem also relevant to AMS (application management part of JMEE) data base, residing in appdb (~/java_me_3.3/appdb) folder. So please watch out when running under different users.
          Please reply if you got manage to resolve the problem

          Edited by: andrey_p on Apr 13, 2013 2:48 AM
          • 2. Re: Getting error trying to install Midlet
            Andy Tael-Oracle
            Hi,
            I changed the permissions on the jwc_properties.ini and I get a different error.
            pi@raspberrypi ~/java_me_3.3/bin $./installMidlet.sh /home/pi/apps/TMP36rpi.jar
            
            argv[1] = runMidlet
            argv[2] = -1
            argv[3] = com.sun.midp.scriptutil.CommandLineInstaller
            argv[4] = I
            argv[5] = /home/pi/apps/TMP36rpi.jar
            Command line parameters are passed.
            javacall_event_initialize: events system initialized
            Events system initialized.
            Time system initialized.
            JavaTask thread initialized.
            Starting JavaTask
            Error installing the suite: null
            java.lang.IllegalArgumentException
             - javax.microedition.io.Connector.getProtocolInstance(), bci=28
             - javax.microedition.io.Connector.open(), bci=24
             - javax.microedition.io.Connector.open(), bci=3
             - com.sun.midp.installer.FileResourceDownloader.downloadResource(), bci=57
             - com.sun.midp.installer.ResourceDownloaderBase.downloadToFile(), bci=29
             - com.sun.midp.installer.ResourceProvisioning.downloadJar(), bci=59
             - com.sun.midp.installer.Installer.installStep7(), bci=11
             - com.sun.midp.installer.Installer.performInstall(), bci=167
             - com.sun.midp.installer.Installer.installJar(), bci=140
             - com.sun.midp.scriptutil.CommandLineInstaller.run(), bci=342
             - java.lang.Thread.run(), bci=5
            Finishing JavaTask
            pi@raspberrypi ~/java_me_3.3/bin $
            • 3. Re: Getting error trying to install Midlet
              andrey_p
              Hi Andy,

              Apparently there is a problem of finding out the correct protocol for the URL you've specified. As work around may I suggest you to specify the protocol manually, i.e.:

              ./installMidlet.sh file:////home/pi/apps/TMP36rpi.jar

              BTW, the protocols supported are: file:// and http://

              Regards,
              Andrey
              • 4. Re: Getting error trying to install Midlet
                Andy Tael-Oracle
                Andrey,
                still no luck:
                pi@raspberrypi ~/java_me_3.3/bin $ chmod 666 jwc_properties.ini
                pi@raspberrypi ~/java_me_3.3/bin $ ./installMidlet.sh file:///home/pi/apps/TMP36rpi.jar
                argv[1] = runMidlet
                argv[2] = -1
                argv[3] = com.sun.midp.scriptutil.CommandLineInstaller
                argv[4] = I
                argv[5] = file:///home/pi/apps/TMP36rpi.jar
                Command line parameters are passed.
                javacall_event_initialize: events system initialized
                Events system initialized.
                Time system initialized.
                JavaTask thread initialized.
                Starting JavaTask
                * rootfs -> /
                * /dev/root -> /
                * devtmpfs -> /dev
                * tmpfs -> /run
                * tmpfs -> /run/lock
                * proc -> /proc
                * sysfs -> /sys
                * tmpfs -> /run/shm
                * devpts -> /dev/pts
                * /dev/mmcblk0p1 -> /boot
                Error installing the suite: null
                java.io.IOException
                 - com.sun.io.j2me.file.Protocol.connect(), bci=18
                 - com.sun.io.j2me.file.Protocol.openPrimImpl(), bci=341
                 - com.sun.io.j2me.file.Protocol.openPrim(), bci=5
                 - javax.microedition.io.Connector.open(), bci=47
                 - javax.microedition.io.Connector.open(), bci=3
                 - com.sun.midp.installer.FileResourceDownloader.downloadResource(), bci=57
                 - com.sun.midp.installer.ResourceDownloaderBase.downloadToFile(), bci=29
                 - com.sun.midp.installer.ResourceProvisioning.downloadJar(), bci=59
                 - com.sun.midp.installer.Installer.installStep7(), bci=11
                 - com.sun.midp.installer.Installer.performInstall(), bci=167
                 - com.sun.midp.installer.Installer.installJar(), bci=140
                 - com.sun.midp.scriptutil.CommandLineInstaller.run(), bci=342
                 - java.lang.Thread.run(), bci=5
                Finishing JavaTask
                pi@raspberrypi ~/java_me_3.3/bin $
                However if I run the AMS CLI (via port 65002) it works using the file:// protocol. CAn it be some kind of permission problem?

                --Andy                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
                • 5. Re: Getting error trying to install Midlet
                  andrey_p
                  Hi! There have to be 4 '/' symbols after file:
                  Regards,
                  Andrey
                  • 6. Re: Getting error trying to install Midlet
                    Andy Tael-Oracle
                    hello,
                    now it works:
                    pi@raspberrypi ~/java_me_3.3/bin $ sudo ./installMidlet.sh file:////home/pi/apps/TMP36rpi.jar
                    argv[1] = runMidlet
                    argv[2] = -1
                    argv[3] = com.sun.midp.scriptutil.CommandLineInstaller
                    argv[4] = I
                    argv[5] = file:////home/pi/apps/TMP36rpi.jar
                    Command line parameters are passed.
                    javacall_event_initialize: events system initialized
                    Events system initialized.
                    Time system initialized.
                    JavaTask thread initialized.
                    Starting JavaTask
                    The suite was successfully installed, ID: 2
                    Finishing JavaTask
                    pi@raspberrypi ~/java_me_3.3/bin $
                    Thanks a lot for yor help
                    --Andy