Comments (5)
👤 jacek99 🕗 Aug 31, 2009 at 13:40 UTC
What steps will reproduce the problem?
- Create a data POJO
- Add JAXB @ XmlElement or @ XmlAttribute annotations to the properties
- Start the app (in my case, a Spring web app)
What is the expected output? What do you see instead?
App should start up. Instead, JAXB throws an error since it sees duplicate
properties for XML binding, e.g.
Class has two properties of the same name "durationInMilis"
this problem is related to the following location:
at public long com.myApsResult.getDurationInMilis()
where ApsResult is:
@ Data @ XmlType(name="ApsResult",namespace=ApsConstants.APS5_NAMESPACE)
public class ApsResult {
@ XmlAttribute(name="code",required=true) private int code;
@ XmlAttribute(name="message",required=true) private String message = "";
@ XmlAttribute(name="transactionId",required=true) private String
transactionId;
@ XmlAttribute(name="durationInMilis",required=true) private long
durationInMilis = 0;
What version of the product are you using? On what operating system?
JDK 1.6, Linux.
Please provide any additional information below.
Workaround is to add the getter manually (i.e. in code) and annotate the
getter instead of the property. Would be great if Lombok did that
automatically...
from lombok.
👤 jacek99 🕗 Sep 01, 2009 at 13:33 UTC
I apologize, this is an invalid defect. Please close it. The POJO needed an extra
JAXB annotation to override its default behavior:
@ XmlAccessorType(XmlAccessType.FIELD)
and everything works perfectly after that with @ Data.
Good to reject defect as Invalid.
from lombok.
👤 reinierz 🕗 Sep 01, 2009 at 22:59 UTC
Marked as invalid as per the original reporter's request.
from lombok.
👤 reinierz 🕗 Oct 16, 2009 at 08:53 UTC
from lombok.
End of migration
from lombok.
Related Issues (20)
- @Data annotation have some strange phenomenon HOT 1
- [BUG] SneakyThrows leaves traces to lombok in the class files
- [BUG] Eclipse rename in inner class renames Lomboc annotations HOT 2
- [BUG] NPE in Java Compiler when using Java 21 and compiling for Java 17
- lombok.eclipse.handlers.HandleConstructor$HandleRequiredArgsConstructor failed [BUG] HOT 7
- [BUG] Fix getter annotation for Boolean class field definition HOT 1
- [BUG] @Builder.Default causes class field initializers not to be executed properly HOT 1
- [BUG] HOT 2
- [BUG] Kotlin: Cannot access '***': it is private in 'XXX' HOT 4
- [FEATURE] Kotlin style properties in Java?
- [BUG] @ExtensionMethod replacing bug in Stream#map HOT 1
- [BUG] Compiling with Jdk 17 causing java.lang.NoClassDefFoundError: com/sun/tools/javac/util/Filter HOT 2
- [BUG] Lombok doesn't appear to be working in Eclipse 2023-12 on Ubuntu, but is on Windows 11 HOT 1
- [FEATURE] Add new annotations for converting Java objects. For example: @ConvertTo({FooA.class, FooB.class}) HOT 2
- [BUG] @Builder.Default removes default value when instantiate through constructor HOT 1
- [FEATURE] Add support for Eclipse 2024-03 (4.31) HOT 21
- [BUG] Eclipse plugin not working but manually adding javaagent to eclipse.ini works HOT 3
- [BUG] Inconsistent results using concatenated string literals
- [FEATURE] Generate merged test coverage report
- [BUG] @Data does not generate all the Getters and Setters HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lombok.