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 9126099
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T06:57:34+00:00 2026-06-17T06:57:34+00:00

I hope I can explain this correctly. I am using the Javolution library to

  • 0

I hope I can explain this correctly. I am using the Javolution library to do reading and writing of an XML config file. I’m using XMLStreamReader/Writer. During reading, I’m looking to read a tag and store its attributes in a LinkedHashMap. However, I’m having an exception being thrown, that to me looks to make no sense due to when it’s thrown and what’s currently going on in the code.

Using the Eclipse debugger, the exception is being thrown when an attribute’s key and value is being added to my map.

public class Element {
   private HashMap<String, String> attributes = new LinkedHashMap<String, String>();
   ...

   public void setAttribute(String key, String value) {
      ...
      attributes.put(key, value);
   }
}

Straight after the key and value are added, this catches an exception from Javolution:

javolution.xml.stream.XMLStreamException: Local name cannot be null

Neither key or value are null. When they are being added to the map, I cannot step into the code further to see where the exception is being thrown, there is no stack trace, no file/line number shown anywhere to explain where or even how the exception is thrown.

From a quick google search of older implementation of Javolution, I can see that this particular exception is only thrown using a few methods of the XMLStreamWriterImpl type. I’ve set breakpoints at each use I have of these methods, but the debugger doesn’t catch them being used until much later in the code (and my localName variable is initialised at declaration).

Would anyone have any advice for how I could determine why this exception is being thrown?

Stack Trace:

Java HotSpot(TM) 64-Bit Server VM[localhost:3999]   
    Thread [main] (Suspended)   
        XMLImplMain$Element.setAttribute(String, String) line: 827  
        XMLImplMain.translate(Element) line: 133    
        XMLImplMain.translate(Element) line: 140    
        XMLImplMain.translate(Element) line: 140    
        XMLImplMain.loadXML(String) line: 118   
        Bootstrap.main(String[]) line: 32   
    Thread [EventWriter] (Running)  
  • 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. Editorial Team
    Editorial Team
    2026-06-17T06:57:35+00:00Added an answer on June 17, 2026 at 6:57 am

    It’s possible that this Javolution library is not correctly compiled, without the argument -g when compiling via javac perhaps and this will make the output jar lack of debug information. You can find the corresponding source code of the jar you currently working on, and recompile it with sufficient arguments to make it debugable by yourself.

    Or, there is a workaround which is way more complicated but no customizing compilation is needed, writing a BTrace script and catch the initialization of all the XMLStreamException and then print out the stacktrace, like this:

    package com.sun.btrace.samples;
    import com.sun.btrace.annotations.*;
    import static com.sun.btrace.BTraceUtils.*;
    
    @BTrace 
    public class OnThrow {  
        @OnMethod(clazz = "javolution.xml.stream.XMLStreamException", method = "<init>", location = @Location(Kind.RETURN))
        public static void endMethod(@Self Exception self) {
            jstack();
        }
    }
    

    and there is similar example here. You can dig a little deeper here.

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

Sidebar

Related Questions

I hope I can explain this properly. I'm using flashDevelop for an avatar creation
Hope I can explain this correctly.. Silverlight Application Telerik Reports (in a separate Class)
I hope I can explain this problem right, it's a bit confusing for me.
I hope I can explain this well enough so that you can understand the
I hope I can explain this right I have two input fields that require
I hope this I can explain what I am trying to achieve: I want
Hello I hope I explain this correctly. I am trying to populated the current
OK, I hope I explain this one correctly. I have a struct: typedef struct
I hope I can explain this properly. I'm making an android app that, when
Hope I am able to explain this correctly... I am able to connect to

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.