Trouble configuring J2C Resource Adapters - Websphere

This is a discussion on Trouble configuring J2C Resource Adapters - Websphere ; Hi All, I am trying to install a .rar file at node scope and configure resource adapter at server scope in jython but failing while configuring the j2c connection factories.I am attaching the jython code below.Kindly suggest me the solution. ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Trouble configuring J2C Resource Adapters

  1. Trouble configuring J2C Resource Adapters

    Hi All,

    I am trying to install a .rar file at node scope and configure resource adapter at server scope in jython but failing while configuring the j2c connection factories.I am attaching the jython code below.Kindly suggest me the solution.

    server1 = AdminConfig.getid("/Cell:"+cellName+"/Node:"+nodeName+"/")
    rarFile = 'D:/software/ECIResourceAdapter.rar'
    option = '[-rar.name ECIResourceAdapter]'
    newra = AdminConfig.installResourceAdapter(rarFile, nodeName, option)
    print newra

    server2 = AdminConfig.getid("/Cell:"+cellName+"/Node:"+nodeName+"/Server:"+serverName+"/")
    newra2 = AdminConfig.create('J2CResourceAdapter', server2, [["name", "ECIResourceAdapter"], ["archivePath", "${CONNECTOR_INSTALL_ROOT}/ECIResourceAdapter.rar"]])

    name1 = ['name', 'xxxx']
    jndi1 = ['jndiName', 'j2c/xxxx']
    alias = ["authMechanismPreference", "BASIC_PASSWORD"]
    j2ccfAttrs1 = [name1,jndi1,alias]
    newcf1 = AdminConfig.create('J2CConnectionFactory', newra2, j2ccfAttrs1)

    I am getting the following error:

    [10/22/08 16:20:31:981 EDT] 0000000a AbstractShell E WASX7120E: Diagnostic information from exception with text "com.ibm.websphere.management.exception.ConfigServi ceException
    java.lang.NullPointerException: java.lang.NullPointerException
    " follows:

    com.ibm.websphere.management.exception.ConfigServi ceException: java.lang.NullPointerException
    at com.ibm.websphere.management.configservice.ConfigS erviceProxy.createConfigDataByTemplate(ConfigServi ceProxy.java:547)
    at com.ibm.ws.scripting.AdminConfigClient.create(Admi nConfigClient.java:2110)
    at com.ibm.ws.scripting.AdminConfigClient.create(Admi nConfigClient.java:1970)
    at com.ibm.ws.scripting.AdminConfigClient.create(Admi nConfigClient.java:1937)
    at sun.reflect.GeneratedMethodAccessor5.invoke(Unknow n Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:615)
    at org.python.core.PyReflectedFunction.__call__(PyRef lectedFunction.java)
    at org.python.core.PyMethod.__call__(PyMethod.java)
    at org.python.core.PyObject.__call__(PyObject.java)
    at org.python.core.PyObject.invoke(PyObject.java)
    at org.python.pycode._pyx4.createARM$2( :258)
    at org.python.pycode._pyx4.call_function( )
    at org.python.core.PyTableCode.call(PyTableCode.java)
    at org.python.core.PyTableCode.call(PyTableCode.java)
    at org.python.core.PyFunction.__call__(PyFunction.jav a)
    at org.python.core.PyObject.__call__(PyObject.java)
    at org.python.pycode._pyx4.f$0( :350)
    at org.python.pycode._pyx4.call_function()
    at org.python.core.PyTableCode.call(PyTableCode.java)
    at org.python.core.PyCode.call(PyCode.java)
    at org.python.core.Py.runCode(Py.java)
    at org.python.core.Py.exec(Py.java)
    at org.python.util.PythonInterpreter.exec(PythonInter preter.java)
    at com.ibm.bsf.engines.jython.JythonEngine$BSFPythonI nterpreter.exec(Unknown Source)
    at com.ibm.bsf.engines.jython.JythonEngine.exec(Unkno wn Source)
    at com.ibm.bsf.BSFManager$6.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Access Controller.java:241)
    at com.ibm.bsf.BSFManager.exec(Unknown Source)
    at com.ibm.ws.scripting.AbstractShell.executeScript(A bstractShell.java:991)
    at com.ibm.ws.scripting.AbstractShell.run(AbstractShe ll.java:1957)
    at com.ibm.ws.scripting.WasxShell.main(WasxShell.java :1022)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:64)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:615)
    at com.ibm.wsspi.bootstrap.WSLauncher.launchMain(WSLa uncher.java:183)
    at com.ibm.wsspi.bootstrap.WSLauncher.main(WSLauncher .java:90)
    at com.ibm.wsspi.bootstrap.WSLauncher.run(WSLauncher. java:72)
    at org.eclipse.core.internal.runtime.PlatformActivato r$1.run(PlatformActivator.java:78)
    at org.eclipse.core.runtime.internal.adaptor.EclipseA ppLauncher.runApplication(EclipseAppLauncher.java: 92)
    at org.eclipse.core.runtime.internal.adaptor.EclipseA ppLauncher.start(EclipseAppLauncher.java:68)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.ru n(EclipseStarter.java:400)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.ru n(EclipseStarter.java:177)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:64)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:615)
    at org.eclipse.core.launcher.Main.invokeFramework(Mai n.java:336)
    at org.eclipse.core.launcher.Main.basicRun(Main.java: 280)
    at org.eclipse.core.launcher.Main.run(Main.java:977)
    at com.ibm.wsspi.bootstrap.WSPreLauncher.launchEclips e(WSPreLauncher.java:336)
    at com.ibm.wsspi.bootstrap.WSPreLauncher.main(WSPreLa uncher.java:91)
    Caused by: java.lang.NullPointerException
    at com.ibm.ws.management.commands.jca.RAHelper.create ConnectionFactory(RAHelper.java:151)
    at com.ibm.ws.management.configservice.J2CConnectionF actoryDelegator.createConfigObject(J2CConnectionFa ctoryDelegator.java:53)
    at com.ibm.ws.management.configservice.ConfigObjectDe legator.createConfigData(ConfigObjectDelegator.jav a:150)
    at com.ibm.ws.management.configservice.ConfigServiceI mpl.createConfigDataByTemplate(ConfigServiceImpl.j ava:872)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:79)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:618)
    at sun.reflect.misc.Trampoline.invoke(MethodUtil.java :62)
    at sun.reflect.GeneratedMethodAccessor22.invoke(Unkno wn Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:618)
    at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java :265)
    at javax.management.modelmbean.RequiredModelMBean.inv okeMethod(RequiredModelMBean.java:1092)
    at javax.management.modelmbean.RequiredModelMBean.inv oke(RequiredModelMBean.java:973)
    at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke (DynamicMetaDataImpl.java:231)
    at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDa taImpl.java:238)
    at com.sun.jmx.interceptor.DefaultMBeanServerIntercep tor.invoke(DefaultMBeanServerInterceptor.java:833)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxM BeanServer.java:802)
    at com.ibm.ws.management.AdminServiceImpl$1.run(Admin ServiceImpl.java:1082)
    at com.ibm.ws.security.util.AccessController.doPrivil eged(AccessController.java:118)
    at com.ibm.ws.management.AdminServiceImpl.invoke(Admi nServiceImpl.java:975)
    at com.ibm.ws.management.connector.AdminServiceDelega tor.invoke(AdminServiceDelegator.java:139)
    at sun.reflect.GeneratedMethodAccessor23.invoke(Unkno wn Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:618)
    at com.ibm.ws.management.connector.soap.SOAPConnector .invoke(SOAPConnector.java:351)
    at com.ibm.ws.management.connector.soap.SOAPConnector .service(SOAPConnector.java:205)
    at com.ibm.ws.management.connector.soap.SOAPConnectio n.handleRequest(SOAPConnection.java:55)
    at com.ibm.ws.http.HttpConnection.readAndHandleReques t(HttpConnection.java:680)
    at com.ibm.ws.http.HttpConnection.run(HttpConnection. java:484)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.j ava:1473)

    [10/22/08 16:20:32:013 EDT] 0000000a AbstractShell A WASX7093I: Issuing message: "WASX7017E: Exception received while running file "D:\WebSphere\AppServer\bin\CreatePASARM.py"; exception information: com.ibm.websphere.management.exception.ConfigServi ceException
    java.lang.NullPointerException: java.lang.NullPointerException


    Thanks in advance

  2. Re: Trouble configuring J2C Resource Adapters

    some code didnt come up:

    newra2 = AdminConfig.create('J2CResourceAdapter', server2,
    [["name", "ECIResourceAdapter"], ["archivePath", "${CONNECTOR_INSTALL_ROOT}/ECIResourceAdapter.rar"]])

+ Reply to Thread