Jump to content
  • 0

Error @votenpc


Saruman

Question

java.lang.NumberFormatException: For input string: "<!DOCTYPE html>"
        at java.lang.NumberFormatException.forInputString(Unknown Source)
        at java.lang.Integer.parseInt(Unknown Source)
        at java.lang.Integer.parseInt(Unknown Source)
        at com.l2jfrozen.gameserver.handler.VoteHandler.getTopZoneVotes(VoteHandler.java:68)
        at com.l2jfrozen.gameserver.handler.VoteHandler.tzvote(VoteHandler.java:84)
        at com.l2jfrozen.gameserver.model.actor.instance.L2VoteManager1Instance.onBypassFeedback(L2VoteManag
        at com.l2jfrozen.gameserver.network.clientpackets.RequestBypassToServer.runImpl(RequestBypassToServe
        at com.l2jfrozen.gameserver.network.clientpackets.L2GameClientPacket.run(L2GameClientPacket.java:77)
        at com.l2jfrozen.gameserver.network.L2GameClient.run(L2GameClient.java:1213)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
java.lang.NumberFormatException: For input string: "<!DOCTYPE html>"
        at java.lang.NumberFormatException.forInputString(Unknown Source)
        at java.lang.Integer.parseInt(Unknown Source)
        at java.lang.Integer.parseInt(Unknown Source)
        at com.l2jfrozen.gameserver.handler.VoteHandler.getTopZoneVotes(VoteHandler.java:68)
        at com.l2jfrozen.gameserver.handler.VoteHandler$1tzvotetask.run(VoteHandler.java:99)
        at com.l2jfrozen.gameserver.thread.ThreadPoolManager$RunnableWrapper.run(ThreadPoolManager.java:95)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

i get this error on gs console.

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0
protected static int getTopZoneVotes()
{
	int votes = -1;
	URL url = null;
	URLConnection con = null;
	InputStream is = null;
	InputStreamReader isr = null;
	BufferedReader in = null;
	try
	{
		url = new URL(Config.VOTES_SITE_TOPZONE_URL);
		con = url.openConnection();    
		con.addRequestProperty("User-Agent", "L2TopZone");
		is = con.getInputStream();
		isr = new InputStreamReader(is);		    
		in = new BufferedReader(isr);
		String inputLine;
		while ((inputLine = in.readLine()) != null)
		{
				if (inputLine.contains("thumbs-up"))
				{
					int startPosition = inputLine.indexOf("</i>") + "</i>".length();
					int endPosition = inputLine.indexOf("</span>", startPosition);
					String ss = inputLine.substring(startPosition, endPosition);
					votes = Integer.valueOf(ss);
					break;
				}

this?

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now


×
×
  • Create New...