You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Jacek Laskowski <jl...@apache.org> on 2005/11/18 00:09:19 UTC

SchemaConversionUtils/GenericToSpecificPlanConverter woes continue?

Hi,

I'm pretty sure that my recent problems with plans are related to the 
last changes to org.apache.geronimo.schema.SchemaConversionUtils or 
org.apache.geronimo.web.deployment.GenericToSpecificPlanConverter (it is 
because I'm trying to pinpoint the root cause and I'm pointing to at 
anything that changes ;))

The following plan is changed to the one where all the elements belong 
to jet namespace.

<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application"
     parentId="org/apache/geronimo/AdventureDataSource1.0.1"
     configId="org/apache/geronimo/Adventure1.0.1">

     <module>
         <web>adventure.war</web>
         <web-app xmlns="http://geronimo.apache.org/xml/ns/web"
             xmlns:naming="http://geronimo.apache.org/xml/ns/naming"
             configId="NOT_USED">

 
<context-priority-classloader>false</context-priority-classloader>

             <naming:service-ref>
 
<naming:service-ref-name>service/OpcPurchaseOrderService</naming:service-ref-name>
                 <naming:port>
 
<naming:port-name>PurchaseOrderIntfPort</naming:port-name>
                     <naming:protocol>http</naming:protocol>
                     <naming:host>localhost</naming:host>
                     <naming:port>8080</naming:port>
                     <naming:uri>/consumer/foo/po</naming:uri>
                 </naming:port>
             </naming:service-ref>
             <naming:service-ref>
 
<naming:service-ref-name>service/OpcOrderTrackingService</naming:service-ref-name>
                 <naming:port>
 
<naming:port-name>OrderTrackingIntfPort</naming:port-name>
                     <naming:protocol>http</naming:protocol>
                     <naming:host>localhost</naming:host>
                     <naming:port>8080</naming:port>
                     <naming:uri>/consumer/foo/order</naming:uri>
                 </naming:port>
             </naming:service-ref>
             <naming:resource-ref>
                 <naming:ref-name>jdbc/CatalogDB</naming:ref-name>
 
<naming:resource-link>AdventureDataSource</naming:resource-link>
             </naming:resource-ref>
         </web-app>
     </module>

</application>

Am I missing something?

Jacek

Re: SchemaConversionUtils/GenericToSpecificPlanConverter woes continue?

Posted by David Jencks <da...@yahoo.com>.
After pointing it out to me so many times, I finally found what you are  
talking about and fixed the test (I hope).

thanks again
david jencks

On Nov 17, 2005, at 6:25 PM, Jian Liao wrote:

> Hi dj,
> I am sorry to mention this again.
> The namespace defined in  
> modules\tomcat-builder\src\schema\geronimo-tomcat-config-1.0.xsd is  
> different with the namespace you used in your unit test case  
> modules\web- 
> builder\src\test\org\apache\geronimo\web\deployment\GenericToSpecificPl 
> anConverterTest.java.
>
> In the runtime,server will creat the GenericToSpecificPlanConverter  
> instance like this:
> XmlObject webPlan = new  
> GenericToSpecificPlanConverter(GerTomcatDocument.type.getDocumentElemen 
> tName().getNamespaceURI(),                         
> TomcatWebAppDocument.type.getDocumentElementName().getNamespaceURI(),  
> "tomcat").convertToSpecificPlan(rawPlan);
>
> The configNamespace member variable value in  
> GenericToSpecificPlanConverter instance will come from  
> GerTomcatDocument.type.getDocumentElementName().getNamespaceURI(),  
> which GerTomcatDocument class is generated by  
> modules\tomcat-builder\src\schema\geronimo-tomcat-config-1.0.xsd,  
> therefore I think geronimo-tomcat-config-1.0.xsd  is out of sync with  
> your unit test code. Which one should I use?
>
> - Jian Liao
>
> On 11/18/05, Jacek Laskowski < jlaskowski@apache.org> wrote:David  
> Jencks wrote:
>> > Your original namespace should now work, see latest change on
>> > GERONIMO-1175
>>
>> It worked. Thanks!
>>
>> > david jencks
>>
>> Jacek


