Unable to delete invalidated cache folder. Access to the path is denied - code-generation

I'm getting the below error in CodeSmith Generator Studio, version 7.1.0 when rebuilding my template master cst file.
Error: Unable to delete invalidated cache folder. - Access to the path 'oipf2tbx.dll' is denied.
Stack Trace:
at System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive, Boolean throwOnTopLevelDirectoryNotFound, WIN32_FIND_DATA& data)
at System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive, Boolean checkHost)
at CodeSmith.Engine.Compiler.CacheManager.Delete(CacheEntry entry)
I've tried restarting my machine, restarting CodeSmith, and also deleting the contents of both PropertySetCache and TemplateCache in AppData\Local\CodeSmith\v7.1, but I'm still getting the error.
Any ideas of how I can make this error go away when rebuilding?

Related

Error upgrading Jasperreports server from 7.2 to 7.5 (keystore problem)

The upgrade procedure is pretty simple and well documented. I have been upgrading jasperreports server since version 4 always using the same procedure (buildomatic).
Now, in 7.5 version I get
java.lang.RuntimeException: KeystoreManager was never initialized or
there are errors while instantiating the instance.
Failed to instantiate
[com.jaspersoft.jasperserver.crypto.KeystoreManager]: Please make sure
that create-keystore was executed;
Error creating bean with name 'keystoreManager': Invocation of init
method failed;
Error creating bean with name 'passwordEncoder': Unsatisfied
dependency expressed through field 'keystoreManager';
The keystore is in /root folder, as it should.
Have you tried the process mentioned in this link https://community.jaspersoft.com/wiki/encryption-jasperreports-server-75
"If the JasperReports Server cannot find the keystore files - maybe because of permissions as noted above, you will get an exception on server start like:
Failed to instantiate [com.jaspersoft.jasperserver.crypto.KeystoreManager]: Please make sure that create-keystore was executed; nested exception is java.lang.RuntimeException: KeystoreManager was never initialized or there are errors while instantiating the instance.
To fix this, you need to move the keystore files into a directory that is accessible by the user running the web app process. See Updating keystore files below."

The VSTS\TFS 2017 Release definition fails to create Release artifact directory at 'C:\Agents\DA_CID22\r1\a'

Lately I have been facing this error for one of my release definition and I am not able to figure it out why is this happening.
I tried manually deleting the folders inside the r1 directory but it fails to delete the 'a' folder i.e. artifact directory and says the folder or file in it is open in another program. But its shocking that the 'a' folder is empty and don't even have a hidden files and folders in it.
As a work around, to make the release successfully get deployed I have to restart my server each time whenever I want a new release to be deployed. Which is really very annoying.
Below is the complete error that I get on the Release definition summary.
Errors (2)
 Downloading artifacts failed:
Microsoft.VisualStudio.Services.Agent.Worker.Release.Artifacts.ArtifactDirectoryCreationFailedException:
Failed to create Release artifact directory 'C:\Agents\DA_CID22\r1\a'.
---> System.IO.IOException: The process cannot access the file '\?\C:\Agents\DA_CID22\r1\a' because it is being used by another
process. at System.IO.Win32FileSystem.RemoveDirectoryHelper(String
fullPath, Boolean recursive, Boolean throwOnTopLevelDirectoryNotFound)
at System.IO.Win32FileSystem.RemoveDirectory(String fullPath, Boolean
recursive) at
Microsoft.VisualStudio.Services.Agent.Util.IOUtil.DeleteDirectory(String
path, Boolean contentsOnly, Boolean continueOnContentDeleteError,
CancellationToken cancellationToken) at
Microsoft.VisualStudio.Services.Agent.Worker.Release.ReleaseFileSystemManager.EnsureEmptyDirectory(String
directoryPath, CancellationToken cancellationToken) --- End of inner
exception stack trace --- at
Microsoft.VisualStudio.Services.Agent.Worker.Release.ReleaseFileSystemManager.EnsureEmptyDirectory(String
directoryPath, CancellationToken cancellationToken) at
Microsoft.VisualStudio.Services.Agent.Worker.Release.RetryExecutor.Execute(Action
action) at
Microsoft.VisualStudio.Services.Agent.Worker.Release.ReleaseJobExtension.CreateArtifactsFolder(IExecutionContext
executionContext, String artifactsWorkingFolder) at
Microsoft.VisualStudio.Services.Agent.Worker.Release.ReleaseJobExtension.d__34.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task) at
Microsoft.VisualStudio.Services.Agent.Worker.Release.ReleaseJobExtension.d__31.MoveNext()
 Failed to create Release artifact directory
'C:\Agents\DA_CID22\r1\a'.
Any help or advice would be really helpful.
This happens from time to time...I spent days trying to figure out with no easy solution (all the ones you have tried, I tried myself) but for restarting the private agent. My conclusion is that somehow the agent process got hung with the artifact Windows folder. You can see that with programs like https://lockhunter.com/. There's not an easy solution here...Sometimes you must kill the culprit process which not ended correctly freeing that file, or if you are lucky releasing the file handle to that file with a tool like said before...

TFS vNext build agent installation [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 7 years ago.
Improve this question
I decided to start using the TFS build vNext pipeline and came across a strange issue during the configuration of my build agent. I would like to know if anyone else can replicate this and if so, how eventually can I solve the issue.
I installed the agent in the following directory D:\TFS Build Agent\agent and executed the configuration. The procedure went well and the agent is added correctly inside the given pool. Also the service is running correctly on my build machine.
However once I start a simple build I do get the following error:
09:10:23.570390 System.Management.Automation.ProviderInvocationException: Attempting to perform the NormalizeRelativePath operation on the 'FileSystem' provider failed for path 'D:\TFS Build Agent\agent\tasks\VSBuild\1.0.11'. Access is denied ---> System.UnauthorizedAccessException: Access is denied ---> System.ComponentModel.Win32Exception: Access is denied
--- End of inner exception stack trace ---
at Microsoft.PowerShell.Commands.FileSystemProvider.GetFileSystemInfo(String path, Boolean& isContainer)
at Microsoft.PowerShell.Commands.FileSystemProvider.NormalizeThePath(String basepath, Stack`1 tokenizedPathStack)
at Microsoft.PowerShell.Commands.FileSystemProvider.NormalizeRelativePathHelper(String path, String basePath)
at Microsoft.PowerShell.Commands.FileSystemProvider.NormalizeRelativePath(String path, String basePath)
at System.Management.Automation.SessionStateInternal.NormalizeRelativePath(ProviderInfo provider, String path, String basePath, CmdletProviderContext context)
--- End of inner exception stack trace ---
at System.Management.Automation.SessionStateInternal.NormalizeRelativePath(ProviderInfo provider, String path, String basePath, CmdletProviderContext context)
at System.Management.Automation.SessionStateInternal.NormalizeRelativePath(String path, String basePath, CmdletProviderContext context)
at System.Management.Automation.SessionStateInternal.SetLocation(String path, CmdletProviderContext context)
at System.Management.Automation.PathIntrinsics.SetLocation(String path)
at Microsoft.TeamFoundation.DistributedTask.Handlers.PowerShellHandler.Execute(ITaskContext context, CancellationToken cancellationToken)
at Microsoft.TeamFoundation.DistributedTask.Worker.JobRunner.RunTask(ITaskContext context, TaskWrapper task, CancellationTokenSource tokenSource)
09:10:23.570390 BaseLogger.LogConsoleMessage(scope.JobId = 88ecf41a-efe1-48d4-b67a-462b166f2b4c, message = ##[error]Attempting to perform the NormalizeRelativePath operation on the 'FileSystem' provider failed for path 'D:\TFS Build Agent\agent\tasks\VSBuild\1.0.11'. Access is denied)
I tried to make sure to give all the full set of permissions for the account under which my service is running to the above mentioned folder, but it didn't changed anything.
Now I moved the files of the agent to the C drive to the C:\agent folder and re-done the same exact setup, and suddenly all worked as supposed.
Even if this solves my problem I would like to know more about this issue. Is this a bug or am I missing some specific privileges?
Can anyone replicate this issue?
Thanks
Disable UAC - with PowerShell, not the Control Panel.
Something like:
New-ItemProperty -Path HKLM:Software\Microsoft\Windows\CurrentVersion\policies\system -Name EnableLUA -PropertyType DWord -Value 0 -Force
I've just had similar issue. Try setting service to local administrator, didn't do it. Disabling UAC appears to have been the cause.
Or directly in the registry I guess. Restart will be required to take effect.
I tried again to replicate this but with no success. It seems that there was some issue at the time with the machine I worked on.

'sqlite3.dll was not loaded' when trying to install GitHub

I am trying to install GitHub using GitHubSetup.exe, downloaded from windows.github.com. The setup program 'downloads' what it needs, then closes and does nothing more.
Looking at TheLog.txt (in AppData/GitHub) shows the following:
2015-04-09 12:18:24.0747|ERROR|thread: 1|CrashManager|Dumping Loaded Module List
2015-04-09 12:18:24.0325|ERROR|thread: 1|CrashManager|Aieeeeeeee!
System.TypeInitializationException: The type initializer for 'NativeMethods' threw an exception. ---> System.Exception: sqlite3.dll was not loaded.
at SQLitePCL.SQLite3Provider.NativeMethods..cctor()
--- End of inner exception stack trace ---
at SQLitePCL.SQLite3Provider.NativeMethods.sqlite3_open_v2(Byte[] filename, IntPtr& db, Int32 flags, Byte[] vfs)
at SQLitePCL.SQLite3Provider.SQLitePCL.ISQLite3Provider.sqlite3_open_v2(String filename, IntPtr& db, Int32 flags, String vfs)
at Akavache.Sqlite3.Internal.SQLiteConnection..ctor(String databasePath, SQLiteOpenFlags openFlags, Boolean storeDateTimeAsTicks)
at Akavache.Sqlite3.Internal.SQLiteConnection..ctor(String databasePath, Boolean storeDateTimeAsTicks)
at Akavache.Sqlite3.SQLitePersistentBlobCache..ctor(String databaseFile, IScheduler scheduler)
at GitHub.Helpers.SqlitePersistentBlobCacheFactory.CreateBlobCache(String path)
at GitHub.Helpers.SharedCache.<>c__DisplayClass5.<.ctor>b__1()
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at System.Lazy`1.get_Value()
at GitHub.Helpers.SharedCache.get_LocalMachine()
at GitHub.Helpers.AppLogManager.get_AnonymousIdentifier()
at GitHub.Helpers.HaystackTarget.Write(LogEventInfo logEvent)
at NLog.Targets.Target.Write(AsyncLogEventInfo logEvent)
2015-04-09 12:18:24.0747|ERROR|thread: 1|CrashManager|Inner Exception
System.Exception: sqlite3.dll was not loaded.
at SQLitePCL.SQLite3Provider.NativeMethods..cctor()
'sqlite3.dll was not loaded.' is also the error I get when I try to click on the GitHib shortcut that is placed on the desktop.
I am running Windows 8.1, 64 bit.
I have tried downloading a sqlite3.dll file and placing it in system32, but that does nothing. I have also explicitly told my firewall to allow connections for the setup program. I feel a little in over my head here - does anyone have any suggestions?
Please let me know if I need to provide any more information!
Thanks a lot!
Brendan here, one of the GitHub for Windows developers.
The latest update introduced a dependency that required a version of the Visual C++ Redistributable that wasn't installed as a pre-requisite. As a workaround, you can install the 32-bit version from here which adds it back in:
http://www.microsoft.com/en-us/download/details.aspx?id=30679

Mongodb worker role throws System.IO.FileNotFoundException

I have an Azure cloud project which makes use of mongodb worker roles. When running in the local emulator everything works fine, however when I deploy to an Azure staging area, the mongodb worker roles are stuck cycling and show a System.IO.FileNotFoundException. I connected to one of the virtual machines remotely and looked at the event viewer and found the following error:
An unhandled exception occurred. Type: System.IO.FileNotFoundException
Process ID: 1936 Process Name: WaWorkerHost Thread ID: 4 AppDomain
Unhandled Exception for role MongoDB.WindowsAzure.MongoDBRole_IN_0
Exception: Could not load file or assembly 'mswacdmi, Version=1.7.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its
dependencies. The system cannot find the file specified. at
Microsoft.WindowsAzure.StorageClient.CloudDrive..ctor(Uri uri,
StorageCredentials credentials) at
Microsoft.WindowsAzure.StorageClient.CloudStorageAccountCloudDriveExtensions.CreateCloudDrive(CloudStorageAccount
storageAccount, String pageBlobUri) at
MongoDB.WindowsAzure.MongoDBRole.Utilities.GetMountedPathFromBlob(String
localCachePath, String cloudDir, String containerName, String
blobName, Int32 driveSize, CloudDrive& mongoDrive) in
c:\Users\Matt\Software\AzurePrototype1\mongo-azure-master\src\MongoDB.WindowsAzure.MongoDBRole\Utilities.cs:line
78 at
MongoDB.WindowsAzure.MongoDBRole.MongoDBRole.GetMongoDataDirectory()
in c:\Users\Matt\Software\AzurePrototype1\mongo-azure-master\src\MongoDB.WindowsAzure.MongoDBRole\MongoDBRole.cs:line 255 at MongoDB.WindowsAzure.MongoDBRole.MongoDBRole.StartMongoD()
in c:\Users\Matt\Software\AzurePrototype1\mongo-azure-master\src\MongoDB.WindowsAzure.MongoDBRole\MongoDBRole.cs:line 201 at MongoDB.WindowsAzure.MongoDBRole.MongoDBRole.OnStart() in
c:\Users\Matt\Software\AzurePrototype1\mongo-azure-master\src\MongoDB.WindowsAzure.MongoDBRole\MongoDBRole.cs:line 91 at
Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.InitializeRoleInternal(RoleType
roleTypeEnum) at
Microsoft.WindowsAzure.ServiceRuntime.Implementation.Loader.RoleRuntimeBridge.b__0()
at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state, Boolean
ignoreSyncCtx) at
System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state) at
System.Threading.ThreadHelper.ThreadStart()
Why does this work locally and not on Azure? I don't understand much about assemblies and such, but I am learning as I go along. One of the things suggested online is to check the properties of references assemblies and set 'Copy Local' to true, I have tried this but still the same error.
In your worker role project, Make sure you have a .NET reference to mswacdmi.dll with the Properties set Copy Local=true. When you publish - RDP to your Azure role instance to verify that your deployed role has the assembly in the /bin directory.
Also make sure you are targeting x64 - I found mswacdmi.dll at this path (Azure SDK 1.8):
C:\Program Files\Microsoft SDKs\Windows Azure.NET SDK\2012-10\bin\runtimes\storage\cloud\x64