I am getting this sbt error , Is there any way to fix this issue - sbt

I have this issue while running sbt package command
C:\Users\U101\IdeaProjects\sbt1>sbt package
Java HotSpot(TM) 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0
[info] welcome to sbt 1.4.7 (Oracle Corporation Java 10.0.2)
[info] loading global plugins from C:\Users\U101\.sbt\1.0\plugins
[info] loading project definition from C:\Users\U101\IdeaProjects\sbt1\project
[info] loading settings for project sbt1 from build.sbt ...
[info] set current project to sbt1 (in build file:/C:/Users/U1081739/IdeaProjects/sbt1/)
[info] compiling 10 Scala sources to C:\Users\U1081739\IdeaProjects\sbt1\target\scala-2.11\classes ...
[info] Non-compiled module 'compiler-bridge_2.11' for Scala 2.11.12. Compiling...
error: java.lang.NullPointerException
| => sat scala.reflect.io.JavaToolsPlatformArchive.iterator(ZipArchive.scala:301)
at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
at scala.reflect.io.AbstractFile.foreach(AbstractFile.scala:92)
at scala.tools.nsc.util.DirectoryClassPath.traverse(ClassPath.scala:277)
at scala.tools.nsc.util.DirectoryClassPath.x$15$lzycompute(ClassPath.scala:299)
at scala.tools.nsc.util.DirectoryClassPath.x$15(ClassPath.scala:299)
at scala.tools.nsc.util.DirectoryClassPath.packages$lzycompute(ClassPath.scala:299)
at scala.tools.nsc.util.DirectoryClassPath.packages(ClassPath.scala:299)
at scala.tools.nsc.util.DirectoryClassPath.packages(ClassPath.scala:264)
at scala.tools.nsc.util.MergedClassPath$$anonfun$packages$1.apply(ClassPath.scala:358)
at scala.tools.nsc.util.MergedClassPath$$anonfun$packages$1.apply(ClassPath.scala:358)
at scala.collection.Iterator$class.foreach(Iterator.scala:891)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1334)
at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
at scala.tools.nsc.util.MergedClassPath.packages$lzycompute(ClassPath.scala:358)
at scala.tools.nsc.util.MergedClassPath.packages(ClassPath.scala:353)
at scala.tools.nsc.symtab.SymbolLoaders$PackageLoader$$anonfun$doComplete$1.apply$mcV$sp(SymbolLoaders.scala:269)
at scala.tools.nsc.symtab.SymbolLoaders$PackageLoader$$anonfun$doComplete$1.apply(SymbolLoaders.scala:260)
at scala.tools.nsc.symtab.SymbolLoaders$PackageLoader$$anonfun$doComplete$1.apply(SymbolLoaders.scala:260)
at scala.reflect.internal.SymbolTable.enteringPhase(SymbolTable.scala:235)
Can you help please
JDK installed is 1.8 in my laptop
I added jdk 8 in my environment variables, i also installed sbt sbt-0.13.18 , i dont know how it takes sbt 1.4.7

Related

JavaFX No toolkit found despite jar is bundled

