Wex5 failed to execute Class[search.login__do] Method[login]

=====================Development tool version: WeX5_V3.3========================== =

Error background: I used this tool to develop an APP when I was a sophomore, backed up the SQL file of the project database + the GK (storage page) of the project under WeX5_V3.3\model\UI2 and the GK (storage page) in WeX5_V3.3\model\Baas After searching (to store service source code) these two folders, the platform was deleted because WeX5 was no longer used for development. Later, after completing the project, you need to run the project again.

  1. Re-download the WeX5_V3.3 version on the WeX5 official website and unzip it;

  2. Copy the GK folder to the WeX5_V3.3\model\UI2 directory, and copy the search to the WeX5_V3.3\model\Baas directory;

  3. Start the built-in database, start the database management tool, directly execute the SQL file of the backup project database, and the database is successfully built. Start development tools;

  4. Right-click the index.w file under GK and select "Run in Browser"

  5. Tomcat reported an error when accessing the database, as if the java classes I wrote in baas to access the database were not found.

Because there was no screenshot in time when the error was reported, I thought of sorting out the solution after the problem was solved, so I searched again for the error code of a similar problem. My error is similar to the following:

com.justep.baas.action.ActionException: 执行Class[device.Deploy__do] Method[queryDeploy]失败
        at com.justep.baas.action.Engine.execAction(Unknown Source)
        at com.justep.baas.action.Engine.execAction(Unknown Source)
        at com.justep.baas.servlet.BaasServlet.execService(Unknown Source)
        at com.justep.baas.servlet.BaasServlet.service(Unknown Source)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        ... 16 more
Caused by: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Unknown system variable 'language')
        at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1549)
        at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
        at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
        at com.justep.baas.data.DataUtils.getConnection(Unknown Source)
        at com.justep.baas.action.ActionContext.getConnection(Unknown Source)
        at com.justep.baas.action.CRUD.query(Unknown Source)
        at device.Deploy__do.queryDeploy(Deploy__do.java:43)
        ... 20 more
Caused by: java.sql.SQLException: Unknown system variable 'language'
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:998)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3847)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3783)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2447)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2594)
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2541)
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2499)
        at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1432)
        at com.mysql.jdbc.ConnectionImpl.loadServerVariables(ConnectionImpl.java:3870)
        at com.mysql.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:3284)
        at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2293)
        at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2079)
        at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:794)
        at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:44)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:400)
        at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:399)
        at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:325)
        at org.apache.tomcat.dbcp.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
        at org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
        at org.apache.tomcat.dbcp.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)
        at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)
        ... 26 more
三月 30, 2016 4:32:47 下午 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet WeX5_Baas_Servlet threw exception
java.sql.SQLException: Unknown system variable 'language'
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:998)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3847)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3783)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2447)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2594)
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2541)
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2499)
        at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1432)
        at com.mysql.jdbc.ConnectionImpl.loadServerVariables(ConnectionImpl.java:3870)
        at com.mysql.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:3284)
        at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2293)
        at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2079)
        at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:794)
        at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:44)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:400)
        at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:399)
        at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:325)
        at org.apache.tomcat.dbcp.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
        at org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
        at org.apache.tomcat.dbcp.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)
        at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)
        at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
        at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
        at com.justep.baas.data.DataUtils.getConnection(Unknown Source)
        at com.justep.baas.action.ActionContext.getConnection(Unknown Source)
        at com.justep.baas.action.CRUD.query(Unknown Source)
        at device.Deploy__do.queryDeploy(Deploy__do.java:43)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at com.justep.baas.action.Engine.execAction(Unknown Source)
        at com.justep.baas.action.Engine.execAction(Unknown Source)
        at com.justep.baas.servlet.BaasServlet.execService(Unknown Source)
        at com.justep.baas.servlet.BaasServlet.service(Unknown Source)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:745)

------------------------------Solutions------------------ ------

First of all, I think it is necessary to check whether the demo that comes with the platform can access the database, so I ran the takeout case and found that an error was also reported, and the data could not be accessed either. So this is probably a general configuration problem.

1. Find the video tutorial of "WeX5 Backend Service Tutorial" on the official website, and found that I have not configured the data source in the development tool:

(1) Window -> Preferences -> Studio Configuration -> Data Source -> Add; then fill in the link information of the database. The port I use is not the default 3306 but the 3308 set by myself (because I originally installed MySQL, so I changed the MySQL port that comes with Wex5)

(2) Open the db.config.m file under Baas, and tick your own search database.

2. After the data source is configured above, an error is still reported. So I refer to the Wex5 forum post I found (this step is too useful)

(1)http://bbs.wex5.com/forum.php?mod=viewthread&tid=89538&highlight=%E6%89%A7%E8%A1%8CClass%2BMethod%2B%E5%A4%B1%E8%B4%A5

The person said that he solved it because the jar package version of mysql is too high.

(2)http://bbs.wex5.com/forum.php?mod=viewthread&tid=86472&highlight=%E6%89%A7%E8%A1%8CClass%2BMethod%2B%E5%A4%B1%E8%B4%A5

There is a person who mentioned several of his attempts:

3. After the reference, here is what I did: (Thanks to the reference post, I solved the problem)

(1) Find WeX5_V3.3\apache-tomcat\conf\context.xml and find that the data source configuration has been written: as shown below. So I didn't change it.

(2) Downloaded mysql-connector-java-5.1.22-bin.jar from the Internet, found the WeX5_V3.3\apache-tomcat\lib directory, and found that the original version of the jar package was mysql-connector-java-5.1 .36-bin.jar, so I deleted the original 5.1.36 and copied the 5.1.22 I just downloaded to this directory.

(3) Re-open the database service and development tools, right-click the baas and UI2 directories and "module compilation". After completion, start tomcat and re-run it in the browser, whether it is my project or the demo project, you can Access to records in the database.

problem solved.

It is assumed that the core function is to replace the version driven by the database connection, that is, the jar package.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325651432&siteId=291194637
Recommended