B4J Tutorial [Server] Data Collection Solution - Device, Desktop and Web reports

Status
Not open for further replies.

mariomb

Member
Licensed User
Longtime User
Ciao, ho provato tutto e tutto funziona regolarmente sul pc con emulatore.
Anche dopo aver fatto una modifica in DataCollectionDevice,
trasformando la riga : (link = "http://192.168.123.1:51042")
in (link = "http://" & txtIP.Text & ":" & txtPort.Text) per poter modificare indirizzo ip e porta a piacimento.

Quando però installo apk di DataCollectionDevice sul mio tel (huawei P6 con android 4.2.2)
ricevo il seguente errore : "illegal character in authority at index 26"

da cosa può dipendere? Qualcuno può aiutarmi?
grazie
 

luke2012

Well-Known Member
Licensed User
Longtime User
Hi @Erel,
I reproduced your solution on a windows pc. Which is the steps to reproduce the b4J server on a Raspberry PI board?
 

desof

Well-Known Member
Licensed User
Longtime User
Hello very good your example and I'm trying to make it run but I get this error:

2015-06-26
CreateTable: CREATE TABLE IF NOT EXISTS [Animals] ([Name] TEXT, [Age] REAL, [Location] TEXT, [Date] TEXT)
2015-06-26 17:21:57.123:INFO::main: Logging initialized @288ms
2015-06-26 17:21:57.217:INFOejs.Server:main: jetty-9.1.z-SNAPSHOT
2015-06-26 17:21:57.250:WARNejh.MimeTypes:main: java.util.MissingResourceException: Can't find bundle for base name org/eclipse/jetty/http/encoding, locale es_ES
2015-06-26 17:21:57.265:INFOejsh.ContextHandler:main: Started o.e.j.s.ServletContextHandler@4f4a7090{/,file:/E:/JAVA/DataCollectionServer/DataCollectionServer/Objects/www,AVAILABLE}
2015-06-26 17:21:57.269:INFOejs.AbstractNCSARequestLog:main: Opened E:\JAVA\DataCollectionServer\DataCollectionServer\Objects\logs\b4j-2015_06_26.request.log
2015-06-26 17:21:57.367:INFOejs.ServerConnector:main: Started ServerConnector@7c30a502{HTTP/1.1}{0.0.0.0:51042}
2015-06-26 17:21:57.367:INFOejs.Server:main: Started @539ms
 

MarkusR

Well-Known Member
Licensed User
Longtime User
@Erel , please can you update DataCollectionDesktop.zip at first page to work with B4J 6.01?
I replaced the message boxes and server ip etc but after start there is no window and i can not open the form designer.
the DataCollectionServer part seems running well.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
i can not open the form designer.
It is based on scene builder so you need to install it (don't do it).

The issue with WebView can be fixed by first showing the form and only then loading the layout: Java 9 and WebView (and GoogleMaps)

Overall this is an old example and not so recommended anymore...
 

MarkusR

Well-Known Member
Licensed User
Longtime User
@Erel, i think my issue was that i can not run 2 b4j projects (server & client) from ide in debug mode.
the second project waits for the debugger for connect. (i used now one in release mode)
i like this example because it is all in one, pc server,pc client and mobile, data grid and database

@Others
i found also a nice sql lite db management tool
http://sqlitebrowser.org/
 
Last edited:

AHilton

Active Member
Licensed User
Longtime User
MarkusR, yes you can. I start project1 (the server) in debug mode. I then start project2 (the client) in debug mode a few times (normally on the 3rd time) before it will start. As long as you don't restart the project1, project2 will restart on the first time after that initial try. It's a big pain and time waster but it's what's available to us for now.

I've put in a wish list item for this problem a long time ago but the only response was to run project1 in release mode. That's not a fix.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User

AHilton

Active Member
Licensed User
Longtime User
... please note that the time a feature was requested in not considered at all ...

Thanks for making that clearer, Erel.

The point I was making, MarkusR, is that it's a known issue. Perhaps adding your voice to the appropriate forum, B4J Bugs & Wishlist, would help. In the meantime, you have a few options...

- Run your server in runtime mode and your client in debug
- Run both your server and client in debug but requiring you to start your client several times each time you restart (ie change something on) your server project.
- Develop your server project in a VM and your client project normally. Both in debug mode.
- Develop server and client projects on 2 different machines.

And that's where I'll leave it as this has diverged from the thread topic.
 

karelespinoza

New Member
Licensed User
Longtime User
Hello, I need help I am very new in client-server applications, I have to develop client applications in adndroid and applications in windows, that enter and update information in a database to get reports.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…