Page 1 of 1

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

Posted: Sat Nov 05, 2016 12:57 am
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.

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

Posted: Sat Nov 05, 2016 9:31 am
by Sacrifice
do you have MMOCore.jar in libs folder :?:

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

Posted: Sat Nov 05, 2016 10:17 am
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

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

Posted: Sat Nov 05, 2016 12:36 pm
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.

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

Posted: Sat Nov 05, 2016 12:51 pm
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 ^^

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

Posted: Sat Nov 05, 2016 1:51 pm
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:

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

Posted: Sat Nov 05, 2016 9:06 pm
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.