Then I think there is still something wrong. I do (and did) have the list of server names defined in the module environment xml and I know they match the actual server names, but yet if I do not include the defaultEnvironmentName, it still gives me that exception:
----- No environment can be resolved for 'www.xyz.com' and no default environment has been defined. Please define a default environment or add this server to a defined environment. ----- This seems to only happen when I include the module environment but not a base one. On Sep 30, 5:50 pm, "Peter J. Farrell" <[email protected]> wrote: > It is optional if you do not want a default environment to load. > Otherwise, you have to list all the server names or server name pattern > combinations in which your application will be deployed because the > environment property matches environments by server names. If one does > not match, it uses the default environment name or throw an exception > (like you saw) if it doesn't match any of the server names / patterns > and no default environment name is defined. > > There are situations where you don't want to define a default environment. > > .Peter > > Po said the following on 09/30/2009 02:57 PM: > > > > > That did it! I had that line of code commented out. > > > Just a heads up, the documentation still specifies the > > defaultEnvironmentName as optional: > > > ----- > > <!-- Optional: Name of default environment to use if no server matches > > --> > > <parameter name="defaultEnvironmentName" value="production" /> > > ----- > > > Thanks for all your help! > > > On Sep 30, 3:43 pm, "Peter J. Farrell" <[email protected]> wrote: > > >> Would be willing to share your xml configuration? It's not a bug, just > >> something is up with your configuration. > > >> Looks like the documentation has some inconsistencies in it. The > >> default environment name parameter should be "defaultEnvironmentName" > >> not "defaultEnvironment". The sample code is correct, but the prose > >> below it referred to "defaultEnvironment" which is incorrect. I have > >> updated the wiki to correct issue. > > >> You should define a parameter in the EnvironmentProperty parameters like > >> this: > > >> <parameter name="defaultEnvironmentName" > >> value="Name-Of-Default-Environment-Name-Here" /> > > >> I have a feeling this is the issue for you. > > >> .pjf > > >> Po said the following on 09/30/2009 02:02 PM: > > >>> Thank you for the prompt reply Peter. > > >>> As it seems to always be the case, I apparently did not the read the > >>> docs properly. As soon as I posted my question, I decided to take > >>> another look at the EnvironmentProperty docs and saw this little gem: > > >>> "The EnvironmentProperty uses (via inheritance) the environment name > >>> and group from the base application if used in a module for > >>> environment resolution. This means your environment names in your > >>> module must match the environment names in your base application." > > >>> But I do agree that there should not necessarily be a base > >>> environment. I went ahead and updated to head and now I get this > >>> exception: > > >>> ----- > >>> No environment can be resolved for 'www.xyz.com'andno default > >>> environment has been defined. > >>> Please define a default environment or add this server to a defined > >>> environment. > >>> ----- > > >>> Is it not picking up the AppManager's default environmentName? > > >>> On Sep 30, 2:23 pm, "Peter J. Farrell" <[email protected]> wrote: > > >>>> I bet you don't have an EnvironmentProperty setup in the base > >>>> application yet. If you add one, I bet the exception will go away. > >>>> However, I think there was the assumption that if you have environments > >>>> setup in a module that an environments have been setup for the base > >>>> application. So I see a logic error in the code because I don't think > >>>> this is a good assumption on our part. Here is the ticket: > > >>>>http://greatbiztoolsllc.trac.cvsdude.com/mach-ii/ticket/401 > > >>>> I've committed a fix already that will allow you to set up an > >>>> environment in a module without the parent being set up. If you could > >>>> update to head from the repo and let me know if this fix works, I'd > >>>> really appreciate it as I will then close out the ticket. > > >>>> Best, > >>>> .pjf > >>>> Team Mach-II > > >>>> Po said the following on 09/30/2009 11:57 AM: > > >>>>> SETUP: mach-ii 1.8 (latest from trunk) > > >>>>> I would like to setup some environment properties in the main > >>>>> application and some others in the module, but I get the following > >>>>> error: > > >>>>> ----- > >>>>> The 'environmentGroup' value is not a valid group name for environment > >>>>> named 'dev' for the EnvironmentProperty in module 'module1'. > >>>>> Valid environment groups: > >>>>> ----- > > >>>>> For some reason the "Valid environment groups" variable is not being > >>>>> initialized properly, so the exception is always being thrown. > > >>>>> Any ideas? > > >>>>> Thank you.- Hide quoted text - > > >>>> - Show quoted text -- Hide quoted text - > > >> - Show quoted text -- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to Mach-II for CFML list. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/mach-ii-for-coldfusion?hl=en SVN: http://greatbiztoolsllc.svn.cvsdude.com/mach-ii/ Wiki / Documentation / Tickets: http://greatbiztoolsllc.trac.cvsdude.com/mach-ii/ -~----------~----~----~----~------~----~------~--~---
