{"action":"created","issue":{"url":"https://api.github.com/repos/biemond/biemond-orawls/issues/381","repository_url":"https://api.github.com/repos/biemond/biemond-orawls","labels_url":"https://api.github.com/repos/biemond/biemond-orawls/issues/381/labels{/name}","comments_url":"https://api.github.com/repos/biemond/biemond-orawls/issues/381/comments","events_url":"https://api.github.com/repos/biemond/biemond-orawls/issues/381/events","html_url":"https://github.com/biemond/biemond-orawls/issues/381","id":176701717,"number":381,"title":"Foreign Server Objects JNDI issue","user":{"login":"MarkRoddick","id":19282460,"avatar_url":"https://avatars.githubusercontent.com/u/19282460?v=3","gravatar_id":"","url":"https://api.github.com/users/MarkRoddick","html_url":"https://github.com/MarkRoddick","followers_url":"https://api.github.com/users/MarkRoddick/followers","following_url":"https://api.github.com/users/MarkRoddick/following{/other_user}","gists_url":"https://api.github.com/users/MarkRoddick/gists{/gist_id}","starred_url":"https://api.github.com/users/MarkRoddick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarkRoddick/subscriptions","organizations_url":"https://api.github.com/users/MarkRoddick/orgs","repos_url":"https://api.github.com/users/MarkRoddick/repos","events_url":"https://api.github.com/users/MarkRoddick/events{/privacy}","received_events_url":"https://api.github.com/users/MarkRoddick/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-13T17:30:08Z","updated_at":"2016-09-19T16:18:29Z","closed_at":null,"body":"Hi Edwin,\r\n\r\nI have an issue whereby I need to create a foreign server connection factory however both remote and local JNDI names need to be the same. I have checked and this works fine through the console however using the resource type this fails:\r\n\r\n```\r\nDebug: wls:/online_wls_lab1/serverConfig> execfile('/tmp/wlstScript20160913-63588-1vxolfs-0.py')\r\n\r\nDebug: Location changed to edit tree. This is a writable tree with\r\n\r\nDebug: DomainMBean as the root. To make changes you will need to start\r\n\r\nDebug: an edit session via startEdit().\r\n\r\nDebug:\r\n\r\nDebug: For more help, use help('edit')\r\n\r\nDebug:\r\n\r\nDebug: Starting an edit session ...\r\n\r\nDebug: Started edit session, please be sure to save and activate your\r\n\r\nDebug: changes once you are done.\r\n\r\nDebug: set att LocalJNDIName with value mytest/jms/test\r\n\r\nDebug: array(java.lang.Object,[None, None, None])\r\n\r\nDebug: Setting generic property LocalJNDIName to mytest/jms/test\r\n\r\nDebug: set att RemoteJNDIName with value mytest/jms/test\r\n\r\nDebug: array(java.lang.Object,[None, None, None])\r\n\r\nDebug: Setting generic property RemoteJNDIName to mytest/jms/test\r\n\r\nDebug: Saving all your changes ...\r\n\r\nDebug: Unexpected error: main.WLSTException\r\n\r\nDebug: Discarded all your changes successfully.\r\n\r\nDebug: Edit session has been stopped successfully.\r\n\r\nDebug: ~~~~COMMAND FAILED~~~~\r\n\r\nError: /Stage[main]/Oracle::Weblogic::Foreignserverobjects/Wls_foreign_server_object[JmsModule:ForeignJMS_OSB:test]: Could not evaluate: command in deamon failed.\r\n```\r\n\r\nHiera:\r\n\r\n```\r\napplication_foreign_server_objects:\r\n  'JmsModule:ForeignJMS_OSB:test':\r\n      ensure:         'present'\r\n      localjndiname:  'mytest/jms/test'\r\n      object_type:    'connectionfactory'\r\n      remotejndiname: 'mytest/jms/test'\r\n```\r\n\r\nChanging the either the localjndiname or remotejndiname to 2 different values works fine. Therefore this makes me think its something in the set_attribute_value function.\r\n\r\n```\r\n    set_attribute_value('LocalJNDIName', localjndiname, use_default_value_when_empty)\r\n    set_attribute_value('RemoteJNDIName', remotejndiname, use_default_value_when_empty)\r\n```\r\n\r\nAny help would be appreciated!\r\n\r\nKind regards,\r\nMark\r\n"},"comment":{"url":"https://api.github.com/repos/biemond/biemond-orawls/issues/comments/248040763","html_url":"https://github.com/biemond/biemond-orawls/issues/381#issuecomment-248040763","issue_url":"https://api.github.com/repos/biemond/biemond-orawls/issues/381","id":248040763,"user":{"login":"biemond","id":1085004,"avatar_url":"https://avatars.githubusercontent.com/u/1085004?v=3","gravatar_id":"","url":"https://api.github.com/users/biemond","html_url":"https://github.com/biemond","followers_url":"https://api.github.com/users/biemond/followers","following_url":"https://api.github.com/users/biemond/following{/other_user}","gists_url":"https://api.github.com/users/biemond/gists{/gist_id}","starred_url":"https://api.github.com/users/biemond/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biemond/subscriptions","organizations_url":"https://api.github.com/users/biemond/orgs","repos_url":"https://api.github.com/users/biemond/repos","events_url":"https://api.github.com/users/biemond/events{/privacy}","received_events_url":"https://api.github.com/users/biemond/received_events","type":"User","site_admin":false},"created_at":"2016-09-19T16:18:29Z","updated_at":"2016-09-19T16:18:29Z","body":"Hi,\r\n\r\nDo you know if both local & remote value is required\r\n\r\nplus I don't think you code will work\r\n\r\n```\r\n cd('/JMSSystemResources/'+jmsmodule+'/JMSResource/'+jmsmodule+'/ForeignServers/'+foreign_server_name)\r\n\r\n    if object_type == \"destination\":\r\n        if wlst_action == 'create':\r\n            cmo.createForeignDestination(name)\r\n\r\n        cd('/JMSSystemResources/'+jmsmodule+'/JMSResource/'+jmsmodule+'/ForeignServers/'+foreign_server_name+'/ForeignDestinations/'+name)\r\n\r\n    if object_type == \"connectionfactory\":\r\n        if wlst_action == 'create':\r\n            cmo.createForeignConnectionFactory(name)\r\n\r\n        cd('/JMSSystemResources/'+jmsmodule+'/JMSResource/'+jmsmodule+'/ForeignServers/'+foreign_server_name+'/ForeignConnectionFactories/'+name)\r\n\r\n\r\ncmo.setLocalJNDIName(localjndiname)\r\ncmo.setRemoteJNDIName(remotejndiname)\r\n\r\n```\r\n\r\n\r\n"}}
{"actor":{"display_login":"biemond"}}