[JBoss Seam] - Exception while trying Seam CRUD Hibernate Gen Tutorial
by Grandfatha
Hi folks,
I have been a reader of this forum for some time and I stumbled upon this great flash tutorial on the JBoss website that shows every step to produce a Seam project skeleton from an existing database schema ( http://www.jboss.com/products/seam/SeamHBTools.html).
In the tutorial the presenter creates a Hibernate Configuration file and then wants to generate the Seam project using the Hibernate Generation Tool that is integrated in JBoss Eclipse IDE.
I am on WinXP using "JBoss IDE 2.0.0 BETA2 Bundle" and I want to retrieve the information from an Oracle 10 database. The problem is, after launching the Hibernate Code Generation Tool I am presented with the following Exception.
anonymous wrote :
|
| Exception while generating code
|
| Reason:
|
| org.hibernate.tool.hbm2x.ExporterException : Error while processing template seam/find.jsp.ftl
|
|
|
More Details:
anonymous wrote :
|
| org.hibernate.tool.hbm2x.ExporterException: Error while processing template seam/find.jsp.ftl
| freemarker.core.InvalidReferenceException: Expression field.value.typeName is undefined on line 45, column 6 in seam/find.jsp.ftl.
| freemarker.core.InvalidReferenceException: Expression field.value.typeName is undefined on line 45, column 6 in seam/find.jsp.ftl.
|
|
|
Where is my mistake? Is it me or the tool? Known error?
Please help, I really would like to start things off with an existing Seam project skeleton ;)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4069066#4069066
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4069066
18Â years, 8Â months
[JBoss Portal] - Sounds good. I can still use myfaces 1.1.1
by anders3
I changed the scope in the war file from provided to nothing (default) so the artifacts becomes members of my war WEB-INF/lib
| <dependency>
| <groupId>org.apache.myfaces</groupId>
| <artifactId>myfaces-api</artifactId>
| <version>1.1.1</version>
| </dependency>
| <dependency>
| <groupId>org.apache.myfaces</groupId>
| <artifactId>myfaces-impl</artifactId>
| <version>1.1.1</version>
| </dependency>
|
Maybe I misunderstood Thomas in another Forum answer here he writes that we are not supposed to have faces artifacts in the war because jboss have them.
By the way this works... Now I can lanuch the application
I get a warning
| 01:33:06,411 WARN [JBossJSFConfigureListener] MyFaces JSF implementation found! This version of JBoss AS ships with the java.net implementation of JSF. There are known issues when mixing JSF implementations. This warning does not apply to MyFaces component libraries such as Tomahawk. However, myfaces-impl.jar and myfaces-api.jar should not be used without disabling the built-in JSF implementation. See the JBoss wiki for more details.
|
I hope it still works. I will have to test my application again..
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4069065#4069065
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4069065
18Â years, 8Â months
[JBoss Seam] - Check if conversations are active before session invalidatio
by rapowder
I implemented a very simple script to call a logout action:
| <!-- 10 minutes timeout -->
| <script type="text/javascript" language="JavaScript"><!--
| setTimeout('Redirect()', 600000);
| function Redirect() {
| document.getElementById('tor_form:tor_button').click();
| }
| // --></script>
|
| [...]
|
| <h:form id="tor_form">
| <t:commandButton id="tor_button" style="display:none;" value="redirect" action="#{logout.logout}"/>
| </h:form>
|
|
The logout action invalidates the session and redirects to the login page:
| // Before invalidating the whole session check if other conversations
| // are running
| if(!ConversationsAgent.getInstance().activeConversationsExist()) {
| Seam.invalidateSession();
| return "login";
| }
|
| // Otherwise leave session open and just redirect to home
| else {
| ConversationsAgent.getInstance().end();
| FacesMessages.instance().add("No activity timeout occurred.");
| return "home";
| }
|
I added the if/else conditions because if I invalidate the session all active conversations (in other tabs) will be destroyed and this is not what I want. I implemented the activeConversationsExist() as it follows:
| public boolean activeConversationsExist() {
| for (ConversationEntry entry : ConversationEntries.instance().getConversationEntries()) {
| if(!entry.isEnded())
| return true;
| }
| return false;
| }
|
which is not good because it checks the whole conversation stack (including other connected clients or browsers) and not the ones related to the session I want to invalidate.
So, my question is: is there a way to check if only the session-related conversations are ended?
Thanx, cheers!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4069064#4069064
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4069064
18Â years, 8Â months