You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by David Jencks <da...@yahoo.com> on 2006/05/12 19:39:28 UTC

Please try out the upgrade jar

I put the upgrade jar at

http://people.apache.org/~djencks/geronimo-upgrade-1.1-SNAPSHOT.jar

It would be very helpful to find out to what extent this works in  
real life.

It's supposed to include all the classes it needs (that's why its so  
big)

usage:

java -jar geronimo-upgrade-1.1-SNAPSHOT.jar <path to source plan>  
[<path to target plan>]

if you leave out the target, you'll get output in the same directory  
as the source.

thanks
david jencks


Re: Please try out the upgrade jar

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On 5/12/06, David Jencks <da...@yahoo.com> wrote:
> I put the upgrade jar at
>
> http://people.apache.org/~djencks/geronimo-upgrade-1.1-SNAPSHOT.jar
>
> It would be very helpful to find out to what extent this works in
> real life.

What do we need it for?

> david jencks

Jacek

-- 
Jacek Laskowski
http://www.laskowski.net.pl

Re: Please try out the upgrade jar

Posted by Dave Colasurdo <da...@earthlink.net>.
I've also noticed another difference between the 1.0 and 1.1 deployment 
plans.

Concerning the following xml:

   <security-realm-name>geronimo-properties-realm</security-realm-name>
   <security>
     <default-principal>
       <principal name="anonymous" 
class="org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal"/>
     </default-principal>
     <role-mappings>
       <role role-name="tomcat">
         <principal name="admin" 
class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal"/>
       </role>
     </role-mappings>
   </security>


IIRC, for *G1.0*, certain applications required this xml in order to 
deploy/start properly on Jetty.  It was *not* required for Tomcat.

For *G1.1*, it seems that these security settings are required for both 
Jetty and Tomcat.  The point is that Jetty applications will migrate 
fine though Tomcat applications may now require these few additional 
lines of xml.

Perhaps the Upgrade tool should account for this case..

Thanks
-Dave-


David Jencks wrote:
> Thanks for trying it out.  I changed how it starts quite a bit today -- 
> I hope it hasn't become too slow.
> 
> I also think I fixed the schema issue Dave Colasurdo found.
> 
> thanks
> david jencks
> 
> On May 14, 2006, at 3:57 PM, Chris Cardona wrote:
> 
>> Hi David J.,
>>
>> This is very helpful! So far it worked for the simple
>> ejb, war, ear that I've tested. I'll let you know if I
>> ran into problems deploying other modules.
>>
>> Dave Colasurdo,
>>
>> FYI, I tried upgrading my geronimo-web.xml and it was
>> converted from:
>>
>> <web-app xmlns="http://geronimo.apache.org/xml/ns/web"
>> ...
>>
>> To:
>>
>> <web-app
>> xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1"
>> ...
>>
>> Maybe the upgrade tool is not expecting:
>>
>> <web-app
>> xmlns="http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-1.0"
>> ...
>>
>> Not sure if this is a bug or that's the expected
>> behavior.
>>
>> Chris
>>
>> --- Dave Colasurdo <da...@earthlink.net> wrote:
>>
>>> Thanks David!  It seems to run fine on the simple
>>> plans that I have
>>> tried though I do have a few quick comments and
>>> observations..
>>>
>>> 1) Should the version in the schema name be updated
>>> (from 1.0 -> 1.1)
>>> for both jetty and tomcat plans? For example, the
>>> following line is
>>> unchanged when the tool is run..
>>>    <web-app
>>>
>> xmlns="http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-1.0">
>>>
>>> 2) When using a unicode file as input (on windows
>>> platform) the output
>>> file isn't created in unicode format.
>>>
>>> 3) On windows platform, it seems that CR (x'0D') is
>>> inserted on the end
>>> of every line..  This appears as a musical note in
>>> my editor :)
>>>
>>> -Dave-
>>>
>>>
>>> David Jencks wrote:
>>>> I put the upgrade jar at
>>>>
>>>>
>>>
>> http://people.apache.org/~djencks/geronimo-upgrade-1.1-SNAPSHOT.jar
>>>>
>>>> It would be very helpful to find out to what
>>> extent this works in real
>>>> life.
>>>>
>>>> It's supposed to include all the classes it needs
>>> (that's why its so big)
>>>>
>>>> usage:
>>>>
>>>> java -jar geronimo-upgrade-1.1-SNAPSHOT.jar <path
>>> to source plan> [<path
>>>> to target plan>]
>>>>
>>>> if you leave out the target, you'll get output in
>>> the same directory as
>>>> the source.
>>>>
>>>> thanks
>>>> david jencks
>>>>
>>>>
>>>>
>>>
>>
>>
>> __________________________________________________
>> Do You Yahoo!?
>> Tired of spam?  Yahoo! Mail has the best spam protection around
>> http://mail.yahoo.com
> 
> 
> 

Re: Please try out the upgrade jar

Posted by David Jencks <da...@yahoo.com>.
Thanks for trying it out.  I changed how it starts quite a bit today  
-- I hope it hasn't become too slow.

I also think I fixed the schema issue Dave Colasurdo found.

thanks
david jencks

On May 14, 2006, at 3:57 PM, Chris Cardona wrote:

> Hi David J.,
>
> This is very helpful! So far it worked for the simple
> ejb, war, ear that I've tested. I'll let you know if I
> ran into problems deploying other modules.
>
> Dave Colasurdo,
>
> FYI, I tried upgrading my geronimo-web.xml and it was
> converted from:
>
> <web-app xmlns="http://geronimo.apache.org/xml/ns/web"
> ...
>
> To:
>
> <web-app
> xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1"
> ...
>
> Maybe the upgrade tool is not expecting:
>
> <web-app
> xmlns="http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-1.0"
> ...
>
> Not sure if this is a bug or that's the expected
> behavior.
>
> Chris
>
> --- Dave Colasurdo <da...@earthlink.net> wrote:
>
>> Thanks David!  It seems to run fine on the simple
>> plans that I have
>> tried though I do have a few quick comments and
>> observations..
>>
>> 1) Should the version in the schema name be updated
>> (from 1.0 -> 1.1)
>> for both jetty and tomcat plans? For example, the
>> following line is
>> unchanged when the tool is run..
>>    <web-app
>>
> xmlns="http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-1.0">
>>
>> 2) When using a unicode file as input (on windows
>> platform) the output
>> file isn't created in unicode format.
>>
>> 3) On windows platform, it seems that CR (x'0D') is
>> inserted on the end
>> of every line..  This appears as a musical note in
>> my editor :)
>>
>> -Dave-
>>
>>
>> David Jencks wrote:
>>> I put the upgrade jar at
>>>
>>>
>>
> http://people.apache.org/~djencks/geronimo-upgrade-1.1-SNAPSHOT.jar
>>>
>>> It would be very helpful to find out to what
>> extent this works in real
>>> life.
>>>
>>> It's supposed to include all the classes it needs
>> (that's why its so big)
>>>
>>> usage:
>>>
>>> java -jar geronimo-upgrade-1.1-SNAPSHOT.jar <path
>> to source plan> [<path
>>> to target plan>]
>>>
>>> if you leave out the target, you'll get output in
>> the same directory as
>>> the source.
>>>
>>> thanks
>>> david jencks
>>>
>>>
>>>
>>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com


Re: Please try out the upgrade jar

Posted by Chris Cardona <ja...@yahoo.com>.
Hi David J.,

This is very helpful! So far it worked for the simple
ejb, war, ear that I've tested. I'll let you know if I
ran into problems deploying other modules.

Dave Colasurdo,

FYI, I tried upgrading my geronimo-web.xml and it was
converted from:

<web-app xmlns="http://geronimo.apache.org/xml/ns/web"
...

To:

<web-app
xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1"
...

Maybe the upgrade tool is not expecting:

<web-app
xmlns="http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-1.0"
...

Not sure if this is a bug or that's the expected
behavior.

Chris

--- Dave Colasurdo <da...@earthlink.net> wrote:

> Thanks David!  It seems to run fine on the simple
> plans that I have 
> tried though I do have a few quick comments and
> observations..
> 
> 1) Should the version in the schema name be updated
> (from 1.0 -> 1.1) 
> for both jetty and tomcat plans? For example, the
> following line is 
> unchanged when the tool is run..
>    <web-app
>
xmlns="http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-1.0">
> 
> 2) When using a unicode file as input (on windows
> platform) the output 
> file isn't created in unicode format.
> 
> 3) On windows platform, it seems that CR (x'0D') is
> inserted on the end 
> of every line..  This appears as a musical note in
> my editor :)
> 
> -Dave-
> 
> 
> David Jencks wrote:
> > I put the upgrade jar at
> > 
> >
>
http://people.apache.org/~djencks/geronimo-upgrade-1.1-SNAPSHOT.jar
> > 
> > It would be very helpful to find out to what
> extent this works in real 
> > life.
> > 
> > It's supposed to include all the classes it needs
> (that's why its so big)
> > 
> > usage:
> > 
> > java -jar geronimo-upgrade-1.1-SNAPSHOT.jar <path
> to source plan> [<path 
> > to target plan>]
> > 
> > if you leave out the target, you'll get output in
> the same directory as 
> > the source.
> > 
> > thanks
> > david jencks
> > 
> > 
> > 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: Please try out the upgrade jar

Posted by Dave Colasurdo <da...@earthlink.net>.
Thanks David!  It seems to run fine on the simple plans that I have 
tried though I do have a few quick comments and observations..

1) Should the version in the schema name be updated (from 1.0 -> 1.1) 
for both jetty and tomcat plans? For example, the following line is 
unchanged when the tool is run..
   <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-1.0">

2) When using a unicode file as input (on windows platform) the output 
file isn't created in unicode format.

3) On windows platform, it seems that CR (x'0D') is inserted on the end 
of every line..  This appears as a musical note in my editor :)

-Dave-


David Jencks wrote:
> I put the upgrade jar at
> 
> http://people.apache.org/~djencks/geronimo-upgrade-1.1-SNAPSHOT.jar
> 
> It would be very helpful to find out to what extent this works in real 
> life.
> 
> It's supposed to include all the classes it needs (that's why its so big)
> 
> usage:
> 
> java -jar geronimo-upgrade-1.1-SNAPSHOT.jar <path to source plan> [<path 
> to target plan>]
> 
> if you leave out the target, you'll get output in the same directory as 
> the source.
> 
> thanks
> david jencks
> 
> 
> 

Re: Please try out the upgrade jar

