You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A NullPointerException is thrown from SessionListener.contextDestroyed() when undeploying application on WLS 12.2.1.4. More precisely from unwrapping weblogic.jdbc.common.internal.RmiDataSource at:
n.b.javamelody.debug(:36) Datasource needs unwrap: Database of class weblogic.jdbc.common.internal.RmiDataSource
n.b.javamelody.debug(:42) rebinding initial datasources failed, skipping
java.lang.NullPointerException: null
at net.bull.javamelody.JdbcWrapperHelper$1.run(JdbcWrapperHelper.java:547) ~[net.bull.javamelody-javamelody-core-1.86.0.jar:1.86.0]
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_251]
at net.bull.javamelody.JdbcWrapperHelper.setFieldAccessible(JdbcWrapperHelper.java:543) ~[net.bull.javamelody-javamelody-core-1.86.0.jar:1.86.0]
at net.bull.javamelody.JdbcWrapperHelper.getAccessibleField(JdbcWrapperHelper.java:522) ~[net.bull.javamelody-javamelody-core-1.86.0.jar:1.86.0]
at net.bull.javamelody.JdbcWrapperHelper.getFieldValue(JdbcWrapperHelper.java:507) ~[net.bull.javamelody-javamelody-core-1.86.0.jar:1.86.0]
at net.bull.javamelody.JdbcWrapper.unwrap(JdbcWrapper.java:677) ~[net.bull.javamelody-javamelody-core-1.86.0.jar:1.86.0]
at net.bull.javamelody.JdbcWrapper.unwrapDataSource(JdbcWrapper.java:668) ~[net.bull.javamelody-javamelody-core-1.86.0.jar:1.86.0]
at net.bull.javamelody.JdbcWrapper.stop(JdbcWrapper.java:642) ~[net.bull.javamelody-javamelody-core-1.86.0.jar:1.86.0]
at net.bull.javamelody.SessionListener.contextDestroyed(SessionListener.java:337) [net.bull.javamelody-javamelody-core-1.86.0.jar:1.86.0]
at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:720) [com.oracle.weblogic.servlet.jar:12.2.1.4]
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:344) [com.oracle.weblogic.security.subject.jar:12.2.1.4]
at weblogic.security.service.SecurityManager.runAsForUserCode(SecurityManager.java:197) [com.oracle.weblogic.security.subject.jar:12.2.1.4]
at weblogic.servlet.provider.WlsSecurityProvider.runAsForUserCode(WlsSecurityProvider.java:203) [com.oracle.weblogic.servlet.jar:12.2.1.4]
at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:71) [com.oracle.weblogic.servlet.jar:12.2.1.4]
at weblogic.servlet.internal.EventsManager.executeContextListener(EventsManager.java:251) [com.oracle.weblogic.servlet.jar:12.2.1.4]
This was reproduced with latest 1.86.0 version. Same kind of problem was already fixed for SessionListener.contextInitialized() in #916
The text was updated successfully, but these errors were encountered:
You said that NPE is thrown from SessionListener.contextDestroyed(), but no, it is sure that it is not thrown by the method.
As you can see in the stack trace that you have given, the log is at debug level and it says "skipping": n.b.javamelody.debug(:42) rebinding initial datasources failed, skipping java.lang.NullPointerException: null at ...
What happens is that, after this log at debug level, the listener continues to be destroyed and no exception is thrown by the contextDestroyed method.
So there is no issue here I think.
That's why I am closing this issue as invalid.
Given the failure to unwrap the datasource, perhaps there is also the same debug log with NPE when wrapping the datasource which is when the SessionListener is initialized. And so perhaps you do not have any monitoring of SQL requests.
The exception is not throw by the method, but still it would be better to do the right thing in unwrap instead of logging that.
Debug log fixed by 6541966
goldyliang
pushed a commit
to goldyliang/javamelody
that referenced
this issue
Mar 17, 2022
A NullPointerException is thrown from
SessionListener.contextDestroyed()
when undeploying application on WLS 12.2.1.4. More precisely from unwrappingweblogic.jdbc.common.internal.RmiDataSource
at:javamelody/javamelody-core/src/main/java/net/bull/javamelody/JdbcWrapper.java
Line 668 in 4cee901
This was reproduced with latest 1.86.0 version. Same kind of problem was already fixed for SessionListener.contextInitialized() in #916
The text was updated successfully, but these errors were encountered: