geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zhang Song" <scorpio.s...@gmail.com>
Subject Re: Please try out the upgrade jar
Date Thu, 01 Jun 2006 15:11:55 GMT
For an application which is using datasource, we should manually add
dependency to deployment plan upgraded by the tool.

The plan upgraded by the tool is following:
- <#> <web-app xmlns="*http://geronimo.apache.org/xml/ns/j2ee/web-1.0*"xmlns:naming
="*http://geronimo.apache.org/xml/ns/naming-1.1*" xmlns:sec="*
http://geronimo.apache.org/xml/ns/security-1.1*" xmlns:sys="*
http://geronimo.apache.org/xml/ns/deployment-1.1*">
 - <#> <sys:environment>
 - <#> <sys:moduleId>
   <sys:groupId>Sample</sys:groupId>
   <sys:artifactId>EMPdemo</sys:artifactId>
   <sys:version>1.1</sys:version>
   <sys:type>car</sys:type>
  </sys:moduleId>
   <sys:dependencies />
   <sys:hidden-classes />
   <sys:non-overridable-classes />
  </sys:environment>
   <context-root>/EMPdemo</context-root>
   <context-priority-classloader>false</context-priority-classloader>
 - <#> <naming:resource-ref>
   <naming:ref-name>jdbc/DataSource</naming:ref-name>
   <naming:resource-link>SystemDatasource</naming:resource-link>
  </naming:resource-ref>
  </web-app>

But this upgraded plan will cause following error during deployment:
------------------------------------------------------
   Error: Unable to distribute EMPdemo-1.0.war: Unable to resolve
   resource reference 'jdbc/DataSource' (Could not find resource
   'jdbc/EmployeeDatasource'.  Perhaps it has not yet been configured,
   or your application does not have a dependency declared for that
   resource module?)
------------------------------------------------------

After I add datasource's module reference to the upgraded plan, that
application can be deployed successfully.
--------------------------------------------------
 - <#> <sys:environment>
 - <#> <sys:moduleId>
   <sys:groupId>Sample</sys:groupId>
   <sys:artifactId>EMPdemo</sys:artifactId>
   <sys:version>1.1</sys:version>
   <sys:type>car</sys:type>
  </sys:moduleId>
 - <#> <sys:dependencies>
 - <#> <sys:dependency>
   <sys:groupId>Sample</sys:groupId>
   <sys:artifactId>EmployeeDatasource</sys:artifactId>
   <sys:version>1.1</sys:version>
   <sys:type>car</sys:type>
  </sys:dependency>
  </sys:dependencies>
   <sys:hidden-classes />
   <sys:non-overridable-classes />
  </sys:environment>
   <context-root>/EMPdemo</context-root>
   <context-priority-classloader>false</context-priority-classloader>
 - <#> <naming:resource-ref>
   <naming:ref-name>jdbc/DataSource</naming:ref-name>
   <naming:resource-link>jdbc/EmployeeDatasource</naming:resource-link>
  </naming:resource-ref>
  </web-app>
--------------------------------------------------

Could the upgrade tool add some comments to plan or give a warning to user
when processing with datasource?

Mime
View raw message