Systemexe.vi

I am using system exe to run a batch file but just wondering how my labview program knows that all the command in the batch file is finished? I want the batch file to end before I do somethings else.
thanks

Also, if an executable, which returns a value, is called by SysExec.vi, the value can be passed to the LV vi.  THis is especially useful to find out the status of the executable. Or to select an appropriate error message.

Similar Messages

  • Unable to start EBS DB after the Server Crash. Error in installing the Required RPM.

    Hi , Hussein ( As most of the Time It is Only you here who comes to the rescue or give Usefull inputs. I am sorry if i mistaken, no Pan intended for Other Experts)
    I 've also posted this issue here but got no response. https://forums.oracle.com/thread/2590497 
    Badly require your inputs and suggestions on the Following Issue. , Really Appreciate the suggestions.
    I need to Install the sabayon-apply rpm which could fix the issue after the Server Crash but unable to install it.
       Please see the Brief of the Issue.
    I got stuck up in installing the rpm after the server(Red Hat Enterprise Linux Server release 6.0 (Santiago) x86_64 GNU/Linux) got
    crashed Eventhough I am able to start it in Xwindows but not able to run or start EBS database along with many other programmes. Also The
    VirtualBox machine installed on it 've No issue, they work fine  But the host OS is not fine. as there are lots of
    errors in .xsession-errors. which i 've pasted below.  And Unable to Install the sabayon-apply rpm that could have fix the Issue.
    I would highly Appreciate if anyone could drop few hints and suggestions on this Issue as this is really Urgently Important for me.
    Please see the following Brief of the Issue.
      after starting the server in Xwindows I was installing the rpms from RHEL6/Packages directory on the server even installed 10-12 rpms
      While installing the rpm i 've inadvertantly issued or run  this command
      rpm -ivh *.rpm --force --nodeps  as it ended up with Errors Header V3 RSA/SHA256 Signature, key ID fd431d51: BAD
        After That I could Not Install any rpm with yum or rpm command as getting the Same Errors. 
    while trying to install individual rpm am getting the followig Errors
    [root@ebs Packages]# rpm -ivh libX11*
    error: libX11-1.3-2.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: BAD
    error: libX11-1.3-2.el6.i686.rpm cannot be installed
    [root@ebs Packages]# rpm --checksig gtk2*
    gtk2-2.18.9-4.el6.i686.rpm: RSA SHA1 (MD5) PGP MD5 NOT OK
    gtk2-2.18.9-4.el6.x86_64.rpm: RSA SHA1 (MD5) PGP MD5 NOT OK
    gtk2-devel-2.18.9-4.el6.i686.rpm: RSA SHA1 (MD5) PGP MD5 NOT OK
    gtk2-devel-2.18.9-4.el6.x86_64.rpm: RSA SHA1 (MD5) PGP MD5 NOT OK
    gtk2-devel-docs-2.18.9-4.el6.x86_64.rpm: RSA SHA1 (MD5) PGP MD5 NOT OK
    gtk2-engines-2.18.4-5.el6.i686.rpm: RSA SHA1 (MD5) PGP MD5 NOT OK
    gtk2-engines-2.18.4-5.el6.x86_64.rpm: RSA SHA1 (MD5) PGP MD5 NOT OK
    gtk2-immodule-xim-2.18.9-4.el6.x86_64.rpm: RSA SHA1 (MD5) PGP MD5 NOT OK
    For that I tried to import the RPM GPG Key But still faced the same errors
    [root@ebs yum.repos.d]# wget http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6 -O /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle Key fingerprint = 4214 4123 FECF
    C55B 9086  313D 72F9 7B74 EC55 1F03
    --2013-10-08 00:04:56--  http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
    Resolving public-yum.oracle.com... 202.159.216.177, 202.159.216.171
    Connecting to public-yum.oracle.com|202.159.216.177|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 1011 [text/plain]
    Saving to: “/etc/pki/rpm-gpg/RPM-GPG-KEY-oracle”
    FINISHED --2013-10-08 00:05:06--
    Downloaded: 6 files, 55K in 2.0s (27.7 KB/s)
    100%[===========================================================================================================================================================>]
    1,011 --.-K/s   in 0s
    2013-10-08 00:04:56 (155 MB/s) - “/etc/pki/rpm-gpg/RPM-GPG-KEY-oracle”
    saved [1011/1011]
       Than i run this command
    [root@ebs yum.repos.d]# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle  ----it Returns with no output
    [root@ebs yum.repos.d]#
    [root@ebs log]# rpm -q gpg-pubkey-ec551f03-4c2d256a
    gpg-pubkey-ec551f03-4c2d256a
    But still I can't install the rpms, got the same Errors. please see the following
    [root@ebs yum.repos.d]# yum install firefox*
    Loaded plugins: refresh-packagekit, rhnplugin
    This system is not registered with RHN.
    RHN support will be disabled.
    Setting up Install Process
    Downloading Packages:
    (1/2): firefox-17.0.9-1.0.1.el6_4.x86_64.rpm
      |  25 MB     03:42
    (2/2): xulrunner-17.0.9-1.0.1.el6_4.x86_64.rpm
      |  14 MB     02:03
    Total
    117 kB/s |  39 MB     05:46
    error: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID ec551f03: BAD
    Problem opening package xulrunner-17.0.9-1.0.1.el6_4.x86_64.rpm
    [root@ebs log]# rpm -qf `which gpg`
    error: rpmdbNextIterator: skipping h#     455 Header V3 RSA/SHA256
    Signature, key ID fd431d51: BAD
    [root@ebs log]# gpg --list-keys
    /root/.gnupg/pubring.gpg
    pub 1024D/11F63C51 2002-02-28
    uid Jamie Cameron <[email protected]>
    sub 1024g/1B24BE83 2002-02-28
    pub 2048D/671DF296 2013-10-08
    uid oracle
    sub 2048g/9FE459CE 2013-10-08
    pub 1024R/F3A5AC78 2013-10-08
    uid oracle (no comment) <[email protected]>
    sub 1024R/6DC65985 2013-10-08
    pub 1024R/78F6C944 2013-10-08
    uid root user (Example GPG Key Signature For RPM
    Packages) <[email protected]>
    sub 1024R/77C97AFF 2013-10-08
    [root@ebs log]# rpm -qi 'gpg-pubkey-*'
    Name : gpg-pubkey Relocations: (not relocatable)
    Version : ec551f03 Vendor: (none)
    Release : 4c2d256a Build Date: Wed 09 Oct
    2013 01:09:10 AM IST
    Install Date: Wed 09 Oct 2013 01:09:10 AM IST      Build Host: localhost
    Group : Public Keys Source RPM: (none)
    Size : 0 License: pubkey
    Signature : (none)
    Summary : gpg(Oracle OSS group (Open Source Software group)
    <[email protected]>)
    Description :
    -----BEGIN PGP PUBLIC KEY BLOCK-----
    Version: rpm-4.8.0 (NSS-3)
    mQENBEwtJWoBCACpiY2rGA6T0ceBi92X88/QclytVBjtDRohOVzs3pmIPh3ULqsW
    G323nmyKbKQBBSjh9OnuO9Y09VG8mzr/w9YV0Ix4cI9/HDTERZ2+TR5u+VNn5J5h
    yvwQSN/FEK6oH2+mz7O0yUNleN7UltR4MOEkHIoAhIvv+1AQQKN3OM8oalz+3gv/
    zz9rAoQczQzT7QWOtBrsRMZgBrKXY/TpJrpVSO3Hx8CnbhKGtLxCCrxZ5v7hh1ht
    3CRAr2+h5bDA9KP6vBZWKEs7NgcvtZFDY6EJc7AoApr3phX9hHE2+snTxe82DkFT
    uA69C8wLyjPCoSy+tcaCqJKOZelNy9RN/WKRABEBAAG0RE9yYWNsZSBPU1MgZ3Jv
    dXAgKE9wZW4gU291cmNlIFNvZnR3YXJlIGdyb3VwKSA8YnVpbGRAb3NzLm9yYWNs
    ZS5jb20+iQE8BBMBAgAmBQJMLSVqAhsDBQkWjmoABgsJCAcDAgQVAggDBBYCAwEC
    HgECF4AACgkQcvl7dOxVHwMiNAf/cD8R74fCBeQsAYid5slIz7CG8xEOBUTDNEJT
    p/owtzr7m7Ydp1txNBOkVeVkUP8czX5EldcmoxA4kCCyHhnxmpJnOt52Fy5ZRnYh
    Ll5gYdpJpXGVScB7fnlh3rJAaesSTacVFC5MKIYPZBiTo9soSXMLNcG8WqHPasdd
    AblC4t5BTDNYlX1RiPeP6m5egHnnxyAXsis8fqIZY0RC9hERxWQ6hdDAX0tJXY8F
    88HDUozvo8jqTlg/5GZcfqcbUjjMUJQ5cBtH3adCthMycdPpPXWJQBuzMIdFJ03u
    YuQ3XrKxBkOLips+OZuWNVZzrPOHsenb49aX4yQsLVc2E2fhKQ==
    =M8XY
    -----END PGP PUBLIC KEY BLOCK-----
    I 've tried to remove the existing keys But Not able to remove them as well.
    Is this the right way of removing the keys ?
    rpm -e --allmatches 'gpg-pubkey-ec551f03-*'  the ec551f03 is the
    version of rpm -qi 'gpg-pubkey-*' query...  Please correct
    Could you tell what I am missing here that's causing the Issue.
    Following are the Errors that is observed in .xsession-errors log file
    ===== BEGIN RING BUFFER (/usr/sbin/sabayon-apply) =====
    MainThread 2013/10/08 18:34:23.3001 (sabayon-apply): No profile for
    user 'root' found
    MainThread 2013/10/08 18:34:23.3005 (sabayon-apply): Fatal exception!
    Exiting abnormally.
    MainThread 2013/10/08 18:34:23.3009 (sabayon-apply): Traceback (most
    recent call last):
    File "/usr/sbin/sabayon-apply", line 149, in <module>
    sys.exit (util.EXIT_CODE_NO_USER_PROFILE)
    SystemExit: 3
    ===== END RING BUFFER (/usr/sbin/sabayon-apply) =====
    This configuration for the debug log can be re-created
    by putting the following in ~//etc/sabayon/sabayon-debug-log.conf
    (use ';' to separate domain names):
    [debug log]
    max lines = 1000
    gnome-session[3707]: EggSMClient-WARNING: Desktop file
    '/etc/xdg/autostart/esc.desktop' has malformed Icon key
    'esc.png'(should not include extension)
    GNOME_KEYRING_SOCKET=/tmp/keyring-x5SKbN/socket
    SSH_AUTH_SOCK=/tmp/keyring-x5SKbN/socket.ssh
    Failed to play sound: Not available
    (polkit-gnome-authentication-agent-1:3917): GLib-GObject-WARNING **:
    cannot register existing type `_PolkitError'
    (polkit-gnome-authentication-agent-1:3917): GLib-CRITICAL **:
    g_once_init_leave: assertion `initialization_value != 0' failed
    W: main.c: This program is not intended to be run as root (unless
    --system is specified).
    ** Message: applet now removed from the notification area
    ** (gnome-user-share:3948): WARNING **: gnome-user-share cannot be
    started as root for security reasons.
    08/10/2013 06:34:26 PM Autoprobing TCP port in (all) network interface
    08/10/2013 06:34:26 PM Listening IPv{4,6}://*:5900
    08/10/2013 06:34:26 PM Autoprobing selected port 5900
    08/10/2013 06:34:26 PM Advertising authentication type: 'No Authentication' (1)
    08/10/2013 06:34:26 PM Advertising security type: 'No Authentication' (1)
    Initializing nautilus-gdu extension
    Initializing nautilus-open-terminal extension
    ** Message: applet now embedded in the notification area
    Connecting to deprecated signal
    QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
    kbuildsycoca4 running...
    Connecting to deprecated signal
    QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
    Connecting to deprecated signal
    QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
    Window manager warning: Invalid WM_TRANSIENT_FOR window 0x4e00004
    specified for 0x4e00019 (Restore Se).
    Object::disconnect: Unexpected null parameter
    QObject::connect: Cannot connect (null)::activePartChanged(
    KParts::Part * ) to KHTMLPart::slotActiveFrameChanged( KParts::Part *
    kio_http_cache_cleaner: Already running!
    Object::disconnect: Unexpected null parameter
    Window manager warning: Invalid WM_TRANSIENT_FOR window 0x5200004
    specified for 0x5200019 (Restore Se).
    Object::disconnect: Unexpected null parameter
    QObject::connect: Cannot connect (null)::activePartChanged(
    KParts::Part * ) to KHTMLPart::slotActiveFrameChanged( KParts::Part *
    Object::disconnect: Unexpected null parameter
    QObject::connect: Cannot connect (null)::activePartChanged(
    KParts::Part * ) to KHTMLPart::slotActiveFrameChanged( KParts::Part *
    Object::disconnect: Unexpected null parameter
    Window manager warning: Invalid WM_TRANSIENT_FOR window 0x4e00004
    specified for 0x4e08cb7 (timesofind).
    libpng warning: Extra compressed data in IDAT
    Window manager warning: Invalid WM_TRANSIENT_FOR window 0x4e00004
    specified for 0x4e0a6e3 (Server Aut).
    Highly appreciate the response.
    Thanks And Regards
    MZ

    The Packaged are already there on the server as the RHEL software DVD is copied on the server.
    Yes it was working before the crash, And Even after the Crash i.e
    after starting the server in Xwindows I was installing the rpms from RHEL6/Packages directory on the server even installed 10-12 rpms
      and was in the process of installing the sabayon rpm i 've inadvertantly issued or run  this command
      rpm -ivh *.rpm --force --nodeps  from RHEL software Packages directory.   
    and it ended up with Errors Header V3 RSA/SHA256 Signature, key ID fd431d51: BAD
       After that I could Not install any rpm from rpm or yum command.
       I 've  Downloaded the new sabyon*  and Other rpms from the net and tried to install them with rpm or yum command but
        got the same Errors Header V3 RSA/SHA256 Signature, key ID fd431d51: BAD 
       with yum am getting this error
       error: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID ec551f03: BAD.
      I 've Tried searching on google as well for at least 10 hours but did not get any help from it so far.
      The Reinstallation of OS is not AN Option for me rightnow.
       Could you tell something which i could try & may be that works.
    Thanks
    MZ

  • Python openbox pipe menu

    I somewhat hijacked a different thread and my question is more suited here.
    I'm using a python script to check gmail in a pipe menu. At first it was creating problems because it would create a cache but would then not load until the file was removed. To fix this, I removed the last line (which created the cache) and it all works. However, I would prefer to have it work like it was intended.
    The script:
    #!/usr/bin/python
    # Authors: [email protected] [email protected]
    # License: GPL 2.0
    # Usage:
    # Put an entry in your ~/.config/openbox/menu.xml like this:
    # <menu id="gmail" label="gmail" execute="~/.config/openbox/scripts/gmail-openbox.py" />
    # And inside <menu id="root-menu" label="openbox">, add this somewhere (wherever you want it on your menu)
    # <menu id="gmail" />
    import os
    import sys
    import logging
    name = "111111"
    pw = "000000"
    browser = "firefox3"
    filename = "/tmp/.gmail.cache"
    login = "\'https://mail.google.com/mail\'"
    # Allow us to run using installed `libgmail` or the one in parent directory.
    try:
    import libgmail
    except ImportError:
    # Urghhh...
    sys.path.insert(1,
    os.path.realpath(os.path.join(os.path.dirname(__file__),
    os.path.pardir)))
    import libgmail
    if __name__ == "__main__":
    import sys
    from getpass import getpass
    if not os.path.isfile(filename):
    ga = libgmail.GmailAccount(name, pw)
    try:
    ga.login()
    except libgmail.GmailLoginFailure:
    print "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
    print "<openbox_pipe_menu>"
    print " <item label=\"login failed.\">"
    print " <action name=\"Execute\"><execute>" + browser + " " + login + "</execute></action>"
    print " </item>"
    print "</openbox_pipe_menu>"
    raise SystemExit
    else:
    ga = libgmail.GmailAccount(
    state = libgmail.GmailSessionState(filename = filename))
    msgtotals = ga.getUnreadMsgCount()
    print "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
    print "<openbox_pipe_menu>"
    print "<separator label=\"Gmail\"/>"
    if msgtotals == 0:
    print " <item label=\"no new messages.\">"
    elif msgtotals == 1:
    print " <item label=\"1 new message.\">"
    else:
    print " <item label=\"" + str(msgtotals) + " new messages.\">"
    print " <action name=\"Execute\"><execute>" + browser + " " + login + "</execute></action>"
    print " </item>"
    print "</openbox_pipe_menu>"
    state = libgmail.GmailSessionState(account = ga).save(filename)
    The line I removed:
    state = libgmail.GmailSessionState(account = ga).save(filename)
    The error I'd get if the cache existed:
    Traceback (most recent call last):
    File "/home/shawn/.config/openbox/scripts/gmail.py", line 56, in <module>
    msgtotals = ga.getUnreadMsgCount()
    File "/home/shawn/.config/openbox/scripts/libgmail.py", line 547, in getUnreadMsgCount
    q = "is:" + U_AS_SUBSET_UNREAD)
    File "/home/shawn/.config/openbox/scripts/libgmail.py", line 428, in _parseSearchResult
    return self._parsePage(_buildURL(**params))
    File "/home/shawn/.config/openbox/scripts/libgmail.py", line 401, in _parsePage
    items = _parsePage(self._retrievePage(urlOrRequest))
    File "/home/shawn/.config/openbox/scripts/libgmail.py", line 369, in _retrievePage
    if self.opener is None:
    AttributeError: GmailAccount instance has no attribute 'opener'
    EDIT - you might need the libgmail.py
    #!/usr/bin/env python
    # libgmail -- Gmail access via Python
    ## To get the version number of the available libgmail version.
    ## Reminder: add date before next release. This attribute is also
    ## used in the setup script.
    Version = '0.1.8' # (Nov 2007)
    # Original author: [email protected]
    # Maintainers: Waseem ([email protected]) and Stas Z ([email protected])
    # License: GPL 2.0
    # NOTE:
    # You should ensure you are permitted to use this script before using it
    # to access Google's Gmail servers.
    # Gmail Implementation Notes
    # ==========================
    # * Folders contain message threads, not individual messages. At present I
    # do not know any way to list all messages without processing thread list.
    LG_DEBUG=0
    from lgconstants import *
    import os,pprint
    import re
    import urllib
    import urllib2
    import mimetypes
    import types
    from cPickle import load, dump
    from email.MIMEBase import MIMEBase
    from email.MIMEText import MIMEText
    from email.MIMEMultipart import MIMEMultipart
    GMAIL_URL_LOGIN = "https://www.google.com/accounts/ServiceLoginBoxAuth"
    GMAIL_URL_GMAIL = "https://mail.google.com/mail/?ui=1&"
    # Set to any value to use proxy.
    PROXY_URL = None # e.g. libgmail.PROXY_URL = 'myproxy.org:3128'
    # TODO: Get these on the fly?
    STANDARD_FOLDERS = [U_INBOX_SEARCH, U_STARRED_SEARCH,
    U_ALL_SEARCH, U_DRAFTS_SEARCH,
    U_SENT_SEARCH, U_SPAM_SEARCH]
    # Constants with names not from the Gmail Javascript:
    # TODO: Move to `lgconstants.py`?
    U_SAVEDRAFT_VIEW = "sd"
    D_DRAFTINFO = "di"
    # NOTE: All other DI_* field offsets seem to match the MI_* field offsets
    DI_BODY = 19
    versionWarned = False # If the Javascript version is different have we
    # warned about it?
    RE_SPLIT_PAGE_CONTENT = re.compile("D\((.*?)\);", re.DOTALL)
    class GmailError(Exception):
    Exception thrown upon gmail-specific failures, in particular a
    failure to log in and a failure to parse responses.
    pass
    class GmailSendError(Exception):
    Exception to throw if we're unable to send a message
    pass
    def _parsePage(pageContent):
    Parse the supplied HTML page and extract useful information from
    the embedded Javascript.
    lines = pageContent.splitlines()
    data = '\n'.join([x for x in lines if x and x[0] in ['D', ')', ',', ']']])
    #data = data.replace(',,',',').replace(',,',',')
    data = re.sub(',{2,}', ',', data)
    result = []
    try:
    exec data in {'__builtins__': None}, {'D': lambda x: result.append(x)}
    except SyntaxError,info:
    print info
    raise GmailError, 'Failed to parse data returned from gmail.'
    items = result
    itemsDict = {}
    namesFoundTwice = []
    for item in items:
    name = item[0]
    try:
    parsedValue = item[1:]
    except Exception:
    parsedValue = ['']
    if itemsDict.has_key(name):
    # This handles the case where a name key is used more than
    # once (e.g. mail items, mail body etc) and automatically
    # places the values into list.
    # TODO: Check this actually works properly, it's early... :-)
    if len(parsedValue) and type(parsedValue[0]) is types.ListType:
    for item in parsedValue:
    itemsDict[name].append(item)
    else:
    itemsDict[name].append(parsedValue)
    else:
    if len(parsedValue) and type(parsedValue[0]) is types.ListType:
    itemsDict[name] = []
    for item in parsedValue:
    itemsDict[name].append(item)
    else:
    itemsDict[name] = [parsedValue]
    return itemsDict
    def _splitBunches(infoItems):# Is this still needed ?? Stas
    Utility to help make it easy to iterate over each item separately,
    even if they were bunched on the page.
    result= []
    # TODO: Decide if this is the best approach.
    for group in infoItems:
    if type(group) == tuple:
    result.extend(group)
    else:
    result.append(group)
    return result
    class SmartRedirectHandler(urllib2.HTTPRedirectHandler):
    def __init__(self, cookiejar):
    self.cookiejar = cookiejar
    def http_error_302(self, req, fp, code, msg, headers):
    # The location redirect doesn't seem to change
    # the hostname header appropriately, so we do
    # by hand. (Is this a bug in urllib2?)
    new_host = re.match(r'http[s]*://(.*?\.google\.com)',
    headers.getheader('Location'))
    if new_host:
    req.add_header("Host", new_host.groups()[0])
    result = urllib2.HTTPRedirectHandler.http_error_302(
    self, req, fp, code, msg, headers)
    return result
    class CookieJar:
    A rough cookie handler, intended to only refer to one domain.
    Does no expiry or anything like that.
    (The only reason this is here is so I don't have to require
    the `ClientCookie` package.)
    def __init__(self):
    self._cookies = {}
    def extractCookies(self, headers, nameFilter = None):
    # TODO: Do this all more nicely?
    for cookie in headers.getheaders('Set-Cookie'):
    name, value = (cookie.split("=", 1) + [""])[:2]
    if LG_DEBUG: print "Extracted cookie `%s`" % (name)
    if not nameFilter or name in nameFilter:
    self._cookies[name] = value.split(";")[0]
    if LG_DEBUG: print "Stored cookie `%s` value `%s`" % (name, self._cookies[name])
    if self._cookies[name] == "EXPIRED":
    if LG_DEBUG:
    print "We got an expired cookie: %s:%s, deleting." % (name, self._cookies[name])
    del self._cookies[name]
    def addCookie(self, name, value):
    self._cookies[name] = value
    def setCookies(self, request):
    request.add_header('Cookie',
    ";".join(["%s=%s" % (k,v)
    for k,v in self._cookies.items()]))
    def _buildURL(**kwargs):
    return "%s%s" % (URL_GMAIL, urllib.urlencode(kwargs))
    def _paramsToMime(params, filenames, files):
    mimeMsg = MIMEMultipart("form-data")
    for name, value in params.iteritems():
    mimeItem = MIMEText(value)
    mimeItem.add_header("Content-Disposition", "form-data", name=name)
    # TODO: Handle this better...?
    for hdr in ['Content-Type','MIME-Version','Content-Transfer-Encoding']:
    del mimeItem[hdr]
    mimeMsg.attach(mimeItem)
    if filenames or files:
    filenames = filenames or []
    files = files or []
    for idx, item in enumerate(filenames + files):
    # TODO: This is messy, tidy it...
    if isinstance(item, str):
    # We assume it's a file path...
    filename = item
    contentType = mimetypes.guess_type(filename)[0]
    payload = open(filename, "rb").read()
    else:
    # We assume it's an `email.Message.Message` instance...
    # TODO: Make more use of the pre-encoded information?
    filename = item.get_filename()
    contentType = item.get_content_type()
    payload = item.get_payload(decode=True)
    if not contentType:
    contentType = "application/octet-stream"
    mimeItem = MIMEBase(*contentType.split("/"))
    mimeItem.add_header("Content-Disposition", "form-data",
    name="file%s" % idx, filename=filename)
    # TODO: Encode the payload?
    mimeItem.set_payload(payload)
    # TODO: Handle this better...?
    for hdr in ['MIME-Version','Content-Transfer-Encoding']:
    del mimeItem[hdr]
    mimeMsg.attach(mimeItem)
    del mimeMsg['MIME-Version']
    return mimeMsg
    class GmailLoginFailure(Exception):
    Raised whenever the login process fails--could be wrong username/password,
    or Gmail service error, for example.
    Extract the error message like this:
    try:
    foobar
    except GmailLoginFailure,e:
    mesg = e.message# or
    print e# uses the __str__
    def __init__(self,message):
    self.message = message
    def __str__(self):
    return repr(self.message)
    class GmailAccount:
    def __init__(self, name = "", pw = "", state = None, domain = None):
    global URL_LOGIN, URL_GMAIL
    self.domain = domain
    if self.domain:
    URL_LOGIN = "https://www.google.com/a/" + self.domain + "/LoginAction"
    URL_GMAIL = "http://mail.google.com/a/" + self.domain + "/?"
    else:
    URL_LOGIN = GMAIL_URL_LOGIN
    URL_GMAIL = GMAIL_URL_GMAIL
    if name and pw:
    self.name = name
    self._pw = pw
    self._cookieJar = CookieJar()
    if PROXY_URL is not None:
    import gmail_transport
    self.opener = urllib2.build_opener(gmail_transport.ConnectHTTPHandler(proxy = PROXY_URL),
    gmail_transport.ConnectHTTPSHandler(proxy = PROXY_URL),
    SmartRedirectHandler(self._cookieJar))
    else:
    self.opener = urllib2.build_opener(
    urllib2.HTTPHandler(debuglevel=0),
    urllib2.HTTPSHandler(debuglevel=0),
    SmartRedirectHandler(self._cookieJar))
    elif state:
    # TODO: Check for stale state cookies?
    self.name, self._cookieJar = state.state
    else:
    raise ValueError("GmailAccount must be instantiated with " \
    "either GmailSessionState object or name " \
    "and password.")
    self._cachedQuotaInfo = None
    self._cachedLabelNames = None
    def login(self):
    # TODO: Throw exception if we were instantiated with state?
    if self.domain:
    data = urllib.urlencode({'continue': URL_GMAIL,
    'at' : 'null',
    'service' : 'mail',
    'userName': self.name,
    'password': self._pw,
    else:
    data = urllib.urlencode({'continue': URL_GMAIL,
    'Email': self.name,
    'Passwd': self._pw,
    headers = {'Host': 'www.google.com',
    'User-Agent': 'Mozilla/5.0 (Compatible; libgmail-python)'}
    req = urllib2.Request(URL_LOGIN, data=data, headers=headers)
    pageData = self._retrievePage(req)
    if not self.domain:
    # The GV cookie no longer comes in this page for
    # "Apps", so this bottom portion is unnecessary for it.
    # This requests the page that provides the required "GV" cookie.
    RE_PAGE_REDIRECT = 'CheckCookie\?continue=([^"\']+)'
    # TODO: Catch more failure exceptions here...?
    try:
    link = re.search(RE_PAGE_REDIRECT, pageData).group(1)
    redirectURL = urllib2.unquote(link)
    redirectURL = redirectURL.replace('\\x26', '&')
    except AttributeError:
    raise GmailLoginFailure("Login failed. (Wrong username/password?)")
    # We aren't concerned with the actual content of this page,
    # just the cookie that is returned with it.
    pageData = self._retrievePage(redirectURL)
    def _retrievePage(self, urlOrRequest):
    if self.opener is None:
    raise "Cannot find urlopener"
    if not isinstance(urlOrRequest, urllib2.Request):
    req = urllib2.Request(urlOrRequest)
    else:
    req = urlOrRequest
    self._cookieJar.setCookies(req)
    req.add_header('User-Agent',
    'Mozilla/5.0 (Compatible; libgmail-python)')
    try:
    resp = self.opener.open(req)
    except urllib2.HTTPError,info:
    print info
    return None
    pageData = resp.read()
    # Extract cookies here
    self._cookieJar.extractCookies(resp.headers)
    # TODO: Enable logging of page data for debugging purposes?
    return pageData
    def _parsePage(self, urlOrRequest):
    Retrieve & then parse the requested page content.
    items = _parsePage(self._retrievePage(urlOrRequest))
    # Automatically cache some things like quota usage.
    # TODO: Cache more?
    # TODO: Expire cached values?
    # TODO: Do this better.
    try:
    self._cachedQuotaInfo = items[D_QUOTA]
    except KeyError:
    pass
    #pprint.pprint(items)
    try:
    self._cachedLabelNames = [category[CT_NAME] for category in items[D_CATEGORIES][0]]
    except KeyError:
    pass
    return items
    def _parseSearchResult(self, searchType, start = 0, **kwargs):
    params = {U_SEARCH: searchType,
    U_START: start,
    U_VIEW: U_THREADLIST_VIEW,
    params.update(kwargs)
    return self._parsePage(_buildURL(**params))
    def _parseThreadSearch(self, searchType, allPages = False, **kwargs):
    Only works for thread-based results at present. # TODO: Change this?
    start = 0
    tot = 0
    threadsInfo = []
    # Option to get *all* threads if multiple pages are used.
    while (start == 0) or (allPages and
    len(threadsInfo) < threadListSummary[TS_TOTAL]):
    items = self._parseSearchResult(searchType, start, **kwargs)
    #TODO: Handle single & zero result case better? Does this work?
    try:
    threads = items[D_THREAD]
    except KeyError:
    break
    else:
    for th in threads:
    if not type(th[0]) is types.ListType:
    th = [th]
    threadsInfo.append(th)
    # TODO: Check if the total or per-page values have changed?
    threadListSummary = items[D_THREADLIST_SUMMARY][0]
    threadsPerPage = threadListSummary[TS_NUM]
    start += threadsPerPage
    # TODO: Record whether or not we retrieved all pages..?
    return GmailSearchResult(self, (searchType, kwargs), threadsInfo)
    def _retrieveJavascript(self, version = ""):
    Note: `version` seems to be ignored.
    return self._retrievePage(_buildURL(view = U_PAGE_VIEW,
    name = "js",
    ver = version))
    def getMessagesByFolder(self, folderName, allPages = False):
    Folders contain conversation/message threads.
    `folderName` -- As set in Gmail interface.
    Returns a `GmailSearchResult` instance.
    *** TODO: Change all "getMessagesByX" to "getThreadsByX"? ***
    return self._parseThreadSearch(folderName, allPages = allPages)
    def getMessagesByQuery(self, query, allPages = False):
    Returns a `GmailSearchResult` instance.
    return self._parseThreadSearch(U_QUERY_SEARCH, q = query,
    allPages = allPages)
    def getQuotaInfo(self, refresh = False):
    Return MB used, Total MB and percentage used.
    # TODO: Change this to a property.
    if not self._cachedQuotaInfo or refresh:
    # TODO: Handle this better...
    self.getMessagesByFolder(U_INBOX_SEARCH)
    return self._cachedQuotaInfo[0][:3]
    def getLabelNames(self, refresh = False):
    # TODO: Change this to a property?
    if not self._cachedLabelNames or refresh:
    # TODO: Handle this better...
    self.getMessagesByFolder(U_INBOX_SEARCH)
    return self._cachedLabelNames
    def getMessagesByLabel(self, label, allPages = False):
    return self._parseThreadSearch(U_CATEGORY_SEARCH,
    cat=label, allPages = allPages)
    def getRawMessage(self, msgId):
    # U_ORIGINAL_MESSAGE_VIEW seems the only one that returns a page.
    # All the other U_* results in a 404 exception. Stas
    PageView = U_ORIGINAL_MESSAGE_VIEW
    return self._retrievePage(
    _buildURL(view=PageView, th=msgId))
    def getUnreadMessages(self):
    return self._parseThreadSearch(U_QUERY_SEARCH,
    q = "is:" + U_AS_SUBSET_UNREAD)
    def getUnreadMsgCount(self):
    items = self._parseSearchResult(U_QUERY_SEARCH,
    q = "is:" + U_AS_SUBSET_UNREAD)
    try:
    result = items[D_THREADLIST_SUMMARY][0][TS_TOTAL_MSGS]
    except KeyError:
    result = 0
    return result
    def _getActionToken(self):
    try:
    at = self._cookieJar._cookies[ACTION_TOKEN_COOKIE]
    except KeyError:
    self.getLabelNames(True)
    at = self._cookieJar._cookies[ACTION_TOKEN_COOKIE]
    return at
    def sendMessage(self, msg, asDraft = False, _extraParams = None):
    `msg` -- `GmailComposedMessage` instance.
    `_extraParams` -- Dictionary containing additional parameters
    to put into POST message. (Not officially
    for external use, more to make feature
    additional a little easier to play with.)
    Note: Now returns `GmailMessageStub` instance with populated
    `id` (and `_account`) fields on success or None on failure.
    # TODO: Handle drafts separately?
    params = {U_VIEW: [U_SENDMAIL_VIEW, U_SAVEDRAFT_VIEW][asDraft],
    U_REFERENCED_MSG: "",
    U_THREAD: "",
    U_DRAFT_MSG: "",
    U_COMPOSEID: "1",
    U_ACTION_TOKEN: self._getActionToken(),
    U_COMPOSE_TO: msg.to,
    U_COMPOSE_CC: msg.cc,
    U_COMPOSE_BCC: msg.bcc,
    "subject": msg.subject,
    "msgbody": msg.body,
    if _extraParams:
    params.update(_extraParams)
    # Amongst other things, I used the following post to work out this:
    # <http://groups.google.com/groups?
    # selm=mailman.1047080233.20095.python-list%40python.org>
    mimeMessage = _paramsToMime(params, msg.filenames, msg.files)
    #### TODO: Ughh, tidy all this up & do it better...
    ## This horrible mess is here for two main reasons:
    ## 1. The `Content-Type` header (which also contains the boundary
    ## marker) needs to be extracted from the MIME message so
    ## we can send it as the request `Content-Type` header instead.
    ## 2. It seems the form submission needs to use "\r\n" for new
    ## lines instead of the "\n" returned by `as_string()`.
    ## I tried changing the value of `NL` used by the `Generator` class
    ## but it didn't work so I'm doing it this way until I figure
    ## out how to do it properly. Of course, first try, if the payloads
    ## contained "\n" sequences they got replaced too, which corrupted
    ## the attachments. I could probably encode the submission,
    ## which would probably be nicer, but in the meantime I'm kludging
    ## this workaround that replaces all non-text payloads with a
    ## marker, changes all "\n" to "\r\n" and finally replaces the
    ## markers with the original payloads.
    ## Yeah, I know, it's horrible, but hey it works doesn't it? If you've
    ## got a problem with it, fix it yourself & give me the patch!
    origPayloads = {}
    FMT_MARKER = "&&&&&&%s&&&&&&"
    for i, m in enumerate(mimeMessage.get_payload()):
    if not isinstance(m, MIMEText): #Do we care if we change text ones?
    origPayloads[i] = m.get_payload()
    m.set_payload(FMT_MARKER % i)
    mimeMessage.epilogue = ""
    msgStr = mimeMessage.as_string()
    contentTypeHeader, data = msgStr.split("\n\n", 1)
    contentTypeHeader = contentTypeHeader.split(":", 1)
    data = data.replace("\n", "\r\n")
    for k,v in origPayloads.iteritems():
    data = data.replace(FMT_MARKER % k, v)
    req = urllib2.Request(_buildURL(), data = data)
    req.add_header(*contentTypeHeader)
    items = self._parsePage(req)
    # TODO: Check composeid?
    # Sometimes we get the success message
    # but the id is 0 and no message is sent
    result = None
    resultInfo = items[D_SENDMAIL_RESULT][0]
    if resultInfo[SM_SUCCESS]:
    result = GmailMessageStub(id = resultInfo[SM_NEWTHREADID],
    _account = self)
    else:
    raise GmailSendError, resultInfo[SM_MSG]
    return result
    def trashMessage(self, msg):
    # TODO: Decide if we should make this a method of `GmailMessage`.
    # TODO: Should we check we have been given a `GmailMessage` instance?
    params = {
    U_ACTION: U_DELETEMESSAGE_ACTION,
    U_ACTION_MESSAGE: msg.id,
    U_ACTION_TOKEN: self._getActionToken(),
    items = self._parsePage(_buildURL(**params))
    # TODO: Mark as trashed on success?
    return (items[D_ACTION_RESULT][0][AR_SUCCESS] == 1)
    def _doThreadAction(self, actionId, thread):
    # TODO: Decide if we should make this a method of `GmailThread`.
    # TODO: Should we check we have been given a `GmailThread` instance?
    params = {
    U_SEARCH: U_ALL_SEARCH, #TODO:Check this search value always works.
    U_VIEW: U_UPDATE_VIEW,
    U_ACTION: actionId,
    U_ACTION_THREAD: thread.id,
    U_ACTION_TOKEN: self._getActionToken(),
    items = self._parsePage(_buildURL(**params))
    return (items[D_ACTION_RESULT][0][AR_SUCCESS] == 1)
    def trashThread(self, thread):
    # TODO: Decide if we should make this a method of `GmailThread`.
    # TODO: Should we check we have been given a `GmailThread` instance?
    result = self._doThreadAction(U_MARKTRASH_ACTION, thread)
    # TODO: Mark as trashed on success?
    return result
    def _createUpdateRequest(self, actionId): #extraData):
    Helper method to create a Request instance for an update (view)
    action.
    Returns populated `Request` instance.
    params = {
    U_VIEW: U_UPDATE_VIEW,
    data = {
    U_ACTION: actionId,
    U_ACTION_TOKEN: self._getActionToken(),
    #data.update(extraData)
    req = urllib2.Request(_buildURL(**params),
    data = urllib.urlencode(data))
    return req
    # TODO: Extract additional common code from handling of labels?
    def createLabel(self, labelName):
    req = self._createUpdateRequest(U_CREATECATEGORY_ACTION + labelName)
    # Note: Label name cache is updated by this call as well. (Handy!)
    items = self._parsePage(req)
    print items
    return (items[D_ACTION_RESULT][0][AR_SUCCESS] == 1)
    def deleteLabel(self, labelName):
    # TODO: Check labelName exits?
    req = self._createUpdateRequest(U_DELETECATEGORY_ACTION + labelName)
    # Note: Label name cache is updated by this call as well. (Handy!)
    items = self._parsePage(req)
    return (items[D_ACTION_RESULT][0][AR_SUCCESS] == 1)
    def renameLabel(self, oldLabelName, newLabelName):
    # TODO: Check oldLabelName exits?
    req = self._createUpdateRequest("%s%s^%s" % (U_RENAMECATEGORY_ACTION,
    oldLabelName, newLabelName))
    # Note: Label name cache is updated by this call as well. (Handy!)
    items = self._parsePage(req)
    return (items[D_ACTION_RESULT][0][AR_SUCCESS] == 1)
    def storeFile(self, filename, label = None):
    # TODO: Handle files larger than single attachment size.
    # TODO: Allow file data objects to be supplied?
    FILE_STORE_VERSION = "FSV_01"
    FILE_STORE_SUBJECT_TEMPLATE = "%s %s" % (FILE_STORE_VERSION, "%s")
    subject = FILE_STORE_SUBJECT_TEMPLATE % os.path.basename(filename)
    msg = GmailComposedMessage(to="", subject=subject, body="",
    filenames=[filename])
    draftMsg = self.sendMessage(msg, asDraft = True)
    if draftMsg and label:
    draftMsg.addLabel(label)
    return draftMsg
    ## CONTACTS SUPPORT
    def getContacts(self):
    Returns a GmailContactList object
    that has all the contacts in it as
    GmailContacts
    contactList = []
    # pnl = a is necessary to get *all* contacts
    myUrl = _buildURL(view='cl',search='contacts', pnl='a')
    myData = self._parsePage(myUrl)
    # This comes back with a dictionary
    # with entry 'cl'
    addresses = myData['cl']
    for entry in addresses:
    if len(entry) >= 6 and entry[0]=='ce':
    newGmailContact = GmailContact(entry[1], entry[2], entry[4], entry[5])
    #### new code used to get all the notes
    #### not used yet due to lockdown problems
    ##rawnotes = self._getSpecInfo(entry[1])
    ##print rawnotes
    ##newGmailContact = GmailContact(entry[1], entry[2], entry[4],rawnotes)
    contactList.append(newGmailContact)
    return GmailContactList(contactList)
    def addContact(self, myContact, *extra_args):
    Attempts to add a GmailContact to the gmail
    address book. Returns true if successful,
    false otherwise
    Please note that after version 0.1.3.3,
    addContact takes one argument of type
    GmailContact, the contact to add.
    The old signature of:
    addContact(name, email, notes='') is still
    supported, but deprecated.
    if len(extra_args) > 0:
    # The user has passed in extra arguments
    # He/she is probably trying to invoke addContact
    # using the old, deprecated signature of:
    # addContact(self, name, email, notes='')
    # Build a GmailContact object and use that instead
    (name, email) = (myContact, extra_args[0])
    if len(extra_args) > 1:
    notes = extra_args[1]
    else:
    notes = ''
    myContact = GmailContact(-1, name, email, notes)
    # TODO: In the ideal world, we'd extract these specific
    # constants into a nice constants file
    # This mostly comes from the Johnvey Gmail API,
    # but also from the gmail.py cited earlier
    myURL = _buildURL(view='up')
    myDataList = [ ('act','ec'),
    ('at', self._cookieJar._cookies['GMAIL_AT']), # Cookie data?
    ('ct_nm', myContact.getName()),
    ('ct_em', myContact.getEmail()),
    ('ct_id', -1 )
    notes = myContact.getNotes()
    if notes != '':
    myDataList.append( ('ctf_n', notes) )
    validinfokeys = [
    'i', # IM
    'p', # Phone
    'd', # Company
    'a', # ADR
    'e', # Email
    'm', # Mobile
    'b', # Pager
    'f', # Fax
    't', # Title
    'o', # Other
    moreInfo = myContact.getMoreInfo()
    ctsn_num = -1
    if moreInfo != {}:
    for ctsf,ctsf_data in moreInfo.items():
    ctsn_num += 1
    # data section header, WORK, HOME,...
    sectionenum ='ctsn_%02d' % ctsn_num
    myDataList.append( ( sectionenum, ctsf ))
    ctsf_num = -1
    if isinstance(ctsf_data[0],str):
    ctsf_num += 1
    # data section
    subsectionenum = 'ctsf_%02d_%02d_%s' % (ctsn_num, ctsf_num, ctsf_data[0]) # ie. ctsf_00_01_p
    myDataList.append( (subsectionenum, ctsf_data[1]) )
    else:
    for info in ctsf_data:
    if validinfokeys.count(info[0]) > 0:
    ctsf_num += 1
    # data section
    subsectionenum = 'ctsf_%02d_%02d_%s' % (ctsn_num, ctsf_num, info[0]) # ie. ctsf_00_01_p
    myDataList.append( (subsectionenum, info[1]) )
    myData = urllib.urlencode(myDataList)
    request = urllib2.Request(myURL,
    data = myData)
    pageData = self._retrievePage(request)
    if pageData.find("The contact was successfully added") == -1:
    print pageData
    if pageData.find("already has the email address") > 0:
    raise Exception("Someone with same email already exists in Gmail.")
    elif pageData.find("https://www.google.com/accounts/ServiceLogin"):
    raise Exception("Login has expired.")
    return False
    else:
    return True
    def _removeContactById(self, id):
    Attempts to remove the contact that occupies
    id "id" from the gmail address book.
    Returns True if successful,
    False otherwise.
    This is a little dangerous since you don't really
    know who you're deleting. Really,
    this should return the name or something of the
    person we just killed.
    Don't call this method.
    You should be using removeContact instead.
    myURL = _buildURL(search='contacts', ct_id = id, c=id, act='dc', at=self._cookieJar._cookies['GMAIL_AT'], view='up')
    pageData = self._retrievePage(myURL)
    if pageData.find("The contact has been deleted") == -1:
    return False
    else:
    return True
    def removeContact(self, gmailContact):
    Attempts to remove the GmailContact passed in
    Returns True if successful, False otherwise.
    # Let's re-fetch the contact list to make
    # sure we're really deleting the guy
    # we think we're deleting
    newContactList = self.getContacts()
    newVersionOfPersonToDelete = newContactList.getContactById(gmailContact.getId())
    # Ok, now we need to ensure that gmailContact
    # is the same as newVersionOfPersonToDelete
    # and then we can go ahead and delete him/her
    if (gmailContact == newVersionOfPersonToDelete):
    return self._removeContactById(gmailContact.getId())
    else:
    # We have a cache coherency problem -- someone
    # else now occupies this ID slot.
    # TODO: Perhaps signal this in some nice way
    # to the end user?
    print "Unable to delete."
    print "Has someone else been modifying the contacts list while we have?"
    print "Old version of person:",gmailContact
    print "New version of person:",newVersionOfPersonToDelete
    return False
    ## Don't remove this. contact stas
    ## def _getSpecInfo(self,id):
    ## Return all the notes data.
    ## This is currently not used due to the fact that it requests pages in
    ## a dos attack manner.
    ## myURL =_buildURL(search='contacts',ct_id=id,c=id,\
    ## at=self._cookieJar._cookies['GMAIL_AT'],view='ct')
    ## pageData = self._retrievePage(myURL)
    ## myData = self._parsePage(myURL)
    ## #print "\nmyData form _getSpecInfo\n",myData
    ## rawnotes = myData['cov'][7]
    ## return rawnotes
    class GmailContact:
    Class for storing a Gmail Contacts list entry
    def __init__(self, name, email, *extra_args):
    Returns a new GmailContact object
    (you can then call addContact on this to commit
    it to the Gmail addressbook, for example)
    Consider calling setNotes() and setMoreInfo()
    to add extended information to this contact
    # Support populating other fields if we're trying
    # to invoke this the old way, with the old constructor
    # whose signature was __init__(self, id, name, email, notes='')
    id = -1
    notes = ''
    if len(extra_args) > 0:
    (id, name) = (name, email)
    email = extra_args[0]
    if len(extra_args) > 1:
    notes = extra_args[1]
    else:
    notes = ''
    self.id = id
    self.name = name
    self.email = email
    self.notes = notes
    self.moreInfo = {}
    def __str__(self):
    return "%s %s %s %s" % (self.id, self.name, self.email, self.notes)
    def __eq__(self, other):
    if not isinstance(other, GmailContact):
    return False
    return (self.getId() == other.getId()) and \
    (self.getName() == other.getName()) and \
    (self.getEmail() == other.getEmail()) and \
    (self.getNotes() == other.getNotes())
    def getId(self):
    return self.id
    def getName(self):
    return self.name
    def getEmail(self):
    return self.email
    def getNotes(self):
    return self.notes
    def setNotes(self, notes):
    Sets the notes field for this GmailContact
    Note that this does NOT change the note
    field on Gmail's end; only adding or removing
    contacts modifies them
    self.notes = notes
    def getMoreInfo(self):
    return self.moreInfo
    def setMoreInfo(self, moreInfo):
    moreInfo format
    Use special key values::
    'i' = IM
    'p' = Phone
    'd' = Company
    'a' = ADR
    'e' = Email
    'm' = Mobile
    'b' = Pager
    'f' = Fax
    't' = Title
    'o' = Other
    Simple example::
    moreInfo = {'Home': ( ('a','852 W Barry'),
    ('p', '1-773-244-1980'),
    ('i', 'aim:brianray34') ) }
    Complex example::
    moreInfo = {
    'Personal': (('e', 'Home Email'),
    ('f', 'Home Fax')),
    'Work': (('d', 'Sample Company'),
    ('t', 'Job Title'),
    ('o', 'Department: Department1'),
    ('o', 'Department: Department2'),
    ('p', 'Work Phone'),
    ('m', 'Mobile Phone'),
    ('f', 'Work Fax'),
    ('b', 'Pager')) }
    self.moreInfo = moreInfo
    def getVCard(self):
    """Returns a vCard 3.0 for this
    contact, as a string"""
    # The \r is is to comply with the RFC2425 section 5.8.1
    vcard = "BEGIN:VCARD\r\n"
    vcard += "VERSION:3.0\r\n"
    ## Deal with multiline notes
    ##vcard += "NOTE:%s\n" % self.getNotes().replace("\n","\\n")
    vcard += "NOTE:%s\r\n" % self.getNotes()
    # Fake-out N by splitting up whatever we get out of getName
    # This might not always do 'the right thing'
    # but it's a *reasonable* compromise
    fullname = self.getName().split()
    fullname.reverse()
    vcard += "N:%s" % ';'.join(fullname) + "\r\n"
    vcard += "FN:%s\r\n" % self.getName()
    vcard += "EMAIL;TYPE=INTERNET:%s\r\n" % self.getEmail()
    vcard += "END:VCARD\r\n\r\n"
    # Final newline in case we want to put more than one in a file
    return vcard
    class GmailContactList:
    Class for storing an entire Gmail contacts list
    and retrieving contacts by Id, Email address, and name
    def __init__(self, contactList):
    self.contactList = contactList
    def __str__(self):
    return '\n'.join([str(item) for item in self.contactList])
    def getCount(self):
    Returns number of contacts
    return len(self.contactList)
    def getAllContacts(self):
    Returns an array of all the
    GmailContacts
    return self.contactList
    def getContactByName(self, name):
    Gets the first contact in the
    address book whose name is 'name'.
    Returns False if no contact
    could be found
    nameList = self.getContactListByName(name)
    if len(nameList) > 0:
    return nameList[0]
    else:
    return False
    def getContactByEmail(self, email):
    Gets the first contact in the
    address book whose name is 'email'.
    As of this writing, Gmail insists
    upon a unique email; i.e. two contacts
    cannot share an email address.
    Returns False if no contact
    could be found
    emailList = self.getContactListByEmail(email)
    if len(emailList) > 0:
    return emailList[0]
    else:
    return False
    def getContactById(self, myId):
    Gets the first contact in the
    address book whose id is 'myId'.
    REMEMBER: ID IS A STRING
    Returns False if no contact
    could be found
    idList = self.getContactListById(myId)
    if len(idList) > 0:
    return idList[0]
    else:
    return False
    def getContactListByName(self, name):
    This function returns a LIST
    of GmailContacts whose name is
    'name'.
    Returns an empty list if no contacts
    were found
    nameList = []
    for entry in self.contactList:
    if entry.getName() == name:
    nameList.append(entry)
    return nameList
    def getContactListByEmail(self, email):
    This function returns a LIST
    of GmailContacts whose email is
    'email'. As of this writing, two contacts
    cannot share an email address, so this
    should only return just one item.
    But it doesn't hurt to be prepared?
    Returns an empty list if no contacts
    were found
    emailList = []
    for entry in self.contactList:
    if entry.getEmail() == email:
    emailList.append(entry)
    return emailList
    def getContactListById(self, myId):
    This function returns a LIST
    of GmailContacts whose id is
    'myId'. We expect there only to
    be one, but just in case!
    Remember: ID IS A STRING
    Returns an empty list if no contacts
    were found
    idList = []
    for entry in self.contactList:
    if entry.getId() == myId:
    idList.append(entry)
    return idList
    def search(self, searchTerm):
    This function returns a LIST
    of GmailContacts whose name or
    email address matches the 'searchTerm'.
    Returns an empty list if no matches
    were found.
    searchResults = []
    for entry in self.contactList:
    p = re.compile(searchTerm, re.IGNORECASE)
    if p.search(entry.getName()) or p.search(entry.getEmail()):
    searchResults.append(entry)
    return searchResults
    class GmailSearchResult:
    def __init__(self, account, search, threadsInfo):
    `threadsInfo` -- As returned from Gmail but unbunched.
    #print "\nthreadsInfo\n",threadsInfo
    try:
    if not type(threadsInfo[0]) is types.ListType:
    threadsInfo = [threadsInfo]
    except IndexError:
    print "No messages found"
    self._account = account
    self.search = search # TODO: Turn into object + format nicely.
    self._threads = []
    for thread in threadsInfo:
    self._threads.append(GmailThread(self, thread[0]))
    def __iter__(self):
    return iter(self._threads)
    def __len__(self):
    return len(self._threads)
    def __getitem__(self,key):
    return self._threads.__getitem__(key)
    class GmailSessionState:
    def __init__(self, account = None, filename = ""):
    if account:
    self.state = (account.name, account._cookieJar)
    elif filename:
    self.state = load(open(filename, "rb"))
    else:
    raise ValueError("GmailSessionState must be instantiated with " \
    "either GmailAccount object or filename.")
    def save(self, filename):
    dump(self.state, open(filename, "wb"), -1)
    class _LabelHandlerMixin(object):
    Note: Because a message id can be used as a thread id this works for
    messages as well as threads.
    def __init__(self):
    self._labels = None
    def _makeLabelList(self, labelList):
    self._labels = labelList
    def addLabel(self, labelName):
    # Note: It appears this also automatically creates new labels.
    result = self._account._doThreadAction(U_ADDCATEGORY_ACTION+labelName,
    self)
    if not self._labels:
    self._makeLabelList([])
    # TODO: Caching this seems a little dangerous; suppress duplicates maybe?
    self._labels.append(labelName)
    return result
    def removeLabel(self, labelName):
    # TODO: Check label is already attached?
    # Note: An error is not generated if the label is not already attached.
    result = \
    self._account._doThreadAction(U_REMOVECATEGORY_ACTION+labelName,
    self)
    removeLabel = True
    try:
    self._labels.remove(labelName)
    except:
    removeLabel = False
    pass
    # If we don't check both, we might end up in some weird inconsistent state
    return result and removeLabel
    def getLabels(self):
    return self._labels
    class GmailThread(_LabelHandlerMixin):
    Note: As far as I can tell, the "canonical" thread id is always the same
    as the id of the last message in the thread. But it appears that
    the id of any message in the thread can be used to retrieve
    the thread information.
    def __init__(self, parent, threadsInfo):
    _LabelHandlerMixin.__init__(self)
    # TODO Handle this better?
    self._parent = parent
    self._account = self._parent._account
    self.id = threadsInfo[T_THREADID] # TODO: Change when canonical updated?
    self.subject = threadsInfo[T_SUBJECT_HTML]
    self.snippet = threadsInfo[T_SNIPPET_HTML]
    #self.extraSummary = threadInfo[T_EXTRA_SNIPPET] #TODO: What is this?
    # TODO: Store other info?
    # Extract number of messages in thread/conversation.
    self._authors = threadsInfo[T_AUTHORS_HTML]
    self.info = threadsInfo
    try:
    # TODO: Find out if this information can be found another way...
    # (Without another page request.)
    self._length = int(re.search("\((\d+?)\)\Z",
    self._authors).group(1))
    except AttributeError,info:
    # If there's no message count then the thread only has one message.
    self._length = 1
    # TODO: Store information known about the last message (e.g. id)?
    self._messages = []
    # Populate labels
    self._makeLabelList(threadsInfo[T_CATEGORIES])
    def __getattr__(self, name):
    Dynamically dispatch some interesting thread properties.
    attrs = { 'unread': T_UNREAD,
    'star': T_STAR,
    'date': T_DATE_HTML,
    'authors': T_AUTHORS_HTML,
    'flags': T_FLAGS,
    'subject': T_SUBJECT_HTML,
    'snippet': T_SNIPPET_HTML,
    'categories': T_CATEGORIES,
    'attach': T_ATTACH_HTML,
    'matching_msgid': T_MATCHING_MSGID,
    'extra_snippet': T_EXTRA_SNIPPET }
    if name in attrs:
    return self.info[ attrs[name] ];
    raise AttributeError("no attribute %s" % name)
    def __len__(self):
    return self._length
    def __iter__(self):
    if not self._messages:
    self._messages = self._getMessages(self)
    return iter(self._messages)
    def __getitem__(self, key):
    if not self._messages:
    self._messages = self._getMessages(self)
    try:
    result = self._messages.__getitem__(key)
    except IndexError:
    result = []
    return result
    def _getMessages(self, thread):
    # TODO: Do this better.
    # TODO: Specify the query folder using our specific search?
    items = self._account._parseSearchResult(U_QUERY_SEARCH,
    view = U_CONVERSATION_VIEW,
    th = thread.id,
    q = "in:anywhere")
    result = []
    # TODO: Handle this better?
    # Note: This handles both draft & non-draft messages in a thread...
    for key, isDraft in [(D_MSGINFO, False), (D_DRAFTINFO, True)]:
    try:
    msgsInfo = items[key]
    except KeyError:
    # No messages of this type (e.g. draft or non-draft)
    continue
    else:
    # TODO: Handle special case of only 1 message in thread better?
    if type(msgsInfo[0]) != types.ListType:
    msgsInfo = [msgsInfo]
    for msg in msgsInfo:
    result += [GmailMessage(thread, msg, isDraft = isDraft)]
    return result
    class GmailMessageStub(_LabelHandlerMixin):
    Intended to be used where not all message information is known/required.
    NOTE: This may go away.
    # TODO: Provide way to convert this to a full `GmailMessage` instance
    # or allow `GmailMessage` to be created without all info?
    def __init__(self, id = None, _account = None):
    _LabelHandlerMixin.__init__(self)
    self.id = id
    self._account = _account
    class GmailMessage(object):
    def __init__(self, parent, msgData, isDraft = False):
    Note: `msgData` can be from either D_MSGINFO or D_DRAFTINFO.
    # TODO: Automatically detect if it's a draft or not?
    # TODO Handle this better?
    self._parent = parent
    self._account = self._parent._account
    self.author = msgData[MI_AUTHORFIRSTNAME]
    self.id = msgData[MI_MSGID]
    self.number = msgData[MI_NUM]
    self.subject = msgData[MI_SUBJECT]
    self.to = msgData[MI_TO]
    self.cc = msgData[MI_CC]
    self.bcc = msgData[MI_BCC]
    self.sender = msgData[MI_AUTHOREMAIL]
    self.attachments = [GmailAttachment(self, attachmentInfo)
    for attachmentInfo in msgData[MI_ATTACHINFO]]
    # TODO: Populate additional fields & cache...(?)
    # TODO: Handle body differently if it's from a draft?
    self.isDraft = isDraft
    self._source = None
    def _getSource(self):
    if not self._source:
    # TODO: Do this more nicely...?
    # TODO: Strip initial white space & fix up last line ending
    # to make it legal as per RFC?
    self._source = self._account.getRawMessage(self.id)
    return self._source
    source = property(_getSource, doc = "")
    class GmailAttachment:
    def __init__(self, parent, attachmentInfo):
    # TODO Handle this better?
    self._parent = parent
    self._account = self._parent._account
    self.id = attachmentInfo[A_ID]
    self.filename = attachmentInfo[A_FILENAME]
    self.mimetype = attachmentInfo[A_MIMETYPE]
    self.filesize = attachmentInfo[A_FILESIZE]
    self._content = None
    def _getContent(self):
    if not self._content:
    # TODO: Do this a more nicely...?
    self._content = self._account._retrievePage(
    _buildURL(view=U_ATTACHMENT_VIEW, disp="attd",
    attid=self.id, th=self._parent._parent.id))
    return self._content
    content = property(_getContent, doc = "")
    def _getFullId(self):
    Returns the "full path"/"full id" of the attachment. (Used
    to refer to the file when forwarding.)
    The id is of the form: "<thread_id>_<msg_id>_<attachment_id>"
    return "%s_%s_%s" % (self._parent._parent.id,
    self._parent.id,
    self.id)
    _fullId = property(_getFullId, doc = "")
    class GmailComposedMessage:
    def __init__(self, to, subject, body, cc = None, bcc = None,
    filenames = None, files = None):
    `filenames` - list of the file paths of the files to attach.
    `files` - list of objects implementing sub-set of
    `email.Message.Message` interface (`get_filename`,
    `get_content_type`, `get_payload`). This is to
    allow use of payloads from Message instances.
    TODO: Change this to be simpler class we define ourselves?
    self.to = to
    self.subject = subject
    self.body = body
    self.cc = cc
    self.bcc = bcc
    self.filenames = filenames
    self.files = files
    if __name__ == "__main__":
    import sys
    from getpass import getpass
    try:
    name = sys.argv[1]
    except IndexError:
    name = raw_input("Gmail account name: ")
    pw = getpass("Password: ")
    domain = raw_input("Domain? [leave blank for Gmail]: ")
    ga = GmailAccount(name, pw, domain=domain)
    print "\nPlease wait, logging in..."
    try:
    ga.login()
    except GmailLoginFailure,e:
    print "\nLogin failed. (%s)" % e.message
    else:
    print "Login successful.\n"
    # TODO: Use properties instead?
    quotaInfo = ga.getQuotaInfo()
    quotaMbUsed = quotaInfo[QU_SPACEUSED]
    quotaMbTotal = quotaInfo[QU_QUOTA]
    quotaPercent = quotaInfo[QU_PERCENT]
    print "%s of %s used. (%s)\n" % (quotaMbUsed, quotaMbTotal, quotaPercent)
    searches = STANDARD_FOLDERS + ga.getLabelNames()
    name = None
    while 1:
    try:
    print "Select folder or label to list: (Ctrl-C to exit)"
    for optionId, optionName in enumerate(searches):
    print " %d. %s" % (optionId, optionName)
    while not name:
    try:
    name = searches[int(raw_input("Choice: "))]
    except ValueError,info:
    print info
    name = None
    if name in STANDARD_FOLDERS:
    result = ga.getMessagesByFolder(name, True)
    else:
    result = ga.getMessagesByLabel(name, True)
    if not len(result):
    print "No threads found in `%s`." % name
    break
    name = None
    tot = len(result)
    i = 0
    for thread in result:
    print "%s messages in thread" % len(thread)
    print thread.id, len(thread), thread.subject
    for msg in thread:
    print "\n ", msg.id, msg.number, msg.author,msg.subject
    # Just as an example of other usefull things
    #print " ", msg.cc, msg.bcc,msg.sender
    i += 1
    print
    print "number of threads:",tot
    print "number of messages:",i
    except KeyboardInterrupt:
    break
    print "\n\nDone."
    Last edited by Reasons (2008-03-20 01:18:27)

    Thought it might help to give lines 369-relevant of the libgmail so it's easier to read
    def _retrievePage(self, urlOrRequest):
    if self.opener is None:
    raise "Cannot find urlopener"
    if not isinstance(urlOrRequest, urllib2.Request):
    req = urllib2.Request(urlOrRequest)
    else:
    req = urlOrRequest
    self._cookieJar.setCookies(req)
    req.add_header('User-Agent',
    'Mozilla/5.0 (Compatible; libgmail-python)')
    try:
    resp = self.opener.open(req)
    except urllib2.HTTPError,info:
    print info
    return None
    pageData = resp.read()
    # Extract cookies here
    self._cookieJar.extractCookies(resp.headers)
    # TODO: Enable logging of page data for debugging purposes?
    return pageData
    def _parsePage(self, urlOrRequest):
    Retrieve & then parse the requested page content.
    items = _parsePage(self._retrievePage(urlOrRequest))
    # Automatically cache some things like quota usage.
    # TODO: Cache more?
    # TODO: Expire cached values?
    # TODO: Do this better.
    try:
    self._cachedQuotaInfo = items[D_QUOTA]
    except KeyError:
    pass
    #pprint.pprint(items)
    try:
    self._cachedLabelNames = [category[CT_NAME] for category in items[D_CATEGORIES][0]]
    except KeyError:
    pass
    return items
    def _parseSearchResult(self, searchType, start = 0, **kwargs):
    params = {U_SEARCH: searchType,
    U_START: start,
    U_VIEW: U_THREADLIST_VIEW,
    params.update(kwargs)
    return self._parsePage(_buildURL(**params))

  • An error occurred while building the default domain

    Hi Not sure if this is the right forum to post this but I hope someone here can help......
    Hi,
    I have just installed Oracle JDeveloper 11g R1 (Build 5407) (Oracle JDeveloper Studio Edition for Windows (934 MB) ) on my windows laptop. When the product opens it tries to start a intergrated weblogic domain:
    [04:44:34 PM] Extending Integrated Weblogic domain...
    [04:45:27 PM] ERROR: An error occurred while building the default domain.
    Please see this log file for more details:
    I don't even know where to start investigating the cause of this problem so any pointers or help would be appreciated!!
    In case it is of any help the log file looks like this:
    Log File: C:\Documents and Settings\richard anthony\Application Data\JDeveloper\system11.1.1.1.33.54.07\o.j2ee.adrs\ExtendDefaultDomain.log
    Label: JDEVADF_11.1.1.1.0_GENERIC_090615.0017.5407
    Product Home: C:\Oracle\Middleware\jdeveloper\jdev\
    Domain: C:\Documents and Settings\richard anthony\Application Data\JDeveloper\system11.1.1.1.33.54.07\DefaultDomain
    "C:\Oracle\Middleware\jdeveloper\common\bin\wlst.cmd" "C:\Documents and Settings\richard anthony\Application Data\JDeveloper\system11.1.1.1.33.54.07\o.j2ee.adrs\ExtendDefaultDomain.py"
    Process started
    wlst >
    wlst > CLASSPATH=C:\Oracle\MIDDLE~1\patch_wls1031\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\Oracle\MIDDLE~1\patch_jdev1111\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\Oracle\MIDDLE~1\JDK160~1\lib\tools.jar;C:\Oracle\MIDDLE~1\utils\config\10.3.1.0\config-launch.jar;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic_sp.jar;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.jar;C:\Oracle\MIDDLE~1\modules\features\weblogic.server.modules_10.3.1.0.jar;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\webservices.jar;C:\Oracle\MIDDLE~1\modules\ORGAPA~1.0/lib/ant-all.jar;C:\Oracle\MIDDLE~1\modules\NETSFA~1.0_1/lib/ant-contrib.jar;.;C:\Program Files\Java\jre1.6.0_03\lib\ext\QTJava.zip;C:\DevSuiteHome_2\jlib\repository.jar;C:\DevSuiteHome_2\jlib\ldapjclnt10.jar;C:\DevSuiteHome_2\jlib\debugger.jar;C:\DevSuiteHome_2\jlib\ewt3.jar;C:\DevSuiteHome_2\jlib\share.jar;C:\DevSuiteHome_2\jlib\utj.jar;C:\DevSuiteHome_2\jlib\zrclient.jar;C:\DevSuiteHome_2\reports\jlib\rwrun.jar;C:\DevSuiteHome_2\forms\java\frmwebutil.jar;C:\DevSuiteHome_2\forms\java\FormsProperties1.jar;C:\DevSuiteHome_2\forms\java\handleimage3.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.jrf_11.1.1/jrf-api.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/common/wlst/resources/jrf-wlst.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.odl_11.1.1/ojdl.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.odl_11.1.1/ojdl2.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.dconfig-infra_11.1.1.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.fabriccommon_11.1.1/fabric-common.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.xdk_11.1.0/xmlparserv2.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.xdk_11.1.0/xml.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.webservices_11.1.1/orawsdl.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.webservices_11.1.1/mdds.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/org.apache.commons.digester_1.7.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/../modules/javax.xml.bind_2.1.1.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/../modules/javax.activation_1.1.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/../modules/javax.xml.stream_1.1.1.0.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.jps_11.1.1/jps-mbeans.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.jps_11.1.1/jps-manifest.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/common/wlst/resources/jps-wlst.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.jps_11.1.1/jps-upgrade.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.http_client_11.1.1.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.jmx_11.1.1/jmxframework.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.jmx_11.1.1/jmxspi.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.adf.dconfigbeans_11.1.1.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.adf.share.ca_11.1.1/adf-share-base.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.adf.share.ca_11.1.1/adf-share-ca.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.adf.share_11.1.1/adflogginghandler.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.adf.share_11.1.1/adfsharembean.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.adf.share_11.1.1/commons-el.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.adf.share_11.1.1/jsp-el-api.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.adf.share_11.1.1/oracle-el.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/common/wlst/resources/sslconfigwlst.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/common/wlst/resources/auditwlst.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/common/wlst/resources/oamap_help.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/common/wlst/resources/ossoiap_help.jar;C:\Oracle\MIDDLE~1\JDEVEL~1\common\wlst\lib\ADF-SH~1.JAR;C:\Oracle\MIDDLE~1\JDEVEL~1\common\wlst\lib\mdswlst.jar;C:\Oracle\MIDDLE~1\JDEVEL~1\common\wlst\RESOUR~1\AUDITW~1.JAR;C:\Oracle\MIDDLE~1\JDEVEL~1\common\wlst\RESOUR~1\jps-wlst.jar;C:\Oracle\MIDDLE~1\JDEVEL~1\common\wlst\RESOUR~1\jrf-wlst.jar;C:\Oracle\MIDDLE~1\JDEVEL~1\common\wlst\RESOUR~1\OAMAP_~1.JAR;C:\Oracle\MIDDLE~1\JDEVEL~1\common\wlst\RESOUR~1\OAMAUT~1.JAR;C:\Oracle\MIDDLE~1\JDEVEL~1\common\wlst\RESOUR~1\ossoiap.jar;C:\Oracle\MIDDLE~1\JDEVEL~1\common\wlst\RESOUR~1\OSSOIA~1.JAR;C:\Oracle\MIDDLE~1\JDEVEL~1\common\wlst\RESOUR~1\SSLCON~1.JAR
    wlst >
    wlst > PATH=C:\Oracle\MIDDLE~1\patch_wls1031\profiles\default\native;C:\Oracle\MIDDLE~1\patch_jdev1111\profiles\default\native;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\native\win\32;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\bin;C:\Oracle\MIDDLE~1\modules\ORGAPA~1.0\bin;C:\Oracle\MIDDLE~1\JDK160~1\jre\bin;C:\Oracle\MIDDLE~1\JDK160~1\bin;C:\DevSuiteHome_3\jdk\jre\bin\classic;C:\DevSuiteHome_3\jdk\jre\bin;C:\DevSuiteHome_3\jdk\jre\bin\client;C:\DevSuiteHome_3\jlib;C:\DevSuiteHome_3\bin;C:\DevSuiteHome_3\jre\1.4.2\bin\client;C:\DevSuiteHome_3\jre\1.4.2\bin;C:\oraclexe\app\oracle\product\10.2.0\server\bin;C:\DevSuiteHome\jdk\jre\bin\classic;C:\DevSuiteHome\jdk\jre\bin;C:\DevSuiteHome\jlib;C:\DevSuiteHome\bin;C:\DevSuiteHome\jre\1.1.8\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Starbase\StarGate SDK\Lib;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Java\jdk1.6.0_07\bin;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\native\win\32\oci920_8
    wlst >
    wlst > Your environment has been set.
    wlst >
    wlst > CLASSPATH=C:\Oracle\MIDDLE~1\patch_wls1031\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\Oracle\MIDDLE~1\patch_jdev1111\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\Oracle\MIDDLE~1\JDK160~1\lib\tools.jar;C:\Oracle\MIDDLE~1\utils\config\10.3.1.0\config-launch.jar;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic_sp.jar;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.jar;C:\Oracle\MIDDLE~1\modules\features\weblogic.server.modules_10.3.1.0.jar;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\webservices.jar;C:\Oracle\MIDDLE~1\modules\ORGAPA~1.0/lib/ant-all.jar;C:\Oracle\MIDDLE~1\modules\NETSFA~1.0_1/lib/ant-contrib.jar;.;C:\Program Files\Java\jre1.6.0_03\lib\ext\QTJava.zip;C:\DevSuiteHome_2\jlib\repository.jar;C:\DevSuiteHome_2\jlib\ldapjclnt10.jar;C:\DevSuiteHome_2\jlib\debugger.jar;C:\DevSuiteHome_2\jlib\ewt3.jar;C:\DevSuiteHome_2\jlib\share.jar;C:\DevSuiteHome_2\jlib\utj.jar;C:\DevSuiteHome_2\jlib\zrclient.jar;C:\DevSuiteHome_2\reports\jlib\rwrun.jar;C:\DevSuiteHome_2\forms\java\frmwebutil.jar;C:\DevSuiteHome_2\forms\java\FormsProperties1.jar;C:\DevSuiteHome_2\forms\java\handleimage3.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.jrf_11.1.1/jrf-api.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/common/wlst/resources/jrf-wlst.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.odl_11.1.1/ojdl.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.odl_11.1.1/ojdl2.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.dconfig-infra_11.1.1.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.fabriccommon_11.1.1/fabric-common.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.xdk_11.1.0/xmlparserv2.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.xdk_11.1.0/xml.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.webservices_11.1.1/orawsdl.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.webservices_11.1.1/mdds.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/org.apache.commons.digester_1.7.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/../modules/javax.xml.bind_2.1.1.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/../modules/javax.activation_1.1.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/../modules/javax.xml.stream_1.1.1.0.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.jps_11.1.1/jps-mbeans.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.jps_11.1.1/jps-manifest.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/common/wlst/resources/jps-wlst.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.jps_11.1.1/jps-upgrade.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.http_client_11.1.1.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.jmx_11.1.1/jmxframework.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.jmx_11.1.1/jmxspi.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.adf.dconfigbeans_11.1.1.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.adf.share.ca_11.1.1/adf-share-base.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.adf.share.ca_11.1.1/adf-share-ca.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.adf.share_11.1.1/adflogginghandler.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.adf.share_11.1.1/adfsharembean.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.adf.share_11.1.1/commons-el.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.adf.share_11.1.1/jsp-el-api.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.adf.share_11.1.1/oracle-el.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/common/wlst/resources/sslconfigwlst.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/common/wlst/resources/auditwlst.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/common/wlst/resources/oamap_help.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/common/wlst/resources/ossoiap_help.jar;C:\Oracle\MIDDLE~1\JDEVEL~1\common\wlst\lib\ADF-SH~1.JAR;C:\Oracle\MIDDLE~1\JDEVEL~1\common\wlst\lib\mdswlst.jar;C:\Oracle\MIDDLE~1\JDEVEL~1\common\wlst\RESOUR~1\AUDITW~1.JAR;C:\Oracle\MIDDLE~1\JDEVEL~1\common\wlst\RESOUR~1\jps-wlst.jar;C:\Oracle\MIDDLE~1\JDEVEL~1\common\wlst\RESOUR~1\jrf-wlst.jar;C:\Oracle\MIDDLE~1\JDEVEL~1\common\wlst\RESOUR~1\OAMAP_~1.JAR;C:\Oracle\MIDDLE~1\JDEVEL~1\common\wlst\RESOUR~1\OAMAUT~1.JAR;C:\Oracle\MIDDLE~1\JDEVEL~1\common\wlst\RESOUR~1\ossoiap.jar;C:\Oracle\MIDDLE~1\JDEVEL~1\common\wlst\RESOUR~1\OSSOIA~1.JAR;C:\Oracle\MIDDLE~1\JDEVEL~1\common\wlst\RESOUR~1\SSLCON~1.JAR;C:\Oracle\MIDDLE~1\WLSERV~1.3\common\eval\pointbase\lib\pbembedded57.jar;C:\Oracle\MIDDLE~1\WLSERV~1.3\common\eval\pointbase\lib\pbclient57.jar;C:\Oracle\MIDDLE~1\WLSERV~1.3\common\eval\pointbase\lib\pbtools57.jar
    wlst >
    wlst > Initializing WebLogic Scripting Tool (WLST) ...
    wlst >
    wlst > Welcome to WebLogic Server Administration Scripting Shell
    wlst >
    wlst > Type help() for help on available commands
    wlst >
    wlst > Extend Default Domain
    wlst > Reading domain: /C:/Documents and Settings/richard anthony/Application Data/JDeveloper/system11.1.1.1.33.54.07/DefaultDomain/
    wlst > Adding domain extension template: /C:/Oracle/Middleware/jdeveloper/common/templates/jdeveloper/adrs_template.jar
    wlst > Adding domain extension template: /C:/Oracle/Middleware/jdeveloper/common/templates/applications/jrf_template_11.1.1.jar
    wlst > Adding domain extension template: /C:/Oracle/Middleware/jdeveloper/common/templates/jdeveloper/adf.fine.logging_11.1.1.jar
    wlst > Updating domain.
    wlst > Error: updateDomain() failed. Do dumpStack() to see details.
    wlst > Problem invoking WLST - Traceback (innermost last):
    wlst > File "C:\Documents and Settings\richard anthony\Application Data\JDeveloper\system11.1.1.1.33.54.07\o.j2ee.adrs\ExtendDefaultDomain.py", line 43, in ?
    wlst > File "C:\Documents and Settings\richard anthony\Local Settings\Temp\WLSTOfflineIni13125804671929424.py", line 89, in updateDomain
    wlst > File "<iostream>", line 154, in ?
    wlst >
    wlst > File "<iostream>", line 103, in updateLoggers
    wlst >
    wlst > SystemExit: Failed to update logging.xml: java.lang.NoSuchMethodError: oracle.core.ojdl.util.XMLUtil.escapeAttrChars(Ljava/lang/String;Ljava/lang/Appendable;)V
    wlst >
    wlst >
    wlst >
    wlst >      at com.bea.plateng.domain.script.jython.CommandExceptionHandler.handleException(CommandExceptionHandler.java:51)
    wlst >
    wlst >      at com.bea.plateng.domain.script.jython.WLScriptContext.handleException(WLScriptContext.java:1490)
    wlst >
    wlst >      at com.bea.plateng.domain.script.jython.WLScriptContext.updateDomain(WLScriptContext.java:425)
    wlst >
    wlst >      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    wlst >
    wlst >      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    wlst >
    wlst >      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    wlst >
    wlst >      at java.lang.reflect.Method.invoke(Method.java:597)
    wlst >
    wlst >
    wlst > com.bea.plateng.domain.script.jython.WLSTException: com.bea.plateng.domain.script.jython.WLSTException: com.bea.plateng.domain.script.ScriptException: Traceback (innermost last):
    wlst >
    wlst > File "<iostream>", line 154, in ?
    wlst >
    wlst > File "<iostream>", line 103, in updateLoggers
    wlst >
    wlst > SystemExit: Failed to update logging.xml: java.lang.NoSuchMethodError: oracle.core.ojdl.util.XMLUtil.escapeAttrChars(Ljava/lang/String;Ljava/lang/Appendable;)V
    wlst >
    wlst >
    wlst >
    Elapsed time: 52625 ms

    Hi,
    Can you try the following steps and let us know if it works?
    1. Create a folder in your c: drive (say c:\myjdevhome)
    2. Invoke the command prompt, set JDEV_USER_HOME=c:\myjdevhome
    3. cd to JDEV_HOME\jdeveloper\jdev\bin
    4. Start the jdev (jdev.exe).
    5. Run/Debug your application.
    -Arun

  • ERROR:  An error occurred while building the default domain

    Hi,
    I have just installed Oracle JDeveloper 11g R1 (Build 5407) (Oracle JDeveloper Studio Edition for Windows (934 MB) ) on my windows laptop, but when I start JDeveloper I get the message : ERROR: An error occurred while building the default domain.
    Does anyone know what this means or how to resolve it?
    Log file:
    Process started
    wlst >
    wlst > CLASSPATH=C:\Oracle\MIDDLE~1\patch_wls1031\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\Oracle\MIDDLE~1\patch_jdev1111\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\Oracle\MIDDLE~1\JDK160~1\lib\tools.jar;C:\Oracle\MIDDLE~1\utils\config\10.3.1.0\config-launch.jar;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic_sp.jar;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.jar;C:\Oracle\MIDDLE~1\modules\features\weblogic.server.modules_10.3.1.0.jar;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\webservices.jar;C:\Oracle\MIDDLE~1\modules\ORGAPA~1.0/lib/ant-all.jar;C:\Oracle\MIDDLE~1\modules\NETSFA~1.0_1/lib/ant-contrib.jar;.;C:\Program Files\Java\jre1.6.0_03\lib\ext\QTJava.zip;C:\DevSuiteHome_2\jlib\repository.jar;C:\DevSuiteHome_2\jlib\ldapjclnt10.jar;C:\DevSuiteHome_2\jlib\debugger.jar;C:\DevSuiteHome_2\jlib\ewt3.jar;C:\DevSuiteHome_2\jlib\share.jar;C:\DevSuiteHome_2\jlib\utj.jar;C:\DevSuiteHome_2\jlib\zrclient.jar;C:\DevSuiteHome_2\reports\jlib\rwrun.jar;C:\DevSuiteHome_2\forms\java\frmwebutil.jar;C:\DevSuiteHome_2\forms\java\FormsProperties1.jar;C:\DevSuiteHome_2\forms\java\handleimage3.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.jrf_11.1.1/jrf-api.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/common/wlst/resources/jrf-wlst.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.odl_11.1.1/ojdl.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.odl_11.1.1/ojdl2.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.dconfig-infra_11.1.1.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.fabriccommon_11.1.1/fabric-common.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.xdk_11.1.0/xmlparserv2.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.xdk_11.1.0/xml.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.webservices_11.1.1/orawsdl.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.webservices_11.1.1/mdds.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/org.apache.commons.digester_1.7.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/../modules/javax.xml.bind_2.1.1.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/../modules/javax.activation_1.1.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/../modules/javax.xml.stream_1.1.1.0.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.jps_11.1.1/jps-mbeans.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.jps_11.1.1/jps-manifest.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/common/wlst/resources/jps-wlst.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.jps_11.1.1/jps-upgrade.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.http_client_11.1.1.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.jmx_11.1.1/jmxframework.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.jmx_11.1.1/jmxspi.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.adf.dconfigbeans_11.1.1.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.adf.share.ca_11.1.1/adf-share-base.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.adf.share.ca_11.1.1/adf-share-ca.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.adf.share_11.1.1/adflogginghandler.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.adf.share_11.1.1/adfsharembean.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.adf.share_11.1.1/commons-el.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.adf.share_11.1.1/jsp-el-api.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.adf.share_11.1.1/oracle-el.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/common/wlst/resources/sslconfigwlst.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/common/wlst/resources/auditwlst.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/common/wlst/resources/oamap_help.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/common/wlst/resources/ossoiap_help.jar;C:\Oracle\MIDDLE~1\JDEVEL~1\common\wlst\lib\ADF-SH~1.JAR;C:\Oracle\MIDDLE~1\JDEVEL~1\common\wlst\lib\mdswlst.jar;C:\Oracle\MIDDLE~1\JDEVEL~1\common\wlst\RESOUR~1\AUDITW~1.JAR;C:\Oracle\MIDDLE~1\JDEVEL~1\common\wlst\RESOUR~1\jps-wlst.jar;C:\Oracle\MIDDLE~1\JDEVEL~1\common\wlst\RESOUR~1\jrf-wlst.jar;C:\Oracle\MIDDLE~1\JDEVEL~1\common\wlst\RESOUR~1\OAMAP_~1.JAR;C:\Oracle\MIDDLE~1\JDEVEL~1\common\wlst\RESOUR~1\OAMAUT~1.JAR;C:\Oracle\MIDDLE~1\JDEVEL~1\common\wlst\RESOUR~1\ossoiap.jar;C:\Oracle\MIDDLE~1\JDEVEL~1\common\wlst\RESOUR~1\OSSOIA~1.JAR;C:\Oracle\MIDDLE~1\JDEVEL~1\common\wlst\RESOUR~1\SSLCON~1.JAR
    wlst >
    wlst > PATH=C:\Oracle\MIDDLE~1\patch_wls1031\profiles\default\native;C:\Oracle\MIDDLE~1\patch_jdev1111\profiles\default\native;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\native\win\32;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\bin;C:\Oracle\MIDDLE~1\modules\ORGAPA~1.0\bin;C:\Oracle\MIDDLE~1\JDK160~1\jre\bin;C:\Oracle\MIDDLE~1\JDK160~1\bin;C:\DOCUME~1\RICHAR~1\LOCALS~1\Temp\sfx93.tmp\jre160_05\bin;C:\OraHome_2\jre\1.4.2\bin\client;C:\OraHome_2\jre\1.4.2\bin;C:\DevSuiteHome_2\jdk\jre\bin\classic;C:\DevSuiteHome_2\jdk\jre\bin;C:\DevSuiteHome_2\jdk\jre\bin\client;C:\DevSuiteHome_2\jlib;C:\DevSuiteHome_2\bin;C:\DevSuiteHome_2\jre\1.4.2\bin\client;C:\DevSuiteHome_2\jre\1.4.2\bin;C:\oraclexe\app\oracle\product\10.2.0\server\bin;C:\DevSuiteHome\jdk\jre\bin\classic;C:\DevSuiteHome\jdk\jre\bin;C:\DevSuiteHome\jlib;C:\DevSuiteHome\bin;C:\DevSuiteHome\jre\1.1.8\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Starbase\StarGate SDK\Lib;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Java\jdk1.6.0_07\bin;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\native\win\32\oci920_8
    wlst >
    wlst > Your environment has been set.
    wlst >
    wlst > CLASSPATH=C:\Oracle\MIDDLE~1\patch_wls1031\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\Oracle\MIDDLE~1\patch_jdev1111\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\Oracle\MIDDLE~1\JDK160~1\lib\tools.jar;C:\Oracle\MIDDLE~1\utils\config\10.3.1.0\config-launch.jar;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic_sp.jar;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.jar;C:\Oracle\MIDDLE~1\modules\features\weblogic.server.modules_10.3.1.0.jar;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\webservices.jar;C:\Oracle\MIDDLE~1\modules\ORGAPA~1.0/lib/ant-all.jar;C:\Oracle\MIDDLE~1\modules\NETSFA~1.0_1/lib/ant-contrib.jar;.;C:\Program Files\Java\jre1.6.0_03\lib\ext\QTJava.zip;C:\DevSuiteHome_2\jlib\repository.jar;C:\DevSuiteHome_2\jlib\ldapjclnt10.jar;C:\DevSuiteHome_2\jlib\debugger.jar;C:\DevSuiteHome_2\jlib\ewt3.jar;C:\DevSuiteHome_2\jlib\share.jar;C:\DevSuiteHome_2\jlib\utj.jar;C:\DevSuiteHome_2\jlib\zrclient.jar;C:\DevSuiteHome_2\reports\jlib\rwrun.jar;C:\DevSuiteHome_2\forms\java\frmwebutil.jar;C:\DevSuiteHome_2\forms\java\FormsProperties1.jar;C:\DevSuiteHome_2\forms\java\handleimage3.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.jrf_11.1.1/jrf-api.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/common/wlst/resources/jrf-wlst.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.odl_11.1.1/ojdl.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.odl_11.1.1/ojdl2.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.dconfig-infra_11.1.1.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.fabriccommon_11.1.1/fabric-common.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.xdk_11.1.0/xmlparserv2.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.xdk_11.1.0/xml.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.webservices_11.1.1/orawsdl.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.webservices_11.1.1/mdds.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/org.apache.commons.digester_1.7.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/../modules/javax.xml.bind_2.1.1.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/../modules/javax.activation_1.1.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/../modules/javax.xml.stream_1.1.1.0.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.jps_11.1.1/jps-mbeans.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.jps_11.1.1/jps-manifest.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/common/wlst/resources/jps-wlst.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.jps_11.1.1/jps-upgrade.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.http_client_11.1.1.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.jmx_11.1.1/jmxframework.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.jmx_11.1.1/jmxspi.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.adf.dconfigbeans_11.1.1.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.adf.share.ca_11.1.1/adf-share-base.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.adf.share.ca_11.1.1/adf-share-ca.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.adf.share_11.1.1/adflogginghandler.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.adf.share_11.1.1/adfsharembean.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.adf.share_11.1.1/commons-el.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.adf.share_11.1.1/jsp-el-api.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/modules/oracle.adf.share_11.1.1/oracle-el.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/common/wlst/resources/sslconfigwlst.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/common/wlst/resources/auditwlst.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/common/wlst/resources/oamap_help.jar;C:\Oracle\MIDDLE~1\JDEVEL~1/common/wlst/resources/ossoiap_help.jar;C:\Oracle\MIDDLE~1\JDEVEL~1\common\wlst\lib\ADF-SH~1.JAR;C:\Oracle\MIDDLE~1\JDEVEL~1\common\wlst\lib\mdswlst.jar;C:\Oracle\MIDDLE~1\JDEVEL~1\common\wlst\RESOUR~1\AUDITW~1.JAR;C:\Oracle\MIDDLE~1\JDEVEL~1\common\wlst\RESOUR~1\jps-wlst.jar;C:\Oracle\MIDDLE~1\JDEVEL~1\common\wlst\RESOUR~1\jrf-wlst.jar;C:\Oracle\MIDDLE~1\JDEVEL~1\common\wlst\RESOUR~1\OAMAP_~1.JAR;C:\Oracle\MIDDLE~1\JDEVEL~1\common\wlst\RESOUR~1\OAMAUT~1.JAR;C:\Oracle\MIDDLE~1\JDEVEL~1\common\wlst\RESOUR~1\ossoiap.jar;C:\Oracle\MIDDLE~1\JDEVEL~1\common\wlst\RESOUR~1\OSSOIA~1.JAR;C:\Oracle\MIDDLE~1\JDEVEL~1\common\wlst\RESOUR~1\SSLCON~1.JAR;C:\Oracle\MIDDLE~1\WLSERV~1.3\common\eval\pointbase\lib\pbembedded57.jar;C:\Oracle\MIDDLE~1\WLSERV~1.3\common\eval\pointbase\lib\pbclient57.jar;C:\Oracle\MIDDLE~1\WLSERV~1.3\common\eval\pointbase\lib\pbtools57.jar
    wlst >
    wlst > Initializing WebLogic Scripting Tool (WLST) ...
    wlst >
    wlst > Welcome to WebLogic Server Administration Scripting Shell
    wlst >
    wlst > Type help() for help on available commands
    wlst >
    wlst > Extend Default Domain
    wlst > Reading domain: /C:/Documents and Settings/richard anthony/Application Data/JDeveloper/system11.1.1.1.33.54.07/DefaultDomain/
    wlst > Adding domain extension template: /C:/Oracle/Middleware/jdeveloper/common/templates/jdeveloper/adrs_template.jar
    wlst > Adding domain extension template: /C:/Oracle/Middleware/jdeveloper/common/templates/applications/jrf_template_11.1.1.jar
    wlst > Adding domain extension template: /C:/Oracle/Middleware/jdeveloper/common/templates/jdeveloper/adf.fine.logging_11.1.1.jar
    wlst > Updating domain.
    wlst > Error: updateDomain() failed. Do dumpStack() to see details.
    wlst > Problem invoking WLST - Traceback (innermost last):
    wlst > File "C:\Documents and Settings\richard anthony\Application Data\JDeveloper\system11.1.1.1.33.54.07\o.j2ee.adrs\ExtendDefaultDomain.py", line 43, in ?
    wlst > File "C:\Documents and Settings\richard anthony\Local Settings\Temp\WLSTOfflineIni5366665589360917524.py", line 89, in updateDomain
    wlst > File "<iostream>", line 154, in ?
    wlst >
    wlst > File "<iostream>", line 103, in updateLoggers
    wlst >
    wlst > SystemExit: Failed to update logging.xml: java.lang.NoSuchMethodError: oracle.core.ojdl.util.XMLUtil.escapeAttrChars(Ljava/lang/String;Ljava/lang/Appendable;)V
    wlst >
    wlst >
    wlst >
    wlst >      at com.bea.plateng.domain.script.jython.CommandExceptionHandler.handleException(CommandExceptionHandler.java:51)
    wlst >
    wlst >      at com.bea.plateng.domain.script.jython.WLScriptContext.handleException(WLScriptContext.java:1490)
    wlst >
    wlst >      at com.bea.plateng.domain.script.jython.WLScriptContext.updateDomain(WLScriptContext.java:425)
    wlst >
    wlst >      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    wlst >
    wlst >      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    wlst >
    wlst >      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    wlst >
    wlst >      at java.lang.reflect.Method.invoke(Method.java:597)
    wlst >
    wlst >
    wlst > com.bea.plateng.domain.script.jython.WLSTException: com.bea.plateng.domain.script.jython.WLSTException: com.bea.plateng.domain.script.ScriptException: Traceback (innermost last):
    wlst >
    wlst > File "<iostream>", line 154, in ?
    wlst >
    wlst > File "<iostream>", line 103, in updateLoggers
    wlst >
    wlst > SystemExit: Failed to update logging.xml: java.lang.NoSuchMethodError: oracle.core.ojdl.util.XMLUtil.escapeAttrChars(Ljava/lang/String;Ljava/lang/Appendable;)V
    wlst >
    wlst >
    wlst >
    Elapsed time: 16359 ms

    Hi,
    This might be caused by a conflict with something already in your CLASSPATH. I would suggest the following:
    1. Shut down JDeveloper if it is already running. Delete the default domain directory:
    rd /s "C:\Documents and Settings\richard anthony\Application Data\JDeveloper\system11.1.1.1.33.54.07\DefaultDomain"
    2. From a command prompt, clear your CLASSPATH:
    set CLASSPATH=
    3. Start JDeveloper using the same command prompt as step 2:
    C:\Oracle\Middleware\jdeveloper\jdev\bin\jdev
    If the problem was with the pre-existing CLASSPATH, the default domain should now build successfully.
    -Nathan

  • 12c BP1 Oracle Chargeback plugin  deployment failed when config webtier

    Plugin version is 12.1.0.2.0,
    It failed at config WebTier stage.
    From pluginca trc file, it shows
    EMPluginDeploymentStep:{ OMS_CONFIG ; FAILED
    Further check the content of configplugin_all_2012-07-04_21-40-01.trc shows:
    2012-07-04 21:42:13,968 [main] DEBUG pluginca.PluginCADriver - Deploying all plug-ins at once using templates
    2012-07-04 21:42:13,969 [main] DEBUG pluginca.PluginCADriver - Setting WLST properties value to: -Dweblogic.security.TrustKeyStore=DemoTrust -Dweblogic.security.SSL.ignoreHostnameVerification=true -Djava.security.egd=file:///dev/./urandom
    2012-07-04 21:42:13,969 [main] INFO pluginca.PluginCADriver - Executing the command: /u01/app/oracle/middleware/oracle_common/common/bin/wlst.sh /u01/app/oracle/middleware/oms/sysman/pluginca/scripts/wls/template.py abc.xyz.com 7101 7403 weblogic nodemanager EMGC_OMS1 abc.xyz.com GCDomain /u01/app/oracle/middleware/oms/sysman/omsca/scripts/wls
    Initializing WebLogic Scripting Tool (WLST) ...
    ...(all normal msg)...
    ..(some security info, <Notice> <Security> <BEA-090898> ...)
    Successfully Connected to Node Manager.
    FAILED_NOT_RESTARTABLE
    Wed Jul 04 21:42:20 SGT 2012
    Adding plug-in templates
    Already connected to a Node Manager
    FAILED_NOT_RESTARTABLE
    Starting server EMGC_ADMINSERVER ...
    Error Starting server EMGC_ADMINSERVER: weblogic.nodemanager.NMException: Exception while starting server 'EMGC_ADMINSERVER'
    Connecting to t3s:/abc.xyz.com:7101 with userid weblogic ...
    ...(some <Notice> <Security> <BEA-090898> )
    Successfully connected to Admin Server 'EMGC_ADMINSERVER' that belongs to domain 'GCDomain'.
    Wed Jul 04 21:45:31 SGT 2012
    Admin server started successfully....
    Disconnected from weblogic server: EMGC_ADMINSERVER
    FAILED_NOT_RESTARTABLE
    Wed Jul 04 21:45:31 SGT 2012
    Error Starting Admin Server5
    Wed Jul 04 21:45:31 SGT 2012
    SEVERE: Exception: during deployment of plug-in template done
    Wed Jul 04 21:45:31 SGT 2012
    Name of Exception: exceptions.SystemExit
    Wed Jul 04 21:45:31 SGT 2012
    Code of Exception: 5
    Wed Jul 04 21:45:31 SGT 2012
    <traceback object at 1>
    Wed Jul 04 21:45:31 SGT 2012
    SEVERE: Exception: during deploying Plug-in template
    Wed Jul 04 21:45:31 SGT 2012
    Name of Exception: exceptions.SystemExit
    Wed Jul 04 21:45:31 SGT 2012
    Code of Exception: 65
    Wed Jul 04 21:45:31 SGT 2012
    <traceback object at 2>
    Then it tries to run wlst again, and failed with same information.
    Can anyone help on this issue. Or share some idea about how to investigate into this wlst issue.
    Thanks,
    Frank
    Edited by: FrankWang on 2012-7-27 上午10:16

    Try re-starting admin server by doing:
    1) emctl stop oms -all
    2) Check if any java processes are running from middleware (ps -ef | grep EMGC_ADMINSERVER, ps -ef | grep EMGC_OMS1, ps -ef | grep <MW_HOME>) and kill them using 'kill -9'
    3) emctl start oms
    4) Re-try plug-in deployment
    I think as long as admin server is in FAILED_NOT_RESTARTABLE state, plug-in deployment cannot succeed.

  • EM12c Upgrade failing at OMS  Configuration

    I'm in the process of upgrading and migrating from EM 10.2.0.5 on AIX 6.1 to EM12c on RHEL 6.2 via the 2-System Upgrade method. I've been following the steps in the MOS Note "EM 12c: Upgrading to Enterprise Manager Cloud Control 12.1.0.1 on Linux x86_64 with the 2-System Method [ID 1367919.1]".
    During the OMS upgrade OMS Configuration Assistant is failing with the following error:
    INFO: oracle.sysman.top.oms:About to execute plug-in OMS Configuration
    INFO: oracle.sysman.top.oms:The plug-in OMS Configuration is running
    INFO: oracle.sysman.top.oms:Internal PlugIn Class: oracle.sysman.oms.OMSConfiguration
    INFO: oracle.sysman.top.oms:Classpath = /u02/Oracle/Middleware/oms/sysman/jlib/omsConfig.jar:/u02/Oracle/Middleware/oms/../modules/com.bea.core.apache.log4j_1.2.13.jar:/u02/Oracle/Middleware/oms/jlib/emConfigInstall.jar:/u02/Oracle/Middleware/oms/sysman/jlib/emagentSDK.jar:/u02/Oracle/Middleware/oms/jdbc/lib/ojdbc5.jar:/u02/Oracle/Middleware/oms/jdbc/lib/ojdbc14dms.jar:/u02/Oracle/Middleware/oms/jlib/rcu.jar:/u02/Oracle/Middleware/oms/jlib/rcucommon.jar:/u02/Oracle/Middleware/oms/sysman/jlib/emCORE.jar:/u02/Oracle/Middleware/oms/sysman/jlib/emcore_client.jar:/u02/Oracle/Middleware/oms/../oracle_common/modules/oracle.odl_11.1.1/dms.jar:/u02/Oracle/Middleware/oms/../oracle_common/modules/oracle.odl_11.1.1/ojdl.jar:/u02/Oracle/Middleware/oms/lib/xmlparserv2.jar:/u02/Oracle/Middleware/oms/sysman/jlib/com.bea.core.apache.log4j_1.2.13.jar:/u02/Oracle/Middleware/oms/sysman/jlib/emCoreSDKImpl.jar
    INFO: oracle.sysman.top.oms:BaseConfiguration:invoke:Starting BaseConfiguration invoke method on an aggregate=oracle.sysman.top.oms for Action=configuration in step=5:microstep=0
    INFO: oracle.sysman.top.oms:Fetcing ports from teh static ports file: /u02/Oracle/Middleware/.gcinstall_temp/staticports.ini
    INFO: oracle.sysman.top.oms:Setting agent aggregate xml
    INFO: oracle.sysman.top.oms:Date: Wed Sep 19 22:07:47 CDT 2012
    INFO: oracle.sysman.top.oms:COMMAND: /u02/Oracle/Middleware/oms/bin/omsca NEW -RESPONSE_FILE /u02/Oracle/Middleware/oms/omscarespfile -lock_console -lock_upload -CONFIGURE_REPEATER true -nostart
    INFO: oracle.sysman.top.oms:
    Check the OMS Configuration Assistant logs at: /u02/Oracle/Middleware/oms/cfgtoollogs/omsca
    INFO: oracle.sysman.top.oms:Oracle Enterprise Manager 11g Release 1 Grid Control
    INFO: oracle.sysman.top.oms:Copyright (c) 2009, 2010, Oracle. All rights reserved.
    INFO: oracle.sysman.top.oms:
    INFO: oracle.sysman.top.oms:Doing pre requisite checks ......
    INFO: oracle.sysman.top.oms:Pre requisite checks completed successfully
    INFO: oracle.sysman.top.oms:
    INFO: oracle.sysman.top.oms:Doing infrastructure setup ......
    INFO: oracle.sysman.top.oms:Infrastructure setup of EM completed successfully.
    INFO: oracle.sysman.top.oms:
    INFO: oracle.sysman.top.oms:Doing pre deployment operations ......
    INFO: oracle.sysman.top.oms:Pre deployment of EM completed successfully.
    INFO: oracle.sysman.top.oms:
    INFO: oracle.sysman.top.oms:Deploying EM ......
    INFO: oracle.sysman.top.oms:Deployment of EM completed successfully.
    INFO: oracle.sysman.top.oms:
    INFO: oracle.sysman.top.oms:Configuring webtier ......
    INFO: oracle.sysman.top.oms:Configuring webTier completed successfully.
    INFO: oracle.sysman.top.oms:
    INFO: oracle.sysman.top.oms:Securing OMS ......
    INFO: oracle.sysman.top.oms:java.lang.Exception: emkey is not present in repository and backup is not present on file system. Hence emkey cannot be copied to credstore.
    INFO: oracle.sysman.top.oms:     at oracle.sysman.omsca.adapter.wls.OMSWLSAdapter.adapterPostDeployAndReposSetup(OMSWLSAdapter.java:2749)
    INFO: oracle.sysman.top.oms:     at oracle.sysman.omsca.framework.OMSGenericAdapter.postDeployAndReposSetup(OMSGenericAdapter.java:327)
    INFO: oracle.sysman.top.oms:     at oracle.sysman.omsca.framework.OMSCAFreshInstall.execute(OMSCAFreshInstall.java:193)
    INFO: oracle.sysman.top.oms:     at oracle.sysman.omsca.framework.OMSConfigAssistantDriver.main(OMSConfigAssistantDriver.java:221)
    INFO: oracle.sysman.top.oms:OMSCA-ERR:Securing of OMS failed
    INFO: oracle.sysman.top.oms:
    INFO: oracle.sysman.top.oms:OMSCA-ERR:Post "Deploy and Repos Setup" operations failed. Check the trace file:/u02/Oracle/Middleware/oms/cfgtoollogs/omsca/omsca_20120820220747.log
    INFO: oracle.sysman.top.oms:
    Check the OMS Configuration Assistant logs at: /u02/Oracle/Middleware/oms/cfgtoollogs/omsca
    INFO: oracle.sysman.top.oms:The plug-in OMS Configuration has failed its perform method
    Looking at the OMS CA logs I'm seeing these errors:
    SEVERE: Exception: during deploying OWSM
    Name of Exception: exceptions.SystemExit
    Code of Exception: 11
    <traceback object at 3>
    com.oracle.cie.domain.script.jython.WLSTException: com.oracle.cie.domain.script.ScriptException: The domain directory must exist and contain config/config.xml
    at com.oracle.cie.domain.script.jython.CommandExceptionHandler.handleException(CommandExceptionHandler.java:51)
    at com.oracle.cie.domain.script.jython.WLScriptContext.handleException(WLScriptContext.java:1538)
    at com.oracle.cie.domain.script.jython.WLScriptContext.readDomain(WLScriptContext.java:396)
    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:597)
    at org.python.core.PyReflectedFunction.__call__(Unknown Source)
    at org.python.core.PyMethod.__call__(Unknown Source)
    at org.python.core.PyObject.__call__(Unknown Source)
    at org.python.core.PyInstance.invoke(Unknown Source)
    at org.python.pycode._pyx3.readDomain$18(/tmp/WLSTOfflineIni2832777503027975460.py:83)
    at org.python.pycode._pyx3.call_function(/tmp/WLSTOfflineIni2832777503027975460.py)
    at org.python.core.PyTableCode.call(Unknown Source)
    at org.python.core.PyTableCode.call(Unknown Source)
    at org.python.core.PyFunction.__call__(Unknown Source)
    at org.python.pycode._pyx47.configureOWSM$1(/u02/Oracle/Middleware/oms/sysman/omsca/scripts/wls/owsm.py:26)
    at org.python.pycode._pyx47.call_function(/u02/Oracle/Middleware/oms/sysman/omsca/scripts/wls/owsm.py)
    at org.python.core.PyTableCode.call(Unknown Source)
    at org.python.core.PyTableCode.call(Unknown Source)
    at org.python.core.PyFunction.__call__(Unknown Source)
    at org.python.pycode._pyx47.f$0(/u02/Oracle/Middleware/oms/sysman/omsca/scripts/wls/owsm.py:103)
    at org.python.pycode._pyx47.call_function(/u02/Oracle/Middleware/oms/sysman/omsca/scripts/wls/owsm.py)
    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.util.PythonInterpreter.execfile(Unknown Source)
    at weblogic.management.scripting.WLST.main(WLST.java:124)
    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:597)
    at weblogic.WLST.main(WLST.java:29)
    Caused by: com.oracle.cie.domain.script.ScriptException: The domain directory must exist and contain config/config.xml
    at com.oracle.cie.domain.script.ScriptExecutor.readTemplate(ScriptExecutor.java:448)
    at com.oracle.cie.domain.script.jython.WLScriptContext.readDomain(WLScriptContext.java:388)
    ... 30 more
    Aug 20, 2012 10:11:11 PM oracle.sysman.omsca.adapter.wls.OMSWLSAdapter adapterPostDeployAndReposSetup
    FINE: Done Deploying OWSM11
    Aug 20, 2012 10:11:11 PM oracle.sysman.omsca.framework.OMSGenericAdapter postDeployAndReposSetup
    SEVERE: OMSCA-ERR:Post "Deploy and Repos Setup" operations failed. Check the trace file:/u02/Oracle/Middleware/oms/cfgtoollogs/omsca/omsca_20120820220747.log
    Aug 20, 2012 10:11:11 PM oracle.sysman.omsca.framework.OMSCAFreshInstall execute
    SEVERE: Post "Deploy and Repos Setup" operations failed.
    Aug 20, 2012 10:11:11 PM oracle.sysman.omsca.framework.OMSConfigAssistantDriver main
    FINE: Got resultfalse
    Has anyone seen this before?
    Thanks,
    Leighton

    If you follow Sushil's link, the step you should have performed is mentioned in (e) : the emkey should be copied before taking backup; it's mentioned clearly.
    Please share exact steps you did to copy the emkey
    - when did you run "emctl config emkey" command ; it seems you run it after backup and before starting upgrade to 12c. Please confirm
    - did you see a 12c Installer error message for missing emkey ? did that prompt you to copy the emkey?
    - on which box/oms you run the "emctl config emkey" command
    - which repository details did you use in "emctl config emkey" command; because at this point of time you have a repository of the old running EM and a cloned repository ( from old EM )
    Thank you.
    Suman

  • How to download Hibernate Tutorial Workshop to PC with no internet connect

    Hi,
    How to download Hibernate Tutorial Workshop to PC with no internet connection?
    Is there any zip file on BEA site where I can download and import the hibernate tutorial to the Workshop on the PC with no internet connection?

    Ram,
    Could you add this to the Wiki page? Add it as an Wiki entry instead of
    the formal support doc?
    http://dev2dev.bea.com/wiki/bin/view/ProdTech/WorkshopFAQ
    br
    Ram Venkataswamy wrote:
    Yes, you can download the tutorial on a system with internet connection and then use that war file on the system w/o connection.
    On a system with internet connection, download https://dev2devclub.bea.com/downloads/examples/hibernate-tutorial.war
    copy the war file to the actual systemEx: ....\workspace\metadata\.plugins\com.m7.nitrox\.examples
    Launch Workshop, New > Example > Workshop Hibernate Example > continue with creating the project (local copy would be used instead of downloading from internet).

  • Configuration assistant "OMS Configuration" Failed

    Jul 14, 2011 10:07:07 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE:
    Jul 14, 2011 10:07:07 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Initializing WebLogic Scripting Tool (WLST) ...
    Jul 14, 2011 10:07:07 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE:
    Jul 14, 2011 10:07:35 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Welcome to WebLogic Server Administration Scripting Shell
    Jul 14, 2011 10:07:35 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE:
    Jul 14, 2011 10:07:35 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Type help() for help on available commands
    Jul 14, 2011 10:07:35 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE:
    Jul 14, 2011 10:07:35 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Creating infrastructure for EM Setup
    Jul 14, 2011 10:07:36 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Script dir: /test01/weblogic/oms11g/sysman/omsca/scripts/wls
    Jul 14, 2011 10:07:36 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Admin host name:s80_02.com.cn
    Jul 14, 2011 10:07:36 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Admin http port is:0
    Jul 14, 2011 10:07:36 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Admin https port is:7101
    Jul 14, 2011 10:07:36 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Node Manager port is:7401
    Jul 14, 2011 10:07:36 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Admin Server user is:weblogic
    Jul 14, 2011 10:07:36 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Node Manager user is:nodemanager
    Jul 14, 2011 10:07:36 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Mode Passed is:new
    Jul 14, 2011 10:07:36 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Java vendor is:Sun
    Jul 14, 2011 10:07:36 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: domain name is:GCDomain
    Jul 14, 2011 10:07:36 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: managed server host is:s80_02.com.cn
    Jul 14, 2011 10:07:36 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Loading the common properties
    Jul 14, 2011 10:07:36 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Loading commen def file
    Jul 14, 2011 10:07:36 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE:
    Jul 14, 2011 10:07:36 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Thu Jul 14 10:07:36 GMT+08:00 2011
    Jul 14, 2011 10:07:36 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Fetching oracleHome
    Jul 14, 2011 10:07:36 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Thu Jul 14 10:07:36 GMT+08:00 2011
    Jul 14, 2011 10:07:36 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Oracle Home is:/test01/weblogic/oms11g
    Jul 14, 2011 10:07:36 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Thu Jul 14 10:07:36 GMT+08:00 2011
    Jul 14, 2011 10:07:36 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Fetching common oracle home
    Jul 14, 2011 10:07:36 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Thu Jul 14 10:07:36 GMT+08:00 2011
    Jul 14, 2011 10:07:36 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: common oracle home is:/test01/weblogic/oracle_common
    Jul 14, 2011 10:07:36 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Thu Jul 14 10:07:36 GMT+08:00 2011
    Jul 14, 2011 10:07:36 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Fetching domain_home
    Jul 14, 2011 10:07:36 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Thu Jul 14 10:07:36 GMT+08:00 2011
    Jul 14, 2011 10:07:36 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Domain Home is:/test01/gc_inst/user_projects/domains/GCDomain
    Jul 14, 2011 10:07:36 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Thu Jul 14 10:07:36 GMT+08:00 2011
    Jul 14, 2011 10:07:36 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Fetching weblogic Home
    Jul 14, 2011 10:07:36 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Thu Jul 14 10:07:36 GMT+08:00 2011
    Jul 14, 2011 10:07:36 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: weblogic home is:/test01/weblogic/wlserver_10.3
    Jul 14, 2011 10:07:36 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Thu Jul 14 10:07:36 GMT+08:00 2011
    Jul 14, 2011 10:07:36 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: node manager home is:/test01/weblogic/wlserver_10.3/common/emnodemanager20110714100645
    Jul 14, 2011 10:07:36 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Thu Jul 14 10:07:36 GMT+08:00 2011
    Jul 14, 2011 10:07:36 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: admin template location is:/test01/weblogic/wlserver_10.3/common/templates/domains/wls.jar
    Jul 14, 2011 10:07:36 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Thu Jul 14 10:07:36 GMT+08:00 2011
    Jul 14, 2011 10:07:36 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Done Fetching passwords
    Jul 14, 2011 10:07:36 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Thu Jul 14 10:07:36 GMT+08:00 2011
    Jul 14, 2011 10:07:36 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Done Loading the start Domain routines
    Jul 14, 2011 10:07:36 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Thu Jul 14 10:07:36 GMT+08:00 2011
    Jul 14, 2011 10:07:36 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Done Loading with the properties
    Jul 14, 2011 10:07:36 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Thu Jul 14 10:07:36 GMT+08:00 2011
    Jul 14, 2011 10:07:36 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Calling CreateDomain
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Error: setListenAddress() failed. Do dumpStack() to see details.
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: SEVERE: Exception: during createDomain()
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Thu Jul 14 10:08:05 GMT+08:00 2011
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Name of Exception: java.lang.reflect.UndeclaredThrowableException
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: SEVERE: Exception: during createDomain()
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Code of Exception: java.lang.reflect.UndeclaredThrowableException
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Thu Jul 14 10:08:05 GMT+08:00 2011
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: <traceback object at 1>
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Name of Exception: java.lang.reflect.UndeclaredThrowableException
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: com.bea.plateng.domain.script.jython.WLSTException: com.bea.plateng.domain.script.ScriptException: com.bea.plateng.domain.ValidateException: Property "
    Listen address" of Server "EMGC_ADMINSERVER" is invalid.
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Thu Jul 14 10:08:05 GMT+08:00 2011
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: The entered value is not a valid hostname. Please use only alphanumeric characters and dot (.) and dash (-).
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Code of Exception: java.lang.reflect.UndeclaredThrowableException
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: at com.bea.plateng.domain.script.jython.CommandExceptionHandler.handleException(CommandExceptionHandler.java:51)
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Thu Jul 14 10:08:05 GMT+08:00 2011
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: at com.bea.plateng.domain.script.jython.WLScriptContext.handleException(WLScriptContext.java:1497)
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: <traceback object at 1>
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: at com.bea.plateng.domain.script.jython.ScriptInvocationHandler.invoke(ScriptInvocationHandler.java:141)
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: at $Proxy1.setListenAddress(Unknown Source)
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Thu Jul 14 10:08:05 GMT+08:00 2011
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: at java.lang.reflect.Method.invoke(Method.java:611)
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Error creating domain1
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: at org.python.core.PyReflectedFunction.__call__(Unknown Source)
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Name of Exception: exceptions.SystemExit
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: at org.python.core.PyMethod.__call__(Unknown Source)
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Code of Exception: 1
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: at org.python.core.PyObject.__call__(Unknown Source)
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Thu Jul 14 10:08:05 GMT+08:00 2011
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: at org.python.core.PyInstance.invoke(Unknown Source)
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: SEVERE: Exception: during create_em_infra
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: at org.python.pycode._pyx42.createDomain$1(/test01/weblogic/oms11g/sysman/omsca/scripts/wls/create_domain.py:60)
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Thu Jul 14 10:08:05 GMT+08:00 2011
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: at org.python.pycode._pyx42.call_function(/test01/weblogic/oms11g/sysman/omsca/scripts/wls/create_domain.py)
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Name of Exception: exceptions.SystemExit
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: at org.python.core.PyTableCode.call(Unknown Source)
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Thu Jul 14 10:08:05 GMT+08:00 2011
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: at org.python.core.PyTableCode.call(Unknown Source)
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Code of Exception: 1
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: at org.python.core.PyFunction.__call__(Unknown Source)
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Thu Jul 14 10:08:05 GMT+08:00 2011
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: at org.python.pycode._pyx39.f$0(/test01/weblogic/oms11g/sysman/omsca/scripts/wls/create_em_infra.py:65)
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: <traceback object at 2>
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: at org.python.pycode._pyx39.call_function(/test01/weblogic/oms11g/sysman/omsca/scripts/wls/create_em_infra.py)
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Connecting to Node Manager ...
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: at org.python.core.PyTableCode.call(Unknown Source)
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: at org.python.core.PyCode.call(Unknown Source)
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: at org.python.core.Py.runCode(Unknown Source)
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: at org.python.util.PythonInterpreter.execfile(Unknown Source)
    Jul 14, 2011 10:08:05 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: at weblogic.management.scripting.WLST.main(WLST.java:131)
    Jul 14, 2011 10:08:06 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    Jul 14, 2011 10:08:06 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
    Jul 14, 2011 10:08:06 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    Jul 14, 2011 10:08:06 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: at java.lang.reflect.Method.invoke(Method.java:611)
    Jul 14, 2011 10:08:06 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: at weblogic.WLST.main(WLST.java:29)
    Jul 14, 2011 10:08:06 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Caused by: com.bea.plateng.domain.script.ScriptException: com.bea.plateng.domain.ValidateException: Property "Listen address" of Server "EMGC_ADMINSERV
    ER" is invalid.
    Jul 14, 2011 10:08:06 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: The entered value is not a valid hostname. Please use only alphanumeric characters and dot (.) and dash (-).
    Jul 14, 2011 10:08:06 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: at com.bea.plateng.domain.script.ScriptExecutor.setValue(ScriptExecutor.java:1317)
    Jul 14, 2011 10:08:06 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: at com.bea.plateng.domain.script.jython.ScriptInvocationHandler.set(ScriptInvocationHandler.java:215)
    Jul 14, 2011 10:08:06 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: at com.bea.plateng.domain.script.jython.ScriptInvocationHandler.invoke(ScriptInvocationHandler.java:101)
    Jul 14, 2011 10:08:06 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: ... 26 more
    Jul 14, 2011 10:08:06 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: Caused by: com.bea.plateng.domain.ValidateException: Property "Listen address" of Server "EMGC_ADMINSERVER" is invalid.
    Jul 14, 2011 10:08:06 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: The entered value is not a valid hostname. Please use only alphanumeric characters and dot (.) and dash (-).
    Jul 14, 2011 10:08:06 AM oracle.sysman.omsca.util.ProcessOutputReader run
    FINE: at com.bea.plateng.domain.aspect.XBeanConfigAspect.selfValidate(XBeanConfigAspect.java:635)
    Jul 14, 2011 10:08:06 AM oracle.sysman.omsca.util.ProcessOutputReader run
    omsca_20110714100644.log (16%)

    Hi according to RFC 952 and RFC 1123 which explain the rules for hostnames the underscore (_) is not allowed in the hostname.
    This most likely causes the problem in your case.
    Kind regards,
    Frank

  • Can't start OMS (GC 11g)

    Hi guys!
    Today I can't start GC:
    Oracle Management Server is Down
    [oracle@oem ohs1]$ /opt/oracle/mware/oms11g/bin/emctl start oms
    Oracle Enterprise Manager 11g Release 1 Grid Control
    Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
    Starting WebTier...
    WebTier Successfully Started
    Starting Oracle Management Server...
    Error Occurred: startOMS failed. Check error and log files.In emctl.log:
    2011-05-12 15:43:49,481 [Thread-1] INFO  wls.OMSController run.1094 - <OUT>Failed to connect to node manager after starting it
    2011-05-12 15:43:49,481 [Thread-1] INFO  wls.OMSController run.1094 - <OUT>Failed to start node manager
    2011-05-12 15:43:49,482 [Thread-1] INFO  wls.OMSController run.1094 - <OUT>Exception:  exceptions.SystemExit  value:
    2011-05-12 15:43:49,483 [Thread-1] INFO  wls.OMSController run.1094 - <OUT>
    2011-05-12 15:43:49,484 [Thread-1] INFO  wls.OMSController run.1094 - <OUT>_END_
    2011-05-12 15:43:49,484 [Thread-2] INFO  wls.OMSController run.1094 - <ERR>_END_
    2011-05-12 15:43:50,101 [main] INFO  wls.OMSController processCmd.988 - wlst process is finished
    2011-05-12 15:43:50,101 [main] INFO  wls.OMSController processCmd.990 - wlst process exited with code 125
    2011-05-12 15:43:50,101 [main] INFO  wls.OMSController processCmd.992 - wlst outstream joined
    2011-05-12 15:43:50,102 [main] INFO  wls.OMSController processCmd.994 - wlst errstream joined
    2011-05-12 15:43:50,103 [main] DEBUG oms.StatusOMSCmd processStatusOMS.138 - HTTP port in emgc property file: 7202
    2011-05-12 15:43:50,104 [main] DEBUG oms.StatusOMSCmd processStatusOMS.139 - HTTPS port in emgc property file: 7301
    2011-05-12 15:43:50,104 [main] DEBUG oms.StatusOMSCmd processStatusOMS.155 - Using http port.
    2011-05-12 15:43:50,167 [main] DEBUG oms.StatusOMSCmd processStatusOMS.195 - Attempting to connect to http://oem.host.local:7202/em/console/logon/logon
    2011-05-12 15:43:50,189 [main] INFO  oms.StatusOMSCmd processStatusOMS.233 - Failed to connect to em login page
    2011-05-12 15:43:50,189 [main] INFO  oms.StatusOMSCmd processStatusOMS.234 - Connection refused
    2011-05-12 15:43:50,189 [main] INFO  wls.OMSController statusOMS.950 - statusOMS finished with result: 8
    2011-05-12 15:43:50,189 [main] ERROR wls.OMSController main.258 - OMSController failed for start oms
    2011-05-12 15:43:50,191 [main] ERROR wls.OMSController main.259 - OMSController Error: startOMS failed. Check error and log files.
    java.lang.Exception: startOMS failed. Check error and log files.
            at oracle.sysman.emctl.wls.OMSController.startOMS(OMSController.java:599)
            at oracle.sysman.emctl.wls.OMSController.main(OMSController.java:213)Thanks in advance!
    Sincerely,
    Pavel.

    I solved this issue:
    file nodemanager.domains didn't exist in $OWS_HOME/emnodemanager, but existed in $OWS_HOME/nodemanager. I did cp and oms start successfully. Who dropped this file I don't know :(
    Sincerely,
    Pavel.

  • [SOLVED]Install Scribes after Archlinux's python3 update from october

    I would like to install scribes with the latest updates, but since Archlinux switched to Python3 by default (in october), I am unable to do so.
    Before the update, i ran without problem:
    bzr branch lp:scribes
    cd scribes
    sh autogen.sh
    make
    sudo make install
    But now I can't pass autogen.sh :
    checking what language compliance flags to pass to the C++ compiler...
    checking for a Python interpreter with version >= 2.5... python
    checking for python... /usr/bin/python
    checking for python version... 3.1
    checking for python platform... linux2
    checking for python script directory... ${prefix}/lib/python3.1/site-packages
    checking for python extension module directory... ${exec_prefix}/lib/python3.1/site-packages
    configure: error: Error: Dependency check failed
    In conf.log there is:
    configure:6227: ./conftest
    File "depcheck.py", line 10
    print "Checking for D-Bus (Python Bindings)... yes"
    ^
    SyntaxError: invalid syntax
    So I run 2to3 on the depcheck.py file in the folder:
    2to3 -w depcheck.py
    And I get:
    checking for a Python interpreter with version >= 2.5... python
    checking for python... /usr/bin/python
    checking for python version... 3.1
    checking for python platform... linux2
    checking for python script directory... ${prefix}/lib/python3.1/site-packages
    checking for python extension module directory... ${exec_prefix}/lib/python3.1/site-packages
    Error: Python bindings for D-Bus was not found.
    configure: error: Error: Dependency check failed
    In depcheck.py, the error is launched when:
    # Check for D-Bus Python Bindings.
    try:
    import dbus
    if dbus.version < (0, 70, 0): raise AssertionError
    print("Checking for D-Bus (Python Bindings)... yes")
    except ImportError:
    print("Error: Python bindings for D-Bus was not found.")
    raise SystemExit
    except AssertionError:
    print("Error: Version 0.70 or better of dbus-python needed.")
    raise SystemExit
    It turns out I can't access dbus module from python3:
    $ python
    Python 3.1.3 (r313:86834, Dec 1 2010, 12:35:23)
    [GCC 4.5.1 20101125 (prerelease)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import dbus
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    ImportError: No module named dbus
    >>>
    $ python2
    Python 2.7.1 (r271:86832, Dec 2 2010, 03:10:07)
    [GCC 4.5.1 20101125 (prerelease)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import dbus
    >>>
    But anyway, scribes is written with python2 syntax in mind, so let's use it :
    $ export PYTHONPATH=/usr/lib/python2.7
    I now re-run ./autogen.sh :
    checking what language compliance flags to pass to the C++ compiler...
    checking for a Python interpreter with version >= 2.5... ./configure: line 6015: 17533 Aborted ( $am_cv_pathless_PYTHON -c "$prog" ) 1>&5 2>&5
    python2
    checking for python2... /usr/bin/python2
    checking for python2 version... 2.7
    checking for python2 platform... linux2
    checking for python2 script directory... ${prefix}/lib/python2.7/site-packages
    checking for python2 extension module directory... ${exec_prefix}/lib/python2.7/site-packages
    configure: error: Error: Dependency check failed
    In conf.log, there is now:
    configure:6191: result: ${exec_prefix}/lib/python2.7/site-packages
    configure:6227: gcc -o conftest -g -O2 conftest.c >&5
    configure:6227: $? = 0
    configure:6227: ./conftest
    Fatal Python error: Py_Initialize: can't initialize sys standard streams
    Traceback (most recent call last):
    File "/usr/lib/python2.7/encodings/utf_8.py", line 9, in <module>
    configure:6227: $? = 1
    configure: program exited with status 1
    configure: failed program was:
    | /* confdefs.h */
    | #define PACKAGE_NAME "scribes"
    But with the PYTHONPATH set, I can't even start the python interpreter (python2 still works fine):
    $ python
    Fatal Python error: Py_Initialize: can't initialize sys standard streams
    Traceback (most recent call last):
    File "/usr/lib/python2.7/encodings/utf_8.py", line 9, in <module>
    Aborted
    I can still start scribes without compiling it, but then on the console, the same error appears:
    $ python2 scribes.in
    Fatal Python error: Py_Initialize: can't initialize sys standard streams
    Traceback (most recent call last):
    File "/usr/lib/python2.7/encodings/utf_8.py", line 9, in <module>
    Fatal Python error: Py_Initialize: can't initialize sys standard streams
    Traceback (most recent call last):
    File "/usr/lib/python2.7/encodings/utf_8.py", line 9, in <module>
    Without PYTHONPATH set, I can also run scribes (with python2), but it gives me an error in the console. I also tried o run 2to3 on every python file in the project and correcting the syntax to be conform to http://diveintopython3.org/porting-code … -2to3.html (but that's not really what I'm supposed to do, is it?), and I got the same error as the one below ("No module named gobject") when trying to build with autogen.sh:
    $ export PYTHONPATH=
    $ python2 scribes.in
    Traceback (most recent call last):
    File "/home/wan/scribes_d/scribes_721/SCRIBES/SaveSystem/ExternalProcess/ScribesSaveProcess.py", line 7, in <module>
    from gobject import MainLoop, threads_init
    ImportError: No module named gobject
    I am out of ideas to try to correct the problem. Can anyone help me please?
    Last edited by wan (2010-12-09 01:26:14)

    I knew there was an old (and not up-to-date) package in community, but I didn't know that I could get the PKGBUILD.
    That teached me the -G argument for yaourt!
    To solve the problem, the previous script helped a lot:
    $ sed -i 's/python depcheck.py/python2 depcheck.py/' configure.ac
    ... on some other files as well.
    I submitted the now up-to-date PKGBUILD to the AUR here: http://aur.archlinux.org/packages.php?ID=44275
    Thanks for your suggestions!

  • VI to determine what applicatio​ns and services are running in memory.

    I need to be able to determine if a LabVIEW executable is running.
    If I had access to the info in the Task Manager window (running .exe's) -  that would provide all the needed information.

    with systemexe run tasklist.exe
    open a cmd window and type in tasklist /? to get more information
    If I think the system might have a program that could do the job, I take a look into the system32 folder if there is something that could fit and try <name> /? to see if my guess was right.
    But what about vi-server?  drop a vi-server property node and choose application:all vis in memory
    Message Edited by Henrik Volkers on 07-03-2006 01:50 PM
    Greetings from Germany
    Henrik
    LV since v3.1
    “ground” is a convenient fantasy
    '˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'

  • FileDialog doesnt show up!

    hi,
    i have a frame with a menu i implemens an actionlistner and in the actionlistener i want to open a dialog, but the dialog doesnt show up.
    this is my code
    class GameFrame extends Frame
    SubGame apl;
    public GameFrame()
    apl = new SubGame();
    apl.init();
    addWindowListener(
    new WindowAdapter()
    public void windowClosing(WindowEvent e)
    dispose();
    System.exit(0);
    //initilizing menues
    class SaveGameHandler implements ActionListener
    public void actionPerformed (ActionEvent e)
    try{
    FileDialog dlg =
    new FileDialog(GameFrame.this);
    dlg.setVisible (true);
    dlg.show();
    String FileName = new String(dlg.getFile());
    ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(FileName));
    out.writeObject(apl.GetData());
    out.close();
    catch (IOException exp)
    //MessageBox(GameFrame.this,"Error in writing file","Error");
    dispose();
    //SystemExit(0);
    thanks,
    benny

    I assume you have a component which triggers the action event. Probably making the following changes should solve the problem.
    1) Change the construstor to
    FileDialog dlg = new FileDialog(this);and not
    FileDialog dlg = new FileDialog(GameFrame.this);2) remove line
    dlg.setVisible (true);hope this may help you.

  • How to configure Mountain Lion Server to run Web2py with wsgi?

    I am trying to config Mountain Lion Server to run Web2py with mod_wsgi. I get an error saying: "Premature end o scritp Header" wsgihandler.py (which is the wsgi file for Web2py).
    I had it working fine in Snow Leopard and Lion Servers but not in Mountain Lion Server.
    Thanks for your help.
    Flavio.

    I don't run web2py framework so can't tell you specifically.
    That error means your script is not writing an http header to the browser so the browser can't decode whatever string it is getting. Your script is running as a plain old Python script. This is most likely because the Server.app in 10.8 now includes mod_wsgi built-in and configured from the GUI.
    You can insert an intercept anywhere in your code to check any variable by saying this:
    ##########   PROGRAMMING HERE  ###############
    print("Content-type:text/plain\n\n")
    print(someVariable)
    # raise SystemExit
    The above sends an "http header" so the browser knows what to do. These headers are invisible in the browser window. But depending on your Python version, the pring statement may not work (I am running Python3). The SystemExit statement is optional, just in case your script crashes downstream.
    WSGI sends a header like this:
    startResponse("200 OK", [("Content-Type", "text/plain")])
    but it sounds like mod_wsgi is not even being invoked. Normally your WSGI script is named *.wsgi and your Apache is set up to run the Python script as CGI under the mod_wsgi handler using this directive:
    AddHandler wsgi-script .wsgi
    The file having the config is located at
    /Library/Server/Web/Config/apache2/httpd_wsgi.webapp.conf
    where webapp is the name of your webapp. I would suggest copying the file called httpd_wsgi.conf and renaming it to your webapp name. When Server.app is configured properly, you enable wsgi webapps in the GUI Advanced wndow for your domain.

  • Install JBossService on windows using java service

    Hi,
    I am using windows 64 bit server. and jboss 4.3.
    I uesd the following command to create the service:
    JBossService.exe -install JBossAll C:\jdk1.6.0_06\jre\bin\jvm.dll -Djava.class.path=C:\jdk1.6.0_06\lib\tools.jar;C:\JBOSS\run.jar -start org.jboss.Main -params -c all -stop org.jboss.Main -method systemExit -out C:\JBOSS\stdout.log -err C:\JBOSS\stderr.log -current C:\JBOSS -manual
    When i tried to run the service, i got the following msg
    The JBossAll Service on Local Computer started and then stopped. Some services stop automatically if they have no work to do, for example, the performance Logs and Alerts service.
    can anyone please provide me with the solution.
    Thanks

    Files are not write protected. It only works once whenever I update the JSP page or run the delete() method once then stay on the same page for about a minute and refresh the page again.
    I have tired to clear the cache but even that wont work.
    Could you suggest another method or technique that I should try.
    Thanks

Maybe you are looking for

  • OBIEE 11g Simple Install to Enterprise Install.

    Hi Experts, I have OBIEE simple install in my machine with an Admin Server. Now is there any way i can upgrade that to Enterprise install without Uninstalling and re-installing. Thanks Swami

  • Issue with Bex report - key Figures not populating correctly.

    Hi Experts, I am facing an issue with a Bex report. There are three key figures of data type DATE having "Dec - Counter or amount field with comma and sign" datatype. After executing the query, in the report, for some sales documents the key figure f

  • Retrieve Java Employee Selection for use in ABAP

    Hi Experts I have a case where I need to retrieve the PERNR from the Java Employee Selection iView for use within an ABAP WD iview. I'm assuming that this can be handled from FPM... Could someone help me in the right direction to get this done? Thank

  • Do you prefer a stand-alone keyboard or a snap-in one, for your IPAD?

    Hello all; thanks for reading: I'd like to buy a keyboard for my Ipad and I am up in the air between the Apple Bluetooth Keyboard and the Logitech Ultrathin Keyboard. The former seems like it would be easier to use while in bed, as I could propr up t

  • System Install Problems

    Hi I am reinstalling my mac mini with the system install disks (10.4.5). The first disk works fine. I am then asked to insert disk 2 though my mini refuses to recognize the disk as the correct disk. One of my friends has an identical model - bought a