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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...