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>
Thank you for your interest!

We will contact you as soon as possible.

Send us a message

Oops, something went wrong
Please try again or contact us by email at info@tikalk.com