Git Product home page Git Product logo

Comments (15)

gpoul avatar gpoul commented on June 23, 2024

Wasn't this fixed in pull request #10?

from wsadminlib.

ArievanDuin avatar ArievanDuin commented on June 23, 2024

I don't think so. It's about the following line 'for id in propsidlist:' The AdminConfig.showAttribute returns a list of properties as a List value, this is a single object instead a list of attributes as it assumed. The #10 as far as I can see is about if the list is enclosed in "[" "]".

from wsadminlib.

gpoul avatar gpoul commented on June 23, 2024

The propsidlist is a list and was created with the same split() you used. I fail to understand in which case the current code would be failing.

I think it would make sense if you could describe the scenario and variable values you're seeing to reproduce the issue or if you could provide a test case.

from wsadminlib.

ArievanDuin avatar ArievanDuin commented on June 23, 2024

Ok I execute setOrbCustomProperty(, , 'com.ibm.ws.orb.transport.useMultiHome', 'ture' ). I added a lot of sop's in my wsadminlib as also in the loop (As you can see I don't have the [] enclosing). The property exists but None is returned. If I add my lines the property is returned.

[2015-1021-1040-5900] setCustomPropertyOnObject Entry: object_id=(cells/RubensNode02Cell/nodes/RubensNode02/servers/AppSvr01|server.xml#ObjectRequestBroker_1183122130078) propname=com.ibm.ws.orb.transport.useMultiHome propvalue=ture
[2015-1021-1040-5900] getObjectCustomProperty Entry: object_id=(cells/RubensNode02Cell/nodes/RubensNode02/servers/AppSvr01|server.xml#ObjectRequestBroker_1183122130078) propname=com.ibm.ws.orb.transport.useMultiHome
[2015-1021-1040-5900] getObjectCustomProperty Property attribute value found=com.ibm.CORBA.enableLocateRequest(cells/RubensNode02Cell/nodes/RubensNode02/servers/AppSvr01|server.xml#Property_1445416858339) com.ibm.ws.orb.transport.WSSSLServerSocketFactoryName(cells/RubensNode02Cell/nodes/RubensNode02/servers/AppSvr01|server.xml#Property_1445416858340) com.ibm.ws.orb.transport.WSSSLClientSocketFactoryName(cells/RubensNode02Cell/nodes/RubensNode02/servers/AppSvr01|server.xml#Property_1445416858341) com.ibm.CORBA.ConnectionInterceptorName(cells/RubensNode02Cell/nodes/RubensNode02/servers/AppSvr01|server.xml#Property_1445416858342) com.ibm.CORBA.RasManager(cells/RubensNode02Cell/nodes/RubensNode02/servers/AppSvr01|server.xml#Property_1445416858343) com.ibm.websphere.management.registerServerIORWithLSD(cells/RubensNode02Cell/nodes/RubensNode02/servers/AppSvr01|server.xml#Property_1445416858344) com.ibm.CORBA.LocalHost(cells/RubensNode02Cell/nodes/RubensNode02/servers/AppSvr01|server.xml#Property_1445416858345) com.ibm.ws.orb.transport.useMultiHome(cells/RubensNode02Cell/nodes/RubensNode02/servers/AppSvr01|server.xml#Property_1445416858346) com.ibm.CORBA.LocalHost(cells/RubensNode02Cell/nodes/RubensNode02/servers/AppSvr01|server.xml#Property_1445416858347)
[2015-1021-1040-5900] getObjectCustomProperty ==>Property attribute value represent='com.ibm.CORBA.enableLocateRequest(cells/RubensNode02Cell/nodes/RubensNode02/servers/AppSvr01|server.xml#Property_1445416858339) com.ibm.ws.orb.transport.WSSSLServerSocketFactoryName(cells/RubensNode02Cell/nodes/RubensNode02/servers/AppSvr01|server.xml#Property_1445416858340) com.ibm.ws.orb.transport.WSSSLClientSocketFactoryName(cells/RubensNode02Cell/nodes/RubensNode02/servers/AppSvr01|server.xml#Property_1445416858341) com.ibm.CORBA.ConnectionInterceptorName(cells/RubensNode02Cell/nodes/RubensNode02/servers/AppSvr01|server.xml#Property_1445416858342) com.ibm.CORBA.RasManager(cells/RubensNode02Cell/nodes/RubensNode02/servers/AppSvr01|server.xml#Property_1445416858343) com.ibm.websphere.management.registerServerIORWithLSD(cells/RubensNode02Cell/nodes/RubensNode02/servers/AppSvr01|server.xml#Property_1445416858344) com.ibm.CORBA.LocalHost(cells/RubensNode02Cell/nodes/RubensNode02/servers/AppSvr01|server.xml#Property_1445416858345) com.ibm.ws.orb.transport.useMultiHome(cells/RubensNode02Cell/nodes/RubensNode02/servers/AppSvr01|server.xml#Property_1445416858346) com.ibm.CORBA.LocalHost(cells/RubensNode02Cell/nodes/RubensNode02/servers/AppSvr01|server.xml#Property_1445416858347)'
[2015-1021-1040-5900] getObjectCustomProperty List of properties = ['com.ibm.CORBA.enableLocateRequest(cells/RubensNode02Cell/nodes/RubensNode02/servers/AppSvr01|server.xml#Property_1445416858339) com.ibm.ws.orb.transport.WSSSLServerSocketFactoryName(cells/RubensNode02Cell/nodes/RubensNode02/servers/AppSvr01|server.xml#Property_1445416858340) com.ibm.ws.orb.transport.WSSSLClientSocketFactoryName(cells/RubensNode02Cell/nodes/RubensNode02/servers/AppSvr01|server.xml#Property_1445416858341) com.ibm.CORBA.ConnectionInterceptorName(cells/RubensNode02Cell/nodes/RubensNode02/servers/AppSvr01|server.xml#Property_1445416858342) com.ibm.CORBA.RasManager(cells/RubensNode02Cell/nodes/RubensNode02/servers/AppSvr01|server.xml#Property_1445416858343) com.ibm.websphere.management.registerServerIORWithLSD(cells/RubensNode02Cell/nodes/RubensNode02/servers/AppSvr01|server.xml#Property_1445416858344) com.ibm.CORBA.LocalHost(cells/RubensNode02Cell/nodes/RubensNode02/servers/AppSvr01|server.xml#Property_1445416858345) com.ibm.ws.orb.transport.useMultiHome(cells/RubensNode02Cell/nodes/RubensNode02/servers/AppSvr01|server.xml#Property_1445416858346) com.ibm.CORBA.LocalHost(cells/RubensNode02Cell/nodes/RubensNode02/servers/AppSvr01|server.xml#Property_1445416858347)']
[2015-1021-1040-5900] getObjectCustomProperty Length of the list is 1
[2015-1021-1040-5900] getObjectCustomProperty id=com.ibm.CORBA.enableLocateRequest(cells/RubensNode02Cell/nodes/RubensNode02/servers/AppSvr01|server.xml#Property_1445416858339) com.ibm.ws.orb.transport.WSSSLServerSocketFactoryName(cells/RubensNode02Cell/nodes/RubensNode02/servers/AppSvr01|server.xml#Property_1445416858340) com.ibm.ws.orb.transport.WSSSLClientSocketFactoryName(cells/RubensNode02Cell/nodes/RubensNode02/servers/AppSvr01|server.xml#Property_1445416858341) com.ibm.CORBA.ConnectionInterceptorName(cells/RubensNode02Cell/nodes/RubensNode02/servers/AppSvr01|server.xml#Property_1445416858342) com.ibm.CORBA.RasManager(cells/RubensNode02Cell/nodes/RubensNode02/servers/AppSvr01|server.xml#Property_1445416858343) com.ibm.websphere.management.registerServerIORWithLSD(cells/RubensNode02Cell/nodes/RubensNode02/servers/AppSvr01|server.xml#Property_1445416858344) com.ibm.CORBA.LocalHost(cells/RubensNode02Cell/nodes/RubensNode02/servers/AppSvr01|server.xml#Property_1445416858345) com.ibm.ws.orb.transport.useMultiHome(cells/RubensNode02Cell/nodes/RubensNode02/servers/AppSvr01|server.xml#Property_1445416858346) com.ibm.CORBA.LocalHost(cells/RubensNode02Cell/nodes/RubensNode02/servers/AppSvr01|server.xml#Property_1445416858347)
[2015-1021-1040-5900] getObjectCustomProperty name=com.ibm.CORBA.LocalHost
[2015-1021-1040-5900] setCustomPropertyOnObject checking the value=None
[2015-1021-1040-5900] setCustomPropertyOnObject =>The value doesn't exist
[2015-1021-1040-5900] setOrbCustomProperty: Exit. Successfully set com.ibm.ws.orb.transport.useMultiHome=ture
Hopes this will help you.

from wsadminlib.

ArievanDuin avatar ArievanDuin commented on June 23, 2024

node and profile were removed by the tool in the command sorry

from wsadminlib.

gpoul avatar gpoul commented on June 23, 2024

Thanks, that helps a lot! - There are several problems in this code path when the 'properties' attribute is not enclosed in brackets or when it is not separated by blanks. That is the underlying assumption of many of those methods.

Can you please also provide a versionInfo?

from wsadminlib.

ArievanDuin avatar ArievanDuin commented on June 23, 2024

That's what I taught also hence I reported it for a better solution. Always difficult which version you mean (my development system is 8.0 on Win7, the customer however runs 8.5.5.7 express on iSeries I send you this one.
versioninfo
The java.version property was detected as input. This property is used as output only and has no effect on JVM initialization
WVER0010I: Copyright (c) IBM Corporation 2002, 2012; All rights reserved.

WVER0012I: VersionInfo reporter version 1.15.1.48, dated 2/8/12

IBM WebSphere Product Installation Status Report

Report at date and time October 21, 2015 11:36:28 AM CEST

Installation

Product Directory /QIBM/ProdData/WebSphere/AppServer/V855/Express
Version Directory /QIBM/ProdData/WebSphere/AppServer/V855/Express/properties/version
DTD Directory /QIBM/ProdData/WebSphere/AppServer/V855/Express/properties/version/dtd
Log Directory /QIBM/UserData/InstallationManager/logs

Product List

EXPRESS installed

Installed Product

Name IBM WebSphere Application Server - Express
Version 8.5.5.7
ID EXPRESS
Build Level cf071533.01
Build Date 8/20/15
Package com.ibm.websphere.EXPRESS.v85_8.5.5007.20150820_2101
Architecture System i
Installed Features WebSphere Application Server Full Profile
EJBDeploy tool for pre-EJB 3.0 modules
Embeddable EJB container

Stand-alone thin clients and resource adapters

End Installation Status Report

$

from wsadminlib.

ArievanDuin avatar ArievanDuin commented on June 23, 2024

Again foolled by the formatter Sorry

from wsadminlib.

gpoul avatar gpoul commented on June 23, 2024

Can you please confirm whether the 'properties' attribute of your ObjectRequestBroker indeed has no '[]' brackets?

wsadmin>AdminConfig.showAttribute('(cells/localhostNode01Cell/nodes/localhostNode01/servers/server1|server.xml#ObjectRequestBroker_1183122130078)','properties')
'[com.ibm.CORBA.enableLocateRequest(cells/localhostNode01Cell/nodes/localhostNode01/servers/server1|server.xml#Property_1183122130079) com.ibm.ws.orb.transport.WSSSLServerSocketFactoryName(cells/localhostNode01Cell/nodes/localhostNode01/servers/server1|server.xml#Property_1183122130080) com.ibm.ws.orb.transport.WSSSLClientSocketFactoryName(cells/localhostNode01Cell/nodes/localhostNode01/servers/server1|server.xml#Property_1183122130081) com.ibm.CORBA.ConnectionInterceptorName(cells/localhostNode01Cell/nodes/localhostNode01/servers/server1|server.xml#Property_1183122130082) com.ibm.CORBA.RasManager(cells/localhostNode01Cell/nodes/localhostNode01/servers/server1|server.xml#Property_1183122130083) com.ibm.ws.orb.transport.useMultiHome(cells/localhostNode01Cell/nodes/localhostNode01/servers/server1|server.xml#Property_1183122130084) com.ibm.websphere.management.registerServerIORWithLSD(cells/localhostNode01Cell/nodes/localhostNode01/servers/server1|server.xml#Property_1183122130085)]'

I have brackets on the ObjectRequestBroker properties on 8.0.0.5 and 8.5.5.1.

from wsadminlib.

ArievanDuin avatar ArievanDuin commented on June 23, 2024

Always difficult I changed this part.
if x.startswith("["):
sop(m,"I have brackets")
propsidlist = x[1:-1].split(' ')
else:
sop(m,"I have NO brackets")
propsidlist = [x]

Result [2015-1021-1553-3300] getObjectCustomProperty I have NO brackets
(This was on 8.0.0.6).

from wsadminlib.

ArievanDuin avatar ArievanDuin commented on June 23, 2024

Again these stupid formatting

from wsadminlib.

gpoul avatar gpoul commented on June 23, 2024

I don't think that's supposed to happen; they should really have brackets. Not sure whether that's in a defect in WAS or something your scripts did to the configuration. You should also find out why this happened.

Please look at the patch at gpoul@9f10b98 and let me know whether you think that will fix it. - Please notice that this is based off the latest wsadminlib, so make sure you get either the full copy or merge with the latest available copy from master.

from wsadminlib.

ArievanDuin avatar ArievanDuin commented on June 23, 2024

Ok. It will be Friday. I will create a new test server. Download a new fresh wsadminlib. How can verify the version (I see the latest to be reported 2 days ago, but where can check reversion nbr ?). Add the lines you wrote on the patch and add a few sop's and run it against the new created server. I can also run it against a new 8.5.5.7 server (or other version numbers but need more time for this).

from wsadminlib.

gpoul avatar gpoul commented on June 23, 2024

So this code is supposed to work also when you don't see the brackets; no
need to get a new test server to find out whether the new code works, but
it would definitely be interesting if you see no brackets in a new test
server as well.

You can only check the revision if you have a git clone; otherwise I would
advise you to merge your private changes into the new revision or whatever
you feel is best.

On Wed, Oct 21, 2015 at 4:23 PM ArievanDuin [email protected]
wrote:

Ok. It will be Friday. I will create a new test server. Download a new
fresh wsadminlib. How can verify the version (I see the latest to be
reported 2 days ago, but where can check reversion nbr ?). Add the lines
you wrote on the patch and add a few sop's and run it against the new
created server. I can also run it against a new 8.5.5.7 server (or other
version numbers but need more time for this).


Reply to this email directly or view it on GitHub
#16 (comment)
.

from wsadminlib.

ArievanDuin avatar ArievanDuin commented on June 23, 2024

OK. I downloaded the wsadminlib from https://github.com/wsadminlib/wsadminlib (Maybe good idea to include version numbering somewhere). Changed the getObjectCustomProperty according gpoul@9f10b98 and added a few sop for debugging purposes.
Now I both on old and Newly created servers the List has braches ("[" "]") around it. (No idea what changed more) More importantly the list is interpreted as a List of items.
Conclusion : This works now. Thanks.

from wsadminlib.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.