This maven2 archetype contains a little sample web application with this Frameworks:
- Spring 3.0.5.RELEASE Framework
- Servlet-API 2.5
- JSF 2.0 (mojarra 2.1.2)
- RichFaces 4.0.0.M1
- ploinFaces 1.6
- ploinMailFactory 1.3.1
- Hibernate 3.3.0
- TestNG 5.8
- Log4J 1.2.15
- HSQLDB 1.8.0.7
The configuration is annotation-driven. It is deployed on the PLOIN Repository-Serve
http://www.ploin-m2.de/nexus/content/groups/public/
you can create a project from the archetype with the following command:
mvn archetype:generate -DarchetypeGroupId=org.ploin.archetype -DarchetypeArtifactId=tempSpringRichHibernate -DarchetypeVersion=1.7.2 -DarchetypeRepository=http://www.ploin-m2.de/nexus/content/groups/public/ -DgroupId=org.ploin -DartifactId=demoSpringRichHibernate
The created project is a very simple web-application with a login mask and 2 xhtml-sites. I have tested the app on a tomcat 6.0.20 and Java 1.6 on Mac OS X Snow Leopard.
You can login with the username “admin” and the password “admin”.
After the creation the app is running with the HypersoniceSQL DBMS. But it is very easy to switch to MySQL or Oracle. I put the drivers for MySQL and Oracle as a comment in the pom.xml. So you just need to comment in the right lines in the pom.xml.
Hello Robert:
I am using your demo but I dont understand why I am lose the skin o the css in some pages.
This is my demo: Bucket Name:joedayz
URL : http://joedayz.s3.amazonaws.com/richfaces/demoSpringRichHibernate.zip
I am too trying a second demo integrating spring security, richfaces 4, spring 3.0.5.
URL : http://joedayz.s3.amazonaws.com/richfaces/demoSpringRichHibernateBMP.zip
But I am getting it error:
https://jira.springsource.org/browse/SWF-1383
Please, help me with an advice about of my demos.
Joe
Hi Joe,
I downloaded your first zip file. But I am not able to compile it. Withe “mvn compile” I get compile errors. And Eclipse shows me some unknown classes. For example: common.money.Percentage.
With your second zip file I have the same problem. The import common.money.Percentage can not resolved.
Rob
Hi Robert
application is very good … thanks .:)
Robert,
I am trying to update dependencies on the project, but keep receiving 2 errors in the pom at the richfaces at the dependency telling me:
Project build error: Non-resolvable import POM: Could not find artifact org.richfaces.ui:richfaces-components-bom:pom:4.0.0.20100715-M1 in nexus (http://localhost:8081/nexus/content/groups/public)
Project build error: ‘dependencies.dependency.version’ for org.richfaces.ui:richfaces-components-ui:jar is missing.
I searched on the internet about part of the error and one solution was to remove the: richfaces-components-bom-4.0.0.20100715-M1.pom.lastUpdated file and try again. This did not resolve the issue.
Do you know of a solution?
Thanks,
Scott
Robert,
One thing I came across is the project properties -> Java Build Path’s libraries do not match the version within your pom. Also, not all of the libraries listed are downloaded when using the archetype.
Scott
I figured out what I was doing wrong. I am new to Maven and once I used your archetype, I needed to run “mvn eclipse:eclipse”. Then, I imported the project and everything was there.
Yes. Sometimes it is that easy 🙂
hi.. My project don’t load the css, but run .. I don’t what to do.
Did you checked the rendered HTML file in the Browser with FireBug? Take a look if there are some css files included and if the path if correct. If you doesn’t changed anything on the archetype it should work perfectly.
Hello Robert,
Would it be possible to download your archetype as an Eclipse project? It would save my life. (I’ve managed to download it with Maven, but i’m too stupid to get it to work)
Thank you.
Hi Axelei,
I don’t have it as eclipse. But you can make easily a eclipse project out of it. After you generated the project out of the archetype, with this command here:
mvn archetype:generate -DarchetypeGroupId=org.ploin.archetype -DarchetypeArtifactId=tempSpringRichHibernate -DarchetypeVersion=1.7.2 -DarchetypeRepository=http://www.ploin-m2.de/nexus/content/groups/public/ -DgroupId=org.ploin -DartifactId=demoSpringRichHibernate
Just go into the project directory and type in:
mvn eclipse:eclipse
Maven will generate eclipse metafiles for your project and you can import the project into eclipse.
Let me know if it worked for you.
– Robert
Flawlessly. Thank you very much.
You are welcome 🙂
Hi Robert. I create project from your archetype. But I don’t see, where are you using richfaces. In login page you not use rich-faces-login. And when I try add rich component i have error ( Tag Library supports namespace: http://richfaces.org/rich, but no tag was defined for name) .Thank
Hi Vladyslav. I am pretty sure I am using RichFaces components 🙂
What for an IDE are you using? Your error sounds that your IDE is not configured in the right way. Or some plugins/extensions for JSF and RichFaces are missing.
Hello, I’ve got this same problem, I’ve been not able to use richfaces. Maybe do we have some configuration missing?
Hi Robert,
I came across the same problem,and rich.taglib.xml doesn’t contain the tag name (rich:accordion) I tried to use. So I decided to move to 4.1 and got rid of “Tag Library supports namespace: http://richfaces.org/rich, but no tag was defined for name”.
But it gives me script error ” ‘RichFaces’ is undefined”. Below is the firebug’d source.
new RichFaces.ui.Accordion(“j_idt3:j_idt4”,{“ajax”:{“incId”:”1″} ,”activeItem”:”j_idt5″,”isKeepHeight”:false,”cycledSwitching”:false} )
The same issue is reported in “https://community.jboss.org/message/625471#625471”. I think I need to tweak something while moving Richfaces 4.0 to 4.1. BTW, If you can add some example components in home page, it is greatly appreciated. Could you please help out of this ?
Hey guys. I am pretty busy right now. But I will offer a bug fix this week.
OK. I fixed it. Here is the new Archetype: https://robert-reiz.com/2012/02/18/archetype-richfaces-4-1-0-final-spring-3-1-0-release-hibernate-3-3-0/
Let me know if it is working for you guys.
Hey Guys. I updated this Artifact. Here is the new version:
https://robert-reiz.com/2012/02/18/archetype-richfaces-4-1-0-final-spring-3-1-0-release-hibernate-3-3-0/
I added RichFaces 4.1.0-Final and the newest Spring Framework.
On the welcome page I added the RichFaces Calendar. Just to demonstrate that the RichFaces components are working with this archetype.
Please give me Feedback and let me know if it is working for you Guys.
Thank you very much!
You are welcome!
Hi Robert,
can you please send me the artifact via email? I’ve checked the repo site for several times in the past couple of days but it was not accessible all the time.
My mail Id is : shirish dot bathe at gmail dot com
Kind regards
Shirish
Hi Robert,
Using this archetype as base, I created another page. In that, I am trying to submit a form through ajax to a bean’s business logic. But it throws an exception that seems a form ( which relates to a pojo inside bean) doesnt get mapped.
My bean is as below:
@Component
@Scope(“request”)
public class UserBean extends BaseBean {
………………
private StufyInfo studyInfo;
public String saveStudyInfo() {
//expect data inside studyInfo and pass it to service.
return “/web/personal.html”;
}
}
StufyInfo is a pojo class and studyInfo.xhtml defines form as below:
…..
…..
When I click the Save button, I get below exception in tomcat console.
INFO: javax.el.PropertyNotFoundException: /web/personal.xhtml @14,121 value=”#{userBean.studyInfo.firstName}”: Target Unreachable, ‘studyInfo’ returned null
javax.el.PropertyNotFoundException: /web/personal.xhtml @14,121 value=”#{userBean.studyInfo.firstName}”: Target Unreachable, ‘studyInfo’ returned null
at com.sun.faces.facelets.el.TagValueExpression.getType(TagValueExpression.java:100)
……….
I am not sure how StufyInfo inside UserBean is instantiated and get mapped with request.
Could you please give any inputs ? Any ideas will be greatly appreciated.
First of all you should generate getters and setters for the property.
How it gets instantiated is depending on your configuration. With this archetype you should instantiate it through the Spring Framework and inject it into the bean. Usually this happens via autowire by name.
Thank you Robert! 🙂