Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in Jenkins build. javax.ws.rs.ProcessingException: Error reading entity from input stream #520

Closed
aalapargekartibco opened this issue Nov 17, 2020 · 7 comments

Comments

@aalapargekartibco
Copy link

I am using Jenkins to build Tibco 6 EAR and deploy to appspace. Jenkins refers the pom file created by the maven plugin. Everything works but in the end of the build I get this error mentioned below. It feels like when maven runs the bwadmin command to deploy and start the application, Jenkins is trying to read the logs of the bwadmin and is not able to. This might not be an issue with the plugin and might be a jenkins issue but sharing here in case anyone can assist.

javax.ws.rs.ProcessingException: Error reading entity from input stream
Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of java.util.LinkedHashMap<java.lang.Object,java.lang.Object> out of START_ARRAY token
at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 227, column: 25] (through reference chain: com.tibco.bw.maven.plugin.admin.dto.Application["instances"]->java.util.ArrayList[0]->com.tibco.bw.maven.plugin.admin.dto.AppInstance["endpoints"]->java.util.ArrayList[0]->com.tibco.bw.maven.plugin.admin.dto.Endpoint["properties"])

This is the complete log:
[INFO] Uploading the Archive file -> SimpleRest6xAS_5.0.0.ear
[INFO] Deploying the Application with name -> SimpleRest6xAS with Profile -> stage.substvar
[ERROR]
javax.ws.rs.ProcessingException: Error reading entity from input stream.
at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity (InboundMessageContext.java:868)
at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity (InboundMessageContext.java:785)
at org.glassfish.jersey.client.ClientResponse.readEntity (ClientResponse.java:326)
at org.glassfish.jersey.client.InboundJaxrsResponse$1.call (InboundJaxrsResponse.java:115)
at org.glassfish.jersey.internal.Errors.process (Errors.java:315)
at org.glassfish.jersey.internal.Errors.process (Errors.java:297)
at org.glassfish.jersey.internal.Errors.process (Errors.java:228)
at org.glassfish.jersey.process.internal.RequestScope.runInScope (RequestScope.java:419)
at org.glassfish.jersey.client.InboundJaxrsResponse.runInScopeIfPossible (InboundJaxrsResponse.java:267)
at org.glassfish.jersey.client.InboundJaxrsResponse.readEntity (InboundJaxrsResponse.java:112)
at com.tibco.bw.maven.plugin.admin.client.RemoteDeployer.checkApplicationState (RemoteDeployer.java:540)
at com.tibco.bw.maven.plugin.admin.client.RemoteDeployer.addAndDeployApplication (RemoteDeployer.java:327)
at com.tibco.bw.maven.plugin.application.BWEARInstallerMojo.execute (BWEARInstallerMojo.java:228)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.jvnet.hudson.maven3.launcher.Maven35Launcher.main (Maven35Launcher.java:130)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (Unknown Source)
at java.lang.reflect.Method.invoke (Unknown Source)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at jenkins.maven3.agent.Maven35Main.launch (Maven35Main.java:178)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (Unknown Source)
at java.lang.reflect.Method.invoke (Unknown Source)
at hudson.maven.Maven3Builder.call (Maven3Builder.java:139)
at hudson.maven.Maven3Builder.call (Maven3Builder.java:70)
at hudson.remoting.UserRequest.perform (UserRequest.java:211)
at hudson.remoting.UserRequest.perform (UserRequest.java:54)
at hudson.remoting.Request$2.run (Request.java:375)
at hudson.remoting.InterceptingExecutorService$1.call (InterceptingExecutorService.java:73)
at java.util.concurrent.FutureTask.run (Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker (Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (Unknown Source)
at java.lang.Thread.run (Unknown Source)
Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of java.util.LinkedHashMap<java.lang.Object,java.lang.Object> out of START_ARRAY token
at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 227, column: 25] (through reference chain: com.tibco.bw.maven.plugin.admin.dto.Application["instances"]->java.util.ArrayList[0]->com.tibco.bw.maven.plugin.admin.dto.AppInstance["endpoints"]->java.util.ArrayList[0]->com.tibco.bw.maven.plugin.admin.dto.Endpoint["properties"])
at com.fasterxml.jackson.databind.exc.MismatchedInputException.from (MismatchedInputException.java:59)
at com.fasterxml.jackson.databind.DeserializationContext.reportInputMismatch (DeserializationContext.java:1442)
at com.fasterxml.jackson.databind.DeserializationContext.handleUnexpectedToken (DeserializationContext.java:1216)
at com.fasterxml.jackson.databind.DeserializationContext.handleUnexpectedToken (DeserializationContext.java:1126)
at com.fasterxml.jackson.databind.deser.std.StdDeserializer._deserializeFromEmpty (StdDeserializer.java:626)
at com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize (MapDeserializer.java:360)
at com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize (MapDeserializer.java:29)
at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet (MethodProperty.java:129)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize (BeanDeserializer.java:288)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize (BeanDeserializer.java:151)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize (CollectionDeserializer.java:286)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize (CollectionDeserializer.java:245)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize (CollectionDeserializer.java:27)
at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet (MethodProperty.java:129)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize (BeanDeserializer.java:288)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize (BeanDeserializer.java:151)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize (CollectionDeserializer.java:286)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize (CollectionDeserializer.java:245)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize (CollectionDeserializer.java:27)
at com.fasterxml.jackson.databind.deser.impl.FieldProperty.deserializeAndSet (FieldProperty.java:138)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize (BeanDeserializer.java:288)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize (BeanDeserializer.java:151)
at com.fasterxml.jackson.databind.ObjectReader._bind (ObjectReader.java:1682)
at com.fasterxml.jackson.databind.ObjectReader.readValue (ObjectReader.java:977)
at com.fasterxml.jackson.jaxrs.base.ProviderBase.readFrom (ProviderBase.java:814)
at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.invokeReadFrom (ReaderInterceptorExecutor.java:266)
at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.aroundReadFrom (ReaderInterceptorExecutor.java:236)
at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor.proceed (ReaderInterceptorExecutor.java:156)
at org.glassfish.jersey.message.internal.MessageBodyFactory.readFrom (MessageBodyFactory.java:1085)
at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity (InboundMessageContext.java:853)
at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity (InboundMessageContext.java:785)
at org.glassfish.jersey.client.ClientResponse.readEntity (ClientResponse.java:326)
at org.glassfish.jersey.client.InboundJaxrsResponse$1.call (InboundJaxrsResponse.java:115)
at org.glassfish.jersey.internal.Errors.process (Errors.java:315)
at org.glassfish.jersey.internal.Errors.process (Errors.java:297)
at org.glassfish.jersey.internal.Errors.process (Errors.java:228)
at org.glassfish.jersey.process.internal.RequestScope.runInScope (RequestScope.java:419)
at org.glassfish.jersey.client.InboundJaxrsResponse.runInScopeIfPossible (InboundJaxrsResponse.java:267)
at org.glassfish.jersey.client.InboundJaxrsResponse.readEntity (InboundJaxrsResponse.java:112)
at com.tibco.bw.maven.plugin.admin.client.RemoteDeployer.checkApplicationState (RemoteDeployer.java:540)
at com.tibco.bw.maven.plugin.admin.client.RemoteDeployer.addAndDeployApplication (RemoteDeployer.java:327)
at com.tibco.bw.maven.plugin.application.BWEARInstallerMojo.execute (BWEARInstallerMojo.java:228)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.jvnet.hudson.maven3.launcher.Maven35Launcher.main (Maven35Launcher.java:130)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (Unknown Source)
at java.lang.reflect.Method.invoke (Unknown Source)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at jenkins.maven3.agent.Maven35Main.launch (Maven35Main.java:178)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (Unknown Source)
at java.lang.reflect.Method.invoke (Unknown Source)
at hudson.maven.Maven3Builder.call (Maven3Builder.java:139)
at hudson.maven.Maven3Builder.call (Maven3Builder.java:70)
at hudson.remoting.UserRequest.perform (UserRequest.java:211)
at hudson.remoting.UserRequest.perform (UserRequest.java:54)
at hudson.remoting.Request$2.run (Request.java:375)
at hudson.remoting.InterceptingExecutorService$1.call (InterceptingExecutorService.java:73)
at java.util.concurrent.FutureTask.run (Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker (Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (Unknown Source)
at java.lang.Thread.run (Unknown Source)
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for SimpleRest6xAS.parent 5.0.0-SNAPSHOT:
[INFO]
[INFO] SimpleRest6xAS.parent .............................. SUCCESS [ 0.284 s]
[INFO] SimpleRest6xAS.module .............................. SUCCESS [ 0.726 s]
[INFO] SimpleRest6xAS ..................................... FAILURE [ 16.538 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 20.023 s
[INFO] Finished at: 2020-11-17T07:17:15-05:00
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[ERROR] Failed to execute goal com.tibco.plugins:bw6-maven-plugin:2.7.1:bwinstall (default-bwinstall) on project SimpleRest6xAS: Failed to deploy BW Application: Error reading entity from input stream. Cannot deserialize instance of java.util.LinkedHashMap<java.lang.Object,java.lang.Object> out of START_ARRAY token
[ERROR] at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 227, column: 25] (through reference chain: com.tibco.bw.maven.plugin.admin.dto.Application["instances"]->java.util.ArrayList[0]->com.tibco.bw.maven.plugin.admin.dto.AppInstance["endpoints"]->java.util.ArrayList[0]->com.tibco.bw.maven.plugin.admin.dto.Endpoint["properties"])
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :SimpleRest6xAS

@aalapargekartibco
Copy link
Author

The issue is in bw6-plugin-maven-2.7.1\Source\bw6-maven-plugin\src\main\java\com\tibco\bw\maven\plugin\admin\client\RemoteDeployer.java in the function call

	checkApplicationState(domainName, appSpaceName, appName, version, Application.ApplicationRuntimeStates.Running);

this is the function:

private void checkApplicationState(final String domainName, final String appSpaceName, final String appName, final String version, final Application.ApplicationRuntimeStates state) throws ClientException, InterruptedException{
int count = 0;
boolean isState= false;
log.debug("Retry Count ->"+ retryCount);
while(!isState && count < retryCount ){
Response response = r.path("/domains").path(domainName).path("appspaces").path(appSpaceName).path("applications").path(appName).path(version).request(MediaType.APPLICATION_JSON_TYPE).get();
processErrorResponse(response);
Application app = response.readEntity(Application.class);
log.info("AppName -> "+ appName + ", State -> "+ app.getState());
if(app.getState().equals(state)){
isState = true;
return;
}
count++;
Thread.sleep(SLEEP_INTERVAL);
}
}

the bolded line is where it is breaking.

I commented the function call and rebuilt the jar like like this:

cd C:\bw6-plugin-maven-2.7.1\Source\bw6-maven-plugin\src\main
jar cvf bw6-maven-plugin-2.7.1.jar -C java .

I then replaced the jar at C:\tibco6\bw\6.6\maven\plugins\bw6-maven-plugin with the above jar.

I am getting this error now when I open a project. How should I correctly build the jar ?

Description Resource Path Location Type
Execution default-resources of goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources failed: A required class was missing while executing org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources: org/apache/commons/lang3/StringUtils

realm = plugin>org.apache.maven.plugins:maven-resources-plugin:3.2.0
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
urls[0] = file:/C:/Users/argekara1/.m2/repository/org/apache/maven/plugins/maven-resources-plugin/3.2.0/maven-resources-plugin-3.2.0.jar
urls[1] = file:/C:/Users/argekara1/.m2/repository/org/eclipse/aether/aether-util/0.9.0.M2/aether-util-0.9.0.M2.jar
urls[2] = file:/C:/Users/argekara1/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.10/plexus-utils-3.0.10.jar
urls[3] = file:/C:/Users/argekara1/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
urls[4] = file:/C:/Users/argekara1/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
urls[5] = file:/C:/Users/argekara1/.m2/repository/org/codehaus/plexus/plexus-component-annotations/2.0.0/plexus-component-annotations-2.0.0.jar
urls[6] = file:/C:/Users/argekara1/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.26/plexus-interpolation-1.26.jar
urls[7] = file:/C:/Users/argekara1/.m2/repository/javax/enterprise/cdi-api/1.0/cdi-api-1.0.jar
urls[8] = file:/C:/Users/argekara1/.m2/repository/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar
urls[9] = file:/C:/Users/argekara1/.m2/repository/com/google/guava/guava/10.0.1/guava-10.0.1.jar
urls[10] = file:/C:/Users/argekara1/.m2/repository/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar
urls[11] = file:/C:/Users/argekara1/.m2/repository/org/sonatype/sisu/sisu-guice/3.1.0/sisu-guice-3.1.0-no_aop.jar
urls[12] = file:/C:/Users/argekara1/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar
urls[13] = file:/C:/Users/argekara1/.m2/repository/org/eclipse/sisu/org.eclipse.sisu.inject/0.0.0.M2a/org.eclipse.sisu.inject-0.0.0.M2a.jar
urls[14] = file:/C:/Users/argekara1/.m2/repository/asm/asm/3.3.1/asm-3.3.1.jar
urls[15] = file:/C:/Users/argekara1/.m2/repository/org/apache/maven/shared/maven-filtering/3.2.0/maven-filtering-3.2.0.jar
urls[16] = file:/C:/Users/argekara1/.m2/repository/org/apache/maven/shared/maven-shared-utils/3.3.3/maven-shared-utils-3.3.3.jar
urls[17] = file:/C:/Users/argekara1/.m2/repository/commons-io/commons-io/2.6/commons-io-2.6.jar
urls[18] = file:/C:/Users/argekara1/.m2/repository/org/apache/commons/commons-lang3/3.8.1/commons-lang3-3.8.1.jar
Number of foreign imports: 5
import: Entry[import org.sonatype.plexus.build.incremental from realm ClassRealm[plexus.core, parent: null]]
import: Entry[import org.codehaus.plexus.util.Scanner from realm ClassRealm[plexus.core, parent: null]]
import: Entry[import org.codehaus.plexus.util.DirectoryScanner from realm ClassRealm[plexus.core, parent: null]]
import: Entry[import org.codehaus.plexus.util.AbstractScanner from realm ClassRealm[plexus.core, parent: null]]
import: Entry[import from realm ClassRealm[project>com.tibco.bw:SimpleRest6xAS:6.0.0-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]]


(org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources:default-resources:process-resources)

org.apache.maven.plugin.PluginExecutionException: Execution default-resources of goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources failed: A required class was missing while executing org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources: org/apache/commons/lang3/StringUtils

realm = plugin>org.apache.maven.plugins:maven-resources-plugin:3.2.0
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
urls[0] = file:/C:/Users/argekara1/.m2/repository/org/apache/maven/plugins/maven-resources-plugin/3.2.0/maven-resources-plugin-3.2.0.jar
urls[1] = file:/C:/Users/argekara1/.m2/repository/org/eclipse/aether/aether-util/0.9.0.M2/aether-util-0.9.0.M2.jar
urls[2] = file:/C:/Users/argekara1/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.10/plexus-utils-3.0.10.jar
urls[3] = file:/C:/Users/argekara1/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
urls[4] = file:/C:/Users/argekara1/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
urls[5] = file:/C:/Users/argekara1/.m2/repository/org/codehaus/plexus/plexus-component-annotations/2.0.0/plexus-component-annotations-2.0.0.jar
urls[6] = file:/C:/Users/argekara1/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.26/plexus-interpolation-1.26.jar
urls[7] = file:/C:/Users/argekara1/.m2/repository/javax/enterprise/cdi-api/1.0/cdi-api-1.0.jar
urls[8] = file:/C:/Users/argekara1/.m2/repository/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar
urls[9] = file:/C:/Users/argekara1/.m2/repository/com/google/guava/guava/10.0.1/guava-10.0.1.jar
urls[10] = file:/C:/Users/argekara1/.m2/repository/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar
urls[11] = file:/C:/Users/argekara1/.m2/repository/org/sonatype/sisu/sisu-guice/3.1.0/sisu-guice-3.1.0-no_aop.jar
urls[12] = file:/C:/Users/argekara1/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar
urls[13] = file:/C:/Users/argekara1/.m2/repository/org/eclipse/sisu/org.eclipse.sisu.inject/0.0.0.M2a/org.eclipse.sisu.inject-0.0.0.M2a.jar
urls[14] = file:/C:/Users/argekara1/.m2/repository/asm/asm/3.3.1/asm-3.3.1.jar
urls[15] = file:/C:/Users/argekara1/.m2/repository/org/apache/maven/shared/maven-filtering/3.2.0/maven-filtering-3.2.0.jar
urls[16] = file:/C:/Users/argekara1/.m2/repository/org/apache/maven/shared/maven-shared-utils/3.3.3/maven-shared-utils-3.3.3.jar
urls[17] = file:/C:/Users/argekara1/.m2/repository/commons-io/commons-io/2.6/commons-io-2.6.jar
urls[18] = file:/C:/Users/argekara1/.m2/repository/org/apache/commons/commons-lang3/3.8.1/commons-lang3-3.8.1.jar
Number of foreign imports: 5
import: Entry[import org.sonatype.plexus.build.incremental from realm ClassRealm[plexus.core, parent: null]]
import: Entry[import org.codehaus.plexus.util.Scanner from realm ClassRealm[plexus.core, parent: null]]
import: Entry[import org.codehaus.plexus.util.DirectoryScanner from realm ClassRealm[plexus.core, parent: null]]
import: Entry[import org.codehaus.plexus.util.AbstractScanner from realm ClassRealm[plexus.core, parent: null]]
import: Entry[import from realm ClassRealm[project>com.tibco.bw:SimpleRest6xAS:6.0.0-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]]


at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:168)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:331)
at org.eclipse.m2e.core.internal.embedder.MavenImpl$11.call(MavenImpl.java:1362)
at org.eclipse.m2e.core.internal.embedder.MavenImpl$11.call(MavenImpl.java:1)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1360)
at org.eclipse.m2e.core.project.configurator.MojoExecutionBuildParticipant.build(MojoExecutionBuildParticipant.java:52)
at org.eclipse.m2e.core.internal.builder.MavenBuilderImpl.build(MavenBuilderImpl.java:137)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:172)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:1)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1$1.call(MavenBuilder.java:115)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1.call(MavenBuilder.java:105)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.execute(MavenBuilder.java:86)
at org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:200)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:734)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:299)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:302)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:358)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:381)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

Caused by: org.apache.maven.plugin.PluginContainerException: A required class was missing while executing org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources: org/apache/commons/lang3/StringUtils

realm = plugin>org.apache.maven.plugins:maven-resources-plugin:3.2.0
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
urls[0] = file:/C:/Users/argekara1/.m2/repository/org/apache/maven/plugins/maven-resources-plugin/3.2.0/maven-resources-plugin-3.2.0.jar
urls[1] = file:/C:/Users/argekara1/.m2/repository/org/eclipse/aether/aether-util/0.9.0.M2/aether-util-0.9.0.M2.jar
urls[2] = file:/C:/Users/argekara1/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.10/plexus-utils-3.0.10.jar
urls[3] = file:/C:/Users/argekara1/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
urls[4] = file:/C:/Users/argekara1/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
urls[5] = file:/C:/Users/argekara1/.m2/repository/org/codehaus/plexus/plexus-component-annotations/2.0.0/plexus-component-annotations-2.0.0.jar
urls[6] = file:/C:/Users/argekara1/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.26/plexus-interpolation-1.26.jar
urls[7] = file:/C:/Users/argekara1/.m2/repository/javax/enterprise/cdi-api/1.0/cdi-api-1.0.jar
urls[8] = file:/C:/Users/argekara1/.m2/repository/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar
urls[9] = file:/C:/Users/argekara1/.m2/repository/com/google/guava/guava/10.0.1/guava-10.0.1.jar
urls[10] = file:/C:/Users/argekara1/.m2/repository/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar
urls[11] = file:/C:/Users/argekara1/.m2/repository/org/sonatype/sisu/sisu-guice/3.1.0/sisu-guice-3.1.0-no_aop.jar
urls[12] = file:/C:/Users/argekara1/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar
urls[13] = file:/C:/Users/argekara1/.m2/repository/org/eclipse/sisu/org.eclipse.sisu.inject/0.0.0.M2a/org.eclipse.sisu.inject-0.0.0.M2a.jar
urls[14] = file:/C:/Users/argekara1/.m2/repository/asm/asm/3.3.1/asm-3.3.1.jar
urls[15] = file:/C:/Users/argekara1/.m2/repository/org/apache/maven/shared/maven-filtering/3.2.0/maven-filtering-3.2.0.jar
urls[16] = file:/C:/Users/argekara1/.m2/repository/org/apache/maven/shared/maven-shared-utils/3.3.3/maven-shared-utils-3.3.3.jar
urls[17] = file:/C:/Users/argekara1/.m2/repository/commons-io/commons-io/2.6/commons-io-2.6.jar
urls[18] = file:/C:/Users/argekara1/.m2/repository/org/apache/commons/commons-lang3/3.8.1/commons-lang3-3.8.1.jar
Number of foreign imports: 5
import: Entry[import org.sonatype.plexus.build.incremental from realm ClassRealm[plexus.core, parent: null]]
import: Entry[import org.codehaus.plexus.util.Scanner from realm ClassRealm[plexus.core, parent: null]]
import: Entry[import org.codehaus.plexus.util.DirectoryScanner from realm ClassRealm[plexus.core, parent: null]]
import: Entry[import org.codehaus.plexus.util.AbstractScanner from realm ClassRealm[plexus.core, parent: null]]
import: Entry[import from realm ClassRealm[project>com.tibco.bw:SimpleRest6xAS:6.0.0-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]]


