Facing issue to Build and deploy backbase custom authenticator - spring-boot

I am working on backbase identity version 2022-08-LTS. Trying to use custom authenticator using link but when i execute the command java -cp ../custom-authenticator/target/custom-authenticator-2022.08-LTS-jar-with-dependencies.jar:backbase-identity-1.10.6.1-cr.0.jar io.quarkus.runner.GeneratedMain from backbase-identity module then got error Error: Could not find or load main class io.quarkus.runner.GeneratedMain Caused by: java.lang.ClassNotFoundException: io.quarkus.runner.GeneratedMain can any one help me on it

Related

Unable to build AWS SQS Connector (V1.0.7) by using Apache Maven 3.8.4

I want to edit SendMessage Operation Code in existing AWS SQS Connector(V1.0.7) and wanna to build this editable connector and use it in WSO2 EI 6.4.0.
Reason to edit existing Code:
Unable to post incoming payload into AWS SQS Queue often. For more reference click here
Steps I followed:
I just downloaded AWS SQS Connector (V1.0.7) from GitHub by using Download Zip Option.
after unzipping it, i did mvn clean install by navigate to directory called "esb-connector-amazonsqs-org.wso2.carbon.connector.amazonsqs-1.0.7"
Build Successful by using Apache maven 3.8.4 and got zip file inside "target" directory.
I have taken that zip file and unzipped it to add below code in Send Operation
Just adding Endpoint Timeout Error handling to existing http call.
<http method="post" uri-template="{uri.var.apiUrl}{+uri.var.httpRequestUri}">
<timeout>
<duration>60000</duration>
</timeout>
<suspendOnFailure>
<errorCodes>-1</errorCodes>
<initialDuration>0</initialDuration>
<progressionFactor>1.0</progressionFactor>
<maximumDuration>0</maximumDuration>
</suspendOnFailure>
<markForSuspension>
<retriesBeforeSuspension>0</retriesBeforeSuspension>
</markForSuspension>
</http>
After adding above code, I tried 2 ways.
i made it as zip file and one way is place that into target directory and did same
maven build again once build successful. Modified code not exist when i review again, only existing code available, in SendMessage Operation
Another way is i directly used modified zip code and place it inside server(Connectors-->Add) which leads to below issue, Connector deployment is unsuccessful.
ERROR LOG:
[2022-01-21 12:25:05,159] ERROR {org.apache.synapse.deployers.LibraryArtifactDeployer} - Deployment of synapse artifact failed for synapse libray at : C:\Development_Avecto\WSo2EIServers\wso2ei-6.6.0\wso2ei-6.6.0\repository\deployment\server\synapse-libs\amazonsqs-connector-1.0.7.zip : Error while extracting Synapse Library : amazonsqs-connector-1.0.7.zip org.apache.synapse.SynapseException: Error while extracting Synapse Library : amazonsqs-connector-1.0.7.zip
at org.apache.synapse.libraries.util.LibDeployerUtils.extractSynapseLib(LibDeployerUtils.java:426)
at org.apache.synapse.libraries.util.LibDeployerUtils.createSynapseLibrary(LibDeployerUtils.java:65)
at org.apache.synapse.deployers.LibraryArtifactDeployer.deploy(LibraryArtifactDeployer.java:60)
at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:807)
at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144)
at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:377)
at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:254)
at org.apache.axis2.deployment.RepositoryListener.startListener(RepositoryListener.java:371)
at org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(SchedulerTask.java:59)
at org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask.java:67)
at org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask.runAxisDeployment(CarbonDeploymentSchedulerTask.java:93)
at org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask.run(CarbonDeploymentSchedulerTask.java:138)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.FileNotFoundException: C:\Development_Avecto\WSo2EIServers\wso2ei-6.6.0\wso2ei-6.6.0\bin\..\wso2\tmp\libs\1642748105152amazonsqs-connector-1.0.7.zip\amazonsqs-connector-1.0.7\amazonSQS-config\component.xml (The system cannot find the path specified)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
at java.io.FileOutputStream.<init>(FileOutputStream.java:101)
at org.apache.synapse.libraries.util.LibDeployerUtils.extract(LibDeployerUtils.java:469)
at org.apache.synapse.libraries.util.LibDeployerUtils.extractSynapseLib(LibDeployerUtils.java:424)
I know that this is not the right way to do it.
Can any WSO2 Experts guide me the way to edit existing connector code ,building it as connector in order to use the same?
Resolved above connector build issue and Now I can use custom built AWS SQS connector(V1.07) in WSO2 EI Server.
Steps:
Open sendMessage.xml operation file directory esb-connector-amazonsqs-org.wso2.carbon.connector.amazonsqs-1.0.7\src\main\resources\amazonSQS-message
modified section like below.
again goto directory esb-connector-amazonsqs-org.wso2.carbon.connector.amazonsqs-1.0.7 where pom.xml resides
run mvn clean install in above directory.
after build successful, we can get amazonsqs-connector-1.0.7.zip file inside directory esb-connector-amazonsqs-org.wso2.carbon.connector.amazonsqs-1.0.7\target

