cancel
Showing results for 
Search instead for 
Did you mean: 

JPA Monitors in NetWeaver Administrator: Cannot see my queries and caches

rolf_paulsen
Active Participant
0 Kudos

Hi,

I create and deploy a simple JPA-application into the system database (Table creation through Java Dictionary or not, does not matter) on 7.11.

I have some named queries annotated with hints like this:

@NamedQueries( {@NamedQuery(name = "Book.findById", query = "SELECT t FROM Book t WHERE t.id = :id",

hints = { @QueryHint(name = "com.sap.jpa.cache.query-result", value = "cached") })...

(I suspect that "com.sap.jpa.cache.query-result" and "cached" are really meant in the Developer's Guide "JPA Monitors" if it tells about Constants.CACHE_QUERY_RESULTS and Constants.CACHE_QUERY_RESULTS.CACHED that I cannot find.)

Problem: In the JPA Monitors (NWA: Problem Management --> Database --> JPA Monitors), I cannot see any Caches (Tab "Caches at the bottom). Caches like OBJECT_CACHE, QUERY_RESULT_CACHE etc. are only visible for the system-Datasources (aliases) and Applications like SAP/BPEM_CORE.

(The same for the Queries-Tab: I cannot see any of my named queries, the queries of the system-applications are visible.)

How can I activate JPA Monitoring for my applications?

Any help is appreciated.

Cheers,

Rolf

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member214355
Contributor
0 Kudos

Hello Rolf

I see that you have no recieved any suggestions.

Can you provide more information that may help?

Thanks

Kenny

Moderator

rolf_paulsen
Active Participant
0 Kudos

Hi Kenny,

thanks for picking this up.

I tested this issue again on CE 7.20 and it works in general. The error occurs after the persistence unit has been initially created with errors - in my case because of a problem with @Id-generation - so that the EntityManager could not be injected. It seems that the JPA Monitor cannot recover from a problem with such a persistence context even if it is resolved later. You have to use another name for the persistence unit after the fix.

Strange, but I can live with this.

Regards,

Rolf