[JBoss Tools] - Simple Seam app configured for Tomcat
by Philippe Leménager
Philippe Leménager [http://community.jboss.org/people/cinephil] created the discussion
"Simple Seam app configured for Tomcat"
To view the discussion, visit: http://community.jboss.org/message/564739#564739
--------------------------------------------------------------
Hello Seamians ! :)
I've been trying to config a simple seam test project for Tomcat 6 using JBoss Tools but it still doesn't work after reading many things about it on the Internet and trying the solutions proposed. :(
1) New Seam Web Project
1.a) Seam web project window
Project name : projettest
Target runtime : Apache Tomcat v6.0
Dynamic web module version : 2.5 (default choice)
Target Server : Tomcat v6.0 Server at localhost
Configuration : Dynamic Web Project with Seam 2.2 (default choice)
NEXT
1.b) Java
NEXT
1.c) Web Module
NEXT
1.d) JSF Capabilities
After some unsuccessfull tries, I've created a user-library with jsf-api.jar and jsf-impl.jar taken in jboss-seam-2.2.0.GA/lib directory and selected this new library + "Include libraries with this application". I lived the other things by default.
NEXT
1.d) Seam Facet
Seam Runtime : jboss-seam-2.2.0.GA
Deploy as : WAR
Database type : MySQL5 (InnoDB)
Connection profile MysQL Test (configured and tested)
Database Schema Name : Test
Database Catalog Name : Test
DB Tables already exists in database : selected (the database contains only one simple table called users (usr_id, username, name, password) with two lines inside).
I leaved the other options as default.
FINISH
=> The project has been created without errors.
2) Changing some things, after reading issues about this operation.
2.a) projettest/WebContent/META-INF/context.xml
2.b) projettest/WebContent/WEB-INF/classes/META-INF/persistence.xml
2.c) projettest/WebContent/WEB-INF/components.xml
I've deleted all params in tag <core:init />
2.d) projettest/WebContent/WEB-INF/pages.xml
I've commented the last tag <exception>, this one :
<!-- <exception>
<redirect view-id="/error.xhtml">
<message severity="error">Unexpected error, please try again</message>
</redirect>
</exception> -->
2.e) Added jars
I copied from jboss-seam-2.2.0.GA/lib those jars :
- commons-collections.jar
- commons-lang.jar
- commons-logging.jar
- concurrent.jar
- dom4j.jar
- hibernate-annotations.jar
- hibernate-common-annotations.jar
- hibernate-core.jar
- hibernate-entitymanager.jar
- hibernate-search.jar
- hibernate-validator.jar
- javassist.jar
- jboss-common-core.jar
- jta.jar
- log4j.jar
- lucene-core.jar
- persistence-api.jar
- slf4j-api.jar
- slf4j-log4j12.jar
2.f) log4j.xml
I've copied the file log4j.xml from jboss-seam-jpa example project to projettest/WebContent/WEB-INF/classes.
3) Starting Tomcat and trying to access to the project
There is no error when I start Tomcat, just this info message :
org.apache.catalina.core.StandardContext addApplicationListener
INFO: The listener "com.sun.faces.config.ConfigureListener" is already configured for this context. The duplicate definition has been ignored.
I also have this WARN :
WARN [PersistentPermissionResolver] no permission store available - please install a PermissionStore with the name 'org.jboss.seam.security.jpaPermissionStore' if persistent permissions are required.
When I type http://localhost:8080/projettest http://localhost:8080/projettest in Firefox, I already have the "Welcome to Seam!" page with the url http://localhost:8080/projettest/home.seam http://localhost:8080/projettest/home.seam but some errors appears in Tomcat console :
12:22:09,217 ERROR [SeamPhaseListener] swallowing exception
java.lang.RuntimeException: exception invoking: getTransaction
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:154)
...
Caused by: javax.naming.NamingException: Cannot create resource instance
at org.apache.naming.factory.TransactionFactory.getObjectInstance(TransactionFactory.java:113)
...
12:22:09,310 WARN [SeamPhaseListener] uncaught exception, passing to exception handler
java.lang.IllegalStateException: Could not commit transaction
at org.jboss.seam.jsf.SeamPhaseListener.commitOrRollback(SeamPhaseListener.java:625)
...
Caused by: java.lang.RuntimeException: exception invoking: getTransaction
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:154)
...
Caused by: javax.naming.NamingException: Cannot create resource instance
at org.apache.naming.factory.TransactionFactory.getObjectInstance(TransactionFactory.java:113)
...
Many times the same errors.
4) Generate entities
4.1) New Seam Generate Entities
Reverse engineer from database is selected
NEXT
4.2) Select Tables
I had to click on the Refresh button because no database had appeared. Then I selected Test database and clicked on the Include button.
FINISH
=> Some more files have been generated successfully.
5) Trying to browse data
After reloading the home page, a "Browse Data / Users List" menu appears. When I click on it, I already have the UsersList.seam page with some more ERROR [SeamPhaseListener] swallowing exception in Tomcat Console.
If I click on the Search button, with ou without something in the fields of the page, the application crashes with these errors :
org.apache.catalina.core.StandardWrapperValve invoke
GRAVE: "Servlet.service()" pour la servlet Faces Servlet a généré une exception
javax.el.PropertyNotFoundException: /UsersList.xhtml @19,81 value="#{usersList.users.username}": Target Unreachable, identifier 'usersList' resolved to null
at com.sun.facelets.el.TagValueExpression.getType(TagValueExpression.java:62)
...
I've searched on the Internet but didn't find clear explanation and solution.
Someone here can help me ?
Thanks in advance.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/564739#564739]
Start a new discussion in JBoss Tools at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 6 months
[JBoss Messaging] - Re: How to configure JBoss to use Tibco JMS over SSL
by Umesh R
Umesh R [http://community.jboss.org/people/umeshr] created the discussion
"Re: How to configure JBoss to use Tibco JMS over SSL"
To view the discussion, visit: http://community.jboss.org/message/566544#566544
--------------------------------------------------------------
If you are configuring tibco jms using ldap and SSL, your jms-ds (~/jboss-5.1.0.GA/server/default/deploy/messaging/jms-ds.xml) mbean entires would look like this
+<mbean code="org.jboss.jms.jndi.JMSProviderLoader"
name=":service=JMSProviderLoader,name=TibjmsProvider">
<attribute name="ProviderName">TIBCOJMSProvider</attribute>
<attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>
<!--
add ldap path to myqueue factory
-->
<attribute name="QueueFactoryRef">CN=prod,OU=myappid,OU=ConnectionFactory,OU=myqueuename</attribute>
<attribute name="TopicFactoryRef">XAMyTopicConnectionFactory</attribute>
<attribute name="Properties">
java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory
<!--
add ldap server url
-->
java.naming.provider.url=myldapurl
</attribute>
</mbean>
+
+ <mbean code="org.jboss.naming.NamingAlias"
name="DefaultDomain:service=NamingAlias,fromName=TopicConnectionFactory">
<attribute name="ToName">tibjmsnaming://localhost/XAMyTopicConnectionFactory</attribute>
<attribute name="FromName">MyTopicConnectionFactory</attribute>
</mbean>
+
++
+ <mbean code="org.jboss.naming.NamingAlias"
name="DefaultDomain:service=NamingAlias,fromName=QueueConnectionFactory">
<attribute name="ToName">tibjmsnaming://localhost/QueueConnectionFactory</attribute>
<attribute name="FromName">MyQueueConnectionFactory</attribute>
</mbean>+
+ <mbean code="org.jboss.naming.NamingAlias"
name="DefaultDomain:service=NamingAlias,fromName=MyQueue">
<!--
add ldap path to myqueue destination
-->
<attribute name="ToName">CN=prod,OU=Destination,OU=myqueuename</attribute>
<attribute name="FromName">jms/MyQueue</attribute>
</mbean>
+
++
Normally the cert and key path is configured in ldap(atleast in my case). Make tibco debug trace enabled so that it will print the cert path in the logs when it throws error if it is not finding the cert path. Place your ca.crt.pem and .p12 files there. The tibco debug trace can be enabled by setting respective system properties, i.e. by adding following entry to $JBOSS_HOME/server/default/deploy/properties-service.xml
+ <attribute name="Properties">
com.tibco.tibjms.debug=true
com.tibco.tibjms.ssl.debug.trace=true
com.tibco.tibjms.ssl.trace=true
</attribute>+
Make sure to add tibjms.jar, tibcrypt.jar to $JBOSS_HOME/server/default/lib. Btw, the setup did is for jboss-5.1.0.GA
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/566544#566544]
Start a new discussion in JBoss Messaging at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 6 months
[jBPM] - Impossible to find Group Tasks ordered
by Fabio Spiga
Fabio Spiga [http://community.jboss.org/people/Spiga] created the discussion
"Impossible to find Group Tasks ordered"
To view the discussion, visit: http://community.jboss.org/message/566226#566226
--------------------------------------------------------------
Hi everybody,
I need to get the group tasks for which a user is candidate in a manner ORDERED e PAGED, so the API findGroupTasks is not sufficient.
Therefore, I have replaced findGroupTasks() with the following code:
+ taskList = getTaskService().createTaskQuery()
.candidate(filter.getUsername())
.orderDesc(TaskQuery.PROPERTY_CREATEDATE)
.page(startRow, maxResults)
.list();+
The problem is that the resulting list is not ordered.
By debugging jBPM sources, I've found that the problem is in the class org.jbpm.pvm.internal.query.TaskQueryImpl within the method
+public String hql()+
Here the ORDER BY clause is added only if I'm not searching for Candidate. The original code is the following:
+....
+
+if (candidate == null && !count)
appendOrderByClause(hql);+
+....+
Why in your opinion is there such a condition?
How can I do to obtain an ordered and paged list for a candidate user?
Thanks you in advance,
Fabio
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/566226#566226]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 6 months