Ошибка there was an unexpected error

Published: 13 Jan 2016
Last Modified Date: 07 Feb 2023

Issue

When you try to activate Tableau Desktop the following errors may occur:

There was an unexpected error while trying to repair Trusted Storage.

or 

Function flxActCommonRepairLocalTrustedStorage returned error (50044, 71013, 19810)
LM_TS_LOCAL_REPAIR
There was an unexpected error while trying to repair Trusted Storage.

or 

Function flxActCommonRepairLocalTrustedStorage returned error (50044, 71013, 27)
LM_TS_LOCAL_REPAIR
There was an unexpected error while trying to repair Trusted Storage.

or

ERROR: flxActCommonLicSpcPopulateAllFromTS (50030, 71521,17005)
When trying to review trusted storage using custactutil

Environment

  • Tableau Desktop
  • Mac OS
  • Third party software

Resolution

Option 1 — For Tableau Desktop 2019.3 and later versions

Please re-run the installer as the Flexnet package cannot be split any longer. 

Option 2 — For Tableau Desktop all versions

Please note that using the below method may impact other applications that also run with FLEXnet. Consult with your IT team before proceeding.

On the computer running Tableau Desktop, please manually remove the FLEXnet preference files from the Library Folder. To find and remove the FlexNet preference files, see the steps below:

  1. Close Tableau Desktop
  2. Open Finder
  3. Select Go > Go to Folder from the menu bar at the top of the screen
  4. Enter /Library/Preferences/FLEXnet Publisher/FLEXnet and select Go
  5. Highlight all items in the directory and use the keys CMD + DELETE to delete them
    • Note: the files can also be deleted if the Gear Icon > Move to Trash option is selected while the items are highlighted
  6. Restart the computer
  7. Open Tableau Desktop and enter your product key to activate the product if necessary. 

Option 3 — For Tableau Desktop 2019.2 and earlier versions

On the computer running Tableau Desktop, please manually re-install the FlexNet package. To find and install the FlexNet licensing components, see the steps below:

  1. In Finder, click Applications.
  2. Hold down the Control key, click Tableau, and then select Show Package Contents.
  3. Double-click Contents, double-click Installers, and then double-click Tableau FLEXNET.pkg.
  4. Follow the instructions in the installation wizard and use the default options.

    • Note: you may be prompted to enter your license key. 
  5. When the FLEXNet installation completes, restart the computer.

Cause

This issue can be caused by different circumstances:

  • Third party tools or systems interfering with Tableau files and directories.
  • Corruption issues with FlexNet license data.
  • Time machine backups and moving Tableau Desktop images.

To avoid this issue, work with your IT team to ensure that no managed services or accounts are modifying Tableau files, including relevant FlexNet files.
 

Additional Information

Note: The tableau_xxxxxxx_event.log and tableau_xxxxxxx_tsf.data_backup files listed in the output (after running the ls -l /Library/Preferences/FLEXnet Publisher/FLEXnet cmd) should be owned by the local system of the user experiencing the issue, and have permissions of -rw-r—r— and -rw-rw-rw-, respectively. If they are owned by a different user/have incorrect permissions, try manually changing them back. 

For more information, see Errors: «FLEXNet licensing service is not present» or «Function flxActAppActivationSend returned error (0,0,0)» Activating on Mac

Discuss this article…




I am going through this book on restful web services with spring. I decided to move away from what they were doing and use java configuration files. For some reason, after switching over to the Java configuration, the service would run (in the console window) correctly but when I actually go to the endpoint on localhost i get this:

White label Error Page

This application has no explicit mapping for /error, so you are seeing
this as a fallback.

Sat Apr 23 20:48:25 PDT 2016 There was an unexpected error (type=Not
Found, status=404). No message available

And this is the response from the GET request:

{
    "timestamp": 1461470029110,
    "status": 404,
    "error": "Not Found",
    "message": "No message available",
    "path": "/greeting"
}

The next chapter of this story begins with me going to the getting started page on the Spring website http://spring.io/guides/gs/rest-service/ I decided to start a small project recreating their basic tutorial. I will post the code I wrote below for you to see. The problem is, I am having the exact same issue. The service runs but I can’t hit the endpoints. I am not sure what is going on and I have seen others with similar issues, but the answers have not applied/helped with mine. I am sure it is something obvious that I am doing wrong and any help would be greatly appreciated. One last piece of information, if at all relevant, I am using IntelliJ IDEA 15 CE as my IDE.

The endpoint being hit:

http://localhost:8080/greeting

My controller

@RestController
public class GreetingController {
    private static final String template = "Hello, %s!";
    private final AtomicLong counter = new AtomicLong();

    @RequestMapping("/greeting")
    public Greeting greeting(@RequestParam(value = "name", defaultValue = "World")String name) {
        return new Greeting(counter.incrementAndGet(), String.format(template, name));
    }
}

My Resource Representation class

public class Greeting {
    private final long id;
    private final String content;

    public Greeting(long id, String content) {
        this.id = id;
        this.content = content;
    }

    public long getId() {
        return id;
    }

    public String getContent() {
        return content;
    }
}

My Main

@SpringBootApplication
public class Application
{
    public static void main(String[] args)
    {
        SpringApplication.run(Application.class, args);
    }
}

My POM file

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.organization_name.webservices</groupId>
<artifactId>helloworld</artifactId>
<version>1.0-SNAPSHOT</version>

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.3.3.RELEASE</version>
</parent>

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
</dependencies>

<properties>
    <java.version>1.8</java.version>
</properties>


<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>
    </plugins>
</build>

<repositories>
    <repository>
        <id>spring-releases</id>
        <url>https://repo.spring.io/libs-release</url>
    </repository>
</repositories>
<pluginRepositories>
    <pluginRepository>
        <id>spring-releases</id>
        <url>https://repo.spring.io/libs-release</url>
    </pluginRepository>
</pluginRepositories>

Command line to run

mvn spring-boot:run   

My complete log from the console

 .   ____          _            __ _ _
 /\ / ___'_ __ _ _(_)_ __  __ _    
( ( )___ | '_ | '_| | '_ / _` |    
 \/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |___, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v1.3.3.RELEASE)

2016-04-23 20:47:53.153  INFO 7898 --- [           main] c.t.webservices.application.Application  : Starting Application on Macintosh.local with PID 7898 (/Users/<my_user>/Downloads/B04788_Code/HelloWorld/target/classes started by <my_user> in /Users/<my_user>/Downloads/B04788_Code/HelloWorld)
2016-04-23 20:47:53.156  INFO 7898 --- [           main] c.t.webservices.application.Application  : No active profile set, falling back to default profiles: default
2016-04-23 20:47:53.242  INFO 7898 --- [           main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@68ceda24: startup date [Sat Apr 23 20:47:53 PDT 2016]; root of context hierarchy
2016-04-23 20:47:54.084  INFO 7898 --- [           main] o.s.b.f.s.DefaultListableBeanFactory     : Overriding bean definition for bean 'beanNameViewResolver' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfigure.web.ErrorMvcAutoConfiguration$WhitelabelErrorViewConfiguration; factoryMethodName=beanNameViewResolver; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/web/ErrorMvcAutoConfiguration$WhitelabelErrorViewConfiguration.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter; factoryMethodName=beanNameViewResolver; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter.class]]
2016-04-23 20:47:54.811  INFO 7898 --- [           main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8080 (http)
2016-04-23 20:47:54.840  INFO 7898 --- [           main] o.apache.catalina.core.StandardService   : Starting service Tomcat
2016-04-23 20:47:54.841  INFO 7898 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/8.0.32
2016-04-23 20:47:54.960  INFO 7898 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2016-04-23 20:47:54.960  INFO 7898 --- [ost-startStop-1] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 1736 ms
2016-04-23 20:47:55.214  INFO 7898 --- [ost-startStop-1] o.s.b.c.e.ServletRegistrationBean        : Mapping servlet: 'dispatcherServlet' to [/]
2016-04-23 20:47:55.218  INFO 7898 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean  : Mapping filter: 'characterEncodingFilter' to: [/*]
2016-04-23 20:47:55.219  INFO 7898 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean  : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2016-04-23 20:47:55.219  INFO 7898 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean  : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2016-04-23 20:47:55.219  INFO 7898 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean  : Mapping filter: 'requestContextFilter' to: [/*]
2016-04-23 20:47:55.545  INFO 7898 --- [           main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@68ceda24: startup date [Sat Apr 23 20:47:53 PDT 2016]; root of context hierarchy
2016-04-23 20:47:55.605  INFO 7898 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2016-04-23 20:47:55.606  INFO 7898 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2016-04-23 20:47:55.628  INFO 7898 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2016-04-23 20:47:55.628  INFO 7898 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2016-04-23 20:47:55.657  INFO 7898 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2016-04-23 20:47:55.776  INFO 7898 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2016-04-23 20:47:55.848  INFO 7898 --- [           main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8080 (http)
2016-04-23 20:47:55.853  INFO 7898 --- [           main] c.t.webservices.application.Application  : Started Application in 3.531 seconds (JVM running for 4.702)
2016-04-23 20:48:19.521  INFO 7898 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring FrameworkServlet 'dispatcherServlet'
2016-04-23 20:48:19.521  INFO 7898 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet        : FrameworkServlet 'dispatcherServlet': initialization started
2016-04-23 20:48:19.533  INFO 7898 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet        : FrameworkServlet 'dispatcherServlet': initialization completed in 12 ms

Console update after GET request

2016-04-23 20:48:19.521  INFO 7898 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet        : FrameworkServlet 'dispatcherServlet': initialization started
2016-04-23 20:48:19.533  INFO 7898 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet        : FrameworkServlet 'dispatcherServlet': initialization completed in 12 ms

Console after stopping

2016-04-23 20:53:24.494  INFO 7898 --- [       Thread-2] ationConfigEmbeddedWebApplicationContext : Closing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@68ceda24: startup date [Sat Apr 23 20:47:53 PDT 2016]; root of context hierarchy
2016-04-23 20:53:24.495  INFO 7898 --- [       Thread-2] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans on shutdown

Process finished with exit code 130

Thanks again for any help you can offer. I will keep everyone posted with updates!

When a restful web service call is made to a Spring Boot MVC application, It shows error “Whitelabel Error Page – There was an unexpected error (type=Internal Server Error, status=500).” in the browser. The Internal Server Error is a popular error in spring boot application if a server side error occurs and is not in position to server the request.

A RuntimeException such as NullPointerException will be thrown in the controller class from the server side. The unexpected error causes Internal Server Error in the spring boot application.

Whitelabel Error Page

This application has no explicit mapping for /error, so you are seeing this as a fallback.

Fri Jan 31 18:12:15 IST 2020
There was an unexpected error (type=Internal Server Error, status=500).
No message available
2020-01-31 18:12:15.311 ERROR 39501 --- [nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root cause

java.lang.NullPointerException: null
	at com.yawintutor.TestController.postLogin(TestController.java:65) ~[classes/:na]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_101]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_101]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_101]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_101]
	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190) ~[spring-web-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138) ~[spring-web-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106) ~[spring-webmvc-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:888) ~[spring-webmvc-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:793) ~[spring-webmvc-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040) ~[spring-webmvc-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943) ~[spring-webmvc-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) ~[spring-webmvc-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909) ~[spring-webmvc-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:660) ~[tomcat-embed-core-9.0.30.jar:9.0.30]
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) ~[spring-webmvc-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) ~[tomcat-embed-core-9.0.30.jar:9.0.30]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[tomcat-embed-core-9.0.30.jar:9.0.30]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.30.jar:9.0.30]
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-embed-websocket-9.0.30.jar:9.0.30]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.30.jar:9.0.30]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.30.jar:9.0.30]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:320) ~[spring-security-web-5.2.1.RELEASE.jar:5.2.1.RELEASE]
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:118) ~[spring-security-web-5.2.1.RELEASE.jar:5.2.1.RELEASE]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.2.1.RELEASE.jar:5.2.1.RELEASE]
	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137) ~[spring-security-web-5.2.1.RELEASE.jar:5.2.1.RELEASE]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.2.1.RELEASE.jar:5.2.1.RELEASE]
	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111) ~[spring-security-web-5.2.1.RELEASE.jar:5.2.1.RELEASE]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.2.1.RELEASE.jar:5.2.1.RELEASE]
	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:158) ~[spring-security-web-5.2.1.RELEASE.jar:5.2.1.RELEASE]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.2.1.RELEASE.jar:5.2.1.RELEASE]
	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63) ~[spring-security-web-5.2.1.RELEASE.jar:5.2.1.RELEASE]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.2.1.RELEASE.jar:5.2.1.RELEASE]
	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116) ~[spring-security-web-5.2.1.RELEASE.jar:5.2.1.RELEASE]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.2.1.RELEASE.jar:5.2.1.RELEASE]
	at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:92) ~[spring-security-web-5.2.1.RELEASE.jar:5.2.1.RELEASE]
	at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:77) ~[spring-security-web-5.2.1.RELEASE.jar:5.2.1.RELEASE]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.2.1.RELEASE.jar:5.2.1.RELEASE]
	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105) ~[spring-security-web-5.2.1.RELEASE.jar:5.2.1.RELEASE]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.2.1.RELEASE.jar:5.2.1.RELEASE]
	at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56) ~[spring-security-web-5.2.1.RELEASE.jar:5.2.1.RELEASE]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.2.1.RELEASE.jar:5.2.1.RELEASE]
	at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215) ~[spring-security-web-5.2.1.RELEASE.jar:5.2.1.RELEASE]
	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178) ~[spring-security-web-5.2.1.RELEASE.jar:5.2.1.RELEASE]
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:358) ~[spring-web-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:271) ~[spring-web-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.30.jar:9.0.30]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.30.jar:9.0.30]
	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.30.jar:9.0.30]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.30.jar:9.0.30]
	at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.30.jar:9.0.30]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.30.jar:9.0.30]
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.30.jar:9.0.30]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.30.jar:9.0.30]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) ~[tomcat-embed-core-9.0.30.jar:9.0.30]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [tomcat-embed-core-9.0.30.jar:9.0.30]
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541) [tomcat-embed-core-9.0.30.jar:9.0.30]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) [tomcat-embed-core-9.0.30.jar:9.0.30]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [tomcat-embed-core-9.0.30.jar:9.0.30]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) [tomcat-embed-core-9.0.30.jar:9.0.30]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) [tomcat-embed-core-9.0.30.jar:9.0.30]
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:367) [tomcat-embed-core-9.0.30.jar:9.0.30]
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) [tomcat-embed-core-9.0.30.jar:9.0.30]
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:860) [tomcat-embed-core-9.0.30.jar:9.0.30]
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1598) [tomcat-embed-core-9.0.30.jar:9.0.30]
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-9.0.30.jar:9.0.30]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_101]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_101]
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-9.0.30.jar:9.0.30]
	at java.lang.Thread.run(Thread.java:745) [na:1.8.0_101]

Root Cause

The controller class is responsible for processing the request from the client. In controller class, the request is processed and the response is sent back to the user. The Json request is processed in RestController class in the restful web service and sends Json response to the so called application.

In some cases the controller class will not process the request because of some code bug or data issue. Instead, a Runtime Exception is thrown. The request to the calling application can not be servered. The internal server error created with http error code is 500, in this case. 

How to reproduce this issue

Create a controller class in the Spring boot mvc application. Throw a Runtime Exception from the controller class method. If a call is made to the method, then the exception will be thrown. The example below will throw a NullPointerException from the postLogin method. This will create the Internal Server Error.

package com.yawintutor;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping
public class TestController {
	@RequestMapping(value = "/login", method = RequestMethod.POST)
	public @ResponseBody String postLogin(String user) {
		String userName = user.trim();
		return userName;
	}
}

Solution

Check the controller class method and find any logical error such as data issue, data missing, invalid data. Make sure that the controller method returns a correct response. If required, add a null check or add try catch block.

package com.yawintutor;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping
public class TestController {
	@RequestMapping(value = "/login", method = RequestMethod.POST)
	public @ResponseBody String postLogin(String user) {
		String userName = null;
		if(user !=null) {
		   userName = user.trim();
		}
		return userName;
	}
}

Download PC Repair Tool to quickly find & fix Windows errors automatically

In this post, we show you how to fix System Restore Error Code 0x81000203. Some reports mention that Windows users are facing error code 0x81000203while performing a System Restore. This error is caused due to multiple factors like intervention from third-party software, lack of supporting services running on the computer and more.

Fix System Restore Error Code 0x81000203 on Windows 10

There was an unexpected error in the property page, System Restore encountered an error, Please try to run System Restore again. (0x81000203), Please close the property page and try again.

This error can also occur after the installation of various Windows Updates.

There was an unexpected error in the property page (0x81000203)

If you receive There was an unexpected error in the property page (0x81000203) message, then the following suggestions will help you fix the problem on Windows 10:

  1. Manually start the required Service.
  2. Use Windows Command Prompt.
  3. Reset the Repository.
  4. Uninstall third-party conflicting software.
  5. Run System Restore in Safe Mode or Clean Boot State.

1] Manually start the required Service

Open the Windows Services Manager.

Locate the Volume Shadow Copy service.

Make sure that the service is running.

Also, the Startup Type should be set to be Automatic.

The Task Scheduler & Microsoft Software Shadow Copy Provider Service should also be started and set to Automatic.

2] Use Windows Command Prompt

Open the Windows 10 Command Prompt and execute the following commands in the given order:

reg delete “HKLM\SOFTWARE\Policies\Microsoft\Windows NT\SystemRestore” /v “DisableSR” /f

reg delete “HKLM\SOFTWARE\Policies\Microsoft\Windows NT\SystemRestore” /v “DisableConfig” /f

reg add “HKLM\Software\Microsoft\Windows NT\CurrentVersion\SPP\Clients” /v ” {09F7EDC5-294E-4180-AF6A-FB0E6A0E9513}” /t REG_MULTI_SZ /d “1” /f

schtasks /Change /TN “Microsoft\Windows\SystemRestore\SR” /Enable

vssadmin Resize ShadowStorage /For=C: /On=C: /Maxsize=25GB

sc config wbengine start= demand

sc config swprv start= demand

sc config vds start= demand

sc config VSS start= demand

Restart the system and try now.

3] Reset the Repository

To do so follows these steps:

  1. Boot into Safe Mode without networking and open a command prompt as administrator.
  2. Now Type net stop winmgmt and hit Enter.
  3. This will stop the Windows Management Instrumentation Service
  4. Next go to C:WindowsSystem32wbem
  5. Rename the repository folder to repositoryold
  6. Restart.

Again open a command prompt as administrator, type the following and hit Enter:

net stop winmgmt

Next, type the following and hit Enter:

winmgmt /resetRepository

Restart and see if you can create a System Restore Point manually.

4] Uninstall third-party conflicting software

In the Windows Search box in the Start menu, type in appwiz.cpl and hit Enter.

This will open the Uninstall a program Control Panel applet.

Right-click on the TuneUp Utilities entry and select Uninstall. This has been known to cause conflicts.

Reboot your computer.

5] Run System Restore in Safe Mode or Clean Boot State

Boot into Safe Mode and see if you create a system restore point or restore to a prior restore point. Many times, non-Microsoft services or Drivers can interfere with the proper functioning of System Restore. Alternatively, you could also execute a Clean Boot and see if you are able to get system restore working.

All the best!

Ayush has been a Windows enthusiast since the day he got his first PC with Windows 98SE. He is an active Windows Insider since Day 1 and has been a Windows Insider MVP.

Playing springboot is a difficult journey. I have encountered a problem of not being able to find the page in the past two days. It can be said that it took me a lot of effort to find it, but I hated my carelessness. Let me share with you a solution to the error problem below. In fact, this problem contains two sub-problems. First look at the two pages below:

I believe you often see the above two problems, but the above are caused by two completely different problems.

Let me talk about the problem that the first picture cannot find the page. This problem may be caused by multiple reasons:

  1. ApplicationThe location of the startup class is wrong. The Application class should be placed on the outermost side, that is, it contains all sub-packages.
    Reason: spring-boot will automatically load all components under the package where the startup class is located and its sub-packages.
  2. In the configuration file of springboot: application.yml or application.properties about the configuration of the view resolver:
    When the spring-boot-starter-paren version under the pom file is high:
    spring.mvc.view.prefix/spring.mvc.view.suffix 
    When the spring-boot-starter-paren version under the pom file is low:
    spring.view.prefix / spring.view.suffix I feel that this is not the main reason, but I have not encountered a scenario that uses this method to solve this problem.
  3. Controller URL path writing problem
    @RequestMapping(“xxxxxxxxxxxxxx”) 
    The actual access path does not match «xxx». This is less common. Unless you are really sloppy.

It’s that you put WEB-INF directly under the main directory without creating a webapp directory, (this is the mistake I made)

The error in the second picture is actually very simple:

Need to add in the pom file:

<dependency>
			<groupId>org.apache.tomcat.embed</groupId>
			<artifactId>tomcat-embed-jasper</artifactId>
			<scope>provided</scope>
		</dependency>

The reason:

Everyone who has used Springboot knows that it has built-in tomcat (spring-boot-starter-web), and it does not need to be war packaged, and it is directly run as a jar package. Recently I learned to use Springboot to find that the pom file in the project introduced tomcat-embed-jasper (depends on jsp support) but the scope isprovided。

So I didn’t understand that springboot’s tomcat should bring its own tomcat-embed-jasper, so delete the dependency of the pom file, the eclipse startup project has no errors, and the access page found that all jsp pages will be downloaded and cannot be accessed. But another problem that puzzles me is that its dependency on scope isprovidedThat is to say, this dependency will not be included in the lib package when packaging, but the page access started by my jar is no problem.

The above illustrates a problem:The tomcat that comes with springboot does not carry the tomcat-embed-jasper dependency

Another experiment was done: after removing the scope of tomcat-embed-jasper, it was packaged as a jar package and an error was reported when starting the project ==>Jasper’s jar package conflict

Concluding guess: After checking the pom file, the guess must bespring-boot-maven-plugin(1.4.2.RELEASE)The plugin automatically adds tomcat-embed-jasper support when packaging. And we did not package when we started the project in the tool, so we need to rely on the support of the jsp project in our eclipse. To prevent its packaging conflicts, we set it upscopeforprovided。

Finally, share the content about application.properties and application.yml files:

# applicatioin.properties is as follows

spring.mvc.view.prefix=/WEB-INF/views/jsp/
spring.mvc.view.suffix=.jsp
server.port=9990


 # application.yml file content is as follows:
spring:
 mvc:
  view:
   prefix : /WEB-INF/jsp/
   suffix : .jsp
server:
    port: 9990


 ## There are two files on the top. Choose one of the two. The directories are all placed under src / main / resources. Be sure to pay attention to the file name

I believe the above two points will definitely help you, and I hope you can give a compliment and encouragement after you see it. If you do n’t dislike, add more attention. Share more springboot related issues later.

Понравилась статья? Поделить с друзьями:
  • Ошибка the type initializer for module threw an exception
  • Ошибка there was an error while installing the application
  • Ошибка the system is low on memory
  • Ошибка there was an error loading script
  • Ошибка the system found unauthorized