Running wlst command in embeded mode results in error for deleteMetadata()

I need to use wlst command deleteMetadata() in embeded mode.
I had followed instruction at http://download.oracle.com/docs/cd/E12840_01/wls/docs103/config_scripting/using_WLST.html, to import the wlst interpreter,
The command I use is:
deleteMetadata(application='SetupApp', server='FunctionalSetupServer_1', docs='/META-INF/**/adf-config.xml.xml', restrictCustTo='%')
This command works fine in wlst interactive mode, but when I put it in java, it errors out with the following. Looks like the:
Caused by: Traceback (innermost last):
File "<string>", line 2, in ?
NameError: deleteMetadata
at org.python.core.Py.NameError(Unknown Source)
at org.python.core.PyFrame.getglobal(Unknown Source)
at org.python.core.PyFrame.getname(Unknown Source)
at org.python.pycode._pyx11.f$0(<string>:2)
at org.python.pycode._pyx11.call_function(<string>)
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyCode.call(Unknown Source)
at org.python.core.Py.runCode(Unknown Source)
at org.python.core.Py.exec(Unknown Source)
at org.python.util.PythonInterpreter.exec(Unknown Source)
at weblogic.management.scripting.utils.WLSTInterpreter.exec(WLSTInterpreter.java:509)
at oracle.as.install.famigratet2p.cli.cmd.CleanupAdfConfigXml.connect(CleanupAdfConfigXml.java:130)
at oracle.as.install.famigratet2p.cli.cmd.CleanupAdfConfigXml.executeCmd(CleanupAdfConfigXml.java:77)
at oracle.apps.fnd.provisioning.ovm.sdk.cli.FAOVMCLICmd.execute(FAOVMCLICmd.java:709)
... 2 more
My code looks like this:
import weblogic.management.scripting.utils.WLSTInterpreter;
import org.python.util.InteractiveInterpreter;
String conString = "connect('" + mTestAdminServerUserName + "','" +
mTestAdminServerPassword + "','" + mTestAdminServerConnectString + "')\n";
String delString="deleteMetadata(application='SetupApp',server='FunctionalSetupServer_1', docs='/META-INF/**/adf-config.xml.xml', restrictCustTo='%')\n";
interpreter.exec(conString+delString);
Connect() works fine, only failing at deleteMetadata. Is there another jar/library that I need to include?

Try excuting the command below before invoking MDS commands:
interpreter.execfile($MW_HOME/oracle_common/common/wlst/mdsWLSTCommands.py);
Thanks,
--Daniel                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • Calling custom wlst command in embedded mode

    Hi,
    Please give any idea how to call custom wlst command (Oracle Access Manager related wlst command) in embedded mode.
    can we call /Oracle_IAM/common/bin/wlst.sh using java weblogic.WLST ?
    thanks

    thanks for quick reply
    i have to write a script which will register a OAM agent and create OAM Server (OAM related WLST custom command), all command comes under Fusinn Middleware product and for executing that command we have to run the wlst.sh file from <Oracle_Common>/common/bin, here if i run help('oam') command it shows all oam related command but when i run the wlst using java weblogic.WLST then it does not show any oam command because this call wlst from /WL_Home/common/bin, so i want to call that custom oam related wlst command by using java weblogic.WLST so that i can call my .py script as java weblogic.WLST *.py or in java class using WLSTInterpreter.

  • WLST command line utility "storeUserConfig()"  is not working for 12c OHS

    Hi All,
    I am facing issue with WLST command line utility with "*storeUserConfig()*" command.
    I have installed Standalone OHS 12c (Not managed OHS with WLS), configure and start the Node Manager.
    I start the WLST command line utility from : <MW_HOME>/ohs/common/bin/wlst.sh
    I connect node manager with : nmConnect('weblogic', 'welcome1', nmType='plain', domainName='base_domain')
    wls:/offline> nmConnect('weblogic', 'welcome1', nmType='plain', domainName='base_domain')
    Connecting to Node Manager ...
    Successfully Connected to Node Manager.
    wls:/nm/base_domain> nmStart(serverName='ohs10', serverType='OHS')
    Starting server ohs10 ...
    Successfully started server ohs10 ...
    Now When I am running storeUserConfig(), it's giving me below error :
    wls:/nm/base_domain> storeUserConfig()
    Traceback (innermost last):
    File "<console>", line 1, in ?
    NameError: storeUserConfig
    I also try with storeUserConfig('/scratch/12cORC/security/myuserconfigfile.secure', '/scratch/12cORC/security/myuserkeyfile.secure') which also give same error.
    I am not able to recognize this error. What should I need to do to create the User config file ?
    Please suggest me the solution.
    I am referring this doc : http://docs.oracle.com/cd/E15586_01/web.1111/e13813/reference.htm#
    Thanks,
    Amit Nagar

    It's probably a little late for the original poster, but in case anybody else stumbles on this thread (like me today), I found a workable solution to this problem:
    For a Standalone HTTP Server there exists in $domain_home/bin a command startComponent.sh or (on Windows) startComponent.cmd. This accepts as parameter the ComponentName which will typically be ohs1 and as second parameter storeUserConfig. Documentation on this can be found here:
    http://docs.oracle.com/middleware/1212/webtier/HSADM/getstart.htm#CHDJGIII (scroll down to
    4.3.2.3 Starting Oracle HTTP Server Instances from the Command Line).
    startComponent.sh ohs1 storeUserConfig
    Unfortunately this doesn't tell you where you'll find the config and key-File. However, on a second invocation I found that - at least on windows where I tested this - they get written into c:\users\<username>\.wlst so I'd expect them in the home directory on unix. After copying the files to a more common location, I was able to reference them the usual way (formatted for better readability):
    wls:/offline> nmConnect(userConfigFile='C:/app/Middleware/Oracle_Home/user_projects/domains/base_domain/nodemanager/security/nm-cfg-base_domain.props',
    userKeyFile='C:/app/Middleware/Oracle_Home/user_projects/domains/base_domain/nodemanager/security/nm-key-base_domain.props',
    host='localhost',
    port='5556',
    domainName='base_domain')
    Connecting to Node Manager ...
    Successfully Connected to Node Manager.
    Best Regards
    Holger

  • My code not give me result and error for move to next record please see

    hi master
    sir i import this file also
    import javax.faces.event.ValueChangeEvent;
    then my error remove
    i am use this code in button event
    getMfatableDataProvider().cursorNext();
    form1.discardSubmittedValues("virtualForm1");
    and my textField is bounded with data provider table field
    please give me idea how i show next rocord in page when user press button
    thank's
    aamir

    thank for reply
    sir your help very usefull for my but when i press F10 then system show massage do you want to save change the record
    sir how i avoid that window and directly move to next record
    please give me idea
    thanking you
    aamir

  • Exception in connect using WLST in Embedded Mode

    If I try to run the example for WLST in embedded mode, I get an exception during the connect:
    Connecting to t3://localhost:7001 with userid weblogic ...
    Successfully connected to Admin Server 'AdminServer' that belongs to domain 'TestDomain'.
    Warning: An insecure protocol was used to connect to the
    server. To ensure on-the-wire security, the SSL port or
    Admin port should be used instead.
    Exception in thread "main" Traceback (innermost last):
      File "<string>", line 1, in ?
      File "<iostream>", line 22, in connect
    WLSTException: 'Error occured while performing connect : Error connecting to the server Use dumpStack() to view the full stacktrace'The server in question is running, and the connect command from an interactive interpreter (from the commandline) works fine. I added a call to dumpStack() in a try-catch and got:
    This Exception occurred at Fri Sep 21 15:16:48 CEST 2007.
    java.lang.NullPointerException
         at com.sun.corba.se.impl.io.ValueHandlerImpl.writeReplace(ValueHandlerImpl.java:452)
         at com.sun.corba.se.impl.encoding.CDROutputStream_1_0.writeRMIIIOPValueType(CDROutputStream_1_0.java:761)
         at com.sun.corba.se.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:850)
         at com.sun.corba.se.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:864)
         at com.sun.corba.se.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:659)
         at com.sun.corba.se.impl.encoding.CDROutputStream.write_value(CDROutputStream.java:232)
         at weblogic.management._RemoteMBeanServer_Stub.addNotificationListener(Unknown Source)
         at weblogic.management.scripting.WLSTHelper.addChangeListener(WLSTHelper.java:327)
         at weblogic.management.scripting.WLSTHelper.initConnections(WLSTHelper.java:315)
         at weblogic.management.scripting.WLSTHelper.connect(WLSTHelper.java:201)
         at weblogic.management.scripting.WLScriptContext.connect(WLScriptContext.java:60)
         at weblogic.management.scripting.utils.WLSTUtil.initializeOnlineWLST(WLSTUtil.java:121)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:160)
         at org.python.core.PyMethod.__call__(PyMethod.java:96)
         at org.python.core.PyObject.__call__(PyObject.java:248)
         at org.python.core.PyObject.invoke(PyObject.java:2016)
         at org.python.pycode._pyx6.connect$1(<iostream>:16)
         at org.python.pycode._pyx6.call_function(<iostream>)
         at org.python.core.PyTableCode.call(PyTableCode.java:208)
         at org.python.core.PyTableCode.call(PyTableCode.java:404)
         at org.python.core.PyTableCode.call(PyTableCode.java:274)
         at org.python.core.PyFunction.__call__(PyFunction.java:175)
         at org.python.pycode._pyx14.f$0(<string>:1)
         at org.python.pycode._pyx14.call_function(<string>)
         at org.python.core.PyTableCode.call(PyTableCode.java:208)
         at org.python.core.PyCode.call(PyCode.java:14)
         at org.python.core.Py.runCode(Py.java:1135)
         at org.python.core.Py.exec(Py.java:1157)
         at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:137)
         at weblogic.management.scripting.utils.WLSTInterpreter.exec(WLSTInterpreter.java:367)
         at com.lmco.jsf.alis.obphm.afrs.weblogic.WLSTTest.connect(WLSTTest.java:40)
         at com.lmco.jsf.alis.obphm.afrs.weblogic.WLSTTest.main(WLSTTest.java:81)What am I doing wrong?

    public static void main(String[] args) throws
    Exception{
    Very bad programming practice!Not for a simple test program where you aren't going to do anything useful. In this case, it's exactly the right thing - as soon as the test hits an error, it falls over and dumps a stack trace, which is what it exists to do.
    In general, tho, you're correct, "throws Exception" loosens your contract to the point of meaninglessness.
    G

  • WLST in embedded mode

    Hi,
    I am trying to implement wlst in embedded mode to automate few setup creations in weblogic administration server.I have added the required jars in class path and tried to run the code.But the WLSTInterprester failed to instantiate and threw below excpetion:
    Exception in thread "main" java.lang.NullPointerException
      at java.io.File.<init>(Unknown Source)
      at weblogic.management.utils.PDevHelper.getUpgradeLaunchLocation(PDevHelper.java:77)
      at weblogic.management.utils.PDevHelper.getPDevClassLoader(PDevHelper.java:36)
      at weblogic.management.scripting.utils.WLSTUtil.setupOffline(WLSTUtil.java:226)
      at weblogic.management.scripting.utils.WLSTInterpreter.<init>(WLSTInterpreter.java:134)
      at weblogic.management.scripting.utils.WLSTInterpreter.<init>(WLSTInterpreter.java:76)
      at com.ncr.main.EmbeddedWLST.<init>(EmbeddedWLST.java:11)
      at com.ncr.main.EmbeddedWLST.main(EmbeddedWLST.java:27)
    Please help me  in resolving this issue.
    Thanks in advance

    Think I've figured it out, you must define weblogic.home to point to an valid home. I was using JDeveloper 11.1.1.6 to extract the jars from, but for a quick test pointed to a 11.1.1.7 WLS home and it worked. This got me past the NullPointerException,  I just kept adding jars to fix the ClassDefNotFound exceptions till it ran clean; so this is the minimal set that ran my script
    This is my java command line (obviously broken down for readability).
    java -cp
    ./bin:
    ./lib:
    ./lib/jython.jar:
    ./lib/wlfullclient.jar:
    ./lib/com.oracle.cie.comdev_6.3.0.0.jar:
    ./lib/com.oracle.cie.config-wls_7.1.0.0.jar:
    ./lib/com.oracle.cie.config_7.1.0.0.jar:
    ./lib/com.bea.core.xml.xmlbeans_2.1.0.0_2-5-1.jar:
    ./lib/com.oracle.cie.config-wls-schema_10.3.4.0.jar:
    ./lib/com.oracle.cie.wizard_6.1.0.0.jar
    -Dprod.props.file=./lib/props.txt
    -Dbea.home=
    -Dweblogic.home=/Users/xxxxxx/Projects/WebLogicServer/
    com.testing.wlst.WLST
    This was the output
    Connecting to t3://el01cn06:7599 with userid weblogic ...
    Successfully connected to Admin Server 'AdminServer' that belongs to domain 'dev-web'.
    Warning: An insecure protocol was used to connect to the
    server. To ensure on-the-wire security, the SSL port or
    Admin port should be used instead.
    There are 10 server(s) in cluster: web-cluster
    States of the servers are
    el01cn06-web08---SHUTDOWN
    el01cn06-web09---SHUTDOWN
    el01cn06-web10---SHUTDOWN
    el01cn06-web01---RUNNING
    el01cn06-web02---SHUTDOWN
    el01cn06-web03---SHUTDOWN
    el01cn06-web04---SHUTDOWN
    el01cn06-web05---SHUTDOWN
    el01cn06-web06---SHUTDOWN
    el01cn06-web07---SHUTDOWN
    This is my embedded WLST class (hacked from an example I found via the Google Institute Of Technology)
    package com.testing.wlst;
    import java.util.*;
    import weblogic.management.scripting.utils.WLSTInterpreter;
    import org.python.util.InteractiveInterpreter;
    public class WLST
       static InteractiveInterpreter interpreter = new WLSTInterpreter();
       private static void connect()
          StringBuffer buffer = new StringBuffer();
          buffer.append("connect('weblogic','NoneOfYourBiz','t3://el01cn06:7599')");
          interpreter.exec(buffer.toString());
       private static void status()
          StringBuffer buffer = new StringBuffer();
          buffer.append("state('web-cluster','Cluster')");
          interpreter.exec(buffer.toString());
       public static void main(String[] args)
          connect();
          status();

  • WLST - Failing to run nmConnect() command / node manager becomes unreachabl

    Hello guys,
    I'm facing some issues to setup some configurations of one application that I've deployed on weblogic 10.3.3.0.
    One of the needed steps in order to configure this applications is open the WLST in offline mode an run 2 commands:
    */bea/mytrack/wlserver_10.3/common/bin/wlst.sh*
    Then I try to connect in the nodemanager:
    * wls:/offline> nmConnect('admin30800','weblogic_password',port='30801',domainName='track30800')*
    The following error returns:
    Connecting to Node Manager ...
    <Jul 13, 2011 2:23:45 PM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=thawte Primary Root CA - G3,OU=(c) 2008 thawte\, Inc. - For authorized use only,OU=Certification Services Division,O=thawte\, Inc.,C=US". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Jul 13, 2011 2:23:45 PM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=T-TeleSec GlobalRoot Class 3,OU=T-Systems Trust Center,O=T-Systems Enterprise Services GmbH,C=DE". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Jul 13, 2011 2:23:45 PM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=T-TeleSec GlobalRoot Class 2,OU=T-Systems Trust Center,O=T-Systems Enterprise Services GmbH,C=DE". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Jul 13, 2011 2:23:45 PM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=GlobalSign,O=GlobalSign,OU=GlobalSign Root CA - R3". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Jul 13, 2011 2:23:45 PM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "OU=Security Communication RootCA2,O=SECOM Trust Systems CO.\,LTD.,C=JP". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Jul 13, 2011 2:23:45 PM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=VeriSign Universal Root Certification Authority,OU=(c) 2008 VeriSign\, Inc. - For authorized use only,OU=VeriSign Trust Network,O=VeriSign\, Inc.,C=US". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Jul 13, 2011 2:23:45 PM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=KEYNECTIS ROOT CA,OU=ROOT,O=KEYNECTIS,C=FR". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Jul 13, 2011 2:23:45 PM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=GeoTrust Primary Certification Authority - G3,OU=(c) 2008 GeoTrust Inc. - For authorized use only,O=GeoTrust Inc.,C=US". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    Traceback (innermost last):
    File "<console>", line 1, in ?
    File "<iostream>", line 123, in nmConnect
    File "<iostream>", line 646, in raiseWLSTException
    WLSTException: Error occured while performing nmConnect : Cannot connect to Node Manager. : Access to domain 'track30800' for user 'admin30800' denied
    I did some research and found this thread here: http://kr.forums.oracle.com/forums/thread.jspa?threadID=788163
    that solves the initial problem, however after I performed the nmConnect and a storeUserConfig() command, I exit() from the WLST and restart the node manager with success, the node manager becomes unreachable.
    I used the WL adm console and access -> appdomain -> environments -> machines -> monitoring -> node manager status to check the unreachable status.
    Thanks in advance,
    Davinod

    Nice it worked!!
    However when I try to start the servers controlled by this node manager I got this error:
    -sh-3.2$ <Jul 14, 2011 8:43:42 AM> <WARNING> <Exception while starting server 'track30800-01'>
    java.io.FileNotFoundException: /u01/track30800/user_projects/domains/track30800/servers/track30800-01/data/nodemanager/boot.properties (Permission denied)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
    at weblogic.nodemanager.server.ServerManager.saveBootIdentity(ServerManager.java:495)
    at weblogic.nodemanager.server.ServerManager.saveStartupConfig(ServerManager.java:438)
    at weblogic.nodemanager.server.ServerManager.start(ServerManager.java:301)
    at weblogic.nodemanager.server.Handler.handleStart(Handler.java:567)
    at weblogic.nodemanager.server.Handler.handleCommand(Handler.java:118)
    at weblogic.nodemanager.server.Handler.run(Handler.java:70)
    at java.lang.Thread.run(Thread.java:619)
    Jul 14, 2011 8:43:42 AM weblogic.nodemanager.server.Handler handleStart
    WARNING: Exception while starting server 'track30800-01'
    java.io.FileNotFoundException: /u01/track30800/user_projects/domains/track30800/servers/track30800-01/data/nodemanager/boot.properties (Permission denied)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
    at weblogic.nodemanager.server.ServerManager.saveBootIdentity(ServerManager.java:495)
    at weblogic.nodemanager.server.ServerManager.saveStartupConfig(ServerManager.java:438)
    at weblogic.nodemanager.server.ServerManager.start(ServerManager.java:301)
    at weblogic.nodemanager.server.Handler.handleStart(Handler.java:567)
    at weblogic.nodemanager.server.Handler.handleCommand(Handler.java:118)
    at weblogic.nodemanager.server.Handler.run(Handler.java:70)
    at java.lang.Thread.run(Thread.java:619)
    <Jul 14, 2011 8:43:42 AM CDT> <Error> <NodeManager> <BEA-300048> <Unable to start the server track30800-01 : Exception while starting server 'track30800-01'>
    Edited: Should I change the chmod for 777 for this file in order to check that all users have write permission?
    -rw-r--r-- 1 root iluser 193 Jun 24 11:05 boot.properties
    Did I miss a step?
    Thanks,
    Davinod
    Edited by: davinod on Jul 14, 2011 6:58 AM

  • How can I use custom WLST commands for Oracle SOA Suite in Weblogic

    Hi There,
    I'm trying to view and search the weblogic log files using WLST on a Solaris/Unix system.
    I have come across this "custom WLST commands for Oracle SOA Suite" and thought of using the custom logging commands to get my task done.
    However, my WLST shell is not recognizing the commands and giving me the NameError!
    wls:/devDomain1/domainRuntime> listLogs()
    Traceback (innermost last):
    File "<console>", line 1, in ?
    NameError: listLogs
    I tried the commands listLogs, displayLogs, getLogLevel & setLogLevel but in vain!
    I have followed the instructions as per the oracle recommendation of using Custom WLST commands (http://docs.oracle.com/cd/E29597_01/core.1111/e10105/getstart.htm#ASADM10692) as below
    - Launched the WLST shell from Oracle Home.
    cd ORACLE_HOME/common/bin
    ./wlst.sh
    - Tried to run the listLogs command from domainRuntime()
    I would like to know if I need to import any additional libraries to run the custom WLST commands for Oracle SOA Suite in my WLST shell?
    I have only weblogic 10.3.1 server installed on my Solaris 10 machine on which I have deployed the OSB application software.
    There is no SOA Suite installed.
    Or is there any other way I can browse the Server Log file and get the list of log messages? Basically I would like to use this feature in my script to customize it according to my requirement of listing specific error logs which I can work it out if I know how to make these commands work.
    Please advise if this is possible and how?
    Cheers.
    Satish

    I have tried on my OSB installation (no SOA Suite here), the command listLogs() works (I was in online mode, after a connect), and the classpath is:
    CLASSPATH=/opt/oracle/fmw11_1_1_5/patch_wls1035/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/opt/oracle/fw11_1_1_5/patch_ocp360/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/usr/lib/jvm/java-1.6.0-sun-1.6.0.33.x6_64/lib/tools.jar:/opt/oracle/fmw11_1_1_5/wlserver_10.3/server/lib/weblogic_sp.jar:/opt/oracle/fmw11_1_1_5/wlserver_10./server/lib/weblogic.jar:/opt/oracle/fmw11_1_1_5/modules/features/weblogic.server.modules_10.3.5.0.jar:/opt/oracle/fmw111_1_5/wlserver_10.3/server/lib/webservices.jar:/opt/oracle/fmw11_1_1_5/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/optoracle/fmw11_1_1_5/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar::/opt/oracle/fmw11_1_1_5/oracle_common/moules/oracle.jrf_11.1.1/jrf-wlstman.jar:/opt/oracle/fmw11_1_1_5/oracle_common/common/wlst/lib/adfscripting.jar:/opt/oracl/fmw11_1_1_5/oracle_common/common/wlst/lib/adf-share-mbeans-wlst.jar:/opt/oracle/fmw11_1_1_5/oracle_common/common/wlst/lb/mdswlst.jar:/opt/oracle/fmw11_1_1_5/oracle_common/common/wlst/resources/auditwlst.jar:/opt/oracle/fmw11_1_1_5/oracle_cmmon/common/wlst/resources/igfwlsthelp.jar:/opt/oracle/fmw11_1_1_5/oracle_common/common/wlst/resources/jps-wlst.jar:/optoracle/fmw11_1_1_5/oracle_common/common/wlst/resources/jrf-wlst.jar:/opt/oracle/fmw11_1_1_5/oracle_common/common/wlst/reources/oamap_help.jar:/opt/oracle/fmw11_1_1_5/oracle_common/common/wlst/resources/oamAuthnProvider.jar:/opt/oracle/fmw111_1_5/oracle_common/common/wlst/resources/ossoiap_help.jar:/opt/oracle/fmw11_1_1_5/oracle_common/common/wlst/resources/osoiap.jar:/opt/oracle/fmw11_1_1_5/oracle_common/common/wlst/resources/ovdwlsthelp.jar:/opt/oracle/fmw11_1_1_5/oracle_comon/common/wlst/resources/sslconfigwlst.jar:/opt/oracle/fmw11_1_1_5/oracle_common/common/wlst/resources/wsm-wlst.jar:/optoracle/fmw11_1_1_5/utils/config/10.3/config-launch.jar::/opt/oracle/fmw11_1_1_5/wlserver_10.3/common/derby/lib/derbynet.ar:/opt/oracle/fmw11_1_1_5/wlserver_10.3/common/derby/lib/derbyclient.jar:/opt/oracle/fmw11_1_1_5/wlserver_10.3/common/drby/lib/derbytools.jar::
    The wlst.sh I have used is /opt/oracle/fmw11_1_1_5/osb/common/bin/wlst.sh
    I hope this can help

  • Issue while starting AdminSerever using wlst commands

    Hi, I am facing issue while trying to start the AdminServer and Managed Server via nodemanager using wlst commands. I have installelled WebLogic 11g on windows 2008 R2. Mentioned below are the steps that I followed:
    1) In Nodemanager.properties files I set following parameters to true. I did this, so that nodemanager can start the server in case of crash.
    CrashRecoveryEnabled=true
    StartScriptEnabled=true
    2) started nodemanager and then started AdminServer from the command prompt as follows:
    nmConnect('weblogic','password','10.23.226.58','5556','IMDomain','E:\Oracle\Middleware\user_projects\domains\IMDomain','ssl')
    nmStart('AdminServer')
    I dont see any errors but it seems the AdminServer do Not start properly as in the cmd window I don't see any 'started successfully' message - the message remains as *"Starting AdminServer..."*
    However in the adminServer logs I see that the status is Running (refer logs at the end) and I can also see it as Running in weblogic console.
    I really didnt care if its not giving a success message in cmd window but the problem occurs when I start the managedServer. After starting the managed server in about 10 minutes, there is a stuck thread. (I guess it is 10 mins because Stuck Thread MaxTime value is 600).
    If I set StartScriptEnabled=false, and start by directly running the startweblogic.cmd then it works fine.
    I am struggling with this for last 1 week, appreciate any help.
    LOGS.......
    Starting WLS with line:
    E:\PROGRA~1\Java\JDK16~1.0_2\bin\java -client -Xms256m -Xmx1024m -XX:CompileThreshold=8000 -XX:PermSize=128m -XX:MaxPermSize=256m -Dweblogic.Name=AdminServer -Djava.security.policy=E:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.policy -Djavax.xml.stream.XMLInputFactory=weblogic.xml.stax.XMLStreamInputFactory -Dweblogic.security.SSL.nojce=true -Xverify:none -da -Dplatform.home=E:\Oracle\MIDDLE~1\WLSERV~1.3 -Dwls.home=E:\Oracle\MIDDLE~1\WLSERV~1.3\server -Dwli.home=E:\Oracle\MIDDLE~1\WLSERV~1.3\integration -Dweblogic.home=E:\Oracle\MIDDLE~1\WLSERV~1.3\server -Dweblogic.management.discover=true -Dwlw.iterativeDev=false -Dwlw.testConsole=false -Dwlw.logErrorsToConsole=false -Dweblogic.ext.dirs=E:\Oracle\MIDDLE~1\patch_wls1035\profiles\default\sysext_manifest_classpath;E:\Oracle\MIDDLE~1\patch_ocp360\profiles\default\sysext_manifest_classpath weblogic.Server
    <Mar 14, 2012 3:16:30 PM CDT> <Info> <Security> <BEA-090905> <Disabling CryptoJ JCE Provider self-integrity check for better startup performance. To enable this check, specify -Dweblogic.security.allowCryptoJDefaultJCEVerification=true>
    <Mar 14, 2012 3:16:30 PM CDT> <Info> <Security> <BEA-090906> <Changing the default Random Number Generator in RSA CryptoJ from ECDRBG to FIPS186PRNG. To disable this change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true>
    <Mar 14, 2012 3:16:30 PM CDT> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) 64-Bit Server VM Version 20.2-b06 from Sun Microsystems Inc.>
    <Mar 14, 2012 3:16:31 PM CDT> <Info> <Management> <BEA-141107> <Version: WebLogic Server 10.3.5.0 Fri Apr 1 20:20:06 PDT 2011 1398638 >
    <Mar 14, 2012 3:16:32 PM CDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
    <Mar 14, 2012 3:16:32 PM CDT> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool>
    <Mar 14, 2012 3:16:32 PM CDT> <Notice> <Log Management> <BEA-170019> <The server log file E:\Oracle\Middleware\user_projects\domains\IMDomain\servers\AdminServer\logs\AdminServer.log is opened. All server side log events will be written to this file.>
    <Mar 14, 2012 3:16:36 PM CDT> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.>
    <Mar 14, 2012 3:16:37 PM CDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY>
    <Mar 14, 2012 3:16:37 PM CDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
    Mar 14, 2012 3:16:39 PM com.sun.faces.config.ConfigureListener contextInitialized
    INFO: Initializing Sun's JavaServer Faces implementation (1.2_03-b04-FCS) for context '/console'
    Mar 14, 2012 3:16:39 PM com.sun.faces.config.ConfigureListener contextInitialized
    INFO: Completed initializing Sun's JavaServer Faces implementation (1.2_03-b04-FCS) for context '/console'
    <Mar 14, 2012 3:16:40 PM CDT> <Notice> <Log Management> <BEA-170027> <The Server has established connection with the Domain level Diagnostic Service successfully.>
    <Mar 14, 2012 3:16:40 PM CDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to ADMIN>
    <Mar 14, 2012 3:16:40 PM CDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RESUMING>
    <Mar 14, 2012 3:16:40 PM CDT> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 10.227.211.13:8001 for protocols iiop, t3, ldap, snmp, http.>
    <Mar 14, 2012 3:16:40 PM CDT> <Notice> <WebLogicServer> <BEA-000329> <Started WebLogic Admin Server "AdminServer" for domain "IMDomain" running in Production Mode>
    <Mar 14, 2012 3:16:40 PM CDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING>
    <Mar 14, 2012 3:16:40 PM CDT> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>
    <Mar 14, 2012 3:20:53 PM CDT> <Notice> <Security> <BEA-090171> <Loading the identity certificate and private key stored under the alias DemoIdentity from the jks keystore file E:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\DemoIdentity.jks.>
    <Mar 14, 2012 3:20:53 PM CDT> <Notice> <Security> <BEA-090169> <Loading trusted certificates from the jks keystore file E:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\DemoTrust.jks.>
    <Mar 14, 2012 3:20:53 PM CDT> <Notice> <Security> <BEA-090169> <Loading trusted certificates from the jks keystore file E:\PROGRA~1\Java\JDK16~1.0_2\jre\lib\security\cacerts.>
    <Mar 14, 2012 3:20:53 PM CDT> <Alert> <Security> <BEA-090152> <Demo trusted CA certificate is being used in production mode: [
    Version: V3
    Subject: CN=CACERT, OU=FOR TESTING ONLY, O=MyOrganization, L=MyTown, ST=MyState, C=US
    Signature Algorithm: MD5withRSA, OID = 1.2.840.113549.1.1.4
    Key: Sun RSA public key, 512 bits
    modulus: 9550192877869244258838480703390456015046425375252278279190673063544122510925482179963329236052146047356415957587628011282484772458983977898996276815440753
    public exponent: 65537
    Validity: [From: Thu Mar 21 14:12:27 CST 2002,
                   To: Tue Mar 22 15:12:27 CDT 2022]
    Issuer: CN=CACERT, OU=FOR TESTING ONLY, O=MyOrganization, L=MyTown, ST=MyState, C=US
    SerialNumber: [    33f10648 fcde0deb 4199921f d64537f4]
    Certificate Extensions: 1
    [1]: ObjectId: 2.5.29.15 Criticality=true
    KeyUsage [
    Key_CertSign
    Algorithm: [MD5withRSA]
    Signature:
    0000: 9D 26 4C 29 C8 91 C3 A7 06 C3 24 6F AE B4 F8 82 .&L)......$o....
    0010: 80 4D AA CB 7C 79 46 84 81 C4 66 95 F4 1E D8 C4 .M...yF...f.....
    0020: E9 B7 D9 7C E2 23 33 A4 B7 21 E0 AA 54 2B 4A FF .....#3..!..T+J.
    0030: CB 21 20 88 81 21 DB AC 90 54 D8 7D 79 63 23 3C .! ..!...T..yc#<
    ] The system is vulnerable to security attacks, since it trusts certificates signed by the demo trusted CA.>
    <Mar 14, 2012 3:20:53 PM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=Entrust Root Certification Authority - G2,OU=(c) 2009 Entrust\, Inc. - for authorized use only,OU=See www.entrust.net/legal-terms,O=Entrust\, Inc.,C=US". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Mar 14, 2012 3:20:53 PM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=thawte Primary Root CA - G3,OU=(c) 2008 thawte\, Inc. - For authorized use only,OU=Certification Services Division,O=thawte\, Inc.,C=US". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Mar 14, 2012 3:20:53 PM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=T-TeleSec GlobalRoot Class 3,OU=T-Systems Trust Center,O=T-Systems Enterprise Services GmbH,C=DE". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Mar 14, 2012 3:20:53 PM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=T-TeleSec GlobalRoot Class 2,OU=T-Systems Trust Center,O=T-Systems Enterprise Services GmbH,C=DE". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Mar 14, 2012 3:20:53 PM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=GlobalSign,O=GlobalSign,OU=GlobalSign Root CA - R3". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Mar 14, 2012 3:20:53 PM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "OU=Security Communication RootCA2,O=SECOM Trust Systems CO.\,LTD.,C=JP". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Mar 14, 2012 3:20:53 PM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=VeriSign Universal Root Certification Authority,OU=(c) 2008 VeriSign\, Inc. - For authorized use only,OU=VeriSign Trust Network,O=VeriSign\, Inc.,C=US". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Mar 14, 2012 3:20:53 PM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=KEYNECTIS ROOT CA,OU=ROOT,O=KEYNECTIS,C=FR". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Mar 14, 2012 3:20:53 PM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=GeoTrust Primary Certification Authority - G3,OU=(c) 2008 GeoTrust Inc. - For authorized use only,O=GeoTrust Inc.,C=US". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Mar 15, 2012 11:41:41 AM CDT> <Error> <WebLogicServer> <BEA-000337> <[STUCK] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)' has been busy for "650" seconds working on the request "weblogic.kernel.WorkManagerWrapper$1@68a3f7ed", which is more than the configured time (StuckThreadMaxTime) of "600" seconds. Stack trace:
    java.net.SocketInputStream.socketRead0(Native Method)
    java.net.SocketInputStream.read(SocketInputStream.java:129)
    weblogic.utils.io.ChunkedInputStream.read(ChunkedInputStream.java:159)
    java.io.InputStream.read(InputStream.java:85)
    com.certicom.tls.record.ReadHandler.readFragment(Unknown Source)
    com.certicom.tls.record.ReadHandler.readRecord(Unknown Source)
    com.certicom.tls.record.ReadHandler.read(Unknown Source)
    com.certicom.io.InputSSLIOStreamWrapper.read(Unknown Source)
    sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)
    sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)
    sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)
    java.io.InputStreamReader.read(InputStreamReader.java:167)
    java.io.BufferedReader.fill(BufferedReader.java:136)
    java.io.BufferedReader.readLine(BufferedReader.java:299)
    java.io.BufferedReader.readLine(BufferedReader.java:362)
    weblogic.nodemanager.client.NMServerClient.checkResponse(NMServerClient.java:289)
    weblogic.nodemanager.client.NMServerClient.checkResponse(NMServerClient.java:314)
    weblogic.nodemanager.client.NMServerClient.start(NMServerClient.java:102)
    weblogic.nodemanager.mbean.StartRequest.start(StartRequest.java:75)
    weblogic.nodemanager.mbean.StartRequest.execute(StartRequest.java:47)
    weblogic.kernel.WorkManagerWrapper$1.run(WorkManagerWrapper.java:63)
    weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    >
    <Mar 15, 2012 11:42:41 AM CDT> <Error> <WebLogicServer> <BEA-000337> <[STUCK] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)' has been busy for "710" seconds working on the request "weblogic.kernel.WorkManagerWrapper$1@68a3f7ed", which is more than the configured time (StuckThreadMaxTime) of "600" seconds. Stack trace:
    java.net.SocketInputStream.socketRead0(Native Method)
    java.net.SocketInputStream.read(SocketInputStream.java:129)
    weblogic.utils.io.ChunkedInputStream.read(ChunkedInputStream.java:159)
    java.io.InputStream.read(InputStream.java:85)
    com.certicom.tls.record.ReadHandler.readFragment(Unknown Source)
    com.certicom.tls.record.ReadHandler.readRecord(Unknown Source)
    com.certicom.tls.record.ReadHandler.read(Unknown Source)
    com.certicom.io.InputSSLIOStreamWrapper.read(Unknown Source)
    sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)
    sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)
    sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)
    java.io.InputStreamReader.read(InputStreamReader.java:167)
    java.io.BufferedReader.fill(BufferedReader.java:136)
    java.io.BufferedReader.readLine(BufferedReader.java:299)
    java.io.BufferedReader.readLine(BufferedReader.java:362)
    weblogic.nodemanager.client.NMServerClient.checkResponse(NMServerClient.java:289)
    weblogic.nodemanager.client.NMServerClient.checkResponse(NMServerClient.java:314)
    weblogic.nodemanager.client.NMServerClient.start(NMServerClient.java:102)
    weblogic.nodemanager.mbean.StartRequest.start(StartRequest.java:75)
    weblogic.nodemanager.mbean.StartRequest.execute(StartRequest.java:47)
    weblogic.kernel.WorkManagerWrapper$1.run(WorkManagerWrapper.java:63)
    weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    >

    Hi chamila,
        I never tried the example. Exception is not clear. Could you please post more stack trace from log files.
    Thanks,
    Sham

  • How do I run Mavericks in 32 bit mode?

    I would like to run Mavericks in 32 bit mode. I have tried restaring and holding 3 and 2, maybe I am doing it wrong?? is there a way to check to make sure I have have done it correctley?
    Thanks

    I am not aware of Citrix doing a VPN server product although I have not gone out of my way to look for this and it maybe embedded into their solution for remotely running VMs or Virtual Desktops.
    However some general comments -
    Safari on a Mac is a 64-bit capable app
    Mavericks is a 64-bit only operating system but can run 32-bit applications as well as 64-bit applications
    Google Chrome is still only 32-bit and will only run as a 32-bit app even in Mavericks
    Java 1.7 on a Mac is 64-bit only and hence will not work in Google Chrome
    Apple do not support Java 1.6 which was 32-bit and 64-bit capable in web-browsers any more
    In general a 32-bit app can only use a 32-bit component, e.g. System Preferences needs to run in 32-bit mode to run a 32-bit preference-pane, and likewise a webrowser needs to run in 64-bit mode to run 64-bit only Java 1.7
    Many if not all SSL based VPN clients use Java (ugh!)
    Juniper (double ugh!) still only have a 32-bit version of their host-checker which will not work directly with Java 1.7, to get round this you have to run the web-browser based Java-applet version of the host-checker in Safari (remember Google Chrome does not support Java 1.7) the web-browser based version of the host-checker then uses the 64-bit Safari to execute and hence can use Java 1.7
    Running Java applets in a web-browser is the most insecure and risky approach going and the approach by far the most likely to result in a Mac (or PC) being infected by malware these days
    Because of the considerable security risks of running Java applets via a web-browser Apple periodically disable this function when new exploits are discovered in Java until Oracle comes out with a security fix, this can result in all your Mac users being unable to access your VPN system for several days
    It is not compulsory to use Juniper's host-checker but this is up to your corporate IT team, if they have made it compulsory at their end you have to run it, for those unaware it checks things like the fact you are running an approved and up-to-date anti-virus product, Cisco have a similar tool called Network Access Control agent
    To summarise if you are using a system which uses Java then it almost certainly needs to be a 64-bit compatible.

  • Running a command in a command line tool in fastest way

    Before anything I want to clarify some terms : 
    apk
    file (android application package file) : equivalent to executable (exe) files on windows
    aapt.exe
    : A command line tool which comes with android sdk in order to fetch information of an apk file (It obviously has other usages)
    note : This question is not about an android feature. It's all about C# and functionality of .Net framework 
    An
    apk file has a name just same as any other file, but it has a internal name (which will be shown when you install apk file on android os as name of application) 
    with
    aapt.exe I can get internal name of an apk using following command :  
    aapt
    d badging "<apk path>"
    I
    have copied aapt.exe where executable file of my c# application is and I want  :
    Enter
    above command for each apk in selected directory (using GetAllFiles method)
    I want to get internal names of apk files and
    I've tried a lot of ways and I've searched a lot. finally this is what I've got : 
    Process proc = new Process();
    proc.StartInfo.FileName = "cmd.exe";
    proc.StartInfo.RedirectStandardInput = true;
    proc.StartInfo.RedirectStandardOutput = true;
    proc.StartInfo.UseShellExecute = false;
    proc.StartInfo.StandardOutputEncoding = System.Text.Encoding.UTF8;
    proc.Start();
    using (StreamWriter sw = proc.StandardInput)
    foreach (string path in Directories.GetAllFiles(@"E:\apk", "apk"))
    sw.WriteLine("aapt d badging " + "\"" + path + "\"");
    //following line doesn't work because sStandardInput is open
    Debug.WriteLine(proc.StandardOutput.ReadToEnd());
    // There will be a really huge amount of text (at least 20 line per sw.Writeline) and
    //it impacts performance so following line is not really what I'm looking for
    Debug.WriteLine(proc.StandardOutput.ReadToEnd());
    GetAllFiles is
    a function that I've created to fetch all apk file full path. It gets two argument. First argument is path and second one is extension of file you want its full path to be fetched.
    This is not final code.
    As I've commented it out first Debug.WriteLine doesn't
    work and second one is not a good idea. how should I get output from proc?
    I have tried running process by argument and its awful :)
    As another approach :
    Because apk files are basically zip files I can extract them get what I want from them.
    There is an xml file named Androidmanifest.xml in every apk file.
    Androidmanifest.xml is like an ID card for an apk file and apk internal name can be found in it but here are some problems with this approach : 
    1. Androidmanifest.xml is not a plain text file. It's coded and it requires a lot of complexity to decode it
    2. application name (or apk internal name) is an attribute in this file and it's value is not a string value. It's a reference to a file where strings are stored and worst thing is it's not an easy to find out reference. It's just a number

    And you don't get any output from it? Maybe you're passing the arguments incorrectly?
    No. I don't get any result and I have checked arguments and it's correct.
    But you are already running a separate process for every apk file. You start a single cmd.exe and then send it commands that will cause aapt to be run for every file. Unless aapt accepts multiple apk filenames on the command line there's no way
    around using separate processes.
    I didn't know that. anyway speed in this way is much more rather than creating a function. creating a Process object in it and calling function for each apk file.
    I read somewhere that it's possible to run multiple commands in cmd by & operator but as you said I think every command runs aapt. I have tested this approach too and it's very very slow
    fastest approach I have found is what I have wrote here and speed is about  0.6 per apk file which is still slow when there is thousands of apk files.
    I tried an application that does same thing (fetching apk information) and in it's installation directory I found aapt.exe which means it uses this tool to get information but speed is significantly faster rather than my application.   
    So what's your suggestion about this? 

  • Running ls command from Java stroed procedure no output

    Hi ,
    I am trying to run ls command from java stored procedure in oracle
    Process p = Runtime.getRuntime().exec("ls");
    BufferedReader stdInput = new BufferedReader(new
    InputStreamReader(p.getInputStream()));
    BufferedReader stdError = new BufferedReader(new
    InputStreamReader(p.getErrorStream()));
    // read the output from the command
    System.out.println("output of the command run:\n");
    while ((s = stdInput.readLine()) != null) {
    System.out.println(s);
    from java stored procedure in oracle.
    i get output of println statments but it does not go into while loop to print from stdInput.
    Result of running Java stored procedure is -
    output of the command run:
    Call completed.
    when i run the program on client side it works fine.
    Has anybody tried this from java stroed procedure.
    Thanks,
    Jag

    Jag,
    Actually, the question of whether it works for me seems to depend on the version of the OS (or Oracle). On RedHat Linux (Oracle 8.1.6) it didn't work at all, but on Solaris (Oracle 9.0.2) it did. Here's the output from that run:
    SQL> /
    output of the command run:
    init.ora
    initDBPart9i.DBPSun01.ora
    initdw.ora
    lkDBPART9I
    orapw
    orapwDBPart9i
    spfileDBPart9i.ora
    Done
    PL/SQL procedure successfully completed.
    But, I did need to change a line of your code to this:
    Process p = Runtime.getRuntime().exec("/usr/bin/ls");
    your original was:
    Process p = Runtime.getRuntime().exec("ls");
    You might consider, if possible, use of some of the Java File classes instead of ls, as this might make things more predictable for you. There were some examples in oramag.com a few months ago, but they were pretty simple (you might not need them).
    Hope this helps,
    -Dan
    http://www.compuware.com/products/devpartner/db/oracle_debug.htm
    Debug PL/SQL and Java in the Oracle Database

  • Running ssh command in a java application

    Hi there!
    I am trying to run a ssh command from a java application cause I need to store the result.
    Actually I can run this command in the cygwin shell so I need to open the shell and run the command, all trough java.
    so, what my process needs to do is:
    1) open the cmd
    2) run C:\cygwin\cygwin.bat
    3) execute the ssh command
    ssh -l fip-user ipdb fip 42704) print the result of the ssh command.
    Note that the cygwin opens in the same command line window and so will print it's result to the same process inputstream
    Message was edited by:
    RBervini

    Use "Runtime.getRuntime().exec()" to execute the SSH program,
    and you can then get the output of the SSH program
    via the getInputStream() method on the returned Process object.
    Note: there are many pitfalls with this. In particular, most people don't know
    they should create separate threads to drain the input/output pipes.
    See this excellent classic article http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
    on how to do it right.

  • Enabling Commenting Tools in embedded mode

    We have own plug-in which provides collaboration capabilities for reviewing documents introducing custom annotations with categorization based on standard Acrobat annotation feature. However Commenting tool is not available in post 6 Acrobat versions when Acrobat runs in embedded mode. I suspect that Adobe suppressed the feature to avoid competition from similar to our solutions. Adobe also discontinued earlier Acrobat versions so our big customers have quite serious problem now, because they can't buy newer Acrobat . . So I am interested if somebody from Adobe senior level engineering or sales reads the forum and can contact me to resolve the issue. Again if some developers know how to enable Commenting tool from plug-in when Acrobat is running embedded, then please share your experience.

    I'm not certain drog is going to get what he want here. It sounds like he doesn't want to write a plugin to create Adobe annotations, but rather his plugin is capturing annotation information when the Adobe tools place and/or modify annotations.
    That's not going to work in a browser unless Adobe changes what's allowed in the browser. If I'm not mistaken, Adobe tools will not create or modify annotations when the PDF is viewed in a browser. The user can always save the file to disk and open it directly with Acrobat (or Reader if it's comment enabled) to get access to the Adobe commenting tools.
    Perhaps that's what drog should do - have his plugin give instructions to the user to save to disk and open directly with Acrobat/Reader. It's fairly simple to recognize when the PDF is viewed in a browser. If this approach is not acceptable to his workflow, then drog is going to have to re-invent the wheel and write a custom annotation handler to add/modify annotations.
    Hope this helps

  • Running a Command Line via a Package

    Hi,
    I am trying to deploy the following command line via a package to my servers but for some reason the results are as expected. The command I am trying to run is:
    reg add "hklm\software\microsoft\windows nt\currentversion\softwareprotectionplatform" /f /v "KeyManagementServiceName" /t reg_sz /d "dc4hmancmddc1.mydomain.local"
    When I look in the log files on the server the command is being executed as:
    <![LOG[Command line = "C:\Windows\system32\reg.exe" add "hklm\software\microsoft\windows nt\currentversion\softwareprotectionplatform" /f /v "KeyManagementServiceName" /t reg_sz /d "dc4hmancmddc1.mydomain.local",
    Working Directory = C:\Windows\system32\]LOG]!><time="12:44:32.391+00" date="02-24-2014" component="execmgr" context="" type="1" thread="3976" file="scriptexecution.cpp:346">
    Why is this is not working? If I run the command manually on the server, it works and reg key is updated correctly.
    PS: I am probably being really stupid here but any help is appreciated.
    Thank You
    Mayur

    Hi,
    Just looking at the logs file, I see this:
    <![LOG[Running "C:\Windows\system32\cmd.exe" /c "C:\windows\system32\reg.exe add "hklm\software\microsoft\windows nt\currentversion\softwareprotectionplatform" /f /v "KeyManagementServiceName" /t reg_sz /d "dc4hmancmddc1.osmanage.local" with 32bitLauncher]LOG]!><time="13:06:32.677+00"
    date="02-24-2014" component="execmgr" context="" type="1" thread="4024" file="scriptexecution.cpp:364">
    It is launching it with 32bit launcher. So is this still a problem with 64bit redirection?
    The thing is before trying this reg fix I tried several times to run command: slmgr.vbs /skms servername.local via  a packag which executed successfully but again the KMS server wasn't updated. So something tells me this is a different problem?

Maybe you are looking for