On May 31, 2011, at 9:38 AM, ranbaab wrote:

> Hi all,
> 
> Our web application deploy on tomcat is planning to move to
> geronimo-tomcat6-2.2.
> 
> In our application, we use castor-codegen-1.1 to generate the java class
> from the schema file.
> The generated class is using the method 
> Unmarshaller.unmarshal(com/bnt/ui/preference/xml/UserPreference, reader)
> from the castor-1.1.

Hi Ranjan,
Geronimo includes castor 1.0.5. I'm not positive, but I think it will probably 
be in one of your parent classloaders. So, if you require castor 1.1, you'll 
want to hide castor from your application. A deployment plan like the following 
should do that:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1"; 
xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1"; 
xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.1";>
  <dep:environment>
    <dep:moduleId>
      <dep:groupId>org.mygroup</dep:groupId>
      <dep:artifactId>MyApp</dep:artifactId>
      <dep:version>1.1</dep:version>
      <dep:type>car</dep:type>
    </dep:moduleId>

    <dep:hidden-classes>
      <dep:filter>org.exolab</dep:filter>
      <dep:filter>org.castor</dep:filter>
    </dep:hidden-classes>
  </dep:environment>
</web-app>

To deploy, something like:

./bin/deploy.sh deploy <your-webapp.war> <your-xml-deployment-plan>

No guarantees that this will actually alter the behavior of your app... May 
need more information... But let's start by using a single version of castor...

--kevan

Reply via email to