ajanata / PretendYoureXyzzy

A web clone of the card game Cards Against Humanity.
https://pretendyoure.xyz/zy
BSD 2-Clause "Simplified" License
1.22k stars 397 forks source link

issue when compiling for tomcat 7 #140

Closed dualznz closed 9 years ago

dualznz commented 9 years ago

hi i have the latest build of xampp running, installed tomcat 7 & latest java JRE, wen to load up this src ip:8080/cah/WebContent click on take me to the game then i get this thrown at me. not sure what to do, some help would be great thanks.

HTTP Status 500 - Unable to compile class for JSP:

type Exception report

message Unable to compile class for JSP:

description The server encountered an internal error that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: [15] in the generated java file: [C:\xampp\tomcat\work\Catalina\localhost\cah\org\apache\jsp\WebContent\game_jsp.java] Only a type can be imported. net.socialgamer.cah.data.GameOptions resolves to a package

An error occurred at line: 413 in the jsp file: /WebContent/game.jsp GameOptions.MIN_SCORE_LIMIT cannot be resolved to a type 410: 411: 412: <% 413: for (int i = GameOptions.MIN_SCORE_LIMIT; i <= GameOptions.MAX_SCORE_LIMIT; i++) { 414: %> 415: <option <%= i == GameOptions.DEFAULT_SCORE_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %> 416: <% } %>

An error occurred at line: 415 in the jsp file: /WebContent/game.jsp GameOptions.DEFAULT_SCORE_LIMIT cannot be resolved to a type 412: <% 413: for (int i = GameOptions.MIN_SCORE_LIMIT; i <= GameOptions.MAX_SCORE_LIMIT; i++) { 414: %> 415: <option <%= i == GameOptions.DEFAULT_SCORE_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %> 416: <% } %> 417: 418:

An error occurred at line: 423 in the jsp file: /WebContent/game.jsp GameOptions.MIN_PLAYER_LIMIT cannot be resolved to a type 420: <select id="player_limit_template" class="player_limit" 421: aria-label="Player limit. Having more than 10 players may cause issues both for screen readers and traditional browsers."> 422: <% 423: for (int i = GameOptions.MIN_PLAYER_LIMIT; i <= GameOptions.MAX_PLAYER_LIMIT; i++) { 424: %> 425: <option <%= i == GameOptions.DEFAULT_PLAYER_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %> 426: <% } %>

An error occurred at line: 423 in the jsp file: /WebContent/game.jsp GameOptions.MAX_PLAYER_LIMIT cannot be resolved to a type 420: <select id="player_limit_template" class="player_limit" 421: aria-label="Player limit. Having more than 10 players may cause issues both for screen readers and traditional browsers."> 422: <% 423: for (int i = GameOptions.MIN_PLAYER_LIMIT; i <= GameOptions.MAX_PLAYER_LIMIT; i++) { 424: %> 425: <option <%= i == GameOptions.DEFAULT_PLAYER_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %> 426: <% } %>

An error occurred at line: 425 in the jsp file: /WebContent/game.jsp GameOptions.DEFAULT_PLAYER_LIMIT cannot be resolved to a type 422: <% 423: for (int i = GameOptions.MIN_PLAYER_LIMIT; i <= GameOptions.MAX_PLAYER_LIMIT; i++) { 424: %> 425: <option <%= i == GameOptions.DEFAULT_PLAYER_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %> 426: <% } %> 427: 428: Having more than 10 players may get cramped!

An error occurred at line: 434 in the jsp file: /WebContent/game.jsp GameOptions.MIN_SPECTATOR_LIMIT cannot be resolved to a type 431: <select id="spectator_limit_template" class="spectator_limit" 432: aria-label="Spectator limit."> 433: <% 434: for (int i = GameOptions.MIN_SPECTATOR_LIMIT; i <= GameOptions.MAX_SPECTATOR_LIMIT; i++) { 435: %> 436: <option <%= i == GameOptions.DEFAULT_SPECTATOR_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %> 437: <% } %>

An error occurred at line: 434 in the jsp file: /WebContent/game.jsp GameOptions.MAX_SPECTATOR_LIMIT cannot be resolved to a type 431: <select id="spectator_limit_template" class="spectator_limit" 432: aria-label="Spectator limit."> 433: <% 434: for (int i = GameOptions.MIN_SPECTATOR_LIMIT; i <= GameOptions.MAX_SPECTATOR_LIMIT; i++) { 435: %> 436: <option <%= i == GameOptions.DEFAULT_SPECTATOR_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %> 437: <% } %>

An error occurred at line: 436 in the jsp file: /WebContent/game.jsp GameOptions.DEFAULT_SPECTATOR_LIMIT cannot be resolved to a type 433: <% 434: for (int i = GameOptions.MIN_SPECTATOR_LIMIT; i <= GameOptions.MAX_SPECTATOR_LIMIT; i++) { 435: %> 436: <option <%= i == GameOptions.DEFAULT_SPECTATOR_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %> 437: <% } %> 438: 439: Spectators can watch and chat, but not actually play. Not even as Czar.

An error occurred at line: 458 in the jsp file: /WebContent/game.jsp GameOptions.MIN_BLANK_CARD_LIMIT cannot be resolved to a type 455:

An error occurred at line: 460 in the jsp file: /WebContent/game.jsp GameOptions.DEFAULT_BLANK_CARD_LIMIT cannot be resolved to a type 457: <% 458: for (int i = GameOptions.MIN_BLANK_CARD_LIMIT; i <= GameOptions.MAX_BLANK_CARD_LIMIT; i++) { 459: %> 460: <option <%= i == GameOptions.DEFAULT_BLANK_CARD_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %> 461: <% } %> 462: blank white cards. 463:

Stacktrace: org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:103) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:366) org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:485) org.apache.jasper.compiler.Compiler.compile(Compiler.java:379) org.apache.jasper.compiler.Compiler.compile(Compiler.java:354) org.apache.jasper.compiler.Compiler.compile(Compiler.java:341) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:657) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339) javax.servlet.http.HttpServlet.service(HttpServlet.java:727) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) note The full stack trace of the root cause is available in the Apache Tomcat/7.0.56 logs.

noahp78 commented 9 years ago

Having the same issue. looks like it's trying to import something (first error?) "Only a type can be imported. net.socialgamer.cah.data.GameOptions resolves to a package"

uecasm commented 9 years ago

Something sounds wrong in your setup. If you export a WAR file and then install that, then you should be browsing to http://ip:port/cah/, which will then take you to http://ip:port/cah/game.jsp once you click through the initial page. In particular WebContent should not be a path that exists on a live server, IIRC.

I've had CAH running quite happily on (probably an older version of) Tomcat 7 for quite a while, although admittedly I haven't updated my copy in a few months.

dualznz commented 9 years ago

hrmm i might go back to an earlier version, and see what happens how do i do the WAR? there aint that great of documentation for this, im a php dude lol

noahp78 commented 9 years ago

I fixed my problem with cleaning the workspace, building the maven project first (maven package) and building it again.

On Wed, Mar 4, 2015 at 3:44 AM, dualznz notifications@github.com wrote:

hrmm i might go back to an earlier version, and see what happens how do i do the WAR? there aint that great of documentation for this, im a php dude lol

— Reply to this email directly or view it on GitHub https://github.com/ajanata/PretendYoureXyzzy/issues/140#issuecomment-77087383 .

dualznz commented 9 years ago

ahh kk how do u build the maven project

dualznz commented 9 years ago

ok so i imported it into eclipse, then exported WAR, even created a tomcat server within eclipse and i still get this error thopwn at me

ajanata commented 9 years ago

I had a similar problem with Eclipse marking those errors in the jsp files. I believe I fixed that by updating the build path. I don't know why Tomcat would be having a problem.

At this point, you're probably better off using Maven to make the war: mvn clean package war:war

If that has similar problems I can try to take a look at it, but I am about to go on vacation, followed by a busy month of other things. It definitely is working in Tomcat for me, making the war in the manner described: that is how my servers are running.

dualznz commented 9 years ago

ok, im going to try it in debian to see if it makes any difference, its annoying though

noahp78 commented 9 years ago

Are you using eclipse: http://books.sonatype.com/m2eclipse-book/reference/running-sect-running-maven-builds.html

Then just export -> EE -> WAR file and it should export ok.

Sirgue commented 9 years ago

I have the same problem with Eclipse... I tried to compile with maven, but Tomcat doesn't start anymore : FAIL - Application at context path /cah could not be started

Some logs :

INFO: HTMLManager: start: Starting web application '/cah'
Mar 8, 2015 8:27:44 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Error configuring application listener of class net.socialgamer.cah.StartupUtils
java.lang.UnsupportedClassVersionError: net/socialgamer/cah/StartupUtils : Unsupported major.minor version 51.0 (unable to load class net.socialgamer.cah.StartupUtils)
        at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2905)
        at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1170)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1678)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556)
        at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:532)
        at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:514)
        at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:133)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4726)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5284)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1247)
        at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:714)
        at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:219)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:701)
Mar 8, 2015 8:27:44 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Skipped installing application listeners due to previous error(s)
Mar 8, 2015 8:27:44 PM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: list: Listing contexts for virtual host 'localhost'

Looks like #120

dualznz commented 9 years ago

yup im getting that exact same issue with tomcat Fail to start..

noahp78 commented 9 years ago

Are you using the latest Tomcat7 version?

Sirgue commented 9 years ago

I think I am. I use the tomcat7 of debian wheezy repo.

noahp78 commented 9 years ago

Last time I checked the tomcat on ubuntu was outdated and also didn't launch. I had to manually download the latest version. It may be the same on debian

Sirgue commented 9 years ago

I will try to compile the last version of tomcat7 this week-end.

dualznz commented 9 years ago

ok so i have it all figured out about getting it setup, tired like 10 times on different machines and OS BUT there is an issue in the jsp file game.jsp cant find the resource GAMEOPTIONS. so not sure whats going on there.

did the maven clean war:exploded , imported war into tomcat7 loads success but and can see inital page but still crashes on game.jsp. DOH

current testing platform is: ubuntu 14.04 tomcat version: 7 latest java jdk, jre builds latest postgresql build

noahp78 commented 9 years ago

now let eclipse build the war using 'export' and it should work (WEB-INF should contain the files)

dualznz commented 9 years ago

well i got it all working with no isses in the end just took much longer than i thought, im gonna work on a visual upgrade to this great resource, going to introduce bootstrap into the interface, spice it up abit.

thanks for all ya helps

noahp78 commented 9 years ago

Please close the issue if it has been fixed :smile:, And good luck with the upgrade!

unclepeanuts159 commented 9 years ago

How did you fix this? , as I can't clearly see how you have fixed it? as im having the same issue after i get past the agree page I get unable to compile class for jsp

this is what I get : HTTP Status 500 - Unable to compile class for JSP: An error occurred at line: 15 in the generated java file Only a type can be imported. net.socialgamer.cah.data.GameOptions resolves to a package An error occurred at line: 413 in the jsp file: /game.jsp GameOptions.MIN_SCORE_LIMIT cannot be resolved to a type 410: 411: 412: <% 413: for (int i = GameOptions.MIN_SCORE_LIMIT; i <= GameOptions.MAX_SCORE_LIMIT; i++) { 414: %> 415: <option <%= i == GameOptions.DEFAULT_SCORE_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %> 416: <% } %> An error occurred at line: 415 in the jsp file: /game.jsp GameOptions.DEFAULT_SCORE_LIMIT cannot be resolved to a type 412: <% 413: for (int i = GameOptions.MIN_SCORE_LIMIT; i <= GameOptions.MAX_SCORE_LIMIT; i++) { 414: %> 415: <option <%= i == GameOptions.DEFAULT_SCORE_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %> 416: <% } %> 417: 418:
An error occurred at line: 423 in the jsp file: /game.jsp GameOptions.MIN_PLAYER_LIMIT cannot be resolved to a type 420: <select id="player_limit_template" class="player_limit" 421: aria-label="Player limit. Having more than 10 players may cause issues both for screen readers and traditional browsers."> 422: <% 423: for (int i = GameOptions.MIN_PLAYER_LIMIT; i <= GameOptions.MAX_PLAYER_LIMIT; i++) { 424: %> 425: <option <%= i == GameOptions.DEFAULT_PLAYER_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %> 426: <% } %> An error occurred at line: 423 in the jsp file: /game.jsp GameOptions.MAX_PLAYER_LIMIT cannot be resolved to a type 420: <select id="player_limit_template" class="player_limit" 421: aria-label="Player limit. Having more than 10 players may cause issues both for screen readers and traditional browsers."> 422: <% 423: for (int i = GameOptions.MIN_PLAYER_LIMIT; i <= GameOptions.MAX_PLAYER_LIMIT; i++) { 424: %> 425: <option <%= i == GameOptions.DEFAULT_PLAYER_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %> 426: <% } %> An error occurred at line: 425 in the jsp file: /game.jsp GameOptions.DEFAULT_PLAYER_LIMIT cannot be resolved to a type 422: <% 423: for (int i = GameOptions.MIN_PLAYER_LIMIT; i <= GameOptions.MAX_PLAYER_LIMIT; i++) { 424: %> 425: <option <%= i == GameOptions.DEFAULT_PLAYER_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %> 426: <% } %> 427: 428: Having more than 10 players may get cramped! An error occurred at line: 434 in the jsp file: /game.jsp GameOptions.MIN_SPECTATOR_LIMIT cannot be resolved to a type 431: <select id="spectator_limit_template" class="spectator_limit" 432: aria-label="Spectator limit."> 433: <% 434: for (int i = GameOptions.MIN_SPECTATOR_LIMIT; i <= GameOptions.MAX_SPECTATOR_LIMIT; i++) { 435: %> 436: <option <%= i == GameOptions.DEFAULT_SPECTATOR_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %> 437: <% } %> An error occurred at line: 434 in the jsp file: /game.jsp GameOptions.MAX_SPECTATOR_LIMIT cannot be resolved to a type 431: <select id="spectator_limit_template" class="spectator_limit" 432: aria-label="Spectator limit."> 433: <% 434: for (int i = GameOptions.MIN_SPECTATOR_LIMIT; i <= GameOptions.MAX_SPECTATOR_LIMIT; i++) { 435: %> 436: <option <%= i == GameOptions.DEFAULT_SPECTATOR_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %> 437: <% } %> An error occurred at line: 436 in the jsp file: /game.jsp GameOptions.DEFAULT_SPECTATOR_LIMIT cannot be resolved to a type 433: <% 434: for (int i = GameOptions.MIN_SPECTATOR_LIMIT; i <= GameOptions.MAX_SPECTATOR_LIMIT; i++) { 435: %> 436: <option <%= i == GameOptions.DEFAULT_SPECTATOR_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %> 437: <% } %> 438: 439: Spectators can watch and chat, but not actually play. Not even as Czar. An error occurred at line: 458 in the jsp file: /game.jsp GameOptions.MIN_BLANK_CARD_LIMIT cannot be resolved to a type 455: Stacktrace:

type Exception report

