Getting strange errors in executeScript activity

SeanLapointe

23-07-2019

In Workbench for AEM Forms 6.4, in an executeScript activity, I have been getting some odd errors with my code. It is telling me that there are missing methods and classes that should be there. This code works fine outside of the executeScript activity (in Eclipse running the same java version). I even checked in the jar of the Microsoft sql and can see the class file in the server class path/modules folder. I have found other ways around these errors, but I would prefer to use the "missing" classes. I am not sure what I am doing wrong with this. Does anyone have any suggestions?

[org.jboss.as.ejb3.invocation] (default-threads - 29) WFLYEJB0034: EJB Invocation failed on component EjbTransactionCMTAdapter for method public abstract java.lang.Object com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterLocal.doRequired(com.adobe.idp.dsc.transaction.TransactionDefinition,com.adobe.idp.dsc.transaction.TransactionCallback) throws com.adobe.idp.dsc.DSCException: javax.ejb.EJBTransactionRolledbackException: Sourced file: inline evaluation of: ``import java.io.File; import java.io.IOException; import java.nio.file.Files; imp . . . '' : Error in method invocation: Static method readAttributes( sun.nio.fs.WindowsPath, java.lang.Class ) not found in class'java.nio.file.Files' : at Line: 274 : in file: inline evaluation of: ``import java.io.File; import java.io.IOException; import java.nio.file.Files; imp . . . '' : Files .readAttributes ( f .toPath ( ) , BasicFileAttributes .class )

[org.jboss.as.ejb3.invocation] (default-threads - 33) WFLYEJB0034: EJB Invocation failed on component EjbTransactionCMTAdapter for method public abstract java.lang.Object com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterLocal.doRequired(com.adobe.idp.dsc.transaction.TransactionDefinition,com.adobe.idp.dsc.transaction.TransactionCallback) throws com.adobe.idp.dsc.DSCException: javax.ejb.EJBTransactionRolledbackException: Sourced file: inline evaluation of: ``import javax.naming.InitialContext;  import javax.sql.DataSource;  import java.s . . . '' : Class: com.microsoft.sqlserver.jdbc.SQLServerException not found in namespace : at Line: 93 : in file: inline evaluation of: ``import javax.naming.InitialContext;  import javax.sql.DataSource;  import java.s . . . '' : com .microsoft .sqlserver .jdbc .SQLServerException

View Entire Topic

WASIL

Employee

23-07-2019

Are you querying using javax.sql.DataSource ? You may use SQL related operations available on OOTB JDBC category. It appears to be issue with the script. Make sure you import the required classes. Share your sample script here if possible

Thanks,

Wasil