netty
netty
JCHJava Community | Help. Code. Learn.
Created by netty on 7/22/2024 in #java-help
apache Mina sshd
If anyone had expierence with Apache Mina and setting up a ssh server please tell me. I got an issue where my client session are mixxed up if there’s more than 1 of them… (the 2nd user becomes the first) Tell me guys I am tired of posting the code
11 replies
JCHJava Community | Help. Code. Learn.
Created by netty on 7/12/2024 in #java-help
When vThreads in Eclipse
hi, when will Eclipse 2023 support vThreads and JRE 19 or higher?
7 replies
JCHJava Community | Help. Code. Learn.
Created by netty on 6/7/2024 in #java-help
Apache Mina SSHD server
No description
6 replies
JCHJava Community | Help. Code. Learn.
Created by netty on 6/4/2024 in #java-help
Apache Mina weird session behaviour
No description
5 replies
JCHJava Community | Help. Code. Learn.
Created by netty on 6/3/2024 in #java-help
Apache Mina
No description
5 replies
JCHJava Community | Help. Code. Learn.
Created by netty on 5/27/2024 in #java-help
Java mina sshd
Hi guys, I want to build an SSH server with Java mina and finally managed to get all the dependencies necessary to resolve class missing errors. Now I am encountering a new error which just blows my mind....
Unexpected problem occurred during version sanity check
Reported exception:
java.lang.AbstractMethodError: Receiver class org.slf4j.simple.SimpleServiceProvider does not define or inherit an implementation of the resolved method 'abstract java.lang.String getRequestedApiVersion()' of interface org.slf4j.spi.SLF4JServiceProvider.
at org.slf4j.LoggerFactory.versionSanityCheck(LoggerFactory.java:366)
at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:184)
at org.slf4j.LoggerFactory.getProvider(LoggerFactory.java:490)
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:476)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:425)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:451)
at org.apache.sshd.common.util.logging.AbstractLoggingBean.<init>(AbstractLoggingBean.java:66)
at org.apache.sshd.common.util.logging.AbstractLoggingBean.<init>(AbstractLoggingBean.java:44)
at org.apache.sshd.common.auth.AbstractUserAuthMethodFactory.<init>(AbstractUserAuthMethodFactory.java:36)
at org.apache.sshd.server.auth.AbstractUserAuthFactory.<init>(AbstractUserAuthFactory.java:32)
at org.apache.sshd.server.auth.pubkey.UserAuthPublicKeyFactory.<init>(UserAuthPublicKeyFactory.java:57)
at org.apache.sshd.server.auth.pubkey.UserAuthPublicKeyFactory.<init>(UserAuthPublicKeyFactory.java:53)
at org.apache.sshd.server.auth.pubkey.UserAuthPublicKeyFactory$1.<init>(UserAuthPublicKeyFactory.java:36)
at org.apache.sshd.server.auth.pubkey.UserAuthPublicKeyFactory.<clinit>(UserAuthPublicKeyFactory.java:36)
at org.apache.sshd.server.ServerAuthenticationManager.<clinit>(ServerAuthenticationManager.java:56)
at src.Main.main(Main.java:19)
Unexpected problem occurred during version sanity check
Reported exception:
java.lang.AbstractMethodError: Receiver class org.slf4j.simple.SimpleServiceProvider does not define or inherit an implementation of the resolved method 'abstract java.lang.String getRequestedApiVersion()' of interface org.slf4j.spi.SLF4JServiceProvider.
at org.slf4j.LoggerFactory.versionSanityCheck(LoggerFactory.java:366)
at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:184)
at org.slf4j.LoggerFactory.getProvider(LoggerFactory.java:490)
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:476)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:425)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:451)
at org.apache.sshd.common.util.logging.AbstractLoggingBean.<init>(AbstractLoggingBean.java:66)
at org.apache.sshd.common.util.logging.AbstractLoggingBean.<init>(AbstractLoggingBean.java:44)
at org.apache.sshd.common.auth.AbstractUserAuthMethodFactory.<init>(AbstractUserAuthMethodFactory.java:36)
at org.apache.sshd.server.auth.AbstractUserAuthFactory.<init>(AbstractUserAuthFactory.java:32)
at org.apache.sshd.server.auth.pubkey.UserAuthPublicKeyFactory.<init>(UserAuthPublicKeyFactory.java:57)
at org.apache.sshd.server.auth.pubkey.UserAuthPublicKeyFactory.<init>(UserAuthPublicKeyFactory.java:53)
at org.apache.sshd.server.auth.pubkey.UserAuthPublicKeyFactory$1.<init>(UserAuthPublicKeyFactory.java:36)
at org.apache.sshd.server.auth.pubkey.UserAuthPublicKeyFactory.<clinit>(UserAuthPublicKeyFactory.java:36)
at org.apache.sshd.server.ServerAuthenticationManager.<clinit>(ServerAuthenticationManager.java:56)
at src.Main.main(Main.java:19)
The code I am trying to run:
6 replies
JCHJava Community | Help. Code. Learn.
Created by netty on 5/24/2024 in #java-help
Netty docu?
Hi, does anyone have a guided netty documentation to understand eventloops and how the framework handles threads internally?
5 replies
JCHJava Community | Help. Code. Learn.
Created by netty on 5/19/2024 in #java-help
Java send data through serverSocket
So.. I got this listener for a remote application telnet server https://pastebin.com/ihfk7F4m and this input handler https://pastebin.com/n8x5i0L6 the problem is, that once you connect to the listener on port 999 for example using telnet, it seems that sending data through the serverSocket messes up any Strings.... and puts questionmarks in front of the username for example or password which is a writer.println statement.... Someone pointed that sending data through a serverSocket should not be done but people are literally making chatrooms with that type of code and it works just fine, maybe the issue is printWriter itself, I dont know. Someone help me please! If anyone has a better solution than serverSocket please let me know
7 replies
JCHJava Community | Help. Code. Learn.
Created by netty on 5/18/2024 in #java-help
Java printwriter issues
Hi guys, my problem is literally in the title... Everytime I give my writer a String input, those weird questionmarks are added in front of the String which unables me to check for the given user in the database... (screenshot) The code I am using: https://pastebin.com/hMaX63zy
51 replies
JCHJava Community | Help. Code. Learn.
Created by netty on 5/17/2024 in #java-help
Listener server for remote application
Hi guys, short and easy, I need this https://gist.github.com/martinomburajr/62ddb88d2a3e7e98ce8681c989f9e135 where multiple users are able to connect to the port and every client will receive their own socket, how do I do that?
19 replies
JCHJava Community | Help. Code. Learn.
Created by netty on 5/12/2024 in #java-help
Best libary for a telnet server?
Uh ye the question is in the title, I just want to be able to connect to the application via telnet ik it can be done with server socket but it’s very messy
16 replies
JCHJava Community | Help. Code. Learn.
Created by netty on 5/7/2024 in #java-help
JSONArray
Hi guys, I am getting the following error when I am trying to run the code in the pastebin link and I dont really understand why as I copied from a doc which worked on the video....
Exception in thread "main" java.lang.ClassCastException: class org.json.simple.JSONObject cannot be cast to class org.json.simple.JSONArray (org.json.simple.JSONObject and org.json.simple.JSONArray are in unnamed module of loader 'app')
at main.ConfigurationHandler.readConfigFile(ConfigurationHandler.java:32)
at main.MainS.main(MainS.java:21)
Exception in thread "main" java.lang.ClassCastException: class org.json.simple.JSONObject cannot be cast to class org.json.simple.JSONArray (org.json.simple.JSONObject and org.json.simple.JSONArray are in unnamed module of loader 'app')
at main.ConfigurationHandler.readConfigFile(ConfigurationHandler.java:32)
at main.MainS.main(MainS.java:21)
https://pastebin.com/hGiZ1gz0 Halwp
64 replies
JCHJava Community | Help. Code. Learn.
Created by netty on 4/30/2024 in #java-help
Java .properties read Strings with the same name
Ok so I got a .properties file in my Project and now, I would like to read every single property, which starts with "API" in this example and return it as a list or something, how can I do that
55 replies
JCHJava Community | Help. Code. Learn.
Created by netty on 4/29/2024 in #java-help
PreparedStatement POST request?
Hi guys, I got a very weird question... I am using PreparedStatement and DBConnection for my SQL in my Project, the point is, you can set strings or ints with stmt.setString(VALUE), what I would like to do is, read a link out of a .properties file for example https://google.com and then modify the URL at certain points, for example https://google.com=?aasfn902q3basfsiopadh234r? replace the "?" with a variable or something else. Basically just like setString in PreparedStatement but for POST requests, but I guess that this is not done by using a SQL package but something else. Any ideas lmk
18 replies
JCHJava Community | Help. Code. Learn.
Created by netty on 4/24/2024 in #java-help
Calculate a date in the future with current date and amount of days given
Hi guys, i want to calculate a date in the future with the CURRENT date AND a specifc amount of days for example access time.
6 replies
JCHJava Community | Help. Code. Learn.
Created by netty on 4/24/2024 in #java-help
Calculate amount of time between 2 dates
Hi guys, i want to calculate a date in the future with the CURRENT date AND a specifc amount of days for example access time.
8 replies
JCHJava Community | Help. Code. Learn.
Created by netty on 4/23/2024 in #java-help
Logical issue in while loop?
Hi guys, I have a problem with this code: https://pastebin.com/nzLaR4MW Everytime I use the "users add" option and complete the input, after the database did its thing, my prompt and UI is displayed 2 times for some odd reason... UI: https://pastebin.com/f6Vp0ah3
17 replies
JCHJava Community | Help. Code. Learn.
Created by netty on 4/19/2024 in #java-help
Maven weird behaviour
Hi, I just started using Maven to manage my project structure as this was needed for a package which I could not find online to download. And now, when I try to compile or run my program, it throws shitty errors which make 0 sense and were never a thing before (for example, that imported packages/dependencies are not found or do not have a class or something). Does anyone know why that happens?
15 replies
JCHJava Community | Help. Code. Learn.
Created by netty on 4/19/2024 in #java-help
Maven issues
No description
10 replies
JCHJava Community | Help. Code. Learn.
Created by netty on 4/18/2024 in #java-help
SQL table not being selected properly?
Hi guys, I got an issue with my user permission validation system and do not know how to fix it... I will send my DB and the code which is not working below... The part, which seems to be the issue, is commented also. If any other classes are needed, tell me. Class with broken code: https://pastebin.com/TFhEy2Qn SQL: https://pastebin.com/mzbKUk62 Adding users works just fine, just if you are on a user without root permissions, it becomes bugged and malfunctions.
4 replies