Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 116667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T03:12:51+00:00 2026-05-11T03:12:51+00:00

If I reference the SnakeYAML jar directly from a test program (see bottom), everything

  • 0

If I reference the SnakeYAML jar directly from a test program (see bottom), everything works. If I’m inside my Maven-created project, I get the following output from my unit tests:

java.lang.NoSuchMethodError: java.util.LinkedList.push(Ljava/lang/Object;)V     at org.yaml.snakeyaml.scanner.ScannerImpl.addIndent(ScannerImpl.java:482)     at org.yaml.snakeyaml.scanner.ScannerImpl.fetchBlockEntry(ScannerImpl.java:653)     at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.java:268)     at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:178)     at org.yaml.snakeyaml.parser.ParserImpl$ParseImplicitDocumentStart.produce(ParserImpl.java:213)     at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:172)     at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:143)     at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:163)     at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:66)     at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:60)     at org.yaml.snakeyaml.Loader.load(Loader.java:35)     at org.yaml.snakeyaml.Yaml.load(Yaml.java:134) 

Since Maven couldn’t find SnakeYAML in the central repos, I manually installed it into my local repo. In case it matters, I’m on a Mac using SnakeYAML 0.9, and Maven 2.0.9.

Sample YAML File

-      accountCode: foo     accountId: 1     email: foo@bar.com     userId: 1 

Working Test Program

import java.io.*; import java.util.*;  import org.yaml.snakeyaml.Yaml;  /**  * Testing SnakeYAML.  *  * @author Hank Gay  */ public final class Foo {     public static void main(final String[] args) throws Exception {         final Yaml yaml = new Yaml();         Reader reader = null;         try {             reader = new FileReader('/tmp/foo.yaml');             System.out.println(yaml.load(reader));         } catch (final FileNotFoundException fnfe) {             System.err.println('We had a problem reading the YAML from the file because we couldn't find the file.' + fnfe);         } finally {             if (null != reader) {                 try {                     reader.close();                 } catch (final IOException ioe) {                     System.err.println('We got the following exception trying to clean up the reader: ' + ioe);                 }             }         }     } } 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T03:12:52+00:00Added an answer on May 11, 2026 at 3:12 am

    Seems like a JDK version issue: LinkedList#push was introduced in Java 6.

    Try setting JAVA_HOME to the correct version before running Maven.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 200k
  • Answers 200k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Step 1: Establish a list of pages on your site… May 12, 2026 at 7:57 pm
  • Editorial Team
    Editorial Team added an answer Yes. http://code.msdn.microsoft.com/WindowsAPICodePack This has a lot of Windows Vista/7 features… May 12, 2026 at 7:57 pm
  • Editorial Team
    Editorial Team added an answer You're missing a closing brace at the end of the… May 12, 2026 at 7:57 pm

Related Questions

Unsure if I've phrased this correctly, but in the callback how do I reference
If I have the following: {hdrs: [Make,Model,Year], data : [ {Make:Honda,Model:Accord,Year:2008} {Make:Toyota,Model:Corolla,Year:2008} {Make:Honda,Model:Pilot,Year:2008}] }
I am wondering what are the heuristics when creating releases of libraries to be
I need to install a file into the Environment.SpecialFolder.ApplicationData folder, which differs between XP

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.