How to solve runtime error "No entry could be found" during Tycho? - tycho

I have an Eclipse plug-in test that wants to access the resources in another plug-in's resources source folder. However, when I build them with Tycho, the test fails with:
No entry could be found or if the caller does not have the appropriate AdminPermission[this,RESOURCE] and the Java Runtime Environment supports permissions.
What could the problem be?

The resources source folder is missing from the bin.includes section of its build.properties, add it.

Related

Build error when having an "adapters" folder in "common"

Building a MobileFirst project that has an "adapters" folder in the "common" environment, causes a build error: "Adapter deployment failed: Adapter 'xxx' contains errors ". I guess the build system is looking for an "adapters" folder anywhere (and should only look in the root).
Thanks for the report. The development team will investigate. There is obviously no workaround... Other than using a different name for the folder.
If you'll want a fix for this issue you'll need to one a PMR support ticket.

SpecFlow error on build server

I am getting a strange error on the build server, this does NOT happen locally.
Error during file generation. The target file 'C:...\AcceptanceTest\Features\HelloWorld.feature.cs'
is read-only, but different from the transformation result. This
problem can be a sign of an inconsistent source code package. Compile
and check-in the current version of the file from the development
environment or remove the read-only flag from the generation result.
To compile a solution that contains messaging project on a build
server, you can also exclude the messaging project from the
build-server solution or set the msbuild
project parameter to 'true' in the messaging project file.
I'm not sure what to do to fix this, I don't have a "messaging" project (or know what is being referred too). And the code is the latest
This is the full message (some folder names have been obfuscated):
13>C:\Builds\2\Services\PService\src\packages\SpecRun.Excel.1.1.0\tools\TechTalk.SpecFlow-buildfix.targets(47,5):
error : Error during file generation. The target file
'C:\Builds\2\Services\PService\src\PService\Test\PService.AcceptanceTest\Features\HelloWorld.feature.cs'
is read-only, but different from the transformation result. This
problem can be a sign of an inconsistent source code package. Compile
and check-in the current version of the file from the development
environment or remove the read-only flag from the generation result.
To compile a solution that contains messaging project on a build
server, you can also exclude the messaging project from the
build-server solution or set the msbuild
project parameter to 'true' in the messaging project file.
[C:\Builds\2\Services\PService\src\PService\Test\PService.AcceptanceTest\PService.AcceptanceTest.csproj]
13>C:\Builds\2\Services\PService\src\packages\SpecRun.Excel.1.1.0\tools\TechTalk.SpecFlow-buildfix.targets(47,5):
error : Could not find file
'C:\Users\tfsbuild\AppData\Local\Temp\tmpPWithData.feature.xlsx.cs'.
[C:\Builds\2\Services\PService\src\PService\Test\PService.AcceptanceTest\PService.AcceptanceTest.csproj]
13>C:\Builds\2\Services\PService\src\PService\Test\PService.AcceptanceTest\Features\PWithData.feature.xlsx
: error : Generation error: Could not find file
'C:\Users\tfsbuild\AppData\Local\Temp\tmpPWithData.feature.xlsx.cs'.
[C:\Builds\2\Services\PService\src\PService\Test\PService.AcceptanceTest\PService.AcceptanceTest.csproj]
Delete HelloWorld.feature.cs from source control.
TFS will checkout files as read-only during a build and so SpecFlow fails to re-generate the file because it already exists and SpecFlow doesn't overwrite read-only files.
I created a new request for SpecFlow to not automatically add the file to source control here: https://github.com/techtalk/SpecFlow/issues/592
I'm not sure what the messaging project refers to, that's something I haven't seen before.
However the error reads as if the problem is due to an issue with the generation of the *.feature.cs from the *.feature file, but I am confused as to why this should be happening on the build server. Normally the generation of *.feature.cs occurs in the IDE when you save the *.feature file. This gets checked in and with some version control systems (VCS) you may end up with a read-only file status.
Your error reads as the build server is trying to re-generate the *.feature.cs file and cannot overwrite it.
Some things to check;
What VCS are you running? Does it leave checked-in files as read-only?
How are you building the files on the build server? Is there a custom step involved, or is it just a simple compile?
Can you replicate this error on your machine by setting the *.feature.cs to read-only and running the same build script on your local machine?
Good luck.

not found (404) error in dnn

I have created a module named "Module Example" on cristoc for dnn and after build that I want to make the release of that module. It show me an error below.
Error 2 The "MSBuild.Community.Tasks.XmlRead" task could not be loaded from the assembly C:\inetpub\wwwroot\websites\dnndev.me\DesktopModules\Module Example\\packages\MSBuildTasks.1.4.0.61\tools\MSBuild.Community.Tasks.dll. Could not load file or assembly 'file:///C:\inetpub\wwwroot\websites\dnndev.me\DesktopModules\Module Example\packages\MSBuildTasks.1.4.0.61\tools\MSBuild.Community.Tasks.dll' or one of its dependencies. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.
Then I have to try some nuggets to Install like "nuget install packages.config" and "Install-Package Newtonsoft.Json". After installing both nugets, click on build and make release of this module and release created successfully at C:\inetpub\wwwroot\websites\dnndev.me\DesktopModules\Module Example\install and release name Module_Example_00.00.01_Source it is a zip folder. After that for installing this module on dnn environment, I open my dnn site "dnndev.me" and after login on it, hover on host and click on extension and after that click on Install extension button and browse the location of the folder and click on "Next" button. But after that an error occur on installing this module.
Failure File specified in the dnn could not be found in the zip file: - C:\inetpub\wwwroot\websites\dnndev.me\Install\Temp\1cjkvd5v\bin\Module_Example.dll
And my on DNN environment Not found(404) error also comes. Why? I don't understand what happens. Kindly suggest me waiting for reply. Thanks
I don't know those components but I think the generated package is a source package inspite of the release package you're waiting for.
Then, it probably doesn't contain the corresponding generated assembly. I suggest you to open the zip to verify the presence of "Module_Example.dll".
Does this dll exist in your development environnment? Does your ascx use "codebehind" or "codefile"? With codefile mode, you don't need to upload the dll but the source file (vb.net ou C#).
I hope it helps you.

msbuild failing with "cannot find a a part of the path"

I'm running msbuild on my .sln file and I'm suddenly getting
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(2291,5):
error SB3554: Cannot write to the output file "C:\Work\product\src\component\
obj\Debug\product.resources". Could not find a part of the path 'C:\Work\
product\src\component\obj\Debug\component.Resources.resources'. [C:\Work\
product\src\component\component.vbproj]
No amount of deleting binaries and retrying helps
Had a similar intermittent problem, added these options to the copy command
Retries="10" RetryDelayMilliseconds="5000"
and it seemed to do the trick
The error states product.resources is failing because component.Resources.resources cannot be found.
Ensure your project build order is correct since resources files are built at compile time and it cannot find the needed resources file to continue.
Another solution you might try is to delete and re-add any .resx files in your projects.
Also, I would create one shared project with resources for the solution to make it easier to mange your resources. Here is an example although a little dated.
How to use shared resource file between projects in one solution?
MSDOCS-Packaging and Deploying Resources in .NET Apps

Eclipse RCP: Dependencies correct (?) but get a NoClassDefFoundError

I have a RCP project where I cannot fix a NoClassDefFoundError: One plugin depends on another plugin. The plugin-dependencies are set in the manifest, packages exported, and there is no error at compile time. Both plugins are in the product dependencies and visible in the installation details of the product.
But when I run the application I get a java.lang.NoClassDefFoundError when the one plugin wants to use a class from the other plugin.
Any hints how to find the reason for this are greatly appreciated.
Thanks,
Michael
I found the problem: I created the plugin which could not be loaded from an existing Java project. And somehow I deleted the "." in the entry Bundle-classpath in the plugin manifest (the plugin has some jars which -> so lib/xyz.jar was in the Bundle-classpath entry but not the ".").
For the class-loader of the bundle the "." means to search for classes from the root path of the bundle (or something like that), so it could not find the classes. However, there were no errors in the IDE so it was hard to find.
Is the configuration for running the application correct i.e. all dependencies are also put in the running configuration?