On Jun 1, 2006, at 7:56 PM, Song Scorpio wrote:

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..

Do you think the upgrade tool should insert comments into every plan about likely problems such as this one about datasources?  Since it's possible to resolve a resource-ref without a plan entry if the resource-ref uses the same name as the datasource plan, we'd have to look at the j2ee deployment descriptors to be sure whether or not a jndi ref was present.   Looking into dds is beyond what I think the upgrade tool should be doing.  However, adding comments always would be pretty easy to do, I didn't think to do it however.

thanks
david jencks


2006/6/2, Donald Woods <[EMAIL PROTECTED]>:
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?




Reply via email to