java.Sql.SQLException, Cannot load class net.ucanaccess.jdbc.UcanaccessDriver

I tried to connect my MS Access Database in Mulesoft using Ucanaccess driver but it raises error Could not load class net.ucanaccess.jdbc.UcanaccessDriver. I have imported all the required JAR's and added the required dependencies in pom.xml also but still it gives same error. I have attached all nescessary details of the problem. Java version - 8, Ucanaccess driver version - 5.0.1 Any suggestion or guidance to proceed further would be helpful for me.
Error Stack Trace
org.mule.runtime.api.connection.ConnectionException: Could not obtain connection from data source
org.mule.runtime.api.connection.ConnectionException: Could not obtain connection from data source
Caused by: org.mule.extension.db.api.exception.connection.ConnectionCreationException: Could not obtain connection from data source
Caused by: java.sql.SQLException: Error trying to load driver: net.ucanaccess.jdbc.UcanaccessDriver : Cannot load class 'net.ucanaccess.jdbc.UcanaccessDriver': [
net.ucanaccess.jdbc.UcanaccessDriver,
Cannot load class 'net.ucanaccess.jdbc.UcanaccessDriver': [
Class 'net.ucanaccess.jdbc.UcanaccessDriver' has no package mapping for region 'domain/default/app/tooling-application-85e45b90-5bac-11eb-84c6-ccd9aca566c1'.,
Cannot load class 'net.ucanaccess.jdbc.UcanaccessDriver': [
Class 'net.ucanaccess.jdbc.UcanaccessDriver' has no package mapping for region '/domain/default'.
Database Config
Pom.xml Dependencies
External Jar
Looks like you need to add the JDBC driver libraries as shared libraries in the pom.xml.
See the documentation at https://docs.mulesoft.com/mule-runtime/4.3/mmp-concept#configure-shared-libraries on how to configure.
Example (you might need to add other libraries):
<sharedLibraries>
<sharedLibrary>
<groupId>net.sf.ucanaccess</groupId>
<artifactId>ucanaccess</artifactId>
</sharedLibrary>
</sharedLibraries>

Flink in ECS fails to find shaded ContainerCredentialsProvider

I'm trying to run Flink 1.7.2 on ECS with Fargate. I've set up the state backend for my job to be RocksDB with a path=s3://...
In my Dockerfile my base image is 1.7.2-hadoop27-scala_2.11, and I run the following 2 commands:
RUN echo "fs.s3a.aws.credentials.provider: org.apache.flink.fs.s3hadoop.shaded.com.amazonaws.auth.ContainerCredentialsProvider" >> "$FLINK_CONF_DIR/flink-conf.yaml"
RUN cp /opt/flink/opt/flink-s3-fs-hadoop-1.7.2.jar /opt/flink/lib/flink-s3-fs-hadoop-1.7.2.jar
Just like it says in
https://issues.apache.org/jira/browse/FLINK-8439
However I get the following exception:
Caused by: java.io.IOException: From option fs.s3a.aws.credentials.provider java.lang.ClassNotFoundException: Class org.apache.flink.fs.s3hadoop.shaded.com.amazonaws.auth.ContainerCredentialsProvider not found
at org.apache.flink.fs.shaded.hadoop3.org.apache.hadoop.fs.s3a.S3AUtils.loadAWSProviderClasses(S3AUtils.java:592)
at org.apache.flink.fs.shaded.hadoop3.org.apache.hadoop.fs.s3a.S3AUtils.createAWSCredentialProviderSet(S3AUtils.java:556)
at org.apache.flink.fs.shaded.hadoop3.org.apache.hadoop.fs.s3a.DefaultS3ClientFactory.createS3Client(DefaultS3ClientFactory.java:52)
at org.apache.flink.fs.shaded.hadoop3.org.apache.hadoop.fs.s3a.S3AFileSystem.initialize(S3AFileSystem.java:256)
at org.apache.flink.fs.s3.common.AbstractS3FileSystemFactory.create(AbstractS3FileSystemFactory.java:125)
at org.apache.flink.core.fs.FileSystem.getUnguardedFileSystem(FileSystem.java:395)
at org.apache.flink.core.fs.FileSystem.get(FileSystem.java:318)
at org.apache.flink.core.fs.Path.getFileSystem(Path.java:298)
at org.apache.flink.runtime.state.filesystem.FsCheckpointStorage.<init>(FsCheckpointStorage.java:58)
at org.apache.flink.runtime.state.filesystem.FsStateBackend.createCheckpointStorage(FsStateBackend.java:444)
at org.apache.flink.contrib.streaming.state.RocksDBStateBackend.createCheckpointStorage(RocksDBStateBackend.java:407)
at org.apache.flink.runtime.checkpoint.CheckpointCoordinator.<init>(CheckpointCoordinator.java:249)
... 17 more
Caused by: java.lang.ClassNotFoundException: Class org.apache.flink.fs.s3hadoop.shaded.com.amazonaws.auth.ContainerCredentialsProvider not found
at org.apache.flink.fs.shaded.hadoop3.org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:2375)
at org.apache.flink.fs.shaded.hadoop3.org.apache.hadoop.conf.Configuration.getClasses(Configuration.java:2446)
at org.apache.flink.fs.shaded.hadoop3.org.apache.hadoop.fs.s3a.S3AUtils.loadAWSProviderClasses(S3AUtils.java:589)
... 28 more
Looking in the flink-s3-fs-hadoop-1.7.2.jar I see that the package of the class ContainerCredentialsProvider is actually org.apache.flink.fs.s3base.shaded.com.amazonaws.auth
I already tried:
Adding the aws-sdk-core jar to the lib, and setting the credentials provider to be just com.amazonaws.auth.ContainerCredentialsProvider (without the shading) but I get the problem mentioned in the issue link above
Setting the credentials provider to be org.apache.flink.fs.s3base.shaded.com.amazonaws.auth.ContainerCredentialsProvider but then the code in S3FileSystemFactory.java prefixes it with org.apache.flink.fs.s3hadoop.shaded.
Any ideas here for finding the class?
The issue was resolved in one of the versions after.
I ran it on Flink 1.9.0 cluster with the following line:
RUN echo "fs.s3a.aws.credentials.provider: com.amazonaws.auth.ContainerCredentialsProvider" >> "$FLINK_CONF_DIR/flink-conf.yaml"
and the class is found and works.
You can see in:
https://github.com/apache/flink/blob/master/flink-filesystems/flink-s3-fs-hadoop/src/main/java/org/apache/flink/fs/s3hadoop/S3FileSystemFactory.java
that the FLINK_SHADING_PREFIX is now correct

Need help in deploying warn using WSAdmin install with JNDI

I am trying to deploy a web application using WSAdmin tool. But it is throwing an error.
JACl script that I am using is :
$AdminApp install /opt/www/temp/SampleApp.war {-nopreCompileJSPs -nodeployejb -server delivery -cell delivery_cell -node delivery_node -appname SampleApp -contextroot SampleApp -MapWebModToVH {{"SampleApp" SampleApp.war,WEB-INF/web.xml default_host}}}
Error I am getting is:
com.ibm.ws.scripting.ScriptingException: WASX7109E: Insufficient data for install task "MapResRefToEJB
ADMA0007E: A validation error occurred in task Mapping resource references to resources. The Java Naming and Directory Interface (JNDI) name is not specified for resource reference jdbc/app_DB in module SampleApp with EJB name.
From the error above I understand that I need to configure my JNDI with -MapResRefToEJB. I tried to understand this option but getting too confused.
Can anyone help me to resolve this issue?
These errors appear to be caused by the MapResRefToEJB option in
the wsadmin command not being set correctly, or the resource it is pointing to
not existing correctly in the web.xml file.
Additional information on MapResRefToEJB
Options for the AdminApp object install, installInteractive, edit,
editInteractive, update, and updateInteractive commands
http://pic.dhe.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=/com.ibm.websphere.nd.doc/info/ae/ae/rxml_taskoptions.html
Thank you
Note : Opinions are my own.

NullPointerException while using RunningCount Aggregation with Engine API

I'm trying to upgrade my application to use BIRT 3.7.1 version. Currently I'm using version 2.6.0.
I'm using the latest stable release 3.7.1.
During my testing I'm facing an exception with a report which is using a serial number(RunningCount Aggregation). This exception comes when I uses the report with the Report Engine API, if I uses the web viewer the report is working fine.
I've attached a small test case to recreate the issue. This includes the report design file and a class where I'm using there ReportEngine to generate the report.
Please find the error log below:
Jan 3, 2012 4:34:42 PM org.eclipse.birt.report.engine.api.impl.RunAndRenderTask doRun
SEVERE: An error happened while running the report. Cause:
java.lang.NullPointerException
at org.eclipse.birt.core.util.IOUtil.writeInt(IOUtil.java:226)
at org.eclipse.birt.core.util.IOUtil.writeObject(IOUtil.java:674)
at org.eclipse.birt.data.engine.executor.transform.SimpleGroupCalculator.next(SimpleGroupCalculator.java:233)
at org.eclipse.birt.data.engine.executor.transform.SimpleResultSet.next(SimpleResultSet.java:562)
at org.eclipse.birt.data.engine.executor.transform.ResultSetWrapper.next(ResultSetWrapper.java:81)
at org.eclipse.birt.data.engine.impl.ResultIterator.hasNextRow(ResultIterator.java:584)
at org.eclipse.birt.data.engine.impl.ResultIterator.nextRow(ResultIterator.java:525)
at org.eclipse.birt.data.engine.impl.ResultIterator.next(ResultIterator.java:475)
at org.eclipse.birt.report.engine.data.dte.QueryResultSet.next(QueryResultSet.java:191)
at org.eclipse.birt.report.engine.executor.ListingElementExecutor.hasNextChild(ListingElementExecutor.java:244)
at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.hasNextChild(WrappedReportItemExecutor.java:86)
at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.hasNextChild(WrappedReportItemExecutor.java:86)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:62)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLTableLM.layoutChildren(HTMLTableLM.java:132)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70)
at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:92)
at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:100)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:180)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:77)
at com.eclipse.birt.test.RunningCountFieldTest.main(RunningCountFieldTest.java:52)
Exception in thread "main" org.eclipse.birt.report.engine.api.EngineException: Error happened while running the report.
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:196)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:77)
at com.eclipse.birt.test.RunningCountFieldTest.main(RunningCountFieldTest.java:52)
Caused by: java.lang.NullPointerException
at org.eclipse.birt.core.util.IOUtil.writeInt(IOUtil.java:226)
at org.eclipse.birt.core.util.IOUtil.writeObject(IOUtil.java:674)
at org.eclipse.birt.data.engine.executor.transform.SimpleGroupCalculator.next(SimpleGroupCalculator.java:233)
at org.eclipse.birt.data.engine.executor.transform.SimpleResultSet.next(SimpleResultSet.java:562)
at org.eclipse.birt.data.engine.executor.transform.ResultSetWrapper.next(ResultSetWrapper.java:81)
at org.eclipse.birt.data.engine.impl.ResultIterator.hasNextRow(ResultIterator.java:584)
at org.eclipse.birt.data.engine.impl.ResultIterator.nextRow(ResultIterator.java:525)
at org.eclipse.birt.data.engine.impl.ResultIterator.next(ResultIterator.java:475)
at org.eclipse.birt.report.engine.data.dte.QueryResultSet.next(QueryResultSet.java:191)
at org.eclipse.birt.report.engine.executor.ListingElementExecutor.hasNextChild(ListingElementExecutor.java:244)
at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.hasNextChild(WrappedReportItemExecutor.java:86)
at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.hasNextChild(WrappedReportItemExecutor.java:86)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:62)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLTableLM.layoutChildren(HTMLTableLM.java:132)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70)
at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:92)
at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:100)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:180)
... 2 more
You can find a sample program to recreate the issue in GitHub.
Please help me to fix this issue.
I solve this issue by separating both run and render tasks of the Report Engine API.
Instead of using IRunAndRenderTask task = engine.createRunAndRenderTask(design); run both IRunTask runTask = engine.createRunTask(design); and IRenderTask renderTask = engine.createRenderTask(iReportDocument); separatly.

Resources