B4J Question [ABMaterial] Retative paths differences across diffrent browsers

Cableguy

Expert
Licensed User
Longtime User
Hi Gurus!

I decided to save into a DB table my default images paths… All works perfect… in EDGE! In Chrome and in Firefox I'm getting a "file not found" error.

B4X:
Waiting for debugger to connect...
Program started.
init mysql
May 07, 2019 8:55:52 PM com.mchange.v2.log.MLog
INFO: MLog clients using java 1.4+ standard logging.
May 07, 2019 8:55:53 PM com.mchange.v2.c3p0.C3P0Registry
INFO: Initializing c3p0-0.9.5.2 [built 08-December-2015 22:06:04 -0800; debug? true; trace: 10]
May 07, 2019 8:55:54 PM com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource
INFO: Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 20000, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, contextClassLoaderSource -> caller, dataSourceName -> 1hge13pa214yutbr5mjnm1|78dd667e, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> com.mysql.jdbc.Driver, extensions -> {}, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, forceSynchronousCheckins -> false, forceUseNamedDriverClass -> false, identityToken -> 1hge13pa214yutbr5mjnm1|78dd667e, idleConnectionTestPeriod -> 600, initialPoolSize -> 3, jdbcUrl -> jdbc:mysql://localhost:3307/test?characterEncoding=utf8, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 1800, maxIdle...
Start B4J Analyse!
When an error occurs, check the B4JAnalyse.log file in the Objects folder to see the last B4J line it was working on.
Collecting data from B4J source files... (1/2)
ABMShared.bas
DBM.bas
ABMCacheControl.bas
ABMErrorHandler.bas
ABMUploadHandler.bas
ABMCacheScavenger.bas
ABMRootFilter.bas
ABMApplication.bas
PSGHome.bas
iFTTH.b4j
Analysing data from B4J source files... (2/2)
Number of icons needed: 55
loading F:\iFTTH\IFTTHV~1\Objects: copymewithjar.needs...
Using cache system: 3.0
Current App version: 1557255351986
Needs material/awesome icons
Building F:\iFTTH\IFTTHV~1\Objects\copymewithjar.js.needs
Building core.min.1557255351986.css...
2019-05-07 20:56:00.994:INFO::main: Logging initialized @13261ms to org.eclipse.jetty.util.log.StdErrLog
2019-05-07 20:56:01.447:INFO:oejs.Server:main: jetty-9.4.z-SNAPSHOT; built: 2018-05-03T15:56:21.710Z; git: daa59876e6f384329b122929e70a80934569428c; jvm 11.0.1+13
2019-05-07 20:56:01.629:INFO:oejs.session:main: DefaultSessionIdManager workerName=node0
2019-05-07 20:56:01.629:INFO:oejs.session:main: No SessionScavenger set, using defaults
2019-05-07 20:56:01.635:INFO:oejs.session:main: node0 Scavenging every 600000ms
2019-05-07 20:56:01.736:INFO:oejsh.ContextHandler:main: Started o.e.j.s.ServletContextHandler@12f9af83{/,file:///F:/iFTTH/iFTTH%20v001/Objects/www/,AVAILABLE}
2019-05-07 20:56:02.149:INFO:oejs.AbstractNCSARequestLog:main: Opened F:\iFTTH\iFTTH v001\Objects\logs\b4j-2019_05_07.request.log
2019-05-07 20:56:02.219:INFO:oejs.AbstractConnector:main: Started ServerConnector@db57326{HTTP/1.1,[http/1.1]}{0.0.0.0:51042}
2019-05-07 20:56:02.222:INFO:oejs.Server:main: Started @14490ms
Emulated network latency: 100ms
2019-05-07 20:56:02.268:INFO:oejs.AbstractConnector:main: Stopped ServerConnector@db57326{HTTP/1.1,[http/1.1]}{0.0.0.0:51042}
2019-05-07 20:56:02.269:INFO:oejs.session:main: node0 Stopped scavenging
2019-05-07 20:56:02.272:INFO:oejsh.ContextHandler:main: Stopped o.e.j.s.ServletContextHandler@12f9af83{/,file:///F:/iFTTH/iFTTH%20v001/Objects/www/,UNAVAILABLE}
2019-05-07 20:56:02.315:INFO:oejs.Server:main: jetty-9.4.z-SNAPSHOT; built: 2018-05-03T15:56:21.710Z; git: daa59876e6f384329b122929e70a80934569428c; jvm 11.0.1+13
2019-05-07 20:56:02.349:INFO:oejsh.ContextHandler:main: Started o.e.j.s.ServletContextHandler@12f9af83{/,file:///F:/iFTTH/iFTTH%20v001/Objects/www/,AVAILABLE}
Viewer running on os: windows 10
Trying to open: http://localhost:51042/iFFTH/
2019-05-07 20:56:02.351:INFO:oejs.AbstractNCSARequestLog:main: Opened F:\iFTTH\iFTTH v001\Objects\logs\b4j-2019_05_07.request.log
2019-05-07 20:56:02.364:INFO:oejs.session:main: DefaultSessionIdManager workerName=node0
2019-05-07 20:56:02.364:INFO:oejs.session:main: No SessionScavenger set, using defaults
2019-05-07 20:56:02.364:INFO:oejs.session:main: node0 Scavenging every 660000ms
2019-05-07 20:56:02.367:INFO:oejs.AbstractConnector:main: Started ServerConnector@db57326{HTTP/1.1,[http/1.1]}{0.0.0.0:51042}
2019-05-07 20:56:02.368:INFO:oejs.Server:main: Started @14636ms
2019-05-07 20:56:02.369:INFO:oejs.session:main: node0 Scavenging every 900000ms
Connected
Waiting for value (501 ms)
Waiting for value (123 ms)
Waiting for value (102 ms)
Waiting for value (102 ms)
Waiting for value (102 ms)
Disconnected
Disconnected
Connected
Waiting for value (126 ms)
Waiting for value (149 ms)
Disconnected
/iFTTH/images/img2.png
Not Found
Connected
Waiting for value (101 ms)
Waiting for value (147 ms)
Waiting for value (101 ms)
/iFTTH/images/img2.png
Not Found
Connected
Waiting for value (100 ms)
Waiting for value (100 ms)
Waiting for value (100 ms)
Connected
Waiting for value (104 ms)
Waiting for value (107 ms)
Disconnected
/iFTTH/images/img2.png
Not Found
Connected
Waiting for value (101 ms)
Waiting for value (119 ms)
/iFTTH/images/img2.png
Not Found
/iFTTH/images/img2.png
Not Found

So i'm gessing that, either Chrome and Firefox Don't like the fact that I'm using an USB stick for development, along with a WAMP server running from this same USB stick, or i just Don't set the relative path correctly… BUT as I stated, in EDGE it works fine!
 

Cableguy

Expert
Licensed User
Longtime User
I Don't get it, without making changes to that part of the code, now not even EDGE works… HELP!!!!
 
Upvote 0

alwaysbusy

Expert
Licensed User
Longtime User
USB stick has nothing to do with it. I use an USB SSD myself, even through a VMWare. Good chance Edge has a cached version somewhere. That is the oddball in browserworld.

Also, using a WAMP is unneeded (maybe for the mysql, but the apache and php part are just overkill and may cause trouble). Definitely do not put the ABM app in the Apache www folder.

Open up de browsers consoles and see what their network and console are saying. They may give you a clue.
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
Good chance Edge has a cached version somewhere.
Yeap, seems like it, not I think there's no cache, so no image!

The wamp is just for the MySQL, and I dont use the Apache's www folder, I'm running in debug straight from the IDE for now...

I will try to see what the console says.

Thanks Alain
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…