[JBoss Seam] - Jboss + Seam + MySQL + MyFaces installation guide
by christophe.laumond
Hi
We have spent a lot of time in order to install a working environment for Seam, so we hope this little guide will help other people.
We don't consider this guide as a reference, it simply contains the step we have followed in order to get a basic working environment which matches to our needs.
We are working on Windows so we have tried this guide on Linux.
The main issue was that we HAVE to use JEMS installer and not another version of JBoss.
It is true that it was written in the README file but since we have already a JBoss AS working installation we spent time to try with it.
It could have been great if the README would have inform us that seam doesn't work with other JBoss version.
1. Install JBoss AS 4.0.4.GA with the EJB 3.0 profile selected using the JEMS installer ( this is important : using JEMS ! )
2. Install jboss-seam-1.0.1.GA unzip jboss-seam-1.0.1.GA.zip in a directory ( refered later as jboss-seam-1.0.1.GA in this document )
3. Install apache-ant-1.6.5 ( unzip + set JAVA_HOME and ANT_HOME environment variable )
- Add the bin directory for ANT_HOME to the path variable (e.g. Add ";C:\apache-ant-1.6-5\bin" to PATH variable
2. In order to build Seam :
in jboss-seam-1.0.1.GA
- Edit the "build.properties" file and change jboss.home to your
- JBoss AS installation directory ( refered later as jboss-4.0.4.GA-jems in this document )
- Run ant into this folder.
A new directory will be created (e.g: C:\jboss-seam-September 13 2006)
- Copy and paste the jboss-seam.jar from this directory into the lib folder of your project
3. In order to use MySql as database for your application,
- copy mysql-connector-java-5.0.3-bin.jar in server\default\lib
- See Deploy -ds.xml file ( you can find a sample of "datasource-ds.xml" file in docs\examples\jca\mysql-ds.xml" )
4. In order to use the MyFaces v1.1.3 ( the one in the Seam installation ) on your server,
- you have to copy some jar files from
jboss-seam-1.0.1.GA\lib
to
jboss-4.0.4.GA-jems\server\default\deploy\jbossweb-tomcat55.sar\jsf-libs
These files are:
(1) commons-beanutils-1.7.0.jar
(2) commons-codec-1.3.jar
(3) myfaces-api-1.1.3.jar
(4) myfaces-impl-1.1.3.jar
and you have to remove the previous non-versioned jar.
- Finally, you have to modify jboss-4.0.4.GA-jems\server\default\deploy\jbossweb-tomcat55.sar\conf\web.xml
replace myfaces-impl.jar with myfaces-impl-1.1.3.jar
5. In order to use the MyFaces v1.1.3 ( the one in the Seam installation ) in your Eclipse Seam project,
you have to copy the following jar in a lib folder and add all this libraries to your buildpath.
- myfaces-api-1.1.3.jar from the directory jboss-seam-1.0.1.GA\lib
- jboss-ejb3x.jar,
ejb3-persistence.jar,
jboss-annotations-ejb3.jar,
hibernate-annotations.jar
from jboss-4.0.4.GA-jems\client
Note: When deploying your application copy and paste the -ds.xml in the deploy directory
We hope this guide is understandable and doesn't contain any error.
Any feedback about this guide is welcome.
Yogesh and Christophe
M-ITC Ltd,
Mauritius
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3975949#3975949
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3975949
19 years, 7 months
[JBoss Seam] - Re: @Redirect issues - not redirecting to a page
by zzzz8
"gavin.king(a)jboss.com" wrote : Put breakpoints in the Seam code and check that:
|
| (1) ExceptionInterceptor.handled() gets called
| (2) SeamExceptionFilter.isExceptionHandled() gets called
|
| And tell me what SeamExceptionFilter.isExceptionHandled() returns.
1. Yes, ExceptionInterceptor.handled() does get called
2. request.getAttribute("org.jboss.seam.exceptionHandled") returns the ConnectionException object. Therefore, SeamExceptionFilter.isExceptionHandled(request) returns true.
Consequently, the code segment which invokes it:
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
| throws IOException, ServletException
| {
| try
| {
| chain.doFilter(request, response);
|
| //There is a bug in JBoss AS where JBoss does not clean up
| //any orphaned tx at the end of the request. It is possible
| //that a Seam-managed tx could be left orphaned if, eg.
| //facelets handles an exceptions and displays the debug page.
| rollbackTransactionIfNecessary();
| }
| catch (Exception e)
| {
| rollbackTransactionIfNecessary();
| endWebRequestAfterException(request);
| if ( !isExceptionHandled(request) )
| {
| log.error("uncaught exception handled by Seam", e);
| throw new ServletException(e);
| }
| }
| finally
| {
| Lifecycle.setPhaseId(null);
| log.debug("ended request");
| }
| }
Because the if condition statement returns false, it then proceeds to the finally block (skipping over the log.error statement and the throw new ServletException statement).
Again, thanks for all the help!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3975948#3975948
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3975948
19 years, 7 months
[Installation, Configuration & Deployment] - Trying to install an already registered mbean: jboss.rmi:typ
by key2run
can any one say why this happening????
org.jboss.deployment.DeploymentException: Trying to install an already registered mbean: jboss.rmi:type=RMIClassLoader
at org.jboss.system.ServiceCreator.install(ServiceCreator.java:70)
at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:431)
at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:153)
at org.jboss.system.ServiceController.install(ServiceController.java:215)
at sun.reflect.GeneratedMethodAccessor66.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy4.install(Unknown Source)
at org.jboss.deployment.SARDeployer.create(SARDeployer.java:232)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:935)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:789)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy9.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:319)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:507)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:192)
at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:265)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:230)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:943)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:428)
at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:285)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:989)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:790)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:737)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:453)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:330)
at org.jboss.Main.boot(Main.java:187)
at org.jboss.Main$1.run(Main.java:438)
at java.lang.Thread.run(Thread.java:534)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3975946#3975946
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3975946
19 years, 7 months