[Solved] The type com.l2jserver.mmocore.MMOClient cannot be resolved.

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
Menoh
Posts: 19
Joined: Wed Oct 12, 2016 10:35 pm

[Solved] The type com.l2jserver.mmocore.MMOClient cannot be resolved.

Post by Menoh »

Hey,

I put the l2j_datapack into Eclipse and got one error in l2j_datapack\dist\game\data\scripts\handlers\admincommandhandlers\AdminEditChar.java
The same problem happens several times and is contained in lines such as this :

String ip = "0.0.0.0";
[...]
ip = client.getConnection().getInetAddress().getHostAddress();

Eclipse says The method getConnection() is undefined for the type L2GameClient.

When I read the com/l2jserver/gameserver/network/L2GameClient.java class no getConnection() method is defined. But getConnection() is sometimes used, as com.l2jserver.mmocore.MMOClient.getConnection(), or as com.l2jserver.commons.database.pool.IConnectionFactory.getConnection(), two very different classes.

Which one should I try to use to solve my problem in AdminEditChar.java ?

Plus in com/l2jserver/ I have no mmocore package. What is it, and where can I download it ? The weird thing is, the mmocore seems to be very important but I have no error at all in my l2j_server project, although this package doesn't exist.
Last edited by Menoh on Sat Nov 05, 2016 12:52 pm, edited 1 time in total.
Sacrifice
Advanced User
Advanced User
Posts: 1026
Joined: Thu Aug 14, 2014 6:31 am

Re: The type com.l2jserver.mmocore.MMOClient cannot be resolved.

Post by Sacrifice »

do you have MMOCore.jar in libs folder :?:
HorridoJoho
L2j Senior Developer
L2j Senior Developer
Posts: 795
Joined: Sun Aug 14, 2005 11:27 am

Re: The type com.l2jserver.mmocore.MMOClient cannot be resolved.

Post by HorridoJoho »

This sounds like a classpath issues. Roll back the ECJ compiler. Try this patch for it to happen: https://bitbucket.org/l2jserver/l2j_ser ... 7c6b069e3d
Sacrifice
Advanced User
Advanced User
Posts: 1026
Joined: Thu Aug 14, 2014 6:31 am

Re: The type com.l2jserver.mmocore.MMOClient cannot be resolved.

Post by Sacrifice »

HorridoJoho wrote:This sounds like a classpath issues. Roll back the ECJ compiler. Try this patch for it to happen: https://bitbucket.org/l2jserver/l2j_ser ... 7c6b069e3d
Or... continue using ECJ compiler 4.5.1 with this... only changing launchers.
viewtopic.php?f=81&t=32111&start=30#p193398

Good luck.
Menoh
Posts: 19
Joined: Wed Oct 12, 2016 10:35 pm

Re: The type com.l2jserver.mmocore.MMOClient cannot be resolved.

Post by Menoh »

Sacrifice wrote:do you have MMOCore.jar in libs folder :?:
Oh yes that's it ! Actually I haven't paid attention to the Referenced Libraries in L2J_Server project because it wasn't called "libs" but now I found the mmocore.jar and added it to Java Built Paths in L2J_DataPack and the error had gone, thanks a lot ^^
Sacrifice
Advanced User
Advanced User
Posts: 1026
Joined: Thu Aug 14, 2014 6:31 am

Re: The type com.l2jserver.mmocore.MMOClient cannot be resolved.

Post by Sacrifice »

Menoh wrote:
Sacrifice wrote:do you have MMOCore.jar in libs folder :?:
Oh yes that's it ! Actually I haven't paid attention to the Referenced Libraries in L2J_Server project because it wasn't called "libs" but now I found the mmocore.jar and added it to Java Built Paths in L2J_DataPack and the error had gone, thanks a lot ^^
:clap: :wave:
HorridoJoho
L2j Senior Developer
L2j Senior Developer
Posts: 795
Joined: Sun Aug 14, 2005 11:27 am

Re: [Solved] The type com.l2jserver.mmocore.MMOClient cannot be resolved.

Post by HorridoJoho »

This is not the right way to solve this problem.

If you have correctly imported the gradle projects into eclipse, everything should work as expected, you shouldn't be required to mess with project settings. Messing with project settings will mess up future updates for you.
Post Reply