Jump to content

Question

Posted
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.

5 answers to this question

Recommended Posts

  • 0
Posted

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

 

 

<!DOCTYPE html>
  • 0
Posted (edited)

You have, error is clear. Post your getTopzoneVotes.

Edited by SweeTs
  • 0
Posted
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

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock