In the context of LSPS, the term log can refer to one of the following:
A log entry made when a model instances executes the Log task or log()
function call.
Both, the task type and the function, are provided by the Standard Library and the entries are visible in the Logs view of the Management perspective and Management Console. These logs are stored in the LSPS_LOGS table of the LSPS system database.
A process log entry which is automatically created by model instances.
These are logs about execution progress. They are stored in the LSPS_PROCESS_LOG table and are not visible from any client. Further information is available in the Server Installation and Upgrade Guide
debugLog()
function which is displayed in standard output.The JBoss or Wildfly server returns the following XA exception:
WARN [com.arjuna.ats.jta.logging.loggerI18N] [com.arjuna.ats.internal.jta.recovery.xarecovery1] Local XARecoveryModule.xaRecovery got XA exception javax.transaction.xa.XAException, XAException.XAER_RMERR
To remedy the situation, the database user has all required access rights:
For Oracle, make sure the Oracle user has access to the appropriate tables so they can accomplish the recovery:
Substitute user
with the user that connects from JBoss to Oracle. This solution works for Oracle 10g R2 (patched for bug 5945463) and 11g.
In an unpatched version older that 11g change the last GRANT EXECUTE to the following:
javac
is on the classpath if the embedded server starts with the following exception: JAVA_HOME
environment variable and add it to the PATH environment variable.If you are using MSSQL data source in your SDK Embedded Server, the server might start with the following exception:
java.lang.SecurityException: Invalid signature file digest for Manifest main attributes at sun.security.util.SignatureFileVerifier.processImpl(Unknown Source) ... Error: A JNI error has occurred, please check your installation and try again Exception in thread "main"
This happens because com.microsoft.sqlserver.jdbc.SQLServerDriver pulls additional dependencies. Exclude the dependencies in the <YOUR__APP>-db-migration project pom.xml:
...
<configuration>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
<!-- Additional configuration. -->
</configuration>
If you get the following exception, fix the jdbc url of LSPS_DS in <YOUR_APP>-embedded/conf/conf/openejb.xml
to JdbcUrl jdbc:h2:tcp://localhost/./h2/h2;MVCC=TRUE;LOCK_TIMEOUT=60000
.
WARN JdbcServicesImpl HHH000342: Could not obtain connection to query metadata : A file path that is implicitly relative to the current working directory is not allowed in the database URL "jdbc:h2:tcp://localhost/h2/h2;MVCC=TRUE;LOCK_TIMEOUT=60000". Use an absolute path, ~/name, ./name, or the baseDir setting instead. [90011-197]
Exception in thread "main" org.apache.openejb.OpenEJBException: Creating application failed: /home/eko/testing/3.2.1038/ekassa/ekassa/ekassa-embedded/Launcher.EAR: org.apache.openejb.OpenEJBRuntimeException: javax.persistence.PersistenceException: [PersistenceUnit: lsps-pm] Unable to build EntityManagerFactory: javax.persistence.PersistenceException: [PersistenceUnit: lsps-pm] Unable to build EntityManagerFactory
at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:843)
at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:677)
at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:673)
at com.whitestein.lsps.launcher.Launcher.launch(Launcher.java:129)
at com.whitestein.ekassa.embedded.LSPSLauncher.main(LSPSLauncher.java:27)
Caused by: org.apache.openejb.OpenEJBException: org.apache.openejb.OpenEJBRuntimeException: javax.persistence.PersistenceException: [PersistenceUnit: lsps-pm] Unable to build EntityManagerFactory: javax.persistence.PersistenceException: [PersistenceUnit: lsps-pm] Unable to build EntityManagerFactory
at org.apache.openejb.assembler.classic.Assembler.loadPersistenceUnits(Assembler.java:988)
at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:741)
To disable remote access to the Application User Interface the SDK Embedded Server, add the following filter to the <YOUR-APPLICATION>/vaadin-war/src/main/webapp/WEB-INF/web.xml
:
<filter>
<filter-name>Remote Address Filter</filter-name>
<filter-class>org.apache.catalina.filters.RemoteAddrFilter</filter-class>
<init-param>
<param-name>allow</param-name>
<param-value>127.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>Remote Address Filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
To do the same for Management Console, expand the application EAR you created and add the filter to the lsps-management/web.xml file. Then recreate the EAR.
In your server logging configuration, activate the debug log level for com.whitestein.lsps.engine.CommunicationServiceBean
and com.whitestein.lsps.engine.ProcessAgentImpl
services and inspect the log.
Infinispan on JBoss and Wildfly returns the ISPN000299: Unable to acquire lock after 15 seconds
: this occurs when an operation takes too long so the session is locked and fails to acknowledge the Vaadin heartbeat from the Application User Interface.
To remedy the problem, do the following:
<cache-container name="web" default-cache="passivation" module="org.wildfly.clustering.web.infinispan">
<local-cache name="passivation">
<!-- CHANGED the acquire-timeout here: -->
<locking isolation="REPEATABLE_READ" acquire-timeout="600000"/>
<transaction mode="BATCH"/>
<file-store passivation="true" purge="false"/>
</local-cache>
</cache-container>
When Websphere is configured to store JMS tables in the DB which already contains such tables, for example, as a result of a previous installation, it fails with the error:
To resolve the problem, delete the tables with the SIB
prefix from the LSPS database: DROP TABLE "LSPS"."SIB000";DROP TABLE "LSPS"."SIB001";DROP TABLE "LSPS"."SIBCLASSMAP";
When timers are stored in the database that is accessed using an XA datasource, such as, LSPS_DS, WebSphere might return an exception with
This happens because WebSphere fails to create the tables.
To resolve the problem, create the scheduler tables using \<WASROOT>/Scheduler/createSchemaMod1\<YOUR_DB>.ddl
To check timer service properties:
To prevent update of database schema when you upload a data-type model, you have the following options:
Clean cache of your browser.
Delete the browser cookies.
Make sure your browser does not use out-of-date cookies and cached data: Clean the cookies and cached data.
Make sure your lspsVaadinApp servlet in the web.xml of the Application User Interface contains the closeIdleSessions
parameter:
<!-- Vaadin servlet --> <servlet> <servlet-name>LspsVaadinApp</servlet-name> ... <init-param> <param-name>closeIdleSessions</param-name> <param-value>true</param-value> </init-param> </servlet>
This prevents Vaadin from sending heartbeats to the server after the session-timeout period. The session timeout is set in minutes in web.xml.
This is caused by Eclipse issue 497705. To remedy the situation, create a new Designer launcher:
Right-click the module and go to Restore from Local History.
Go to Window > Perspective > Reset Perspective.
An executable Module can become a model instance, while a non-executable module is intended as a resource and cannot be instantiated: If you have a module where you define the data model only (like in the model in the MVC pattern), it is not intended for execution. Hence it does not require the execution flag.
Note that if you import an executable module to another executable module, and you instantiate the importing module (the parent), the imported executable module will be instantiated as part of the model instance.
Make sure that the variable is in a context the other variable can access. If working with local variables of the same context, make sure the variable is already initialized: variables are initialized in the order they are defined in (make sure, the variables are not sorted alphabetically when using the Outline view).
getResource()
function: toString()
function on the content of File: Check if you are not using a semi-colon (;
) instead of a comma (,
) as a separator of the collection items: the system returns the last expression as the collection content.
Typical case of a misplaced semi-colon
new CategoryDataSeries([ //semi-colon at the end of the following line causes that //only the next line is returned as the content //of the collection: new CategoryDataSeriesItem("Pears", 1, 5); new CategoryDataSeriesItem("Apples", 2, 6); ]);
If you want to create a model instance from an expression, call the createModelInstance()
function:
When creating multiple instances, consider creating them asynchronously to prevent timeout of the transaction and its subsequent rollback.
If you want to create a model instance over an entity, pass the shared Record to the createModelInstance()
function:
You can then get the Record with a getProcessEntity(MyRecord)
function call.
To get to-dos of a model instance, create a query with the model instance as its parameter that return the Todo type and define a condition that will exclude to-dos of other model instances, for example, todoIterator.modelInstanceId == modelInstanceParameter.id;
Use the findAll()
function of the Standard Library to get all the shared records of a particular type. Also note you can use the countAll()
function to get the number of the shared records.
isProxy()
call.preCreateWidget()
method to create the proxies.Create indexes for foreign keys on the data relationship ends: select the relationship and in the Properties view, define the indexes on the Indexes tab. Alternatively, you can generate them automatically: in the Outline view, on the Tree tab,-click the root node Data Types and in its Properties view click the Generate Indexes button.
You can find information on how the schema was changed in the Module Management view of the Management Perspective: click the Schema Update Scripts tab.
Check whether the data type model meets the following:
This occurs due to an issue in Hibernate. To work around it, do one of the following:
This section contains frequently asked questions concerning the forms created with the resources of the ui module of the Standard Library.
If you are assigning a value to your variable in an InitListener, make sure the component with the InitListener is actually displayed. InitEvents are fired only on component display.
Make sure the Listener is defined by expression
option on the Expression tab is not selected.
This section contains frequently asked questions concerning the forms created with the resources of the forms module of the Standard Library.
Since the support for font awesome has been deprecated by Vaadin, it is now delivered as part of the extensions of the vaadin project. If you are using your custom theme, include the @include lsps-extensions-at-root;
statement in your styles.scss to remedy the situation.
If a component ignores such calls as setWidthFull()
, setWidthWrap()
setHeightFull()
, setHeightWrap()
, it is probably due to default style settings in the theme.
For example, if you call setWidthFull()
on a TextArea, the width will retain it width. Such default settings are provided to prevent cases where the component is not displayed unless its size is explicitly specified, for example, if you had a text area in a layout and the layout would wrap its content and the text area would fill its parent (this is equivalent to a setWidthFull() call).
To adapt the size of your component, create a custom theme and set the size of the component style as required.
Example of a text area scss that fills the parent and has a minimum width
/* from a dedicated _textarea.scss in the sass folder */ @mixin _textarea { .v-textarea { width: 100%; min-width: 100px; } } /* the mixing is included in the styles.scss of the theme */
To add a file with a style sheet to your module, do the following:
addStyleSheet()
on the file: To test the rules, you can use the addStyleName()
component method.
If you are using the None value in the Filter value provider, make sure the type of the column value provide on the Detail tab of the column defines its value (in the case of Identity, the value should be set to the type, such as String
).
If a data series does not plot correctly, consider defining the values for all properties explicitly, for example, if you are changing the color of a decimal series, apart from the color parameter, set also the range to true
and lineStyle to lineStyle.solid
:
This happens on the root components of the Expression component: the modeling id of the root component returned by the expression in the Expression component uses the modeling id as set on the Expression Component in its properties. Calls to setModelingId()
on the component that is the content of the Expression component are ignored.
A process that has parameters cannot run without its parameters; hence, it can be instantiated only by another entity which provides the parameters. To solve the situation, display the properties of the process and on the Detail tab unselect Instantiate Automatically.
A document is not part of a model instance and process instances can exist only as part of a model instance. Hence this is not possible. However, you can create a model instance with the createModelInstance()
call.
Typically when setting access rights for to-dos and documents, you want to check if the user who is working with the application at the given moment has the required modeled role. Use the isPersonIn()
function.
Close and reopen the editor.
Validation reports an error of an undefined symbol for an expression that should result in in a Type: This happens if the type contains <>
. To solve the problem, wrap the type in the type()
function.
formatDate()
method with the date format as it parameter; the formatter uses the DateTimeFormat with the pattern and time zone. format()
: Though you can use the foreach
construct, consider the collect()
function of the Standard Library, especially if you create new collections in the cycle: the collect()
function runs a closure on each item and returns a list with the outputs from the closures.
Example over List
//list with lists of values and names for the ListDataSeriesItem: def List<List<Object>> itemList1 := [[1, "I am item 1 with value 1"], [3, "I am item 2 with value 3"], [1.3, "I am item 3 with value 1.3"] ]; def ListDataSeries ls1 := //Collect returns a list of ListDataSeriesItem; it is then passed to the ListDataSeries constructor: new ListDataSeries (collect(itemList1, { i -> def ListDataSeriesItem li := new ListDataSeriesItem(i[0] as Decimal); li.name := i[1] as String; li}));
Example over Map
//map of values and names for the ListDataSeriesItem: def Map<Decimal, String> mapsOfItems := [1 -> "I am item 1.", 3 -> "I am item 2.", 1.3 -> "I am item 3."]; //Creating a list of data series: [ new ListDataSeries (collect (mapsOfItems, { k,v -> def ListDataSeriesItem li := new ListDataSeriesItem(k, v)} ) ) ]
If your MS SQL Server reports deadlocks, the problem might by cause by orphaned transaction: make sure to kill any hanging orphaned transactions that block database resources if such transactions are present.
Example of a select that returns orphan transactions
When running on MySQL 5.6 with multibyte encoding (UTF-8), check if your database uses Barracuda
as file format: SHOW VARIABLES LIKE 'innodb_file_format'
If it is not the case, set the global innodb_file_format=Barracuda;set global innodb_large_prefix=on;ROW_FORMAT DYNAMIC
If you are not using Barracuda, the initialization of the LSPS database will fail with the exception:
This occurs because MySQL uses the InnoDB engine which restricts the column length and LSPS requires wider columns than allowed by MySQL.
When migrating the LSPS database on MySQL from an LSPS version older than 3.3.2069, the following exception occurs:
Exception in thread "main" org.flywaydb.core.api.FlywayException: Validate failed. Migration Checksum mismatch for migration 2.6 -> Applied to database : -1913434156 -> Resolved locally : 68228300 at org.flywaydb.core.Flyway.doValidate(Flyway.java:1108) at org.flywaydb.core.Flyway.access$300(Flyway.java:62) at org.flywaydb.core.Flyway$1.execute(Flyway.java:1012) at org.flywaydb.core.Flyway$1.execute(Flyway.java:1006) at org.flywaydb.core.Flyway.execute(Flyway.java:1418) at org.flywaydb.core.Flyway.migrate(Flyway.java:1006) at com.whitestein.lsps.dbmigration.DbMigration.runFlywayCommand(DbMigration.java:274) at com.whitestein.lsps.dbmigration.DbMigration.migrate(DbMigration.java:141) at com.whitestein.lsps.dbmigration.DbMigration.main(DbMigration.java:86)
This happens due to the required change of the database character set to utf8mb4
and collation to utf8mb4_unicode_ci
which is a 4-byte encoding as opposed to the previously recommended utf8
with utf8_general_ci
which is a deprecated 3-byte encoding. As a result the indexes of the database had to be shortened.
To remedy the problem, run the migration with --flyway repair
and then migrate again:
~/lsps-tools-33/cli-tools $ java -jar lsps-db-migration-lsps-3.3.2069-full.jar --databaseUrl jdbc:mysql://localhost/lsps --user lsps --password lsps --flyway repair Nov 26, 2019 1:40:43 PM org.flywaydb.core.internal.util.logging.slf4j.Slf4jLog info INFO: Flyway 3.2.1 by Boxfuse Nov 26, 2019 1:40:43 PM org.flywaydb.core.internal.util.logging.slf4j.Slf4jLog info INFO: Database: jdbc:mysql://localhost/lsps (MySQL 5.7) Nov 26, 2019 1:40:43 PM org.flywaydb.core.internal.util.logging.slf4j.Slf4jLog info INFO: Repair of failed migration in metadata table `lsps`.`LSPS_SCHEMA_VERSION` not necessary. No failed migration detected. Nov 26, 2019 1:40:43 PM org.flywaydb.core.internal.util.logging.slf4j.Slf4jLog info INFO: Updating checksum of 2.6 to 68228300 ... Nov 26, 2019 1:40:43 PM org.flywaydb.core.internal.util.logging.slf4j.Slf4jLog info INFO: Metadata table `lsps`.`LSPS_SCHEMA_VERSION` successfully repaired (execution time 00:00.146s). Nov 26, 2019 1:40:43 PM org.flywaydb.core.internal.util.logging.slf4j.Slf4jLog info INFO: Manual cleanup of the remaining effects the failed migration may still be required. ~/sps-runtime-33/cli-tools $ java -jar lsps-db-migration-lsps-3.3.2069-full.jar --databaseUrl jdbc:mysql://localhost/lsps --user lsps --password lsps
When migrating or initializing the LSPS database on mysql8, the process might fail with the following exception:
Exception in thread "main" org.flywaydb.core.api.FlywayException: Unable to obtain Jdbc connection from DataSource at org.flywaydb.core.internal.util.jdbc.JdbcUtils.openConnection(JdbcUtils.java:56) at org.flywaydb.core.Flyway.execute(Flyway.java:1385) at org.flywaydb.core.Flyway.migrate(Flyway.java:1006) at com.whitestein.lsps.dbmigration.DbMigration.runFlywayCommand(DbMigration.java:274) at com.whitestein.lsps.dbmigration.DbMigration.migrate(DbMigration.java:141) at com.whitestein.lsps.dbmigration.DbMigration.main(DbMigration.java:86) Caused by: java.sql.SQLNonTransientConnectionException: Public Key Retrieval is not allowed at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:110) at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97) at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:835) at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:455) at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:240) at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:199) at com.mysql.cj.jdbc.MysqlDataSource.getConnection(MysqlDataSource.java:402) at com.mysql.cj.jdbc.MysqlDataSource.getConnection(MysqlDataSource.java:125) at com.mysql.cj.jdbc.MysqlDataSource.getConnection(MysqlDataSource.java:110) at org.flywaydb.core.internal.util.jdbc.JdbcUtils.openConnection(JdbcUtils.java:50) ... 5 more
To remedy the situation, remove the useSSL=false
parameter from the database URL.
The recommended best practise is to structure your project as follows:
Example project structure
In the lsps-design_64.ini
in $Designer_HOME, add the following before vmargs
:
--launcher.GTK_version
Alternatively, add set the SWT_GTK3 environment variable to 0
:
export SWT_GTK3=0
If a to-do or document returns an error similar to the following, reset the to-dos and delete the relevant documents from the database (currently no API for this action is provided).