Unable to connect to a local database on the Android device.

Hi all

I use JDeveloper 11.1.2.4.0. Earlier, I tried to create a web service data control to access my database through an Android device and it worked great! Now I'm implementing JDBC. My code works perfectly in a web application. However when I try to implement on an Android device, nothing happens when I press my button (with ActionListener). It's my java code:

< code >

{} public void onButtonPress (ActionEvent actionEvent)
Connection Conn = null;
Statement stmt = null;
ResultSet rs = null;
Boolean exitFlag = false;
Boolean executeResult;
try {}

String driver = "oracle.jdbc.driver.OracleDriver";
Class.forName (driver) .newInstance ();
System.out.println ("connection to the database...");
String jdbcUrl = "jdbc:oracle:thin:@176.205.67.50:1529:trial";
Conn is DriverManager.getConnection (jdbcUrl, "just_test", "new");.
stmt = conn.createStatement ();


String sql = "SELECT * from userfile" ;// where as username ' "' + getUsername() + ' ' ';"
RS = stmt.executeQuery (sql);

While (rs.next () & &! exitFlag) {}
String dbusername = rs.getString ("USERNAME");
String dbpassword = rs.getString ("PASSWORD");
If (DBUserName.equalsIgnoreCase (getUsername ()) & & dbpassword.equalsIgnoreCase (getPassword ())) {}
AdfmfContainerUtilities.invokeContainerJavaScriptFunction (AdfmfJavaUtilities.getFeatureName (), "adf.mf.api.amx.doNavigation", new Object() {"GB"});
exitFlag = true;
}
exitFlag = true;
}
{if(!exitFlag)}
() AdfmfContainerUtilities.invokeContainerJavaScriptFunction
"adf.sample.mobile.MobileFeature,"
"navigator.notification.alert,"
New Object() {"the user name or password entered is incorrect.", "",
({"Invalid username or password", "Ok"});
}
} catch (Exception e) {}
e.printStackTrace ();

} {Finally
try {}
If (conn! = null)
Conn.Close ();
} catch (SQLException to) {}
se.printStackTrace ();
}
}

< code >

The code works fine. But is there anything else I should do before you deploy my application?

Thank you

Mohamed.

(By the way, see my old thread on this topic from September 2013):

