Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Eclipselink 2.1.2 - Weaving disabled

 
Fabian Angy
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

To avoid a bug with Eclipselink 2.1.2, I desactivated the weaving by adding the property "<property name="eclipselink.weaving.internal" value="false" />" in my persistence.xml. If I don't desactivate it, it tries to cast "null" values in Integer.

I would like to know if when I desactivate that, can I have any bugs/changes somewhere else?

Thanks in advance!
 
James Sutherland
Ranch Hand
Posts: 553
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What was the error (stack trace) you were getting with weaving? Did you try upgrading to the latest release?

If you disable weaving then any LAZY OneToOne or ManyToOne relationship will be treated as EAGER. That is the main functional difference.
 
Fabian Angy
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


The same bug here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=313023

Thanks for your answer! : )
 
Fabian Angy
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Someone knows if it exists a patch or something like that to fix the bug with the weaving in eclipselink 2.1.2?
 
James Sutherland
Ranch Hand
Posts: 553
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The bug seems to be still open, please vote for it.

You should not need to disable weaving entirely to avoid it just set,

"eclipselink.weaving.internal"="false"

This will still allow weaving for LAZY, change tracking, and fetch groups.

The error seems to be cause because you have a double primitive in your class, but have mapped it to a column that allows null values. Because primitive cannot store null you get the error.
Normally primitive should only be used if the column does not allow null. You could use Double instead of double, does this work?

You could also set a nullValue in your mapping using a DescriptorCustomizer.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic