Migrating your application from JBoss 4.x to JBoss 5.x
- When migrating your application from JBoss 4.x to JBoss 5.x, some problems might occur.
- Below is a list of some of these possible problems. Each problem is associated with its possible reason and solution.
- This list was partially taken from JBoss migration tips posted here:
- labs.jboss.com/community/wiki/MigrationfromJBoss4.pdf
- 1) EAR can't be deployed
- Reason
- The ejb-jar-Attributes are more seriously validated against the dtd.
- Solution
- Replace the current header of the ejb-jar.xml:
- <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE ejb-jar PUBLIC "-//Sun
- Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejbjar_2_0.dtd"><ejb-jar>
- 2) Persistence.xml fails to deploy
- Reason
- This file is strictly validated by JBoss 5 (unlike the validation done in JBoss 4)
- Solution
- Make sure the header of persistence.xml is :
- <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/
- XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/
- ns/persistence/persistence_1_0.xsd" version="1.0">
- 3) JSP's are not compiled anymore
- Reason
- According to JSP 2.0 specification this code is illegal:
- <mytags:tag value="<%= "hi!" %>" />
- Instead the correct sentence would be:
- <mytags:tag value='<%= "hi!" %>' /><mytags:tag value="<%= \"hi!\" %>" /><mytags:tag
- value='<%= \"name\" %>' />
- Solution
- Change all tags to a pattern like <mytags:tag value='<%= "hi!" %>' /> to be compatible with
- the current spec.
- 4) JSP's are reaching the 65k-boundary
- Reason
- Tomcat encodes all of its variables, making the code very large.
- Solution
- Alter jboss-5.0.0.GA/server/default/deployers/jbossweb.deployer/web.xml
- In section
- <servlet> <servlet-name>jsp</servlet-name> <servletclass>org.apache.jasper.servlet.JspServlet</servlet-class>
- add<init-param> <param-name>genStrAsCharArray</param-name> <paramvalue>true</param-value> </init-param>

Comments
I am actually in the middle process of upgrading (the JDK as well as jboss) and it is a real nightmare to say the least. So many jars have to be replaced (hibernate, sl4j, etc .) and many properties have been removed or moved completely to a different file altogether.
Will drop my dime when I have finished the migration process.
See also:
http://venugopaal.wordpress.com/2009/02/02/jboss405-to-jboss-5ga/
Do you know where are the new files that were here:
jboss/default/deploy/jboss-web.deployer/server.xml
jboss/default/deploy/jboss-web.deployer/META-INF/jboss-service.xml
I found jboss-5.1.0.GA/server/default/deploy/jbossweb.sar:
However that folder contains only a markedly different server.xml file but no jboss-service.xml file.
Please no Google links, reply only if you know the answer.
server/default/deploy/jbossweb.sar/server.xml
server/default/deployers/jboss-web.deployer/war-deployers-beans.xml is for jboss/default/deploy/jboss-web.deployer/META-INF/jboss-service.xml
There is no such file in 5GA:
server/default/deployers/jboss-web.deployer/war-deployers-beans.xml
Are you sure this is the correct file and file path?
Maybe you meant:
default/deployers/jbossweb.deployer/META-INF/war-deployers-jboss-beans.xml
?
Yes ,
server/default/deployers/jbossweb.deployer/META-INF/war-deployers-jboss-beans.xml
When I am adding "socketType=SSL" to the JRMP protocol in boss-5.1.0.GA/server/default/deploy/management/console-mgr.sar/META-INF/jboss-service.xml i am getting the following exception. This wasnt an issue with GA4, only with the new version.
DEPLOYMENTS MISSING DEPENDENCIES:
Deployment "jboss.admin:service=PluginManager" is missing the following dependencies:
Dependency "jboss.jmx:name=Invoker,protocol=jrmp,service=proxyFactory,socketType=SSL,type=adaptor" (should be in state "Create", but is actually in state "** NOT FOUND Depends on 'jboss.jmx:name=Invoker,protocol=jrmp,service=proxyFactory,socketType=SSL,type=adaptor' **")
Deployment "jboss.web.deployment:war=/web-console" is missing the following dependencies:
Dependency "jboss.admin:service=PluginManager" (should be in state "Create", but is actually in state "Configured")
DEPLOYMENTS IN ERROR:
Deployment "jboss.jmx:name=Invoker,protocol=jrmp,service=proxyFactory,socketType=SSL,type=adaptor" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.jmx:name=Invoker,protocol=jrmp,service=proxyFactory,socketType=SSL,type=adaptor' **
I think you should add the socketType=SSL to the jboss:service=invoker,type=jrmp
In server/default/deploy/legacy-invokers-service.xml