I am taking your advice and trying to use RDC... I'm getting the following error
C:\WINDOWS\system32>"C:\Program Files (x86)\Java\jdk1.7.0_13\bin\java" -Xmx256m
-cp .;libs\*;jdbc_driver\* anywheresoftware.b4a.remotedatabase.RemoteServer
Error: Could not find or load main class anywheresoftware.b4a.remotedatabase.Rem
oteServer
C:\WINDOWS\system32>pause
Press any key to continue . . .
I'm paste the server starting but now dealing with the following java eof exception
any guidence would be appreciated.
thank you
C:\RDC\RDC-Server\RemoteDatabaseConnector>"C:\Program Files (x86)\Java\jdk1.7.0_
13\bin\java" -Xmx256m -cp .;libs\*;jdbc_driver\* anywheresoftware.b4a.remotedata
base.RemoteServer
B4A Remote Database Connecter (version 0.9)
loading: C:\RDC\RDC-Server\RemoteDatabaseConnector\config.properties
2014-09-10 21:35:18.588:INFO::jetty-7.4.2.v20110526
2014-09-10 21:35:18.621:INFO::started o.e.j.s.ServletContextHandler{/,null}
Sep 10, 2014 9:35:18 PM com.mchange.v2.log.MLog <clinit>
INFO: MLog clients using java 1.4+ standard logging.
Sep 10, 2014 9:35:18 PM com.mchange.v2.c3p0.C3P0Registry banner
INFO: Initializing c3p0-0.9.2.1 [built 20-March-2013 11:16:28 +0000; debug? true
; trace: 10]
2014-09-10 21:35:18.820:INFO::Started SelectChannelConnector@0.0.0.0:17178 START
ING
java.io.EOFException
at java.util.zip.GZIPInputStream.readUByte(GZIPInputStream.java:264)
at java.util.zip.GZIPInputStream.readUShort(GZIPInputStream.java:254)
at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:163)
at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:78)
at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:90)
at anywheresoftware.b4a.remotedatabase.Servlet.doGet(Servlet.java:75)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:538
)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java
:478)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandl
er.java:937)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:
406)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandle
r.java:871)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.j
ava:117)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper
.java:110)
at org.eclipse.jetty.server.Server.handle(Server.java:346)
at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.
java:589)
at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete
(HttpConnection.java:1048)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:601)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:214)
at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:41
1)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEn
dPoint.java:535)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEnd
Point.java:40)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool
.java:529)
at java.lang.Thread.run(Thread.java:722)
RemoteServer is running (Thu Sep 11 15:25:43 PDT 2014)
java.sql.SQLException: An attempt by a client to checkout a Connection has timed out.
Config.properties
#SQL Server
DriverClass=net.sourceforge.jtds.jdbc.Driver
JdbcUrl=jdbc:sqlserver://127.0.0.1/test
User=sa
Password=ranger
ServerPort=17178
#If Debug is true then this file will be reloaded on every query.
#This is useful if you need to modify the queries.
Debug=true
#commands
sql.create_table=CREATE TABLE animals (\
id INT NOT NULL AUTO_INCREMENT,\
name CHAR(30) NOT NULL,\
image BLOB,\
PRIMARY KEY (id))
I have had success in connecting to the server and inserting data through the internal and expernal ip address.
The only remaining issue is to figure out how to insert a image file from the smartphone. I see a few comments refering to the methods filetobytes,imagestobytes,bytestoimages but cannot find a sample to study. I am new to transmitting imagefiles and could use some help.