You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by exabrial12 <ex...@gmail.com> on 2018/09/28 20:05:23 UTC

EclipseLink NPE Warning occurs every time during first use TomEE 7.0.5

Here's the info, I'm following up with an analysis in a reply.

INFO: Starting ProtocolHandler ["http-nio-8080"]
Sep 28, 2018 2:57:24 PM sun.reflect.DelegatingMethodAccessorImpl invoke
INFO: Starting ProtocolHandler ["ajp-nio-8009"]
Sep 28, 2018 2:57:24 PM sun.reflect.DelegatingMethodAccessorImpl invoke
INFO: Server startup in 5809 ms
[http-nio-8080-exec-2] INFO c.e.a.s.initiator.jaxrs.VueJsEndpoint -
getTexts() sfid:abcd
[EL Info]: 2018-09-28 14:57:39.39--ServerSession(1903518886)--EclipseLink,
version: Eclipse Persistence Services - 2.6.5.v20170607-b3d05bd
[EL Info]: 2018-09-28
14:57:39.628--ServerSession(1903518886)--/file:/Users/jonathan.fisher/servers/apache-tomee-plume-7.0.5/wtpwebapps/xxxx/WEB-INF/classes/_xxxx
login successful
[EL Warning]: 2018-09-28 14:57:39.63--ServerSession(1903518886)--Problem
while registering MBean: java.lang.NullPointerException

The stack trace of that exception is:
Daemon Thread [http-nio-8080-exec-3] (Suspended (exception
NullPointerException))	
	owns: EntityManagerFactoryDelegate  (id=256)	
	owns: PhaseInterceptorChain  (id=257)	
	owns: NioEndpoint$NioSocketWrapper  (id=258)	
	DefaultMBeanServerInterceptor.registerMBean(Object, ObjectName) line: 315	
	JmxMBeanServer.registerMBean(Object, ObjectName) line: 522	
	LocalMBeanServer.registerMBean(Object, ObjectName) line: 172	
	OpenEJBServerPlatform(JMXServerPlatformBase).serverSpecificRegisterMBean()
line: 355	
	OpenEJBServerPlatform(ServerPlatformBase).registerMBean() line: 581	
	ServerSession(DatabaseSessionImpl).postConnectDatasource() line: 873	
	ServerSession(DatabaseSessionImpl).loginAndDetectDatasource() line: 778	
	EntityManagerFactoryProvider.login(DatabaseSessionImpl, Map, boolean) line:
265	
	EntityManagerSetupImpl.deploy(ClassLoader, Map) line: 734	
	EntityManagerFactoryDelegate.getAbstractSession() line: 207	
	EntityManagerFactoryDelegate.createEntityManagerImpl(Map,
SynchronizationType) line: 307	
	EntityManagerFactoryImpl.createEntityManagerImpl(Map, SynchronizationType)
line: 337	
	EntityManagerFactoryImpl.createEntityManager(SynchronizationType, Map)
line: 318	
	ReloadableEntityManagerFactory.createEntityManager(SynchronizationType,
Map) line: 208	
	JtaEntityManagerRegistry.getEntityManager(EntityManagerFactory, Map,
boolean, String, SynchronizationType) line: 125	
	JtaEntityManager.getEntityManager() line: 145	
	JtaEntityManager.typedProxyIfNoTx(Method, Object...) line: 382	
	JtaEntityManager.createNamedQuery(String, Class<T>) line: 430	
	DatabaseService.getTexts(String) line: 203	
	NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not
available [native method]	
	NativeMethodAccessorImpl.invoke(Object, Object[]) line: 62	
	DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43	
	Method.invoke(Object, Object...) line: 498	

InterceptorInvocationContext<T>(AbstractInvocationContext<T>).directProceed()
line: 113	
	InterceptorInvocationContext<T>(AbstractInvocationContext<T>).proceed()
line: 106	
	InterceptorInvocationContext<T>.proceed() line: 67	
	MandatoryInterceptor(InterceptorBase).intercept(InvocationContext) line: 67	
	MandatoryInterceptor.intercept(InvocationContext) line: 36	
	NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not
