Open cmaoling opened 1 year ago
I do not have an immediate idea... do you have your version published on github (the master branch in your github repo seems quite some time behind).
I would start looking at the target platform, then the ClientFactory#xstream() method
Thanks, I did some more debugging, it looks like this line:
https://github.com/buchen/portfolio/blob/eca29b42a6c642314ad852cb9d1c485faca96407/name.abuchen.portfolio/src/name/abuchen/portfolio/model/ClientFactory.java#L67
is not working for me:
[ERROR] Access restriction: The type 'MapConverter' is not API (restriction on classpath entry '/home/user/.m2/repository/p2/osgi/bundle/org.apache.servicemix.bundles.xstream/1.4.8.1/org.apache.servicemix.bundles.xstream-1.4.8.1.jar') [ERROR] 1 problem (1 error) [ERROR] -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:3.0.5:compile (default-compile) on project name.abuchen.portfolio: Compilation failure at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:375) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:298) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293) at org.apache.maven.cli.MavenCli.main (MavenCli.java:196) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:568) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225) at org.c
[ERROR] Access restriction: The type '...' is not API (restriction on classpath entry
I saw such lately with my fork (for various class names). Aggressively cleaning portfolio-product/ (plus reverting some local patches to name.abuchen.portfolio/META-INF/MANIFEST.MF helped in my case.
@pfalcon , @buchen bummer, seems like I digging a deeper hole every time I look into this... Now I seem to no longer get the bundled-jre 17.0.5 on portfolio-performance.info anymore. :/
[ERROR] Internal error: java.lang.RuntimeException: Failed to load p2 repository with ID 'portfolio-jre' from location https://www.portf olio-performance.info/bundled-jre/17.0.5: No repository found at https://www.portfolio-performance.info/bundled-jre/17.0.5. -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: Failed to load p2 repository with ID 'portfolio-jre ' from location https://www.portfolio-performance.info/bundled-jre/17.0.5
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:120)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:568)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: java.lang.RuntimeException: Failed to load p2 repository with ID 'portfolio-jre' from location https://www.portfolio-performa nce.info/bundled-jre/17.0.5
at org.eclipse.tycho.p2.target.TargetPlatformFactoryImpl.loadMetadataRepository (TargetPlatformFactoryImpl.java:300)
at org.eclipse.tycho.p2.target.TargetPlatformFactoryImpl.gatherExternalInstallableUnits (TargetPlatformFactoryImpl.java:270)
at org.eclipse.tycho.p2.target.TargetPlatformFactoryImpl.createTargetPlatform (TargetPlatformFactoryImpl.java:172)
at org.eclipse.tycho.p2.target.TargetPlatformFactoryImpl.createTargetPlatform (TargetPlatformFactoryImpl.java:137)
at org.eclipse.tycho.p2.target.TargetPlatformFactoryImpl.createTargetPlatform (TargetPlatformFactoryImpl.java:1)
at org.eclipse.tycho.p2.manager.ReactorRepositoryManagerImpl.computePreliminaryTargetPlatform (ReactorRepositoryManagerImpl.java:99)
at org.eclipse.tycho.p2.resolver.P2DependencyResolver.computePreliminaryTargetPlatform (P2DependencyResolver.java:229)
at org.eclipse.tycho.core.resolver.DefaultTychoResolver.resolveProject (DefaultTychoResolver.java:135)
at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.lambda$resolveProjects$3 (TychoMavenLifecycleParticipant.java:254)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept (ForEachOps.java:183)
at java.util.stream.WhileOps$1$1.accept (WhileOps.java:99)
at java.util.ArrayList$ArrayListSpliterator.tryAdvance (ArrayList.java:1602)
at java.util.stream.ReferencePipeline.forEachWithCancel (ReferencePipeline.java:129)
at java.util.stream.AbstractPipeline.copyIntoWithCancel (AbstractPipeline.java:527)
at java.util.stream.AbstractPipeline.copyInto (AbstractPipeline.java:513)
I struggle to understand, why it is mandatory to change JAVA and the above structure due to that all the time and the concept to have code which ran in the past can just be executed today gut lost and leads to such a mess.
Check this commit for the last problem: https://github.com/portfolio-performance/portfolio/commit/ad6450a36ebd833c2ee6bb69fa37f343bcc05a46
Due to the transfer of the repository, the endpoints of gh pages cannot be published in the same way
Drop me an email if you want us to look into together
@buchen , after some time I had to rebuild my fork. Seems like a lot changed and I got hit by https://forum.portfolio-performance.info/t/could-not-initialize-class-com-thoughtworks-xstream-converters-collections-treemapconverter-beim-offnen/18067 name.abuchen.portfolio.snapshot.trades.TradeCollectorTest Time elapsed: 0.002 s <<< ERROR! java.lang.NoClassDefFoundError: Could not initialize class com.thoughtworks.xstream.converters.collections.TreeMapConverter ... Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.reflect.InaccessibleObjectException: Unable to make field private final java.util.Comparator java.util.TreeMap.comparator accessible: module java.base does not "opens java.util" to unnamed module @347b370c [in thread "main"]
I updated to the Azul based java you referenced, but without luck: openjdk version "17.0.7" 2023-04-18 LTS OpenJDK Runtime Environment Zulu17.42+19-CA (build 17.0.7+7-LTS) OpenJDK 64-Bit Server VM Zulu17.42+19-CA (build 17.0.7+7-LTS, mixed mode, sharing)
Any advise would be appreciated , as I am able to reproduce the plain-vanilla upstream version, there seem to be something broken on my setup, but I can not figure out what's wrong... Appreciate your insight and what this could be caused by...