Skip to content

Add basePackage to weave and ddl example in README #45

@mlosinsky

Description

@mlosinsky

Hello,

thank you for the plugin!

I've run into an issue when weaving my entities: Cannot invoke "java.util.List.size()" because "genericTypes" is null. The reason for the error was that some unexpected classes were added to persistence.xml:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<persistence xmlns="https://jakarta.ee/xml/ns/persistence">
    <persistence-unit name="kobra-zz-ekr">
        <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
        ...
        <class>org.hibernate.type.NumericBooleanConverter</class>
        <class>org.hibernate.type.TrueFalseConverter</class>
        <class>org.hibernate.type.YesNoConverter</class>
        <class>org.springframework.data.jpa.convert.threeten.Jsr310JpaConverters$InstantConverter</class>
        <class>org.springframework.data.jpa.convert.threeten.Jsr310JpaConverters$LocalDateConverter</class>
        <class>org.springframework.data.jpa.convert.threeten.Jsr310JpaConverters$LocalDateTimeConverter</class>
        <class>org.springframework.data.jpa.convert.threeten.Jsr310JpaConverters$LocalTimeConverter</class>
        <class>org.springframework.data.jpa.convert.threeten.Jsr310JpaConverters$ZoneIdConverter</class>
        <class>org.springframework.data.jpa.domain.AbstractAuditable</class>
        <class>org.springframework.data.jpa.domain.AbstractPersistable</class>
        <properties>
            <property name="eclipselink.weaving" value="static"/>
        </properties>
    </persistence-unit>
</persistence>

I am using Spring Boot 3.3.5 and EclipseLink 4.0.4 (hibernate-entitymanager and hibernate-core are excluded from spring-boot-starter-data-jpa).

The solution was to add <basePackage>com.my.base.package</basePackage> to <configuration> of the plugin. I see that this is already configured in README in the last example. However, shouldn't it also be added to the weaving and ddl examples?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions