I forgot to add, the domain tag is: <domain xmlns="urn:jboss:domain:1.8">
not just <domain> if that's relevant. On Tuesday, March 31, 2020 at 3:15:35 PM UTC-7, Dave York wrote: > > I have an JBoss domain.xml file im trying to manipulate with win_xml: > > <domain> > ... > <server-groups> > <server-group name="sandbox" profile="full-ha"> > <jvm name="default"> > <heap size="8192m" max-size="8192m"/> > <permgen max-size="384m"/> > </jvm> > <socket-binding-group ref="full-ha-sockets"/> > <deployments> > <deployment name="XXXXXXXXXXX.ear" runtime-name= > "XXXXXXXXXXX.ear"/> > </deployments> > </server-group> > </server-groups> > > > </domain> > > > When I try to modify the heap size attribute above using win_xml with this > play: > - name: Test modifying XML > win_xml: > path: e:\jboss-eap-6.4\XXXXXXX\configuration\domain.xml > xpath: '/domain/server-groups/server-group/jvm/heap' > attribute: 'size' > fragment: '123m' > type: attribute > > > However, I get an exception that looks like its coming from powershell > "You cannot call a method on a null-valued expression > "exception": "You cannot call a method on a null-valued expression.\r\nAt > line:204 char:5\r\n+ [bool]$add = !$node.HasAttribute($attribute) -Or > ($node.$attribut ...\r\n+ > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n + > CategoryInfo : InvalidOperation: (:) [], > ParentContainsErrorRecordException\r\n + FullyQualifiedErrorId : > InvokeMethodOnNull\r\n\r\nScriptStackTrace:\r\nat <ScriptBlock>, <No file>: > line 204\r\n", > > "msg": "Unhandled exception while executing module: You cannot call a > method on a null-valued expression.", > "_ansible_no_log": false, > "changed": false > > } > > > Anyone see my problem? I checked the xpath using Notepad++ xml tools > plugin and it seems correct. Scratchin my head > > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/178c8aed-886a-4b1d-9f95-96e429efc59c%40googlegroups.com.
