Identifying the unsigned jar

If one of the JAR files in the resource list has a missing or incorrect certificate, then JWS will fail during launch with a message that an unsigned application is requesting full access.
Problem is that the application may have dozens of jar files in the resource list and finding the one with the bad certificate can take a lot of time. The exception message does not identify which jar caused the app to become unsigned.
So, is there any way to identify which jar caused the problem other than going through them one-by-one to list the contents? If not, does anyone know of a utility that will validate the jars files against the jnlp specification? (Or does anyone care to write one?)
Thanks.

jarsigner -verify file.jarThanks, that's helpful. Too bad it doesn't accept
jarsigner -verify *.jar
Or give you a way to tell that all jar's have the same
certificate.
Under windows you can do in a batch file:
@for %%F in (*.jar) do jarsigner -verify %%F

Similar Messages

  • Can a unsigned jar file access the tmpdir (java.io.tmpdir)?

    Hello, according to the JNLP tutor, a signed jar file can access the local file system, but a unsigned one can not. My question is, can a unsigned jar file access the temp directory (the system property java.io.tmpdir)? I think the temp directory should be accessible even though it is part of the local file system.
    Thanks,
    LyLi

    no - unsigned application has no read/write access to the temp dir, but you can use the jnlp api to read and write files with the users permssion.
    see: http://java.sun.com/javase/6/docs/jre/api/javaws/jnlp/index.html for FileOpenService, FileSaveService, and ExtendedService.
    /Andy

  • How to identify un-used jars?

    Hi,
    My application is built on top of some third party distribution -- I put all the jars found in the 3rd party lib in the classpath of my application project, and in my distribution zip. Of these jars:
    - Some jar contains classes that are imported in my application, so my app
    directly uses this jar;
    - Some jar contains classes used by other classe that live in a different jar and are
    import in my application, so my app indirectly uses this jar;
    - Yet some jar contains classes that are not used by my app, directly or indirectly.
    I wonder if there's some technique or technology that helps identifying the jars of the above third category? I tried into something like class loader but haven't seemed to find a solution yet.
    Any help?
    Appreciatively,

    Monitoring is more used for index. But it is also
    available for tables.
    Auditing can be also a good alternative.
    Thanks.Please provide your claim with support.
    The monitoring clause is used on table for different purpose than monitoring usage on index.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/tables.htm#sthref2273
    Quote "
    Formerly, you enabled DBMS_STATS to automatically gather statistics for a table by specifying the MONITORING keyword in the CREATE (or ALTER) TABLE statement. Starting with Oracle Database 10g, the MONITORING and NOMONITORING keywords have been deprecated and statistics are collected automatically. If you do specify these keywords, they are ignored. "
    OP is using 10gR2

  • How to identify the installed Weblogic Server and JDK are 32bit or 64bit?

    Hi everyone,
    I have a question ~
    Both Weblogic Server and JAVA JDK are installed on the server already, but I only know the Weblogic Server is 10.3.4.0 and JAVA JDK version is 1.6.0_25.
    I know the 64bit Weblogic Server installation file is a wlsXXXX_generic.jar package and 64bit JAVA JDK needed also.
    But, since the Weblogic installed already, there are no such installation files on the Linux Server now.
    I have tried the "java -version" for java version and check the Weblogic version from Weblogic console.
    How to identify the installed Weblogic Server and JDK are 32bit or 64bit with Linux command? Or is there any way to check it?

    What you can try to do is use WLST (or an MBean browser, such as JConsole or JRockit Mission Control) and connect to the adminserver.
    For example when using WLST:
    # set the environment by using setWLSEnv.sh (located in the ${WL_HOME}/server/bin directory).
    # start WLST by using: java weblogic.WLST
    # connect to the adminserver
    connect('adminusername','adminpassword');
    # change to the serverruntime environment
    serverRuntime();
    # show the attributes
    ls();
    # Here an attribute is shown called WebLogicVersion that shows the version of WebLogic
    -r--   WeblogicVersion                              WebLogic Server 10.3.5.0  Fri Apr 1 20:20:06 PDT 2011 1398638
    # Note that this does not show if is 32 bits or 64 bits to retrieve this information you have obtain the JVM version
    # change the directory
    cd('JVMRuntime/AdminServer');
    # show the attributes
    ls();
    -r--   Version                                      R28.0.1-21-133393-1.6.0_20-20100512-2126-linux-x86_64
    # when you have something like x86 at the you are running a 32 bit version, if you have something like x86_64 you are running a 64 bits versionAs mentioned above you can also retrieve this information by using a MBean browser.

  • Beehive Conferencing Java-based Client Error: Cannot grant permissions to unsigned jars

    Hi,
    When I start a Beehive online web conference via the Java-based client on Ubuntu 12.04, I get the following error:
    net.sourceforge.jnlp.LaunchException: Fatal: Initialization Error: Could not initialize application.
        at net.sourceforge.jnlp.Launcher.createApplication(Launcher.java:778)
        at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:552)
        at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:889)
    Caused by: net.sourceforge.jnlp.LaunchException: Fatal: Application Error: Cannot grant permissions to unsigned jars. Application requested security permissions, but jars are not signed.
        at net.sourceforge.jnlp.runtime.JNLPClassLoader.setSecurity(JNLPClassLoader.java:289)
        at net.sourceforge.jnlp.runtime.JNLPClassLoader.<init>(JNLPClassLoader.java:209)
        at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:323)
        at net.sourceforge.jnlp.Launcher.createApplication(Launcher.java:770)
        ... 2 more
    Caused by:
    net.sourceforge.jnlp.LaunchException: Fatal: Application Error: Cannot grant permissions to unsigned jars. Application requested security permissions, but jars are not signed.
        at net.sourceforge.jnlp.runtime.JNLPClassLoader.setSecurity(JNLPClassLoader.java:289)
        at net.sourceforge.jnlp.runtime.JNLPClassLoader.<init>(JNLPClassLoader.java:209)
        at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:323)
        at net.sourceforge.jnlp.Launcher.createApplication(Launcher.java:770)
        at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:552)
        at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:889)
    Thanks for your help

    We have an HTTP/HTTPS conflict when downloading the JavaFX client that we have not yet been able to resolve without breaking something else :-)
    We recommend you use the downloadable client - available from the https://beehiveonline.oracle.com/bcentral/action?page=downloadlanding&appId=Oracle+Beehive+Conferencing+Bootstrap%7Cwind…

  • Basic: No certificate info, this is unsigned JAR file.

    A log can be found below with the results while running my application. The loader just can't seem to find the Httpclient on the server or something to that extent. All searches made per this error message on the Internet have failed to yield any results that would afford me a solution to my problem. Any assistance that you can afford to me would be greatly appreciated! Thank you very much! Eric.
    basic: Referencing classloader: sun.plugin.ClassLoaderInfo@1bca5f1, refcount=1
    basic: Added progress listener: sun.plugin.util.GrayBoxPainter@6f7ce9
    basic: Loading applet ...
    basic: Initializing applet ...
    basic: Starting applet ...
    network: Preloading file all-client-jars.jar
    basic: Loading http://172.21.165.19:7582/Paragon/all-client-jars.jar from cache
    basic: No certificate info, this is unsigned JAR file.
    network: Preloading file spring-client.jar
    basic: Loading http://172.21.165.19:7582/Paragon/spring-client.jar from cache
    basic: No certificate info, this is unsigned JAR file.
    network: Preloading file J2TablePrinter.jar
    basic: Loading http://172.21.165.19:7582/Paragon/J2TablePrinter.jar from cache
    basic: No certificate info, this is unsigned JAR file.
    network: Preloading file Quartz.jar
    basic: Loading http://172.21.165.19:7582/Paragon/Quartz.jar from cache
    basic: No certificate info, this is unsigned JAR file.
    network: Preloading file jhall.jar

    Network Calls Increases please help
    basic: Referencing classloader: sun.plugin.ClassLoaderInfo@1bca5f1, refcount=1
    basic: Added progress listener: sun.plugin.util.GrayBoxPainter@6f7ce9
    basic: Loading applet ...
    basic: Initializing applet ...
    basic: Starting applet ...
    network: Preloading file all-client-jars.jar
    basic: Loading http://172.21.165.19:7582/Paragon/all-client-jars.jar from cache
    basic: No certificate info, this is unsigned JAR file.
    network: Preloading file spring-client.jar
    basic: Loading http://172.21.165.19:7582/Paragon/spring-client.jar from cache
    basic: No certificate info, this is unsigned JAR file.
    network: Preloading file J2TablePrinter.jar
    basic: Loading http://172.21.165.19:7582/Paragon/J2TablePrinter.jar from cache
    basic: No certificate info, this is unsigned JAR file.
    network: Preloading file Quartz.jar
    basic: Loading http://172.21.165.19:7582/Paragon/Quartz.jar from cache
    basic: No certificate info, this is unsigned JAR file.
    network: Preloading file jhall.jar
    basic: Loading http://172.21.165.19:7582/Paragon/jhall.jar from cache
    basic: Reading cached JAR file from JRE 1.5 release
    basic: Certificates for http://172.21.165.19:7582/Paragon/jhall.jar is read from JAR cache
    network: Preloading file jnet.jar
    basic: Loading http://172.21.165.19:7582/Paragon/jnet.jar from cache
    basic: No certificate info, this is unsigned JAR file.
    network: Preloading file jsse.jar
    basic: Loading http://172.21.165.19:7582/Paragon/jsse.jar from cache
    basic: No certificate info, this is unsigned JAR file.
    network: Preloading file QzCPExtn.jar
    basic: Loading http://172.21.165.19:7582/Paragon/QzCPExtn.jar from cache
    basic: No certificate info, this is unsigned JAR file.
    network: Preloading file QzPLMExtn.jar
    basic: Loading http://172.21.165.19:7582/Paragon/QzPLMExtn.jar from cache
    basic: No certificate info, this is unsigned JAR file.
    network: Preloading file QzQZExtn.jar
    basic: Loading http://172.21.165.19:7582/Paragon/QzQZExtn.jar from cache
    basic: No certificate info, this is unsigned JAR file.
    network: Preloading file QzRPExtn.jar
    basic: Loading http://172.21.165.19:7582/Paragon/QzRPExtn.jar from cache
    basic: No certificate info, this is unsigned JAR file.
    network: Preloading file QzCADExtn.jar
    basic: Loading http://172.21.165.19:7582/Paragon/QzCADExtn.jar from cache
    basic: No certificate info, this is unsigned JAR file.
    QzRP.jar from cache
    basic: No certificate info, this is unsigned JAR file.
    network: Preloading file QzTP.jar
    basic: Loading http://172.21.165.19:7582/Paragon/QzTP.jar from cache
    basic: No certificate info, this is unsigned JAR file.
    network: Preloading file QzCB.jar
    basic: Loading http://172.21.165.19:7582/Paragon/QzCB.jar from cache
    basic: No certificate info, this is unsigned JAR file.
    network: Preloading file QzLM.jar
    basic: Loading http://172.21.165.19:7582/Paragon/QzLM.jar from cache
    basic: No certificate info, this is unsigned JAR file.
    network: Connecting http://172.21.165.19:7582/Paragon/commons-logging.properties with proxy=DIRECT
    network: Connecting http://172.21.165.19:7582/Paragon/commons-logging.properties with cookie "PARASESSION=7d1SJkVYhQJy2YJB4kQWLZ3BJBF2kpLnTv4DNMBn1thTyQ2chlZC!-1044230083"
    network: Connecting http://172.21.165.19:7582/Paragon/META-INF/services/org.apache.commons.logging.LogFactory with proxy=DIRECT
    network: Connecting http://172.21.165.19:7582/Paragon/META-INF/services/org.apache.commons.logging.LogFactory with cookie "PARASESSION=7d1SJkVYhQJy2YJB4kQWLZ3BJBF2kpLnTv4DNMBn1thTyQ2chlZC!-1044230083"
    network: Connecting http://172.21.165.19:7582/Paragon/log4j.xml with proxy=DIRECT
    network: Connecting http://172.21.165.19:7582/Paragon/log4j.xml with cookie "PARASESSION=7d1SJkVYhQJy2YJB4kQWLZ3BJBF2kpLnTv4DNMBn1thTyQ2chlZC!-1044230083"
    network: Connecting http://172.21.165.19:7582/Paragon/log4j.xml with proxy=DIRECT
    network: Connecting http://172.21.165.19:7582/Paragon/log4j.xml with cookie "PARASESSION=7d1SJkVYhQJy2YJB4kQWLZ3BJBF2kpLnTv4DNMBn1thTyQ2chlZC!-1044230083"
    network: Connecting http://172.21.165.19:7582/Paragon/org/apache/log4j/PatternLayoutBeanInfo.class with proxy=DIRECT
    network: Connecting http://172.21.165.19:7582/Paragon/org/apache/log4j/PatternLayoutBeanInfo.class with cookie "PARASESSION=7d1SJkVYhQJy2YJB4kQWLZ3BJBF2kpLnTv4DNMBn1thTyQ2chlZC!-1044230083"
    network: Connecting http://172.21.165.19:7582/Paragon/org/apache/log4j/PatternLayoutBeanInfo.class with proxy=DIRECT
    network: Connecting http://172.21.165.19:7582/Paragon/org/apache/log4j/PatternLayoutBeanInfo.class with cookie "PARASESSION=7d1SJkVYhQJy2YJB4kQWLZ3BJBF2kpLnTv4DNMBn1thTyQ2chlZC!-1044230083"
    network: Connecting http://172.21.165.19:7582/Paragon/org/apache/log4j/LayoutBeanInfo.class with proxy=DIRECT
    network: Connecting http://172.21.165.19:7582/Paragon/org/apache/log4j/LayoutBeanInfo.class with cookie "PARASESSION=7d1SJkVYhQJy2YJB4kQWLZ3BJBF2kpLnTv4DNMBn1thTyQ2chlZC!-1044230083"

  • Is a signed jar with another unsigned jar possible?

    Is it possible to use 1 signed jar with another unsigned jar with webstart. I read this wasn't possible with version 1.0, but what about higher versions? if so how to specify this?
    Thanks
    James
    Edited by: fatbatman on Mar 26, 2009 1:01 PM

    All jars within same jnlp must be signed with the same certificate, but you can use extensions to have many jnlp with different (or no) signature within the same application.
    Bye.

  • How do you identify the Logical system in start routine of a transformation

    My scenario is this.  I have five r3 systems that I am extracting from.   In the start routine of the transformation from the r3 data source to my data store I  am going to delete data and I need to know the source system id.    How do I identify the logical system or source system id in the transformation.  Is there a system field that contains this information.    I do not want to hard code the source system id in the routine.

    hi
    have a lool at tables rsreqdone and rsbkrequest with a join you should be able to determine the source.
    regards
    Boujema
    How to give points: Mark your thread as a question while creating it. In the answers you get, you can assign the points by clicking on the stars to the left. You also get a point yourself for rewarding (one per thread).
    Edited by: Boujema Bouhazama on May 9, 2008 12:04 AM

  • Is there a way to identify the iTunes user?

    Since the StoreKit API does not return subscription InApp purchases during a restoreCompletedTransactions call, only way to know for sure that someone purchased an app is to tie the initial purchase to the iTunes account in the server (developer server) and restore the active subscriptions on all devices that use that iTunes account.
    Does the SDK provide for a call which will uniquely identify the user? Something like a UUID? The SDK provides for a unique device identifier but that is of no use to restore the subscriptions on the other devices the user may be using.
    I do not understand why Apple did not think of this case when they decided not to support Subscription InApp purchases in the call to query for completed transactions. This is insane and short-sighted on part of Apple with no thought given to the developers needs.
    -TRS

    I have been working to create such a solution when Submit All first appeared, but that version was pretty buggy and I never got back to it. Maybe it is possible, but I cannot guarantee you that it can. When trying I have spent many hours to fix it without success. For the moment I don't have any incentive to restart with that problem. Hope you or some other user has more courage.

  • Is there any way to identify the particular socket connection is closed ?

    Is there any way to identify the particular socket connection is closed or not ?
    Any methods ???
    How can the program knows the connection is lost or some thing ...
    Is the socket throws some excpetions when there is no active connection ???
    namanc

    If you get an IOException when you try to use the socket, the connection was obviously closed.
    The correct way for an application to know if the socket was closed is:
    1) the server sends a message indicating that the socket should be closed
    2) the client closes the socket itself

  • Identify the last data package in start routine

    Hi Everyone
    We have a start routine in transformations. We require to do some special processing in the start routine only when the last data package is executing. How can we determine in the start routine that current package is last one or not ? Any pointers in this direction are appreciated.

    Hi,
    You can get packet Id from datapackid in start routine and end routine. But I'm not so sure how to identify the last packet ID, alternatively you can store this packet id in some where else and read the same value in End routine if your logic(processing) permits to do this in End routine instead of Start routine.
    METHODS
          start_routine
            IMPORTING
              request                  type rsrequest
              datapackid               type rsdatapid
            EXPORTING
              monitor                  type rstr_ty_t_monitors
            CHANGING
              SOURCE_PACKAGE              type tyt_SC_1
            RAISING
              cx_rsrout_abort.
    hope it helps...
    regards.
    Raju

  • Need a script to update AD information from Excel file, however employee ID is use for identify the user in AD

    Please help me to get this done!....Thanks in Advance
    This is current script I use to update AD record but its taking user id to pick the user in AD, which is some time give error not update properly..
    # UpdateUsers.ps1
    # PowerShell program to update Active Directory users from the information in a
    # Microsoft Excel spreadsheet. Only single-valued string attributes supported.
    # Author: Richard Mueller
    # PowerShell Version 1.0
    # September 12, 2011
    Trap
        If ("$_".StartsWith("Cannot load COM type Excel.Application"))
            "Excel application not found, program aborted"
            Add-Content -Path $LogFile -Value "## Excel application not found"
            Add-Content -Path $LogFile -Value "   $_"
            Add-Content -Path $LogFile -Value $("Program aborted: " + (Get-Date).ToString())
            Break
        If (("$_".StartsWith("Exception has been thrown")) -and ($Step -eq "4"))
            "Excel spreadsheet not found, program aborted"
            Add-Content -Path $LogFile -Value "## Excel spreadsheet not found: $ExcelPath"
            Add-Content -Path $LogFile -Value "   $_"
            Add-Content -Path $LogFile -Value $("Program aborted: " + (Get-Date).ToString())
            Break
        If ("$_".StartsWith("The server is not operational"))
            "Domain Controller not found, program aborted"
            Add-Content -Path $LogFile -Value "## Domain Controller not found"
            Add-Content -Path $LogFile -Value "   $_"
            Add-Content -Path $LogFile -Value $("Program aborted: " + (Get-Date).ToString())
            Break
        If ("$_".StartsWith("The directory service is unavailable"))
            "Active Directory not found, program aborted"
            Add-Content -Path $LogFile -Value "## Active Directory not found"
            Add-Content -Path $LogFile -Value "   $_"
            Add-Content -Path $LogFile -Value $("Program aborted: " + (Get-Date).ToString())
            Break
        If ("$_".StartsWith("The specified domain"))
            "Domain not found, program aborted"
            Add-Content -Path $LogFile -Value "## Domain not found"
            Add-Content -Path $LogFile -Value "   $_"
            Add-Content -Path $LogFile -Value $("Program aborted: " + (Get-Date).ToString())
            Break
        "Unexpected error: $_"
        Add-Content -Path $LogFile -Value "## Unexpected error: $_"
        Add-Content -Path $LogFile -Value "   Step: $Step"
        Break
    Function CleanUp
        Trap
            "Error during cleanup: $_"
            Add-Content -Path $LogFile -Value "## Error during cleanup: $_"
            $Script:Errors = $Script:Errors + 1
            Continue
        # Function to release Excel objects from memory.
        Do {$x = [System.Runtime.InteropServices.Marshal]::ReleaseComObject($Columns)} While ($x -gt -1)
        Do {$x = [System.Runtime.InteropServices.Marshal]::ReleaseComObject($Rows)} While ($x -gt -1)
        Do {$x = [System.Runtime.InteropServices.Marshal]::ReleaseComObject($Range)} While ($x -gt -1)
        Do {$x = [System.Runtime.InteropServices.Marshal]::ReleaseComObject($Sheet)} While ($x -gt -1)
        Do {$x = [System.Runtime.InteropServices.Marshal]::ReleaseComObject($Worksheets)} While ($x -gt -1)
        $Workbook.Close($False)
        Do {$x = [System.Runtime.InteropServices.Marshal]::ReleaseComObject($Workbook)} While ($x -gt -1)
        Do {$x = [System.Runtime.InteropServices.Marshal]::ReleaseComObject($Workbooks)} While ($x -gt -1)
        $Excel.Quit()
        Do {$x = [System.Runtime.InteropServices.Marshal]::ReleaseComObject($Excel)} While ($x -gt -1)
    # Specify paths to spreadsheet and log file.
    $Script:Errors = 0
    $Step = "1"
    $ExcelPath = "c:\scripts\UpdateUsers.xls"
    $LogFile = "c:\scripts\UpdateUsers.log"
    Write-Host "Please Standby..."
    # Add to the log file.
    $Step = "2"
    Add-Content -Path $LogFile -Value "------------------------------------------------" -ErrorAction Stop
    Add-Content -Path $LogFile -Value "UpdateUsers.ps1 Version 1.0 (September 12, 2011)"
    Add-Content -Path $LogFile -Value $("Started: " + (Get-Date).ToString())
    Add-Content -Path $LogFile -Value "Spreadsheet: $ExcelPath"
    Add-Content -Path $LogFile -Value "Log file: $LogFile"
    $Step = "3"
    # Open specified Excel spreadsheet.
    $Excel = New-Object -ComObject "Excel.Application"
    $Workbooks = $Excel.Workbooks
    $Step = "4"
    $Workbook = $Workbooks.Open($ExcelPath)
    $Worksheets = $Workbook.Worksheets
    $Sheet = $Worksheets.Item(1)
    $Range = $Sheet.UsedRange
    $Rows = $Range.Rows
    $Columns = $Range.Columns
    $Step = "5"
    # Hash table of attribute syntaxes.
    # The LDAP display names will be read from the spreadsheet.
    # The corresponding syntaxes will be read from the Schema container.
    $Attributes = @{}
    # Array of spreadsheet column headings.
    $Cols = @()
    $Step = "6"
    # Read attribute LDAP Display Names from the first row of the spreadsheet.
    $ID = 0
    For ($k = 1; $k -le $Columns.Count; $k = $k + 1)
        # Retrieve column heading, the lDAPDisplayName of an attribute.
        $Value = $Sheet.Cells.Item(1, $k).Text
        # Keep track of all column headings.
        $Cols += $Value
        # Skip duplicates in hash table.
        If ($Attributes.ContainsKey($Value) -eq $False)
            # Default is "NotFound", until found in the AD Schema.
            $Attributes.Add($Value, "NotFound")
        # Keep track of which column uniquely identifies users.
        If ($Value.ToLower() -eq "distinguishedname") {$ID = $k}
        If (($Value.ToLower() -eq "samaccountname") -and ($ID -eq 0)) {$ID = $k}
        # This script cannot be used to rename users.
        If ($value.ToLower() -eq "cn")
            Add-Content -Path $LogFile -Value "## This script cannot be used to rename users"
            Add-Content -Path $LogFile -Value "   Do not specify the cn attribute in the spreadsheet"
            Add-Content -Path $LogFile -Value $("Program aborted: " + (Get-Date).ToString())
            CleanUp
            Return "Program aborted: cn attribute found in spreadsheet" `
                + "`nSee log file: $LogFile"
    $Step = "7"
    If ($ID -eq 0)
        Add-Content -Path $LogFile -Value "## No column found to identify users"
        Add-Content -Path $LogFile -Value "   One column must be distinguishedName or sAMAccountName"
        Add-Content -Path $LogFile -Value $("Program aborted: " + (Get-Date).ToString())
        CleanUp
        Return "Program aborted: No column found in spreadsheet to identify users" `
            + "`nSee log file: $LogFile"
    # Create filter to query for attributes in the schema.
    $Attrs = $Attributes.Keys
    $Filter = "(&(objectCategory=AttributeSchema)(|"
    ForEach ($Attr In $Attrs)
        $Filter = $Filter + "(lDAPDisplayName=$Attr)"
    $Filter = $Filter + "))"
    $Step = "8"
    $RootDSE = [System.DirectoryServices.DirectoryEntry]([ADSI]"LDAP://RootDSE")
    $Domain = $RootDSE.Get("defaultNamingContext")
    $Schema = $RootDSE.Get("schemaNamingContext")
    $Step = "9"
    # Use the NameTranslate object.
    $objTrans = New-Object -comObject "NameTranslate"
    $objNT = $objTrans.GetType()
    # Initialize NameTranslate by locating the Global Catalog.
    $objNT.InvokeMember("Init", "InvokeMethod", $Null, $objTrans, (3, $Null))
    $Step = "10"
    # Retrieve NetBIOS name of the current domain.
    $objNT.InvokeMember("Set", "InvokeMethod", $Null, $objTrans, (1, "$Domain"))
    $NetBIOSDomain = $objNT.InvokeMember("Get", "InvokeMethod", $Null, $objTrans, 3)
    Add-Content -Path $LogFile -Value "NetBIOS name of domain: $NetBIOSDomain"
    $Step = "11"
    $Searcher = New-Object System.DirectoryServices.DirectorySearcher
    $Searcher.SearchRoot = [ADSI]"LDAP://$Schema"
    $Searcher.PageSize = 200
    $Searcher.SearchScope = "subtree"
    $Searcher.PropertiesToLoad.Add("lDAPDisplayName") > $Null
    $Searcher.PropertiesToLoad.Add("attributeSyntax") > $Null
    $Searcher.PropertiesToLoad.Add("isSingleValued") > $Null
    $Searcher.PropertiesToLoad.Add("systemFlags") > $Null
    # Filter on specified attributes.
    $Searcher.Filter = $Filter
    $Step = "12"
    # Query Active Directory.
    $Results = $Searcher.FindAll()
    # Enumerate recordset.
    ForEach ($Result In $Results)
        # Retrieve properties of attributes.
        $Name = $Result.Properties.Item("lDAPDisplayName")[0]
        $SysFlags = $Result.Properties.Item("systemFlags")[0]
        $SyntaxNum = $Result.Properties.Item("attributeSyntax")[0]
        $SingleValued = $Result.Properties.Item("isSingleValued")[0]
        # Only single-valued string attributes supported by this version of the program.
        Switch ($SyntaxNum)
            "2.5.5.12" {$Syntax = "String"}
            Default {$Syntax = "NotSupported"}
        If ($Name.ToLower() -eq "distinguishedname") {$Syntax = "DN"}
        If (($SysFlags -band 4) -ne 0)
            $Attributes[$Name] = "Constructed"
        Else
            If ($SingleValued -eq $True)
                $Attributes[$Name] = $Syntax
            Else
                $Attributes[$Name] = "NotSupported"
    $Step = "13"
    # Check if any attributes not found or have unsupported syntax.
    $Found = $True
    ForEach ($Attr In $Attrs)
        $Syntax = $Attributes[$Attr]
        If ($Syntax -eq "NotFound")
            Add-Content -Path $LogFile -Value "## Attribute $Attr not found in schema"
            "Attribute $Attr not found in schema"
            $Found = $False
        If ($Syntax -eq "NotSupported")
            Add-Content -Path $LogFile -Value "## Attribute $Attr has a syntax that is not supported"
            "Attribute $Attr has a syntax that is not supported"
            $Found = $False
        If ($Syntax -eq "Constructed")
            Add-Content -Path $LogFile -Value "## Attribute $Attr is operational, so is not supported"
            "Attribute $Attr is operational, so is not supported"
            $Found = $False
    $Step = "14"
    If ($Found -eq $False)
        Add-Content -Path $LogFile -Value $("Program aborted: " + (Get-Date).ToString())
        CleanUp
        Return "Program aborted" `
            + "`nSee log file: $LogFile"
    # Read remaining rows of the spreadsheet, until the first blank value is found
    # in the column that identifies users.
    $Step = "15"
    $Script:Updated = 0
    $Script:Unchanged = 0
    $j = 2
    Do {
        # Retieve ID value for the user first.
        $Value = $Sheet.Cells.Item($J, $ID).Text
        $Found = $False
        $Step = "16"
        If ($Cols[$ID - 1] -eq "distinguishedname")
            # Any forward slash characters must be escaped.
            $DN = $Value.Replace("/", "\/")
            # Bind to the user object.
            # If user not found, $User.Name will be $Null.
            $User = [ADSI]"LDAP://$DN"
            If ($User.Name -ne $Null)
                $Found = $True
        $Step = "17"
        If ($Cols[$ID - 1] -eq "samaccountname")
            Trap
                Write-Host ""
                "Error translating name: $_"
                Add-Content -Path $LogFile -Value "## Error translating name $Value"
                Add-Content -Path $LogFile -Value "   Description: $_"
                $Script:Errors = $Script:Errors + 1
                Continue
            # Convert sAMAccountName to distinguishedName.
            $DN = ""
            $Step = "18"
            $objNT.InvokeMember("Set", "InvokeMethod", $Null, $objTrans, (3, "$NetBIOSDomain$Value"))
            $DN = $objNT.InvokeMember("Get", "InvokeMethod", $Null, $objTrans, 1)
            $Step = "19"
            If ($DN -ne "")
                $Step = "20"
                # Any forward slash characters must be escaped.
                $DN = $DN.Replace("/", "\/")
                # Bind to the user object.
                $User = [ADSI]"LDAP://$DN"
                $Found = $True
        If ($Found -eq $True)
            $Step = "21"
            # Read remaining values for this user.
            $Changed = $False
            For ($k = 1; $k -le $Columns.Count; $k = $k + 1)
                # Skip the identifying column.
                If ($k -ne $ID)
                    $Step = "22"
                    # Retrieve attribute name for this column from array.
                    $AttrName = $Cols[$k - 1]
                    # Retrieve attribute syntax from hash table.
                    $Syntax = $Attributes[$AttrName]
                    $Step = "23"
                    # Retrieve attribute value for this user.
                    $Value = $Sheet.Cells.Item($j, $k).Text
                    # Skip blank values.
                    If ($Value -ne "")
                        If ($Syntax -eq "String")
                            Trap
                                If ("$_".StartsWith("The directory property cannot be found"))
                                    Continue
                                Else
                                    Write-Host ""
                                    "Error retrieving value from Active Directory: $_"
                                    Add-Content -Path $LogFile -Value "## Error retrieving $AttrName for user $DN"
                                    Add-Content -Path $LogFile -Value "   Description: $_"
                                    $Script:Errors = $Script:Errors + 1
                                    Continue
                            $Step = "24"
                            # Single-valued string attribute.
                            # Retrieve existing value.
                            $OldValue = ""
                            $OldValue = $User.Get($AttrName)
                            # Check if existing value to be deleted.
                            If ($Value.ToLower() -eq ".delete")
                                If ($OldValue -ne "")
                                    If ($AttrName.ToLower -eq "samaccountname")
                                        Add-Content -Path $LogFile -Value `
                                            "## Mandatory attribute sAMAccountName cannot be cleared for user: $DN"
                                        $Script:Errors = $Script:Errors + 1
                                    Else
                                        Trap
                                            Write-Host ""
                                            "Error deleting value from Active Directory: $_"
                                            Add-Content -Path $LogFile -Value "## Error deleting $AttrName for user $DN"
                                            Add-Content -Path $LogFile -Value "   Description: $_"
                                            $Script:Errors = $Script:Errors + 1
                                            Continue
                                        $Step = "25"
                                        # Make the attribute value "not set".
                                        $User.PutEx(1, $AttrName, 0)
                                        $Changed = $True
                            Else
                                $Step = "26"
                                # Check if new value from spreadsheet different.
                                If ($Value -ne $OldValue)
                                    Trap
                                        Write-Host ""
                                        "Error assigning value from Active Directory: $_"
                                        Add-Content -Path $LogFile -Value "## Error assigning $AttrName for user $DN"
                                        Add-Content -Path $LogFile -Value "   Description: $_"
                                        $Script:Errors = $Script:Errors + 1
                                        Continue
                                    # Assign the new value to the attribute.
                                    $User.Put($AttrName, $Value)
                                    $Changed = $True
                        Else
                            # Unexpected error.
                            Add-Content -Path $LogFile -Value `
                                "## Unexpected syntax: $Syntax for attribute $AttrName for user $DN"
                            $Script:Errors = $Script:Errors + 1
            If ($Changed -eq $True)
                Trap
                    Write-Host ""
                    "Error saving to Active Directory: $_"
                    Add-Content -Path $LogFile -Value "## Error saving to AD for user $DN"
                    Add-Content -Path $LogFile -Value "   Description: $_"
                    $Script:Errors = $Script:Errors + 1
                    $Script:Updated = $Script:Updated - 1
                    Continue
                $User.SetInfo()
                Add-Content -Path $LogFile -Value "Update user: $DN"
                Write-Host "." -NoNewLine
                $Script:Updated = $Script:Updated + 1
            Else
                Add-Content -Path $LogFile -Value "User unchanged: $DN"
                Write-Host "." -NoNewLine
                $Script:Unchanged = $Script:Unchanged + 1
        Else
            Add-Content -Path $LogFile -Value "## User not found: $Value"
            Write-Host "." -NoNewLine
            $Script:Errors = $Script:Errors + 1
        $j = $J + 1
    } Until ($Sheet.Cells.Item($j, $ID).Text -eq "")
    $Step = "27"
    CleanUp
    Add-Content -Path $LogFile -Value $("Finished: " + (Get-Date).ToString())
    Add-Content -Path $LogFile -Value "Number of users updated: $Script:Updated"
    Add-Content -Path $LogFile -Value "Number of users unchanged: $Script:Unchanged"
    Add-Content -Path $LogFile -Value "Number of errors: $Script:Errors"
    Write-Host ""
    "Done"
    "Number of errors: $Script:Errors"
    "See log file: $LogFile"

    Actually scripts run fine with excel file, currently we are using user-id to pick to update AD. Now we want to update AD use employee id. You can say to identify the record in AD through employee ID instead of user-id. 
    I do not think you will get anyone here to fix that for you.  You need to find someone who knows PowerShell to help you or learn PowerShell your self.
    I would fix it for you but not for free.  It is too oddly designed and has too many dependencies.  Any small change is likely to break it.
    ¯\_(ツ)_/¯

  • How to identify the Open Schedule Lines.

    Hi All,
    I am writing an ABAP report which requires to identify the OPEN SALES ORDER SCHEDULE LINES.
    The requirement is to identify the Open Sales Order Schedule Lines for a particular month (user Processing month in the selection screen).  Here the Schedules line item could have been delivered already.  If it is not Billed then it is OPEN schedule line.
    Can anyone help me to understand the logic which I need to apply to identify only the Open sales order scshedule lines.
    I am using the following tables:
    VBAK,VBAP,VBUK,VBUP,VBEP.  Is there any other table which I need to use?  I am trying to avoid using table VBFA due to performance issues.
    Thanks in Advance
    Regards
    Gopalakrishnan S

    Hi Gopal,
    If you want to find status of any sales order line item then you can find from following method from VBUP table.
    In VBUP table there is a field FKSTK.By this filed status we can find billing status of particular sale order and this field has four possible values and these are
    <i><b>field value  field value meaning</b></i>                             
    if this value is space then order is not Not Relevant for billing             
    if this value is  'A'  then order is    Not yet processed
    if this value is   'B' then order is Partially processed
      if this value is  'C' then order   Completely processed
    If you want to find status for the header then go to VBUK table and process is same as above.
    In these table we can find all types of status.
    Message was edited by:
            shyla kumar
    Message was edited by:
            shyla kumar
    Message was edited by:
            shyla kumar

  • Unable to identify the exchange protocol of the message (sync AS2 MDN)

    Hi,
    We got the following error:
    Description: Unable to identify the exchange protocol of the message
    StackTrace:
    Error -: AIP-50080: Exchange protocol identification error
         at oracle.tip.adapter.b2b.engine.Engine.processIncomingMessage(Engine.java:1367)
         at oracle.tip.adapter.b2b.msgproc.Request.postTransmit(Request.java:2370)
         at oracle.tip.adapter.b2b.msgproc.Request.outgoingRequestPostColab(Request.java:1813)
         at oracle.tip.adapter.b2b.msgproc.Request.outgoingRequest(Request.java:968)
         at oracle.tip.adapter.b2b.engine.Engine.processOutgoingMessage(Engine.java:1152)
         at oracle.tip.adapter.b2b.xmlgwIntg.XMLGWIntegration.raiseOutboundMessage(XMLGWIntegration.java:168)
         at oracle.tip.adapter.b2b.xmlgwIntg.Outbound.onMessage(Outbound.java:297)
         at oracle.jms.AQjmsListenerWorker.dispatchOneMsg(AQjmsListenerWorker.java:316)
         at oracle.jms.AQjmsListenerWorker.run(AQjmsListenerWorker.java:129)
         at java.lang.Thread.run(Thread.java:534)
    Here is the Wire message (sync MDN)
    =======================
    Message-ID=<23033756.391232032071968.JavaMail.SYSTEM@INUBITTEST>
    Subject=Your ORDERS AS2
    [email protected]
    Content-Length=1347
    MIME-Version=1.0
    Server=Apache
    Date=Thu, 15 Jan 2009 15:07:52 GMT
    Content-Type=multipart/mixed;      boundary="----=_Part_53998_23619909.1232032071968"
    [email protected]
    ------=_Part_53998_23619909.1232032071968
    Content-Type: text/plain; charset=UTF-8; name=test.txt
    Content-Transfer-Encoding: 7bit
    Content-Disposition: attachment; filename=test.txt
    Message-ID: <17080722.371232032071906.JavaMail.SYSTEM@INUBITTEST>
    MIME-Version: 1.0
    Content-Type: multipart/report; report-type=disposition-notification;
         boundary="----=_Part_53997_14786767.1232032071906"
    AS2-Version: 1.1
    AS2-From: test_AS2
    AS2-To: as2me
    ------=_Part_53997_14786767.1232032071906
    Content-Type: text/plain; charset=us-ascii
    Content-Transfer-Encoding: 7bit
    MDN for Message ID: <33156:4:0:137@as2me>
    From: as2me
    To: test_AS2
    Received on: Thu, 15 Jan 2009 16:07:51 +0100
    Status: processed
    Comment: This is not a guarantee that the message has
    been completely processed or unterstood.
    ------=_Part_53997_14786767.1232032071906
    Content-Type: message/disposition-notification
    Content-Transfer-Encoding: 7bit
    Reporting-UA: inubit Integration Server
    Original-Recipient: rfc822; test_AS2
    Final-Recipient: rfc822; test_AS2
    Original-Message-ID: <33156:4:0:137@as2me>
    Disposition: automatic-action/MDN-sent-automatically; processed
    Received-Content-MIC: 5kFOLMXOUurpm6DUTA8IMRj5gcs=, sha1
    ------=_Part_53997_14786767.1232032071906--
    ------=_Part_53998_23619909.1232032071968--
    ============================
    The communication with our TP is going well, we are able to send, receive messages over AS2 and send back MDN, but we are not able
    to receive their MDN.
    Edit:
    It seems that after the latest MLR patch, the error changed to [IPT_HttpSendError] HTTP encounters send error :. Premature EOF encounter but the roots seem to lead to the problem with MDN as B2B is sending the message a couple of times now and gives the mentioned EOF error.
    Please advise,
    Thank you
    Edited by: Kamil Zadora on Jan 30, 2009 3:44 AM

    Hi Ramesh,
    Yes, agreement uses AS2 IDentifiers. Incoming messages are recognized correctly, and we send back sync MDN that is correctly received by our TP. They also recieve our messages correctly although Oracle B2B does not recognize the MDN from them. I think that this causes that, now after applying the latest MLR patch, B2B tries to send it around 6 times and gives the Unexpected EOF error.
    Thank you for your help in advance,
    Kind regards,

  • Identify the relationship for the follwing fields

    Hi experts,
    I have to develop a report which is taking input as : -
    1.matnr (material number)
    2.werks (plant)
    3.stlan (BOM usage)
    4. stlal (alternative)
    And I need the output as : -
    AENNR (ECR : engg change request)
    I am unable to identify the relationships between these fields, plz suggest me the best ways to do this..
    Thanks in advance
    Gaurav
    Moderator message : Spec-dumping not allowed. Read forum rules before posting. Thread locked.
    Edited by: Vinod Kumar on Jul 5, 2011 2:11 PM

    after getting the records to internal table write the statement
    delete adjacent duplicate ................... before that write sort stament also......
    Deleting Adjacent Duplicate Entries
    To delete adjacent duplicate entries use the following statement:
    DELETE ADJACENT DUPLICATE ENTRIES FROM <itab>
                                      [COMPARING <f1> <f 2> ...
                                                 |ALL FIELDS].
    The system deletes all adjacent duplicate entries from the internal table <itab>. Entries are duplicate if they fulfill one of the following compare criteria:
    Without the COMPARING addition, the contents of the key fields of the table must be identical in both lines.
    If you use the addition COMPARING <f1> <f 2> ... the contents of the specified fields <f 1 > <f 2 > ... must be identical in both lines. You can also specify a field <f i > dynamically as the contents of a field <n i > in the form (<n i >). If <n i > is empty when the statement is executed, it is ignored. You can restrict the search to partial fields by specifying offset and length.
    If you use the addition COMPARING ALL FIELDS the contents of all fields of both lines must be identical.
    You can use this statement to delete all duplicate entries from an internal table if the table is sorted by the specified compare criterion.
    If at least one line is deleted, the system sets SY-SUBRC to 0, otherwise to 4.

Maybe you are looking for

  • Managing Email/Fax "Reception notifications" in SAP R/3

    Hi SAP devs,   one of my clients is interested in creating a Workflow for PS in SAP R/3 4.6C that will automate the sending of eMails and Faxs when certain activities (in networks via CN22) are confirmed. The process is as follows: The activity is co

  • How to improve performance of Siebel Configurator

    Hi All, We are using Siebel Configurator to model the item structures. We wrote few constraint rules on that. But while launching the configurator it is taking more time to open. Even without rules also it is behaving in the same manner. Any inputs o

  • OO ABAP having problems retrieving value from screen dropBox field

    Hi, I am a new in ABAP, and need some advice. I have a class and in its definition I  have class-data: dropBox (same name as in screen) field from the screen. When I create a instance of a class and fill with data dropBox. data is populated properly

  • My phone number disapeared under IMessage

    my phone number doesn't show up under the "send and receive" option under messages

  • Grant privileges, roles within Forms

    Hello, i have a forms application where each year can appear new users (e.g. employees), and i when a new employee appears i wanna grant him privileges, roles, etc within Forms. so is it possible having a form(accesible just for dba user) from where