B4J Question Error when running webserver on vps (ubuntu 18)

tufanv

Expert
Licensed User
Longtime User
Hello,

Normally I run jar files creatd with b4j without any problem on vps but this time, altough it is working good on my own computer, when I try to run on vps I get this errors:

nohup: ignoring input
Error: Unable to initialize main class b4j.example.main
Caused by: java.lang.NoClassDefFoundError: anywheresoftware/b4a/BA

What may be the problem here?
Thanks
 

DonManfred

Expert
Licensed User
Longtime User
What may be the problem here?
your missing project maybe? How should we answer your question with the ZERO information you provided?
What java version is installed on the VPS? How are you starting your applocation?
 
Upvote 0

tufanv

Expert
Licensed User
Longtime User
I don't think any other info is needed for this problem. default jre is installed on ubuntu 18 as always. I have compiled the app as jar and using nohup to run it. You don't have to be sarcastic while answering in most of the cases on this forum. Don't answer if you don't like to answer or if you don't like the way question asked.

I don't think there is a problem within the code itself as it compiles and runs on my own computer. It is a simple webserver app. The error I am getting from the logs indicates a different problem. I couldn't find this error in any messages on this forum also.

your missing project maybe? How should we answer your question with the ZERO information you provided?
What java version is installed on the VPS? How are you starting your applocation?
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
ou don't have to be sarcastic while answering in most of the cases on this forum. Don't answer if you don't like to answer or if you don't like the way question asked.
Do NOT(!) expect any more answers from me. No helpful and even no not helpful answers.
IGNORE....
 
Upvote 0

jahswant

Well-Known Member
Licensed User
Longtime User
Try to run the app with java -jar your-app.jar and give us the full error. More over I think default jre on Ubuntu 18 is java 8 jre. You may be compiling with higher versions.
 
Upvote 0

tufanv

Expert
Licensed User
Longtime User
Try to run the app with java -jar your-app.jar and give us the full error. More over I think default jre on Ubuntu 18 is java 8 jre. You may be compiling with higher versions.
Thanks for the answer. output for the error is same when I run it as you say:

Error: Unable to initialize main class b4j.example.main
Caused by: java.lang.NoClassDefFoundError: anywheresoftware/b4a/BA

I am compiling with : jdk1.8.0_271 also tried with jdk-11.0.8 with no luck.

I am using these dependencies also but I dont think it is related as the app compiles without a problem and runs.

B4X:
    #CommandLineArgs:
    #AdditionalJar: slf4j-api-1.7.25
    #AdditionalJar: slf4j-nop-1.7.32
    #AdditionalJar: sshj-0.27.0
    #AdditionalJar: eddsa-0.2.0
    #AdditionalJar: bcprov-jdk18on-1.72
    #MergeLibraries: False
 
Upvote 0

tufanv

Expert
Licensed User
Longtime User
Jssh Library does not work with merge libraries true unfortunately as developer also stated. Ubuntu 18 has jdk 11 as default. I never had any problems running my other b4j compiled jar files on ubuntu.
 
Upvote 0
Top