Re: SchemaConversionUtils/GenericToSpecificPlanConverter woes continue?

Posted by Jian Liao <no...@gmail.com>.
Hi dj,
I am sorry to mention this again.
The namespace defined in modules\tomcat-builder\src\schema\geronimo-
tomcat-config-1.0.xsd is different with the namespace you used in your unit
test case
modules\web-builder\src\test\org\apache\geronimo\web\deployment\GenericToSpecificPlanConverterTest.java.

In the runtime,server will creat the GenericToSpecificPlanConverter instance
like this:
XmlObject webPlan = new GenericToSpecificPlanConverter(
GerTomcatDocument.type.getDocumentElementName().getNamespaceURI(),
TomcatWebAppDocument.type.getDocumentElementName().getNamespaceURI(),
"tomcat").convertToSpecificPlan(rawPlan);

The configNamespace member variable value in GenericToSpecificPlanConverter
instance will come from
GerTomcatDocument.type.getDocumentElementName().getNamespaceURI(),
which GerTomcatDocument class is generated by
modules\tomcat-builder\src\schema\geronimo-tomcat-config-1.0.xsd, therefore
I think geronimo-tomcat-config-1.0.xsd is out of sync with your unit test
code. Which one should I use?

- Jian Liao

On 11/18/05, Jacek Laskowski <jl...@apache.org> wrote:
>
> David Jencks wrote:
> > Your original namespace should now work, see latest change on
> > GERONIMO-1175
>
> It worked. Thanks!
>
> > david jencks
>
> Jacek
>

Re: SchemaConversionUtils/GenericToSpecificPlanConverter woes continue?

Posted by Jacek Laskowski <jl...@apache.org>.
David Jencks wrote:
> Your original namespace should now work, see latest change on  
> GERONIMO-1175

It worked. Thanks!

> david jencks

Jacek

Re: SchemaConversionUtils/GenericToSpecificPlanConverter woes continue?

Posted by David Jencks <da...@yahoo.com>.
Your original namespace should now work, see latest change on  
GERONIMO-1175

thanks
david jencks

On Nov 17, 2005, at 3:13 PM, David Jencks wrote:

> If you change the web namespace to  
> http://geronimo.apache.org/xml/ns/j2ee/web-1.0 does it work?
>
> thanks
> david jencks
>
> On Nov 17, 2005, at 3:09 PM, Jacek Laskowski wrote:
>
>> Hi,
>>
>> I'm pretty sure that my recent problems with plans are related to the  
>> last changes to org.apache.geronimo.schema.SchemaConversionUtils or  
>> org.apache.geronimo.web.deployment.GenericToSpecificPlanConverter (it  
>> is because I'm trying to pinpoint the root cause and I'm pointing to  
>> at anything that changes ;))
>>
>> The following plan is changed to the one where all the elements  
>> belong to jet namespace.
>>
>> <application  
>> xmlns="http://geronimo.apache.org/xml/ns/j2ee/application"
>>     parentId="org/apache/geronimo/AdventureDataSource1.0.1"
>>     configId="org/apache/geronimo/Adventure1.0.1">
>>
>>     <module>
>>         <web>adventure.war</web>
>>         <web-app xmlns="http://geronimo.apache.org/xml/ns/web"
>>             xmlns:naming="http://geronimo.apache.org/xml/ns/naming"
>>             configId="NOT_USED">
>>
>> <context-priority-classloader>false</context-priority-classloader>
>>
>>             <naming:service-ref>
>> <naming:service-ref-name>service/OpcPurchaseOrderService</naming: 
>> service-ref-name>
>>                 <naming:port>
>> <naming:port-name>PurchaseOrderIntfPort</naming:port-name>
>>                     <naming:protocol>http</naming:protocol>
>>                     <naming:host>localhost</naming:host>
>>                     <naming:port>8080</naming:port>
>>                     <naming:uri>/consumer/foo/po</naming:uri>
>>                 </naming:port>
>>             </naming:service-ref>
>>             <naming:service-ref>
>> <naming:service-ref-name>service/OpcOrderTrackingService</naming: 
>> service-ref-name>
>>                 <naming:port>
>> <naming:port-name>OrderTrackingIntfPort</naming:port-name>
>>                     <naming:protocol>http</naming:protocol>
>>                     <naming:host>localhost</naming:host>
>>                     <naming:port>8080</naming:port>
>>                     <naming:uri>/consumer/foo/order</naming:uri>
>>                 </naming:port>
>>             </naming:service-ref>
>>             <naming:resource-ref>
>>                 <naming:ref-name>jdbc/CatalogDB</naming:ref-name>
>> <naming:resource-link>AdventureDataSource</naming:resource-link>
>>             </naming:resource-ref>
>>         </web-app>
>>     </module>
>>
>> </application>
>>
>> Am I missing something?
>>
>> Jacek
>>
>


