Tag Archives: java

Unloading and installation of node and NPM of Vue Foundation

Problem background: Node and NPM have been installed on the original MAC computer, but in the process of a misoperation, it was found that the nPM-V command could not be typed out, prompting the Command not Found. Tamping many times, finally decisive after all kinds of search uninstall clean and then reinstall all.

Problems:
1 node-v can have a version prompt, npm-v does not have a version prompt, and the output NPM command not found
2 brew install node can have a version prompt, brew install NPM prompt error.
Solutions:
(1) Delete old files: delete them according to the prompts, or delete them directly (operation can be carried out in access)

sudo npm uninstall npm -g
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*
sudo rm -rf /usr/local/include/node /Users/$USER/.npm
sudo rm /usr/local/bin/node
sudo rm /usr/local/share/man/man1/node.1
sudo rm /usr/local/lib/dtrace/node.d

Confirm whether to uninstall:

node -v 
npm -v

(2) Reinstall Node

brew install  node

(3) Associate node with the soft link

brew link node

At this time, we may have the following results:

Linking /usr/local/Cellar/node/11.2.0...
Error: Could not symlink include/node/common.gypi
Target /usr/local/include/node/common.gypi
already exists. You may want to remove it:
  rm '/usr/local/include/node/common.gypi'

To force the link and overwrite all conflicting files:
  brew link --overwrite node

To list all files that would be deleted:
  brew link --overwrite --dry-run node
localhost:wkdir meng$ brew link --overwrite node
Linking /usr/local/Cellar/node/11.2.0...
Error: Could not symlink include/node/common.gypi
/usr/local/include/node is not writable.

(4) Then we will enforce it according to the prompts:

brew link --overwrite --dry-run node

Enforcement may require us to delete some of the previous files related to Node, as shown below

Would remove:
/usr/local/include/node/common.gypi
/usr/local/include/node/config.gypi
/usr/local/include/node/libplatform/libplatform-export.h
/usr/local/include/node/libplatform/libplatform.h
/usr/local/include/node/libplatform/v8-tracing.h

(5) Continue to delete the above file and run it again

brew link --overwrite node

Install the NPM

sudo npm install --registry=https://registry.npm.taobao.org

Check node and NPM again

node -v
npm -v

Results:

Note: There may be a variety of problems. When there is a problem, try baidu, and then go on to solve the next problem.
For more personal tutorials, please visit the personal homepage:
Github builds personal blog (2019 update, pro test)
.https://blog.csdn.net/xudailong_blog/article/details/78762262
The public no. :

SQL Error: 0, SQLState: 08S01 & Communications link failure

Error:

WARN : org.hibernate.engine.jdbc.spi.SqlExceptionHelper - SQL Error: 0, SQLState: 08S01
ERROR: org.hibernate.engine.jdbc.spi.SqlExceptionHelper - Communications link failure

The data source configuration used initially is as follows

<bean id="dataSource"
          class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver"/>
<property name="url"
value="jdbc:mysql://localhost:3306/db_heybar01?useUnicode=true&amp;characterEncoding=UTF-8"/>
<property name="username" value="test"/>
<property name="password" value="test"/>

</bean>

Through the error message and the preliminary judgment of searching is that the number of database connections is not enough, try to change the connection pool:
modified data source configuration:

<bean id="dataSource"
          class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">
    <property name="driverClass">
        <value>com.mysql.jdbc.Driver</value>
    </property>
    <property name="jdbcUrl">
        <value>jdbc:mysql://101.201.73.167:3306/db_heybar01?useUnicode=true&amp;characterEncoding=UTF-8</value>
    </property>
    <property name="properties">
        <props>
            <prop key="c3p0.minPoolSize">2</prop>
            <prop key="c3p0.maxPoolSize">50</prop>
            <prop key="c3p0.timeout">5000</prop>
            <prop key="c3p0.max_statement">100</prop>
            <prop key="c3p0.testConnectionOnCheckout">true</prop>
            <prop key="user">nupa01</prop>
            <prop key="password">NUPA_mysql_2017</prop>
        </props>
    </property>
</bean>

IBM MQ Reason 2538(MQRC_ HOST_ NOT_ An example of error reason

Environment:.NET 4.0, MQ.NET client IBm.xMS (V2.0.0.3)
The test code is as follows:

       var factoryFactory = XMSFactoryFactory.GetInstance(XMSC.CT_WMQ);
       var _connFactory = factoryFactory.CreateConnectionFactory();

       _connFactory.SetStringProperty(XMSC.WMQ_HOST_NAME, "192.168.0.65");
       _connFactory.SetIntProperty(XMSC.WMQ_PORT, 1414);
       _connFactory.SetStringProperty(XMSC.WMQ_QUEUE_MANAGER, "XPP_QM");
       _connFactory.SetIntProperty(XMSC.WMQ_CONNECTION_MODE, XMSC.WMQ_CM_CLIENT);
       _connFactory.SetIntProperty(XMSC.WMQ_BROKER_VERSION, XMSC.WMQ_BROKER_V1);
       _connFactory.SetStringProperty(XMSC.CLIENT_ID, string.Empty);

       var conn = _connFactory.CreateConnection();
       conn.Start();

Error:
IBM. XMS. XMSException: CWSMQ0006E: method is called ConnectionFactory. Abnormal received during the CreateConnection: CompCode: 2, Reason: 2538
. During the execution of the specified method, another component throws an exception. For more information, see Linked Exceptions. .
in the IBM XMS. Client. WMQ. WmqConnectionFactory. CreateProviderConnection (XmsPropertyContext connectionProps)
in the IBM, XMS. Client. Impl. XmsConnectionFactoryImpl. The CreateConnection (String userID. String password)
in the IBM, XMS. Client. Impl. XmsConnectionFactoryImpl. The CreateConnection ()
in XRisk. MQ. MQConnection. Open (Boolean needLog) location e: \ xRisk4 – SRC \ XRisk MQ \ MQConnection cs: line number 314
Linked Exception : CompCode: 2, Reason: 2538
The real exception is reported in the following code.

IBM.WMQ.MQTCPConnection ---- < ParseLocalAddress(String) exit [o] rc=OK
IBM.WMQ.MQTCPConnection --- d Exception in method ConnectSocket(string,string,MQLONG)
IBM.WMQ.MQTCPConnection --- X System.Net.Sockets.SocketException (0x80004005): The requested name is valid and was found in the database, but it does not have the correct associated data being resolved for
at System.Net.Dns.InternalGetHostByAddress(IPAddress address, Boolean includeIPv6)
at System.Net.Dns.GetHostEntry(String hostNameOrAddress)
at IBM.WMQ.MQTCPConnection.ConnectSocket(String localAddr, String connectionName, Int32 options)
MQException CompCode: 2 Reason: 2538

The real reason is that in.NET 4.0, Microsoft changed the behavior of the interface Dns.GetHostEntry. When IP is used directly as a parameter, the report is not reported if the machine name or domain name is used.
The solution is as follows
1. Use ipAddres.tryparse () or Dns.Resolve(String) instead of Dns.GetHostEntry.
2. If you are using a third-party library and cannot modify the code, you can use the MACHINE name or domain name code for the IP. The above code can be changed to.

var factoryFactory = XMSFactoryFactory.GetInstance(XMSC.CT_WMQ);
var _connFactory = factoryFactory.CreateConnectionFactory();

_connFactory.SetStringProperty(XMSC.WMQ_HOST_NAME, "hostname");
_connFactory.SetIntProperty(XMSC.WMQ_PORT, 1414);
_connFactory.SetStringProperty(XMSC.WMQ_QUEUE_MANAGER, "XPP_QM");
_connFactory.SetIntProperty(XMSC.WMQ_CONNECTION_MODE, XMSC.WMQ_CM_CLIENT);
_connFactory.SetIntProperty(XMSC.WMQ_BROKER_VERSION, XMSC.WMQ_BROKER_V1);
_connFactory.SetStringProperty(XMSC.CLIENT_ID, string.Empty);

var conn = _connFactory.CreateConnection();
conn.Start();

Reference:
http://connect.microsoft.com/VisualStudio/feedback/details/561083/dns-gethostentry-behaves-differently-in-net-4-0-than-previous-versions
http://stackoverflow.com/questions/2714449/problem-with-system-net-dns-gethostentrydnsserver-on-net-4-0
https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014538533#77777777-0000-0000-0000-000014538832

Reproduced in: https://www.cnblogs.com/jmax/p/3494320.html

Solve the interceptor calling service layer to display null pointer.

When springBoot lets the interceptor, the interceptor object does not use the New interceptor object, but instead USES bean injection.


@Configuration
public class WebAppConfigurer implements WebMvcConfigurer {

    @Autowired
    private AuthorizationInterceptor authorizationInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(authorizationInterceptor).addPathPatterns("/**");

    }

}


 

Java jar close startup script

    Java jar close startup script
#!/bin/sh
RESOURCE_NAME=maf.jar
CONFIG_PATH=/maf/maf-service
#Stop
tpid=`ps -ef|grep $RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
if [ ${tpid} ]; then
echo 'Stop Process...'
kill -15 $tpid
fi
sleep 5
#Closed
tpid=`ps -ef|grep $RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
if [ ${tpid} ]; then
echo 'Kill Process!'
kill -9 $tpid
else
echo 'Stop Success!'
fi

tpid=`ps -ef|grep $RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
if [ ${tpid} ]; then
    echo 'App is running.'
else
    echo 'App is NOT running.'
fi

rm -f tpid
nohup java -Dspring.config.location=$CONFIG_PATH/application.properties -jar $RESOURCE_NAME > nohup.out 2>&1 &
echo $! > tpid
echo Start Success!
tail -f nohup.out

Note: 1. -dspring.config. location: Specify the configuration file
For yML type configuration files, you simply place them in the sibling directory of the JAR without specifying them
2. Grep -v Grep eliminates the row
Dlogging.config=/data/apps/maf/ maf-Yunyan /logback.xml

Pit encountered by entity class data type BigDecimal

Scene:
The price data type in the database is Decimal, and the price data type in entity class A is BigDecimal. When it is necessary to use equals method to compare the A1 object passed from the front end with the A2 object quashed from the database, the result is false even if the object attributes are the same.
why
Debug found that the price value of the object A1 passed from the front end was 0.1 after JSON transformation, while the price value of the a2 object query from the database was 0.1000. Alt + INSERT equals method was used to call the EQUALS method of BigDecimal.

        BigDecimal a = new BigDecimal("1.0");
        BigDecimal b = new BigDecimal("1.00");
        System.out.println(a.compareTo(b) == 0 );  // true
        System.out.println(a.equals(b));  // false

The equals method of BigDecimal compares precision and values, while the compareTo method only compares values.
The solution

 @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ProProductSkuEntity that = (ProProductSkuEntity) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(productId, that.productId) &&
                compareBigDecimal(price, that.price);
    }

    public boolean compareBigDecimal(BigDecimal a, BigDecimal b) {
        return (a == b) || (a != null && a.compareTo(b) == 0);
    }

Modify the equals method overwritten in the entity class, customize the compareBigDecimal method, use compareTo to compare values of the BigDecimal type, and you can also put this method in the utility class.

iOS Frequent Error Domains = NSURLErrorDomain Code = -1005 “Network Connection Lost.”

Reference links: https://stackoverflow.com/questions/25372318/error-domain-nsurlerrordomain-code-1005-the-network-connection-was-lost
Java code:

response.setHeader("Connection", "Keep-Alive");
response.setHeader("Keep-Alive", "timeout=60000");

If you are satisfied, please send the amount of money to the director of the blog. If you are interested, add the blogger WeChat when transferring money to WeChat. Please leave a comment below and feel free to discuss it with the bloggers.

Realization of springboot authorization verification technology based on JWT

The JWT token permission authentication technology based on Springboot is simply implemented
JWT profile
Json Web Token (JWT) : Json network Token, an open standard based on Json ((RFC 7519) for passing declarations between network application environments. JWT is a lightweight, secure, cross-platform transport format that defines a compact, self-contained way to communicate between two parties using JSON objects to securely transfer information. This information is reliable because of the digital signature.
Implementation steps:
Environmental spring boot
1. Add JWT dependency

 <dependency>
            <groupId>com.auth0</groupId>
            <artifactId>java-jwt</artifactId>
            <version>3.8.1</version>
        </dependency>
        <dependency>
            <groupId>io.jsonwebtoken</groupId>
            <artifactId>jjwt</artifactId>
            <version>0.9.1</version>
        </dependency>

2. Create annotation package </h6 b> under SRC
New custom annotation class JwtToken

package com.qf.tyleryue_one.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;


@Target({ElementType.METHOD,ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface JwtToken {
}

3. Create utils package </h6 b> under SRC
Create a new custom JwtUtils utility class

package com.qf.tyleryue_one.utils;

import com.auth0.jwt.JWT;
import com.auth0.jwt.JWTCreator;
import com.auth0.jwt.JWTVerifier;
import com.auth0.jwt.algorithms.Algorithm;
import jdk.internal.org.objectweb.asm.TypeReference;

import java.util.Date;


public class JwtUtils {
    private final static long EXPIRE_TIME=5*60*1000;
    private final static String SECRECT="Tyler_Yue_key";
    public  static  String sign(String userId){
        Date exipre_date = new Date(System.currentTimeMillis() + EXPIRE_TIME);
        JWTCreator.Builder builder = JWT.create();
        builder.withAudience(userId);
        builder.withExpiresAt(exipre_date);
        Algorithm algorithm = Algorithm.HMAC256(SECRECT);
        String sign = builder.sign(algorithm);
        return  sign;
    }

    public  static boolean verifyToken(String token){

        try {
            Algorithm algorithm = Algorithm.HMAC256(SECRECT);
            JWTVerifier build = JWT.require(algorithm).build();
            return  true;
        } catch (Exception e) {
            throw  new RuntimeException("Out of date");
        }
      
    }
}

4. Create new vo package under SRC
Encapsulates an object that returns the user’s token

package com.qf.tyleryue_one.vo;

import com.alibaba.druid.filter.AutoLoad;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;


@Data
@AllArgsConstructor
@NoArgsConstructor
public class TokenVo {
    private  String usernaem;
    private String token;
}

5. Example of controller layer user login business login with token </h6 b>

package com.qf.tyleryue_one.controller;

import com.qf.tyleryue_one.entity.VueUser;
import com.qf.tyleryue_one.service.VueUserService;
import com.qf.tyleryue_one.utils.JwtUtils;
import com.qf.tyleryue_one.vo.Msg;
import com.qf.tyleryue_one.vo.TokenVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.UUID;


@Controller
public class VueUserController {
    @Autowired
    private VueUserService vueUserService;

    @RequestMapping(value = "/dealLogin",method = RequestMethod.POST)
    @CrossOrigin
    @ResponseBody
    public Msg login(@RequestBody VueUser vueUser){
        VueUser vueUser1 = vueUserService.selectByUsername(vueUser.getUsername());

        if (vueUser1!=null){
            if (vueUser1.getPassword().equals(vueUser.getPassword())){
                String userid = UUID.randomUUID().toString();
                String token = JwtUtils.sign(userid);
                TokenVo tokenVo = new TokenVo(vueUser.getUsername(), token);
                return new Msg(200,"Logined",tokenVo);

            }else {
                return  new Msg(403,"password wrong",null);
            }
        }else {
            return new Msg(403,"not exsit",null);
        }
    }
}

</ div>

IDEA-Error java error release version 5 not supported (How To Fix)

Refer to the

\rightarrow

→ Refer to article 1 and article 2
Content of the error
Error:java: error: release version 5 not supported

Error reason
Error setting Java compiler in project structure or Settings
The solution
1, the project structure
Click

File-Project Structure

File \rightarrow Project Structure

File→ProjectStructure
make sure that the SDK versions under the Project are the same
make sure that the Language level version in Sources is the same as the one used
make sure that the Module SDKl version is the same as the one used

2, the Preferences

    1. Click on Preferences(or Settings in Win version

    1. ) to search Java Compiler to ensure that the Target byte code version is the same as the selected version

3. Re-execution should have been resolved

4. One more question
Every time the pom file is modified, the original setting is useless and the error is reported again. The solution is to add maven-compiler-plugin to
in the parent pom and specify the JDK version to be used by the JDK

	<build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>13</source>
                    <target>13</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

[How to Fix] org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader.

org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader.
at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:230)
at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:60)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:244)
at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:729)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2261)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2134)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1988)
at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:639)
at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:244)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:516)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
at $Proxy54.save(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:54)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:54)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy55.save(Unknown Source)
at org.rtx.wmprd.test.TestAsnServices.main(TestAsnServices.java:37)
Caused by: com.ctc.wstx.exc.WstxIOException: Invalid UTF-8 middle byte 0xde (at char #541, byte #127)
at com.ctc.wstx.sr.StreamScanner.throwFromIOE(StreamScanner.java:708)
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1086)
at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:218)
... 32 more
Caused by: java.io.CharConversionException: Invalid UTF-8 middle byte 0xde (at char #541, byte #127)
at com.ctc.wstx.io.UTF8Reader.reportInvalidOther(UTF8Reader.java:313)
at com.ctc.wstx.io.UTF8Reader.read(UTF8Reader.java:204)
at com.ctc.wstx.io.MergedReader.read(MergedReader.java:101)
at com.ctc.wstx.io.ReaderSource.readInto(ReaderSource.java:84)
at com.ctc.wstx.io.BranchingReaderSource.readInto(BranchingReaderSource.java:57)
at com.ctc.wstx.sr.StreamScanner.loadMore(StreamScanner.java:992)
at com.ctc.wstx.sr.StreamScanner.loadMore(StreamScanner.java:1034)
at com.ctc.wstx.sr.StreamScanner.getNextChar(StreamScanner.java:794)
at com.ctc.wstx.sr.BasicStreamReader.parseNormalizedAttrValue(BasicStreamReader.java:1900)
at com.ctc.wstx.sr.BasicStreamReader.handleNsAttrs(BasicStreamReader.java:3037)
at com.ctc.wstx.sr.BasicStreamReader.handleStartElem(BasicStreamReader.java:2936)
at com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2848)
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1019)
... 33 more
Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Error reading XMLStreamReader.
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:146)
at $Proxy54.save(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:54)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:54)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy55.save(Unknown Source)
at org.rtx.wmprd.test.TestAsnServices.main(TestAsnServices.java:37)
Caused by: com.ctc.wstx.exc.WstxIOException: Invalid UTF-8 middle byte 0xde (at char #541, byte #127)
at com.ctc.wstx.sr.StreamScanner.throwFromIOE(StreamScanner.java:708)
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1086)
at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:218)
at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:60)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:244)
at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:729)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2261)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2134)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1988)
at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:639)
at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:244)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:516)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
... 17 more
Caused by: java.io.CharConversionException: Invalid UTF-8 middle byte 0xde (at char #541, byte #127)
at com.ctc.wstx.io.UTF8Reader.reportInvalidOther(UTF8Reader.java:313)
at com.ctc.wstx.io.UTF8Reader.read(UTF8Reader.java:204)
at com.ctc.wstx.io.MergedReader.read(MergedReader.java:101)
at com.ctc.wstx.io.ReaderSource.readInto(ReaderSource.java:84)
at com.ctc.wstx.io.BranchingReaderSource.readInto(BranchingReaderSource.java:57)
at com.ctc.wstx.sr.StreamScanner.loadMore(StreamScanner.java:992)
at com.ctc.wstx.sr.StreamScanner.loadMore(StreamScanner.java:1034)
at com.ctc.wstx.sr.StreamScanner.getNextChar(StreamScanner.java:794)
at com.ctc.wstx.sr.BasicStreamReader.parseNormalizedAttrValue(BasicStreamReader.java:1900)
at com.ctc.wstx.sr.BasicStreamReader.handleNsAttrs(BasicStreamReader.java:3037)
at com.ctc.wstx.sr.BasicStreamReader.handleStartElem(BasicStreamReader.java:2936)
at com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2848)
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1019)
... 33 more

When using Apache CXF, the above exception appears in the calling method. After careful inspection, the ASM package is missing. Just introduce the ASM package.