Phenomenon:

Running into the following error in the Appeon Developer wizard when deploying the application to the Appeon Server for WebLogic/WebSphere/JBoss/JEUS.

                   09:19:19    Errors in uploading DataWindow SQL.

And when you check the Appeonsever.log file and you will see the following error.

1395149292851:3 [14-03-18 09:28:12.851] [com.appeon.server.services.datawindowservice.DBDWSqlForDEV (commit)] Failed to commit DW SQL. applicationName=dwtestcase, dataWindowName=dw_appeon_demo_employee_status_completion_total_cs_manager, dWSqlString=, DBType=12, argNameList=, argDataTypeList=, isProceSource=0, obj.getTableNames()=, obj.isCacheInAEM()=false

And when you check the Appeonerror.log file and you will see the following error.

1395149292851 [14-03-18 09:28:12.851] java.sql.SQLDataException: data exception: string data, right truncation

1395149292851 [14-03-18 09:28:12.851] at org.hsqldb.jdbc.Util.sqlException(Unknown Source)

1395149292851 [14-03-18 09:28:12.851] at org.hsqldb.jdbc.Util.sqlException(Unknown Source)

1395149292851 [14-03-18 09:28:12.851] at org.hsqldb.jdbc.JDBCPreparedStatement.fetchResult(Unknown Source)

1395149292851 [14-03-18 09:28:12.851] at org.hsqldb.jdbc.JDBCPreparedStatement.executeUpdate(Unknown Source)

1395149292851 [14-03-18 09:28:12.851] at com.appeon.server.controller.ServerController.executeDBAddProc(ServerController.java:971)

1395149292851 [14-03-18 09:28:12.851] at com.appeon.server.services.datawindowservice.DBDWSqlForDEV.executeAddProc(DBDWSqlForDEV.java:257)

1395149292851 [14-03-18 09:28:12.851] at com.appeon.server.services.datawindowservice.DBDWSqlForDEV.commit(DBDWSqlForDEV.java:162)

1395149292851 [14-03-18 09:28:12.851] at com.appeon.server.services.datawindowservice.DWCache.commit(DWCache.java:634)

1395149292851 [14-03-18 09:28:12.851] at com.appeon.developer.command.CommitCommand.execute(CommitCommand.java:87)

1395149292851 [14-03-18 09:28:12.851] at com.appeon.developer.DEVAgentImpl.executeCommand(DEVAgentImpl.java:209)

1395149292851 [14-03-18 09:28:12.851] at com.appeon.developer.DEVAgentImpl.call(DEVAgentImpl.java:82)

1395149292851 [14-03-18 09:28:12.851] at appeon.weblibrary.DEVFactory.doPost(DEVFactory.java:106)

1395149292851 [14-03-18 09:28:12.851] at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)

1395149292851 [14-03-18 09:28:12.851] at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

1395149292851 [14-03-18 09:28:12.851] at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)

1395149292851 [14-03-18 09:28:12.851] at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)

1395149292851 [14-03-18 09:28:12.851] at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)

1395149292851 [14-03-18 09:28:12.851] at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)

1395149292851 [14-03-18 09:28:12.851] at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3498)

1395149292851 [14-03-18 09:28:12.851] at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)

1395149292851 [14-03-18 09:28:12.851] at weblogic.security.service.SecurityManager.runAs(Unknown Source)

1395149292851 [14-03-18 09:28:12.851] at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)

1395149292851 [14-03-18 09:28:12.851] at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)

1395149292851 [14-03-18 09:28:12.851] at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)

1395149292851 [14-03-18 09:28:12.851] at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)

1395149292851 [14-03-18 09:28:12.851] at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

Cause analysis:

 The length of the DataWindow object name supported by the Appeon DB is 50 by default, so when the length of the DataWindow object name is over 50 then the information of DataWindow submitted to the Appeon server by the Appeon developer will fail.

For example, the error stated in the Phenomenon above is for the DataWindow object whose name is dw_appeon_demo_employee_status_completion_total_cs_manager (its length is 59).

Solutions:

Solution 1:

Follow up the steps below to modify your PB codes to resolve this issue.

1. Change the datawindow object name to a shorter string which is less than 50. For example, you can change dw_appeon_demo_employee_status_completion_total_cs_manager into dw_emp_status_completion_total_cs_manager.

2. Redeploy your application.

Solution 2:

Follow up the steps below to modify the length of DWNAME column in Appeon DB to resolve this issue.

1. Backup the appeondb.script under the %Appeon Server home %\appeon\repository\%your_instance%\db folder.

2. Modify the value highlighted below to a suitable value.

For example,

The original scripts are shown as below:

……

CREATE MEMORY TABLE PUBLIC.T_DATAWINDOWSYNTAXSTRING(APPNAME CHARACTER(50),DWNAME CHARACTER(50),DWSYNTAXSTRING VARBINARY(16777216),EXPRESSION VARCHAR(16777216),CACHEFLAG CHARACTER(1),CACHETIME CHARACTER(25),COMMENTS VARCHAR(16777216))

……

CREATE MEMORY TABLE PUBLIC.T_DATAWINDOWSQLSTRING(APPNAME VARCHAR(50) NOT NULL,DWNAME VARCHAR(50) NOT NULL,DWSQLSTRING VARBINARY(16777216),DBTYPE VARCHAR(50) NOT NULL,ARGNAMELIST VARBINARY(16777216),ARGDATATYPELIST VARBINARY(16777216),ISPROCESOURCE CHARACTER(5),CACHEFLAG CHARACTER(1),CACHETIME CHARACTER(25),TABLENAMES VARBINARY(16777216),ISCACHEINAEM CHARACTER(1) DEFAULT '1',PRIMARY KEY(APPNAME,DWNAME,DBTYPE))

……

You need to modify them into the followings:

……

CREATE MEMORY TABLE PUBLIC.T_DATAWINDOWSYNTAXSTRING(APPNAME CHARACTER(50),DWNAME VARCHAR (100),DWSYNTAXSTRING VARBINARY(16777216),EXPRESSION VARCHAR(16777216),CACHEFLAG CHARACTER(1),CACHETIME CHARACTER(25),COMMENTS VARCHAR(16777216))

……

CREATE MEMORY TABLE PUBLIC.T_DATAWINDOWSQLSTRING(APPNAME VARCHAR(50) NOT NULL,DWNAME VARCHAR(100) NOT NULL,DWSQLSTRING VARBINARY(16777216),DBTYPE VARCHAR(50) NOT NULL,ARGNAMELIST VARBINARY(16777216),ARGDATATYPELIST VARBINARY(16777216),ISPROCESOURCE CHARACTER(5),CACHEFLAG CHARACTER(1),CACHETIME CHARACTER(25),TABLENAMES VARBINARY(16777216),ISCACHEINAEM CHARACTER(1) DEFAULT '1',PRIMARY KEY(APPNAME,DWNAME,DBTYPE))

……

3.Restart your application Server.

4. Redeploy your application.

3
3