-
45. Re: Richfaces4 + glassfish 3 performance
arungupta Feb 21, 2014 8:33 AM (in response to morellik)NetBeans 8 beta is an older build now, use the nightly build from http://bits.netbeans.org/download/trunk/nightly/latest/.
Also make sure to use plugin version 1.0.07 (released yesterday).
-
46. Re: Re: Richfaces4 + glassfish 3 performance
morellik Feb 21, 2014 10:32 AM (in response to arungupta)Ok, I installed nightly build with the new plugin. But I'm unable to deploy the application. I receive:
Browsing: /IDPbyNMRWF
/home/morelli/NetBeansProjects/IDPbyNMRWF/nbproject/build-impl.xml:1101:
java.net.MalformedURLException: no protocol: /IDPbyNMRWF
at java.net.URL.<init>(URL.java:585)
at java.net.URL.<init>(URL.java:482)
at java.net.URL.<init>(URL.java:431)
at org.netbeans.modules.ant.browsetask.NbBrowse.execute(NbBrowse.java:92)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor56.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:286)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:555)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
BUILD FAILED (total time: 30 seconds)
So, I caome back to NetBeans 8.0 beta. After solved some problems, I'm able to see my web form
But when I try to submit the form, I receive:
javax.ejb.EJBAccessException: JBAS014502: Invocation on method: public java.lang.Boolean DAO.ParticipantDAO.checkUserExist(java.lang.String) of bean: ParticipantDAO is not allowed
The form call createUser..createnewUser bean:
@ManagedBean @RequestScoped public class CreateUser { @Inject private ParticipantDAO participantDAO; @Inject private CountryDAO countryDAO; Participant user = new Participant(); List<Group> groups = new ArrayList<>(); Integer price; EmailService emailService = new EmailService(); private List<Country> countries = new ArrayList<>(); Map<String, Integer> prices = Constants.priceMap; public String createNewUser() { if (participantDAO.checkUserExist(user.getEmail().trim())) { addMessage("Seems that you are already registered.", "warn"); return "index"; }
And the checkUserExist in participantDao is the following:
@Stateless @LocalBean @DeclareRoles({"SUPERADMINISTRATOR", "ADMINISTRATOR", "USER"}) public class ParticipantDAO { public Boolean checkUserExist(String email) { TypedQuery<Participant> query = em.createNamedQuery(Participant.FIND_BY_EMAIL, Participant.class).setParameter("email", email); List<Participant> results = query.getResultList(); Boolean user = Boolean.FALSE; if (!results.isEmpty()) { user = Boolean.TRUE; } return user; }
-
47. Re: Re: Richfaces4 + glassfish 3 performance
arungupta Feb 21, 2014 10:42 AM (in response to morellik)Send me an email at arun . gupta @ gmail . com with your archive and I'll take a look.
-
48. Re: Re: Richfaces4 + glassfish 3 performance
morellik Feb 25, 2014 6:29 AM (in response to arungupta)I've solved the problem putting @PermitAll to all DAO method that require to be accessed without authentication.
-
49. Re: Re: Richfaces4 + glassfish 3 performance
arungupta Feb 25, 2014 8:04 AM (in response to morellik)Great!
So is your application now running on WildFly ?
-
50. Re: Re: Richfaces4 + glassfish 3 performance
morellik Feb 25, 2014 8:56 AM (in response to arungupta)No, I'm stop to authentication. I post a question to the WildFly forum to ask help.
For the moment I'm able to see the initial form, submit it and write user data in the database.
-
51. Re: Re: Richfaces4 + glassfish 3 performance
arungupta Feb 25, 2014 10:15 PM (in response to morellik)OK, would love to see your app running on WildFly.
Let me know if I can help in any way.
-
52. Re: Re: Richfaces4 + glassfish 3 performance
morellik Feb 26, 2014 3:18 AM (in response to arungupta)Arun Gupta wrote:
OK, would love to see your app running on WildFly.
Let me know if I can help in any way.
You are a beautiful person. Thank you very much.
For the moment I don't know how solve the problem because I see the login page in the browser, I enter valid credential, but nothing happen. No error, no warning, no message. The browser simple redisplay the login page.
In the mean time I'm searching a way (or a simple framework) to create an authentication method container independent.
-
53. Re: Re: Richfaces4 + glassfish 3 performance
morellik Feb 28, 2014 8:27 AM (in response to morellik)At the end I think to stop to try WildFly. I've troubles under troubles. For the moment no one help me to solve the authentication problem, so I'm trying Apache Shiro but I go in other troubles. I'd like to use WildFly but seems to be too complicate for me.
-
54. Re: Re: Richfaces4 + glassfish 3 performance
arungupta Feb 28, 2014 8:37 AM (in response to morellik)Can you share your WAR file with me ?
I can try to help you.
-
55. Re: Re: Richfaces4 + glassfish 3 performance
morellik Feb 28, 2014 9:03 AM (in response to arungupta)Yes, of course. I can also send the sources if you want.
Via mail?
-
56. Re: Re: Richfaces4 + glassfish 3 performance
arungupta Feb 28, 2014 9:44 AM (in response to morellik)Sure, my first name . last name @ gmail.com.
-
57. Re: Re: Richfaces4 + glassfish 3 performance
morellik Mar 6, 2014 3:03 AM (in response to arungupta)Hi Arun,
did you receive the mail with the code?
-
58. Re: Re: Richfaces4 + glassfish 3 performance
arungupta Mar 6, 2014 4:29 PM (in response to morellik)I did, just been terribly busy. Will take a look at it this weekend.
-
59. Re: Re: Richfaces4 + glassfish 3 performance
morellik Mar 7, 2014 3:00 AM (in response to arungupta)Don't worry When you have time without pressure.
Thank again