at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:166)
... 31 more

Caused by: java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtils
at org.apache.maven.plugins.resources.ResourcesMojo.execute(ResourcesMojo.java:313)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
... 31 more
Caused by: java.lang.ClassNotFoundException: org.apache.commons.lang3.StringUtils
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
... 33 more
pom.xml /SimpleRest6xAS.module line 12 Maven Build Problem

@vpawar-tibco
Copy link
Collaborator

@aalapargekartibco We are looking into the deployment error issue.

To build the maven plugin, please follow below steps -

  • Comment out below plugins in bw6-maven-plugin/pom.xml file
<!-- <plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-gpg-plugin</artifactId>
				<version>1.5</version>
				<executions>
					<execution>
						<id>sign-artifacts</id>
						<phase>verify</phase>
						<goals>
							<goal>sign</goal>
						</goals>
						<configuration>
							<keyname>2719D0D948730CAA</keyname>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
				<version>1.6.7</version>
				<extensions>true</extensions>
				<configuration>
					<serverId>ossrh</serverId>
					<nexusUrl>https://oss.sonatype.org/</nexusUrl>
					<autoReleaseAfterClose>true</autoReleaseAfterClose>
				</configuration>
			</plugin> -->
  • Execute mvn clean install

@aalapargekartibco
Copy link
Author

