Category Archives: Error

dubbo 2.5.4-SNAPSHOT dubbo-admin [How to Solve]

Error:

RROR context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'uriBrokerService': Cannot create inner bean '(inner bean)' of type [com.alibaba.citrus.service.uribroker.impl.URIBrokerServiceImpl$URIBrokerInfo] while setting bean property 'brokers' with key [0]; nested excepti
on is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#25': Cannot create inner bean 'server' of type [com.alibaba.citrus.service.uribroker.uri.GenericURIBroker] while setting constructor argument; nested exception is org.springframework.beans.fact
ory.BeanCreationException: Error creating bean with name 'server': Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'URIType' of bean class [com.alibaba.citrus.service.uribroker.uri.GenericURIBroker]: Bean property 'URIType'
is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:230)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:122)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:287)


I am using JDK 1.8.0_05, dubbo-admin version is 2.5.4-SNAPSHOT, and I have the same problem. Solutions such as:

1. The dependency of webx is changed to version 3.1.6;

   <dependency>
        <groupId>com.alibaba.citrus</groupId>
        <artifactId>citrus-webx-all</artifactId>
        <version>3.1.6</version>
    </dependency>

 

2. Add the dependency of velocity, I used 1.7;

 <dependency>
        <groupId>org.apache.velocity</groupId>
        <artifactId>velocity</artifactId>
        <version>1.7</version>
    </dependency>

 

3. Add exclusion to the dependency dubbo to avoid introducing the old spring

 <dependency>
        <groupId>com.alibaba</groupId>
        <artifactId>dubbo</artifactId>
        <version>${project.parent.version}</version>
        <exclusions>
            <exclusion>
                <groupId>org.springframework</groupId>
                <artifactId>spring</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

4. webx already has spring 3 or higher dependency, so comment out the spring dependency in dubbo-admin

 <!--<dependency>-->
        <!--<groupId>org.springframework</groupId>-->
        <!--<artifactId>spring</artifactId>-->
    <!--</dependency>-->

 

After decompressing the war package, make sure that the lib directory does not have any dependencies below spring 3. Then it runs normally.

 

5. Dubbo-admin must be placed under the ROOT of TOMCAT, directly delete the system’s own files under the original ROOT, and copy all the files of dubbo-admin into it. The dubbo-admin folder cannot be used. Otherwise, you cannot check if you enter, and an error will be reported.

The pip installation package under Windows reports an error: Microsoft Visual C++ 9.0 is required Unable to find vcvarsall.bat

I just installed pip in the windows environment on the machine to use it later when installing the package. Who knows that the first time I use pip to install asyncio, I get an error.

When using pip installation package under Windows 7×64, it prompts an error: Microsoft Visual C++ 9.0 is required (Unable to find vcvarsall.bat)

Environment: windows7 x64, python2.7, VS2012

The reason: the windows when using pip installation package requires a machine equipped with vs2008, VS2012 does not work, you do not want VS2008 installed, you can install a Micorsoft Visual C ++ Compiler for Python 2.7 packages

[Solved] throw new Error(“‘output.filename’ is required, either in config file or as –output-filename”);

throw new Error(“‘output.filename’ is required, either in config file or as –output-filename”); Why

Reason: module.exports is written as module.export

 

Module build failed: TypeError: loaderContext.getResolve is not a function when configuring the less file

An error will be reported because the version is too high. Manually change the version of less to 3.9.0 and less-loaderl to 5.0.0 in the configuration file, then re-download with npm install, and then npm rub build

[Solved] Error in inherits(x, “theme”): argument “e2” is missing, with no default

Run the code in Rstudio

p<-ggplot(outfile,aes(x = type,y = log2FoldChange))+geom_bar(stat = ' identity ' ,fill = ' #FF9999 ' )+geom_text(label=sig,colour = ' blue ' ,vjust = 1 ,check_overlap = TRUE,size = 7 )
 +theme(axis.text = element_text(size = 14 ))

An error occurred

Error in inherits(x, " theme " ): argument " e2 "  is missing, with no default

This is because the + is at the beginning, and the theme() statement cannot be connected to the previous statement. Just put + at the end of the previous statement

[Solved] Maven log jar package conflict error: Class path contains multiple SLF4J bindings

Error performance:

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/D:/learn/Java/maven/repository_taotao/org/slf4j/slf4j-log4j12/1.6.4/slf4j-log4j12-1.6.4.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/D:/learn/Java/maven/repository_taotao/org/apache/activemq/activemq-all/5.11.2/activemq-all-5.11.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.

The console error is shown in the figure below:

The cause of the error:
a jar package conflict occurred:
respectively:

SLF4J: Found binding in [jar:file:/D:/learn/Java/maven/repository_taotao/org/slf4j/slf4j-log4j12/1.6.4/slf4j-log4j12-1.6.4.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/D:/learn/Java/maven/repository_taotao/org/apache/activemq/activemq-all/5.11.2/activemq-all-5.11.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]

solution:

You can go to pom.xml, open Dependency Hierarchy and find the slf4j entry . Except by right-clicking “exclude maven artifact” to exclude the remaining entries.

Run mvn dependency:tree and search for which dependencies have implementations of slf4j you don’t want, then use dependency exclusion to exclude them, for example:

        <dependency>
            <groupId>org.apache.zookeeper</groupId>
            <artifactId>zookeeper</artifactId>
            <exclusions>
                <exclusion>
                    <artifactId>slf4j-log4j12</artifactId>
                    <groupId>org.slf4j</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.github.sgroschupf</groupId>
            <artifactId>zkclient</artifactId>
        </dependency>
        <!-- Configure dependency jar packages for the ActiveMQ client -->
        <dependency>
            <groupId>org.apache.activemq</groupId>
            <artifactId>activemq-all</artifactId>
        </dependency>
        <dependency>
            <groupId>com.taotao</groupId>
            <artifactId>taotao-common</artifactId>
            <version>0.0.1-SNAPSHOT</version>
            <exclusions>
                <exclusion>
                    <artifactId>slf4j-log4j12</artifactId>
                    <groupId>org.slf4j</groupId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>

 

How to Solve Spring MVC upload file error

Error code:

org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.web.multipart.MultipartFile]: Specified class is an interface 
    org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java: 101 )
    org.springframework.web.bind.annotation.support.HandlerMethodInvoker.resolveModelAttribute(HandlerMethodInvoker.java: 762 )
    org.springframework.web.bind.annotation.support.HandlerMethodInvoker.resolveHandlerArguments(HandlerMethodInvoker.java: 356 )
    org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java: 171 )
    org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java: 426 )
    org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java: 414 )
    org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java: 790 )
    org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java: 719 )
    org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java: 644 )
    org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java: 560 )
    javax.servlet.http.HttpServlet.service(HttpServlet.java: 646 )
    javax.servlet.http.HttpServlet.service(HttpServlet.java: 727 )
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java: 52 )
    org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java: 88 )
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java: 76 )
    org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java: 198 )
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java: 76)

 

Solution: Add @RequestParam in front of the Controller’s MultipartFile parameter to solve it!

[Solved] Error: exception: java.lang.reflect.InvocationTargetException: null

Error background

Java code occasionally reports an error, but it will not report an error under normal circumstances.

Error

exception: java.lang.reflect.InvocationTargetException: null

2020-05-11 at 15:17:39 CST traceId:[] ERROR io.netty.util.internal.logging.AbstractInternalLogger 91 error-Unexpected exception: java.lang.reflect.InvocationTargetException: null 
    at sun.reflect.GeneratedMethodAccessor214. invoke(Unknown Source) ~[?:? ]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: 43) ~[?:1.8 .0_192]
    at java.lang.reflect.Method.invoke(Method.java: 498) ~[?:1.8 .0_192]
    at org.yeauty.pojo.PojoEndpointServer.doOnClose(PojoEndpointServer.java: 121) [netty-websocket-spring-boot-starter-0.8.0.jar!/:? ]
    at org.yeauty.standard.WebSocketServerHandler.channelInactive(WebSocketServerHandler.java: 29) [netty-websocket-spring-boot-starter-0.8.0.jar!/:? ]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java: 257) [netty-all-4.1.38.Final.jar!/:4.1.38 .Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java: 243) [netty-all-4.1.38.Final.jar!/:4.1.38 .Final]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java: 236) [netty-all-4.1.38.Final.jar!/:4.1.38 .Final]
    at io.netty.handler.codec.ByteToMessageDecoder.channelInputClosed(ByteToMessageDecoder.java: 393) [netty-all-4.1.38.Final.jar!/:4.1.38 .Final]
    at io.netty.handler.codec.ByteToMessageDecoder.channelInactive(ByteToMessageDecoder.java: 358) [netty-all-4.1.38.Final.jar!/:4.1.38 .Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java: 257) [netty-all-4.1.38.Final.jar!/:4.1.38 .Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java: 243) [netty-all-4.1.38.Final.jar!/:4.1.38 .Final]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java: 236) [netty-all-4.1.38.Final.jar!/:4.1.38 .Final]
    at io.netty.channel.DefaultChannelPipeline$HeadContext.channelInactive(DefaultChannelPipeline.java: 1416) [netty-all-4.1.38.Final.jar!/:4.1.38 .Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java: 257) [netty-all-4.1.38.Final.jar!/:4.1.38 .Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java: 243) [netty-all-4.1.38.Final.jar!/:4.1.38 .Final]
    at io.netty.channel.DefaultChannelPipeline.fireChannelInactive(DefaultChannelPipeline.java: 912) [netty-all-4.1.38.Final.jar!/:4.1.38 .Final]
    at io.netty.channel.AbstractChannel$AbstractUnsafe$ 8.run(AbstractChannel.java:816) [netty-all-4.1.38.Final.jar!/:4.1.38 .Final]
    at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java: 163) [netty-all-4.1.38.Final.jar!/:4.1.38 .Final]
    at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java: 416) [netty-all-4.1.38.Final.jar!/:4.1.38 .Final]
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java: 515) [netty-all-4.1.38.Final.jar!/:4.1.38 .Final]
    at io.netty.util.concurrent.SingleThreadEventExecutor$ 5.run(SingleThreadEventExecutor.java:918) [netty-all-4.1.38.Final.jar!/:4.1.38 .Final]
    at io.netty.util.internal.ThreadExecutorMap$ 2.run(ThreadExecutorMap.java:74) [netty-all-4.1.38.Final.jar!/:4.1.38 .Final]
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java: 30) [netty-all-4.1.38.Final.jar!/:4.1.38 .Final]
    at java.lang.Thread.run(Thread.java: 748) [?:1.8 .0_192]
Caused by: java.util.ConcurrentModificationException
    at java.util.HashMap$HashIterator.nextNode(HashMap.java: 1445) ~[?:1.8 .0_192]
    at java.util.HashMap$EntryIterator.next(HashMap.java: 1479) ~[?:1.8 .0_192]
    at java.util.HashMap$EntryIterator.next(HashMap.java: 1477) ~[?:1.8 .0_192]
    at com.jcdz.hbdservice.websocket.ServerWebSocket1.onClose(ServerWebSocket1.java: 38) ~[coalminehbdservice-1.0.jar!/:1.0 ]
    ... 25 more

Reason for error

There are many reasons for the error, I will only say the reason I came into contact:

(1) If (==) judgment statement is wrong

if( devMap. getOrDefault ( “locationcode”,”” ) == null )

devMap.get( “locationcode” ) : It is possible that a null is passed, and a null pointer will appear at this time

View the source code of getOrDefault()

1  /** 
2       * Returns the value to which the specified key is mapped, or
 3       * { @code defaultValue} if this map contains no mapping for the key.
 4       *
 5       * @implSpec
 6       * The default implementation makes no guarantees about synchronization
 7       * or atomicity properties of this method. Any implementation providing
 8       * atomicity guarantees must override this method and document its
 9       * concurrency properties.
 10       *
 11       * @param key the key whose associated value is to be returned
12       * @param defaultValue the default mapping of the key
 13       * @return the value to which the specified key is mapped, or
 14       * { @code defaultValue} if this map contains no mapping for the key
 15       * @throws ClassCastException if the key AN of inappropriate type for IS
 16       * the this Map
 . 17       * (<a href="{@%20docroot%20}/java/util/Collection.html#optional-restrictions"> optional </a>)
 18 is       * @throws a NullPointerException IF The specified key is null and this map
 19      * does not permit null keys
 20       * (<a href="{@%20docRoot%20}/java/util/Collection.html#optional-restrictions">optional</a>)
 21       * @since 1.8
 22       */ 
23      default V getOrDefault (Object key, V defaultValue) {
 24          V v;
 25          return (((v = get(key)) != null ) || containsKey(key))
 26              ? V
 27              : defaultValue;
 28      }

@throws NullPointerException if the specified key is null and this map does not allow null keys

We can see that there is a get(key) method in the getOrDefault () method. At this time, if the value of key is a null, an error will be reported, such as key:null.

When the value of map is passed in, it is necessary to avoid the phenomenon of passing in map.put(key: null). You can use map.put(key: “”) instead.

(2) if (equals) judgment statement is wrong

if(! time .equals( “1900-01-01 00:00:00” ))

time : it is possible to pass a null, then there will be a null pointer phenomenon

Error resolution

Modify the sequence of judgment statements as follows:

if( null == devMap getOrDefault ( “locationcode”,”” ))

if(! “1900-01-01 00:00:00”.equals(time))

[Solved] ElasticSearch startup error: bootstrap checks failed

Modify the elasticsearch.yml configuration file to allow external network access.

vim config/elasticsearch.yml
# add

network.host: 0.0.0.0

Start failed, check did not pass, report error

[2018-05-18T17:44:59,658][INFO ][o.e.b.BootstrapChecks    ] [gFOuNlS] bound or publishing to a non-loopback address, enforcing bootstrap checks
ERROR: [2] bootstrap checks failed
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]

[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

 

 

[1]: max file descriptors [65535] for elasticsearch process is too low, increase to at least [65536]

Edit /etc/security/limits.conf and add the following content;
* soft nofile 65536
* hard nofile 65536 After
this file is modified, you need to log in to the user again to take effect

 

[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

Edit /etc/sysctl.conf and add the following content:
vm.max_map_count=655360
After saving, execute:

sysctl -p

Restart, success.

 

bin/elasticsearch 

[Solved] Failed to invoke @ExceptionHandler method is reported after adding @ControllerAdvice

first of all. Using ControllerAdvice alone does not work properly. Need to cooperate with @EnableWebMvc.

@ControllerAdvice

@EnableWebMvc

pulbic class ExceptionControllerAdvice{

  @ExceptionHandler(NotFoundException.class)

  @ResponseBody

  public Map<String,Object> notFoundExc(NotFoundException exc,HttpServletRequest req){

  …….

  }

}

An error is reported during the startup of exception handling.

Error message:

Jul 04, 2016 11:00:11 AM org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver doResolveHandlerMethodException

Warning: Failed to invoke @ExceptionHandler method: public java.util.Map<java.lang.String, java.lang.Object> com.dooioo.modelException.ExceptionControllerAdvice.notFoundError(com.dooioo.modelException.NotFoundException,javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)

org.springframework.web.HttpMediaTypeNotAcceptableException: Could not find acceptable representation

at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverters(AbstractMessageConverterMethodProcessor.java:134)

at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverters(AbstractMessageConverterMethodProcessor.java:101)

at ……….. (omitted…)

The messageconverter processor has been configured in xx-servlet.xml.

 <bean id=“dyMessageConverter” class=“com.dooioo.web.converter.DyMappingJacksonHttpMessageConverter”/>

 <bean class=“org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter”>

        <!– Processing function for spring binding –>

        <property name=“webBindingInitializer”>

            <bean class=“com.dooioo.init.DefaultBindingInitializer”/>

        </property>

        <property name=“messageConverters”>

            <list>

                <bean class=“org.springframework.http.converter.ByteArrayHttpMessageConverter”/>

                <ref bean=“dyMessageConverter”/>

            </list>

        </property>

        <property name=“requireSession” value=“false”/>

        <property name=“order” value=“0”/>

    </bean>

Going through the information online to no avail.

Finally, it is found that there is a relationship with the order in the xml. <mvc:annotation-driven />.

org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter  adapter must be declared before <mvc:annotation-driven />, otherwise the conversion of parameter types cannot be processed normally 

This problem is solved.

Resolve Chromedriver’s original error: chrome not reachable

The error message is as follows:

error: Chromedriver: Chromedriver exited unexpectedly with code null, signal SIG
TERM
info: Chromedriver: Changed state to 'stopped'
warn: Chromedriver for context WEBVIEW_com.tencent.mm:tools stopped unexpectedly

warn: Chromedriver quit unexpectedly, but it wasn't the active context, ignoring

error: Chromedriver: Error: An error occurred (Original error: chrome not reacha
became
  (Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb514e62641d8c96a9468
2a),platform=Windows NT 6.1 x86_64))
    at JWProxy.command$ (lib/proxy.js:133:15)
    but tryCatch (500: \ Program Files \ epochs \ node_modules \ appium \ node_modules \ appium
-chromedriver\node_modules\appium-jsonwp-proxy\node_modules\babel-runtime\regene
rator\runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (D:\Program Files\Appium\n
ode_modules \ appium \ node_modules \ appium -chromedriver \ node_modules \ appium-jsonwp- p
roxy\node_modules\babel-runtime\regenerator\runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (D:\P
ROGRA Files \ epochs \ node_modules \ appium \ node_modules \ appium - chromedriver \ node_mo
dules \ appium -jsonwp-Proxy \ node_modules \ Isabel-runtime \ regenerator \ runtime.js: 100 :
 21 )
    at GeneratorFunctionPrototype.invoke (D:\Program Files\Appium\node_modules\a
ppium \ node_modules \ appium -chromedriver \ node_modules \ appium-jsonwp- Proxy \ node_mod
ules\babel-runtime\regenerator\runtime.js:136:37)
    at bound (domain.js:287:14)
    at GeneratorFunctionPrototype.runBound (domain.js:300:12)
    at run (500: \ Program Files \ epochs \ node_modules \ appium \ node_modules \ appium - genious
medriver\node_modules\appium-jsonwp-proxy\node_modules\babel-runtime\node_module
s\core-js\library\modules\es6.promise.js:89:39)
    at 500: \ Program Files \ epochs \ node_modules \ appium \ node_modules \ appium - chromedri
spring \ node_modules \ appium -jsonwp-Proxy \ node_modules \ babel- the runtime \ node_modules \ heart
the -JS \ Library \ modules \ es6.promise.js: 100 : 28 
    at Flush (500: \ Program Files \ epochs \ node_modules \ appium \ node_modules \ appium - ch
romedriver \ node_modules \ appium -jsonwp-Proxy \ node_modules \ babel- the runtime \ node_modu
les\core-js\library\modules\$.microtask.js:17:13)
    at nextTickCallbackWith0Args (node.js:420:9)
    at process._tickDomainCallback (node.js:390:13)
 { [Error: An error occurred (Original error: chrome not reachable
  (Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb514e62641d8c96a9468
2a),platform=Windows NT 6.1 x86_64))]
  status: 100,
  value: { message: 'chrome not reachable\n  (Driver info: chromedriver=2.18.343
845 (73dd713ba7fbfb73cbb514e62641d8c96a94682a),platform=Windows NT 6.1 x86_64)'
},
  httpCode: 200 }

 

Solution: Modify the files in the Appium installation directory, for example:

500: \ Program Files \ epochs \ node_modules \ appium \ lib \ devices \ Android \ android-hybrid.js

Find the androidHybrid.startChromedriverProxy function and comment out the relevant content.

 

 

problem causes:

When Appium switches to the Html page for the first time, it will generate a new Chromedriver; when it switches to Html for the second time, it will use the existing Chromedriver. But in fact, every time we open an Activity in our application, a WebChromeClient is generally recreated, so here we change it to generate a new Chromedriver anyway.

[Solved] Error reported: org.springframework.validation.BeanPropertyBindingResult

Error content: org.springframework.validation.BeanPropertyBindingResult: 1 errors Field error in object’price’ on field’endTime’: rejected value [2018-07-31]; codes [typeMismatch.price.endTime,typeMismatch.endTime,typeMismatch. java.util.Date,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [price.endTime,endTime]; arguments []; default message [endTime]]; default message [Failed to convert property value of type’java.lang.String’ to required type’java.util.Date’ for property’endTime’; nested exception is org.springframework.core.convert.ConversionFailedException: Failed to convert from type [java.lang.String] to type [@javax.persistence.Column java.util.Date] for value ‘2018-07-31’; nested exception is java.lang.IllegalArgumentException:Parse attempt failed for value [2018-07-31]]

 

When SpringMvc is configured, the accepted period is formatted as yyyy-MM-dd HH:mm:ss by default. And because the date plug-in used is in the format of year, month, and day. Therefore, there is a problem of Spring conversion Date conversion failure.

There is a problem here, I hope I know what’s going on in the future? During this period, I set breakpoints in the configuration, but only the breakpoints entered when the project was started, but did not enter the breakpoints when calling the interface later. There is a guess here. In Spring, the configuration is initialized only when the project is started, and then it does not enter the method of initializing the configuration when it is called.

 

The way to solve the problem: Since it is the process of mapping, Spring cannot be converted to Date, and it is related to the overall configuration. I don’t want to change the general configuration, so I use HttpServletRequest to get the parameters directly. There will be no problems. The accepted parameter is directly Spring, which needs to be converted to Date by itself

[Solved] Weblogic startup error: java.lang.NoClassDefFoundError

Weblogic startup error: java.lang.NoClassDefFoundError 

 

#### <2015-6-17 PM 03 when 30 of 5 47 seconds CST> <Error> <HTTP> <HDQSDOCMTAPP4> <zonyappserver> <[ACTIVE] ExecuteThread: ’15’ for queue: ‘weblogic.kernel.Default ( self-tuning)’> <<WLS Kernel>> <> <> <1434526247927> <BEA-101163> <Could not load user defined listener: org.springframework.web.context.request.RequestContextListener

java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory

at org.springframework.web.context.request.RequestContextListener.<init>(RequestContextListener.java:55)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

at java.lang.reflect.Constructor.newInstance(Constructor.java:513)

at java.lang.Class.newInstance0(Class.java:357)

at java.lang.Class.newInstance(Class.java:310)

 

Does anyone know what’s going on?

The jar package loaded when WebLogic starts is as follows:

java.class.path = D:\zonyapps\applibs\commons-logging.jar;D:\zonyapps\applibs\log4j-1.2.8.jar;D:\zonyapps\applibs\activation.jar;D:\zonyapps\ applibs\antlr-2.7.6.jar;D:\zonyapps\applibs\aspectjrt.jar;D:\zonyapps\applibs\aspectjweaver.jar;D:\zonyapps\applibs\axis.jar;D:\zonyapps\applibs\ cglib-nodep-2.1_3.jar;D:\zonyapps\applibs\commons-collections-3.1.jar;D:\zonyapps\applibs\commons-discovery.jar;D:\zonyapps\applibs\commons-io-1.3. 2.jar;D:\zonyapps\applibs\dom4j-1.6.1.jar;D:\zonyapps\applibs\ejb3-persistence.jar;D:\zonyapps\applibs\hibernate-annotations.jar;D:\zonyapps\ applibs\hibernate-commons-annotations.jar;D:\zonyapps\applibs\hibernate3.jar;D:\zonyapps\applibs\javassist-3.9.0.GA.jar;D:\zonyapps\applibs\jaxrpc.jar;D :\zonyapps\applibs\jdom-1.0.jar;D:\zonyapps\applibs\jta-1.1.jar;D:\zonyapps\applibs\proxool-0.9.1.jar;D:\zonyapps\applibs\proxool-cglib.jar;D:\zonyapps\applibs\saaj.jar;D:\zonyapps\applibs\slf4j-api-1.5.8.jar;D:\zonyapps\applibs\slf4j-nop- 1.5.8.jar;D:\zonyapps\applibs\spring.jar;D:\zonyapps\applibs\sqljdbc4.jar;D:\zonyapps\applibs\standard.jar;D:\zonyapps\applibs\wsdl4j.jar; D:\zonyapps\applibs\adobe-assembler-client.jar;D:\zonyapps\applibs\adobe-generatepdf-client.jar;D:\zonyapps\applibs\adobe-livecycle-client.jar;D:\zonyapps\ applibs\adobe-usermanager-client.jar;D:\Oracle\MIDDLE~1\patch_wls1211\profiles\default\sys_manifest_classpath\weblogic_patch.jar;D:\Java\JDK16~1.0_4\lib\tools.jar;D:\ Oracle\MIDDLE~1\WLSERV~1.1\server\lib\weblogic_sp.jar;D:\Oracle\MIDDLE~1\WLSERV~1.1\server\lib\weblogic.jar;D:\Oracle\MIDDLE~1\modules\ features\weblogic.server.modules_12.1.1.0.jar;D:\Oracle\MIDDLE~1\WLSERV~1.1\server\lib\webservices.jar;D:\Oracle\MIDDLE~1\modules\ORGAPA~1.1/lib/ant-all.jar;D:\Oracle\MIDDLE~1\modules\NETSFA~1.0_1/lib/ant-contrib.jar;;

 

The operating system is Windows , use Windows service mode to start

 

Solution reference:

1. Check whether the jar package is normal and is it damaged?

The jar package is damaged, and weblogic cannot read the contents of the jar package. Unzip and compress the jar package to solve the problem.

2. See if the weblogic startup jdk and the project compiled jdk are unified?

It is said that the loaded package cannot be recognized by jvm . For example, if you use IBM ‘s JDK for development this will happen when you deploy packages compiled by sun jdk

3. See if the jar of the project conflicts with the jar package that comes with weblogic

There is a saying that weblogic may come with some jars , and the project also has some jar packages. The versions of these jar packages may be inconsistent. For example, the version of the project is higher than the version of weblogic. Generally, weblogic will only load the jar once . Will control the version, so the jar of the project is loaded first