Jump to content

Question

12 answers to this question

Recommended Posts

  • 0
Posted (edited)

NoSuchMethodError generally comes from compilation time. Your compiled pack expects the existence of a given method, but this method can't be properly retrieved. Often due if you tried to decompile/recompile your pack thinking dezipping it would be enough to edit it.

 

I invite you to properly compile your pack, and replace your libraries only on a SHUTDOWNED server, otherwise you can have remnants of previous stuff floating in JVM.

 

Another possibility is your IDE doesn't link things correctly, here's a topic speaking about it (read first answer) https://stackoverflow.com/questions/35186/how-do-i-fix-a-nosuchmethoderror

Edited by Tryskell
  • 0
Posted (edited)
12 hours ago, AominePride said:

yeah sry guys tried everything i could find for days and couldnt do it.. can someone help me through teamviewer?

 

Hello AominePride. Your error definitely indicates that your default Java environment version for running this server is 9 or newer.

This means a NoSuchMethodError occurs because the server you are trying to run is compatible with  (hopefully) Java 8 or an earlier version.

In newer versions of Java (9+), ByteBuffer class has no longer access to clear() method, resulting in the error mentioned above.

 

If you really want to run this server, you should either install Java 8 or do some dirty work and possibly add Buffer class casts to all ByteBuffer objects that try to call clear() method.

 

Good luck.

Edited by DnR
  • 0
Posted
23 hours ago, DnR said:

 

Hello AominePride. Your error definitely indicates that your default Java environment version for running this server is 9 or newer.

This means a NoSuchMethodError occurs because the server you are trying to run is compatible with  (hopefully) Java 8 or an earlier version.

In newer versions of Java (9+), ByteBuffer class has no longer access to clear() method, resulting in the error mentioned above.

 

If you really want to run this server, you should either install Java 8 or do some dirty work and possibly add Buffer class casts to all ByteBuffer objects that try to call clear() method.

 

Good luck.

tried every version of java from 6-12 nothing ... ofc 6-7 dont even work with the pack anymore if i remember correct and from 8-12 same error

  • 0
Posted (edited)
On 7/7/2019 at 1:06 PM, DnR said:

 

Hello AominePride. Your error definitely indicates that your default Java environment version for running this server is 9 or newer.

This means a NoSuchMethodError occurs because the server you are trying to run is compatible with  (hopefully) Java 8 or an earlier version.

In newer versions of Java (9+), ByteBuffer class has no longer access to clear() method, resulting in the error mentioned above.

 

If you really want to run this server, you should either install Java 8 or do some dirty work and possibly add Buffer class casts to all ByteBuffer objects that try to call clear() method.

 

Good luck.

 

Open JDK 11 works with ByteBuffer clear(), the only needed edit was around ScriptData.

 

Moreover, Oracle JDK 11 is supposed to still have this method, heritated from Buffer https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/ByteBuffer.html

Edited by Tryskell
  • 0
Posted (edited)
23 hours ago, AominePride said:

tried every version of java from 6-12 nothing ... ofc 6-7 dont even work with the pack anymore if i remember correct and

from 8-12 same error

What is your definition of trying? If by any chance you've kept all those versions installed, I doubt you even know which version your server is run with. After doing a bit of search regarding error tips, I realized you are more likely using acis (public sources at least), so yes it must be Java 8 compatible.

 

21 hours ago, Tryskell said:

 

Open JDK 11 works with ByteBuffer clear(), the only needed edit was around ScriptData.

 

Moreover, Oracle JDK 11 is supposed to still have this method, heritated from Buffer https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/ByteBuffer.html

I did not get any spare time to try JDK 11 or even read docs, so thanks a lot for correcting me on this.

However, even though you seem informed, It seems really strange to me that it still didn't cross your mind at first, since this is one of the most common error cases of JDK 8 -> 9 incompatibility in the past 2 years and I believe it's worth checking.

 

@AominePride If you have not yet, please perform a clean installation of JRE 8 and JDK 8. Secondly, if you still have more versions installed, make sure your server is running using the proper version.

 

In worse case, regarding suggestions above, you could also try and run an out-of-the-box compiled version to check whether it's a compilation issue or not.

 

Good luck.

Edited by DnR
  • 0
Posted
1 hour ago, DnR said:

I did not get any spare time to try JDK 11 or even read docs, so thanks a lot for correcting me on this.

However, even though you seem informed, It seems really strange to me that it still didn't cross your mind at first, since this is one of the most common error cases of JDK 8 -> 9 incompatibility in the past 2 years and I believe it's worth checking.

 

What shows the dude is probably coming from aCis. Both package and even lines correspond to it. I moved latest aCis to OpenJDK 11, with no specific error. As I said, the only issue (one line) was regarding my implementation of script loader, ScriptData. We jumped from OracleJDK8 to OpenJDK 11, mostly because of licence issues.

 

So why should I think of something which actually works ? Moreover, I never translated or tested JDK9. I moved directly to 11 - and i'll probably jump to 13 when it will go, if there is.

 

Btw, I invite you to move to JDK11, the default GC is heavily reworked and is way more performant (G1GC). JDK12 doesn't seem to have anything useful for L2J.

  • 0
Posted
23 minutes ago, Tryskell said:

 

What shows the dude is probably coming from aCis. Both package and even lines correspond to it. I moved latest aCis to OpenJDK 11, with no specific error. As I said, the only issue (one line) was regarding my implementation of script loader, ScriptData. We jumped from OracleJDK8 to OpenJDK 11, mostly because of licence issues.

 

Btw, I invite you to move to JDK11, the default GC is heavily reworked and is way more performant (G1GC). JDK12 doesn't seem to have anything useful for L2J.

 

I see, that makes a lot of sense now. I also checked package origins and confirmed it's acis but I noticed that public source build file is set to use Java 8 so I think there is also the question of whether he is using your public or premium source?!

Here is the repository I took a look at: https://xp-dev.com/svn/aCis_public/

 

Regardless, it's him who should post more details about his server origin.

 

About your points regarding JDK 11, this really sounds interesting since GC has always been a pain for developers until now. Thanks a lot for your suggestion.

  • 0
Posted
10 minutes ago, DnR said:

 

About your points regarding JDK 11, this really sounds interesting since GC has always been a pain for developers until now. Thanks a lot for your suggestion.

 

I was using CMS GC until now, because default GC introduces pause time (STW effect) on high RAM usage (geoengine on), a concept which can't exist on real time server (on every GC call, the server is pausing for few ms).

 

I decided to revert to default GC when moving to OpenJDK 11, since G1GC is now  improved AND default. L2OvC is currently using latest aCis and default GC, so Sahar got an overview of RAM consumption and seems happy with the results (1 month online with no variation of RAM usage). So yes, it's a good addition and a burden which dissapears.

 

JDK12 adds a new experimental GC, but it won't fit for real time applications like L2J, so...

  • Upvote 1
  • 0
Posted

well basically i got it working with jdk/jre 9.0.4 and no i dont keep all java versions installed on my pc i delete the old ones or keep them in backup and not installed on the pc.. as for the version of acis i am using its the latest free source available and right now i have no problems except i need to change some codes i found here to fit in the current version.. so thank you for your time and help ..

 

Lock please

Guest
This topic is now closed to further replies.
×
×
  • Create New...