I have a JSF project working with JPA, I do this : retrive some data from mysql database then plot the data in a chart.
Locally works pretty fine, as you can see here:
So I deploy the project in my GlassFish 3 Open Source, which is running in a EC2 instance, then I try to make the same operation again but it seems the ManagedBean do not returns to the page correctly:
This is my ManageBean :
@ManagedBean(name="reportc")
@SessionScoped
public class ReportControl implements Serializable {
private static final long serialVersionUID = 3269125738504434502L;
@EJB LogEAO logEAO;
private int quantity;
@NotNull(message="informe um intervalo")
private String time;
@NotNull(message="informe um ponto")
private String point;
private Map<String, Object> data = new HashMap<String, Object>();
@PostConstruct
public void init(){
quantity = 1;
}
public String getDataAsJson() {
return new Gson().toJson(data);
}
public String generateReport(){
this.setTitles();
this.getValues(getLog());
return "/showroom/report.xhtml?faces-redirect=true";
}
.. methods and get's and set's
I already look in into my server.log to see if there's something wron but it seems everything is alright.
[#|2012-03-31T14:30:06.594+0000|WARNING|glassfish3.1.1|javax.enterprise.resource.webcontainer.jsf.application|_ThreadID=25;_ThreadName=Thread-2;|JSF1064: Unable to find or serve resource, image/structure/pic-1.gif.|#]
[#|2012-03-31T14:30:15.558+0000|FINE|glassfish3.1.1|org.eclipse.persistence.session.file:/home/ec2-user/usr/local/glassfish3/glassfish3/glassfish/domains/domain1/applications/BrainSet/WEB-INF/classes/_BrainSet.sql|_ThreadID=24;_ThreadName=Thread-2;ClassName=null;MethodName=null;|SELECT ID, TIME, VALUE, id_point FROM log WHERE (((id_point = ?) AND (TIME >= ?)) AND (TIME <= ?))
bind => [3 parameters bound]|#]
[#|2012-03-31T14:30:15.585+0000|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=24;_ThreadName=Thread-2;|EXECUTION TIME:0:0|#]
[#|2012-03-31T14:30:15.585+0000|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=24;_ThreadName=Thread-2;|LOGS SIZE : 0|#]
[#|2012-03-31T14:30:16.690+0000|WARNING|glassfish3.1.1|javax.enterprise.resource.webcontainer.jsf.application|_ThreadID=24;_ThreadName=Thread-2;|JSF1064: Unable to find or serve resource, image/structure/pic-1.gif.|#]
[#|2012-03-31T14:35:53.578+0000|FINE|glassfish3.1.1|org.eclipse.persistence.session.file:/home/ec2-user/usr/local/glassfish3/glassfish3/glassfish/domains/domain1/applications/BrainSet/WEB-INF/classes/_BrainSet.sql|_ThreadID=28;_ThreadName=Thread-2;ClassName=null;MethodName=null;|SELECT ID, TIME, VALUE, id_point FROM log WHERE (((id_point = ?) AND (TIME >= ?)) AND (TIME <= ?))
bind => [3 parameters bound]|#]
[#|2012-03-31T14:35:53.605+0000|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=28;_ThreadName=Thread-2;|EXECUTION TIME:0:0|#]
[#|2012-03-31T14:35:53.605+0000|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=28;_ThreadName=Thread-2;|LOGS SIZE : 0|#]
I really don't know why this is happening, besides is my first time trying to deploy a project which use JPA and JSF together. What could be doing this ?
EDIT: Just one more thing, in local mode when I click to generate the report it takes some seconds to go to the database, make the maths and return to my page, but when it's in production mode when I click to generate the report it just refresh the page, why is that happening ? I really need to know why ... help me out guys, please.
EDIT 2:
You guys can see it online here: http://50.19.242.172:8080/BrainSet/showroom/report.xhtml