I just tried the new upgrade.jar within server runtime, context-priority-classloader element is gone. But there's still no datasource dependency, which will cause failure of application deployment..

2006/6/2, Donald Woods <drw_web@yahoo.com>:
How old is the upgrade.jar you are using?
Noticed that your generated plan still has the old
context-priority-classloader element in it.....

-Donald


Zhang Song wrote:
> 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?