B4J Question [SOLVED] ABMaterial - how to get the template project to work ?

semar

Active Member
Licensed User
Longtime User
Dear all,
I've installed ABMaterial, and I'm following this tutorial:
https://www.b4x.com/android/forum/threads/abmaterial-for-dummies-beginner-lessons.88346/

I've downloaded the lesson2.zip and put in the template folder of ABMaterial overriding all the files, as suggested. I'm running the latest version of B4J and ABMaterial has the version 4.30

Then I've loaded the template.b4j project and run it.

In the browser (firefox) I then open the address http://localhost:51045/template/
but only a coloured circle animation occurs, and in the log of B4J idle I read at the end:
Trying to open: http://localhost:51045/template
/css/materialize.4.26.min.css
Not Found
/js/core.4.30.min.js
Not Found

In the ABMShared there is this command:
Public AppName As String = ""
which I changed then to
Public AppName As String = "template"
But it does not work either.

Here the complete log from the idle.
B4X:
Waiting for debugger to connect...
Program started.
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)
DBM.bas
ABMShared.bas
ABMLoginHandler.bas
ABMCacheScavenger.bas
ABMCacheControl.bas
ABMErrorHandler.bas
ABMRootFilter.bas
ABMPageTemplate.bas
AboutPage.bas
ABMApplication.bas
HomePage.bas
Template.b4j
Analysing data from B4J source files... (2/2)
loading C:\ABMATE~1\Template\Objects: copymewithjar.needs...
Using cache system: 3.0
Needs material/awesome icons
Building C:\ABMATE~1\Template\Objects\copymewithjar.js.needs
Building core.min.1552685368372.css...
2019-03-15 22:29:29.320:INFO::main: Logging initialized @1614ms to org.eclipse.jetty.util.log.StdErrLog
2019-03-15 22:29:29.519:INFO:oejs.Server:main: jetty-9.4.z-SNAPSHOT; built: 2018-05-03T15:56:21.710Z; git: daa59876e6f384329b122929e70a80934569428c; jvm 1.8.0_201-b09
2019-03-15 22:29:29.605:INFO:oejs.session:main: DefaultSessionIdManager workerName=node0
2019-03-15 22:29:29.605:INFO:oejs.session:main: No SessionScavenger set, using defaults
2019-03-15 22:29:29.608:INFO:oejs.session:main: node0 Scavenging every 660000ms
2019-03-15 22:29:29.647:INFO:oejsh.ContextHandler:main: Started o.e.j.s.ServletContextHandler@2c039ac6{/,file:///C:/ABMaterial_4_30/Template/Objects/www/,AVAILABLE}
2019-03-15 22:29:29.651:INFO:oejs.AbstractNCSARequestLog:main: Opened C:\ABMaterial_4_30\Template\Objects\logs\b4j-2019_03_15.request.log
2019-03-15 22:29:29.803:INFO:oejs.AbstractConnector:main: Started ServerConnector@26920509{HTTP/1.1,[http/1.1]}{0.0.0.0:51045}
2019-03-15 22:29:29.803:INFO:oejs.Server:main: Started @2099ms
Emulated network latency: 100ms
2019-03-15 22:29:29.822:INFO:oejs.AbstractConnector:main: Stopped ServerConnector@26920509{HTTP/1.1,[http/1.1]}{0.0.0.0:51045}
2019-03-15 22:29:29.822:INFO:oejs.session:main: node0 Stopped scavenging
2019-03-15 22:29:29.824:INFO:oejsh.ContextHandler:main: Stopped o.e.j.s.ServletContextHandler@2c039ac6{/,file:///C:/ABMaterial_4_30/Template/Objects/www/,UNAVAILABLE}
2019-03-15 22:29:29.830:INFO:oejs.Server:main: jetty-9.4.z-SNAPSHOT; built: 2018-05-03T15:56:21.710Z; git: daa59876e6f384329b122929e70a80934569428c; jvm 1.8.0_201-b09
2019-03-15 22:29:29.836:INFO:oejsh.ContextHandler:main: Started o.e.j.s.ServletContextHandler@2c039ac6{/,file:///C:/ABMaterial_4_30/Template/Objects/www/,AVAILABLE}
2019-03-15 22:29:29.837:INFO:oejs.AbstractNCSARequestLog:main: Opened C:\ABMaterial_4_30\Template\Objects\logs\b4j-2019_03_15.request.log
2019-03-15 22:29:29.837:INFO:oejs.session:main: DefaultSessionIdManager workerName=node0
2019-03-15 22:29:29.837:INFO:oejs.session:main: No SessionScavenger set, using defaults
2019-03-15 22:29:29.837:INFO:oejs.session:main: node0 Scavenging every 600000ms
2019-03-15 22:29:29.840:INFO:oejs.AbstractConnector:main: Started ServerConnector@26920509{HTTP/1.1,[http/1.1]}{0.0.0.0:51045}
2019-03-15 22:29:29.840:INFO:oejs.Server:main: Started @2135ms
2019-03-15 22:29:29.841:INFO:oejs.session:main: node0 Scavenging every 900000ms
Viewer running on os: windows 7
Trying to open: http://localhost:51045/template
/css/materialize.4.26.min.css
Not Found
/js/core.4.30.min.js
Not Found

What I'm doing wrong ? The demo project works flawlessy.

I want however start with small projects, that's why I've tried the tutorial, but no joy.

Pleas help

Regards,
Sergio
 

semar

Active Member
Licensed User
Longtime User
[SOLVED]
This thread about using chrome to find out missing files was really helpful : https://www.b4x.com/android/forum/t...primary-page-of-the-webapp.97936/#post-617270

The files that were missing - comparing the template project in lesson 2 with the demo, were:
core.4.30.min.js
materialize.4.26.min.css
favicon.ico

Note that the tutorial file "ABMaterialForDummies.zip" does not have these files, that's why it did not work !

Once copied the files to the related directories of the template project, everything has worked as expected.

May be is helpful for someone else having the same prob.. hem, challenge ;-)

Regards,
Sergio
 
Last edited:
Upvote 0

Harris

Expert
Licensed User
Longtime User
Go on you for getting through that issue.
I just wonder if any others that have gone through these lessons had experienced the same issue?
That issue, I have heard from to date, until now.

Thanks
 
Last edited:
Upvote 0

John Naylor

Active Member
Licensed User
Longtime User
I know this thread is a few months old but I'll confirm I have literally just had the same issue (I'm just starting out with ABMaterial).

I didn't use the Chrome method as you did @semar - When I tried running the lesson2 template and accessing it in my browser there were mentions of the three files being missing in the b4j log window.

For others reading, you can find the files in the template folder of the ABMaterial (4.3 in my case also) dowload, they're just not included in the lesson zip file I assume because of its age and they weren't originally required with older versions of ABMaterial.

I was going to post up a thread describing my issue and fix but you have already done it perfectly!
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…