Craig McClanahan wrote:

On Apr 4, 2005 6:06 AM, Vinicius Caldeira Carvalho
<[EMAIL PROTECTED]> wrote:


Vinicius Caldeira Carvalho wrote:



PS: I'm using org.apache.commons.chain.CONFIG_WEB_RESOURCE I thought
this may add some extra info :-)

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





Well, I found out that the property for the catalog is
catalogName="something" and not catalog="something", Thanks lord for
OpenSource :D

<command className="org.apache.commons.chain.generic.LookupCommand"
name="validarRegraCompraPlanoCobertura" catalogName="catalog"/>

Now I get:
java.lang.IllegalArgumentException: Cannot find catalog 'catalog'

here's my web.xml

<context-param>
 <param-name>org.apache.commons.chain.CONFIG_WEB_RESOURCE</param-name>
 <param-value>/WEB-INF/catalog.xml</param-value>
</context-param>
<context-param>
   <param-name>org.apache.commons.chain.CONFIG_ATTR</param-name>
   <param-value>catalog</param-value>
</context-param>




Specifying the catalog name as a context param implies that you are using the old style (now deprecated) mechanism for configuring [chain], which (most importantly) does *not* register the catalog with CatalogFactory. Instead, you'll want to leave out the second <context-param> entry, and make sure your chain definitions document includes information about the catalogs to be used:

<catalogs>
   <catalog name="catalog">
       <chain .../>
       <chain .../>
   </catalog>
   <catalog name="otherCatalog">
       <chain .../>
       <chain .../>
   </catalog>
</catalogs>

Craig

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





Well I guess I'm doing something terrible wrong here. But it's not working using <catalogs></catalogs>

here's my catalog.xml:



<catalogs>
<catalog name="catalog">
<chain name="validarRegraCompraPlanoCobertura">
<command className="myCompanySystem.view.administrarregracompra.action.commands.InitSalvarRegraCompraCommand"/>
<command className="myCompanySystem.view.administrarregracompra.action.commands.RemoverItensCommand"/> <command className="myCompanySystem.view.administrarregracompra.action.commands.VerificarItensDuplicadosCommand"/>
<command className="myCompanySystem.view.administrarregracompra.action.commands.VerificarExistenciaItemCommand"/>
<command className="myCompanySystem.view.administrarregracompra.action.commands.AssembleRegraCompraCommand"/>
<command className="myCompanySystem.view.administrarregracompra.action.commands.VerificarCategoriaPaiCommand"/>
<command className="myCompanySystem.view.administrarregracompra.action.commands.VerificarHierarquiaItemsCommand"/>
<command className="myCompanySystem.view.administrarregracompra.action.commands.UpdateRegraCompraCommand"/>
</chain>
<chain name="ordernarRegraCompraPlanoCobertura">
<command className="myCompanySystem.view.administrarregracompra.action.commands.InitSalvarRegraCompraCommand"/>
<command className="myCompanySystem.view.administrarregracompra.action.commands.RemoverItensCommand"/> <command className="myCompanySystem.view.administrarregracompra.action.commands.VerificarItensDuplicadosCommand"/>
<command className="myCompanySystem.view.administrarregracompra.action.commands.VerificarExistenciaItemCommand"/>
<command className="myCompanySystem.view.administrarregracompra.action.commands.AssembleRegraCompraCommand"/>
<command className="myCompanySystem.view.administrarregracompra.action.commands.VerificarCategoriaPaiCommand"/>
<command className="myCompanySystem.view.administrarregracompra.action.commands.VerificarHierarquiaItemsCommand"/>
<command className="myCompanySystem.view.administrarregracompra.action.commands.UpdateRegraCompraCommand"/>
<command className="myCompanySystem.view.administrarregracompra.action.commands.OrganizarRegraCompraCommand"/>
</chain>
</catalog>
</catalogs>


Here's my web.xml:
 <context-param>
 <param-name>org.apache.commons.chain.CONFIG_WEB_RESOURCE</param-name>
 <param-value>/WEB-INF/catalog.xml</param-value>
</context-param>

<listener>
<listener-class>org.apache.commons.chain.web.ChainListener</listener-class>
</listener>


Now It doesn't run the commands:
10:00:14,110 INFO [STDOUT] java.lang.NullPointerException
10:00:14,110 INFO [STDOUT] at com.araujo.convenios.view.action.CommandAction.getCommand(CommandAction.java:32)
10:00:14,110 INFO [STDOUT] at com.araujo.convenios.view.administrarregracompra.action.OrganizarRegraCompraAction.doExecute(OrganizarRegraCompraAction.java:39)


Could someone please help?

Thanx

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to