@vpawar-ai I am getting this error when I do the mvn claen install:

Failed to execute goal org.apache.maven.plugins:maven-plugin-plugin:3.5:descriptor (default-descriptor) on project bw6-maven-plugin: Error extracting plugin descriptor: 'No mojo definitions were found for plugin: com.tibco.plugins:bw6-maven-plugin.

These are the detailed steps that I did:

  1. Downloaded the source code of the plugin version 2.7.1 (bw6-plugin-maven-2.7.1) and placed it in a temporary location.
  2. In \bw6-plugin-maven-2.7.1\Source\bw6-maven-plugin\src\main\java\com\tibco\bw\maven\plugin\admin\client\RemoteDeployer.java, commented line Ability for users to provide application archives folder to upload th… #327
    //checkApplicationState(domainName, appSpaceName, appName, version, Application.ApplicationRuntimeStates.Running);
  3. Opened cmd and
    cd \bw6-plugin-maven-2.7.1\Source\bw6-maven-plugin\src\main
    jar cvf bw6-maven-plugin-2.7.1.jar -C java .
  4. Copied the jar created in step 3 into tibco 6 location \tibco6\bw\6.6\maven\plugins\bw6-maven-plugin
  5. Opened the pom in the same tibco6 locations and commented the plugins that you mentioned
  6. In cmd, cd \tibco6\bw\6.6\maven\plugins\bw6-maven-plugin
    mvn clean instal

