Payara 4.1.1.164 - SQL Monitoring problem

203 views
Skip to first unread message

thomask...@gmail.com

unread,
Dec 19, 2016, 1:56:40 PM12/19/16
to javamelody
Hi group,

I just installed javamelody with my JEE7 Webapp and everything works fine except sql monitoring. I configuerd the jdbc/jndi Datasources as adviced in the advanced user guide ->

JDBC Pool: TestDB -> Datasource: com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource; Resource Type: javax.sql.ConnectionPoolDatasource
jdbc/TestDB_uncached -> Pool: TestDB
jdbc/TestDB -> ResourceType: javax.naming.spi.ObjectFactory; FactoryClass:javamelody.CachedObjectFactory -> jndi-ref:TestDB_uncached

When starting the server I can find the following entzries in the serverlog:

[2016-12-19T19:03:00.233+0100] [Payara 4.1] [INFO] [] [] [tid: _ThreadID=14 _ThreadName=RunLevelControllerThread-1482170549777] [timeMillis: 1482170580233] [levelValue: 800] [[
  19:03:00.232 [RunLevelControllerThread-1482170549777]  DEBUG net.bull.javamelody - datasources found in JNDI: [jdbc/TestDB_uncached, jdbc/TestDB, jdbc/TestDB_uncached__pm]

[Payara 4.1] [SEVERE] [AS-NAMING-00006] [org.glassfish.naming] [tid: _ThreadID=14 _ThreadName=RunLevelControllerThread-1482170549777] [timeMillis: 1482170580234] [levelValue: 1000] [[
  Exception in NamingManagerImpl copyMutableObject(): {0}
java.io.NotSerializableException: net.bull.javamelody.JdbcWrapper
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184)
    at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548) .......

[2016-12-19T19:03:00.238+0100] [Payara 4.1] [INFO] [] [] [tid: _ThreadID=14 _ThreadName=RunLevelControllerThread-1482170549777] [timeMillis: 1482170580238] [levelValue: 800] [[
  19:03:00.238 [RunLevelControllerThread-1482170549777] DEBUG net.bull.javamelody - rebinding datasources failed, skipping
java.lang.RuntimeException: Cant copy Serializable object:
    at com.sun.enterprise.naming.util.NamingUtilsImpl.makeCopyOfObject(NamingUtilsImpl.java:131)
    at com.sun.enterprise.naming.impl.LocalSerialContextProviderImpl.rebind(LocalSerialContextProviderImpl.java:108) ........

When I check the monitioring page I can see HTTP, Memory statistics but No SQL counts and no SQL query statistic.

Hope you can help me with this, since I try differnet configurations for a couple of hours now.

best regards
Thomas

thomask...@gmail.com

unread,
Dec 20, 2016, 7:39:02 AM12/20/16
to javamelody, thomask...@gmail.com
I created https://github.com/javamelody/javamelody/issues/596. The problem is, that the payaraserver name is not glassfish but payara server ... -> so the JdbcWrapper doesn't recognize it correctly.
The problem is resolved in my pullrequest.
br
Thomas

evernat

unread,
Dec 20, 2016, 6:19:45 PM12/20/16
to javamelody, thomask...@gmail.com
Hi Thomas,

I will look at the pull request, thanks.

Emeric
Reply all
Reply to author
Forward
0 new messages