Questions tagged [byte-code-enhancement]

22 questions
34
votes
2 answers

Hibernate 4 bytecode enhancement not working for dirty checking optimization

I am using the Hibernate 4.3.6 and I made use of the latest Maven bytecode enhancement to instrument all entities for self dirtiness awareness. I added the maven plugin:
Vlad Mihalcea
  • 142,745
  • 71
  • 566
  • 911
20
votes
1 answer

Is it worth using the Hibernate Bytecode Enhancement mechanism?

I'm currently reading Vlad Mihalcea's book High-Performance Java Persistence. In the Bytecode Enhancement section, it is said that enableDirtyTracking can optimize performance with large amounts of data through replacing reflections. But I'm just…
Sven M.
  • 587
  • 7
  • 23
10
votes
2 answers

SpringBoot hibernate gradle byte code enhancement

I am trying to mane hibernate OneToOne relationships work lazily. My setup is spring-data-jpa using hibernate and Gradle. Even this is a well-documented problem/feature and there is a lot of good reads out there, I have come to realise that most of…
maxsap
  • 2,971
  • 9
  • 44
  • 70
8
votes
1 answer

How to copy resource files in classes folder with gradle?

Enviroment I am using a third party lib which requires bytecode instrumentation. The tool which does the bytecode instrumentation requires some description files and those files have to be in the same folder structure like the compiled .class files.…
Jan
  • 1,004
  • 6
  • 23
4
votes
3 answers

How to enhance classes properly at build time using Maven? OpenJPA

I am trying to enhance (entities) classes so i will not get this Exception: Exception in thread "main" org.apache.op enjpa.persistence.ArgumentException: Attempt to cast instance…
Wortig
  • 963
  • 2
  • 11
  • 37
4
votes
1 answer

Hibernate Bytecode Enhancement Unidirectional ManyToOne

I'm attempting to add Bytecode Enhancement to a Java-based Hibernate application. Hibernate is version 5.2.6.Final, and it's built in maven, so I'm using the hibernate-enhance-maven-plugin. I have tested the following issue up to 5.2.18.Final, but…
Curtis Snowden
  • 407
  • 1
  • 4
  • 20
3
votes
1 answer

Bytecode enhancement for Hibernate 5.3.7

I used to instrument my classes in Hibernate 4.x with an ant target:
Christian
  • 31
  • 3
3
votes
1 answer

Fetching a lazy OneToOne entity fetches every other OneToOne entities within the same object

Using Entity entity = hibernateTemplate.get(Entity.class, id); when I hit a entity.getChild() which is a OneToOne relation, every other OneToOne relations are loaded as well. I use hibernate 5.4.1-Final. I use bytecode enhancement as below…
2
votes
0 answers

Activating the data JPA Bytecode Enhancement seems to interfere with Spring JPA Auditing mecanism

I have a Spring Data JPA project where the Bytecode Enhancement has been activated in the pom.xml org.apache.maven.plugins maven-compiler-plugin
2
votes
0 answers

What causes OpenJPA logging The Entity was enhanced at some level, but current level of enhancement is something else

What might be cause of this and what does it mean? I just byte-code enhanced my entities and ran the application. On openjpa startup i get this info in log: 3145 desktop INFO [Thread-4] openjpa.Runtime - The Entity "desktop.dto.Funeral" was…
Wortig
  • 963
  • 2
  • 11
  • 37
2
votes
1 answer

How to reliably set up post-compilation bytecode enhancement builder in Eclipse?

I need to set up an Eclipse project with an additional builder that enhances the Java bytecode produced by an earlier builder (ideally Eclipse's own). I managed to get this builder to run and enhance the Eclipse Java builder output properly but…
2
votes
1 answer

Benefits of "compact" bytecode - stack-machine VM

First of all, let me make it clear that I'm currently writing a bytecode interpreter. I've been reading everywhere about the bytecode having to be "compact". However, I don't really understand what this is supposed to mean, or what the advantages…
Dr.Kameleon
  • 22,532
  • 20
  • 115
  • 223
2
votes
0 answers

How to enable bytecode enhancement for Hibernate with SBT?

I've seen that Hibernate bytecode enhancement can be done very easily with a Maven plugin: https://vladmihalcea.com/how-to-lazy-load-entity-properties-with-hibernate/ There's also a Gradle plugin for bytecode enhancement. Older versions of…
Vlad Dinulescu
  • 1,173
  • 1
  • 14
  • 24
2
votes
0 answers

hibernate-enhance-maven-plugin: java.lang.IllegalStateException: Unexpected type reference on method: 19

I recently added the bytecode enhancement as described in this article by adding the following lines to my pom.xml: org.hibernate.orm.tooling hibernate-enhance-maven-plugin
times29
  • 2,782
  • 2
  • 21
  • 40
1
vote
1 answer

Spring Data JPA + Bytecode Enhancement

Is it possible to load @*ToOne attributes eagerly using JPA interface(Entity Graphs) which are set lazy using @LazyToOne , @LazyGroup in the parent entity class and enabled bytecode enhancement ? I am trying to load such attributes eagerly using…
1
2