Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise PowerShell Extensions Forum log4cxx Errors
    • Sign In

    • State Not Answered
    • Replies 3 replies
    • Subscribers 65 subscribers
    • Views 140 views
    • Users 0 members are here
    • update-pwfoldersecurity
    • log4c
    • pwps_dab
    • copy-pwfolder

    log4cxx Errors

    Trevor Sedlock
    Offline Trevor Sedlock 4 months ago

    When running the following script, I receive an error after some time. There is no associated PW error that shows up in the powershell output, just these three lines then the script hangs. Any ideas what this is caused by and any way to tell if something upstream in the script process is throwing the error? I'd assume, by looking at a previous post by Kevin van Buren who had the same issue, that this is thrown when a PW error occurs. It only just started recently, in the last 36hrs or so. We've been using this same script for months now.

    param (
    
        [string]$targetFolder
    
    )
    
    # Open the file for reading
    
    $file = Get-Content "D:\_idcWork\pwTreeExport\PWExport2Vault\exportList.txt"
    
    foreach ($line in $file){
    
        echo "$line"
        Reset-PWFolderSecurity -AllSecurity -InputFolder "$line"
        Update-PWFolderSecurity "$line" -MemberType "ul" -MemberName "TEALL" -MemberAccess "r", "fr" -FolderSecurity -DocumentSecurity -Verbose
        Copy-PWFolder -FolderPath "$targetFolder" -FolderToCopy $line -IncludeDocuments -IncludeSubFolders -SkipFolderWorkflowSecurityReplication -ErrorAction Continue
    
    }

    The output...

    log4cxx: Could not open file [C:\Windows\System32\WindowsPowerShell\v1.0\powershell.log.xml].
    log4cxx: No appender could be found for logger (pwise.filehandler.dgn).
    log4cxx: Please initialize the log4cxx system properly.

    • Sign in to reply
    • Cancel
    Parents
    • Trevor Sedlock
      0 Offline Trevor Sedlock Tue, May 16 2023 3:59 PM

      I've re-ran the script from a fresh admin-elevated PS window, different folder though. I received the following error this time:

      PS D:\_idcWork\pwTreeExport\PWExport2Vault> .\CopyLockStations.ps1 -targetFolder "Admin\Export2Vault\_old"
      Station Engineering\1. AEP Companies\Kentucky\Bonnyman 033085
      VERBOSE: 1 input folder(s).
      VERBOSE: MemberType: ul
      VERBOSE: Starting Access Control Update Process 5/16/2023 3:42:52 PM.
      VERBOSE: MemberName: TEALL : MemberID: 17
      VERBOSE: Successfully added access control settings for 'Station Engineering\1. AEP Companies\Kentucky\Bonnyman 033085'.
      VERBOSE:  - Added 'TEALL' to Work Area/Folder security.
      VERBOSE: Successfully added access control settings for 'Station Engineering\1. AEP Companies\Kentucky\Bonnyman 033085'.
      VERBOSE:  - Added 'TEALL' to Document security.
      VERBOSE: Ending Access Control Update Process 5/16/2023 3:42:52 PM.
      True
      Copy-PWFolder : An error occurred when attempting to copy folder 'Station Engineering\1. AEP Companies\Kentucky\Bonnyman 033085' to 'Admin\Export2Vault\_old'.
      At D:\_idcWork\pwTreeExport\PWExport2Vault\CopyLockStations.ps1:16 char:5
      +     Copy-PWFolder -FolderPath "$targetFolder" -FolderToCopy $line -In ...
      +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : NotSpecified: (Station Enginee...Bonnyman 033085:String) [Copy-PWFolder], Exception
          + FullyQualifiedErrorId : Failed to create satellite document.,PWPS_DAB.CopyPWFolder

      I couldn't locate anything regarding this one either. I was able to manually copy the folder though using ProjectWise Explorer's GUI, no errors.

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • MWBSI
      0 MWBSI Wed, May 17 2023 10:14 AM in reply to Trevor Sedlock

      Well, you could try our own Write-PWPSLog cmdlet for logging if you can't get LOG4CXX or LOG4NET working.   

      Thanks,

      Mark Weisman | Bentley Systems

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    Reply
    • MWBSI
      0 MWBSI Wed, May 17 2023 10:14 AM in reply to Trevor Sedlock

      Well, you could try our own Write-PWPSLog cmdlet for logging if you can't get LOG4CXX or LOG4NET working.   

      Thanks,

      Mark Weisman | Bentley Systems

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    Children
    No Data

    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2023 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies