page not found using javamelody for spring boot

295 views
Skip to first unread message

KARIMI KHADIJA

unread,
Feb 23, 2018, 7:30:21 AM2/23/18
to javamelody
I have a spring boot application and i had add javamelody for spring boot bot always get page not found 404 error

this is my configuration for pom.xml

         
<dependency>
 
<groupId>org.springframework.boot</groupId>
 
<artifactId>spring-boot-starter-aop</artifactId>
 
</dependency>
 
<dependency>
 
<groupId>net.bull.javamelody</groupId>
 
<artifactId>javamelody-spring-boot-starter</artifactId>
 
<version>1.65.0</version>
 
</dependency>

and the configuration for application.yml

javamelody:
 
# if you have auto-proxy issues, you can add the following property
 
# (and the spring-boot-starter-aop dependency in pom.xml):
  advisor
-auto-proxy-creator-enabled: false
 
# Enable JavaMelody auto-configuration (optional, default: true)
  enabled
: true
 
# Data source names to exclude from monitoring (optional, comma-separated)
 
#excluded-datasources: secretSource,topSecretSource
 
# Enable monitoring of Spring services and controllers (optional, default: true)
  spring
-monitoring-enabled: true
 
# Initialization parameters for JavaMelody (optional)
 
# See: https://github.com/javamelody/javamelody/wiki/UserGuide#6-optional-parameters
  init
-parameters:
   
# log http requests
    log
: true
   
# to exclude images, css, fonts and js urls from the monitoring:
   
#url-exclude-pattern: (/webjars/.*|/css/.*|/images/.*|/fonts/.*|/js/.*)
   
# to add basic auth:
   
#authorized-users: admin:pwd
   
# to change the default storage directory:
   
#storage-directory: /tmp/javamelody
   
#to change the default "/monitoring" path
    monitoring
-path: /api/monitoring

but when I go to http://localhost:9900/api/monitoring  I got the following result



Whitelabel Error Page

This application has no explicit mapping for /error, so you are seeing this as a fallback.
Fri Feb 23 12:12:30 WET 2018
There was an unexpected error (type=Not Found, status=404).
No message available

I got the same result even if I remove the solotion of proxy issue

note that when I use a version of javamelody spring boot starter higher then 1.65.0 my application crash

evernat

unread,
Feb 23, 2018, 5:01:39 PM2/23/18
to javamelody
Hi,

For a recent spring boot version, you need to upgrade the javamelody-spring-boot-starter.

bye,
Emeric

KARIMI KHADIJA

unread,
Feb 27, 2018, 7:27:22 AM2/27/18
to javamelody
Hello thank you for your reply but when I use the last version of javamelody-spring-boot-starter (1.71.0) my app crash down

And I get the following error

Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2018-févr.-27 09:50:36.106 ERROR [main] o.s.b.SpringApplication - Application startup failed
java
.lang.NullPointerException: null
 at org
.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor$ValidatedLocalValidatorFactoryBean.supports(ConfigurationPropertiesBindingPostProcessor.java:423) ~[spring-boot-1.5.4.RELEASE.jar:1.5.4.RELEASE]
 at org
.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.determineValidator(ConfigurationPropertiesBindingPostProcessor.java:353) ~[spring-boot-1.5.4.RELEASE.jar:1.5.4.RELEASE]
 at org
.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.postProcessBeforeInitialization(ConfigurationPropertiesBindingPostProcessor.java:314) ~[spring-boot-1.5.4.RELEASE.jar:1.5.4.RELEASE]
 at org
.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.postProcessBeforeInitialization(ConfigurationPropertiesBindingPostProcessor.java:296) ~[spring-boot-1.5.4.RELEASE.jar:1.5.4.RELEASE]
 at org
.springframework.cloud.context.properties.ConfigurationPropertiesRebinder.rebind(ConfigurationPropertiesRebinder.java:105) ~[spring-cloud-context-1.2.2.RELEASE.jar:1.2.2.RELEASE]
 at org
.springframework.cloud.context.properties.ConfigurationPropertiesRebinder.rebind(ConfigurationPropertiesRebinder.java:90) ~[spring-cloud-context-1.2.2.RELEASE.jar:1.2.2.RELEASE]
 at org
.springframework.cloud.context.properties.ConfigurationPropertiesRebinder.onApplicationEvent(ConfigurationPropertiesRebinder.java:138) ~[spring-cloud-context-1.2.2.RELEASE.jar:1.2.2.RELEASE]
 at org
.springframework.cloud.context.properties.ConfigurationPropertiesRebinder.onApplicationEvent(ConfigurationPropertiesRebinder.java:51) ~[spring-cloud-context-1.2.2.RELEASE.jar:1.2.2.RELEASE]
 at org
.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:167) ~[spring-context-4.3.9.RELEASE.jar:4.3.9.RELEASE]
 at org
.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) ~[spring-context-4.3.9.RELEASE.jar:4.3.9.RELEASE]
 at org
.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:393) ~[spring-context-4.3.9.RELEASE.jar:4.3.9.RELEASE]
 at org
.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:347) ~[spring-context-4.3.9.RELEASE.jar:4.3.9.RELEASE]
 at org
.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration.afterSingletonsInstantiated(ConfigurationPropertiesRebinderAutoConfiguration.java:79) ~[spring-cloud-context-1.2.2.RELEASE.jar:1.2.2.RELEASE]
 at org
.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:781) ~[spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]
 at org
.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867) ~[spring-context-4.3.9.RELEASE.jar:4.3.9.RELEASE]
 at org
.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543) ~[spring-context-4.3.9.RELEASE.jar:4.3.9.RELEASE]
 at org
.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.5.4.RELEASE.jar:1.5.4.RELEASE]
 at org
.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) [spring-boot-1.5.4.RELEASE.jar:1.5.4.RELEASE]
 at org
.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) [spring-boot-1.5.4.RELEASE.jar:1.5.4.RELEASE]
 at org
.springframework.boot.SpringApplication.run(SpringApplication.java:303) [spring-boot-1.5.4.RELEASE.jar:1.5.4.RELEASE]
 at org
.springframework.boot.SpringApplication.run(SpringApplication.java:1118) [spring-boot-1.5.4.RELEASE.jar:1.5.4.RELEASE]
 at org
.springframework.boot.SpringApplication.run(SpringApplication.java:1107) [spring-boot-1.5.4.RELEASE.jar:1.5.4.RELEASE]
 at ma
.omnishore.portail.ServiceApplication.main(ServiceApplication.java:30) [classes/:na]
2018-févr.-27 09:50:36.109 INFO  [main] o.s.b.c.e.AnnotationConfigEmbeddedWebApplicationContext - Closing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@38600b: startup date [Tue Feb 27 09:50:04 WET 2018]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@4c1909a3
2018-févr.-27 09:50:36.130 INFO  [main] o.s.c.n.e.InstanceInfoFactory - Setting initial instance status as: STARTING
2018-févr.-27 09:50:36.148 INFO  [main] o.s.c.n.e.s.EurekaServiceRegistry - Unregistering application application-service with eureka with status DOWN
2018-févr.-27 09:50:36.219 INFO  [main] c.n.d.DiscoveryClient - Initializing Eureka in region us-east-1
2018-févr.-27 09:50:36.404 INFO  [main] c.n.d.p.DiscoveryJerseyProvider - Using JSON encoding codec LegacyJacksonJson
2018-févr.-27 09:50:36.405 INFO  [main] c.n.d.p.DiscoveryJerseyProvider - Using JSON decoding codec LegacyJacksonJson
2018-févr.-27 09:50:36.771 INFO  [main] c.n.d.p.DiscoveryJerseyProvider - Using XML encoding codec XStreamXml
2018-févr.-27 09:50:36.772 INFO  [main] c.n.d.p.DiscoveryJerseyProvider - Using XML decoding codec XStreamXml
2018-févr.-27 09:50:37.286 INFO  [main] c.n.d.s.r.a.ConfigClusterResolver - Resolving eureka endpoints via configuration
2018-févr.-27 09:50:37.435 INFO  [main] c.n.d.DiscoveryClient - Disable delta property : false
2018-févr.-27 09:50:37.436 INFO  [main] c.n.d.DiscoveryClient - Single vip registry refresh property : null
2018-févr.-27 09:50:37.436 INFO  [main] c.n.d.DiscoveryClient - Force full registry fetch : false
2018-févr.-27 09:50:37.436 INFO  [main] c.n.d.DiscoveryClient - Application is null : false
2018-févr.-27 09:50:37.436 INFO  [main] c.n.d.DiscoveryClient - Registered Applications size is zero : true
2018-févr.-27 09:50:37.436 INFO  [main] c.n.d.DiscoveryClient - Application version is -1: true
2018-févr.-27 09:50:37.436 INFO  [main] c.n.d.DiscoveryClient - Getting all instance registry info from the eureka server
2018-févr.-27 09:50:37.992 INFO  [main] c.n.d.DiscoveryClient - The response status is 200
2018-févr.-27 09:50:37.996 INFO  [main] c.n.d.DiscoveryClient - Starting heartbeat executor: renew interval is: 1
2018-févr.-27 09:50:38.001 INFO  [main] c.n.d.InstanceInfoReplicator - InstanceInfoReplicator onDemand update allowed rate per min is 4
2018-févr.-27 09:50:38.006 INFO  [main] c.n.d.DiscoveryClient - Discovery Client initialized at timestamp 1519725038005 with initial instances count: 2
2018-févr.-27 09:50:38.091 INFO  [main] c.n.d.DiscoveryClient - Shutting down DiscoveryClient ...
2018-févr.-27 09:50:38.092 INFO  [main] c.n.d.DiscoveryClient - Unregistering ...
2018-févr.-27 09:50:38.104 INFO  [main] c.n.d.DiscoveryClient - DiscoveryClient_APPLICATION-SERVICE/application-service:17665a986aa6ca87d6a8629f9ede198d - deregister  status: 404
2018-févr.-27 09:50:38.109 INFO  [main] c.n.d.DiscoveryClient - Completed shut down of DiscoveryClient
2018-févr.-27 09:50:38.111 WARN  [main] o.s.b.c.e.AnnotationConfigEmbeddedWebApplicationContext - Exception thrown from LifecycleProcessor on context close
java
.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' before invoking lifecycle methods via the context: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@38600b: startup date [Tue Feb 27 09:50:04 WET 2018]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@4c1909a3
 at org
.springframework.context.support.AbstractApplicationContext.getLifecycleProcessor(AbstractApplicationContext.java:427) [spring-context-4.3.9.RELEASE.jar:4.3.9.RELEASE]
 at org
.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:999) [spring-context-4.3.9.RELEASE.jar:4.3.9.RELEASE]
 at org
.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:958) [spring-context-4.3.9.RELEASE.jar:4.3.9.RELEASE]
 at org
.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:750) [spring-boot-1.5.4.RELEASE.jar:1.5.4.RELEASE]
 at org
.springframework.boot.SpringApplication.run(SpringApplication.java:314) [spring-boot-1.5.4.RELEASE.jar:1.5.4.RELEASE]
 at org
.springframework.boot.SpringApplication.run(SpringApplication.java:1118) [spring-boot-1.5.4.RELEASE.jar:1.5.4.RELEASE]
 at org
.springframework.boot.SpringApplication.run(SpringApplication.java:1107) [spring-boot-1.5.4.RELEASE.jar:1.5.4.RELEASE]
 at ma
.omnishore.portail.ServiceApplication.main(ServiceApplication.java:30) [classes/:na]
2018-févr.-27 09:50:38.116 INFO  [main] o.s.j.e.a.AnnotationMBeanExporter - Unregistering JMX-exposed beans on shutdown
2018-févr.-27 09:50:38.116 INFO  [main] o.s.j.e.a.AnnotationMBeanExporter - Unregistering JMX-exposed beans
2018-févr.-27 09:50:38.144 INFO  [main] o.s.c.a.AnnotationConfigApplicationContext - Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@18e4bbec: startup date [Tue Feb 27 09:50:21 WET 2018]; parent: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@38600b
2018-févr.-27 09:50:38.146 WARN  [main] o.s.c.a.AnnotationConfigApplicationContext - Exception thrown from ApplicationListener handling ContextClosedEvent
org
.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'eurekaAutoServiceRegistration': Singleton bean creation not allowed while singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
 at org
.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:216) [spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]
 at org
.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]
 at org
.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]
 at org
.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1078) [spring-context-4.3.9.RELEASE.jar:4.3.9.RELEASE]
 at org
.springframework.context.event.ApplicationListenerMethodAdapter.getTargetBean(ApplicationListenerMethodAdapter.java:280) ~[spring-context-4.3.9.RELEASE.jar:4.3.9.RELEASE]
 at org
.springframework.context.event.ApplicationListenerMethodAdapter.doInvoke(ApplicationListenerMethodAdapter.java:250) ~[spring-context-4.3.9.RELEASE.jar:4.3.9.RELEASE]
 at org
.springframework.context.event.ApplicationListenerMethodAdapter.processEvent(ApplicationListenerMethodAdapter.java:174) ~[spring-context-4.3.9.RELEASE.jar:4.3.9.RELEASE]
 at org
.springframework.context.event.ApplicationListenerMethodAdapter.onApplicationEvent(ApplicationListenerMethodAdapter.java:137) ~[spring-context-4.3.9.RELEASE.jar:4.3.9.RELEASE]
 at org
.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:167) ~[spring-context-4.3.9.RELEASE.jar:4.3.9.RELEASE]
 at org
.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) ~[spring-context-4.3.9.RELEASE.jar:4.3.9.RELEASE]
 at org
.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:393) [spring-context-4.3.9.RELEASE.jar:4.3.9.RELEASE]
 at org
.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:399) [spring-context-4.3.9.RELEASE.jar:4.3.9.RELEASE]
 at org
.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:347) [spring-context-4.3.9.RELEASE.jar:4.3.9.RELEASE]
 at org
.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:991) [spring-context-4.3.9.RELEASE.jar:4.3.9.RELEASE]
 at org
.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:958) [spring-context-4.3.9.RELEASE.jar:4.3.9.RELEASE]
 at org
.springframework.cloud.context.named.NamedContextFactory.destroy(NamedContextFactory.java:76) [spring-cloud-context-1.2.2.RELEASE.jar:1.2.2.RELEASE]
 at org
.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:272) [spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]
 at org
.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:578) [spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]
 at org
.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:554) [spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]
 at org
.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingleton(DefaultListableBeanFactory.java:961) [spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]
 at org
.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:523) [spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]
 at org
.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingletons(DefaultListableBeanFactory.java:968) [spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]
 at org
.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1030) [spring-context-4.3.9.RELEASE.jar:4.3.9.RELEASE]
 at org
.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1006) [spring-context-4.3.9.RELEASE.jar:4.3.9.RELEASE]
 at org
.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:958) [spring-context-4.3.9.RELEASE.jar:4.3.9.RELEASE]
 at org
.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:750) [spring-boot-1.5.4.RELEASE.jar:1.5.4.RELEASE]
 at org
.springframework.boot.SpringApplication.run(SpringApplication.java:314) [spring-boot-1.5.4.RELEASE.jar:1.5.4.RELEASE]
 at org
.springframework.boot.SpringApplication.run(SpringApplication.java:1118) [spring-boot-1.5.4.RELEASE.jar:1.5.4.RELEASE]
 at org
.springframework.boot.SpringApplication.run(SpringApplication.java:1107) [spring-boot-1.5.4.RELEASE.jar:1.5.4.RELEASE]
 at ma
.omnishore.portail.ServiceApplication.main(ServiceApplication.java:30) [classes/:na]
2018-févr.-27 09:50:38.178 INFO  [main] o.s.o.j.LocalContainerEntityManagerFactoryBean - Closing JPA EntityManagerFactory for persistence unit 'default'





evernat

unread,
Mar 1, 2018, 1:51:11 AM3/1/18
to javamelody

KARIMI KHADIJA

unread,
Mar 1, 2018, 9:16:13 AM3/1/18
to javamelody
Thank you that solve my probleme
Reply all
Reply to author
Forward
0 new messages