Skip to content

Conversation

@trbar
Copy link

@trbar trbar commented Dec 2, 2025

In newer versions of EclipseLink (especially 4.x with Jakarta Persistence 3.x), the default behavior for classpath scanning has changed. When exclude-unlisted-classes is not explicitly set to true in persistence.xml, EclipseLink will:

  1. Scan the entire classpath for entity classes
  2. In an OSGi/Eclipse RCP environment, this means scanning ALL plugin JARs
  3. This can be extremely slow when there are many plugins (as in openLCA)

https://docs.spring.io/spring-framework/reference/data-access/orm/jpa.html#orm-jpa-setup-lcemfb
Screenshot 2025-12-02 at 16 30 38

Thus, we should set exclude-unlisted-classes to true in the persistence.xml

@trbar
Copy link
Author

trbar commented Dec 2, 2025

for testing, you can use the temp_measure_db_opening_speed branch in the olca-app, which can give profiling numbers to see the effect, for example:
Screenshot 2025-12-02 at 14 20 31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants