Jump to content

Question

Posted

Tryskell I was sure that your answer on last topic was the right one.......but it wasn't after compiling it remained the same, check the error.....

 

Dec 24, 2017 4:20:23 AM com.l2jserver.gameserver.data.sql.impl.PetNameTable doesPetNameExist
WARNING: PetNameTable: Could not check existing petname:No value specified for parameter 1
java.sql.SQLException: No value specified for parameter 1
    at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:545)
    at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:513)
    at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:505)
    at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:479)
    at com.mysql.cj.jdbc.PreparedStatement.checkAllParametersSet(PreparedStatement.java:2159)
    at com.mysql.cj.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:2139)
    at com.mysql.cj.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:2076)
    at com.mysql.cj.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1901)
    at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeQuery(ProxyPreparedStatement.java:52)
    at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeQuery(HikariProxyPreparedStatement.java)
    at com.l2jserver.gameserver.data.sql.impl.PetNameTable.doesPetNameExist(PetNameTable.java:45)
    at com.l2jserver.gameserver.network.clientpackets.RequestChangePetName.runImpl(RequestChangePetName.java:70)
    at com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket.run(L2GameClientPacket.java:69)
    at com.l2jserver.gameserver.network.L2GameClient.run(L2GameClient.java:1135)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

 

any ideas :/ ? still can't name freaking pet...............

13 answers to this question

Recommended Posts

  • 1
Posted

aCis version is as following (the query is the same) :

	private static boolean doesPetNameExist(String name)
	{
		boolean result = true;
		try (Connection con = L2DatabaseFactory.getInstance().getConnection();
			PreparedStatement ps = con.prepareStatement(SEARCH_NAME))
		{
			ps.setString(1, name);
			
			final ResultSet rs = ps.executeQuery();
			result = rs.next();
			rs.close();
		}
		catch (SQLException e)
		{
			_log.log(Level.SEVERE, "Couldn't check existing petname.", e);
		}
		return result;
	}

If it doesn't fix it, verify than "name" is correctly set. If nothing works, sorry, but there is no logic, so no answer possible. Most probably you don't refresh the jar correctly, or edit the one of another server installation by error.

  • 0
Posted
Just now, milosvamp said:

I've done it man....I am not joking.... but it brings this error all the time

just do it again man. one more time do it

  • 0
Posted
2 minutes ago, melron said:

just do it again man. one more time do it

but why...............it will be the same man...................

  • 0
Posted
15 hours ago, Tryskell said:

aCis version is as following (the query is the same) :


	private static boolean doesPetNameExist(String name)
	{
		boolean result = true;
		try (Connection con = L2DatabaseFactory.getInstance().getConnection();
			PreparedStatement ps = con.prepareStatement(SEARCH_NAME))
		{
			ps.setString(1, name);
			
			final ResultSet rs = ps.executeQuery();
			result = rs.next();
			rs.close();
		}
		catch (SQLException e)
		{
			_log.log(Level.SEVERE, "Couldn't check existing petname.", e);
		}
		return result;
	}

If it doesn't fix it, verify than "name" is correctly set. If nothing works, sorry, but there is no logic, so no answer possible. Most probably you don't refresh the jar correctly, or edit the one of another server installation by error.

Yes, I understand, on other project it works, thank you. But at this project what I wanted to fix it doesn't work at all, no idea why... Thank you very much for your help. This topic can be locked now....

Guest
This topic is now closed to further replies.


×
×
  • Create New...