[JBoss Seam] - ajax4js and seam integration - my guide
by Holger Prause
Hello,
after spending 3 days with trying to integrate ajax framworks with jboss seam i finally get a integration with ajax4jsf working
1) first download ajax4js https://ajax4jsf.dev.java.net/nonav/ajax/ajax-jsf/
2) copy the following jars to $JBOSSSERVERHOME/default/lib
el-api.jar
el-ri.jar
jsf-facelets.jar
ajax4jsf.jar
oscache-2.2.jar
this has to be done becourse of a global JBoss Classloader Issue (cant find the the posting i found for that, i am sorry) , when i deployed these jars with my application i got a lot of problems, well u can try out maybe u get it working.
Also make sure sure the jars mentionend above are not deployed with your application!
3)
change web.xml to and make sure no application view handler is defined.
| <?xml version="1.0" encoding="UTF-8"?>
| <!DOCTYPE faces-config
| PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
| "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
|
| <faces-config>
| <lifecycle>
| <phase-listener>
| org.jboss.seam.jsf.SeamExtendedManagedPersistencePhaseListener
| </phase-listener>
| </lifecycle>
|
| </faces-config>
|
change faces-config.xml to
| web-app version="2.4"
| xmlns="http://java.sun.com/xml/ns/j2ee"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
|
| <!-- Seam -->
| <listener>
| <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
| </listener>
|
| <!-- Propagate conversations across redirects -->
| <filter>
| <filter-name>Seam Redirect Filter</filter-name>
| <filter-class>org.jboss.seam.servlet.SeamRedirectFilter</filter-class>
| </filter>
|
| <!-- ajax4jsf -->
| <filter>
| <display-name>Ajax4jsf Filter</display-name>
| <filter-name>ajax4jsf</filter-name>
| <filter-class>org.ajax4jsf.Filter</filter-class>
| </filter>
| <filter-mapping>
| <filter-name>ajax4jsf</filter-name>
| <url-pattern>*.seam</url-pattern>
| </filter-mapping>
|
|
|
| <filter-mapping>
| <filter-name>Seam Redirect Filter</filter-name>
| <url-pattern>*.seam</url-pattern>
| </filter-mapping>
|
| <filter>
| <filter-name>Seam Exception Filter</filter-name>
| <filter-class>org.jboss.seam.servlet.SeamExceptionFilter</filter-class>
| </filter>
|
| <filter-mapping>
| <filter-name>Seam Exception Filter</filter-name>
| <url-pattern>*.jsf</url-pattern>
| </filter-mapping>
|
|
| <!-- JSF -->
| <context-param>
| <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
| <param-value>client</param-value>
| </context-param>
| <context-param>
| <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
| <param-value>com.sun.facelets.FaceletViewHandler</param-value>
| </context-param>
| <context-param>
| <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
| <param-value>.xhtml</param-value>
| </context-param>
| <context-param>
| <param-name>facelets.REFRESH_PERIOD</param-name>
| <param-value>2</param-value>
| </context-param>
| <context-param>
| <param-name>facelets.DEVELOPMENT</param-name>
| <param-value>true</param-value>
| </context-param>
| <context-param>
| <param-name>com.sun.faces.validateXml</param-name>
| <param-value>true</param-value>
| </context-param>
| <context-param>
| <param-name>com.sun.faces.verifyObjects</param-name>
| <param-value>true</param-value>
| </context-param>
| <context-param>
| <param-name>org.ajax4jsf.SKIN</param-name>
| <param-value>DEFAULT</param-value>
| </context-param>
|
| <servlet>
| <servlet-name>Faces Servlet</servlet-name>
| <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
| <load-on-startup>1</load-on-startup>
| </servlet>
|
| <!-- Faces Servlet Mapping -->
| <servlet-mapping>
| <servlet-name>Faces Servlet</servlet-name>
| <url-pattern>*.seam</url-pattern>
| </servlet-mapping>
|
| <!-- MyFaces -->
| <listener>
| <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
| </listener>
| </web-app>
|
|
4) if u have a have any h:commandLink with parameters (f:param)
replace them with a4j:commandLink or the parameter will get lost
It works good for me even conversations seems (what a wordplay) to work.
Thats it, well its only a temporary guide until maybe some of the jboss crew can give a more detailed and better solution, hopefully its integrated in the next release :-) (copying the jars in the servers /default/lib directory really gives me a bad taste)
Hope i could help someone,
Bye,
Holger
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957604#3957604
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957604
19 years, 9 months
[JBoss Seam] - Re: Ajax¤JSF with Seam
by gus888
Hi TOBAD and Gavin,
I tried to use the ajax4jsf on JBoss Seam, but unfortunatly, I always got an exception when I run it on JBoss4.0.4.GA:
anonymous wrote : java.lang.ClassNotFoundException: No ClassLoaders found for: org.ajax4jsf.framework.util.config.FilterBean
| at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:212)
| at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:511)
| at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:405)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
| at org.apache.commons.digester.ObjectCreateRule.begin(ObjectCreateRule.java :204)
| .......
In my web.xml, I added the following codes:
| <!-- Ajax4JSF Initial parameters -->
| <filter>
| <display-name>Ajax4jsf Filter</display-name>
| <filter-name>ajax4jsf</filter-name>
| <filter-class>org.ajax4jsf.Filter</filter-class>
| </filter>
| <filter-mapping>
| <filter-name>ajax4jsf</filter-name>
| <url-pattern>/*</url-pattern>
| </filter-mapping>
|
I also added the ajax4jsf.jar and oscache-2.2.jar in WEB/lib/.
I really appreciate it if you can give me some guidance. Thank you in advance.
GUS
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957602#3957602
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957602
19 years, 9 months
[JBoss jBPM] - Re: How to Handle Process Execution History
by brado
I followed the instructions in these documents. As instructed in the links you referenced, I added the following to my jbpm.cfg.xml file and rebuilt / deployed my sar:
| <jbpm-context>
| <!-- other services -->
| <service name="logging" factory="org.jbpm.logging.db.DbLoggingServiceFactory" />
| </jbpm-context>
|
Upon doing this, JBoss now gives the following error (which causes more errors) on startup:
| 2006-07-12 17:07:06,906 DEBUG [org.jbpm.configuration.JbpmContextInfo] creating jbpm context with service factories '[logging]'
| 2006-07-12 17:07:06,906 DEBUG [org.jbpm.JbpmContext] creating JbpmContext
| 2006-07-12 17:07:06,906 DEBUG [org.jbpm.msg.command.CommandExecutorThread] command 'null' threw exception. rolling back transaction
| org.jbpm.configuration.ConfigurationException: no messaging service available
| at org.jbpm.msg.command.CommandExecutorThread.executeCommand(CommandExecutorThread.java:116)
| at org.jbpm.msg.command.CommandExecutorThread.run(CommandExecutorThread.java:79)
| 2006-07-12 17:07:06,906 DEBUG [org.jbpm.JbpmContext] closing JbpmContext
| 2006-07-12 17:07:06,906 ERROR [org.jbpm.msg.command.CommandExecutorThread] java.lang.NullPointerException
|
Have any idea how to rectify this problem?
Thanks for your help,
Brad
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957600#3957600
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957600
19 years, 9 months
[JBoss jBPM] - Oracle 10G and JBPM 3.1.1 Issues
by kazam
Hi there,
Following the documentation, I generate the scripts for oracle and they execute nicely both oracle.create.sql and oracle.drop.sql.
However, the tests are failing.
Library : classes12.jar from Oracle10g database.
Hibernate Dialect: Oracle9Dialect
I have made the following change as mentioned in the jbpm-starters-kit-3.1.1/jbpm-db/readme.html
| modify jbpm.3/src/resources/hibernate.cfg.xml: add line
| <property name="hibernate.query.substitutions">true 1, false 0</property>
|
However, the testresults have a success rate of 1.5% with no failures but 262 errors out of 266 tests.
Below I am providing some part of the output of the ant oracle.test target.
Where can I post or upload the entire ant target log file.
| [junit] 19:38:42,625 [main] INFO C3P0ConnectionProvider : C3P0 using driver: oracle.jdbc.driver.OracleDriver at URL: jdbc:oracle:thin@192.168.0.110:1521:devdb
| [junit] 19:38:42,625 [main] INFO C3P0ConnectionProvider : Connection properties: {user=jbpmtest, password=****}
|
| [junit] 19:38:43,093 [main] INFO Configuration : Reading mappings from resource: org/jbpm/graph/exe/ProcessInstance.hbm.xml
| [junit] 19:38:43,093 [main] INFO HbmBinder : Mapping class: org.jbpm.graph.exe.ProcessInstance -> JBPM_PROCESSINSTANCE
| [junit] 19:38:43,109 [main] INFO Configuration : Reading mappings from resource: org/jbpm/graph/exe/Token.hbm.xml
| ...................
| ................... (continues ...)
| [junit] 19:38:43,734 [main] INFO Configuration : processing association property references
| [junit] 19:38:43,734 [main] INFO Configuration : processing foreign key constraints
| [junit] 19:38:43,750 [main] INFO Configuration : processing extends queue
| [junit] 19:38:43,750 [main] INFO Configuration : processing collection mappings
| [junit] 19:38:43,750 [main] INFO Configuration : processing association property references
| [junit] 19:38:43,750 [main] INFO Configuration : processing foreign key constraints
| [junit] 19:38:43,750 [main] INFO SchemaExport : Running hbm2ddl schema export
| [junit] 19:38:43,765 [main] INFO SchemaExport : exporting generated schema to database
| [junit] 19:38:43,765 [main] INFO C3P0ConnectionProvider : C3P0 using driver: oracle.jdbc.driver.OracleDriver at URL: jdbc:oracle:thin@192.168.0.110:1521:devdb
| [junit] 19:38:43,765 [main] INFO C3P0ConnectionProvider : Connection properties: {user=jbpmtest, password=****}
| [junit] 19:38:43,765 [main] INFO C3P0ConnectionProvider : autocommit mode: false
| [junit] 19:38:43,765 [main] DEBUG JbpmContext : closing JbpmContext
| [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.062 sec
| [junit] TEST org.jbpm.context.exe.CustomVariableStringIdDbTest FAILED
|
I would really appreciate if someone who has successfully done this can help me out.
Thanks,Kazam.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957599#3957599
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957599
19 years, 9 months
[Tomcat, HTTPD, Servlets & JSP] - Http Session lost in Linux (SUSE LINUX)
by gloriag
We are using JBoss 4.0.1 on SUSE Linux Sever 9(i586) , we noticed that whenever user clicks different items on our web application, tomcat servlet container renders different http session ids so the objects set in the session got lost.
For example user first clicks page Home, userName admin got set in the session, then the same user clicks page DiscoverySetup, new session comes up, when it tries to retrieve username, it has been gone.
ControllerServlet-doHandleRequest: httpsession id = 0E6B272FDE584B4CED757CF57743BA79
ControllerServlet-doHandleRequest: userName = admin page = Home
ControllerServlet-doHandleRequest: httpsession id = B511D07B4C0EC1CBB85AFCF9D1EA5F48
ControllerServlet-doHandleRequest: userName = null page = DiscoverySetup
The same application runnin on windows is fine. It is also fine on RedHat Linux.
Any idea on how to fix it? Do we need to apply patch for jboss or Suse? or any special tomcat configuration for Suse? Thanks
Regards,
Gloria
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957595#3957595
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957595
19 years, 9 months