available [native method]	
	NativeMethodAccessorImpl.invoke(Object, Object[]) line: 62	
	DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43	
	Method.invoke(Object, Object...) line: 498	
	CdiInterceptorBean<T>(InterceptorBean<T>).intercept(InterceptionType, T,
InvocationContext) line: 136	
	InterceptorInvocationContext<T>.proceed() line: 63	
	DefaultInterceptorHandler<T>.invoke(Method, Object[]) line: 139	
	DatabaseService$$OwbInterceptProxy0.getTexts(String) line: not available	
	DatabaseService$$OwbNormalScopeProxy0.getTexts(String) line: not available	
	TextController.getTexts(String) line: 52	
	NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not
available [native method]	
	NativeMethodAccessorImpl.invoke(Object, Object[]) line: 62	
	DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43	
	Method.invoke(Object, Object...) line: 498	

InterceptorInvocationContext<T>(AbstractInvocationContext<T>).directProceed()
line: 113	
	InterceptorInvocationContext<T>(AbstractInvocationContext<T>).proceed()
line: 106	
	InterceptorInvocationContext<T>.proceed() line: 67	
	RequiredInterceptor(InterceptorBase).intercept(InvocationContext) line: 67	
	RequiredInterceptor.intercept(InvocationContext) line: 35	
	NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not
available [native method]	
	NativeMethodAccessorImpl.invoke(Object, Object[]) line: 62	
	DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43	
	Method.invoke(Object, Object...) line: 498	
	CdiInterceptorBean<T>(InterceptorBean<T>).intercept(InterceptionType, T,
InvocationContext) line: 136	
	InterceptorInvocationContext<T>.proceed() line: 63	
	JavaXSecurityInterceptor.intercept(InvocationContext) line: 47	
	NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not
available [native method]	
	NativeMethodAccessorImpl.invoke(Object, Object[]) line: 62	
	DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43	
	Method.invoke(Object, Object...) line: 498	
	EjbInterceptorBean<T>(InterceptorBean<T>).intercept(InterceptionType, T,
InvocationContext) line: 136	
	InterceptorInvocationContext<T>.proceed() line: 63	
	DefaultInterceptorHandler<T>.invoke(Method, Object[]) line: 139	
	TextController$$OwbInterceptProxy0.getTexts(String) line: not available	
	TextController$$OwbNormalScopeProxy0.getTexts(String) line: not available	
	VueJsEndpoint.getTexts(String) line: 52	
	NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not
available [native method]	
	NativeMethodAccessorImpl.invoke(Object, Object[]) line: 62	
	DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43	
	Method.invoke(Object, Object...) line: 498	

InterceptorInvocationContext<T>(AbstractInvocationContext<T>).directProceed()
line: 113	
	InterceptorInvocationContext<T>(AbstractInvocationContext<T>).proceed()
line: 106	
	InterceptorInvocationContext<T>.proceed() line: 67	
	BValInterceptor.invoke(InvocationContext) line: 143	
	NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not
available [native method]	
	NativeMethodAccessorImpl.invoke(Object, Object[]) line: 62	
	DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43	
	Method.invoke(Object, Object...) line: 498	
	CdiInterceptorBean<T>(InterceptorBean<T>).intercept(InterceptionType, T,
InvocationContext) line: 136	
	InterceptorInvocationContext<T>.proceed() line: 63	
	TlehInterceptor.intercept(InvocationContext) line: 22	
	NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not
available [native method]	
	NativeMethodAccessorImpl.invoke(Object, Object[]) line: 62	
	DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43	
	Method.invoke(Object, Object...) line: 498	
	EjbInterceptorBean<T>(InterceptorBean<T>).intercept(InterceptionType, T,
InvocationContext) line: 136	
	InterceptorInvocationContext<T>.proceed() line: 63	
	XaUuidInterceptor.intercept(InvocationContext) line: 15	
	NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not
available [native method]	
	NativeMethodAccessorImpl.invoke(Object, Object[]) line: 62	
	DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43	
	Method.invoke(Object, Object...) line: 498	
	EjbInterceptorBean<T>(InterceptorBean<T>).intercept(InterceptionType, T,
InvocationContext) line: 136	
	InterceptorInvocationContext<T>.proceed() line: 63	
	DefaultInterceptorHandler<T>.invoke(Method, Object[]) line: 139	
	VueJsEndpoint$$OwbInterceptProxy0.getTexts(String) line: not available	
	VueJsEndpoint$$OwbNormalScopeProxy0.getTexts(String) line: not available	
	NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not
available [native method]	
	NativeMethodAccessorImpl.invoke(Object, Object[]) line: 62	
	DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43	
	Method.invoke(Object, Object...) line: 498	
	PojoInvoker.performInvocation(Exchange, Object, Method, Object[]) line: 43	
	PojoInvoker(AbstractInvoker).invoke(Exchange, Object, Method, List) line:
96	
	PojoInvoker(JAXRSInvoker).invoke(Exchange, Object, Object) line: 191	
	PojoInvoker(JAXRSInvoker).invoke(Exchange, Object) line: 101	
	AutoJAXRSInvoker.invoke(Exchange, Object) line: 68	
	ServiceInvokerInterceptor$1.run() line: 59	
	ServiceInvokerInterceptor.handleMessage(Message) line: 96	
	PhaseInterceptorChain.doIntercept(Message) line: 309	
	ChainInitiationObserver.onMessage(Message) line: 121	
	HttpDestination(AbstractHTTPDestination).invoke(ServletConfig,
ServletContext, HttpServletRequest, HttpServletResponse) line: 267	
	CxfRsHttpListener.doInvoke(HttpRequest, HttpResponse) line: 253	
	CXFJAXRSFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line:
94	
	ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse)
line: 193	
	ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 166	
	WsFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 52	
	ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse)
line: 193	
	ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 166	
	EEFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 65	
	ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse)
line: 193	
	ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 166	
	StandardWrapperValve.invoke(Request, Response) line: 198	
	StandardContextValve.invoke(Request, Response) line: 96	
	OpenEJBValve.invoke(Request, Response) line: 44	
	BasicAuthenticator(AuthenticatorBase).invoke(Request, Response) line: 493	
	StandardHostValve.invoke(Request, Response) line: 140	
	ErrorReportValve.invoke(Request, Response) line: 81	
	OpenEJBSecurityListener$RequestCapturer.invoke(Request, Response) line: 97	
	AccessLogValve(AbstractAccessLogValve).invoke(Request, Response) line: 650	
	StandardEngineValve.invoke(Request, Response) line: 87	
	CoyoteAdapter.service(Request, Response) line: 342	
	Http11Processor.service(SocketWrapperBase<?>) line: 800	
	Http11Processor(AbstractProcessorLight).process(SocketWrapperBase<?>,
SocketEvent) line: 66	
	AbstractProtocol$ConnectionHandler<S>.process(SocketWrapperBase<S>,
SocketEvent) line: 800	
	NioEndpoint$SocketProcessor.doRun() line: 1471	
	NioEndpoint$SocketProcessor(SocketProcessorBase<S>).run() line: 49	
	ThreadPoolExecutor(ThreadPoolExecutor).runWorker(ThreadPoolExecutor$Worker)
line: 1149	
	ThreadPoolExecutor$Worker.run() line: 624	
	TaskThread$WrappingRunnable.run() line: 61	
	TaskThread(Thread).run() line: 748	







--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Dev-f982480.html

Re: EclipseLink NPE Warning occurs every time during first use TomEE 7.0.5

Posted by exabrial12 <ex...@gmail.com>.
So first thing, it looks like you can ignore this warning safely in
production. Out of sheer curiosity I wanted to see what was up.

It looks like OpenEJBServerPlatform extends JMXServerPlatformBase, which
declares a field "private MBeanRuntimeServicesMBean runtimeServicesMBean =
null;". This is never being set, hence the NPE. So to get rid of this
warning, OpenEJBServerPlatform needs to call setRuntimeServicesMBean() with
a value. 

I figured I'd take a look at what other JMX Platform implementations do,
namely Glassfish. So the GlassfishPlatform platform also implements
JMXEnabledPlatform and inside there prepareServerSpecificServicesMBean()
calls setRuntimeServicesMBean(). So really, this is probably a bug in
EclipseLink. They shouldn't rely on a value being there if the platform
doesn't implement JMXEnabledPlatform.

Drilling down little further, they create an instance of
MBeanGlassfishRuntimeServices, which turns around calls super on
GlassfishRuntimeServices, which the implementation included with EclipseLink
calls super on RuntimeServices.


So I guess I'll implement the required interface and do the same thing
EclipseLink is and see what happens.  Could be fun :)



--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Dev-f982480.html