I have a runnable jar (drkodi-mac-aarch64.jar), that should contain all that is needed, including the FX components.
I can successfully start the app by executing the following command:
java -jar drkodi-mac-aarch64.jar
My java installation:
java -version
openjdk version "18.0.1" 2022-04-19
OpenJDK Runtime Environment Temurin-18.0.1+10 (build 18.0.1+10)
OpenJDK 64-Bit Server VM Temurin-18.0.1+10 (build 18.0.1+10, mixed mode)
Now, I bundle this runnable jar into a Mac App, which contains a JRE and a launcher.
file DrKodi.app/Contents/MacOS/launcher-macosx-aarch64.sh
DrKodi/DrKodi.app/Contents/MacOS/launcher-macosx-aarch64.sh: POSIX shell script text executable, ASCII text
cat DrKodi.app/Contents/MacOS/launcher-macosx-aarch64.sh
cd "$(dirname "$0")" || exit
../Plugins/jre/Contents/Home/bin/java -jar "../Resources/Java/drkodi-mac-aarch64.jar"
The JRE is located here:
DrKodi/DrKodi.app/Contents/PlugIns/jre/Contents/Home
It is created using the following command:
Creating JRE with next modules included: java.base,java.logging,java.desktop,jdk.unsupported,java.scripting
[INFO] Using /Library/Java/JavaVirtualMachines/temurin-18.jdk/Contents/Home/jmods modules directory
[INFO] Executing command: /bin/sh -c cd '/Users/alex/sources/drkodi/.' && '/Library/Java/JavaVirtualMachines/temurin-18.jdk/Contents/Home/bin/jlink' --module-path /Library/Java/JavaVirtualMachines/temurin-18.jdk/Contents/Home/jmods --add-modules java.base,java.logging,java.desktop,jdk.unsupported,java.scripting --output /Users/alex/sources/drkodi/target/DrKodi/DrKodi.app/Contents/PlugIns/jre/Contents/Home --no-header-files --no-man-pages --strip-debug --compress=2
[INFO] Removing folder [/Users/alex/sources/drkodi/target/DrKodi/DrKodi.app/Contents/PlugIns/jre/Contents/Home/legal]
[INFO] JRE bundled in /Users/alex/sources/drkodi/target/DrKodi/DrKodi.app/Contents/PlugIns/jre/Contents/Home!
Now, when I start the App using the bundled java executable, like this:
./DrKodi.app/Contents/PlugIns/jre/Contents/Home/bin/java -jar ./DrKodi.app/Contents/Resources/Java/drkodi-mac-aarch64.jar
I get the following exception:
java.lang.RuntimeException: No toolkit found
at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:280)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:291)
If I start the jar file using my installed JRE, like follows, it works:
java -jar ./DrKodi.app/Contents/Resources/Java/drkodi-mac-aarch64.jar
If I take a look at the runnable jar, the library seems to be there, it's also the right arch:
unzip -l drkodi-mac-aarch64.jar | grep javafx
1659 10-25-2019 15:22 BOOT-INF/lib/javafx-weaver-spring-boot-starter-1.3.0.jar
5686 10-25-2019 15:23 BOOT-INF/lib/javafx-weaver-spring-1.3.0.jar
9621 10-25-2019 15:23 BOOT-INF/lib/javafx-weaver-core-1.3.0.jar
3918 10-25-2019 15:24 BOOT-INF/lib/javafx-weaver-spring-boot-autoconfigure-1.3.0.jar
302 10-17-2022 11:07 BOOT-INF/lib/javafx-fxml-19.jar
129499 09-12-2022 11:46 BOOT-INF/lib/javafx-fxml-19-mac-aarch64.jar
306 10-17-2022 11:07 BOOT-INF/lib/javafx-controls-19.jar
2547893 09-12-2022 11:46 BOOT-INF/lib/javafx-controls-19-mac-aarch64.jar
306 10-17-2022 11:07 BOOT-INF/lib/javafx-graphics-19.jar
4812958 09-12-2022 11:46 BOOT-INF/lib/javafx-graphics-19-mac-aarch64.jar
302 10-17-2022 11:07 BOOT-INF/lib/javafx-base-19.jar
752442 09-12-2022 11:36 BOOT-INF/lib/javafx-base-19-mac-aarch64.jar
This is strange to me, since the bundled JRE was created from my local Java installation, it should be the same.
The JavaFX libs are inside the runnable jar, the app is not modular, so it is a little strange that it works one way but not the other.
I am on a Mac M1.
Modules known to my installed JRE:
java --list-modules
java.base#18.0.1
java.compiler#18.0.1
java.datatransfer#18.0.1
java.desktop#18.0.1
java.instrument#18.0.1
java.logging#18.0.1
java.management#18.0.1
java.management.rmi#18.0.1
java.naming#18.0.1
java.net.http#18.0.1
java.prefs#18.0.1
java.rmi#18.0.1
java.scripting#18.0.1
java.se#18.0.1
java.security.jgss#18.0.1
java.security.sasl#18.0.1
java.smartcardio#18.0.1
java.sql#18.0.1
java.sql.rowset#18.0.1
java.transaction.xa#18.0.1
java.xml#18.0.1
java.xml.crypto#18.0.1
jdk.accessibility#18.0.1
jdk.attach#18.0.1
jdk.charsets#18.0.1
jdk.compiler#18.0.1
jdk.crypto.cryptoki#18.0.1
jdk.crypto.ec#18.0.1
jdk.dynalink#18.0.1
jdk.editpad#18.0.1
jdk.hotspot.agent#18.0.1
jdk.httpserver#18.0.1
jdk.incubator.foreign#18.0.1
jdk.incubator.vector#18.0.1
jdk.internal.ed#18.0.1
jdk.internal.jvmstat#18.0.1
jdk.internal.le#18.0.1
jdk.internal.opt#18.0.1
jdk.internal.vm.ci#18.0.1
jdk.internal.vm.compiler#18.0.1
jdk.internal.vm.compiler.management#18.0.1
jdk.jartool#18.0.1
jdk.javadoc#18.0.1
jdk.jcmd#18.0.1
jdk.jconsole#18.0.1
jdk.jdeps#18.0.1
jdk.jdi#18.0.1
jdk.jdwp.agent#18.0.1
jdk.jfr#18.0.1
jdk.jlink#18.0.1
jdk.jpackage#18.0.1
jdk.jshell#18.0.1
jdk.jsobject#18.0.1
jdk.jstatd#18.0.1
jdk.localedata#18.0.1
jdk.management#18.0.1
jdk.management.agent#18.0.1
jdk.management.jfr#18.0.1
jdk.naming.dns#18.0.1
jdk.naming.rmi#18.0.1
jdk.net#18.0.1
jdk.nio.mapmode#18.0.1
jdk.random#18.0.1
jdk.sctp#18.0.1
jdk.security.auth#18.0.1
jdk.security.jgss#18.0.1
jdk.unsupported#18.0.1
jdk.unsupported.desktop#18.0.1
jdk.xml.dom#18.0.1
jdk.zipfs#18.0.1
Modules known to the bundled JRE:
DrKodi.app/Contents/PlugIns/jre/Contents/Home/bin/java --list-modules
java.base#18.0.1
java.datatransfer#18.0.1
java.desktop#18.0.1
java.logging#18.0.1
java.prefs#18.0.1
java.scripting#18.0.1
java.xml#18.0.1
jdk.unsupported#18.0.1
The App uses javafx-weaver, so it is basically a Desktop Spring Boot application.