message Unable to compile class for JSP: An error occurred at line: 15 in the generated java file Only a type can be imported. net.socialgamer.cah.data.GameOptions resolves to a package An error occurred at line: 413 in the jsp file: /game.jsp GameOptions.MIN_SCORE_LIMIT cannot be resolved to a type 410: 411: 412: <% 413: for (int i = GameOptions.MIN_SCORE_LIMIT; i <= GameOptions.MAX_SCORE_LIMIT; i++) { 414: %> 415: <option <%= i == GameOptions.DEFAULT_SCORE_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %> 416: <% } %> An error occurred at line: 415 in the jsp file: /game.jsp GameOptions.DEFAULT_SCORE_LIMIT cannot be resolved to a type 412: <% 413: for (int i = GameOptions.MIN_SCORE_LIMIT; i <= GameOptions.MAX_SCORE_LIMIT; i++) { 414: %> 415: <option <%= i == GameOptions.DEFAULT_SCORE_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %> 416: <% } %> 417: 418:
An error occurred at line: 423 in the jsp file: /game.jsp GameOptions.MIN_PLAYER_LIMIT cannot be resolved to a type 420: <select id="player_limit_template" class="player_limit" 421: aria-label="Player limit. Having more than 10 players may cause issues both for screen readers and traditional browsers."> 422: <% 423: for (int i = GameOptions.MIN_PLAYER_LIMIT; i <= GameOptions.MAX_PLAYER_LIMIT; i++) { 424: %> 425: <option <%= i == GameOptions.DEFAULT_PLAYER_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %> 426: <% } %> An error occurred at line: 423 in the jsp file: /game.jsp GameOptions.MAX_PLAYER_LIMIT cannot be resolved to a type 420: <select id="player_limit_template" class="player_limit" 421: aria-label="Player limit. Having more than 10 players may cause issues both for screen readers and traditional browsers."> 422: <% 423: for (int i = GameOptions.MIN_PLAYER_LIMIT; i <= GameOptions.MAX_PLAYER_LIMIT; i++) { 424: %> 425: <option <%= i == GameOptions.DEFAULT_PLAYER_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %> 426: <% } %> An error occurred at line: 425 in the jsp file: /game.jsp GameOptions.DEFAULT_PLAYER_LIMIT cannot be resolved to a type 422: <% 423: for (int i = GameOptions.MIN_PLAYER_LIMIT; i <= GameOptions.MAX_PLAYER_LIMIT; i++) { 424: %> 425: <option <%= i == GameOptions.DEFAULT_PLAYER_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %> 426: <% } %> 427: 428: Having more than 10 players may get cramped! An error occurred at line: 434 in the jsp file: /game.jsp GameOptions.MIN_SPECTATOR_LIMIT cannot be resolved to a type 431: <select id="spectator_limit_template" class="spectator_limit" 432: aria-label="Spectator limit."> 433: <% 434: for (int i = GameOptions.MIN_SPECTATOR_LIMIT; i <= GameOptions.MAX_SPECTATOR_LIMIT; i++) { 435: %> 436: <option <%= i == GameOptions.DEFAULT_SPECTATOR_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %> 437: <% } %> An error occurred at line: 434 in the jsp file: /game.jsp GameOptions.MAX_SPECTATOR_LIMIT cannot be resolved to a type 431: <select id="spectator_limit_template" class="spectator_limit" 432: aria-label="Spectator limit."> 433: <% 434: for (int i = GameOptions.MIN_SPECTATOR_LIMIT; i <= GameOptions.MAX_SPECTATOR_LIMIT; i++) { 435: %> 436: <option <%= i == GameOptions.DEFAULT_SPECTATOR_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %> 437: <% } %> An error occurred at line: 436 in the jsp file: /game.jsp GameOptions.DEFAULT_SPECTATOR_LIMIT cannot be resolved to a type 433: <% 434: for (int i = GameOptions.MIN_SPECTATOR_LIMIT; i <= GameOptions.MAX_SPECTATOR_LIMIT; i++) { 435: %> 436: <option <%= i == GameOptions.DEFAULT_SPECTATOR_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %> 437: <% } %> 438: 439: Spectators can watch and chat, but not actually play. Not even as Czar. An error occurred at line: 458 in the jsp file: /game.jsp GameOptions.MIN_BLANK_CARD_LIMIT cannot be resolved to a type 455: Stacktrace:

description The server encountered an internal error (Unable to compile class for JSP: An error occurred at line: 15 in the generated java file Only a type can be imported. net.socialgamer.cah.data.GameOptions resolves to a package An error occurred at line: 413 in the jsp file: /game.jsp GameOptions.MIN_SCORE_LIMIT cannot be resolved to a type 410: 411: 412: <% 413: for (int i = GameOptions.MIN_SCORE_LIMIT; i <= GameOptions.MAX_SCORE_LIMIT; i++) { 414: %> 415: <option <%= i == GameOptions.DEFAULT_SCORE_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %> 416: <% } %> An error occurred at line: 415 in the jsp file: /game.jsp GameOptions.DEFAULT_SCORE_LIMIT cannot be resolved to a type 412: <% 413: for (int i = GameOptions.MIN_SCORE_LIMIT; i <= GameOptions.MAX_SCORE_LIMIT; i++) { 414: %> 415: <option <%= i == GameOptions.DEFAULT_SCORE_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %> 416: <% } %> 417: 418:
An error occurred at line: 423 in the jsp file: /game.jsp GameOptions.MIN_PLAYER_LIMIT cannot be resolved to a type 420: <select id="player_limit_template" class="player_limit" 421: aria-label="Player limit. Having more than 10 players may cause issues both for screen readers and traditional browsers."> 422: <% 423: for (int i = GameOptions.MIN_PLAYER_LIMIT; i <= GameOptions.MAX_PLAYER_LIMIT; i++) { 424: %> 425: <option <%= i == GameOptions.DEFAULT_PLAYER_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %> 426: <% } %> An error occurred at line: 423 in the jsp file: /game.jsp GameOptions.MAX_PLAYER_LIMIT cannot be resolved to a type 420: <select id="player_limit_template" class="player_limit" 421: aria-label="Player limit. Having more than 10 players may cause issues both for screen readers and traditional browsers."> 422: <% 423: for (int i = GameOptions.MIN_PLAYER_LIMIT; i <= GameOptions.MAX_PLAYER_LIMIT; i++) { 424: %> 425: <option <%= i == GameOptions.DEFAULT_PLAYER_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %> 426: <% } %> An error occurred at line: 425 in the jsp file: /game.jsp GameOptions.DEFAULT_PLAYER_LIMIT cannot be resolved to a type 422: <% 423: for (int i = GameOptions.MIN_PLAYER_LIMIT; i <= GameOptions.MAX_PLAYER_LIMIT; i++) { 424: %> 425: <option <%= i == GameOptions.DEFAULT_PLAYER_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %> 426: <% } %> 427: 428: Having more than 10 players may get cramped! An error occurred at line: 434 in the jsp file: /game.jsp GameOptions.MIN_SPECTATOR_LIMIT cannot be resolved to a type 431: <select id="spectator_limit_template" class="spectator_limit" 432: aria-label="Spectator limit."> 433: <% 434: for (int i = GameOptions.MIN_SPECTATOR_LIMIT; i <= GameOptions.MAX_SPECTATOR_LIMIT; i++) { 435: %> 436: <option <%= i == GameOptions.DEFAULT_SPECTATOR_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %> 437: <% } %> An error occurred at line: 434 in the jsp file: /game.jsp GameOptions.MAX_SPECTATOR_LIMIT cannot be resolved to a type 431: <select id="spectator_limit_template" class="spectator_limit" 432: aria-label="Spectator limit."> 433: <% 434: for (int i = GameOptions.MIN_SPECTATOR_LIMIT; i <= GameOptions.MAX_SPECTATOR_LIMIT; i++) { 435: %> 436: <option <%= i == GameOptions.DEFAULT_SPECTATOR_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %> 437: <% } %> An error occurred at line: 436 in the jsp file: /game.jsp GameOptions.DEFAULT_SPECTATOR_LIMIT cannot be resolved to a type 433: <% 434: for (int i = GameOptions.MIN_SPECTATOR_LIMIT; i <= GameOptions.MAX_SPECTATOR_LIMIT; i++) { 435: %> 436: <option <%= i == GameOptions.DEFAULT_SPECTATOR_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %> 437: <% } %> 438: 439: Spectators can watch and chat, but not actually play. Not even as Czar. An error occurred at line: 458 in the jsp file: /game.jsp GameOptions.MIN_BLANK_CARD_LIMIT cannot be resolved to a type 455: Stacktrace:) that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: 15 in the generated java file Only a type can be imported. net.socialgamer.cah.data.GameOptions resolves to a package

An error occurred at line: 413 in the jsp file: /game.jsp GameOptions.MIN_SCORE_LIMIT cannot be resolved to a type 410: 411: 412: <% 413: for (int i = GameOptions.MIN_SCORE_LIMIT; i <= GameOptions.MAX_SCORE_LIMIT; i++) { 414: %> 415: <option <%= i == GameOptions.DEFAULT_SCORE_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %> 416: <% } %>

An error occurred at line: 415 in the jsp file: /game.jsp GameOptions.DEFAULT_SCORE_LIMIT cannot be resolved to a type 412: <% 413: for (int i = GameOptions.MIN_SCORE_LIMIT; i <= GameOptions.MAX_SCORE_LIMIT; i++) { 414: %> 415: <option <%= i == GameOptions.DEFAULT_SCORE_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %> 416: <% } %> 417: 418:

An error occurred at line: 423 in the jsp file: /game.jsp GameOptions.MIN_PLAYER_LIMIT cannot be resolved to a type 420: <select id="player_limit_template" class="player_limit" 421: aria-label="Player limit. Having more than 10 players may cause issues both for screen readers and traditional browsers."> 422: <% 423: for (int i = GameOptions.MIN_PLAYER_LIMIT; i <= GameOptions.MAX_PLAYER_LIMIT; i++) { 424: %> 425: <option <%= i == GameOptions.DEFAULT_PLAYER_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %> 426: <% } %>

