(五)Metl的疑难杂症

流程导出报错

2019-11-14 15:32:27,424 ERROR [              qtp1033490990-14] Unable to invoke method itemClicked in com.vaadin.addon.contextmenu.client.ContextMenuServerRpc com.vaadin.server.ServerRpcManager$RpcInvocationException: Unable to invoke method itemClicked in com.vaadin.addon.contextmenu.client.ContextMenuServerRpc  at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:162)  at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:119)  at com.vaadin.server.communication.ServerRpcHandler.handleInvocation(ServerRpcHandler.java:435)  at com.vaadin.server.communication.ServerRpcHandler.handleInvocations(ServerRpcHandler.java:407)  at com.vaadin.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:273)  at com.vaadin.server.communication.PushHandler$2.run(PushHandler.java:148)  at com.vaadin.server.communication.PushHandler.callWithUi(PushHandler.java:240)  at com.vaadin.server.communication.PushHandler.onMessage(PushHandler.java:494)  at com.vaadin.server.communication.PushAtmosphereHandler.onMessage(PushAtmosphereHandler.java:87)  at com.vaadin.server.communication.PushAtmosphereHandler.onRequest(PushAtmosphereHandler.java:77)  at org.atmosphere.cpr.AsynchronousProcessor.action(AsynchronousProcessor.java:199)  at org.atmosphere.cpr.AsynchronousProcessor.suspended(AsynchronousProcessor.java:107)  at org.atmosphere.container.Servlet30CometSupport.service(Servlet30CometSupport.java:66)  at org.atmosphere.cpr.AtmosphereFramework.doCometSupport(AtmosphereFramework.java:2075)  at org.atmosphere.websocket.DefaultWebSocketProcessor.dispatch(DefaultWebSocketProcessor.java:571)  at org.atmosphere.websocket.DefaultWebSocketProcessor$3.run(DefaultWebSocketProcessor.java:333)  at org.atmosphere.util.VoidExecutorService.execute(VoidExecutorService.java:101)  at org.atmosphere.websocket.DefaultWebSocketProcessor.dispatch(DefaultWebSocketProcessor.java:328)  at org.atmosphere.websocket.DefaultWebSocketProcessor.invokeWebSocketProtocol(DefaultWebSocketProcessor.java:425)  at org.atmosphere.container.JSR356Endpoint$1.onMessage(JSR356Endpoint.java:214)  at org.atmosphere.container.JSR356Endpoint$1.onMessage(JSR356Endpoint.java:211)  at org.eclipse.jetty.websocket.jsr356.messages.TextWholeMessage.messageComplete(TextWholeMessage.java:56)  at org.eclipse.jetty.websocket.jsr356.endpoints.JsrEndpointEventDriver.onTextFrame(JsrEndpointEventDriver.java:218)  at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.incomingFrame(AbstractEventDriver.java:162)  at org.eclipse.jetty.websocket.common.WebSocketSession.incomingFrame(WebSocketSession.java:376)  at org.eclipse.jetty.websocket.common.extensions.AbstractExtension.nextIncomingFrame(AbstractExtension.java:176)  at org.eclipse.jetty.websocket.common.extensions.compress.PerMessageDeflateExtension.nextIncomingFrame(PerMessageDeflateExtension.java:105)  at org.eclipse.jetty.websocket.common.extensions.compress.CompressExtension.forwardIncoming(CompressExtension.java:142)  at org.eclipse.jetty.websocket.common.extensions.compress.PerMessageDeflateExtension.incomingFrame(PerMessageDeflateExtension.java:85)  at org.eclipse.jetty.websocket.common.extensions.ExtensionStack.incomingFrame(ExtensionStack.java:220)  at org.eclipse.jetty.websocket.common.Parser.notifyFrame(Parser.java:220)  at org.eclipse.jetty.websocket.common.Parser.parse(Parser.java:256)  at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.readParse(AbstractWebSocketConnection.java:679)  at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:511)  at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)  at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)  at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)  at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)  at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)  at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)  at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)  at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)  at java.lang.Thread.run(Unknown Source) Caused by: java.lang.reflect.InvocationTargetException  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)  at java.lang.reflect.Method.invoke(Unknown Source)  at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:158)  ... 42 more Caused by: org.jumpmind.db.sql.SqlException: Failed to execute sql: select distinct c.resource_id from metl_flow_step fs inner join metl_component c on fs.component_id = c.id where fs.flow_id = 'fdd32a7f-aad7-4976-b49a-3c9bd77aec68' and resource_id is not null union select distinct cast(cs.value as varchar(36)) from metl_flow_step fs inner join metl_component c on fs.component_id = c.id inner join metl_component_setting cs on cs.component_id = c.id where fs.flow_id = 'fdd32a7f-aad7-4976-b49a-3c9bd77aec68' and cs.name in ('source.resource','target.resource')  at org.jumpmind.db.sql.AbstractSqlTemplate.translate(AbstractSqlTemplate.java:300)  at org.jumpmind.db.sql.JdbcSqlReadCursor.<init>(JdbcSqlReadCursor.java:120)  at org.jumpmind.db.sql.JdbcSqlTemplate.queryForCursor(JdbcSqlTemplate.java:140)  at org.jumpmind.db.sql.AbstractSqlTemplate.query(AbstractSqlTemplate.java:199)  at org.jumpmind.db.sql.AbstractSqlTemplate.query(AbstractSqlTemplate.java:195)  at org.jumpmind.db.sql.AbstractSqlTemplate.query(AbstractSqlTemplate.java:185)  at org.jumpmind.db.sql.AbstractSqlTemplate.query(AbstractSqlTemplate.java:169)  at org.jumpmind.db.sql.AbstractSqlTemplate.query(AbstractSqlTemplate.java:117)  at org.jumpmind.metl.core.persist.ConfigurationService.findDependentResources(ConfigurationService.java:1415)  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)  at java.lang.reflect.Method.invoke(Unknown Source)  at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)  at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)  at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)  at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)  at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)  at com.sun.proxy.$Proxy33.findDependentResources(Unknown Source)  at org.jumpmind.metl.ui.common.ExportDialog.addDependentResources(ExportDialog.java:240)  at org.jumpmind.metl.ui.common.ExportDialog.addSelectedAndDependentObjects(ExportDialog.java:225)  at org.jumpmind.metl.ui.common.ExportDialog.initWindow(ExportDialog.java:87)  at org.jumpmind.metl.ui.common.ExportDialog.<init>(ExportDialog.java:78)  at org.jumpmind.metl.ui.common.ExportDialog.show(ExportDialog.java:289)  at org.jumpmind.metl.ui.views.design.DesignNavigator.doExport(DesignNavigator.java:717)  at org.jumpmind.metl.ui.views.design.menu.AbstractDesignSelectedValueMenuManager.handle(AbstractDesignSelectedValueMenuManager.java:99)  at org.jumpmind.metl.ui.views.design.menu.FlowMenuManager.handle(FlowMenuManager.java:35)  at org.jumpmind.metl.ui.common.AbstractMenuBar$Handler.menuSelected(AbstractMenuBar.java:288)  at org.jumpmind.metl.ui.common.AbstractMenuBar$Handler.menuSelected(AbstractMenuBar.java:274)  at com.vaadin.addon.contextmenu.AbstractMenu.itemClicked(AbstractMenu.java:160)  at com.vaadin.addon.contextmenu.ContextMenu$2.itemClicked(ContextMenu.java:53)  ... 47 more Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'varchar(36)) from metl_flow_step fs inner join metl_component c on fs.component_' at line 1  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)  at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)  at java.lang.reflect.Constructor.newInstance(Unknown Source)  at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)  at com.mysql.jdbc.Util.getInstance(Util.java:387)  at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:939)  at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3878)  at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3814)  at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2478)  at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2625)  at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2547)  at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2505)  at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1370)  at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)  at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)  at org.jumpmind.db.sql.JdbcSqlReadCursor.<init>(JdbcSqlReadCursor.java:104)  ... 78 more

解决方案

  • \metl-core\src\main\java\org\jumpmind\metl\core\persist\ConfigurationService.java
  • cast(cs.value as varchar(36))修改为cast(cs.value as char(36))
 @Override
    public List<Resource> findDependentResources(String flowId) {

        List<Resource> resources = new ArrayList<Resource>();
        final String RESOURCES_BY_FLOW_SQL = "select distinct c.resource_id from %1$s_flow_step fs inner join %1$s_component c on fs.component_id = c.id where fs.flow_id = '%2$s' and resource_id is not null " +
                "union select distinct cast(cs.value as char(36)) from metl_flow_step fs inner join metl_component c on fs.component_id = c.id inner join metl_component_setting cs on cs.component_id = c.id where fs.flow_id = '%2$s' " +
                "and cs.name in ('source.resource','target.resource')";
        ISqlTemplate template = databasePlatform.getSqlTemplate();
        List<Row> ids = template.query(String.format(RESOURCES_BY_FLOW_SQL, tablePrefix, flowId));
        for (Row row : ids) {
            resources.add(this.findResource(row.getString("resource_id")));
        }
        return resources;
    }
发布了27 篇原创文章 · 获赞 5 · 访问量 2万+
展开阅读全文

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 大白 设计师: CSDN官方博客

分享到微信朋友圈

×

扫一扫,手机浏览