Azure Devops - dotnetcore build fails consistently - process failed to start

Am setting up a small project build, which is in .Net Core. dotnet build fails everytime with below log:
2019-10-03T21:31:54.5434435Z ##[section]Starting: dotnet build
2019-10-03T21:31:54.5559431Z ==============================================================================
2019-10-03T21:31:54.5559511Z Task : .NET Core
2019-10-03T21:31:54.5559544Z Description : Build, test, package, or publish a dotnet application, or run a custom dotnet command
2019-10-03T21:31:54.5559595Z Version : 2.158.0
2019-10-03T21:31:54.5559626Z Author : Microsoft Corporation
2019-10-03T21:31:54.5559679Z Help : https://learn.microsoft.com/azure/devops/pipelines/tasks/build/dotnet-core-cli
2019-10-03T21:31:54.5559712Z ==============================================================================
2019-10-03T21:31:55.3428758Z [command]C:\windows\system32\chcp.com 65001
2019-10-03T21:31:55.3566253Z Active code page: 65001
2019-10-03T21:31:55.5334629Z [command]C:\hostedtoolcache\windows\dotnet\dotnet.exe build d:\a\r1\a\MyTool\DataFactory\CustomActivities\MyTool\MyTool.csproj --no-restore
2019-10-03T21:31:55.5534100Z ##[error]Error: There was an error when attempting to execute the process 'C:\hostedtoolcache\windows\dotnet\dotnet.exe'. This may indicate the process failed to start. Error: spawn C:\hostedtoolcache\windows\dotnet\dotnet.exe ENOENT
2019-10-03T21:31:55.5546833Z ##[error]Dotnet command failed with non-zero exit code on the following projects : d:\a\r1\a\MyTool\DataFactory\CustomActivities\MyTool\MyTool.csproj
2019-10-03T21:31:55.5625878Z ##[section]Finishing: dotnet build
I have now added a dotnet SDK activity to load 2.2.x version and then then an explicit dotnet restore step (even though its not needed technically as build should do a restore too). But, the restore step passes, but it fails every time in the build step.
Some partial logs from the restore process are shown below -
2019-10-03T21:30:25.5826687Z ##[section]Starting: dotnet restore
2019-10-03T21:30:25.5942577Z ==============================================================================
2019-10-03T21:30:25.5942669Z Task : .NET Core
2019-10-03T21:30:25.5942702Z Description : Build, test, package, or publish a dotnet application, or run a custom dotnet command
2019-10-03T21:30:25.5942756Z Version : 2.158.0
2019-10-03T21:30:25.5942787Z Author : Microsoft Corporation
2019-10-03T21:30:25.5942837Z Help : https://learn.microsoft.com/azure/devops/pipelines/tasks/build/dotnet-core-cli
2019-10-03T21:30:25.5942869Z ==============================================================================
2019-10-03T21:30:27.1500592Z [command]C:\windows\system32\chcp.com 65001
2019-10-03T21:30:27.7292436Z Active code page: 65001
2019-10-03T21:30:27.7296084Z SYSTEMVSSCONNECTION exists true
2019-10-03T21:30:28.0692275Z SYSTEMVSSCONNECTION exists true
2019-10-03T21:30:28.5211540Z SYSTEMVSSCONNECTION exists true
2019-10-03T21:30:28.5240738Z Saving NuGet.config to a temporary config file.
2019-10-03T21:30:28.5284543Z Saving NuGet.config to a temporary config file.
2019-10-03T21:30:28.5338058Z [command]C:\hostedtoolcache\windows\dotnet\dotnet.exe restore d:\a\r1\a\MyTool\DataFactory\CustomActivities\MyTool\MyTool.csproj --configfile d:\a\_temp\Nuget\tempNuGet_05ce1f4cc83beb812b37be120d7010969ab1a363.config --verbosity Detailed
2019-10-03T21:30:31.1552382Z
2019-10-03T21:30:31.1633338Z Welcome to .NET Core!
2019-10-03T21:30:31.1633445Z ---------------------
2019-10-03T21:30:31.1633487Z Learn more about .NET Core: https://aka.ms/dotnet-docs
2019-10-03T21:30:31.1633556Z Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli-docs
2019-10-03T21:30:31.1633582Z
2019-10-03T21:30:31.1633618Z Telemetry
2019-10-03T21:30:31.1633654Z ---------
2019-10-03T21:30:31.1633712Z The .NET Core tools collect usage data in order to help us improve your experience. The data is anonymous and doesn't include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.
2019-10-03T21:30:31.1633881Z
2019-10-03T21:30:31.1633924Z Read more about .NET Core CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry
2019-10-03T21:30:31.1684350Z
2019-10-03T21:30:31.1686360Z Configuring...
2019-10-03T21:30:31.1686911Z --------------
2019-10-03T21:30:31.1687446Z A command is running to populate your local package cache to improve restore speed and enable offline access. This command takes up to one minute to complete and only runs once.
2019-10-03T21:30:44.4629886Z Decompressing .......... 13256 ms
2019-10-03T21:31:36.6357349Z Expanding .......... 51984 ms
2019-10-03T21:31:38.0761886Z
2019-10-03T21:31:38.0762691Z ASP.NET Core
2019-10-03T21:31:38.0762874Z ------------
2019-10-03T21:31:38.0763054Z Successfully installed the ASP.NET Core HTTPS Development Certificate.
2019-10-03T21:31:38.0763284Z To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only). For establishing trust on other platforms refer to the platform specific documentation.
2019-10-03T21:31:38.0763446Z For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054.
2019-10-03T21:31:38.4176357Z Build started 10/3/2019 9:31:38 PM.
2019-10-03T21:31:38.9605866Z 0>Resolving SDK 'Microsoft.NET.Sdk'...
2019-10-03T21:31:38.9816247Z Property reassignment: $(MSBuildProjectExtensionsPath)="d:\a\r1\a\MyTool\DataFactory\CustomActivities\MyTool\obj\" (previous value: "obj\") at C:\hostedtoolcache\windows\dotnet\sdk\2.2.402\Current\Microsoft.Common.props (56,5)
2019-10-03T21:31:38.9833374Z Property reassignment: $(MSBuildAllProjects)=";C:\hostedtoolcache\windows\dotnet\sdk\2.2.402\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.props;C:\hostedtoolcache\windows\dotnet\sdk\2.2.402\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.props" (previous value: ";C:\hostedtoolcache\windows\dotnet\sdk\2.2.402\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.props") at C:\hostedtoolcache\windows\dotnet\sdk\2.2.402\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.props (15,5)
2019-10-03T21:31:38.9949011Z Property reassignment: $(MSBuildAllProjects)=";C:\hostedtoolcache\windows\dotnet\sdk\2.2.402\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.props;C:\hostedtoolcache\windows\dotnet\sdk\2.2.402\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.props;C:\hostedtoolcache\windows\dotnet\sdk\2.2.402\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.DefaultItems.props" (previous value: ";C:\hostedtoolcache\windows\dotnet\sdk\2.2.402\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.props;C:\hostedtoolcache\windows\dotnet\sdk\2.2.402\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.props") at C:\hostedtoolcache\windows\dotnet\sdk\2.2.402\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.DefaultItems.props (21,5)
...
...
...
2019-10-03T21:31:47.9997847Z Generating MSBuild file d:\a\r1\a\MyTool\DataFactory\CustomActivities\MyTool\MyTool\GDPR.OutputProvider\obj\GDPR.OutputProvider.csproj.nuget.g.props.
2019-10-03T21:31:47.9998017Z Generating MSBuild file d:\a\r1\a\MyTool\DataFactory\CustomActivities\MyTool\MyTool\GDPR.OutputProvider\obj\GDPR.OutputProvider.csproj.nuget.g.targets.
2019-10-03T21:31:48.0229473Z Writing assets file to disk. Path: d:\a\r1\a\MyTool\DataFactory\CustomActivities\MyTool\MyTool\GDPR.OutputProvider\obj\project.assets.json
2019-10-03T21:31:48.0229714Z Checking compatibility of packages on .NETStandard,Version=v2.0.
2019-10-03T21:31:48.0229774Z Checking compatibility for GDPR.Output.IO 1.0.0 with .NETStandard,Version=v2.0.
2019-10-03T21:31:48.0229817Z Checking compatibility for NETStandard.Library 2.0.3 with .NETStandard,Version=v2.0.
2019-10-03T21:31:48.0229859Z Checking compatibility for GDPR.Common 1.0.0 with .NETStandard,Version=v2.0.
2019-10-03T21:31:48.0229916Z Checking compatibility for GDPR.Logger 1.0.0 with .NETStandard,Version=v2.0.
2019-10-03T21:31:48.0229955Z Checking compatibility for GDPR.ObjectModel 1.0.0 with .NETStandard,Version=v2.0.
2019-10-03T21:31:48.0229996Z Checking compatibility for WindowsAzure.Storage 9.3.3 with .NETStandard,Version=v2.0.
2019-10-03T21:31:48.0230054Z Checking compatibility for Microsoft.NETCore.Platforms 1.1.0 with .NETStandard,Version=v2.0.
2019-10-03T21:31:48.0230299Z Checking compatibility for Microsoft.Azure.KeyVault 3.0.3 with .NETStandard,Version=v2.0.
2019-10-03T21:31:48.0230341Z Checking compatibility for Microsoft.Azure.Management.KeyVault 2.4.3 with .NETStandard,Version=v2.0.
2019-10-03T21:31:48.0230394Z Checking compatibility for Microsoft.Azure.Services.AppAuthentication 1.0.3 with .NETStandard,Version=v2.0.
2019-10-03T21:31:48.0230457Z Checking compatibility for Microsoft.IdentityModel.Clients.ActiveDirectory 5.0.5 with .NETStandard,Version=v2.0.
2019-10-03T21:31:48.0230500Z Checking compatibility for Microsoft.Rest.ClientRuntime.Azure.Authentication 2.4.0 with .NETStandard,Version=v2.0.
2019-10-03T21:31:48.0230543Z Checking compatibility for System.Security.Cryptography.X509Certificates 4.3.2 with .NETStandard,Version=v2.0.
...
...
...
2019-10-03T21:31:54.4289388Z All packages and projects are compatible with .NETCoreApp,Version=v2.1.
2019-10-03T21:31:54.4454996Z Committing restore...
2019-10-03T21:31:54.4459080Z Generating MSBuild file d:\a\r1\a\MyTool\DataFactory\CustomActivities\MyTool\obj\MyTool.csproj.nuget.g.props.
2019-10-03T21:31:54.4460039Z Generating MSBuild file d:\a\r1\a\MyTool\DataFactory\CustomActivities\MyTool\obj\MyTool.csproj.nuget.g.targets.
2019-10-03T21:31:54.4461496Z Writing assets file to disk. Path: d:\a\r1\a\MyTool\DataFactory\CustomActivities\MyTool\obj\project.assets.json
2019-10-03T21:31:54.4567260Z Writing cache file to disk. Path: d:\a\r1\a\MyTool\DataFactory\CustomActivities\MyTool\obj\MyTool.csproj.nuget.cache
2019-10-03T21:31:54.4573630Z Restore completed in 4.12 sec for d:\a\r1\a\MyTool\DataFactory\CustomActivities\MyTool\MyTool.csproj.
2019-10-03T21:31:54.4661557Z
2019-10-03T21:31:54.4662703Z NuGet Config files used:
2019-10-03T21:31:54.4663349Z d:\a\_temp\Nuget\tempNuGet_05ce1f4cc83beb812b37be120d7010969ab1a363.config
2019-10-03T21:31:54.4664039Z
2019-10-03T21:31:54.4664744Z Feeds used:
2019-10-03T21:31:54.4665067Z https://api.nuget.org/v3/index.json
2019-10-03T21:31:54.4785886Z
2019-10-03T21:31:54.4786633Z Installed:
2019-10-03T21:31:54.4796944Z 7 package(s) to d:\a\r1\a\MyTool\DataFactory\CustomActivities\MyTool\MyTool\MyTool.Logger\MyTool.Logger.csproj
2019-10-03T21:31:54.4803020Z 32 package(s) to d:\a\r1\a\MyTool\DataFactory\CustomActivities\MyTool\MyTool\MyTool.Common\MyTool.Common.csproj
2019-10-03T21:31:54.4803472Z 33 package(s) to d:\a\r1\a\MyTool\DataFactory\CustomActivities\MyTool\MyTool\MyTool.OutputProvider\MyTool.OutputProvider.csproj
2019-10-03T21:31:54.4803792Z 34 package(s) to d:\a\r1\a\MyTool\DataFactory\CustomActivities\MyTool\MyTool\MyTool.Output.IO\MyTool.Output.IO.csproj
2019-10-03T21:31:54.4804056Z 33 package(s) to d:\a\r1\a\MyTool\DataFactory\CustomActivities\MyTool\MyTool\MyTool.SearchFilter\MyTool.SearchFilter.csproj
2019-10-03T21:31:54.4804362Z 32 package(s) to d:\a\r1\a\MyTool\DataFactory\CustomActivities\MyTool\MyTool\MyTool.PiiData\MyTool.PiiData.csproj
2019-10-03T21:31:54.4805159Z 42 package(s) to d:\a\r1\a\MyTool\DataFactory\CustomActivities\MyTool\MyTool\MyTool.SearchHandler\MyTool.SearchHandler.csproj
2019-10-03T21:31:54.4805573Z 42 package(s) to d:\a\r1\a\MyTool\DataFactory\CustomActivities\MyTool.App\MyTool.App.csproj
2019-10-03T21:31:54.4805849Z 46 package(s) to d:\a\r1\a\MyTool\DataFactory\CustomActivities\MyTool\MyTool.csproj
2019-10-03T21:31:54.4806121Z Done executing task "RestoreTask".
2019-10-03T21:31:54.4806389Z 1>Done building target "Restore" in project "MyTool.csproj".
2019-10-03T21:31:54.4806658Z 1>Done Building Project "d:\a\r1\a\MyTool\DataFactory\CustomActivities\MyTool\MyTool.csproj" (Restore target(s)).
2019-10-03T21:31:54.5031887Z
2019-10-03T21:31:54.5032209Z Build succeeded.
2019-10-03T21:31:54.5032251Z 0 Warning(s)
2019-10-03T21:31:54.5032319Z 0 Error(s)
2019-10-03T21:31:54.5032343Z
2019-10-03T21:31:54.5032377Z Time Elapsed 00:00:16.08
2019-10-03T21:31:54.5417968Z ##[section]Finishing: dotnet restore
Any clues what could be going wrong?
This was happening because I had something in the 'Working Directory'. I just cleared the "Working directory" field. Before I had set it to the subfolder containing the .csproj file which was incorrect. The working directory should be the root.