Posted by Paul McMahan <pa...@gmail.com>.
On 5/12/06, Paul McMahan <pa...@gmail.com> wrote:
> Also, I think you (or someone) mentioned earlier that it might be
> useful to make this utility available from the admin console.  Seems
> like one reasonable approach would be to enable the current
> application deployment portlet to detect when a backlevel plan is
> provided (assuming that's always possible) and invoke your utility to
> provide a head start on creating a new plan.  If there's consensus
> around that idea then I can help with the UI.

I attached a patch to GERONIMO-2006 that implements this idea.  When a
deployment fails the console looks for a configId attribute in the
plan and if found provides the user with a new plan generated by the
upgrader. They can edit the upgraded plan in place and save it
locally. In some cases (welcome app, jmx-debug, and others) the
upgraded plan needs no further editing so the user can save the plan
and then immediately deploy again from the same portlet.  In some
cases (daytrader) manual editing is required but the upgraded plan at
least provides a starting place.

Best wishes,
Paul

>
> Paul
>
> On 5/12/06, David Jencks <da...@yahoo.com> wrote:
> > I put the upgrade jar at
> >
> > http://people.apache.org/~djencks/geronimo-upgrade-1.1-SNAPSHOT.jar
> >
> > It would be very helpful to find out to what extent this works in
> > real life.
> >
> > It's supposed to include all the classes it needs (that's why its so
> > big)
> >
> > usage:
> >
> > java -jar geronimo-upgrade-1.1-SNAPSHOT.jar <path to source plan>
> > [<path to target plan>]
> >
> > if you leave out the target, you'll get output in the same directory
> > as the source.
> >
> > thanks
> > david jencks
> >
> >
>

Re: Please try out the upgrade jar

Posted by Paul McMahan <pa...@gmail.com>.
David,  I'm sure 1.0 users will really appreciate this feature.  One
tweak you may want to consider is printing the updated plan to stdout
instead of saving it in a file in the src plan's directory when a
target path is not specified.  That makes it easier to redirect its
output to text processing utilities like sed, awk, perl, grep, etc and
in my personal experience is the expected behavior for this type of
utility.

Also, I think you (or someone) mentioned earlier that it might be
useful to make this utility available from the admin console.  Seems
like one reasonable approach would be to enable the current
application deployment portlet to detect when a backlevel plan is
provided (assuming that's always possible) and invoke your utility to
provide a head start on creating a new plan.  If there's consensus
around that idea then I can help with the UI.

Paul

On 5/12/06, David Jencks <da...@yahoo.com> wrote:
> I put the upgrade jar at
>
> http://people.apache.org/~djencks/geronimo-upgrade-1.1-SNAPSHOT.jar
>
> It would be very helpful to find out to what extent this works in
> real life.
>
> It's supposed to include all the classes it needs (that's why its so
> big)
>
> usage:
>
> java -jar geronimo-upgrade-1.1-SNAPSHOT.jar <path to source plan>
> [<path to target plan>]
>
> if you leave out the target, you'll get output in the same directory
> as the source.
>
> thanks
> david jencks
>
>

RE: Please try out the upgrade jar

Posted by Lin Sun <li...@gmail.com>.
Hi David,

The dependency tags for the the module ID of the server wide datasource in
the Geronimo-web.xml were not required for 1.0, so it is unnatural for user
to know they are required for 1.1.  If the upgrader tool doesn’t indicate
that, user will just have to go figure that out by luck.

One a second thought, I don’t quite understand why we need to have the
datasource as the dependency in 1.1 while we don’t need it as the dependency
in 1.0.  The Geronimo-web.xml already has the ref-name and resource-link
information within the resource-ref tags.

Thanks, Lin


-----Original Message-----
From: David Jencks [mailto:david_jencks@yahoo.com] 
Sent: Friday, June 02, 2006 12:01 AM
To: dev@geronimo.apache.org
Subject: Re: Please try out the upgrade jar


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 <dr...@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? 





Re: Please try out the upgrade jar

Posted by David Jencks <da...@yahoo.com>.
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 <dr...@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?
>
>
>


Re: Please try out the upgrade jar

Posted by Song Scorpio <sc...@gmail.com>.
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 <dr...@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?
>
>
>

Re: Please try out the upgrade jar

Posted by Donald Woods <dr...@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?

Re: Please try out the upgrade jar

Posted by Zhang Song <sc...@gmail.com>.
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?

RE: Please try out the upgrade jar

Posted by Lin Sun <li...@gmail.com>.
Thanks, that worked very well!


-----Original Message-----
From: Donald Woods [mailto:drw_web@yahoo.com] 
Sent: Wednesday, May 31, 2006 4:48 PM
To: dev@geronimo.apache.org
Subject: Re: Please try out the upgrade jar

E:\geronimo-1.1-SNAPSHOT\bin>java -jar upgrade.jar
Parameter usage:
inputPlan outputPlan
or
inputPlan
in which case the output will be in the same location as inputPlan with 
'.upgraded' appended



Lin Sun wrote:
> Hi David,
> 
> How are we supposed to run the latest upgrade tool now that it is a module
> inside of Geronimo?   I am able to see the upgraded plan from admin
console,
> but I haven't been able to get the latest upgrade tool by itself running.
> 
> What I did was:
> 
> E:\geronimo-1.1-SNAPSHOT\bin>java -jar client.jar
> geronimo/upgrade-cli/1.1-SNAPSHOT
> java.lang.IllegalArgumentException: Invalid id:
> geronimo/upgrade-cli/1.1-SNAPSHOT
>         at
> org.apache.geronimo.kernel.repository.Artifact.create(Artifact.java:4
> 9)
>         at
> org.apache.geronimo.system.main.ClientCommandLine.main(ClientCommandL
> ine.java:46)
> 
> I also tried to execute "deploy.bat start
geronimo/upgrade/1.1-SNAPSHOT/car"
> before it, but it didn't make any difference.
> 
> Thanks, 
> 
> Lin
> 
> 
> -----Original Message-----
> From: David Jencks [mailto:david_jencks@yahoo.com] 
> Sent: Monday, May 29, 2006 1:36 PM
> To: dev@geronimo.apache.org
> Subject: Re: Please try out the upgrade jar
> 
> Toby,
> 
> Thanks for pointing this out.  I've fixed it in 1.1, will port to  
> trunk soon.  See http://issues.apache.org/jira/browse/GERONIMO-2068
> 
> thanks
> david jencks
> 
> On May 26, 2006, at 3:29 PM, toby cabot wrote:
> 
> 
>>David,
>>
>>Thanks for providing this tool, it's a big help.  I had some problems
>>on a test geronimo-application.xml file that includes some gbean
>>references (for hooking up to security gbeans).  The file looks like:
>>
>>=================================================
>><?xml version="1.0" ?>
>>
>><application xmlns="http://geronimo.apache.org/xml/ns/j2ee/ 
>>application"
>>  configId="hello"
>>  parentId="geronimo/j2ee-security/1.0.1-SNAPSHOT/car">
>>
>>
>>    <gbean name="hello-realm"  
>>class="org.apache.geronimo.security.realm.GenericSecurityRealm">
>>        <attribute name="realmName">hello-realm</attribute>
>>        <reference name="LoginModuleConfiguration">
>>            <name>hello-login-chain</name>
>>        </reference>
>>        <reference name="ServerInfo">
>>            <gbean- 
>>name>geronimo.server:J2EEApplication=null,J2EEModule=geronimo/j2ee- 
>>system/1.0.1-SNAPSHOT/ 
>>car,J2EEServer=geronimo,j2eeType=GBean,name=ServerInfo</gbean-name>
>>        </reference>
>>        <reference name="LoginService">
>>            <gbean- 
>>name>geronimo.server:J2EEApplication=null,J2EEModule=geronimo/j2ee- 
>>security/1.0.1-SNAPSHOT/ 
>>car,J2EEServer=geronimo,j2eeType=JaasLoginService,name=JaasLoginServic 
>>e</gbean-name>
>>        </reference>
>>    </gbean>
>>
>>
>>    <gbean name="hello-login-chain"  
>>class="org.apache.geronimo.security.jaas.JaasLoginModuleUse">
>>        <attribute name="controlFlag">REQUIRED</attribute>
>>        <reference name="LoginModule">
>>            <name>hello-login</name>
>>        </reference>
>>    </gbean>
>>
>>
>>    <gbean name="hello-login"  
>>class="org.apache.geronimo.security.jaas.LoginModuleGBean">
>>        <attribute  
>>name="loginModuleClass">reva.common.auth.TrivialLoginModule</ 
>>attribute>
>>        <attribute name="serverSide">true</attribute>
>>        <attribute name="options">
>>            usersURI=var/security/demo_users.properties
>>            groupsURI=var/security/demo_groups.properties
>>        </attribute>
>>        <attribute name="loginDomainName">hello-realm</attribute>
>>    </gbean>
>>
>>
>></application>
>>=================================================
>>
>>The problem seems to be the application/gbean/reference/gbean-name
>>elements, as the error I get at offline deploy time looks like:
>>
>>Deployer operation failed: org.apache.xmlbeans.XmlException:  
>>Invalid deployment descriptor: [error: cvc-complex-type.2.4a:  
>>Expected elements 'groupId@http://geronimo.apache.org/xml/ns/ 
>>deployment-1.1 artifactId@http://geronimo.apache.org/xml/ns/ 
>>deployment-1.1 version@http://geronimo.apache.org/xml/ns/ 
>>deployment-1.1 module@http://geronimo.apache.org/xml/ns/ 
>>deployment-1.1 type@http://geronimo.apache.org/xml/ns/ 
>>deployment-1.1 name@http://geronimo.apache.org/xml/ns/ 
>>deployment-1.1' instead of 'gbean-name@http://geronimo.apache.org/ 
>>xml/ns/deployment-1.1' here in element reference@http:// 
>>geronimo.apache.org/xml/ns/deployment-1.1, error: cvc-complex-type. 
>>2.4a: Expected elements 'groupId@http://geronimo.apache.org/xml/ns/ 
>>deployment-1.1 artifactId@http://geronimo.apache.org/xml/ns/ 
>>deployment-1.1 version@http://geronimo.apache.org/xml/ns/ 
>>deployment-1.1 module@http://geronimo.apache.org/xml/ns/ 
>>deployment-1.1 type@http://geronimo.apache.org/xml/ns/ 
>>deployment-1.1 name@http://geronimo.apache.org/xml/ns/ 
>>deployment-1.1' instead of 'gbean-name@http://geronimo.apache.org/ 
>>xml/ns/deployment-1.1' here in element reference@http:// 
>>geronimo.apache.org/xml/ns/deployment-1.1]
>>Descriptor: <xml-fragment xmlns:dep="http://geronimo.apache.org/xml/ 
>>ns/deployment-1.1">
>>  <dep:environment>
>>    <dep:moduleId>
>>      <dep:groupId>default</dep:groupId>
>>      <dep:artifactId>hello</dep:artifactId>
>>      <dep:version>1-default</dep:version>
>>      <dep:type>car</dep:type>
>>    </dep:moduleId>
>>    <dep:dependencies>
>>      <dep:dependency>
>>        <dep:groupId>geronimo</dep:groupId>
>>        <dep:artifactId>j2ee-security</dep:artifactId>
>>        <dep:version>1.0.1-SNAPSHOT</dep:version>
>>        <dep:type>car</dep:type>
>>      </dep:dependency>
>>    </dep:dependencies>
>>    <dep:hidden-classes/>
>>    <dep:non-overridable-classes/>
>>  </dep:environment>
>>  <dep:gbean name="hello-realm"  
>>class="org.apache.geronimo.security.realm.GenericSecurityRealm">
>>    <dep:attribute name="realmName">hello-realm</dep:attribute>
>>    <dep:reference name="LoginModuleConfiguration">
>>      <dep:name>hello-login-chain</dep:name>
>>    </dep:reference>
>>    <dep:reference name="ServerInfo">
>>      <dep:gbean- 
>>name>geronimo.server:J2EEApplication=null,J2EEModule=geronimo/j2ee- 
>>system/1.0.1-SNAPSHOT/ 
>>car,J2EEServer=geronimo,j2eeType=GBean,name=ServerInfo</dep:gbean- 
>>name>
>>    </dep:reference>
>>    <dep:reference name="LoginService">
>>      <dep:gbean- 
>>name>geronimo.server:J2EEApplication=null,J2EEModule=geronimo/j2ee- 
>>security/1.0.1-SNAPSHOT/ 
>>car,J2EEServer=geronimo,j2eeType=JaasLoginService,name=JaasLoginServic 
>>e</dep:gbean-name>
>>    </dep:reference>
>>  </dep:gbean>
>>  <dep:gbean name="hello-login-chain"  
>>class="org.apache.geronimo.security.jaas.JaasLoginModuleUse">
>>    <dep:attribute name="controlFlag">REQUIRED</dep:attribute>
>>    <dep:reference name="LoginModule">
>>      <dep:name>hello-login</dep:name>
>>    </dep:reference>
>>  </dep:gbean>
>>  <dep:gbean name="hello-login"  
>>class="org.apache.geronimo.security.jaas.LoginModuleGBean">
>>    <dep:attribute  
>>name="loginModuleClass">reva.common.auth.TrivialLoginModule</ 
>>dep:attribute>
>>    <dep:attribute name="serverSide">true</dep:attribute>
>>    <dep:attribute name="options">usersURI=var/security/ 
>>demo_users.properties
>>            groupsURI=var/security/demo_groups.properties</ 
>>dep:attribute>
>>    <dep:attribute name="loginDomainName">hello-realm</dep:attribute>
>>  </dep:gbean>
>></xml-fragment>
>>org.apache.geronimo.common.DeploymentException:  
>>org.apache.xmlbeans.XmlException: Invalid deployment descriptor:  
>>[error: cvc-complex-type.2.4a: Expected elements 'groupId@http:// 
>>geronimo.apache.org/xml/ns/deployment-1.1 artifactId@http:// 
>>geronimo.apache.org/xml/ns/deployment-1.1 version@http:// 
>>geronimo.apache.org/xml/ns/deployment-1.1 module@http:// 
>>geronimo.apache.org/xml/ns/deployment-1.1 type@http:// 
>>geronimo.apache.org/xml/ns/deployment-1.1 name@http:// 
>>geronimo.apache.org/xml/ns/deployment-1.1' instead of 'gbean- 
>>name@http://geronimo.apache.org/xml/ns/deployment-1.1' here in  
>>element reference@http://geronimo.apache.org/xml/ns/deployment-1.1,  
>>error: cvc-complex-type.2.4a: Expected elements 'groupId@http:// 
>>geronimo.apache.org/xml/ns/deployment-1.1 artifactId@http:// 
>>geronimo.apache.org/xml/ns/deployment-1.1 version@http:// 
>>geronimo.apache.org/xml/ns/deployment-1.1 module@http:// 
>>geronimo.apache.org/xml/ns/deployment-1.1 type@http:// 
>>geronimo.apache.org/xml/ns/deployment-1.1 name@http:// 
>>geronimo.apache.org/xml/ns/deployment-1.1' instead of 'gbean- 
>>name@http://geronimo.apache.org/xml/ns/deployment-1.1' here in  
>>element reference@http://geronimo.apache.org/xml/ns/deployment-1.1]
>>Descriptor: <xml-fragment xmlns:dep="http://geronimo.apache.org/xml/ 
>>ns/deployment-1.1">
>>  <dep:environment>
>>    <dep:moduleId>
>>      <dep:groupId>default</dep:groupId>
>>      <dep:artifactId>hello</dep:artifactId>
>>      <dep:version>1-default</dep:version>
>>      <dep:type>car</dep:type>
>>    </dep:moduleId>
>>    <dep:dependencies>
>>      <dep:dependency>
>>        <dep:groupId>geronimo</dep:groupId>
>>        <dep:artifactId>j2ee-security</dep:artifactId>
>>        <dep:version>1.0.1-SNAPSHOT</dep:version>
>>        <dep:type>car</dep:type>
>>      </dep:dependency>
>>    </dep:dependencies>
>>    <dep:hidden-classes/>
>>    <dep:non-overridable-classes/>
>>  </dep:environment>
>>  <dep:gbean name="hello-realm"  
>>class="org.apache.geronimo.security.realm.GenericSecurityRealm">
>>    <dep:attribute name="realmName">hello-realm</dep:attribute>
>>    <dep:reference name="LoginModuleConfiguration">
>>      <dep:name>hello-login-chain</dep:name>
>>    </dep:reference>
>>    <dep:reference name="ServerInfo">
>>      <dep:gbean- 
>>name>geronimo.server:J2EEApplication=null,J2EEModule=geronimo/j2ee- 
>>system/1.0.1-SNAPSHOT/ 
>>car,J2EEServer=geronimo,j2eeType=GBean,name=ServerInfo</dep:gbean- 
>>name>
>>    </dep:reference>
>>    <dep:reference name="LoginService">
>>      <dep:gbean- 
>>name>geronimo.server:J2EEApplication=null,J2EEModule=geronimo/j2ee- 
>>security/1.0.1-SNAPSHOT/ 
>>car,J2EEServer=geronimo,j2eeType=JaasLoginService,name=JaasLoginServic 
>>e</dep:gbean-name>
>>    </dep:reference>
>>  </dep:gbean>
>>  <dep:gbean name="hello-login-chain"  
>>class="org.apache.geronimo.security.jaas.JaasLoginModuleUse">
>>    <dep:attribute name="controlFlag">REQUIRED</dep:attribute>
>>    <dep:reference name="LoginModule">
>>      <dep:name>hello-login</dep:name>
>>    </dep:reference>
>>  </dep:gbean>
>>  <dep:gbean name="hello-login"  
>>class="org.apache.geronimo.security.jaas.LoginModuleGBean">
>>    <dep:attribute  
>>name="loginModuleClass">reva.common.auth.TrivialLoginModule</ 
>>dep:attribute>
>>    <dep:attribute name="serverSide">true</dep:attribute>
>>    <dep:attribute name="options">usersURI=var/security/ 
>>demo_users.properties
>>            groupsURI=var/security/demo_groups.properties</ 
>>dep:attribute>
>>    <dep:attribute name="loginDomainName">hello-realm</dep:attribute>
>>  </dep:gbean>
>></xml-fragment>
>>        at  
>>org.apache.geronimo.j2ee.deployment.EARConfigBuilder.getEarPlan 
>>(EARConfigBuilder.java:342)
>>        at  
>>org.apache.geronimo.j2ee.deployment.EARConfigBuilder.getDeploymentPlan 
>>(EARConfigBuilder.java:260)
>>        at org.apache.geronimo.j2ee.deployment.EARConfigBuilder$ 
>>$FastClassByCGLIB$$38e56ec6.invoke(<generated>)
>>        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
>>        at  
>>org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke 
>>(FastMethodInvoker.java:38)
>>        at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke 
>>(GBeanOperation.java:122)
>>        at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke 
>>(GBeanInstance.java:817)
>>        at org.apache.geronimo.gbean.runtime.RawInvoker.invoke 
>>(RawInvoker.java:57)
>>        at  
>>org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke 
>>(RawOperationInvoker.java:35)
>>        at  
>>org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept 
>>(ProxyMethodInterceptor.java:96)
>>        at org.apache.geronimo.deployment.ConfigurationBuilder$ 
>>$EnhancerByCGLIB$$a95a5462.getDeploymentPlan(<generated>)
>>        at org.apache.geronimo.deployment.Deployer.deploy 
>>(Deployer.java:229)
>>        at org.apache.geronimo.deployment.Deployer.deploy 
>>(Deployer.java:121)
>>        at org.apache.geronimo.deployment.Deployer$$FastClassByCGLIB 
>>$$734a235d.invoke(<generated>)
>>        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
>>        at  
>>org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke 
>>(FastMethodInvoker.java:38)
>>        at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke 
>>(GBeanOperation.java:122)
>>        at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke 
>>(GBeanInstance.java:852)
>>        at org.apache.geronimo.kernel.basic.BasicKernel.invoke 
>>(BasicKernel.java:239)
>>        at  
>>org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDe 
>>ploy(AbstractDeployCommand.java:106)
>>        at  
>>org.apache.geronimo.deployment.plugin.local.DistributeCommand.run 
>>(DistributeCommand.java:60)
>>        at java.lang.Thread.run(Thread.java:534)
>>
>>
>>I have a vaguely ominous sense that the way I'm using gbean-name isn't
>>kosher, but it has worked fine up till now.
>>
>>Thanks,
>>Toby
> 
> 
> 
> 


Re: Please try out the upgrade jar

Posted by Donald Woods <dr...@yahoo.com>.
E:\geronimo-1.1-SNAPSHOT\bin>java -jar upgrade.jar
Parameter usage:
inputPlan outputPlan
or
inputPlan
in which case the output will be in the same location as inputPlan with 
'.upgraded' appended



Lin Sun wrote:
> Hi David,
> 
> How are we supposed to run the latest upgrade tool now that it is a module
> inside of Geronimo?   I am able to see the upgraded plan from admin console,
> but I haven't been able to get the latest upgrade tool by itself running.
> 
> What I did was:
> 
> E:\geronimo-1.1-SNAPSHOT\bin>java -jar client.jar
> geronimo/upgrade-cli/1.1-SNAPSHOT
> java.lang.IllegalArgumentException: Invalid id:
> geronimo/upgrade-cli/1.1-SNAPSHOT
>         at
> org.apache.geronimo.kernel.repository.Artifact.create(Artifact.java:4
> 9)
>         at
> org.apache.geronimo.system.main.ClientCommandLine.main(ClientCommandL
> ine.java:46)
> 
> I also tried to execute "deploy.bat start geronimo/upgrade/1.1-SNAPSHOT/car"
> before it, but it didn't make any difference.
> 
> Thanks, 
> 
> Lin
> 
> 
> -----Original Message-----
> From: David Jencks [mailto:david_jencks@yahoo.com] 
> Sent: Monday, May 29, 2006 1:36 PM
> To: dev@geronimo.apache.org
> Subject: Re: Please try out the upgrade jar
> 
> Toby,
> 
> Thanks for pointing this out.  I've fixed it in 1.1, will port to  
> trunk soon.  See http://issues.apache.org/jira/browse/GERONIMO-2068
> 
> thanks
> david jencks
> 
> On May 26, 2006, at 3:29 PM, toby cabot wrote:
> 
> 
>>David,
>>
>>Thanks for providing this tool, it's a big help.  I had some problems
>>on a test geronimo-application.xml file that includes some gbean
>>references (for hooking up to security gbeans).  The file looks like:
>>
>>=================================================
>><?xml version="1.0" ?>
>>
>><application xmlns="http://geronimo.apache.org/xml/ns/j2ee/ 
>>application"
>>  configId="hello"
>>  parentId="geronimo/j2ee-security/1.0.1-SNAPSHOT/car">
>>
>>
>>    <gbean name="hello-realm"  
>>class="org.apache.geronimo.security.realm.GenericSecurityRealm">
>>        <attribute name="realmName">hello-realm</attribute>
>>        <reference name="LoginModuleConfiguration">
>>            <name>hello-login-chain</name>
>>        </reference>
>>        <reference name="ServerInfo">
>>            <gbean- 
>>name>geronimo.server:J2EEApplication=null,J2EEModule=geronimo/j2ee- 
>>system/1.0.1-SNAPSHOT/ 
>>car,J2EEServer=geronimo,j2eeType=GBean,name=ServerInfo</gbean-name>
>>        </reference>
>>        <reference name="LoginService">
>>            <gbean- 
>>name>geronimo.server:J2EEApplication=null,J2EEModule=geronimo/j2ee- 
>>security/1.0.1-SNAPSHOT/ 
>>car,J2EEServer=geronimo,j2eeType=JaasLoginService,name=JaasLoginServic 
>>e</gbean-name>
>>        </reference>
>>    </gbean>
>>
>>
>>    <gbean name="hello-login-chain"  
>>class="org.apache.geronimo.security.jaas.JaasLoginModuleUse">
>>        <attribute name="controlFlag">REQUIRED</attribute>
>>        <reference name="LoginModule">
>>            <name>hello-login</name>
>>        </reference>
>>    </gbean>
>>
>>
>>    <gbean name="hello-login"  
>>class="org.apache.geronimo.security.jaas.LoginModuleGBean">
>>        <attribute  
>>name="loginModuleClass">reva.common.auth.TrivialLoginModule</ 
>>attribute>
>>        <attribute name="serverSide">true</attribute>
>>        <attribute name="options">
>>            usersURI=var/security/demo_users.properties
>>            groupsURI=var/security/demo_groups.properties
>>        </attribute>
>>        <attribute name="loginDomainName">hello-realm</attribute>
>>    </gbean>
>>
>>
>></application>
>>=================================================
>>
>>The problem seems to be the application/gbean/reference/gbean-name
>>elements, as the error I get at offline deploy time looks like:
>>
>>Deployer operation failed: org.apache.xmlbeans.XmlException:  
>>Invalid deployment descriptor: [error: cvc-complex-type.2.4a:  
>>Expected elements 'groupId@http://geronimo.apache.org/xml/ns/ 
>>deployment-1.1 artifactId@http://geronimo.apache.org/xml/ns/ 
>>deployment-1.1 version@http://geronimo.apache.org/xml/ns/ 
>>deployment-1.1 module@http://geronimo.apache.org/xml/ns/ 
>>deployment-1.1 type@http://geronimo.apache.org/xml/ns/ 
>>deployment-1.1 name@http://geronimo.apache.org/xml/ns/ 
>>deployment-1.1' instead of 'gbean-name@http://geronimo.apache.org/ 
>>xml/ns/deployment-1.1' here in element reference@http:// 
>>geronimo.apache.org/xml/ns/deployment-1.1, error: cvc-complex-type. 
>>2.4a: Expected elements 'groupId@http://geronimo.apache.org/xml/ns/ 
>>deployment-1.1 artifactId@http://geronimo.apache.org/xml/ns/ 
>>deployment-1.1 version@http://geronimo.apache.org/xml/ns/ 
>>deployment-1.1 module@http://geronimo.apache.org/xml/ns/ 
>>deployment-1.1 type@http://geronimo.apache.org/xml/ns/ 
>>deployment-1.1 name@http://geronimo.apache.org/xml/ns/ 
>>deployment-1.1' instead of 'gbean-name@http://geronimo.apache.org/ 
>>xml/ns/deployment-1.1' here in element reference@http:// 
>>geronimo.apache.org/xml/ns/deployment-1.1]
>>Descriptor: <xml-fragment xmlns:dep="http://geronimo.apache.org/xml/ 
>>ns/deployment-1.1">
>>  <dep:environment>
>>    <dep:moduleId>
>>      <dep:groupId>default</dep:groupId>
>>      <dep:artifactId>hello</dep:artifactId>
>>      <dep:version>1-default</dep:version>
>>      <dep:type>car</dep:type>
>>    </dep:moduleId>
>>    <dep:dependencies>
>>      <dep:dependency>
>>        <dep:groupId>geronimo</dep:groupId>
>>        <dep:artifactId>j2ee-security</dep:artifactId>
>>        <dep:version>1.0.1-SNAPSHOT</dep:version>
>>        <dep:type>car</dep:type>
>>      </dep:dependency>
>>    </dep:dependencies>
>>    <dep:hidden-classes/>
>>    <dep:non-overridable-classes/>
>>  </dep:environment>
>>  <dep:gbean name="hello-realm"  
>>class="org.apache.geronimo.security.realm.GenericSecurityRealm">
>>    <dep:attribute name="realmName">hello-realm</dep:attribute>
>>    <dep:reference name="LoginModuleConfiguration">
>>      <dep:name>hello-login-chain</dep:name>
>>    </dep:reference>
>>    <dep:reference name="ServerInfo">
>>      <dep:gbean- 
>>name>geronimo.server:J2EEApplication=null,J2EEModule=geronimo/j2ee- 
>>system/1.0.1-SNAPSHOT/ 
>>car,J2EEServer=geronimo,j2eeType=GBean,name=ServerInfo</dep:gbean- 
>>name>
>>    </dep:reference>
>>    <dep:reference name="LoginService">
>>      <dep:gbean- 
>>name>geronimo.server:J2EEApplication=null,J2EEModule=geronimo/j2ee- 
>>security/1.0.1-SNAPSHOT/ 
>>car,J2EEServer=geronimo,j2eeType=JaasLoginService,name=JaasLoginServic 
>>e</dep:gbean-name>
>>    </dep:reference>
>>  </dep:gbean>
>>  <dep:gbean name="hello-login-chain"  
>>class="org.apache.geronimo.security.jaas.JaasLoginModuleUse">
>>    <dep:attribute name="controlFlag">REQUIRED</dep:attribute>
>>    <dep:reference name="LoginModule">
>>      <dep:name>hello-login</dep:name>
>>    </dep:reference>
>>  </dep:gbean>
>>  <dep:gbean name="hello-login"  
>>class="org.apache.geronimo.security.jaas.LoginModuleGBean">
>>    <dep:attribute  
>>name="loginModuleClass">reva.common.auth.TrivialLoginModule</ 
>>dep:attribute>
>>    <dep:attribute name="serverSide">true</dep:attribute>
>>    <dep:attribute name="options">usersURI=var/security/ 
>>demo_users.properties
>>            groupsURI=var/security/demo_groups.properties</ 
>>dep:attribute>
>>    <dep:attribute name="loginDomainName">hello-realm</dep:attribute>
>>  </dep:gbean>
>></xml-fragment>
>>org.apache.geronimo.common.DeploymentException:  
>>org.apache.xmlbeans.XmlException: Invalid deployment descriptor:  
>>[error: cvc-complex-type.2.4a: Expected elements 'groupId@http:// 
>>geronimo.apache.org/xml/ns/deployment-1.1 artifactId@http:// 
>>geronimo.apache.org/xml/ns/deployment-1.1 version@http:// 
>>geronimo.apache.org/xml/ns/deployment-1.1 module@http:// 
>>geronimo.apache.org/xml/ns/deployment-1.1 type@http:// 
>>geronimo.apache.org/xml/ns/deployment-1.1 name@http:// 
>>geronimo.apache.org/xml/ns/deployment-1.1' instead of 'gbean- 
>>name@http://geronimo.apache.org/xml/ns/deployment-1.1' here in  
>>element reference@http://geronimo.apache.org/xml/ns/deployment-1.1,  
>>error: cvc-complex-type.2.4a: Expected elements 'groupId@http:// 
>>geronimo.apache.org/xml/ns/deployment-1.1 artifactId@http:// 
>>geronimo.apache.org/xml/ns/deployment-1.1 version@http:// 
>>geronimo.apache.org/xml/ns/deployment-1.1 module@http:// 
>>geronimo.apache.org/xml/ns/deployment-1.1 type@http:// 
>>geronimo.apache.org/xml/ns/deployment-1.1 name@http:// 
>>geronimo.apache.org/xml/ns/deployment-1.1' instead of 'gbean- 
>>name@http://geronimo.apache.org/xml/ns/deployment-1.1' here in  
>>element reference@http://geronimo.apache.org/xml/ns/deployment-1.1]
>>Descriptor: <xml-fragment xmlns:dep="http://geronimo.apache.org/xml/ 
>>ns/deployment-1.1">
>>  <dep:environment>
>>    <dep:moduleId>
>>      <dep:groupId>default</dep:groupId>
>>      <dep:artifactId>hello</dep:artifactId>
>>      <dep:version>1-default</dep:version>
>>      <dep:type>car</dep:type>
>>    </dep:moduleId>
>>    <dep:dependencies>
>>      <dep:dependency>
>>        <dep:groupId>geronimo</dep:groupId>
>>        <dep:artifactId>j2ee-security</dep:artifactId>
>>        <dep:version>1.0.1-SNAPSHOT</dep:version>
>>        <dep:type>car</dep:type>
>>      </dep:dependency>
>>    </dep:dependencies>
>>    <dep:hidden-classes/>
>>    <dep:non-overridable-classes/>
>>  </dep:environment>
>>  <dep:gbean name="hello-realm"  
>>class="org.apache.geronimo.security.realm.GenericSecurityRealm">
>>    <dep:attribute name="realmName">hello-realm</dep:attribute>
>>    <dep:reference name="LoginModuleConfiguration">
>>      <dep:name>hello-login-chain</dep:name>
>>    </dep:reference>
>>    <dep:reference name="ServerInfo">
>>      <dep:gbean- 
>>name>geronimo.server:J2EEApplication=null,J2EEModule=geronimo/j2ee- 
>>system/1.0.1-SNAPSHOT/ 
>>car,J2EEServer=geronimo,j2eeType=GBean,name=ServerInfo</dep:gbean- 
>>name>
>>    </dep:reference>
>>    <dep:reference name="LoginService">
>>      <dep:gbean- 
>>name>geronimo.server:J2EEApplication=null,J2EEModule=geronimo/j2ee- 
>>security/1.0.1-SNAPSHOT/ 
>>car,J2EEServer=geronimo,j2eeType=JaasLoginService,name=JaasLoginServic 
>>e</dep:gbean-name>
>>    </dep:reference>
>>  </dep:gbean>
>>  <dep:gbean name="hello-login-chain"  
>>class="org.apache.geronimo.security.jaas.JaasLoginModuleUse">
>>    <dep:attribute name="controlFlag">REQUIRED</dep:attribute>
>>    <dep:reference name="LoginModule">
>>      <dep:name>hello-login</dep:name>
>>    </dep:reference>
>>  </dep:gbean>
>>  <dep:gbean name="hello-login"  
>>class="org.apache.geronimo.security.jaas.LoginModuleGBean">
>>    <dep:attribute  
>>name="loginModuleClass">reva.common.auth.TrivialLoginModule</ 
>>dep:attribute>
>>    <dep:attribute name="serverSide">true</dep:attribute>
>>    <dep:attribute name="options">usersURI=var/security/ 
>>demo_users.properties
>>            groupsURI=var/security/demo_groups.properties</ 
>>dep:attribute>
>>    <dep:attribute name="loginDomainName">hello-realm</dep:attribute>
>>  </dep:gbean>
>></xml-fragment>
>>        at  
>>org.apache.geronimo.j2ee.deployment.EARConfigBuilder.getEarPlan 
>>(EARConfigBuilder.java:342)
>>        at  
>>org.apache.geronimo.j2ee.deployment.EARConfigBuilder.getDeploymentPlan 
>>(EARConfigBuilder.java:260)
>>        at org.apache.geronimo.j2ee.deployment.EARConfigBuilder$ 
>>$FastClassByCGLIB$$38e56ec6.invoke(<generated>)
>>        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
>>        at  
>>org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke 
>>(FastMethodInvoker.java:38)
>>        at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke 
>>(GBeanOperation.java:122)
>>        at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke 
>>(GBeanInstance.java:817)
>>        at org.apache.geronimo.gbean.runtime.RawInvoker.invoke 
>>(RawInvoker.java:57)
>>        at  
>>org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke 
>>(RawOperationInvoker.java:35)
>>        at  
>>org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept 
>>(ProxyMethodInterceptor.java:96)
>>        at org.apache.geronimo.deployment.ConfigurationBuilder$ 
>>$EnhancerByCGLIB$$a95a5462.getDeploymentPlan(<generated>)
>>        at org.apache.geronimo.deployment.Deployer.deploy 
>>(Deployer.java:229)
>>        at org.apache.geronimo.deployment.Deployer.deploy 
>>(Deployer.java:121)
>>        at org.apache.geronimo.deployment.Deployer$$FastClassByCGLIB 
>>$$734a235d.invoke(<generated>)
>>        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
>>        at  
>>org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke 
>>(FastMethodInvoker.java:38)
>>        at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke 
>>(GBeanOperation.java:122)
>>        at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke 
>>(GBeanInstance.java:852)
>>        at org.apache.geronimo.kernel.basic.BasicKernel.invoke 
>>(BasicKernel.java:239)
>>        at  
>>org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDe 
>>ploy(AbstractDeployCommand.java:106)
>>        at  
>>org.apache.geronimo.deployment.plugin.local.DistributeCommand.run 
>>(DistributeCommand.java:60)
>>        at java.lang.Thread.run(Thread.java:534)
>>
>>
>>I have a vaguely ominous sense that the way I'm using gbean-name isn't
>>kosher, but it has worked fine up till now.
>>
>>Thanks,
>>Toby
> 
> 
> 
> 

RE: Please try out the upgrade jar

Posted by Lin Sun <li...@gmail.com>.
Hi David,

How are we supposed to run the latest upgrade tool now that it is a module
inside of Geronimo?   I am able to see the upgraded plan from admin console,
but I haven't been able to get the latest upgrade tool by itself running.

What I did was:

E:\geronimo-1.1-SNAPSHOT\bin>java -jar client.jar
geronimo/upgrade-cli/1.1-SNAPSHOT
java.lang.IllegalArgumentException: Invalid id:
geronimo/upgrade-cli/1.1-SNAPSHOT
        at
org.apache.geronimo.kernel.repository.Artifact.create(Artifact.java:4
9)
        at
org.apache.geronimo.system.main.ClientCommandLine.main(ClientCommandL
ine.java:46)

I also tried to execute "deploy.bat start geronimo/upgrade/1.1-SNAPSHOT/car"
before it, but it didn't make any difference.

Thanks, 

Lin


-----Original Message-----
From: David Jencks [mailto:david_jencks@yahoo.com] 
Sent: Monday, May 29, 2006 1:36 PM
To: dev@geronimo.apache.org
Subject: Re: Please try out the upgrade jar

Toby,

Thanks for pointing this out.  I've fixed it in 1.1, will port to  
trunk soon.  See http://issues.apache.org/jira/browse/GERONIMO-2068

thanks
david jencks

On May 26, 2006, at 3:29 PM, toby cabot wrote:

> David,
>
> Thanks for providing this tool, it's a big help.  I had some problems
> on a test geronimo-application.xml file that includes some gbean
> references (for hooking up to security gbeans).  The file looks like:
>
> =================================================
> <?xml version="1.0" ?>
>
> <application xmlns="http://geronimo.apache.org/xml/ns/j2ee/ 
> application"
>   configId="hello"
>   parentId="geronimo/j2ee-security/1.0.1-SNAPSHOT/car">
>
>
>     <gbean name="hello-realm"  
> class="org.apache.geronimo.security.realm.GenericSecurityRealm">
>         <attribute name="realmName">hello-realm</attribute>
>         <reference name="LoginModuleConfiguration">
>             <name>hello-login-chain</name>
>         </reference>
>         <reference name="ServerInfo">
>             <gbean- 
> name>geronimo.server:J2EEApplication=null,J2EEModule=geronimo/j2ee- 
> system/1.0.1-SNAPSHOT/ 
> car,J2EEServer=geronimo,j2eeType=GBean,name=ServerInfo</gbean-name>
>         </reference>
>         <reference name="LoginService">
>             <gbean- 
> name>geronimo.server:J2EEApplication=null,J2EEModule=geronimo/j2ee- 
> security/1.0.1-SNAPSHOT/ 
> car,J2EEServer=geronimo,j2eeType=JaasLoginService,name=JaasLoginServic 
> e</gbean-name>
>         </reference>
>     </gbean>
>
>
>     <gbean name="hello-login-chain"  
> class="org.apache.geronimo.security.jaas.JaasLoginModuleUse">
>         <attribute name="controlFlag">REQUIRED</attribute>
>         <reference name="LoginModule">
>             <name>hello-login</name>
>         </reference>
>     </gbean>
>
>
>     <gbean name="hello-login"  
> class="org.apache.geronimo.security.jaas.LoginModuleGBean">
>         <attribute  
> name="loginModuleClass">reva.common.auth.TrivialLoginModule</ 
> attribute>
>         <attribute name="serverSide">true</attribute>
>         <attribute name="options">
>             usersURI=var/security/demo_users.properties
>             groupsURI=var/security/demo_groups.properties
>         </attribute>
>         <attribute name="loginDomainName">hello-realm</attribute>
>     </gbean>
>
>
> </application>
> =================================================
>
> The problem seems to be the application/gbean/reference/gbean-name
> elements, as the error I get at offline deploy time looks like:
>
> Deployer operation failed: org.apache.xmlbeans.XmlException:  
> Invalid deployment descriptor: [error: cvc-complex-type.2.4a:  
> Expected elements 'groupId@http://geronimo.apache.org/xml/ns/ 
> deployment-1.1 artifactId@http://geronimo.apache.org/xml/ns/ 
> deployment-1.1 version@http://geronimo.apache.org/xml/ns/ 
> deployment-1.1 module@http://geronimo.apache.org/xml/ns/ 
> deployment-1.1 type@http://geronimo.apache.org/xml/ns/ 
> deployment-1.1 name@http://geronimo.apache.org/xml/ns/ 
> deployment-1.1' instead of 'gbean-name@http://geronimo.apache.org/ 
> xml/ns/deployment-1.1' here in element reference@http:// 
> geronimo.apache.org/xml/ns/deployment-1.1, error: cvc-complex-type. 
> 2.4a: Expected elements 'groupId@http://geronimo.apache.org/xml/ns/ 
> deployment-1.1 artifactId@http://geronimo.apache.org/xml/ns/ 
> deployment-1.1 version@http://geronimo.apache.org/xml/ns/ 
> deployment-1.1 module@http://geronimo.apache.org/xml/ns/ 
> deployment-1.1 type@http://geronimo.apache.org/xml/ns/ 
> deployment-1.1 name@http://geronimo.apache.org/xml/ns/ 
> deployment-1.1' instead of 'gbean-name@http://geronimo.apache.org/ 
> xml/ns/deployment-1.1' here in element reference@http:// 
> geronimo.apache.org/xml/ns/deployment-1.1]
> Descriptor: <xml-fragment xmlns:dep="http://geronimo.apache.org/xml/ 
> ns/deployment-1.1">
>   <dep:environment>
>     <dep:moduleId>
>       <dep:groupId>default</dep:groupId>
>       <dep:artifactId>hello</dep:artifactId>
>       <dep:version>1-default</dep:version>
>       <dep:type>car</dep:type>
>     </dep:moduleId>
>     <dep:dependencies>
>       <dep:dependency>
>         <dep:groupId>geronimo</dep:groupId>
>         <dep:artifactId>j2ee-security</dep:artifactId>
>         <dep:version>1.0.1-SNAPSHOT</dep:version>
>         <dep:type>car</dep:type>
>       </dep:dependency>
>     </dep:dependencies>
>     <dep:hidden-classes/>
>     <dep:non-overridable-classes/>
>   </dep:environment>
>   <dep:gbean name="hello-realm"  
> class="org.apache.geronimo.security.realm.GenericSecurityRealm">
>     <dep:attribute name="realmName">hello-realm</dep:attribute>
>     <dep:reference name="LoginModuleConfiguration">
>       <dep:name>hello-login-chain</dep:name>
>     </dep:reference>
>     <dep:reference name="ServerInfo">
>       <dep:gbean- 
> name>geronimo.server:J2EEApplication=null,J2EEModule=geronimo/j2ee- 
> system/1.0.1-SNAPSHOT/ 
> car,J2EEServer=geronimo,j2eeType=GBean,name=ServerInfo</dep:gbean- 
> name>
>     </dep:reference>
>     <dep:reference name="LoginService">
>       <dep:gbean- 
> name>geronimo.server:J2EEApplication=null,J2EEModule=geronimo/j2ee- 
> security/1.0.1-SNAPSHOT/ 
> car,J2EEServer=geronimo,j2eeType=JaasLoginService,name=JaasLoginServic 
> e</dep:gbean-name>
>     </dep:reference>
>   </dep:gbean>
>   <dep:gbean name="hello-login-chain"  
> class="org.apache.geronimo.security.jaas.JaasLoginModuleUse">
>     <dep:attribute name="controlFlag">REQUIRED</dep:attribute>
>     <dep:reference name="LoginModule">
>       <dep:name>hello-login</dep:name>
>     </dep:reference>
>   </dep:gbean>
>   <dep:gbean name="hello-login"  
> class="org.apache.geronimo.security.jaas.LoginModuleGBean">
>     <dep:attribute  
> name="loginModuleClass">reva.common.auth.TrivialLoginModule</ 
> dep:attribute>
>     <dep:attribute name="serverSide">true</dep:attribute>
>     <dep:attribute name="options">usersURI=var/security/ 
> demo_users.properties
>             groupsURI=var/security/demo_groups.properties</ 
> dep:attribute>
>     <dep:attribute name="loginDomainName">hello-realm</dep:attribute>
>   </dep:gbean>
> </xml-fragment>
> org.apache.geronimo.common.DeploymentException:  
> org.apache.xmlbeans.XmlException: Invalid deployment descriptor:  
> [error: cvc-complex-type.2.4a: Expected elements 'groupId@http:// 
> geronimo.apache.org/xml/ns/deployment-1.1 artifactId@http:// 
> geronimo.apache.org/xml/ns/deployment-1.1 version@http:// 
> geronimo.apache.org/xml/ns/deployment-1.1 module@http:// 
> geronimo.apache.org/xml/ns/deployment-1.1 type@http:// 
> geronimo.apache.org/xml/ns/deployment-1.1 name@http:// 
> geronimo.apache.org/xml/ns/deployment-1.1' instead of 'gbean- 
> name@http://geronimo.apache.org/xml/ns/deployment-1.1' here in  
> element reference@http://geronimo.apache.org/xml/ns/deployment-1.1,  
> error: cvc-complex-type.2.4a: Expected elements 'groupId@http:// 
> geronimo.apache.org/xml/ns/deployment-1.1 artifactId@http:// 
> geronimo.apache.org/xml/ns/deployment-1.1 version@http:// 
> geronimo.apache.org/xml/ns/deployment-1.1 module@http:// 
> geronimo.apache.org/xml/ns/deployment-1.1 type@http:// 
> geronimo.apache.org/xml/ns/deployment-1.1 name@http:// 
> geronimo.apache.org/xml/ns/deployment-1.1' instead of 'gbean- 
> name@http://geronimo.apache.org/xml/ns/deployment-1.1' here in  
> element reference@http://geronimo.apache.org/xml/ns/deployment-1.1]
> Descriptor: <xml-fragment xmlns:dep="http://geronimo.apache.org/xml/ 
> ns/deployment-1.1">
>   <dep:environment>
>     <dep:moduleId>
>       <dep:groupId>default</dep:groupId>
>       <dep:artifactId>hello</dep:artifactId>
>       <dep:version>1-default</dep:version>
>       <dep:type>car</dep:type>
>     </dep:moduleId>
>     <dep:dependencies>
>       <dep:dependency>
>         <dep:groupId>geronimo</dep:groupId>
>         <dep:artifactId>j2ee-security</dep:artifactId>
>         <dep:version>1.0.1-SNAPSHOT</dep:version>
>         <dep:type>car</dep:type>
>       </dep:dependency>
>     </dep:dependencies>
>     <dep:hidden-classes/>
>     <dep:non-overridable-classes/>
>   </dep:environment>
>   <dep:gbean name="hello-realm"  
> class="org.apache.geronimo.security.realm.GenericSecurityRealm">
>     <dep:attribute name="realmName">hello-realm</dep:attribute>
>     <dep:reference name="LoginModuleConfiguration">
>       <dep:name>hello-login-chain</dep:name>
>     </dep:reference>
>     <dep:reference name="ServerInfo">
>       <dep:gbean- 
> name>geronimo.server:J2EEApplication=null,J2EEModule=geronimo/j2ee- 
> system/1.0.1-SNAPSHOT/ 
> car,J2EEServer=geronimo,j2eeType=GBean,name=ServerInfo</dep:gbean- 
> name>
>     </dep:reference>
>     <dep:reference name="LoginService">
>       <dep:gbean- 
> name>geronimo.server:J2EEApplication=null,J2EEModule=geronimo/j2ee- 
> security/1.0.1-SNAPSHOT/ 
> car,J2EEServer=geronimo,j2eeType=JaasLoginService,name=JaasLoginServic 
> e</dep:gbean-name>
>     </dep:reference>
>   </dep:gbean>
>   <dep:gbean name="hello-login-chain"  
> class="org.apache.geronimo.security.jaas.JaasLoginModuleUse">
>     <dep:attribute name="controlFlag">REQUIRED</dep:attribute>
>     <dep:reference name="LoginModule">
>       <dep:name>hello-login</dep:name>
>     </dep:reference>
>   </dep:gbean>
>   <dep:gbean name="hello-login"  
> class="org.apache.geronimo.security.jaas.LoginModuleGBean">
>     <dep:attribute  
> name="loginModuleClass">reva.common.auth.TrivialLoginModule</ 
> dep:attribute>
>     <dep:attribute name="serverSide">true</dep:attribute>
>     <dep:attribute name="options">usersURI=var/security/ 
> demo_users.properties
>             groupsURI=var/security/demo_groups.properties</ 
> dep:attribute>
>     <dep:attribute name="loginDomainName">hello-realm</dep:attribute>
>   </dep:gbean>
> </xml-fragment>
>         at  
> org.apache.geronimo.j2ee.deployment.EARConfigBuilder.getEarPlan 
> (EARConfigBuilder.java:342)
>         at  
> org.apache.geronimo.j2ee.deployment.EARConfigBuilder.getDeploymentPlan 
> (EARConfigBuilder.java:260)
>         at org.apache.geronimo.j2ee.deployment.EARConfigBuilder$ 
> $FastClassByCGLIB$$38e56ec6.invoke(<generated>)
>         at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
>         at  
> org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke 
> (FastMethodInvoker.java:38)
>         at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke 
> (GBeanOperation.java:122)
>         at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke 
> (GBeanInstance.java:817)
>         at org.apache.geronimo.gbean.runtime.RawInvoker.invoke 
> (RawInvoker.java:57)
>         at  
> org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke 
> (RawOperationInvoker.java:35)
>         at  
> org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept 
> (ProxyMethodInterceptor.java:96)
>         at org.apache.geronimo.deployment.ConfigurationBuilder$ 
> $EnhancerByCGLIB$$a95a5462.getDeploymentPlan(<generated>)
>         at org.apache.geronimo.deployment.Deployer.deploy 
> (Deployer.java:229)
>         at org.apache.geronimo.deployment.Deployer.deploy 
> (Deployer.java:121)
>         at org.apache.geronimo.deployment.Deployer$$FastClassByCGLIB 
> $$734a235d.invoke(<generated>)
>         at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
>         at  
> org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke 
> (FastMethodInvoker.java:38)
>         at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke 
> (GBeanOperation.java:122)
>         at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke 
> (GBeanInstance.java:852)
>         at org.apache.geronimo.kernel.basic.BasicKernel.invoke 
> (BasicKernel.java:239)
>         at  
> org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDe 
> ploy(AbstractDeployCommand.java:106)
>         at  
> org.apache.geronimo.deployment.plugin.local.DistributeCommand.run 
> (DistributeCommand.java:60)
>         at java.lang.Thread.run(Thread.java:534)
>
>
> I have a vaguely ominous sense that the way I'm using gbean-name isn't
> kosher, but it has worked fine up till now.
>
> Thanks,
> Toby


Re: Please try out the upgrade jar

Posted by David Jencks <da...@yahoo.com>.
Toby,

Thanks for pointing this out.  I've fixed it in 1.1, will port to  
trunk soon.  See http://issues.apache.org/jira/browse/GERONIMO-2068

thanks
david jencks

On May 26, 2006, at 3:29 PM, toby cabot wrote:

> David,
>
> Thanks for providing this tool, it's a big help.  I had some problems
> on a test geronimo-application.xml file that includes some gbean
> references (for hooking up to security gbeans).  The file looks like:
>
> =================================================
> <?xml version="1.0" ?>
>
> <application xmlns="http://geronimo.apache.org/xml/ns/j2ee/ 
> application"
>   configId="hello"
>   parentId="geronimo/j2ee-security/1.0.1-SNAPSHOT/car">
>
>
>     <gbean name="hello-realm"  
> class="org.apache.geronimo.security.realm.GenericSecurityRealm">
>         <attribute name="realmName">hello-realm</attribute>
>         <reference name="LoginModuleConfiguration">
>             <name>hello-login-chain</name>
>         </reference>
>         <reference name="ServerInfo">
>             <gbean- 
> name>geronimo.server:J2EEApplication=null,J2EEModule=geronimo/j2ee- 
> system/1.0.1-SNAPSHOT/ 
> car,J2EEServer=geronimo,j2eeType=GBean,name=ServerInfo</gbean-name>
>         </reference>
>         <reference name="LoginService">
>             <gbean- 
> name>geronimo.server:J2EEApplication=null,J2EEModule=geronimo/j2ee- 
> security/1.0.1-SNAPSHOT/ 
> car,J2EEServer=geronimo,j2eeType=JaasLoginService,name=JaasLoginServic 
> e</gbean-name>
>         </reference>
>     </gbean>
>
>
>     <gbean name="hello-login-chain"  
> class="org.apache.geronimo.security.jaas.JaasLoginModuleUse">
>         <attribute name="controlFlag">REQUIRED</attribute>
>         <reference name="LoginModule">
>             <name>hello-login</name>
>         </reference>
>     </gbean>
>
>
>     <gbean name="hello-login"  
> class="org.apache.geronimo.security.jaas.LoginModuleGBean">
>         <attribute  
> name="loginModuleClass">reva.common.auth.TrivialLoginModule</ 
> attribute>
>         <attribute name="serverSide">true</attribute>
>         <attribute name="options">
>             usersURI=var/security/demo_users.properties
>             groupsURI=var/security/demo_groups.properties
>         </attribute>
>         <attribute name="loginDomainName">hello-realm</attribute>
>     </gbean>
>
>
> </application>
> =================================================
>
> The problem seems to be the application/gbean/reference/gbean-name
> elements, as the error I get at offline deploy time looks like:
>
> Deployer operation failed: org.apache.xmlbeans.XmlException:  
> Invalid deployment descriptor: [error: cvc-complex-type.2.4a:  
> Expected elements 'groupId@http://geronimo.apache.org/xml/ns/ 
> deployment-1.1 artifactId@http://geronimo.apache.org/xml/ns/ 
> deployment-1.1 version@http://geronimo.apache.org/xml/ns/ 
> deployment-1.1 module@http://geronimo.apache.org/xml/ns/ 
> deployment-1.1 type@http://geronimo.apache.org/xml/ns/ 
> deployment-1.1 name@http://geronimo.apache.org/xml/ns/ 
> deployment-1.1' instead of 'gbean-name@http://geronimo.apache.org/ 
> xml/ns/deployment-1.1' here in element reference@http:// 
> geronimo.apache.org/xml/ns/deployment-1.1, error: cvc-complex-type. 
> 2.4a: Expected elements 'groupId@http://geronimo.apache.org/xml/ns/ 
> deployment-1.1 artifactId@http://geronimo.apache.org/xml/ns/ 
> deployment-1.1 version@http://geronimo.apache.org/xml/ns/ 
> deployment-1.1 module@http://geronimo.apache.org/xml/ns/ 
> deployment-1.1 type@http://geronimo.apache.org/xml/ns/ 
> deployment-1.1 name@http://geronimo.apache.org/xml/ns/ 
> deployment-1.1' instead of 'gbean-name@http://geronimo.apache.org/ 
> xml/ns/deployment-1.1' here in element reference@http:// 
> geronimo.apache.org/xml/ns/deployment-1.1]
> Descriptor: <xml-fragment xmlns:dep="http://geronimo.apache.org/xml/ 
> ns/deployment-1.1">
>   <dep:environment>
>     <dep:moduleId>
>       <dep:groupId>default</dep:groupId>
>       <dep:artifactId>hello</dep:artifactId>
>       <dep:version>1-default</dep:version>
>       <dep:type>car</dep:type>
>     </dep:moduleId>
>     <dep:dependencies>
>       <dep:dependency>
>         <dep:groupId>geronimo</dep:groupId>
>         <dep:artifactId>j2ee-security</dep:artifactId>
>         <dep:version>1.0.1-SNAPSHOT</dep:version>
>         <dep:type>car</dep:type>
>       </dep:dependency>
>     </dep:dependencies>
>     <dep:hidden-classes/>
>     <dep:non-overridable-classes/>
>   </dep:environment>
>   <dep:gbean name="hello-realm"  
> class="org.apache.geronimo.security.realm.GenericSecurityRealm">
>     <dep:attribute name="realmName">hello-realm</dep:attribute>
>     <dep:reference name="LoginModuleConfiguration">
>       <dep:name>hello-login-chain</dep:name>
>     </dep:reference>
>     <dep:reference name="ServerInfo">
>       <dep:gbean- 
> name>geronimo.server:J2EEApplication=null,J2EEModule=geronimo/j2ee- 
> system/1.0.1-SNAPSHOT/ 
> car,J2EEServer=geronimo,j2eeType=GBean,name=ServerInfo</dep:gbean- 
> name>
>     </dep:reference>
>     <dep:reference name="LoginService">
>       <dep:gbean- 
> name>geronimo.server:J2EEApplication=null,J2EEModule=geronimo/j2ee- 
> security/1.0.1-SNAPSHOT/ 
> car,J2EEServer=geronimo,j2eeType=JaasLoginService,name=JaasLoginServic 
> e</dep:gbean-name>
>     </dep:reference>
>   </dep:gbean>
>   <dep:gbean name="hello-login-chain"  
> class="org.apache.geronimo.security.jaas.JaasLoginModuleUse">
>     <dep:attribute name="controlFlag">REQUIRED</dep:attribute>
>     <dep:reference name="LoginModule">
>       <dep:name>hello-login</dep:name>
>     </dep:reference>
>   </dep:gbean>
>   <dep:gbean name="hello-login"  
> class="org.apache.geronimo.security.jaas.LoginModuleGBean">
>     <dep:attribute  
> name="loginModuleClass">reva.common.auth.TrivialLoginModule</ 
> dep:attribute>
>     <dep:attribute name="serverSide">true</dep:attribute>
>     <dep:attribute name="options">usersURI=var/security/ 
> demo_users.properties
>             groupsURI=var/security/demo_groups.properties</ 
> dep:attribute>
>     <dep:attribute name="loginDomainName">hello-realm</dep:attribute>
>   </dep:gbean>
> </xml-fragment>
> org.apache.geronimo.common.DeploymentException:  
> org.apache.xmlbeans.XmlException: Invalid deployment descriptor:  
> [error: cvc-complex-type.2.4a: Expected elements 'groupId@http:// 
> geronimo.apache.org/xml/ns/deployment-1.1 artifactId@http:// 
> geronimo.apache.org/xml/ns/deployment-1.1 version@http:// 
> geronimo.apache.org/xml/ns/deployment-1.1 module@http:// 
> geronimo.apache.org/xml/ns/deployment-1.1 type@http:// 
> geronimo.apache.org/xml/ns/deployment-1.1 name@http:// 
> geronimo.apache.org/xml/ns/deployment-1.1' instead of 'gbean- 
> name@http://geronimo.apache.org/xml/ns/deployment-1.1' here in  
> element reference@http://geronimo.apache.org/xml/ns/deployment-1.1,  
> error: cvc-complex-type.2.4a: Expected elements 'groupId@http:// 
> geronimo.apache.org/xml/ns/deployment-1.1 artifactId@http:// 
> geronimo.apache.org/xml/ns/deployment-1.1 version@http:// 
> geronimo.apache.org/xml/ns/deployment-1.1 module@http:// 
> geronimo.apache.org/xml/ns/deployment-1.1 type@http:// 
> geronimo.apache.org/xml/ns/deployment-1.1 name@http:// 
> geronimo.apache.org/xml/ns/deployment-1.1' instead of 'gbean- 
> name@http://geronimo.apache.org/xml/ns/deployment-1.1' here in  
> element reference@http://geronimo.apache.org/xml/ns/deployment-1.1]
> Descriptor: <xml-fragment xmlns:dep="http://geronimo.apache.org/xml/ 
> ns/deployment-1.1">
>   <dep:environment>
>     <dep:moduleId>
>       <dep:groupId>default</dep:groupId>
>       <dep:artifactId>hello</dep:artifactId>
>       <dep:version>1-default</dep:version>
>       <dep:type>car</dep:type>
>     </dep:moduleId>
>     <dep:dependencies>
>       <dep:dependency>
>         <dep:groupId>geronimo</dep:groupId>
>         <dep:artifactId>j2ee-security</dep:artifactId>
>         <dep:version>1.0.1-SNAPSHOT</dep:version>
>         <dep:type>car</dep:type>
>       </dep:dependency>
>     </dep:dependencies>
>     <dep:hidden-classes/>
>     <dep:non-overridable-classes/>
>   </dep:environment>
>   <dep:gbean name="hello-realm"  
> class="org.apache.geronimo.security.realm.GenericSecurityRealm">
>     <dep:attribute name="realmName">hello-realm</dep:attribute>
>     <dep:reference name="LoginModuleConfiguration">
>       <dep:name>hello-login-chain</dep:name>
>     </dep:reference>
>     <dep:reference name="ServerInfo">
>       <dep:gbean- 
> name>geronimo.server:J2EEApplication=null,J2EEModule=geronimo/j2ee- 
> system/1.0.1-SNAPSHOT/ 
> car,J2EEServer=geronimo,j2eeType=GBean,name=ServerInfo</dep:gbean- 
> name>
>     </dep:reference>
>     <dep:reference name="LoginService">
>       <dep:gbean- 
> name>geronimo.server:J2EEApplication=null,J2EEModule=geronimo/j2ee- 
> security/1.0.1-SNAPSHOT/ 
> car,J2EEServer=geronimo,j2eeType=JaasLoginService,name=JaasLoginServic 
> e</dep:gbean-name>
>     </dep:reference>
>   </dep:gbean>
>   <dep:gbean name="hello-login-chain"  
> class="org.apache.geronimo.security.jaas.JaasLoginModuleUse">
>     <dep:attribute name="controlFlag">REQUIRED</dep:attribute>
>     <dep:reference name="LoginModule">
>       <dep:name>hello-login</dep:name>
>     </dep:reference>
>   </dep:gbean>
>   <dep:gbean name="hello-login"  
> class="org.apache.geronimo.security.jaas.LoginModuleGBean">
>     <dep:attribute  
> name="loginModuleClass">reva.common.auth.TrivialLoginModule</ 
> dep:attribute>
>     <dep:attribute name="serverSide">true</dep:attribute>
>     <dep:attribute name="options">usersURI=var/security/ 
> demo_users.properties
>             groupsURI=var/security/demo_groups.properties</ 
> dep:attribute>
>     <dep:attribute name="loginDomainName">hello-realm</dep:attribute>
>   </dep:gbean>
> </xml-fragment>
>         at  
> org.apache.geronimo.j2ee.deployment.EARConfigBuilder.getEarPlan 
> (EARConfigBuilder.java:342)
>         at  
> org.apache.geronimo.j2ee.deployment.EARConfigBuilder.getDeploymentPlan 
> (EARConfigBuilder.java:260)
>         at org.apache.geronimo.j2ee.deployment.EARConfigBuilder$ 
> $FastClassByCGLIB$$38e56ec6.invoke(<generated>)
>         at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
>         at  
> org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke 
> (FastMethodInvoker.java:38)
>         at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke 
> (GBeanOperation.java:122)
>         at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke 
> (GBeanInstance.java:817)
>         at org.apache.geronimo.gbean.runtime.RawInvoker.invoke 
> (RawInvoker.java:57)
>         at  
> org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke 
> (RawOperationInvoker.java:35)
>         at  
> org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept 
> (ProxyMethodInterceptor.java:96)
>         at org.apache.geronimo.deployment.ConfigurationBuilder$ 
> $EnhancerByCGLIB$$a95a5462.getDeploymentPlan(<generated>)
>         at org.apache.geronimo.deployment.Deployer.deploy 
> (Deployer.java:229)
>         at org.apache.geronimo.deployment.Deployer.deploy 
> (Deployer.java:121)
>         at org.apache.geronimo.deployment.Deployer$$FastClassByCGLIB 
> $$734a235d.invoke(<generated>)
>         at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
>         at  
> org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke 
> (FastMethodInvoker.java:38)
>         at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke 
> (GBeanOperation.java:122)
>         at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke 
> (GBeanInstance.java:852)
>         at org.apache.geronimo.kernel.basic.BasicKernel.invoke 
> (BasicKernel.java:239)
>         at  
> org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDe 
> ploy(AbstractDeployCommand.java:106)
>         at  
> org.apache.geronimo.deployment.plugin.local.DistributeCommand.run 
> (DistributeCommand.java:60)
>         at java.lang.Thread.run(Thread.java:534)
>
>
> I have a vaguely ominous sense that the way I'm using gbean-name isn't
> kosher, but it has worked fine up till now.
>
> Thanks,
> Toby


Re: Please try out the upgrade jar

Posted by toby cabot <to...@caboteria.org>.
David,

Thanks for providing this tool, it's a big help.  I had some problems
on a test geronimo-application.xml file that includes some gbean
references (for hooking up to security gbeans).  The file looks like:

=================================================
<?xml version="1.0" ?>

<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application"
  configId="hello"
  parentId="geronimo/j2ee-security/1.0.1-SNAPSHOT/car">


    <gbean name="hello-realm" class="org.apache.geronimo.security.realm.GenericSecurityRealm">
        <attribute name="realmName">hello-realm</attribute>
        <reference name="LoginModuleConfiguration">
            <name>hello-login-chain</name>
        </reference>
        <reference name="ServerInfo">
            <gbean-name>geronimo.server:J2EEApplication=null,J2EEModule=geronimo/j2ee-system/1.0.1-SNAPSHOT/car,J2EEServer=geronimo,j2eeType=GBean,name=ServerInfo</gbean-name>
        </reference>
        <reference name="LoginService">
            <gbean-name>geronimo.server:J2EEApplication=null,J2EEModule=geronimo/j2ee-security/1.0.1-SNAPSHOT/car,J2EEServer=geronimo,j2eeType=JaasLoginService,name=JaasLoginService</gbean-name>
        </reference>
    </gbean>


    <gbean name="hello-login-chain" class="org.apache.geronimo.security.jaas.JaasLoginModuleUse">
        <attribute name="controlFlag">REQUIRED</attribute>
        <reference name="LoginModule">
            <name>hello-login</name>
        </reference>
    </gbean>


    <gbean name="hello-login" class="org.apache.geronimo.security.jaas.LoginModuleGBean">
        <attribute name="loginModuleClass">reva.common.auth.TrivialLoginModule</attribute>
        <attribute name="serverSide">true</attribute>
        <attribute name="options">
            usersURI=var/security/demo_users.properties
            groupsURI=var/security/demo_groups.properties
        </attribute>
        <attribute name="loginDomainName">hello-realm</attribute>
    </gbean>


</application>
=================================================

The problem seems to be the application/gbean/reference/gbean-name
elements, as the error I get at offline deploy time looks like:

Deployer operation failed: org.apache.xmlbeans.XmlException: Invalid deployment descriptor: [error: cvc-complex-type.2.4a: Expected elements 'groupId@http://geronimo.apache.org/xml/ns/deployment-1.1 artifactId@http://geronimo.apache.org/xml/ns/deployment-1.1 version@http://geronimo.apache.org/xml/ns/deployment-1.1 module@http://geronimo.apache.org/xml/ns/deployment-1.1 type@http://geronimo.apache.org/xml/ns/deployment-1.1 name@http://geronimo.apache.org/xml/ns/deployment-1.1' instead of 'gbean-name@http://geronimo.apache.org/xml/ns/deployment-1.1' here in element reference@http://geronimo.apache.org/xml/ns/deployment-1.1, error: cvc-complex-type.2.4a: Expected elements 'groupId@http://geronimo.apache.org/xml/ns/deployment-1.1 artifactId@http://geronimo.apache.org/xml/ns/deployment-1.1 version@http://geronimo.apache.org/xml/ns/deployment-1.1 module@http://geronimo.apache.org/xml/ns/deployment-1.1 type@http://geronimo.apache.org/xml/ns/deployment-1.1 name@http://geronimo.apache.org/xml/ns/deployment-1.1' instead of 'gbean-name@http://geronimo.apache.org/xml/ns/deployment-1.1' here in element reference@http://geronimo.apache.org/xml/ns/deployment-1.1]
Descriptor: <xml-fragment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
  <dep:environment>
    <dep:moduleId>
      <dep:groupId>default</dep:groupId>
      <dep:artifactId>hello</dep:artifactId>
      <dep:version>1-default</dep:version>
      <dep:type>car</dep:type>
    </dep:moduleId>
    <dep:dependencies>
      <dep:dependency>
        <dep:groupId>geronimo</dep:groupId>
        <dep:artifactId>j2ee-security</dep:artifactId>
        <dep:version>1.0.1-SNAPSHOT</dep:version>
        <dep:type>car</dep:type>
      </dep:dependency>
    </dep:dependencies>
    <dep:hidden-classes/>
    <dep:non-overridable-classes/>
  </dep:environment>
  <dep:gbean name="hello-realm" class="org.apache.geronimo.security.realm.GenericSecurityRealm">
    <dep:attribute name="realmName">hello-realm</dep:attribute>
    <dep:reference name="LoginModuleConfiguration">
      <dep:name>hello-login-chain</dep:name>
    </dep:reference>
    <dep:reference name="ServerInfo">
      <dep:gbean-name>geronimo.server:J2EEApplication=null,J2EEModule=geronimo/j2ee-system/1.0.1-SNAPSHOT/car,J2EEServer=geronimo,j2eeType=GBean,name=ServerInfo</dep:gbean-name>
    </dep:reference>
    <dep:reference name="LoginService">
      <dep:gbean-name>geronimo.server:J2EEApplication=null,J2EEModule=geronimo/j2ee-security/1.0.1-SNAPSHOT/car,J2EEServer=geronimo,j2eeType=JaasLoginService,name=JaasLoginService</dep:gbean-name>
    </dep:reference>
  </dep:gbean>
  <dep:gbean name="hello-login-chain" class="org.apache.geronimo.security.jaas.JaasLoginModuleUse">
    <dep:attribute name="controlFlag">REQUIRED</dep:attribute>
    <dep:reference name="LoginModule">
      <dep:name>hello-login</dep:name>
    </dep:reference>
  </dep:gbean>
  <dep:gbean name="hello-login" class="org.apache.geronimo.security.jaas.LoginModuleGBean">
    <dep:attribute name="loginModuleClass">reva.common.auth.TrivialLoginModule</dep:attribute>
    <dep:attribute name="serverSide">true</dep:attribute>
    <dep:attribute name="options">usersURI=var/security/demo_users.properties
            groupsURI=var/security/demo_groups.properties</dep:attribute>
    <dep:attribute name="loginDomainName">hello-realm</dep:attribute>
  </dep:gbean>
</xml-fragment>
org.apache.geronimo.common.DeploymentException: org.apache.xmlbeans.XmlException: Invalid deployment descriptor: [error: cvc-complex-type.2.4a: Expected elements 'groupId@http://geronimo.apache.org/xml/ns/deployment-1.1 artifactId@http://geronimo.apache.org/xml/ns/deployment-1.1 version@http://geronimo.apache.org/xml/ns/deployment-1.1 module@http://geronimo.apache.org/xml/ns/deployment-1.1 type@http://geronimo.apache.org/xml/ns/deployment-1.1 name@http://geronimo.apache.org/xml/ns/deployment-1.1' instead of 'gbean-name@http://geronimo.apache.org/xml/ns/deployment-1.1' here in element reference@http://geronimo.apache.org/xml/ns/deployment-1.1, error: cvc-complex-type.2.4a: Expected elements 'groupId@http://geronimo.apache.org/xml/ns/deployment-1.1 artifactId@http://geronimo.apache.org/xml/ns/deployment-1.1 version@http://geronimo.apache.org/xml/ns/deployment-1.1 module@http://geronimo.apache.org/xml/ns/deployment-1.1 type@http://geronimo.apache.org/xml/ns/deployment-1.1 name@http://geronimo.apache.org/xml/ns/deployment-1.1' instead of 'gbean-name@http://geronimo.apache.org/xml/ns/deployment-1.1' here in element reference@http://geronimo.apache.org/xml/ns/deployment-1.1]
Descriptor: <xml-fragment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
  <dep:environment>
    <dep:moduleId>
      <dep:groupId>default</dep:groupId>
      <dep:artifactId>hello</dep:artifactId>
      <dep:version>1-default</dep:version>
      <dep:type>car</dep:type>
    </dep:moduleId>
    <dep:dependencies>
      <dep:dependency>
        <dep:groupId>geronimo</dep:groupId>
        <dep:artifactId>j2ee-security</dep:artifactId>
        <dep:version>1.0.1-SNAPSHOT</dep:version>
        <dep:type>car</dep:type>
      </dep:dependency>
    </dep:dependencies>
    <dep:hidden-classes/>
    <dep:non-overridable-classes/>
  </dep:environment>
  <dep:gbean name="hello-realm" class="org.apache.geronimo.security.realm.GenericSecurityRealm">
    <dep:attribute name="realmName">hello-realm</dep:attribute>
    <dep:reference name="LoginModuleConfiguration">
      <dep:name>hello-login-chain</dep:name>
    </dep:reference>
    <dep:reference name="ServerInfo">
      <dep:gbean-name>geronimo.server:J2EEApplication=null,J2EEModule=geronimo/j2ee-system/1.0.1-SNAPSHOT/car,J2EEServer=geronimo,j2eeType=GBean,name=ServerInfo</dep:gbean-name>
    </dep:reference>
    <dep:reference name="LoginService">
      <dep:gbean-name>geronimo.server:J2EEApplication=null,J2EEModule=geronimo/j2ee-security/1.0.1-SNAPSHOT/car,J2EEServer=geronimo,j2eeType=JaasLoginService,name=JaasLoginService</dep:gbean-name>
    </dep:reference>
  </dep:gbean>
  <dep:gbean name="hello-login-chain" class="org.apache.geronimo.security.jaas.JaasLoginModuleUse">
    <dep:attribute name="controlFlag">REQUIRED</dep:attribute>
    <dep:reference name="LoginModule">
      <dep:name>hello-login</dep:name>
    </dep:reference>
  </dep:gbean>
  <dep:gbean name="hello-login" class="org.apache.geronimo.security.jaas.LoginModuleGBean">
    <dep:attribute name="loginModuleClass">reva.common.auth.TrivialLoginModule</dep:attribute>
    <dep:attribute name="serverSide">true</dep:attribute>
    <dep:attribute name="options">usersURI=var/security/demo_users.properties
            groupsURI=var/security/demo_groups.properties</dep:attribute>
    <dep:attribute name="loginDomainName">hello-realm</dep:attribute>
  </dep:gbean>
</xml-fragment>
        at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.getEarPlan(EARConfigBuilder.java:342)
        at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.getDeploymentPlan(EARConfigBuilder.java:260)
        at org.apache.geronimo.j2ee.deployment.EARConfigBuilder$$FastClassByCGLIB$$38e56ec6.invoke(<generated>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
        at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
        at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:122)
        at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:817)
        at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
        at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
        at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
        at org.apache.geronimo.deployment.ConfigurationBuilder$$EnhancerByCGLIB$$a95a5462.getDeploymentPlan(<generated>)
        at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:229)
        at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:121)
        at org.apache.geronimo.deployment.Deployer$$FastClassByCGLIB$$734a235d.invoke(<generated>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
        at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
        at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:122)
        at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:852)
        at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
        at org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDeploy(AbstractDeployCommand.java:106)
        at org.apache.geronimo.deployment.plugin.local.DistributeCommand.run(DistributeCommand.java:60)
        at java.lang.Thread.run(Thread.java:534)


I have a vaguely ominous sense that the way I'm using gbean-name isn't
kosher, but it has worked fine up till now.

Thanks,
Toby