Skip to main content
Home
for DLMS smart meters
Open source solutions for DLMS smart metering

Main navigation

  • Home
  • Products
  • About us
  • Open Source
  • Community
  • Forum
  • Downloads
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Node
  3. Date Parsing Error

Date parsing error

Profile picture for user tbvk
By tbvk , 27 March, 2023
Forums
Gurux DLMS for Java

So I have been writing code that both will dump all the objects to an XML dump and then later read them back in. So far, it seems like the dumping code runs just fine. In fact, here is the code used for dumping: https://paste.debian.net/1275379/

---

Now, I will provide a link to the generated XML file: (It is too big for pastebin, may I email it to you?)

---

Problem 1:

There are two problems that I have encountered, the first one is when parsing dates. It seems that some of the objects generate `<Value>` tag that has `dd-mm-yy 00:00:00` - which parses fine, but some times other objects don't have the ` 00:00:00` part and that causes parsing issues.

I have attached a stack trace of where this occurs here: https://paste.debian.net/1275380/

Now this is one problem that needs to be fixed, but if I try to remove some objects which I THINK (I am not sure) cause this, then the next error I get is mentioned below in "Problem 2".

---

Problem 2:

The problem I am having now is that a null pointer exception seems to be occurring in the code which parses the XML (your code) - seemingly when it comes across some sort of node type that is invalid or so, it then hits a branch where `obj` is null and then crashes when attempting to cast a null-reference.

Until I can get problem 1 fixed, I won't be able to move onto problem 2.

---

Please let me know.

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Tue, 10/13/2026 - 12:00
    gurux.dlms.java 4.0.97
  • Tue, 09/22/2026 - 14:02
    Gurux.DLMS.Net 9.0.2609.2201
  • Mon, 09/21/2026 - 10:18
    Gurux.DLMS.Net 9.0.2609.2101
  • Wed, 08/26/2026 - 09:04
    Gurux.DLMS.Python 1.0.203
  • Mon, 08/17/2026 - 11:28
    Gurux.DLMS.Python 1.0.202

New forum topics

  • Need RJ45 pin configuration for Saral 300 and Saral 305 Secure meters
  • Query Regarding Class 63 Status Mapping Support in Gurux DLMS Python
  • Inhemeter
  • DLMS Server - Profile Generic - can't add too many items to profile generic capture object - how to set maximum profile entries
  • HDLC Frames sequencing
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin