Note that there are some explanatory texts on larger screens.

plurals
  1. POThe value for the useBean class attribute *** is invalid. ok in NetBeans bad on server
    text
    copied!<p>I am working on a JSP project using NetBeans.</p> <p>I am receiving "The value for the useBean class attribute variables.Player is invalid." I have looked at the other versions of this question on StackOverflow and the main culprits seem to be</p> <ol> <li>that the class is in the proper directory, so in my case WEB-INF/classes/variables/Player.class.</li> <li>The Player class has a 0-argument public constructor.</li> <li>Everything is spelled correctly, keeping in mind case sensitivity.</li> <li>there should be a set property line after the use bean line.</li> </ol> <p>So, 1-3 were all set properly for me. I tried adding the set property line and it still would not run. Before I post my code, I also want to add:</p> <p>Everything works completely fine when I run it locally from netbeans. The problem only happens once I upload it to my server. Netbeans and the server are both running Tomcat7 for the servlet container. OK, here is the portion of my JSP code causing the error</p> <pre class="lang-html prettyprint-override"><code>&lt;html&gt; &lt;head&gt; &lt;jsp:useBean id="me" class="variables.Player" scope="session"/&gt; &lt;jsp:setProperty name="me" property="*" /&gt; &lt;jsp:useBean id="allGames" class="variables.BoardList" scope="application"/&gt; &lt;jsp:setProperty name="allGames" property="*" /&gt; &lt;%@page import="utilities.Utils" %&gt; </code></pre> <p>and here is the beginning of my Player class code. (edited to show entire class)</p> <pre><code> /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package variables; /** * * @author MagillaGorilla */ public class Player { public int number; public int boardID; public String name; public Player() { number=0; boardID=-1; name="Player0"; } public String getName() { return name; } public void setName(String name) { this.name = name; } public int getBoardID() { return boardID; } public void setBoardID(int boardID) { this.boardID = boardID; } public int getNumber() { return number; } public void setNumber(int number) { this.number = number; } } </code></pre> <p>Not sure if it matters, but here is the manner in which I am uploading to my server:</p> <p>I do a clean and build in netbeans. I upload my project.war file to my server using ftp. My server is Ubuntu 12.10 x32 Server. I unwar the file using:</p> <pre><code>jar xvf project.war </code></pre> <p>The whole thing is especially frustrating since netbeans runs it without a problem! Any help would be greatly appreciated. Thanks for taking the time to read this.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload