IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

Null pointer exception in edifact mapping (java code) Options · View
ultrabeet
Posted: Friday, April 18, 2014 7:39:49 AM
Rank: Advanced Member

Joined: 8/19/2012
Posts: 149
Location: Ireland
I thought this might be useful to someone working with edifact mappings...

I haven't checked if other versions are affected, but on the one I have, when the JAVA code is generated, the mapping no longer runs, even though it is perfectly fine in Mapforce itself.

The problem is in
com/altova/text/edi/EDIfactDataCompletion.java line 75
ITextNode f0020 = makeSureExists(unb, "F0020") is commented out. If you uncomment this line, your mapping will work.
pfisher44
Posted: Monday, April 21, 2014 1:54:13 PM
Rank: Advanced Member

Joined: 8/29/2012
Posts: 146
Location: atlanta
What version of the product is this in ? was it working before an update ?
ultrabeet wrote:
I thought this might be useful to someone working with edifact mappings...

I haven't checked if other versions are affected, but on the one I have, when the JAVA code is generated, the mapping no longer runs, even though it is perfectly fine in Mapforce itself.

The problem is in
com/altova/text/edi/EDIfactDataCompletion.java line 75
ITextNode f0020 = makeSureExists(unb, "F0020") is commented out. If you uncomment this line, your mapping will work.
ultrabeet
Posted: Tuesday, April 22, 2014 8:36:23 AM
Rank: Advanced Member

Joined: 8/19/2012
Posts: 149
Location: Ireland
pfisher44,

It is happening for me on 32 bit Enterprise 2012 rel 2 sp1.

Unfortunately the mapping was done from beginning to the end on the same version of Mapforce, so I cannot compare.
vlad
Posted: Tuesday, April 22, 2014 8:47:46 AM
Rank: Advanced Member

Joined: 12/13/2005
Posts: 2,856
Location: Mauritius
Hi ultrabeet,

before posting such "Eureka" messages, I hope you do realize that there are two years of further development between your version and the current release. Don't you think that such postings will confuse more people than help? Most probably this one is already fixed.

Just a thought...
ultrabeet
Posted: Tuesday, April 22, 2014 9:10:41 AM
Rank: Advanced Member

Joined: 8/19/2012
Posts: 149
Location: Ireland
vlad,

I appreciate what you are saying, but ie. I am working mostly with JDBC and MySQL structures and I find the older version more stable.

Most of the stuff does not work on the new version anyway, so there is no need to upgrade...

When it comes to file to file operations, I agree with you - go for the later releases.
vlad
Posted: Tuesday, April 22, 2014 9:42:25 AM
Rank: Advanced Member

Joined: 12/13/2005
Posts: 2,856
Location: Mauritius
Hi ultrabeet,

I actually didn't suggest to update - but to think of usability (or danger of confusion) of unintended postings to specific editions.

>Most of the stuff does not work on the new version anyway, so there is no need to upgrade...

That is a very bold message. I hope you have at least made Altova aware of "most of the stuff" which does not work for you.
ultrabeet
Posted: Tuesday, April 22, 2014 10:04:53 AM
Rank: Advanced Member

Joined: 8/19/2012
Posts: 149
Location: Ireland
vlad,

Sorry if I hurt your feelings with my "bold message"... :)

I did in deed report them. Every time there is a new release I run to check my issue references, unfortunately they haven't come up in the list yet.

Anyway, by no means you should accept that as an anti-advertising campaign ;)
underpar
Posted: Wednesday, April 23, 2014 8:13:30 AM
Rank: Member

Joined: 12/11/2013
Posts: 18
Location: everywhere
Hi ultrabeet,

according to our support records two bug reports were logged as a result of support cases that you submitted.

TTP# 40192 - Customer SELECT statement works as virtual table via ODBC, but is rejected via JDBC for duplicate column names despite the use of AS suffixes

> This bug was fixed in v2013sp1

TTP# 43126 - Java Exception generated creating a parameterized SELECT statement on a MySQL table

> Upon further investigation it was determined that this was not our bug, but rather a MySQL JDBC driver bug. The parameter support is quite new in MySQL - Perhaps newer versions don't have this problem anymore. The driver doesn't deliver information about the detected parameters, instead it throws an exception that is handled correctly (shown to the user).

Workaround:

set the parameter type for product_sku manually to string or int (the field product_sku in the table is varchar so string is probably better)
setting all parameters to non-auto-detected skips the error produced from the parameter type analysis and the where clause is accepted by MF.
ultrabeet
Posted: Wednesday, April 23, 2014 10:08:38 AM
Rank: Advanced Member

Joined: 8/19/2012
Posts: 149
Location: Ireland
Hi underpar,

Thanks for confirming this!

I could not find those references in release notes though... https://www.altova.com/releasenotes/Default.aspx or am I just blind (can't rule out anything at this stage)?

I will review your workaround and hopefully we will be able to migrate to the latest version. Yay!
underpar
Posted: Thursday, April 24, 2014 8:12:06 AM
Rank: Member

Joined: 12/11/2013
Posts: 18
Location: everywhere
Hi ultrabeet,

#40192 is on the list for version 2013sp1 on the release notes page.

#43126 is not on the list because the list only includes Altova product bug fixes. Since the problem is with the MySQL driver we are unable to fix it.
Users browsing this topic
guest

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.