Compile error wso2 ESB 4.8.1. and kernel - wso2

We are having problems compiling kernel wso2 esb and wso2
Jdk -> jdk1.7.0_60
Error wso2 esb 4.8.1
[ERROR] Failed to execute goal on project org.wso2.esb.integration.core: Could not resolve dependencies for project org.wso2.esb:org.wso2.esb.integration.core:jar:4.8.0: Could not find artifact org.apache.ws.security:wss4j:jar:1.5.11-wso2v6 in wso2-nexus (http://maven.wso2.org/nexus/content/groups/wso2-public/) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project org.wso2.esb.integration.core: Could not resolve dependencies for project org.wso2.esb:org.wso2.esb.integration.core:jar:4.8.0: Could not find artifact org.apache.ws.security:wss4j:jar:1.5.11-wso2v6 in wso2-nexus (http://maven.wso2.org/nexus/content/groups/wso2-public/)
Error wso2carbon-kernel 4.2.0
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.1:compile (default-compile) on project wss4j: Compilation failure: Compilation failure:
[ERROR] /sources/wso2/wso2carbon-kernel/dependencies/wss4j/1.5.11-wso2v6/src/org/apache/ws/security/kerberos/KrbTicketDecoder.java:[10,24] EncryptionKey is internal proprietary API and may be removed in a future release
[ERROR]
A greeting and thanks.

As Asela mentioned kernal switch to java 1.6 and for the ESB failure, you can build [1] to get rid of that issue.
[1]-http://svn.wso2.org/repos/wso2/carbon/kernel/branches/4.2.0/patches/patch0002/dependencies/wss4j/1.5.11-wso2v6/

You can not use JDK 1.6 to build the WSO2 platform. Please check WSO2 docs from here
If you want to build the product from the source distribution, you
must use JDK 1.6 instead of JDK 1.7.
But it says that you can run the product on JDK 1.7
Oracle and IBM JRE 1.7 are also supported when running (not building)
WSO2 products.

Related

org.osgi.framework.BundleException: Could not resolve module: org.wso2.carbon.capp.monitor

I am using WSO2 Integration Studio 8.1.0 to develop an API on my machine, and when trying to run on Micro Integrator, I get the following error :
ERROR {Framework} - FrameworkEvent ERROR org.osgi.framework.BundleException: Could not resolve module: org.wso2.carbon.capp.monitor [170]
Unresolved requirement: Import-Package: org.wso2.carbon.application.deployer
at org.eclipse.osgi.container.Module.start(Module.java:457)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$1.run(ModuleContainer.java:1820)
at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$2$1.execute(EquinoxContainerAdaptor.java:150)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1813)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1770)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1735)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1661)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345)
But after the error appears in the console the application runs fine.
Any ideas why I get this error and how to avoid it ?
This issue is happening due to a bug[1] in the Integration Studio. Due to this bug, the Studio was using the configuration of the older MI version to run/debug CApps. To fix this you will need to update the Integration Studio and manually remove some configurations as follows,
Remove the server configurations under ESB Mediation Debugger and Generic Server in Debug Configurations,
If the org.wso2.carbon.capp.monitor-3.0.0 jar is already present in IntegrationStudio/runtime/microesb/dropins folder remove it as well.
Restart the Integration Studio to load the new configurations shipped with the latest updates.
Please refer Get the latest updates to install the latest updates to Integration Studio.
[1] - https://github.com/wso2/api-manager/issues/772
The components of the MI product are activated as OSGI bundles at the kernel level during the server startup process. In this case, the OSGI bundle related to org.wso2.carbon.capp.monitor module is not activated because the org.wso2.carbon.application.deployer module is not available at the time when the OSGI bundle related to org.wso2.carbon.capp.monitor module is activated. As a result, the bundle activation issue will be visible during the initial server startup process.
However, once the bundle related to org.wso2.carbon.application.deployer is successfully activated, the OSGI bundle related to org.wso2.carbon.capp.monitor module will also be successfully re-activated, even if the bundling exception occurred during the initial bundle activation process.
We can check whether the OSGI bundle related to the org.wso2.carbon.capp.monitor module was successfully activated by looking for the org.wso2.carbon.capp.monitor-3.0.0.jar file in the <Integration_STUDIO_INSTALLED_LOCATION>/runtime/microesb/dropins directory after starting the MI server; additionally, the CAR application will not be deployed successfully if the OSGI bundle was not properly activated during the server startup process.
You can also validate it by redeploying the CAR application into the MI server. You will not notice the issue during the CAR application redeployment process because it occurs due to the order in the bundle activation process during the server startup.
This issue has been reported:
https://github.com/wso2/api-manager/issues/772
Please take the latest update by following the official guide:
https://apim.docs.wso2.com/en/latest/integrate/develop/installing-wso2-integration-studio/#get-the-latest-updates
Cheers!
Nadun.

Deployment error for WSO2 Integrator CAR artifact using Maven

I am using WSO2 Integrator 6.2.0 with Maven car deploy plugin version - 1.1.1 and Maven car plugin version 2.1.1, and I am trying to redeploy Integrator CAR artifact using maven command -
1) To undeploy: mvn clean deploy -Doperation=undeploy -Dmaven.deploy.skip=true -Dmaven.car.deploy.skip=false
However, upon executing this command, I get the following error - Deploying SampleCompositeApplication.car to https://localhost:9444/carbon/ Failed.: Transport error: 302 Error: Found -> [Help 1]
[ERROR]
Any insights into this will be appreciated.
The default port for WSO2 EI is 9443. Please change the serverUrl in the pom file and try it again.

Is Sun/Oracle JDK required to build WSO2 4.1.x?

Is Sun/Oracle JDK required to build WSO2 4.1.x?
I tried building with OpenJDK, but ran into the following issue:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile
(default-compile) on project axis2-transport-testkit: Compilation failure: Compilation failure:
[ERROR] ... carbon_kernel_4.1.0/dependencies/transports/1.1.0-wso2v8/modules/testkit/
src/main/java/org/apache/axis2/transport/testkit/doclet/ResourceInfoDoclet.java:[27,22]
error: package com.sun.javadoc does not exist
Yes, Oracle JDK is required to build Carbon.
Currently Open JDK is not recommended.
Please make sure to use Oracle JDK 1.6 for building Carbon.
You can use Oracle JRE 1.7 for running WSO2 products, but there are known issues with compiling the source code with Java 7.
See http://docs.wso2.org/wiki/display/Carbon410/Installation+Prerequisites for additional info.

Build dashboard

Is there a build dashboard somewhere for the different carbon/wso2 releases?
I just checked out the 4.0.3 tag of carbon ( https://svn.wso2.org/repos/wso2/carbon/platform/tags/4.0.3)
and I was assuming tags are stable. But the build failed with the following error
The project org.wso2.carbon:SecVerifier:4.0.0
(/wso2/4.0.3/products/integration/security-verifier/pom.xml) has 1 error
[ERROR] Non-resolvable parent POM: Failure to find
org.wso2.carbon:integration:pom:4.0.0 in http://people.apache.org/repo/m2-incubating
repository was cached in the local repository, resolution will not be reattempted until
the update interval of apache-incubating has elapsed or updates are forced and
'parent.relativePath' points at wrong local POM # line 22, column 13 -> [Help 2]
Are these tags stable? I am using Maven 3.0.5 and Java 1.6
WSO2 build status dashboard can be found with continuous build too, Bamboo.
If you are trying to build something on a released branch, the easiest would be to build only that component, as for released versions, we have published maven repos with build artifacts.

camel-example-cxf Not Deployed in ServiceMix 4.4.2

I was trying to run the camel-example-cxf example project which I downloaded from Camel website. (downloaded apache-camel-2.10.2)
I built the project using the pom.xml & the build was successful.
However when I tried to deploy it in servicemix (apache-servicemix-4.4.2) I am getting the following error.
karaf#root> ERROR: Bundle org.apache.camel.camel-example-cxf [43] Error starting file:/C:/apache-servicemix-4.4.2/deploy
/camel-example-cxf-2.10.2.jar (org.osgi.framework.BundleException: Unresolved constraint in bundle org.apache.camel.camel-example-cxf [43]: Unable to resolve 43.0: missing requirement [43.0] package; (&(package=org.apache.activemq.broker)(version>=5.7.0)(!(version>=6.0.0))))
org.osgi.framework.BundleException: Unresolved constraint in bundle org.apache.camel.camel-example-cxf [43]: Unable to resolve 43.0: missing requirement [43.0] package; (&(package=org.apache.activemq.broker)(version>=5.7.0)(!(version>=6.0.0)))
at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3446)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1734)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1163)
at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
at java.lang.Thread.run(Thread.java:619)
Please help
Apache ServiceMix 4.4.2 does not support Camel 2.10. You need to use the Camel version that it's shipped with, which is Camel 2.8.
Apache ServiceMix 4.5.0 will ship with Camel 2.10 and ActiveMQ 5.7. This release is in the works currently.
I had the same issue (but with activemq jar) and found that while running maven build i was using a different version than what servicemix had. you can find the version of jar file that are used by servicemix by using "exports" command (type export on servicemix command line) and you would come to know the version. if that is different than what you used for maven build then you would get that error. You have two option then
1. install different bundle in servicemix (with same version as used for maven build)
2. change the pom.xml to build maven build.