( https://community.oracle.com/thread/2579300 )

You cannot connect with JDBC ADF Mobile to a remote server - security settings will not let you do this.

The right way to retrieve data from the remote database to a Mobile application of the ADF is through web services.

You can use JDBC in ADF Mobile to access an SQLite local database on the device. See the example of HR that comes with ADF Mobile.

Tags: Java

Similar Questions

  • Unable to connect to a network or to the Internet on my Dell XPS1530.

    Unable to connect to a network or to the Internet on my Dell XPS1530. When I try to diagnose problem, I get a message that reads "Network Diagnostics cannot run because the Diagnostics Policy Service is not running." Having exhausted the patience all the phone with my IP and Dell, which tells me that it is a problem of Microsoft software. I have two other computers and a PS3, and I am able to connect to the Internet through one any of them. The XPS works under Vista with SP2. Can someone help, please? Thank you.

    Go to start / Control Panel / Administrative Tools / Services and go to diagnostic policy Service and set it to automatic and start it.  If it does not start, check the dependencies and make sure they're too automatic and rnning.  Then see if you can run Network Diagnostics.

    You can get in trouble with your device drivers.  Go to Device Manager by going to start / find and type Device Manager and enter and then double-click on the program icon that appears.  Check each device to a red x, yellow! or white?  These identify devices with problems probably (drivers, but also of conflict or something else).  Click on each for more details and troubleshooting tips.  If you need to get drivers (and you should get those developed to date for the network card and regardless of the device you use to connect (such as a router wireless or such) and all you have time to do - they can help way beyond simply solve this problem), let the computer dealer or the manufacturer of the device (NOT of Microsoft Updates).  In fact, you must disable automatic updates in Windows Update driver as follows:http://www.addictivetips.com/windows-tips/how-to-disable-automatic-driver-installation-in-windows-vista/. Follow these steps to get the drivers: http://pcsupport.about.com/od/driverssupport/ht/driverdlmfgr.htm.  Once you have the drivers, you can install them via the Manager device as follows:http://www.vistax64.com/tutorials/193584-device-manager-install-driver.html.

    When I'm in a lke your situation, I usually start from scratch.  Create a new network connection by ensuring that all settings are correct.  Check all the cables (if there is).  You have already reinstalled the drivers - make sure that no firmware or software is also necessary.  Configure the network sharing settings and make sure that you are ready to discover the network and such.  Check other computers to see their settings to make sure you get yours right and essentially the same thing (the same exatly so is another Vista machine connected in the same way).  Go to start / Control Panel / Internet settings and make sure that it's too fixed properly.  To connect, then try again. If this is not the case, remove some time to cool down and then start again with another new connection.  It's almost certainly a parameter that is not correcct (something no doubt very simple).

    I hope this helps.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • Why the connection to a local database becomes lost when the network is disconnected?

    I use TestStand 3.1. I have a configuration database on the local drive and I use the option "Log on the Fly.

    The test takes 48 hours and I want to assure you that it will not stop if the network connection is lost.

    If I unplug the network before starting the test, fine. I can plug the network again while the test runs without problem.

    But if the network is connected and I start the test and then disconnect the network of recording on the fly will give an error.

    I narrowed down it to "New USE for database Logging" step in the SequentialModel.seq (process model). If this step is performed with the network connection then the rest of the test needs a network connection.

    Is it possible to avoid this error?  The point of all the local database was to avoid network problems.

    Thank you for your help.

    TDOT-

    I connect you always locally, please try to change it to "localhost\SQLEXPRESS" to see if you can log in and then see if the same problem as you disconnect the LAN causes previous saw.

  • Unable to connect my Linux Machine database

    Dear all,

    Hope you will be fine.

    I'm having a problem to connect to PL / SQL Developer with my database available on the Oracle Linux virtual machine.

    I have a windows 7 installed on my PC, I have installed a virtual machine and install oracle 11g on this machine. I have a database named orcl on this and I am trying to connect to the database with my windows machine. I assigned ip appropriate to both computer and created under the setting mentioned in my tnsnames.ora file. But when I go to connect it shows error ORA-12203: TNS: unable to connect to the destination. Please guide me where I am doing wrong so I'll do it properly.

    ORCL_11G =

    (DESCRIPTION =

    (ADDRESS_LIST =

    (ADDRESS =

    (COMMUNITY = tcp.world)

    (PROTOCOL = TCP)

    (Host = 192.168.0.100)

    (Port = 1521)

    )

    )

    (CONNECT_DATA = (SID = orcl)

    )

    )

    Kind regards

    Atif Zafar

    Thank you all for your help. I solved this problem by mentioning the HOST in listener.ora and tnsnames.ora files. In fact, I have to assign the static IP address of my Linux machine and unfortunately not to mention the IP address in my two files. It is show HOST = localhost this is why it is forbidden to connect with the other machine. Now I connected successfully and it works fine now.

    You mention linux machine IP here.

    ORCL =

    (DESCRIPTION =

    (ADDRESS_LIST =

    (ADDRESS =

    (COMMUNITY = tcp.world)

    (PROTOCOL = TCP)

    (Host =192.168.0.100)

    (Port = 1521)

    )

    )

    (CONNECT_DATA = (SID = orcl)

    )

  • Unable to connect to remote oracle database!  Help, please!

    Hi all-

    I am a new user Oracle and you are allowed to access a remote Oracle database, however I have problems with the installation/configuration program! I downloaded the driver Oracle and the Instant Client (11.2.0.2.0) because I need to use Microsoft Access for the data access (the Access database is already configured to the correct Oracle database). I'm under the impression that, to do this, I need to be able to use the ODBC Administrator to get all set up. Note: Im working on Windows XP.

    I have questions:

    -I don't seem to have installed Netca (which seems to be the recommended method to configure a connection). I have manually adjusted the TNSNAMES file. ORA file so it matches the database, but I'm not sure what would be my next step.

    -When I open SqlPlus it wants a username and password, and I tried the default settings and got an error each time. I must first use SqlPlus, or establish a connection via ODBC first?

    -Also: ODBC requires a TNS Service name, and I'm not sure, where this is established; something that would give the database manager?

    I really just do not know how to configure this remote connection! I continue to run with obstacles and really want a reference "step by step" on the way to do it, if there is such a thing. Any help or additional reference material would be appreciated! I ran by the content of the forum, but have not been able to decode the jargon! Thank you very much in advance.

    Marilyn

    MsMonroe wrote:
    Hi Ed-

    I use the Oracle's ODBC driver. I think there may be a problem with the TNSnames file because I tried to add this file as a"Data Source", and he also said that a connection could not be established. What do you mean by the MS implemented? A configuration of Data Source?

    By MS implemented, I was referring to the MS ODBC for Oracle driver, against the Oracle ODBC for Oracle driver.

    The "source of data file' has nothing to do with the tnsnames file. The ODBC Manager retains its DSN definitions in one of three places. "User DSN" is stored in the HKEY_LOCAL_USER registry, the "System DSN" definitions are stored in the HKEY_LOCAL_MACHINE registry and 'FILE DSN"definitions is stored in a file... I don't remember exactly where or what it's name is as I have (when he is forced to deal with odbc) just keep things simple and use "system dsn". But these aren't all the definitions of ODBC, Oracle tnsnames file.

    The link between the ODBC DSN and the tnsnames.ora presents itself as a property of the ODBC definition. Suppose you have this for a tnsnames.ora entry:

    houston =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = vmlnx01)(PORT = 1521))
        )
        (CONNECT_DATA =
          (SERVICE_NAME = orcl)
        )
      )
    

    Then
    -When you set up your odbc dsn, if you use the MS for Oracle driver, you must specify 'houston' as the 'server '.
    -When you set up your odbc dsn, if you use the Oracle odbc driver, you must specify "houston" as "the TNS Service name".

    >

    Im going to try to post a modified version of the content of my TNSnames.ora file (for some reason any the "content is not allowed ' by the forum), but I would like to get some comments on whether the structure of the content may be the problem.

  • ACS 5.3 should consider a local database, if the ad is inaccessible

    Dear support team

    We have ACS 5.x, integrated with AD and members are authenticated using AD user name or local user name

    configured on ACS.

    is it possible that ACS checks the local database only when AD is unreachable, customer doesn't want local database ACS to use as long as AD is available. It's the accounting requirements of their Department system.

    Thanks in advance for your time.

    Ahad

    You're right about everything except the last part, device Admin 1 and 2 are "Selection rules", so they'll be mapped according to their Conditions, if applications authentication is rule Eric the device Admin 1 then the ACS will stay with this service regardless of whether or not the DB is down, ACS will not return to the device Admin 2.

    The only option to use a second database where the primary is down is with identity store sequence, but this option will also use the second database if the primary DB is unable to find the user.

    Unfortunately, there is not an option at the moment to accomplish this objective with specific detail you need.

    Rate if this can help.

  • VP1 is unable to connect to Data Mover not at the Application Designer

    Hello
    On 8; 42; 15 tools on a win 2003 server, DB oracle 9i:
    SYSADM can connect via Data Mover, but VP1 can not:
    Invalid user ID and password for the access code.

    I don't know password. I've updated with encryption = 0 and password and as sysadm run:

    encrypt_password *;

    in Data Mover.
    Also:
    SQL > select acctlock from the sysadm.psoprdefn where oprid = 'VP1 ";

    ACCTLOCK
    ----------
    0

    What else to check.

    For the moment unable to connect via the application designer. With the same error message.
    Thanks for the help.

    Have you set the connectid and the connectid Word both in configuration manager (pscfg.exe)?
    Are you able to connect to the database with the people of the user? And be connected with people, able to interview PSSTATUS, PSACCESSPRFL, and PSOPRDEFN (prefixed by the name of the owner of the tables)?
    PS user exist? Is there a table PSDBOWNER containing the name of the database?

    Nicolas.

  • Unable to connect my Officejet Pro 8600 to the network because of administrator settings

    Hello

    I recently bought an opportunity of Officejet Pro 8600 and I am unable to set it to my home network.  When I put in place-> network-> Wireless Setup Assistant (and all options in the network menu and many others) I get a message that says: "this feature has been locked by your system administrator or the person who set up the printer."

    Help, please.  How to get around this problem and unlock all the menu items that are locked?

    A milion, thank you

    D

    Hello derekd01,

    Welcome to the HP Forums!

    I understand that you are unable to connect wireless Officejet 8600 because you receive a message "this feature has been locked by your system administrator. I will do my best to help you!

    There is an administrator through the Embedded Web Sever settings, but in order to access it, it must be connected to a wireless network. Unfortunately, you are unable to access the wireless configuration. There are two options you can try:

    (1) you can connect an Ethernet cord, and then go to the Embedded Web Sever.

    (2) you can install the printer on your computer by a USB cable. Complete installation, and then follow this HP document convert a connected USB printer wireless. Once this operation is complete, you can access the Embedded Web Sever.

    Once you get this printer, follow these steps in the Embedded Web Sever:

    (1) at the very top of the page, click on settings, then password settings
    (2) if there is a username and password, please remove this item and click on apply

    Please post your results, I will be looking forward to hear from your part have a good night!

  • Unable to connect to Homegroup Windows 7 between the Modem to the PC and the Modem to the router for PC users.

    I want to talk about WIRED computers, do not speak of wireless.

    I have 3 PC:

    -2 are connected via Modem directly to the PC.

    -1 is connected through router, and the router is connected to the modem.

    The problem, this is it, it cannot detect the homegroup that I created on the computer that is directly connected by modem.

    The 2 PC via modem are perfectly detected and connected to the homegroup, so I want to know what I would do to another PC (which is connected to the router via modem) detects the homegroup, I had already created?

    Help, please.

    A Modem can have only two ports, connect to the internet (Wide Area Network) and the second to a SINGLE local device. In most cases the internet Service Pwill provide with only an IP address so itself cannot connect to more than one at a time. In current solutions, it is very rare for a Modem to use. If as you say, you have several devices connected to this unit then he himself is a router but possibly with the Modem built in if you have ADSL ISP.

    If your second unit is also a router then that explains why you cannot connect all devices in the same residential group.

    Router 1 has created a Local Area Network including both PC and the WAN port on the Router 2. Router 2 has created another independent local network with the 3rd PC. It is very likely that the two local networks will be IPv4 and traffic can be routed between them correctly in both directions according to the two local networks subnet ranges.

    Even if they are properly configured to allow traffic that HomeGroup requires IPv6 that some home routers support fully and every Member of the residential group must be on the same LAN anyway, he will not support a routed connection.

    Remove the 3rd PC of the 2nd router and plug it into the direct 1 router, remove the router 2nd the 1st in order to free the port. 3 all PCs are now on the same local network and communicate both IPv4 and IPv6, and homegroup should work.

    If you need additional ports provided by the 2nd router for other devices is not part of this problem then consider replacing it with a switch. If you use Router 2 for other devices Wi - Fi irrelevant then you need a wireless access Point.

  • 2013 Outlook, unable to connect to gmail via IMAP, get the error "Ox800CCC0E."

    I get the following error message:

    Task ' Synchronizing subscribed folders for * address email is removed from the privacy *. ' reported an error (Ox800CCC0E): Outlook cannot synchronize folders subscribed to * address email is removed from the privacy *. Error: Unable to connect to the server. If you continue to receive this message, contact your server administrator or the ISP (ISP).

    Could someone please help. There is no problem with internet connectivity.

    I use a network proxy that comes with the I am studying at University. For Skype and other applications of no browser, there is a possibility to enter passwords for proxy University separately connection options. However I do not understand where to enter this detail to get prospects. Or the problem may come from somewhere else. Any idea?

    If you do not understand where to enter retail, you must ask the people of the University.

  • Unable to connect to my laptop computer error "the user profile service has no logon. User profile cannot be loaded. "

    Original title: unable to connect to my laptop

    I tried to connect my laptop this morning and received this message "the user profile service has no logon. User profile cannot be loaded. Currently, I run in safe mode to get here. My os is windows 8, I have no restore point for system restore was released. I changed the password but when not even a joy also came not preinstalled os so no disc to any kind either. I'm no computer whizz but I don't have a little and follow instructions if any of you guys have any suggestions

    http://www.eightforums.com/user-accounts-family-safety/6084-any-fixes-user-profile-can-t-loaded-Windows-8-a.html

    The manufacturer of the system should give you a method to restore the system to factory settings as well.  Maybe the press of a button to start, or you were supposed to make the media or something similar.  Call NOW and ask if you can get a CD/DVD restore media.  Get, even if it costs a bit.  Better to get it so that you don't need that when you do.

    Windows 8/8.1 also restore, refresh and restore capabilities.  It's good for some things, but methods of restoration/recovery of the manufacturer are the best long term for several reasons.

  • Pavilion 14-ab051tx N4G24PA: unable to connect to any wireless network after the upgrade to Windows 10

    I recently bought a 14-ab-51tx Pavilion N4G24PA, this is my first laptop from HP, it comes with Windows already installed 8.1 and it worked fine.

    The thing is, I kind of get used to using Windows 10 on my previous laptop, so without further hesitation I upgraded to 64-bit Windows 10.

    Here's what I did wrong:

    Instead of update Windows 8.1 for Windows 10, I indeliberately he installed fresh, with couple of mouse clicks, I didn't realize that I also remove the recovery partition.

    I realized only after the installation process is complete, but then it was too late. I look forward to using my laptop with Windows 10 freshly installed inside to make some games just noticed that I couldn't connect to any network without wire, House or public. It recognizes my wifi at home, but the signal bar is bizarre, there is only 1 bar of signal even if the wireless router is only about 10 feet from him, so I checked my other computers and smartphones, but the signal on them is ridiculously high (full bar), it also detects another wireless network that are further away than my wireless router.

    But back to my HP laptop, I tried to connect to my home network despite the signal bar with the right entry security key, but it does not connect, it says "Cannot connect to the network".

    Tried updating drivers with HP Support Assistant and no luck, the problem persists, tried all the solution on the internet, int ip reset, reset winsock, checking and unchecking, always without success.

    Can someone help me please...

    Hello:

    The BOM indicates that your laptop comes with a Broadcom wireless card.

    Have you tried the last W10 driver for this card to support your PC and driver page?

    This package contains the Broadcom Wireless LAN drivers for the laptop models running a supported operating system. Broadcom wireless LAN drivers are required to activate the built-in Broadcom wireless LAN adapter.

    Exit the: December 17, 2015

    Version 7.35.317.0 Rev.A

    File name: sp74241.exe

  • Unable to connect Sony DSC-W650 camera to the computer

    original title: Sony DSC-W650 camera woes

    Anyone had problems connecting camera Sony DSC-W650 to pc via the USB with Windows 7 OS?  Very frustrating.  Beautiful pictures, just can't get off the bloody camera em.  Chat with rep online, no help to Sony since.  Downloaded software (since the plug & play does not work) without help.  Tried multiple USB ports with the same results.  Device Manager indicates I need to troubleshoot the device (appears on device like DSC-W650 Manager so it must be to see something), but zero.  Currently re-download software (PlayMemories) but I'm not going to hold my breath.  Help!

    Hello

    Thanks for posting the query on Microsoft Community and we are pleased to help you.

    The description of this request, it seems that you are having problems connecting camera Sony DSC-W650, prosecute the USB ports on the computer.

    I would like to gather more information on this problem:

    (1) that you get any notification on the screen after connecting the camera to the computer?
    (2) do you receive an error message after you connect the device camera to the computer?
    (3) don't you make changes to the computer before this problem?

    Perhaps, the hardware and devices troubleshooter can only solve the problem.

    You can track upward with the following methods:

    Method 1:

    Please see the link to open and run the hardware and peripheral troubleshooting tool on the computer:

    http://Windows.Microsoft.com/en-us/Windows7/open-the-hardware-and-devices-Troubleshooter

    Method 2:

    If the troubleshooter doesn't help, maybe, update the drivers for the USB can solve this problem.

    You can follow the link to update the drivers for hardware that does not work correctly:

    http://Windows.Microsoft.com/en-us/Windows7/update-a-driver-for-hardware-that-isn ' t-work correctly

    Please let us know if the problem still persists.

  • "Unable to connect" remote pages ("could not read the chrome manifest file'); local pages OK; proxy server is configured to none - what to do?

    Firefox 5.0.1 claims to be updated (how he knew that if she could not connect to the Web?), Windows XP Home 2002 SP3 Dell DIM3000 Pentium 4, 3 GHz, 1 GB of Ram.

    Internet Explorer (8.0.6001.18702 with 128-bit encryption) and Opera (10.2? can't get it to display its version) both can access all the local and remote (Web) pages - Firefox does very well with all local pages but impossible to connect to what anyone remotely.

    One possible cause is security software (firewall) that blocks or limits Firefox or plugin-container process without informing you, possibly after the detection of changes (update) for the Firefox program.

    Delete all rules for Firefox in the list of permissions in the firewall and leave your firewall again ask permission to get full unlimited access to the internet for Firefox and the plugin-container and the update process.

    See:

  • Unable to connect to my target database

    I am trying to create a clone of my database named proddb using my backup RMNA production,
    so, when I export ORACLE_SID = proddb
    and then try to connect to my use of rman
    RMAN target /.

    its projection connected to database clonedb target

    I checked the servicxes and there is no service not named clonedb and there is no entry in my tnsnames or listner file like clonedb...

    user9038728 wrote:
    [Oracle@localhost ~] $ export ORACLE_SID = proddb
    [oracle@localhost ~] $ export ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_1/

    [oracle@localhost ~] $ rman target sys/password

    Recovery Manager: release 11.2.0.1.0 - Production on Fri Jan 6 11:27:13 2012

    Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.

    connected to target database: CLONEDB (unassembled)

    RMAN >

    This is the output that I am getting...

    Your Production/source/target database must be in an OPEN state & your new/clone/auxiliary instance must be started/no mounted State.

    You need to connect you as below

    $rman auxiliary sys/***@prod target.

    Then the target will be production, you must export the auxiliaries SIDS and test connectivity TNS at the elementary level.

Maybe you are looking for

  • Edit email address

    I write an email on my iPhone, several e-mail addresses. I mistyped one address. How to choose the email so that I can modify it, without having to delete and retype the entire address?

  • Equium L40 does not start

    I was working on my Equium L40 when it has just been cut. I had worked on it for a while so it was very hot and the fan worked very hard! I checked the power supply and it is fine. I'm guessing (but not sure) that this is a motherboard failure and th

  • T450 activate the second DIMM location

    Hello Just got a new T450. I swapped the RAM out stock for 8 gb and noticed that there is an another DIMM slot next to him. I tried to paste in the stock 4 GB DIMMs, but Windows can not see, showing only 8 GB. Do I need to enable somehwere? Thank you

  • Audit failure Microsoft Windows security. 4625 login

    Passe spent Review Journal windows 2008 r2, that is windows 7 from two computers constantly try to start the session. I spent the antivirus, antispyware, malware, etc and detect any virus, Trojan horse, worm, on computers. You can help resolve makes

  • DOWNLOADHOST (MSN3 or 6 or7 &#62; &#62; &#62;) application not available?

    I get a downloadhost (MSN3 or 6 or7...) application is not available when you try to download a file.   Get the same when I try to download a fix.  How should I do?