Tag Archives: ProgrammerAH

13.2 spring boot start error: whitelabel error page

13.2 Spring Boot Boot Error: Whitelabel Error Page
Problem description

Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Tue Mar 28 22:25:43 CST 2017
There was an unexpected error (type=Internal Server Error, status=500).
Circular view path [login]: would dispatch back to the current handler URL [/login] again. Check your ViewResolver setup! (Hint: This may be the result of an unspecified view, due to default view name generation.)

Cause analysis,
First, the error page is the default error page for SpringBoot. Source in: org. Springframework. Boot. Autoconfigure. Web. Servlet. Error. ErrorMvcAutoConfiguration line 151.
This error is usually caused by a configuration error, or an MVC error.
The solution
Properly configure the named presuffix of the template file in the Application.properties file:

spring.mvc.view.prefix=/WEB-INF/jsp/
spring.mvc.view.suffix=.jsp

In addition, in earlier versions of Springboot, MVC was not included in the key.

spring.view.prefix: /WEB-INF/jsp/
spring.view.suffix: .jsp

This configuration is version 1.1 after class, in the org. Springframework. Boot. Autoconfigure. Web. Servlet. WebMvcProperties class. The above annotation @ConfigurationProperties(prefix = “spring.MVC “) indicates the key.
Accordingly, the template files should be placed in the correct directory. For the above configuration, the corresponding directory can be:

/src/main/webapp/WEB-INF/jsp/
/src/main/resources/META-INF/resources/WEB-INF/jsp

The default directory for common SpringBoot template files is as follows:

# THYMELEAF (ThymeleafAutoConfiguration)
spring.thymeleaf.cache=true # Enable template caching.
spring.thymeleaf.check-template=true # Check that the template exists before rendering it.
spring.thymeleaf.check-template-location=true # Check that the templates location exists.
spring.thymeleaf.enabled=true # Enable Thymeleaf view resolution for Web frameworks.
spring.thymeleaf.encoding=UTF-8 # Template files encoding.
spring.thymeleaf.excluded-view-names= # Comma-separated list of view names that should be excluded from resolution.
spring.thymeleaf.mode=HTML5 # Template mode to be applied to templates. See also StandardTemplateModeHandlers.
spring.thymeleaf.prefix=classpath:/templates/ # Prefix that gets prepended to view names when building a URL.
spring.thymeleaf.reactive.max-chunk-size= # Maximum size of data buffers used for writing to the response, in bytes.
spring.thymeleaf.reactive.media-types=text/html # Media types supported by the view technology.
spring.thymeleaf.servlet.content-type=text/html # Content-Type value written to HTTP responses.
spring.thymeleaf.suffix=.html # Suffix that gets appended to view names when building a URL.
spring.thymeleaf.template-resolver-order= # Order of the template resolver in the chain.
spring.thymeleaf.view-names= # Comma-separated list of view names that can be resolved.


# FREEMARKER (FreeMarkerAutoConfiguration)
spring.freemarker.allow-request-override=false # Set whether HttpServletRequest attributes are allowed to override (hide) controller generated model attributes of the same name.
spring.freemarker.allow-session-override=false # Set whether HttpSession attributes are allowed to override (hide) controller generated model attributes of the same name.
spring.freemarker.cache=false # Enable template caching.
spring.freemarker.charset=UTF-8 # Template encoding.
spring.freemarker.check-template-location=true # Check that the templates location exists.
spring.freemarker.content-type=text/html # Content-Type value.
spring.freemarker.enabled=true # Enable MVC view resolution for this technology.
spring.freemarker.expose-request-attributes=false # Set whether all request attributes should be added to the model prior to merging with the template.
spring.freemarker.expose-session-attributes=false # Set whether all HttpSession attributes should be added to the model prior to merging with the template.
spring.freemarker.expose-spring-macro-helpers=true # Set whether to expose a RequestContext for use by Spring's macro library, under the name "springMacroRequestContext".
spring.freemarker.prefer-file-system-access=true # Prefer file system access for template loading. File system access enables hot detection of template changes.
spring.freemarker.prefix= # Prefix that gets prepended to view names when building a URL.
spring.freemarker.request-context-attribute= # Name of the RequestContext attribute for all views.
spring.freemarker.settings.*= # Well-known FreeMarker keys which will be passed to FreeMarker's Configuration.
spring.freemarker.suffix= # Suffix that gets appended to view names when building a URL.
spring.freemarker.template-loader-path=classpath:/templates/ # Comma-separated list of template paths.
spring.freemarker.view-names= # White list of view names that can be resolved.

# GROOVY TEMPLATES (GroovyTemplateAutoConfiguration)
spring.groovy.template.allow-request-override=false # Set whether HttpServletRequest attributes are allowed to override (hide) controller generated model attributes of the same name.
spring.groovy.template.allow-session-override=false # Set whether HttpSession attributes are allowed to override (hide) controller generated model attributes of the same name.
spring.groovy.template.cache= # Enable template caching.
spring.groovy.template.charset=UTF-8 # Template encoding.
spring.groovy.template.check-template-location=true # Check that the templates location exists.
spring.groovy.template.configuration.*= # See GroovyMarkupConfigurer
spring.groovy.template.content-type=test/html # Content-Type value.
spring.groovy.template.enabled=true # Enable MVC view resolution for this technology.
spring.groovy.template.expose-request-attributes=false # Set whether all request attributes should be added to the model prior to merging with the template.
spring.groovy.template.expose-session-attributes=false # Set whether all HttpSession attributes should be added to the model prior to merging with the template.
spring.groovy.template.expose-spring-macro-helpers=true # Set whether to expose a RequestContext for use by Spring's macro library, under the name "springMacroRequestContext".
spring.groovy.template.prefix= # Prefix that gets prepended to view names when building a URL.
spring.groovy.template.request-context-attribute= # Name of the RequestContext attribute for all views.
spring.groovy.template.resource-loader-path=classpath:/templates/ # Template path.
spring.groovy.template.suffix=.tpl # Suffix that gets appended to view names when building a URL.
spring.groovy.template.view-names= # White list of view names that can be resolved.


Java prompt unmappable character for encoding solution

We Java developers may often encounter unmappable Character for Encoding errors. The reason for this error is that the source code contains characters not included in the GBK encoding. The solution: The source code contains characters not included in the GBK encoding.

• delete the character
• save the source code file as utf-8 encoding

unmappable character for encoding error. However, after looking it up on the Internet, we know that the class file of Java USES utf-8 encoding. Test2.java is compiled to Test2.class, including the utF-8 encoding conversion process.

solution

0

1

2

copy code copy code
compile javac-encoding GBK test2. Java runs java-dfile.encoding = “GBK” test2

3

The remote server returned an error: notfound when Silverlight calls WCF service

At The beginning of development, an exception like “The Remote Server returned an Error: NotFound.” was encountered.
The first time was because the service address was incorrectly filled in, that is, the wrong URI parameter was passed in when the EndpointAddress was created in Silverlight Application, and the exception disappeared when the correct modification was made.
But the exception was encountered again soon, and the address was found to be correct after checking. Also, the service method cannot be called correctly using the WcfTestClient tool. Therefore, the server was debugged, and it was found that abnormalities occurred in the running process of the server. The specific reason was that the Web.congfig of the server accidentally deleted the connectionString during re-editing, thus resulting in the exception of empty reference. But somehow, this error turns into a NotFound error on the client side?

Reproduced in: https://www.cnblogs.com/Gildor/archive/2009/12/17/1626059.html

CreateProcess error 206 The filename or extension is too lo

               
Mule Studio startup Error: Java.io.IOException: Cannot Run program “E:\2000\Java\JDKUpdate\bin\ Javaw.exe “(in directory “E:\BCS_SLN\BCS\DeveloperSource\ Congou-Runtium-ESB “): CreateProcess error = 206, ļ I lay down Au » o չ Au

Native environment: Chinese version of Windows 8 Enterprise X64, Java JDK version 1.6.0.35, Mule Studio 3.2.1 CE (integrated with Eclipse 3.6 Sp1)
I began to suspect that Mule environment had made a mistake and took the following measures:
1, delete.Mule folder, delete. Metadata folder, rebuild workspace, all invalid.
2. Delete THE JDK and reinstall it, restart the machine, and the failure remains the same.
3. Delete THE JDK and reinstall the 64-bit JDK, restart the machine, and the failure remains the same.
4. Modified Mule Studio workspace encoding to UTF-8,GBK,ISO-8859-1, and the error remains the same.
Google, see an article that says: “CreateProcess error=206, The filename or extension is too long.” That’s what the code meant. My God!
In this article
http://support.microsoft.com/kb/830473/en-us
“There is a limit to the length of a string supported on the Windows command line,” the article says. “On a computer running Microsoft Windows XP or later, the maximum length of a string that can be used at the command prompt is 8,191 characters. On a computer running Microsoft Windows 2000 or Windows NT 4.0, the maximum length of a string that can be used at a command prompt is 2047 characters.
Solution:
(1) Use shorter names for folders and files.
(2) Reduce the depth of folder trees.
(3) Store files in quantities so that fewer folders are required in the PATH environment Variable.
(4) Investigate possible methods that you can use to reduce the dependency of PATH for locating. DLL files
In other words, under Windows, the shell directive’s length limit results in the parameter string following JAVAW (in this case,
with the prefix E:\BCS_SLN\BCS\DeveloperSource\mule\congou- rung-esb loading each JAR) having a total length of more than 8191, resulting in truncation, reported above error.
Someone wrote example verification, http://www.cnblogs.com/aigongsi/archive/2012/04/11/2442774.html
Therefore, the path of modification project is E:\ Mule \ Congou – Runtime-ESB, and the problem is solved!

Note: The copyright of this article is jointly owned by Yueyue and CSDN. Please indicate the source for reprinting.
helping others equals self-help! 3 [email protected]

How To Fix Windows Java Error 1723

Just recently I experienced a problem with both installing or uninstalling Java (the JRE) on a Windows 2003 system. I had to research this quite a bit and there were no clear answers anywhere, so I though I’d post here on how I was able to fix it. In my case, I was using Windows Server 2003 64-bit, but this should apply to other Windows versions as well.
The error I was getting was as follows:
“Error 1723. There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor.”
This error is caused when you delete the JRE directory without running the uninstallation program. The reason this causes a problem is due to the registry entries that the installer creates when the JRE is installed. There is a DLL that the installer uses to make (and remove during an uninstall) the registry entries. Without this DLL, both the install and the uninstall will fail. This error may also prevent you from installing updated versions of the JRE to your system – which is a security risk.
You can find the path to the DLL that the installer (or uninstaller) is looking for in your Application log. You can get to your Application log (at least on a Windows Server 2003 system) by going to Start – Administrative Tools – Event Viewer, and then selecting Application from the list on the left.
Once you’re looking at the Application log, find the error message generated from the “MSI Installer” (It’s probably the most recent error there if you just encountered the error.) and bring it up. In the “Description” text area, you should be able to see where the installer or uninstaller was looking for the DLL file it needs. This is important because it will tell you how to fix it.

The FIX:
The Fix for this is to give the uninstaller what it wants, and replace the deleted DLL files with ones that can be used by the install/uninstall process to edit the registry, etc. For convenience, I’ve uploaded a bin zip file that can be used for this purpose.
DOWNLOAD: => bin. zip  (md5: b2594fa66d12a9e8fafb0a1ba3ca555f)
In my case above, you can see where I installed the JRE to the desktop (and then probably deleted it to remove the clutter). Only later, when I tried to install a new version, did it become a problem. So, I downloaded the above zip file, extracted it to my desktop, created a “jdk” directory and moved the “bin” folder inside it, then ran the uninstaller again. I got a few more errors about other files that couldn’t be found, but the uninstaller worked and I was able to install an updated version like I wanted to afterwards.
So… the next time you install the JRE or JDK, remember that you can’t delete it by hand without problems!
Hope this helps!
-Jordan

Yum installation error Error:Nothing to Do

Error message

No package nginx available
Error:Nothing to do


solution:
method one,
replacement source
backup

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

CentOS 7

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

Run Yum Makecache to generate the cache
Method 2:
use EPEL to install nginx:
sudo yum install epel-release
yum update
yum install nginx

C++ vector find error: no matching function for call to ‘find(std::vector::iterator, std::v

 
Using the find method to find elements in the vector, I found a strange problem.

When I independently verified the find function myself, I found that there was no problem. It’s weird going into this code.
/ home// XXX XXX. CPP: 163:63: error: no matching function for the call to ‘find (STD: : vector< int> ::iterator, std::vector< int> ::ite
rator, __gnu_cxx::__alloc_traits< std::allocator< int> > ::value_type&) ‘
it = find (tQubits. The begin (), tQubits. The end (), AllQubits [I]);
^
In the file included the from/usr/include/c + +/6/bits/locale_facets. H: 48:0,
the from The/usr/include/c + +/6/bits/basic_ios. H: 37,
the from/usr/include/c + +/6/ios: 44,
the from/usr/include/c + +/6/cost: 38,
the from/usr/include/c + +/6/fstream: 38,
the from/home/FDD/Quantum_simulator shor_factoring/core/QCore. H: 11,
the from /home/fdd/Quantum_simulator/shor_factoring/core/QCore.cpp:8:
/usr/include/c++/6/bits/streambuf_iterator.h:369:5: note: candidate: template< class _CharT2> typename __gnu_cxx::__enable_if< std::__is_char< _CharT2> ::__value, st
d::istreambuf_iterator< _CharT> > ::__type std::find(std::istreambuf_iterator< _CharT> , std::istreambuf_iterator< _CharT> , const _CharT2&)
the find (istreambuf_iterator & lt; _CharT> __first,
^ ~ ~ ~
/usr/include/c + +/6/bits/streambuf_iterator. H: 369-5: note: the template argument deduction/substitution failed:
/home// XXX XXX. CPP: 163-63: Note: ‘__gnu_cxx: : __normal_iterator & lt; int*, std::vector< int> > “Is not derived from ‘STD ::istre
ambuf_iterator< _CharT> ‘
it = find (tQubits. The begin (), tQubits. The end (), AllQubits [I]);
^
It took a long time, but I finally found a solution on a foreign website. The find function needs a header file containing the algorithm…
Add a line #include< algorithm> That’s it!
So I have to write a note, hoping to be helpful to future generations!

Error syncing pod, skipping: failed to “StartContainer” for “POD” with Image

When creating Kubernetes-DashboardPod, it is found that kubernetes-DashboardPod can be successfully created, but when viewing the status of pod, it is not found, and the running of pod is not found from node node. After the screening process, it was found that pod- Infrastructure image download failed, causing POD startup failure.
Pod -infrastructure image download configuration
open /etc/kubernetes/kubelet configuration file.
vim /etc/kubernetes/kubelet
1
###
# kubernetes kubelet (minion) config
# The address for The info server to serve on (set to 0.0.0.0 or “for all interfaces)
KUBELET_ADDRESS=”–address=0.0.0.0″
# The port for the info server to serve on
# KUBELET_PORT=”–port=10250″
# You may leave this blank to use the actual hostname
KUBELET_HOSTNAME=”–hostname-override=10.0.11.150″
# location of the api-server
KUBELET_API_SERVER=”–api-servers=http://10.0.11.150:8080″
# pod proceeds the container
KUBELET_POD_INFRA_CONTAINER = “- pod – infra – container – image = 10.0.11.150:5000/rhel7/pod – infrastructure: v1.0.0”
# Add your own!
KUBELET_ARGS=””

the configuration item information for the kubelet configuration file is shown above. Where the KUBELET_POD_INFRA_CONTAINER configuration item connotes the address at which the pod- Infrastructure image is downloaded. The original configuration address is:
KUBELET_POD_INFRA_CONTAINER = “– pod-infra-container-image=registry.access.redhat.com/rhel7/pod-infrastructure:latest”

1 through test, found that the domestic is unable to download the to pod – proceeds the mirror… .
The solution
first, you can first configure the local Docker and use image acceleration.
Then the image file that can be downloaded is found through Docker search Pod – Infrastructure
docker search pod-infrastructure
The INDEX NAME DESCRIPTION STARS OFFICIAL AUTOMATED
docker. IO Docker. IO/openshift origin – pod The pod proceeds image for openshift 3 5
docker. IO docker. IO/infrastructureascode/aws – cli Containerized AWS CLI on alpine to avoid r… 3 [OK]
docker. IO docker. IO/newrelic/infrastructure Public image for New Relic proceeds.
3 docker. IO Docker. IO/infrastructureascode uwsgi uwsgi application server 2 [OK]
docker. IO docker. IO/manageiq/manageiq – the pods OpenShift based images for manageiq. 2 [OK]
docker.io docker.io/podigg/podigg-lc-hobbit A hobbit dataset The generator wrapper for PoDiGG 1 [OK]
docker. IO docker. IO/tianyebj/pod – infrastructure registry.access.redhat.com/rhel7/pod-infra… 1
docker. IO docker. IO/w564791/pod – infrastructure latest 1

to find the image file, you want The image is then downloaded locally through the docker pull command.
Then mirror pod-Infrastructure into the local private library and modify the KUBELET_POD_INFRA_CONTAINER configuration item in the Kubelet configuration file:
KUBELET_POD_INFRA_CONTAINER = “- pod – infra – container – image = 10.0.11.150:5000/rhel7/pod – infrastructure: v1.0.0”

among them 1, 10.0.11.150 private library, is one of my local docker rhel7/pod – infrastructure is my a mirror image of the name, kept in a private library v1.0.0 is saved version.
Finally, restart the cluster:
Master node restart command:
For SERVICES in kube-apiserver Kube-Controller-Manager Kube-scheduler; Do
systemctl restart $SERVICES
done

Node restart command:
Systemctl restart kubelet
1
note: Master Node and Node Node both make this change.
— — — — — — — — — — — — — — — — — — — — —
the author: _silent YanQin
source: CSDN
,
https://blog.csdn.net/A632189007/article/details/78730903 copyright statement: this article original articles for bloggers, reproduced please attach link to blog!

LinkIssue: Error ‘LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or cor

The following error may occur in compiling the link with VisualStudio:
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
The following solutions are available online:
1. Disable incremental linking
 

Project Properties  -> Configuration Properties  -> Linker (General)  -> Enable Incremental Linking -> "No (/INCREMENTAL:NO)"

2. Turn off “Embed Manifest”
 
 
But neither method worked for me.
Issue root cause: In a system update or software upgrade, there is more than one version of the Utility: Cvtres.exe
D:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cvtres.exe
C:\Windows\Microsoft.NET \ Framework \ v4.0.30319 \ cvtres exe


Cvtres. exe in VS directory is not in work due to improper cause of . If the Utinity is in front of the path and linker feels the need to convert a.res file to COFF object format,link will fail, showing error: LNK1123

: delete or rename the old Utility cvtres.exe to cvtres.exe_old for VS. Or rearrange the PATH variable.

reference :

http://stackoverflow.com/questions/10888391/error-link-fatal-error-lnk1123-failure-during-conversion-to-coff-file-inval
-------------------
 
About Error: LNK1123: Failure during conversion to COFF: File invalid or corrupt error solution [Qt] [VS2010]
 
VS2010 Qt development tools have had to be reinstalled due to a new hard drive. There is no problem with the installation process. After installation, I clicked on an example to test it and it did not work well. Then the error message in the title appeared. I had dealt with it once before, but I forgot it after a long time, so I solved it by another search. This time grow a heart eye, write down, lest later forget again (write blog essay of what not stick to, have to despise oneself).


 
Let's get started. The prompt indicates that the conversion to the COFF file failed because of an error (VS2010 is installed and there would normally be no file invalid).
Cvtres.exe is the program that does the conversion. The root cause of the above error is the presence of multiple versions of CVtres.exe on the system.
\Windows\Microsoft \Framework\v4.0.30319\cvtres.exe

VS directory version :C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cvtres.exe
if it is a 64-bit system, then there is another one in c: \Windows\Microsoft t.net \Framework64\v4.0.30319\cvtres.exe
, however, both versions of the Framework and Framework64 are the same, and are generally newer than the version in the VS directory due to system updates.


 

 


 
The solution here is obviously simple, just rename or delete the old version, but I usually do renames, like adding -old.
Another point to make is that when looking for the cvtres.exe program in the system directory, there is an XML file called Cvtres.exe (the blogger does not show the file extension). So don't make a mistake when you look for it.
Well, that's all for this essay. It's not easy to get into the habit of blogging T T, keep up the good work!

Reproduced in: https://www.cnblogs.com/kungfupanda/p/4121059.html