WebSphere Application Server - Problem running wsadmin jython script

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Application Server > February 2007 > Problem running wsadmin jython script





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Problem running wsadmin jython script

2007-02-22, 7:16 pm

Hi all,

I'm trying to run a jython script which adds users and groups to the valid Console Users and Console Groups. The script works from Linux, but *not* from Windows.

Basically, I've secured the WAS to an LDAP, and via the WAS console I can add a user called "uid=myuser,ou=users,o=myorg" (if I try to do it before it's secured to the LDAP, it runs a check and can't find the user).

If I try to do the same from a wsadmin using a jython script - in Linux, this command works:

AdminConfig.create("GroupExt", role, [["name", "uid=myuser,ou=users,o=myorg"]])

(where 'role' is pointing at the correct role object). But in a Windows installation, it throws this error:

[22/02/07 17:57:09:086 EST] 0000000a AbstractShell E WASX7120E: Diagnostic information from exception with text "com.ibm.websphere.management.exception.InvalidAttributeValException: ADMG0012E: The attribute value for attribute name is not
valid." follows:

com.ibm.websphere.management.exception.InvalidAttributeValException: ADMG0012E: The attribute value for attribute name is not valid.
at com.ibm.ws.management.configservice.MOFUtil.validateAttribute(MOFUtil.java:988)
at com.ibm.ws.management.configservice.MOFUtil.validateAttributeList(MOFUtil.java:876)
at com.ibm.ws.management.configservice.MOFUtil.validateConfigData(MOFUtil.java:142)
at com.ibm.ws.management.configservice.MOFUtil.createRefObject(MOFUtil.java:356)
at com.ibm.ws.management.configservice.DocAccessor.createConfigData(DocAccessor.java:135)
at com.ibm.ws.management.configservice.ConfigServiceImpl.createConfigDataBasic(ConfigServiceImpl.java:1158)
at com.ibm.ws.management.configservice.ConfigServiceImpl. createConfigDataByTemplate(ConfigService
Impl.java:774)
at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1366)
at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:1012)
at mx4j.server.interceptor.InvokerMBeanServerInterceptor.invoke(InvokerMBeanServerInterceptor.java(Compiled Code))
at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java(Compiled Code))
at mx4j.server.interceptor.SecurityMBeanServerInterceptor.invoke(SecurityMBeanServerInterceptor.java:86)
at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java(Compiled Code))
at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java(Compiled Code))
at mx4j.server.interceptor. ContextClassLoaderMBeanServerInterceptor
. invoke(ContextClassLoaderMBeanServerInte
rceptor.java:167)
at mx4j.server.MX4JMBeanServer.invoke(MX4JMBeanServer.java:1249)
at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:901)
at java.security.AccessController.doPrivileged1(Native Method)
at java.security.AccessController.doPrivileged(AccessController.java(Compiled Code))
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java(Compiled Code))
at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:817)
at com.ibm.ws.management.connector.AdminServiceDelegator.invoke(AdminServiceDelegator.java:139)
at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
at com.ibm.ws.management.connector.soap.SOAPConnector.invoke(SOAPConnector.java(Compiled Code))
at com.ibm.ws.management.connector.soap.SOAPConnector.service(SOAPConnector.java(Compiled Code))
at com.ibm.ws.management.connector.soap.SOAPConnection.handleRequest(SOAPConnection.java:55)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:641)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:469)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1332)

Does anyone have any ideas as to why I'm having a problem running this in Windows?

From experimenting, the AdminConfig.create() command seems to object to the '='s and the ','s in the name I'm passing through - do I need to escape them somehow? I wouldn't have thought this would be necessary.

I'm using WAS 6.0.2.15.

Thanks,

Regards,
Corey.

2007-02-22, 7:16 pm

Hi again,

Just further to this ... it might only be a problem in Windows XP - I tried the script on a WAS installation on Windows Server 2003, and it worked.


Regards,
Corey.

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com