An error occurred at line: 423 in the jsp file: /game.jsp GameOptions.MAX_PLAYER_LIMIT cannot be resolved to a type 420: <select id="player_limit_template" class="player_limit" 421: aria-label="Player limit. Having more than 10 players may cause issues both for screen readers and traditional browsers."> 422: <% 423: for (int i = GameOptions.MIN_PLAYER_LIMIT; i <= GameOptions.MAX_PLAYER_LIMIT; i++) { 424: %> 425: <option <%= i == GameOptions.DEFAULT_PLAYER_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %> 426: <% } %>

An error occurred at line: 425 in the jsp file: /game.jsp GameOptions.DEFAULT_PLAYER_LIMIT cannot be resolved to a type 422: <% 423: for (int i = GameOptions.MIN_PLAYER_LIMIT; i <= GameOptions.MAX_PLAYER_LIMIT; i++) { 424: %> 425: <option <%= i == GameOptions.DEFAULT_PLAYER_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %> 426: <% } %> 427: 428: Having more than 10 players may get cramped!

An error occurred at line: 434 in the jsp file: /game.jsp GameOptions.MIN_SPECTATOR_LIMIT cannot be resolved to a type 431: <select id="spectator_limit_template" class="spectator_limit" 432: aria-label="Spectator limit."> 433: <% 434: for (int i = GameOptions.MIN_SPECTATOR_LIMIT; i <= GameOptions.MAX_SPECTATOR_LIMIT; i++) { 435: %> 436: <option <%= i == GameOptions.DEFAULT_SPECTATOR_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %> 437: <% } %>

An error occurred at line: 434 in the jsp file: /game.jsp GameOptions.MAX_SPECTATOR_LIMIT cannot be resolved to a type 431: <select id="spectator_limit_template" class="spectator_limit" 432: aria-label="Spectator limit."> 433: <% 434: for (int i = GameOptions.MIN_SPECTATOR_LIMIT; i <= GameOptions.MAX_SPECTATOR_LIMIT; i++) { 435: %> 436: <option <%= i == GameOptions.DEFAULT_SPECTATOR_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %> 437: <% } %>

An error occurred at line: 436 in the jsp file: /game.jsp GameOptions.DEFAULT_SPECTATOR_LIMIT cannot be resolved to a type 433: <% 434: for (int i = GameOptions.MIN_SPECTATOR_LIMIT; i <= GameOptions.MAX_SPECTATOR_LIMIT; i++) { 435: %> 436: <option <%= i == GameOptions.DEFAULT_SPECTATOR_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %> 437: <% } %> 438: 439: Spectators can watch and chat, but not actually play. Not even as Czar.

An error occurred at line: 458 in the jsp file: /game.jsp GameOptions.MIN_BLANK_CARD_LIMIT cannot be resolved to a type 455:

An error occurred at line: 460 in the jsp file: /game.jsp GameOptions.DEFAULT_BLANK_CARD_LIMIT cannot be resolved to a type 457: <% 458: for (int i = GameOptions.MIN_BLANK_CARD_LIMIT; i <= GameOptions.MAX_BLANK_CARD_LIMIT; i++) { 459: %> 460: <option <%= i == GameOptions.DEFAULT_BLANK_CARD_LIMIT ? "selected='selected' " : "" %>value="<%= i %>"><%= i %> 461: <% } %> 462: blank white cards. 463:

Stacktrace: org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:102) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:331) org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:469) org.apache.jasper.compiler.Compiler.compile(Compiler.java:378) org.apache.jasper.compiler.Compiler.compile(Compiler.java:353) org.apache.jasper.compiler.Compiler.compile(Compiler.java:340) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334) javax.servlet.http.HttpServlet.service(HttpServlet.java:722) note The full stack trace of the root cause is available in the Apache Tomcat/7.0.28 logs.

Apache Tomcat/7.0.28

noahp78 commented 9 years ago

Compile with maven and it should work (mvn package war)

unclepeanuts159 commented 9 years ago

Look im a real noob in this area so what do i open in Eclipse to change to Maven and how do i get Maven to work?