java.lang.ClassCastException: org.sonatype.nexus.proxy.item.DefaultStorageLinkItem cannot be cast to org.sonatype.nexus.proxy.item.StorageFileItem

Sonatype JIRA | Rich Seddon | 2 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Load the attached sonatype-work directory into nexus, then run the snapshot removal task. This will fail with a class cast exception. The snapshot remover should skip virtual repositories. {quote} 2015-01-15 16:06:44,420-0600 WARN [pxpool-1-thread-1] admin org.sonatype.nexus.maven.tasks.DefaultSnapshotRemover - SnapshotRemover is failed to process path: '/com/foo/project/1.0.3-SNAPSHOT'. java.lang.ClassCastException: org.sonatype.nexus.proxy.item.DefaultStorageLinkItem cannot be cast to org.sonatype.nexus.proxy.item.StorageFileItem at org.sonatype.nexus.maven.tasks.DefaultSnapshotRemover$SnapshotRemoverWalkerProcessor.doOnCollectionExit(DefaultSnapshotRemover.java:459) ~[nexus-core-2.11.2-SNAPSHOT.jar:2.11.2-SNAPSHOT] at org.sonatype.nexus.maven.tasks.DefaultSnapshotRemover$SnapshotRemoverWalkerProcessor.onCollectionExit(DefaultSnapshotRemover.java:387) ~[nexus-core-2.11.2-SNAPSHOT.jar:2.11.2-SNAPSHOT] at org.sonatype.nexus.proxy.walker.DefaultWalker.onCollectionExit(DefaultWalker.java:325) [nexus-core-2.11.2-SNAPSHOT.jar:2.11.2-SNAPSHOT] at org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:226) [nexus-core-2.11.2-SNAPSHOT.jar:2.11.2-SNAPSHOT] at org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:231) [nexus-core-2.11.2-SNAPSHOT.jar:2.11.2-SNAPSHOT] at org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:231) [nexus-core-2.11.2-SNAPSHOT.jar:2.11.2-SNAPSHOT] at org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:231) [nexus-core-2.11.2-SNAPSHOT.jar:2.11.2-SNAPSHOT] at org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:231) [nexus-core-2.11.2-SNAPSHOT.jar:2.11.2-SNAPSHOT] at org.sonatype.nexus.proxy.walker.DefaultWalker.walk(DefaultWalker.java:89) [nexus-core-2.11.2-SNAPSHOT.jar:2.11.2-SNAPSHOT] at org.sonatype.nexus.maven.tasks.DefaultSnapshotRemover.removeSnapshotsFromMavenRepository(DefaultSnapshotRemover.java:214) [nexus-core-2.11.2-SNAPSHOT.jar:2.11.2-SNAPSHOT] at org.sonatype.nexus.maven.tasks.DefaultSnapshotRemover.process(DefaultSnapshotRemover.java:157) [nexus-core-2.11.2-SNAPSHOT.jar:2.11.2-SNAPSHOT] at org.sonatype.nexus.maven.tasks.DefaultSnapshotRemover.removeSnapshots(DefaultSnapshotRemover.java:116) [nexus-core-2.11.2-SNAPSHOT.jar:2.11.2-SNAPSHOT] at org.sonatype.nexus.maven.tasks.SnapshotRemoverTask.doRun(SnapshotRemoverTask.java:98) [nexus-core-2.11.2-SNAPSHOT.jar:2.11.2-SNAPSHOT] at org.sonatype.nexus.maven.tasks.SnapshotRemoverTask.doRun(SnapshotRemoverTask.java:28) [nexus-core-2.11.2-SNAPSHOT.jar:2.11.2-SNAPSHOT] at org.sonatype.nexus.scheduling.AbstractNexusTask.call(AbstractNexusTask.java:151) [nexus-core-2.11.2-SNAPSHOT.jar:2.11.2-SNAPSHOT] at org.sonatype.scheduling.DefaultScheduledTask.call(DefaultScheduledTask.java:418) [nexus-scheduler-2.11.2-SNAPSHOT.jar:2.11.2-SNAPSHOT] at org.sonatype.nexus.threads.MDCAwareCallable.call(MDCAwareCallable.java:44) [nexus-core-2.11.2-SNAPSHOT.jar:2.11.2-SNAPSHOT] at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) [shiro-core-1.2.3.jar:1.2.3] at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) [shiro-core-1.2.3.jar:1.2.3] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_25] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_25] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [na:1.8.0_25] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_25] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_25] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_25] {quote}

    Sonatype JIRA | 2 years ago | Rich Seddon
    java.lang.ClassCastException: org.sonatype.nexus.proxy.item.DefaultStorageLinkItem cannot be cast to org.sonatype.nexus.proxy.item.StorageFileItem
  2. 0

    Help:basic RMI question

    Google Groups | 2 decades ago | Paolo De Lutiis
    java.lang.ClassCastException: serverPackage.ServerClass_Stub at clientPackage.myApplet.init(myApplet.java:line#) at sun.applet.AppletPanel.run(AppletPanel.java:273) at java.lang.Thread.
  3. 0

    Shared hosting Bungeecord problems.

    GitHub | 3 years ago | Arksenu
    java.lang.ClassCastException: bka cannot be cast to fs All my servers are set to onlinemode: false Here is my config.yml groups: arksenu: - admin disabled_commands: - find player_limit: -1 stats: 347d1d62-6fb6-4869-bd43-7d0745de8e3c permissions: default: - bungeecord.command.server - bungeecord.command.list admin: - bungeecord.command.ip - bungeecord.command.alert - bungeecord.command.end - bungeecord.command.reload listeners: - max_players: 18 fallback_server: hub host: 0.0.0.0:35289 bind_local_address: true ping_passthrough: false tab_list: GLOBAL_PING default_server: hub forced_hosts: pvp.md-5.net: hub tab_size: 60 force_default_server: true motd: ’Network’ query_enabled: false query_port: 25565 timeout: 30000 connection_throttle: 4000 servers: hub: address: 108.170.8.146:35289 restricted: false motd: test UvGames: address: 66.85.165.170:26200 restricted: false motd: test UvPrison: address: 66.85.128.90:25928 restricted: false motd: test ip_forward: false online_mode: true And here is my console message -> UpstreamBridge has disconnected disconnected with: Exception Connecting:RuntimeException : Server is online mode! @ net.md_5.bungee.ServerConnector:188
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Shared hosting Bungeecord problems.

    GitHub | 3 years ago | Arksenu
    java.lang.ClassCastException: bka cannot be cast to fs All my servers are set to onlinemode: false Here is my config.yml groups: arksenu: - admin disabled_commands: - find player_limit: -1 stats: 347d1d62-6fb6-4869-bd43-7d0745de8e3c permissions: default: - bungeecord.command.server - bungeecord.command.list admin: - bungeecord.command.ip - bungeecord.command.alert - bungeecord.command.end - bungeecord.command.reload listeners: - max_players: 18 fallback_server: hub host: 0.0.0.0:35289 bind_local_address: true ping_passthrough: false tab_list: GLOBAL_PING default_server: hub forced_hosts: pvp.md-5.net: hub tab_size: 60 force_default_server: true motd: ’Network’ query_enabled: false query_port: 25565 timeout: 30000 connection_throttle: 4000 servers: hub: address: 108.170.8.146:35289 restricted: false motd: test UvGames: address: 66.85.165.170:26200 restricted: false motd: test UvPrison: address: 66.85.128.90:25928 restricted: false motd: test ip_forward: false online_mode: true And here is my console message -> UpstreamBridge has disconnected disconnected with: Exception Connecting:RuntimeException : Server is online mode! @ net.md_5.bungee.ServerConnector:188
  6. 0

    SWTBot/Troubleshooting - Eclipsepedia

    eclipse.org | 1 year ago
    java.lang.ClassCastException: org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter at org.eclipse.swtbot.eclipse.junit4.headless.EclipseTestRunner .run(EclipseTestRunner.java:331) at org.eclipse.swtbot.eclipse.junit4.headless.EclipseTestRunner .run(EclipseTestRunner.java:208) at org.eclipse.swtbot.eclipse.junit4.headless.UITestApplication .runTests(UITestApplication.java:115) at org.eclipse.ui.internal.testing.WorkbenchTestable$1.run(Work benchTestable.java:68)

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.ClassCastException

      org.sonatype.nexus.proxy.item.DefaultStorageLinkItem cannot be cast to org.sonatype.nexus.proxy.item.StorageFileItem

      at org.sonatype.nexus.maven.tasks.DefaultSnapshotRemover$SnapshotRemoverWalkerProcessor.doOnCollectionExit()
    2. ${project.groupId}:${project.artifactId}
      AbstractNexusTask.call
      1. org.sonatype.nexus.maven.tasks.DefaultSnapshotRemover$SnapshotRemoverWalkerProcessor.doOnCollectionExit(DefaultSnapshotRemover.java:459)[nexus-core-2.11.2-SNAPSHOT.jar:2.11.2-SNAPSHOT]
      2. org.sonatype.nexus.maven.tasks.DefaultSnapshotRemover$SnapshotRemoverWalkerProcessor.onCollectionExit(DefaultSnapshotRemover.java:387)[nexus-core-2.11.2-SNAPSHOT.jar:2.11.2-SNAPSHOT]
      3. org.sonatype.nexus.proxy.walker.DefaultWalker.onCollectionExit(DefaultWalker.java:325)[nexus-core-2.11.2-SNAPSHOT.jar:2.11.2-SNAPSHOT]
      4. org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:226)[nexus-core-2.11.2-SNAPSHOT.jar:2.11.2-SNAPSHOT]
      5. org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:231)[nexus-core-2.11.2-SNAPSHOT.jar:2.11.2-SNAPSHOT]
      6. org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:231)[nexus-core-2.11.2-SNAPSHOT.jar:2.11.2-SNAPSHOT]
      7. org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:231)[nexus-core-2.11.2-SNAPSHOT.jar:2.11.2-SNAPSHOT]
      8. org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:231)[nexus-core-2.11.2-SNAPSHOT.jar:2.11.2-SNAPSHOT]
      9. org.sonatype.nexus.proxy.walker.DefaultWalker.walk(DefaultWalker.java:89)[nexus-core-2.11.2-SNAPSHOT.jar:2.11.2-SNAPSHOT]
      10. org.sonatype.nexus.maven.tasks.DefaultSnapshotRemover.removeSnapshotsFromMavenRepository(DefaultSnapshotRemover.java:214)[nexus-core-2.11.2-SNAPSHOT.jar:2.11.2-SNAPSHOT]
      11. org.sonatype.nexus.maven.tasks.DefaultSnapshotRemover.process(DefaultSnapshotRemover.java:157)[nexus-core-2.11.2-SNAPSHOT.jar:2.11.2-SNAPSHOT]
      12. org.sonatype.nexus.maven.tasks.DefaultSnapshotRemover.removeSnapshots(DefaultSnapshotRemover.java:116)[nexus-core-2.11.2-SNAPSHOT.jar:2.11.2-SNAPSHOT]
      13. org.sonatype.nexus.maven.tasks.SnapshotRemoverTask.doRun(SnapshotRemoverTask.java:98)[nexus-core-2.11.2-SNAPSHOT.jar:2.11.2-SNAPSHOT]
      14. org.sonatype.nexus.maven.tasks.SnapshotRemoverTask.doRun(SnapshotRemoverTask.java:28)[nexus-core-2.11.2-SNAPSHOT.jar:2.11.2-SNAPSHOT]
      15. org.sonatype.nexus.scheduling.AbstractNexusTask.call(AbstractNexusTask.java:151)[nexus-core-2.11.2-SNAPSHOT.jar:2.11.2-SNAPSHOT]
      15 frames
    3. ${project.groupId}:${project.artifactId}
      DefaultScheduledTask.call
      1. org.sonatype.scheduling.DefaultScheduledTask.call(DefaultScheduledTask.java:418)[nexus-scheduler-2.11.2-SNAPSHOT.jar:2.11.2-SNAPSHOT]
      1 frame
    4. ${project.groupId}:${project.artifactId}
      MDCAwareCallable.call
      1. org.sonatype.nexus.threads.MDCAwareCallable.call(MDCAwareCallable.java:44)[nexus-core-2.11.2-SNAPSHOT.jar:2.11.2-SNAPSHOT]
      1 frame
    5. Shiro
      SubjectCallable.call
      1. org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)[shiro-core-1.2.3.jar:1.2.3]
      2. org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)[shiro-core-1.2.3.jar:1.2.3]
      2 frames
    6. Java RT
      Thread.run
      1. java.util.concurrent.FutureTask.run(FutureTask.java:266)[na:1.8.0_25]
      2. java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)[na:1.8.0_25]
      3. java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)[na:1.8.0_25]
      4. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[na:1.8.0_25]
      5. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[na:1.8.0_25]
      6. java.lang.Thread.run(Thread.java:745)[na:1.8.0_25]
      6 frames