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. 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, 06/09/2026 - 11:16
    gurux.dlms.java 4.0.95
  • Tue, 06/09/2026 - 10:03
    Gurux.DLMS.Python 1.0.199
  • Mon, 06/08/2026 - 13:39
    gurux.dlms.cpp 9.0.2606.0801
  • Mon, 06/01/2026 - 10:15
    gurux.dlms.cpp 9.0.2606.0101
  • Thu, 05/28/2026 - 16:06
    gurux.dlms.java 4.0.94

New forum topics

  • Error reading L&G Meter
  • Pass a TCP Client to GXNet
  • Australian EDMI Mk10D (Essential Energy area)
  • Strange mix of data notificiation vs get response
  • DLMS Connection
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin