mysql 数据异常,这里面存的到底是什么数据

图片说明

如图,视图和编辑状态下,明显数据变了,
这些数据在webservice传递时也会报错

java.lang.RuntimeException: org.apache.cxf.aegis.DatabindingException: Error wri
ting document.. Nested exception is com.ctc.wstx.exc.WstxIOException: Invalid nu
ll character in text to output
at org.apache.cxf.aegis.databinding.XMLStreamDataWriter.write(XMLStreamD
ataWriter.java:112)
at org.apache.cxf.aegis.databinding.XMLStreamDataWriter.write(XMLStreamD
ataWriter.java:48)
at org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writePar
ts(AbstractOutDatabindingInterceptor.java:114)
at org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutIn
terceptor.java:68)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept
orChain.java:236)
at org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(Out
goingChainInterceptor.java:74)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept
orChain.java:236)
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainIniti
ationObserver.java:89)
at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDes
tination.java:99)
at org.apache.cxf.transport.servlet.ServletController.invokeDestination(
ServletController.java:357)
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletCont
roller.java:183)
at org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCX
FServlet.java:163)
at org.apache.cxf.transport.servlet.AbstractCXFServlet.doPost(AbstractCX
FServlet.java:141)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502
)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:3
89)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:1
81)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:7
65)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:1
52)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:53
5)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnectio
n.java:880)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.ja
va:409)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.j
ava:520)
Caused by: org.apache.cxf.aegis.DatabindingException: Error writing document.. N
ested exception is com.ctc.wstx.exc.WstxIOException: Invalid null character in t
ext to output
at org.apache.cxf.aegis.xml.stax.ElementWriter.writeValue(ElementWriter.
java:139)
at org.apache.cxf.aegis.type.basic.StringType.writeObject(StringType.jav
a:44)
at org.apache.cxf.aegis.type.basic.BeanType.writeElement(BeanType.java:3
96)
at org.apache.cxf.aegis.type.basic.BeanType.writeObjectInternal(BeanType
.java:380)
at org.apache.cxf.aegis.type.basic.BeanType.writeObject(BeanType.java:32
0)
at org.apache.cxf.aegis.type.basic.ArrayType.writeValue(ArrayType.java:2
63)
at org.apache.cxf.aegis.type.collection.CollectionType.writeObject(Colle
ctionType.java:121)
at org.apache.cxf.aegis.databinding.XMLStreamDataWriter.write(XMLStreamD
ataWriter.java:109)
... 27 more
Caused by: com.ctc.wstx.exc.WstxIOException: Invalid null character in text to o
utput
at com.ctc.wstx.sw.BaseStreamWriter.writeCharacters(BaseStreamWriter.jav
a:511)
at org.apache.cxf.aegis.xml.stax.ElementWriter.writeValue(ElementWriter.
java:136)
... 34 more
Caused by: java.io.IOException: Invalid null character in text to output
at com.ctc.wstx.sw.XmlWriter.throwInvalidChar(XmlWriter.java:538)
at com.ctc.wstx.sw.BufferingXmlWriter.writeCharacters(BufferingXmlWriter
.java:531)
at com.ctc.wstx.sw.BaseStreamWriter.writeCharacters(BaseStreamWriter.jav
a:509)
... 35 more

2个回答

Invalid null character in text to output 看数据类型直接打开数据库查看不就得了

图片说明

原来是因为字符对应的ascii为00的原因,这些都是非打印字符,在文本里都是无法显示的,所有通过webservice时,会报错,把这些ascii码转换为打印字符就好了,我这里是转换为了空格

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问