That is when I am getting this error

@vpawar-tibco
Copy link
Collaborator

@aalapargekartibco Please do not use jar cvf bw6-maven-plugin-2.7.1.jar -C java . to generate plugin jar file. Instead, execute mvn clean install from \bw6-plugin-maven-2.7.1\Source\bw6-maven-plugin\ source location. It will install the modified plugin in local .m2 repo. Do comment out the plugins mentioned earlier in th pom.xml before you execute mvn clean install.

@aalapargekartibco
Copy link
Author

aalapargekartibco commented Nov 20, 2020

@vpawar-ai I did this:

  • Did mvn clean install as per your instructions. I see files updated at m2\repository\com\tibco\plugins\bw6-maven-plugin\2.7.1
  • Restarted 6x studio
  • Opened the project and rebuilt the pom and checked into git
  • Restarted jenkins (jenkins is also running on my local)
  • Ran the build job
  • It still failed with same error. It looks like my changes did not take effect . I had commented the checkApplicationState function call in RemoteDeployer.java and added some logs to check whether my changes are in or not. I don't see my logs which means that my change did not take effect.

Am I missing any step ?

@vpawar-tibco
Copy link
Collaborator

Fixed in 2.8.0

@aalapargekartibco
Copy link
Author

@vpawar-ai - verified, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants