Friday 17 August 2012

Installation of Oracle Database Mobile Server 11g

Prerequisites: Install Oracle Database 11g

Note: Screenshots from my installation are available for your reference at the bottom of this note.

Step 1: Download Application Server.
I chose Oracle GlassFish Server 3.1.2.

Step 2: Set up environment for GlassFish
Since I already had Oracle Database installed, I set the environment for a different Oracle Home.

export ORACLE_HOME=/home/oracle/glassfish/glassfish3
export JAVA15_HOME=$JAVA_HOMe

(please read README before you start!)

Step 3: Installed GlassFish
Execute the install script provided. In my example,
$glassfish-3.1.2-unix.sh

I took the default install options and installed the GlassFish server on Port 4848

Step 4: Download and install DMS

I downloaded DMS for Linux. There are separate 32-bit and 64-bit installations. So make sure you choose the right one.

I used the same environment as GlassFish. Fired up the Oracle Installer (runInstaller) and installed the Oracle Database Mobile Server. I chose the option to not create repository and to not install the demo applications.

Step 5: Create Mobile Repository

Run $ORACLE_HOME/mobile/server/repwizard to bring up Repository Wizard. Follow instructions to create repository. You will need the GlassFish Port Number, Admin credentials and credentials for the Oracle SYSTEM user.

I chose the default installation schema MOBILEADMIN and created a new domain for the DMS.

Step 6: Start Domain

My main GlassFish domain is called domain1. There is no need to start the mobile server domain separately

$ORACLE_HOME/bin/asadmin start-domain domain1

Step 7: Log in to Mobile Manager

Verify that GlassFish Server is running. Visit <app server>:<port>. My URL is http://192.168.0.17:8080

From a browser, visit <app server>:<port>/mobile/console. For me, this URL looks like http://192.168.0.17:8080/mobile/console

Use the credentials for the Administrator to log in. If you cannot log in or get any error, you will need to figure out what went wrong by looking at installation logs.

How to Uninstall?


If you want to uninstall DMS and start over, here are the steps:

Log in to Oracle using SYSDBA and execute:
SQL> DROP TABLESPACE SYNCSERVER INCLUDING CONTENTS;

SQL> DROP USER MOBILEADMIN CASCADE

From OS prompt, delete the directory structure $ORACLE_HOME/mobile

$rm -rf mobile

Delete the Mobile Server domain from $ORACLE_HOME/domains (delete the mobile server domain and not the GlassFish main domain)

$rm -rf mobileserver

My Experience


All of the above went very smooth once I had Sun JDK installed and JAVA15_HOME and ORACLE_HOME set properly.

Since my DMS is running on a Linux Desktop, I did observe one strange behavior. When my Desktop went down abnormally due to a power failure, I could no longer log in to Mobile Manager using the Administrator credentials. I kept getting an error Invalid Username/Password or something to that effect. I could not figure out why. My database was running fine and I could log in to MOBILEADMIN from SQL client and even reach my GlassFish console. So there is some issue here that I have not figure out as yet. I have reported it to the Oracle team.

I finally reinstalled DMS and recreated the repository to get around this problem. Hopefully, we will get a solution for this issue

Screen Shots


I have made available four sets of screeshots for reference.

1) Oracle GlassFish Server Installation

2) Oracle Database Mobile Server Installation

3) Oracle DMS Repository Creation

4) Managing Domain and Mobile Manager 




24 comments:

  1. i'm installed :

    oracle database11g succefully

    glassfish succefully

    DMS11 succefully

    i'm starting domain1 succefully

    but when i need to go in : http://localhost:8080/mobile/console

    server don't found a page !!

    what i can do ?

    ReplyDelete
  2. Are you sure your mobileserver domain has started?

    - What happens when you visit http://localhost:8080/ Is GF domain started?

    - If GF is started, I suspect that the Mobile domain has not started (by default it is called mobileserver)

    Try
    asadmin stop-domain domain1 followed by
    asadmin start-domain domain1

    domain1 is default admin domain of GF

    ReplyDelete
  3. I solved the problem

    I copy the file "WebToGo" "mobile" folder in the autodeploy domain domain1

    it works very well now.

    *******

    but my current problem I followed all the steps of your project:

    1) I created a user "AA" on oracle databases I create the tables that I need in my project.

    2) I then create "Publication items" I give the name of each "Publication Item" as the names of the tables relate to the database, after I create "Publication" I named
    and I add the "Publications items" inside, in the name of the database I give "Pingouin_Projet_Bdd.db" as the name, then I dployer the Glassfish server successfully.

    3) I download the application "update.apk" "dmagent.apk" and I install "Mobile Sync" in my android tablet

    4) I created a user "AA" in the glassfish server and I give him the role of the application that I named "TesApp" which contenner "Publication items"

    5) on my shelf mobile sync I set "OSE.INI"
    SQLITE.DATA_DIRECTORY = / sdcard / external_sd / com.pph.pingouin_projet / AA

    (Com.pph.pingouin_projet: the package of my project)

    * The first day gave me the synchronization errors

    * The 2nd day with a miracle given my "Syncronisation succefful"

    and when I look in the path of my project I find database with 2 other file, but the database does not open???

    after I try to change:
    SQLITE.DATA_DIRECTORY = / sdcard / external_sd / com.pph.pingouin_projet / AA
    by
    SQLITE.DATA_DIRECTORY = / sdcard / external_sd / com.pph.pingouin_projet

    ca give my errors
    and when I undo changes
    SQLITE.DATA_DIRECTORY = / sdcard / external_sd / com.pph.pingouin_projet / AA

    ca give my errors of syncronisation problem!!

    : $

    Is that I have a problem at "Publishing" and "Publishing items"??
    Is that I have a problem or I missed something in creating tables??
    What is the configuration file must be in the "OSE.INI", "global.xml"??

    excuse me this is a long can, apologize and I do not speak English that I translate my message

    I'm waiting for your help and thanks to all.

    ReplyDelete
  4. Your OSE.INi entry should point to a directory one level higher than the username. So, assuming your user is AA above, your entry should be: /sdcard/external_sd/com.pph.pingouin_projet

    I am assuming that you have created a directory named external_sd under /sdcard

    If you are having Sync issues, you can view Error log. In the Mobile Sync app, click Settings, View Error Log and see if that helps you

    ReplyDelete
  5. This comment has been removed by the author.

    ReplyDelete
    Replies
    1. I found where is the problem, and I resolved now my android application syncronise with the server Thanks.

      but the synchronization is done in a way:
      the serverur ----> to mobile client

      ?????

      how can I make a bidirectional syncronisation??
      from server to ------ ----> mobile client
      and
      from mobile client ----- to ------> Server

      Thanks for your helps

      Delete
    2. This comment has been removed by the author.

      Delete
    3. Hi,
      I am developing android app with oracle database. please guide me how to configure android application with oracle database.
      I am using Linux Fedora operating system.

      Thank you.

      Delete
  6. This comment has been removed by the author.

    ReplyDelete
  7. Have you tried synchronizing both ways? Please describe your steps.

    So, for example, on your device, what happens if you do the following:

    1. Connect device to your computer
    2. adb shell
    3. sqlite3
    4. UPDATE some record(s) in a table
    5. Quit

    Start Mobile Sync and then Sync. You should see changes on the server after a few minutes.

    ReplyDelete
  8. Thank you, I found where the problem is.
    My problem was that: ID tables are not automatically incremented, then add for each record in the mobile IDs was 'null' then the server IDs are not accepted and he deleted.

    I then correct the code incrementing ID tables and it works :)

    thank you very much for your support, you are a genius ;)

    ReplyDelete
  9. This comment has been removed by the author.

    ReplyDelete
  10. This comment has been removed by the author.

    ReplyDelete
  11. hi, I'm back with a question :)

    I sync, the two devices with the same database successfully.

    all data will syncronisés on both devices.

    but my goal, and each Currency load data concerned and not all data.

    for example:
    Device 1 ----> city (NEWYORK) syncronise data object belongs to Newyork
    only

    Device 2 ---> city (PARIS) syncronise data object belongs only to Paris.

    knowing that the two cities in the same table

    the question is ... what to do?

    ReplyDelete
  12. You can write SQL to subset data. Please read documentation http://docs.oracle.com/cd/E22663_01/doc.11100/e22678/admuser.htm#OLDEP026 pay special attention to Section 4.5

    ReplyDelete
  13. I read the section 4.5,

    - I go to the Users page

    - I chose the user "AA"

    - Then the "Data Subsetting", I found the name of associated application as a user.

    the problem is that I have no right to the selected application or add value! :-(

    NB: they me SUGGESTED also to see "publication item query!"
    http://www.packtpub.com/article/creating-new-publication-using-mobile-database-workbench-oracle-mobile-server

    give me your opinion if you understand what must to do

    ReplyDelete
  14. result of your answer
    http://docs.oracle.com/cd/B14156_01/doc/B12262/html/mmdsubre.gif

    any solution ???

    ReplyDelete
  15. please i have a problem when i am trying to connect to the mobile manager http://localhost:8080/mobile/console

    ReplyDelete
    Replies
    1. Can you share some additional information like error message? Please try the following:
      1. Point your browser to the URL http://localhost:8080. Do you see your App Server screeen?
      2. If #1 above is fine, then please describe what happens when you try the Mobile Manager

      Delete
  16. Did you done any sync app(oracle mobile server with oracle client)?

    ReplyDelete
  17. This comment has been removed by the author.

    ReplyDelete
  18. This comment has been removed by the author.

    ReplyDelete
  19. Testing Mobile Server Installation
    To test whether your mobile server was installed correctly, test your mobile server through a browser with the following URL:

    http://[:port]/mobile
    -----
    I tried:
    Tomee:
    http://lohalhost:8080 is Running Properly..
    Mobile Server:
    http://ALTIRUMA.in.ibm.com:8080/mobile(ALTIRUMA.in.ibm.com is My Machine Name)
    Error 404--Not Found

    Could you please suggest me how to test the server.

    ReplyDelete
  20. Sorry for delayed response. I was away from network for 2 weeks in Ladakh. This seems like a DNS issue. Are you able to reach your Web Server by using URL altiruma.in.ibm.com:8080?

    ReplyDelete

Note: only a member of this blog may post a comment.