Skip to content

Error @votenpc

Featured Replies

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.

Huh.. Check your htm if you have there this shiet, if so remove doctype..

 

 

<!DOCTYPE html>

You have, error is clear. Post your getTopzoneVotes.

Edited by SweeTs

  • Author
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?

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.