添加mysql的配置文件,运行报错
Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.Aug 31, 2020 2:36:43 PM com.alibaba.druid.pool.DruidDataSource info
信息: {dataSource-1} inited
java.lang.Exception: commit error
at com.x.base.core.container.EntityManagerContainer.commit(EntityManagerContainer.java:974)
at com.x.program.center.Context.checkDefaultRole(Context.java:244)
at com.x.program.center.Context.concrete(Context.java:163)
at com.x.program.center.ApplicationServletContextListener.contextInitialized(ApplicationServletContextListener.java:13)
at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:930)
at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:553)
at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:889)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:356)
at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1445)
at org.eclipse.jetty.quickstart.QuickStartWebApp.startWebapp(QuickStartWebApp.java:131)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1409)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:822)
at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:275)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:524)
at org.eclipse.jetty.quickstart.QuickStartWebApp.doStart(QuickStartWebApp.java:200)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97)
at org.eclipse.jetty.server.handler.gzip.GzipHandler.doStart(GzipHandler.java:425)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
at org.eclipse.jetty.server.Server.start(Server.java:407)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97)
at org.eclipse.jetty.server.Server.doStart(Server.java:371)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
at com.x.server.console.server.center.CenterServerTools.start(CenterServerTools.java:92)
at com.x.server.console.server.Servers.startCenterServer(Servers.java:112)
at com.x.server.console.Main.startCenterServer(Main.java:370)
at com.x.server.console.Main.startAll(Main.java:427)
at com.x.server.console.Main.main(Main.java:141)
Caused by: <openjpa-3.1.0-rafcec21a1d489dff682a3ce7986fac6a1c80e8e0 fatal store error> org.apache.openjpa.persistence.RollbackException: The transaction has been rolled back. See the nested exceptions for details on the errors that occurred.
FailedObject: com.x.organization.core.entity.Role@6cd3ad8a
at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:693)
at com.x.base.core.container.EntityManagerContainer.commit(EntityManagerContainer.java:970)
... 35 more
Caused by: <openjpa-3.1.0-rafcec21a1d489dff682a3ce7986fac6a1c80e8e0 fatal general error> org.apache.openjpa.persistence.PersistenceException: The transaction has been rolled back. See the nested exceptions for details on the errors that occurred.
FailedObject: com.x.organization.core.entity.Role@6cd3ad8a
at org.apache.openjpa.kernel.BrokerImpl.newFlushException(BrokerImpl.java:2470)
at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2308)
at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:2199)
at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:2116)
at org.apache.openjpa.kernel.LocalManagedRuntime.commit(LocalManagedRuntime.java:84)
at org.apache.openjpa.kernel.BrokerImpl.commit(BrokerImpl.java:1600)
at org.apache.openjpa.kernel.DelegatingBroker.commit(DelegatingBroker.java:1035)
at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:669)
... 36 more
Caused by: <openjpa-3.1.0-rafcec21a1d489dff682a3ce7986fac6a1c80e8e0 fatal general error> org.apache.openjpa.persistence.PersistenceException: Incorrect string value: '\xE8\x80\x83\xE5\x8B\xA4...' for column 'xdescription' at row 1 {prepstmnt 257650296 INSERT INTO ORG_ROLE (xid, xcreateTime, xscratchBoolean, xscratchDate, xscratchInteger, xscratchString, xsequence, xupdateTime, xdistributeFactor, xdescription, xdistinguishedName, xname, xorderNumber, xpinyin, xpinyinInitial, xunique) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)}
FailedObject: com.x.organization.core.entity.Role@6cd3ad8a
at org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:5250)
at org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:5210)
at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:134)
at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:75)
at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushAndUpdate(PreparedStatementManagerImpl.java:146)
at org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushAndUpdate(BatchingPreparedStatementManagerImpl.java:80)
at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushInternal(PreparedStatementManagerImpl.java:102)
at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flush(PreparedStatementManagerImpl.java:90)
at org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:554)
at org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:110)
at org.apache.openjpa.jdbc.kernel.BatchingConstraintUpdateManager.flush(BatchingConstraintUpdateManager.java:61)
at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:108)
at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:81)
at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:757)
at org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:146)
... 43 more
Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: Incorrect string value: '\xE8\x80\x83\xE5\x8B\xA4...' for column 'xdescription' at row 1 {prepstmnt 257650296 INSERT INTO ORG_ROLE (xid, xcreateTime, xscratchBoolean, xscratchDate, xscratchInteger, xscratchString, xsequence, xupdateTime, xdistributeFactor, xdescription, xdistinguishedName, xname, xorderNumber, xpinyin, xpinyinInitial, xunique) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)}
at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:219)
at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:195)
at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$1000(LoggingConnectionDecorator.java:58)
at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeUpdate(LoggingConnectionDecorator.java:1188)
at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:308)
at org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement.executeUpdate(JDBCStoreManager.java:1856)
at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.executeUpdate(PreparedStatementManagerImpl.java:271)
at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushAndUpdate(PreparedStatementManagerImpl.java:121)
... 53 more
2020-08-31 14:41:26.154 ERROR com.x.program.center.jaxrs.unexpectederrorlog.UnexpectedErrorLogAction - java.lang.NullPointerException
java.lang.NullPointerException
at com.x.program.center.jaxrs.unexpectederrorlog.ActionCreate.execute(ActionCreate.java:29)
at com.x.program.center.jaxrs.unexpectederrorlog.UnexpectedErrorLogAction.logUnexpectedException(UnexpectedErrorLogAction.java:61)
at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161)
at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$VoidOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:143)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305)
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)
at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:473)
at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:755)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1617)
at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:226)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604)
at com.x.base.core.project.jaxrs.CipherManagerJaxrsFilter.doFilter(CipherManagerJaxrsFilter.java:40)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604)
at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:545)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:590)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1607)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1297)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:485)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1577)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1212)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:59)
at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:717)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.Server.handle(Server.java:500)
at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383)
at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:547)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:270)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:388)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)
at java.lang.Thread.run(Thread.java:748)
http://www.o2oa.net:20020/x_file_assemble_control/jaxrs/file/bfaf7064-fc99-4204-88fd-4d5211e61045/download/stream
http://www.o2oa.net:20020/x_file_assemble_control/jaxrs/file/aecc31b0-609c-4256-af25-3f5cc40230da/download/stream 修改了mysql编码如下,错误依旧。http://www.o2oa.net:20020/x_file_assemble_control/jaxrs/file/9d98a15a-a020-4994-8b4d-72283a94b12f/download/stream Caused by: <openjpa-3.1.0-rafcec21a1d489dff682a3ce7986fac6a1c80e8e0 fatal general error> org.apache.openjpa.persistence.PersistenceException: Incorrect string value: '\xE8\x80\x83\xE5\x8B\xA4...' for column 'xdescription' at row 1 {prepstmnt 257650296 INSERT INTO ORG_ROLE (xid, xcreateTime, xscratchBoolean, xscratchDate, xscratchInteger, xscratchString, xsequence, xupdateTime, xdistributeFactor, xdescription, xdistinguishedName, xname, xorderNumber, xpinyin, xpinyinInitial, xunique) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)}
建议您检查一下您的mysql 的配置,,,比如从编码问题入手。 这个估计还是编码的问题!
不过小小管理员会像这个问题反馈到技术部门核实是版本还是您配置的问题导致的。
如果同版本没问题估计还是您配置或者下载的介质导致的! 我刚测试了,使用mysql8.0.0就会出问题,使用最新的mysql8.0.21就成功了。
页:
[1]