Re: SchemaConversionUtils/GenericToSpecificPlanConverter woes continue?

Posted by David Jencks <da...@yahoo.com>.
If you change the web namespace to  
http://geronimo.apache.org/xml/ns/j2ee/web-1.0 does it work?

thanks
david jencks

On Nov 17, 2005, at 3:09 PM, Jacek Laskowski wrote:

> Hi,
>
> I'm pretty sure that my recent problems with plans are related to the  
> last changes to org.apache.geronimo.schema.SchemaConversionUtils or  
> org.apache.geronimo.web.deployment.GenericToSpecificPlanConverter (it  
> is because I'm trying to pinpoint the root cause and I'm pointing to  
> at anything that changes ;))
>
> The following plan is changed to the one where all the elements belong  
> to jet namespace.
>
> <application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application"
>     parentId="org/apache/geronimo/AdventureDataSource1.0.1"
>     configId="org/apache/geronimo/Adventure1.0.1">
>
>     <module>
>         <web>adventure.war</web>
>         <web-app xmlns="http://geronimo.apache.org/xml/ns/web"
>             xmlns:naming="http://geronimo.apache.org/xml/ns/naming"
>             configId="NOT_USED">
>
> <context-priority-classloader>false</context-priority-classloader>
>
>             <naming:service-ref>
> <naming:service-ref-name>service/OpcPurchaseOrderService</naming: 
> service-ref-name>
>                 <naming:port>
> <naming:port-name>PurchaseOrderIntfPort</naming:port-name>
>                     <naming:protocol>http</naming:protocol>
>                     <naming:host>localhost</naming:host>
>                     <naming:port>8080</naming:port>
>                     <naming:uri>/consumer/foo/po</naming:uri>
>                 </naming:port>
>             </naming:service-ref>
>             <naming:service-ref>
> <naming:service-ref-name>service/OpcOrderTrackingService</naming: 
> service-ref-name>
>                 <naming:port>
> <naming:port-name>OrderTrackingIntfPort</naming:port-name>
>                     <naming:protocol>http</naming:protocol>
>                     <naming:host>localhost</naming:host>
>                     <naming:port>8080</naming:port>
>                     <naming:uri>/consumer/foo/order</naming:uri>
>                 </naming:port>
>             </naming:service-ref>
>             <naming:resource-ref>
>                 <naming:ref-name>jdbc/CatalogDB</naming:ref-name>
> <naming:resource-link>AdventureDataSource</naming:resource-link>
>             </naming:resource-ref>
>         </web-app>
>     </module>
>
> </application>
>
> Am I missing something?
>
> Jacek
>