I wrote a desktop application (Java/swing/JDBC) to connect to a local database via JDBC. This database is hosted on an IBM i-series (AS400) and is only available on the internal network. I'm working on translating that application into an android app to be used onside in the warehouse via wireless connection.
I have my JDBC connection in it's own thread. The app asks the user for username/password before attempting a connection. The connection fails every time with the same message:
Here is the offending code:
It registers the driver then hits line 6, pauses for a second, then throws an error, completely stalling the device instead of letting my error handler safely close the app.
I have double (triple) checked to ensure the credentials are correctly passed and the IP and schema are both correctly set. This code is a direct copy of my desktop code. The only difference is I use a jar optimized for android instead of the desktop. The jar simply contains a translation layer between native AS400 code and Java, but works the same as any SQL jar.
This is our primary database server used throughout the entire company. It is always available and SQL is enabled on it. I am testing this using a physical android device (not an emulated one) and it is connected to our internal wireless network.
Any suggestions on how to fix this or even a direction to look in? Do I need to do something special for address resolution or something similar? Google-fu is failing me badly. Thanks for your help!
That was it, actually. For some reason, my test phone decided to junk itself and not tell me it had completely killed the wireless signal. It never really crossed my mind. I'm using my personal phone and it's working well. Now to knock out all the synchronization issues.
I can't beleive you just said that. Now I need to calm down with this tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database