B4J Question [B4J Server] AddFilter Error

LJG

Member
I am using the B4J Server Demo to test SSL ... but I ran into an error when adding the AddFilter.

I have successfully created a "keystore.jks" file and everything works fine without AddFilter. But when I add the AddFilter (srvr.AddFilter("/*", "HttpsFilter", False) I get the following error in the server log:

AddFilter Error:
Waiting for debugger to connect...
Program started.
2021-08-27 09:33:39.110:INFO::main: Logging initialized @650ms to org.eclipse.jetty.util.log.StdErrLog
Error occurred on line: 23
java.lang.ClassNotFoundException: b4j.example.httpsfilter
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
    at java.base/java.lang.Class.forName0(Native Method)
    at java.base/java.lang.Class.forName(Class.java:315)
    at anywheresoftware.b4j.object.ServerWrapper.Start(ServerWrapper.java:181)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at anywheresoftware.b4a.shell.Shell.runVoidMethod(Shell.java:676)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:240)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:167)

Thanks for your help.
 

DonManfred

Expert
Licensed User
Longtime User
Did you added a module HttpsFilter to your project? Seems that not
 
Upvote 0
Top