B4J Question [BANano] [SOLVED] Trying to Install - Work with BANano Server (Server<-->Client)

Magma

Expert
Licensed User
Longtime User
Well Hi there... I am trying to get work for first time with BANano (that framework get more my caution because of abstract designer ---> design webapps!)

so now i am here... and hope get well working :)

1) First downloaded this - and copy all libs to my Libraries of B4J... decompress and add at settings the folder of additional libraries as needed by the project !
Well for server i downloaded that... and run it... after that at the create objects folder ---> created a server.ini and add all these:
Host=localhost
Port=55056
PortSSL=0
CacheScavengePeriodSeconds=900
SessionMaxInactiveIntervalSeconds=900

but browsing the page at 127.0.0.1:55056 ---> give me a blank page :-(

at the logs getting all these:
Port: 55056
Reading B4J INI in C:\Users\user\AppData\Roaming\Anywhere Software\B4J to find Additional Libraries folder...
Found Additional Libraries folder: C:\Program Files (x86)\Anywhere Software\BANanoLibraries
Starting to transpile...
Loading layout template...
Loading layout uploadform...
Processing b4xlib: bananoskeleton
Adding Layout uploadform used by browserabout
[WARNING]: The method RunFunctionWithResult will not work in old browsers!
[WARNING]: The method RunFunctionWithResult will not work in old browsers!
[ERROR 22]: [BROWSERAbout,skbutton1_click, around line: 0] sktextbox(GLOBALMYCLASSVAR) is not supported in BANano!
-->
--> Current index: 1
--> Var : B4JName: sktextbox1, EventName: sktextbox1, JSName: _sktextbox1 ,ISPRIVATE: true,B4JTYPE: sktextbox, IsArray: false, InitValue: /* sktextbox NOT SUPPORTED */
[ERROR 22]: [BROWSERAbout,skbutton1_click, around line: 0] sktextbox(GLOBALMYCLASSVAR) is not supported in BANano!
-->
--> Current index: 1
--> Var : B4JName: sktextbox1, EventName: sktextbox1, JSName: _sktextbox1 ,ISPRIVATE: true,B4JTYPE: sktextbox, IsArray: false, InitValue: /* sktextbox NOT SUPPORTED */
[ERROR 06]: [BROWSERAbout,skbutton1_click, around line: 0] BANano does not support file.
-->
--> Current next: file --> Current index: 3
--> Current Translation: .
--> Method : ---- METHOD: skbutton1_click (MODULE: BROWSERAbout, ISPRIVATE: false) ----
B4J DECLARE:
LINE NUMBER: 88
ORIGINAL LINE: Sub SKButton1_Click (event As BANanoEvent)
CLEANED LINE: sub skbutton1_click (event as bananoevent)
WORDS: sub|skbutton1_click|(|event|as|bananoevent|)|
INTERNAL VARS:
B4JName: event, EventName: , JSName: __12 ,ISPRIVATE: true,B4JTYPE: bananoevent, IsArray: false, InitValue: null
B4JName: response, EventName: , JSName: __16 ,ISPRIVATE: true,B4JTYPE: bananoobject, IsArray: false, InitValue: null
B4JName: thefile, EventName: , JSName: __17 ,ISPRIVATE: true,B4JTYPE: bananoobject, IsArray: false, InitValue:
RETURNS: B4JTYPE: string, IsArray: false, InitValue: ""
------------------------------
--> Method : ---- METHOD: skbutton1_click (MODULE: BROWSERAbout, ISPRIVATE: false) ----
B4J DECLARE:
LINE NUMBER: 88
ORIGINAL LINE: Sub SKButton1_Click (event As BANanoEvent)
CLEANED LINE: sub skbutton1_click (event as bananoevent)
WORDS: sub|skbutton1_click|(|event|as|bananoevent|)|
INTERNAL VARS:
B4JName: event, EventName: , JSName: __12 ,ISPRIVATE: true,B4JTYPE: bananoevent, IsArray: false, InitValue: null
B4JName: response, EventName: , JSName: __16 ,ISPRIVATE: true,B4JTYPE: bananoobject, IsArray: false, InitValue: null
B4JName: thefile, EventName: , JSName: __17 ,ISPRIVATE: true,B4JTYPE: bananoobject, IsArray: false, InitValue: .
RETURNS: B4JTYPE: string, IsArray: false, InitValue: ""
------------------------------
--> Method : ---- METHOD: skbutton1_click (MODULE: BROWSERAbout, ISPRIVATE: false) ----
B4J DECLARE:
LINE NUMBER: 88
ORIGINAL LINE: Sub SKButton1_Click (event As BANanoEvent)
CLEANED LINE: sub skbutton1_click (event as bananoevent)
WORDS: sub|skbutton1_click|(|event|as|bananoevent|)|
INTERNAL VARS:
B4JName: event, EventName: , JSName: __12 ,ISPRIVATE: true,B4JTYPE: bananoevent, IsArray: false, InitValue: null
B4JName: response, EventName: , JSName: __16 ,ISPRIVATE: true,B4JTYPE: bananoobject, IsArray: false, InitValue: null
B4JName: thefile, EventName: , JSName: __17 ,ISPRIVATE: true,B4JTYPE: bananoobject, IsArray: false, InitValue: _B.%sktextbox1%
RETURNS: B4JTYPE: string, IsArray: false, InitValue: ""
------------------------------
[ERROR 22]: [BROWSERAbout,skbutton1_click, around line: 104] sklabel(GLOBALMYCLASSVAR) is not supported in BANano!
--> SKLabel1.Text = {28} & Response.GetField( {29} ).Result
--> Current index: 1
--> Var : B4JName: sklabel1, EventName: sklabel1, JSName: _sklabel1 ,ISPRIVATE: true,B4JTYPE: sklabel, IsArray: false, InitValue: /* sklabel NOT SUPPORTED */
--> Method : ---- METHOD: skbutton1_click (MODULE: BROWSERAbout, ISPRIVATE: false) ----
B4J DECLARE:
LINE NUMBER: 88
ORIGINAL LINE: Sub SKButton1_Click (event As BANanoEvent)
CLEANED LINE: sub skbutton1_click (event as bananoevent)
WORDS: sub|skbutton1_click|(|event|as|bananoevent|)|
INTERNAL VARS:
B4JName: event, EventName: , JSName: __12 ,ISPRIVATE: true,B4JTYPE: bananoevent, IsArray: false, InitValue: null
B4JName: response, EventName: , JSName: __16 ,ISPRIVATE: true,B4JTYPE: bananoobject, IsArray: false, InitValue: null
B4JName: thefile, EventName: , JSName: __17 ,ISPRIVATE: true,B4JTYPE: bananoobject, IsArray: false, InitValue:
B4JName: prom, EventName: , JSName: __9 ,ISPRIVATE: true,B4JTYPE: bananopromise, IsArray: false, InitValue: BANUpload('/upload',__17)
RETURNS: B4JTYPE: string, IsArray: false, InitValue: ""
------------------------------
Building d:\user\DOWNLO~1\B4JSER~1\Demo\Objects\www\scripts\browserabout.js
Copying CSS files to WebApp assets...
Copying Javascript files to WebApp assets...
EnableLiveCodeSwapping ignored. Only applicable for Build in Debug mode.
Done!
2021-05-17 13:30:45.770:INFO::main: Logging initialized @619ms to org.eclipse.jetty.util.log.StdErrLog
2021-05-17 13:30:45.935:INFO:eek:ejs.Server:main: jetty-9.4.z-SNAPSHOT; built: 2018-05-03T15:56:21.710Z; git: daa59876e6f384329b122929e70a80934569428c; jvm 11.0.1+13
2021-05-17 13:30:45.961:INFO:eek:ejs.session:main: DefaultSessionIdManager workerName=node0
2021-05-17 13:30:45.961:INFO:eek:ejs.session:main: No SessionScavenger set, using defaults
2021-05-17 13:30:45.962:INFO:eek:ejs.session:main: node0 Scavenging every 600000ms
2021-05-17 13:30:45.988:INFO:eek:ejsh.ContextHandler:main: Started o.e.j.s.ServletContextHandler@2a266d09{/,file:///D:/user/downloads/B4JServerDemo/Demo/Objects/www/,AVAILABLE}
2021-05-17 13:30:45.991:INFO:eek:ejs.AbstractNCSARequestLog:main: Opened D:\user\downloads\B4JServerDemo\Demo\Objects\logs\b4j-2021_05_17.request.log
2021-05-17 13:30:46.473:INFO:eek:ejs.AbstractConnector:main: Started ServerConnector@35ff0fc0{HTTP/1.1,[http/1.1]}{0.0.0.0:55056}
2021-05-17 13:30:46.474:INFO:eek:ejs.Server:main: Started @1324ms
2021-05-17 13:30:46.486:INFO:eek:ejs.AbstractConnector:main: Stopped ServerConnector@35ff0fc0{HTTP/1.1,[http/1.1]}{0.0.0.0:55056}
2021-05-17 13:30:46.486:INFO:eek:ejs.session:main: node0 Stopped scavenging
2021-05-17 13:30:46.488:INFO:eek:ejsh.ContextHandler:main: Stopped o.e.j.s.ServletContextHandler@2a266d09{/,file:///D:/user/downloads/B4JServerDemo/Demo/Objects/www/,UNAVAILABLE}
2021-05-17 13:30:46.492:INFO:eek:ejs.Server:main: jetty-9.4.z-SNAPSHOT; built: 2018-05-03T15:56:21.710Z; git: daa59876e6f384329b122929e70a80934569428c; jvm 11.0.1+13
2021-05-17 13:30:46.508:INFO:eek:ejsh.ContextHandler:main: Started o.e.j.s.ServletContextHandler@2a266d09{/,file:///D:/user/downloads/B4JServerDemo/Demo/Objects/www/,AVAILABLE}
2021-05-17 13:30:46.508:INFO:eek:ejs.AbstractNCSARequestLog:main: Opened D:\user\downloads\B4JServerDemo\Demo\Objects\logs\b4j-2021_05_17.request.log
2021-05-17 13:30:46.509:INFO:eek:ejs.session:main: DefaultSessionIdManager workerName=node0
2021-05-17 13:30:46.509:INFO:eek:ejs.session:main: No SessionScavenger set, using defaults
2021-05-17 13:30:46.510:INFO:eek:ejs.session:main: node0 Scavenging every 600000ms
2021-05-17 13:30:46.513:INFO:eek:ejs.AbstractConnector:main: Started ServerConnector@35ff0fc0{HTTP/1.1,[http/1.1]}{0.0.0.0:55056}
2021-05-17 13:30:46.513:INFO:eek:ejs.Server:main: Started @1364ms
2021-05-17 13:30:46.514:INFO:eek:ejs.session:main: node0 Scavenging every 33000ms
Scavenger running... (0 page(s) cached)
Scavenger running... (0 page(s) cached)
Scavenger running... (0 page(s) cached)
Scavenger running... (0 page(s) cached)
Scavenger running... (0 page(s) cached)
Scavenger running... (0 page(s) cached)
Scavenger running... (0 page(s) cached)
Scavenger running... (0 page(s) cached)
Scavenger running... (0 page(s) cached)
Scavenger running... (0 page(s) cached)
Scavenger running... (0 page(s) cached)
Scavenger running... (0 page(s) cached)
Scavenger running... (0 page(s) cached)
Scavenger running... (0 page(s) cached)

Hope that this help me create fast and rapid web apps :)
 

alwaysbusy

Expert
Licensed User
Longtime User
Those are transpiler errors that are shown like something is missing (all point into the BANanoSkeleton direction).

1. Are you running in debug or release mode?
2. Which libraries and which version of the libraries does it show in B4J?
3. I see your additional folder points to " C:\Program Files (x86)\Anywhere Software\BANanoLibraries". Maybe this folder is somehow write protected so the b4xlibs can not be unzipped? I would try to use a more 'normal' folder, like 'C:\B4J\AddLibraries'

Alwaysbusy
 
Upvote 0

Magma

Expert
Licensed User
Longtime User
1. tried both - the same
2. see at pic
3. moved at d:\banano...

but the same...

bananotry.jpg
 
Upvote 0

alwaysbusy

Expert
Licensed User
Longtime User
I'm really puzzled... All your library versions are the same as mine. I now even started from scratch:

1. Fresh B4J install to K:\B4JTest\,
2. copying everything (BANano.jar, BANano.xml and servlet-api-3.1.jar to K:\B4JTest\Libraries + copying BANanoSkeleton.b4xlib and BANanoServer.b4xlib to K:\B4JTest\AddLibraries).
3. Somehow Byeconverter.jar/Byteconverter.xml was not in my k:\B4JTest\Libraries folder, not sure why as I though that was included in the b4J download)
4. Then set my paths (one to my javac.exe and one to my K:\B4JTest\AddLibraries path.
5. Opened the demo
6. Hit run in Release mode

These are my logs (release mode):
B4X:
Port: 55056
Reading B4J INI in C:\Users\pi\AppData\Roaming\Anywhere Software\B4J to find Additional Libraries folder...
Found Additional Libraries folder: K:\B4JTest\AddLibraries
Starting to transpile...
Loading layout template...
Loading layout uploadform...
Processing b4xlib: bananoskeleton
Adding Layout uploadform used by browserabout
[WARNING]: The method RunFunctionWithResult will not work in old browsers!
[WARNING]: The method RunFunctionWithResult will not work in old browsers!
Building K:\BANanoServer1.23\B4JServerDemo\Demo\Objects\www\scripts\browserabout.js
Copying CSS files to WebApp assets...
Copying Javascript files to WebApp assets...
OPTMIZATION TIPS
----------------------
You are using A LOT of seperate CSS and JS files! This demands a lot of server roundtrips which can slow down your website/webapp considerably
This results in fewer page views, a decreased customer satisfaction and ultimately a loss in sales conversions
EnableLiveCodeSwapping ignored.  Only applicable for Build in Debug mode.
Done!
2021-05-17 13:29:05.758:INFO::main: Logging initialized @21042ms to org.eclipse.jetty.util.log.StdErrLog
2021-05-17 13:29:05.910:INFO:oejs.Server:main: jetty-9.4.z-SNAPSHOT; built: 2018-05-03T15:56:21.710Z; git: daa59876e6f384329b122929e70a80934569428c; jvm 11.0.1+13
2021-05-17 13:29:05.940:INFO:oejs.session:main: DefaultSessionIdManager workerName=node0
2021-05-17 13:29:05.940:INFO:oejs.session:main: No SessionScavenger set, using defaults
2021-05-17 13:29:05.942:INFO:oejs.session:main: node0 Scavenging every 600000ms
2021-05-17 13:29:05.971:INFO:oejsh.ContextHandler:main: Started o.e.j.s.ServletContextHandler@1d8bd0de{/,file:///K:/BANanoServer1.23/B4JServerDemo/Demo/Objects/www/,AVAILABLE}
2021-05-17 13:29:05.974:INFO:oejs.AbstractNCSARequestLog:main: Opened K:\BANanoServer1.23\B4JServerDemo\Demo\Objects\logs\b4j-2021_05_17.request.log
2021-05-17 13:29:07.041:INFO:oejs.AbstractConnector:main: Started ServerConnector@932bc4a{HTTP/1.1,[http/1.1]}{0.0.0.0:55056}
2021-05-17 13:29:07.042:INFO:oejs.Server:main: Started @22328ms
2021-05-17 13:29:07.068:INFO:oejs.AbstractConnector:main: Stopped ServerConnector@932bc4a{HTTP/1.1,[http/1.1]}{0.0.0.0:55056}
2021-05-17 13:29:07.069:INFO:oejs.session:main: node0 Stopped scavenging
2021-05-17 13:29:07.071:INFO:oejsh.ContextHandler:main: Stopped o.e.j.s.ServletContextHandler@1d8bd0de{/,file:///K:/BANanoServer1.23/B4JServerDemo/Demo/Objects/www/,UNAVAILABLE}
2021-05-17 13:29:07.102:INFO:oejs.Server:main: jetty-9.4.z-SNAPSHOT; built: 2018-05-03T15:56:21.710Z; git: daa59876e6f384329b122929e70a80934569428c; jvm 11.0.1+13
2021-05-17 13:29:07.106:INFO:oejsh.ContextHandler:main: Started o.e.j.s.ServletContextHandler@1d8bd0de{/,file:///K:/BANanoServer1.23/B4JServerDemo/Demo/Objects/www/,AVAILABLE}
2021-05-17 13:29:07.107:INFO:oejs.AbstractNCSARequestLog:main: Opened K:\BANanoServer1.23\B4JServerDemo\Demo\Objects\logs\b4j-2021_05_17.request.log
2021-05-17 13:29:07.108:INFO:oejs.session:main: DefaultSessionIdManager workerName=node0
2021-05-17 13:29:07.108:INFO:oejs.session:main: No SessionScavenger set, using defaults
2021-05-17 13:29:07.108:INFO:oejs.session:main: node0 Scavenging every 660000ms
2021-05-17 13:29:07.116:INFO:oejs.AbstractConnector:main: Started ServerConnector@932bc4a{HTTP/1.1,[http/1.1]}{0.0.0.0:55056}
2021-05-17 13:29:07.117:INFO:oejs.Server:main: Started @22403ms
2021-05-17 13:29:07.118:INFO:oejs.session:main: node0 Scavenging every 33000ms
Connected
Saving the first instance
PageID: 83f9e8b7-8f88-4338-8e43-4938cd678f18
Comes From Cache:false
Is a reconnecting socket: true
BROWSER says sum of 20+30=50
First: 3
Second: 6
BROWSER says 'Hello from the BROWSER!'
Human.Name (changed in the browser) is Alain Bailleul
Scavenger running... (1 page(s) cached)
Scavenger running... (1 page(s) cached)
Scavenger running... (1 page(s) cached)
Scavenger running... (1 page(s) cached)

The errors like this:
B4X:
[ERROR 22]: [BROWSERAbout,skbutton1_click, around line: 0] sktextbox(GLOBALMYCLASSVAR) is not supported in BANano!
are typical BANano Errors if e.g. it can not find one of the BANano b4xlib libraries.

Maybe check if you do not have doubles in these files (like both in K:\B4J\Libraries AND in K:\B4J\AddLibraries)?

have in mind using open java 11... or need java 8 ?
Me too, but it should not even matter. The logs above are coming from BANano itself.

I've uploaded this fresh setup: http://gorgeousapps.com/B4JTest.zip

1. Start the B4J.exe from the K:\B4JTest folder! (important as it may otherwise open your other installation)
2. You will need to change the Additional Libraries path in B4J as your drive is probably not K: and your javac.exe is located elsewhere too.
3. Open de DemoServer.b4j file from K:\BANanoServer1.23\B4JServerDemo\Demo\ from within this B4J.

Run
 
Upvote 0

RWK

Member
Licensed User
I had this error also with Mashys bvad3.
I had followed the advice in one of Erels tutorials advising the handling of the external library folder.

Created a AddLib folder
In AddLib folder created B4J, B4I, B4A, B4R, B4X folders
In, in this case B4J, Settings set the Additional Folder Path to : /AddLib

This works well for all sorts of Libs B4J will automatically find the librarys in the SubFolders B4J and B4X

but with banano and bvad3 i had to move the b4xlibs from B4X folder to B4J folder so that transpiling works.
The B4J compiling works in both cases.

Greetings
Rainer
 
Upvote 0

Magma

Expert
Licensed User
Longtime User
Okay - is there any tutorial how all these react (works) / extra examples for adding textboxes, combo other things?

now as i understand same time run-debugging going to Files Manager->open designer right from uploadform... making changes / save... refresh the localhost..
from the server side the /about (that a client run from browser --> goes to BROWSERabout // here loads the template of uploadfrom and the code for skbutton)...

but had some gaps how to limit a textbox (max. chars) / max width.... how to put at the same line a label and a textbox (at abstract i am doing) but from client-browser all seems goes down from div "gravity"...

seems little difficult with no tutorial or a builder :-(


+++ i have to ask....
why this is exist:
Server.BANano.TranspilerOptions.SetStaticFolder("www") - well understand why :)

Why need to have real html files... and not produced realtime from serverside as in reality had... ? can't understand the idea... seems used for uploading but for cache too.. and assets... well need to read a lot of tutorials :)

need a lot of reading :)
 
Last edited:
Upvote 0
Top