Our Jenkins (maven) build randomly fails with the following error stack:
-- (StackOverflowError) null
null
java.lang.StackOverflowError
at org.aspectj.weaver.World.resolve(World.java:273)
at org.aspectj.weaver.World.resolve(World.java:209)
at org.aspectj.weaver.UnresolvedType.resolve(UnresolvedType.java:645)
at org.aspectj.weaver.ResolvedType.getRawType(ResolvedType.java:2331)
at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:427)
at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:393)
at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:427)
at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:393)
this failure is definitely not caused by actual code change as usually after such a failure, the subsequent build, manually triggered (i.e. not code committed), succeeds.
Versions are as follows :
Jenkins: 1.501
maven: 2.2.2
aspectjrt: 1.6.10
Anyone has an idea how to address this?
Just guessing, but a similar error occurred due to a bug which was fixed in 1.6.8. What blocks you from upgrading to the current AspectJ release? Yours is really old.
I believe the reason upgrading to the latest version of aspectj didn't fix the issue was because aspectj maven plugin version 1.3 was defined in the pom. This version of the plugin has a dependency on aspectj version 1.6.7 (version prior to 1.6.8 where fix was introduced). Upgrading the plugin to version 1.4 (which depends on aspectj version 1.6.11) seems to have fixed the problem as we didn't get the StackOverflowError exception since then.
In general terms, dependency tree (including plugins) should be checked in case there is an obsolete hidden dependency.
The commands to find out the dependency tree (including plugins) are :
mvn dependency:tree
and
mvn dependency:resolve-plugins
Related
I upgraded my azure function sdk from 1.0.14 to 1.0.28 and I get this build error:
The ExtensionsMetadataGenerator package was not imported correctly.
I can't find any documentation or ways to resolve it.
According to the 1.0.28 function sdk released several day ago, it may have some bugs in it.
Workaround:
Manually adding the
Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator nuget package to your project and it will work well.
I got this error when starting with the Visual Studio Function App template which uses Microsoft.NET.Sdk.Functions 1.0.31 and is a .NET Core 2.0 App.
Nuget Package Manager wants to update the Microsoft.NET.Sdk.Functions package to version 3.0.2 which it tries to do but the app is still .NET Core 2 and you get the error:
The ExtensionsMetadataGenerator package was not imported correctly.
To resolve this update the application to .NET Core 3:
Make sure you update your Microsoft.NET.Sdk.Functions NuGet package to the newest version that supports your app's version of .NET.
For example, I have a web app running .NET 2.1, I had to rollback the NuGet version to 1.0.36, and the next version (3.0) only worked on .NET 3 and up. After doing this, Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator NuGet was not needed at all and all my errors were gone.
I am working with microsoft.net.sdk.functions 1.0.38 and see the same message but in my case it is a build warning and not an error.
I installed the suggested NuGet package with the version required. However, I then received 3 warnings:
The ExtensionsMetadataGenerator package was not imported correctly. Are you missing 'C:\Users\me\.nuget\packages\microsoft.azure.webjobs.script.extensionsmetadatagenerator\1.2.0\build\Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator.targets' or 'C:\Users\me\.nuget\packages\microsoft.azure.webjobs.script.extensionsmetadatagenerator\1.2.0\build\Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator.props'? "C:\Users\me\.nuget\packages\microsoft.azure.webjobs.script.extensionsmetadatagenerator\1.2.0\build\Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator.props" cannot be imported again. It was already imported at "C:\Users\me\.nuget\packages\microsoft.net.sdk.functions\1.0.38\build\Microsoft.NET.Sdk.Functions.props (56,3)". This is most likely a build authoring error. This subsequent import will be ignored. [D:\myproject.Web\myproject.Web.AzureFunctions\myproject.Web.AzureFunctions.csproj] "C:\Users\me\.nuget\packages\microsoft.azure.webjobs.script.extensionsmetadatagenerator\1.2.0\build\Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator.targets" cannot be imported again. It was already imported at "C:\Users\me\.nuget\packages\microsoft.net.sdk.functions\1.0.38\build\Microsoft.NET.Sdk.Functions.targets (64,3)". This is most likely a build authoring error. This subsequent import will be ignored. [D:\myproject.Web\myproject.Web.AzureFunctions\myproject.Web.AzureFunctions.csproj]
Worse still my project would not build - it freezes on build with no way to cancel. The only way to cancel was to do, elevated PowerShell:
stop-process -name "dotnet"
To fix this I tried uninstalling the NuGet package but this is not enough as it still seems to be used if it is on the system (even though the project does not reference it?!?).
It is necessary to actually delete the package from package store, i.e. at.
C:\Users\me\.nuget\packages\microsoft.azure.webjobs.script.extensionsmetadatagenerator
Or an alternative is to comment out the lines:
<GenerateFunctionsExtensionsMetadata SourcePath="$(_FunctionsExtensionsDir)" OutputPath="$(_FunctionsExtensionsDir)"/>
From:
C:\Users\me\.nuget\packages\microsoft.azure.webjobs.script.extensionsmetadatagenerator\1.2.0\build\Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator.targets
I have no idea if this is safe to do so but it gets rid of the warning message. I instead opted to just delete the NuGet package and live with the original warning.
Looks like a real mess with microsoft.net.sdk.functions package.
cannot start .NET Core app because of this error:
"It was not possible to find any compatible framework version
The specified framework 'Microsoft.NETCore.App', version '2.0.7' was not found.
- Check application dependencies and target a framework version installed at:
\
- Alternatively, install the framework version '2.0.7'.
The program '[1560] dotnet.exe' has exited with code -2147450749 (0x80008083)."
Editing .csproj didn't help. It looks like this:
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<RuntimeFrameworkVersion>2.0.7</RuntimeFrameworkVersion>
<DockerComposeProjectPath>..\docker-compose.dcproj</DockerComposeProjectPath>
<MvcRazorCompileOnPublish>false</MvcRazorCompileOnPublish>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
You don't have the right .NET Core runtime installed. It's not good enough that's a .NET Core 2 runtime; it needs to be a minor version that is equal to or encompasses the version you're trying to target. You can see all the available runtimes here: https://www.microsoft.com/net/download/all. Specifically, you need 2.0 Runtime (v2.0.7) or higher. You can just choose 2.1, though. 2.0.7 will be rolled in and then, if you do end up upgrading your project later, you won't run into this issue again.
After playing around for a (longer) while, eventually it turned out that the solution is to comment out RuntimeFrameworkVersion in .csproj:
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<!--<RuntimeFrameworkVersion>2.0.7</RuntimeFrameworkVersion>-->
<DockerComposeProjectPath>..\docker-compose.dcproj</DockerComposeProjectPath>
<MvcRazorCompileOnPublish>false</MvcRazorCompileOnPublish>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
It is worth mentioning that the problem occured after my collegues upgraded a .NET Core to higher version and I did 'Get latest version'.
After I had troubles building/serving an addon I'm working at, I did the usual steps to heal (delete node_modules, npm clean, npm install, ...) with no success.
So finally I'm at the stage where I newly created a fresh addon via ember addon jeff-table to port the 'old' not working repo to there....
Addon-creation was successful:
installing addon
create .bowerrc
....
create .npmignore
Successfully initialized git.
Installed packages for tooling via npm.
Installed browser packages via Bower.
Anyway, again I get the same errors when trying to build the untouched addon:
Cannot read property '0' of undefined
TypeError: Cannot read property '0' of undefined
at EmberAddon.EmberApp._initVendorFiles (C:\users\jefff\google drive\www\ember-addons\jeff-table\node_modules\ember-cli\lib\broccoli\ember-app.js:317:55)
at EmberAddon.EmberApp [as appConstructor] (C:\users\jefff\google drive\www\ember-addons\jeff-table\node_modules\ember-cli\lib\broccoli\ember-app.js:94:8)
at new EmberAddon (C:\users\jefff\google drive\www\ember-addons\jeff-table\node_modules\ember-cli\lib\broccoli\ember-addon.js:38:8)
at module.exports (C:\users\jefff\google drive\www\ember-addons\jeff-table\ember-cli-build.js:6:13)
at Class.module.exports.Task.extend.setupBroccoliBuilder (C:\users\jefff\google drive\www\ember-addons\jeff-table\node_modules\ember-cli\lib\models\builder.js:55:
19)
at Class.module.exports.Task.extend.init (C:\users\jefff\google drive\www\ember-addons\jeff-table\node_modules\ember-cli\lib\models\builder.js:89:10)
at new Class (C:\users\jefff\google drive\www\ember-addons\jeff-table\node_modules\ember-cli\node_modules\core-object\core-object.js:18:12)
at Class.module.exports.Task.extend.run (C:\users\jefff\google drive\www\ember-addons\jeff-table\node_modules\ember-cli\lib\tasks\serve.js:15:19)
at C:\users\jefff\google drive\www\ember-addons\jeff-table\node_modules\ember-cli\lib\commands\serve.js:64:24
I suspected GDrive to have messed up my node_modules or smth, but on a fresh installation this could not be the case (with GDrive switched of).
I have not touched installation of ember-cli (not that I know of).
Does anybody have an idea of what could be wrong here?
ember-cli: 2.5.0
node: 4.2.2
os: win32 x64
Try setting a lodash dependency in your package.json to a version older than 4.17.0. It's a dependency of ember-cli and was updated last night. I had the same error and stack trace with one of my company's projects this morning, it compiled last night in the CI system but failed this morning with no changes to the project. I compared the downloaded dependencies, and a couple had new versions. The first difference was lodash, so I added the 4.16.6 version to my package.json (the version that worked last night) and my project compiled again.
I'm still a novice when it comes to Node, so there may be a better solution, but this isn't the first time I was able to resolve a compilation break by forcing npm to get an older version of a dependency.
the same issue hit my projects as well.
#Bloomy you are right,
error comes from here
/node_modules/ember-cli/lib/broccoli/ember-app.js:317:55
by short debugging it appear that the issue with accessing a property from an object which isn't exist, because, as I guess, lodash 'avoid deep cloning of ._omit result' https://github.com/lodash/lodash/commit/6c427b7a260183685b16d2624351529cda25ce81 .
If you will put version of lodash in ember-cli to some version which goes before (just for your local version) - you will see it works. Not possible for production yet. Going to open a ticket in ember-cli addon if isn't opened yet :)
I was also facing the same issue and raised the following issue in github
https://github.com/ember-cli/ember-cli/issues/6432
And found out that the recent release of lodash i.e. lodash#4.17.0 has a little bug in it which is breaking things. So till a patch is released, try using lodash#4.16.5, this should solve your problem for now.
Is there any way to make maven run ant with a JDK that is defined using maven toolchains plugin?
Why?
I'm testing if I can convert a legacy ant based project to maven based project. Seems parts of it are next to impossible to do with maven so I need to do those with ant. At one point I need to compile using JDK 6 (and it needs to be 6, see e.g. bootstrap class path not set ). Seems maven runs the antrun with the JDK version it is running and toolchains are not taken into consideration (which is ok because the https://maven.apache.org/guides/mini/guide-using-toolchains.html does not display antrun as compatible plugin).
I had maybe a related issue and and least for a subset of Java related Ant tasks the attribute jvm or executable and setting fork=true to set the used JVM might be helpful. I assume the problem in your case might be solved with javac and java. In my example I had to use Java 8 for an older Java program not running with Java 17:
<java classname="com.sun.javacard.converter.Main"
failonerror="true" fork="true"
jvm="${JAVA_8_HOME}/bin/java">
<jvmarg value="-Djc.home=${jc.home}"/>
...
After recently upgrading to the latest version of dotless on nuget, I'm now getting build errors.
I have dotless set up as a build task, as per https://stackoverflow.com/a/2181543/435460
It used to work, but when I recently updated to the latest version on nuget I now receive the error dotless 1.3.0.5 has stopped working when I attempt to build, resulting in my build failing.
Is there a way to get this working again? I've already done some preliminary google investigating and have come up short.
It looks like this was caused on our machines by something removing the .NET 3.5 Framework - the dev had been having other issues, and I think removed 4.5, and something around that cleaned out 3.5 next time he rebooted.
Re-installing .NET 3.5 seemed to have resolved the issue.