CAPSULE EXCEPTION while deployNodes task

I am trying to deploy IRS demo application on windows server, I have installed java already:
C:\Users\Administrator>java -version
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) Client VM (build 25.181-b13, mixed mode)
I am getting following exception for node:
CAPSULE EXCEPTION: Could not find Java installation for requested version [Min. Java version: 1.8.0 JavaVersion: null Min. update version: {1.8=171}] (JDK required: false). You can override the used Java version with the -Dcapsule.java.home flag. (for stack trace, run with -Dcapsule.log=verbose)
can you help with whats going wrong? In the same machine environment, I have previously developed and deployed many corDapps.
This was caused by forgetting to update the Windows environment variable after installing Java 1.8.181.
Forgetting to update the Windows environment variable has also been known to cause errors of the type:
CAPSULE EXCEPTION: Illegal char <"> at index 0: "C:\WINDOWS while
processing system property java.library.path: C:\Program
Files\Java\jdk1.8.0_191\bin;

ProGuard says Unsupported class version number [52.0] (maximum 51.0, Java 1.7) with sbt-proguard

I'm on Mac OS X 10.9.2 and sbt 0.13.3-SNAPSHOT (built from the sources), Java 8 and sbt-proguard 0.2.2 plugin.
sbt 0.13.3-SNAPSHOT
[jacek]> sbtVersion
[info] 0.13.3-SNAPSHOT
Java 8
$ /Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/bin/java -version
java version "1.8.0"
Java(TM) SE Runtime Environment (build 1.8.0-b132)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode)
project/plugins.sbt
addSbtPlugin("com.typesafe.sbt" % "sbt-proguard" % "0.2.2")
When I ran proguard:proguard in sbt shell it blew up with the following exception:
[sbt-updates]> show proguard:proguard
[info] ProGuard, version 4.9
[info] Reading program directory [/Users/jacek/oss/sbt-updates/target/scala-2.10/sbt-0.13/classes] (filtered)
[info] Reading program jar [/Users/jacek/.ivy2/cache/org.scalaz/scalaz-concurrent_2.10/bundles/scalaz-concurrent_2.10-7.1.0-M6.jar] (filtered)
[info] Reading program jar [/Users/jacek/.sbt/boot/scala-2.10.3/lib/scala-library.jar] (filtered)
[info] Reading program jar [/Users/jacek/.ivy2/cache/org.scalaz/scalaz-core_2.10/bundles/scalaz-core_2.10-7.1.0-M6.jar] (filtered)
[info] Reading program jar [/Users/jacek/.ivy2/cache/org.scalaz/scalaz-effect_2.10/bundles/scalaz-effect_2.10-7.1.0-M6.jar] (filtered)
[info] Reading library jar [/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/rt.jar]
[error] Error: Can't read [/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/rt.jar] (Can't process class [apple/applescript/AppleScriptEngine.class] (Unsupported class version number [52.0] (maximum 51.0, Java 1.7)))
[trace] Stack trace suppressed: run last proguard:proguard for the full output.
[error] (proguard:proguard) Proguard failed with exit code [1]
[error] Total time: 16 s, completed Apr 19, 2014 2:27:56 PM
Why could be the reason for the error?
It appears that ProGuard and hence sbt-proguard don't support Java 8 yet and changing the version of Java used in the script to launch sbt helped.
[sbt-updates]> show proguard:proguard
[info] Compiling 8 Scala sources to /Users/jacek/oss/sbt-updates/target/scala-2.10/sbt-0.13/classes...
[warn] there were 6 feature warning(s); re-run with -feature for details
[warn] one warning found
[info] ProGuard, version 4.9
[info] Reading program directory [/Users/jacek/oss/sbt-updates/target/scala-2.10/sbt-0.13/classes] (filtered)
[info] Reading program jar [/Users/jacek/.ivy2/cache/org.scalaz/scalaz-concurrent_2.10/bundles/scalaz-concurrent_2.10-7.1.0-M6.jar] (filtered)
...
This is with the following version of Java 7:
$ /Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home/bin/java -version
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
The question is really interesting and i was facing the same problem with the only difference that i added Proguard programmatically by using maven. Consequently, i considered that it will be helpful to post my solution although it is a bit different from the main question. For all those that using maven and faces the same problem, my workaround fix was to update the version of Proguard by using it as runtime inside the plugin, so the working pom.xml looks like this
<plugin>
<groupId>com.github.wvengen</groupId>
<artifactId>proguard-maven-plugin</artifactId>
<version>2.0.14</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>proguard</goal>
</goals>
</execution>
</executions>
<configuration>
<obfuscate>true</obfuscate>
<attach>true</attach>
<appendClassifier>false</appendClassifier>
<addMavenDescriptor>true</addMavenDescriptor>
<injar>${project.build.finalName}-jar-with-dependencies.jar</injar>
<injarNotExistsSkip>true</injarNotExistsSkip>
<libs>
<lib>${java.home}/lib/rt.jar</lib>
<lib>${java.home}/lib/jce.jar</lib>
<lib>${java.home}/lib/ext/sunjce_provider.jar</lib>
</libs>
<options>
<option>-allowaccessmodification</option>
<option>-optimizationpasses 3</option>
<option>-overloadaggressively</option>
<option>-repackageclasses ''</option>
<option>-dontusemixedcaseclassnames</option>
<option>-dontskipnonpubliclibraryclasses</option>
<option>-flattenpackagehierarch</option>
<option>-dontwarn</option> <!-- added option to ignore com.sun missing classes -->
<option>-keep public class com.StocksNews.App {
public static void main(java.lang.String[]);
}
</option>
</options>
</configuration>
<dependencies>
<dependency>
<groupId>net.sf.proguard</groupId>
<artifactId>proguard-base</artifactId>
<version>6.1.1</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</plugin>
It's possible to update the version of Proguard that sbt-proguard uses by changing the key proguardVersion in build.sbt to a setting newer than 5.0, e.g.
ProguardKeys.proguardVersion in Proguard := "5.2.1"
See: https://github.com/sbt/sbt-proguard/issues/5
I fixed that by update to latest version of ProGuad from link below
Sourceforge ProGuard page
Add classpath "com.guardsquare:proguard-gradle:7.0.1" in the project level build.gradle to resolve the error. I have solved this issue by adding the same.
I will recommend you to upgrade the Gradle Version to 7.x.x, which will remove ProGuard and you have to migrate to R8, as R8 is backward compatible with your exisiting code ProGuard rules. For Migration please read docs other you will waste alot time in figuring out some feature is not working after migration same happened to me.

Error using flashplayer in jenkins when running maven-release-plugin. Works when using mvn test

I have a maven 2 job configured in Jenkins, and under the Build I use
clean test release:prepare ...
in the goals options. Jenkins runs these goals sequenctiallay, and when test runs, it prints (and works nice):
[WARNING] [LAUNCHER] Using regular flashplayer tests
But when it tries to run prepare I get,
[INFO] [WARNING] [LAUNCHER] Using xvfb-run to launch headless tests
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [ERROR] BUILD ERROR
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Failed to launch Flash Player. Probably java was not able to find flashplayer.
[INFO] Make sure flashplayer is available on PATH
[INFO] or use -DflashPlayer.command=${flashplayer executable}
[INFO] Read more at: https://docs.sonatype.org/display/FLEXMOJOS/Running+unit+tests
So the same jobs, same jenkins, same job configuration, how can I make it work so that prepare also works like the clean goal?
I have also tried what the error suggest, that is, putting:
-Dflex.flashPlayer.command=/opt/player_10/flashplayer", "-DflashPlayer.command=/opt/player_10/flashplayer

Resources