0

Here is the environment setup and the important dependencies :

  • Spring boot 1.5.6
  • dev Server tomcat 8
  • production Server Glassfish 4.1
  • org.hibernate.javax.persistence:hibernate-jpa-2.1-api:jar:1.0.0.Final:compile

The following code works perfectly on the dev server

@Entity
@Table(name = "table")
@SqlResultSetMappings({
    @SqlResultSetMapping(name = "SqlResultSetMapping.count", columns = @ColumnResult(name = "cnt")),
        @SqlResultSetMapping(name = "projection",
        classes = {
            @ConstructorResult(
                targetClass = com.considion.itas.domain.Table.class,
                columns = {})
})
@NamedNativeQueries({
    @NamedNativeQuery(
        name = "Table.request",
        resultSetMapping = "projection",
        query = "query"
    ),
    @NamedNativeQuery(
        name = "Table.request.count",
        resultSetMapping = "SqlResultSetMapping.count",
        query = " count request"
    )
})
public class Table implements Serializable { ... }

and The repository looks like the following:

public interface TableRepository extends JpaRepository<Table,Long>{
    Page<Table> extract(@Param("para") ... , Pageable pageable);
}

but once run on production environment, glassFish throw the following error

Caused by: org.springframework.data.mapping.PropertyReferenceException: No property extract found for type Table!

        at org.springframework.data.mapping.PropertyPath.<init>(PropertyPath.java:80) ~[spring-data-commons-1.13.15.RELEASE.jar:na]

        at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:336) ~[spring-data-commons-1.13.15.RELEASE.jar:na]

        at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:312) ~[spring-data-commons-1.13.15.RELEASE.jar:na]
Toumi
  • 2,925
  • 4
  • 37
  • 31
  • Your repository code looks wrong. Why is it not extending anything? – unwichtich Jan 17 '19 at 13:42
  • I updated the answer, the repository is correct, the code is correct, the problem is related to difference between tomcat and Glassfish – Toumi Jan 17 '19 at 13:54

0 Answers0