B4J Question [SOLVED] BANano WebSocket Server and WebApp: compilation error

Mashiane

Expert
Licensed User
Longtime User
Hi

I am running a BANanoServer example from a template.

1682594606332.png


There is nothing that I have added yet. This is the error i am getting when I compile

B4X:
B4J Version: 9.80
Parsing code.    (0.27s)
    Java Version: 11
Building folders structure.    (0.22s)
Compiling code.    (0.20s)
Compiling layouts code.    (0.00s)
Organizing libraries.    (0.00s)
Compiling generated Java code.    Error
B4J line: 12
End Sub
src\b4j\example\servercorsfilter.java:87: error: no suitable constructor found for FilterHolder(Class<CAP#1>)
    FilterHolder fh = new FilterHolder((Class<? extends Filter>) Class.forName("org.eclipse.jetty.servlets.CrossOriginFilter"));
                      ^
    constructor FilterHolder.FilterHolder(Source) is not applicable
      (argument mismatch; Class<CAP#1> cannot be converted to Source)
    constructor FilterHolder.FilterHolder(Class<? extends jakarta.servlet.Filter>) is not applicable
      (argument mismatch; Class<CAP#1> cannot be converted to Class<? extends jakarta.servlet.Filter>)
    constructor FilterHolder.FilterHolder(jakarta.servlet.Filter) is not applicable
      (argument mismatch; Class<CAP#1> cannot be converted to jakarta.servlet.Filter)
  where CAP#1 is a fresh type-variable:
    CAP#1 extends javax.servlet.Filter from capture of ? extends javax.servlet.Filte

Any advice.

Thanks in advance...
 

DonManfred

Expert
Licensed User
Longtime User
Hard to help with zero informations provided. Where is the projectupload showing the problem?

You are using ABMaterial 5+? You are using jserver 4.00+?

 
Upvote 0

Mashiane

Expert
Licensed User
Longtime User
Hard to help with zero informations provided. Where is the projectupload showing the problem?

You are using ABMaterial 5+? You are using jserver 4.00+?

Thanks but these are two different frameworks.

I was not aware that b4j is perhaps uing jServer 4 or something..
 
Upvote 0
Top