wso2 / product-iots

Welcome to the WSO2 IoT Server source code! For info on working with the WSO2 IoT Server repository and contributing code, click the link below.
http://wso2.github.io/
Apache License 2.0
181 stars 181 forks source link

Building WSO2 IoT Server from Source #1771

Open doudoubean opened 6 years ago

doudoubean commented 6 years ago

my environment: os: ubuntu 14.04 jdk: 1.8.0_151 maven: 3.5.3

When I execute "mvn clean install" in the Ubuntu terminal, the problem occurs below:

[INFO] Running Equinox P2 Category Publisher Application for the Generated Repository [INFO] [INFO] --- carbon-p2-plugin:1.5.4:publish-product (publishing product) @ wso2iot-core-p2-profile --- [INFO] Command line: /bin/sh -c cd /home/yangzhanku/wso2/product-iots/modules/p2-profile/iot-core-profile && /usr/lib/jvm/java-8-oracle/jre/bin/java -jar /home/yangzhanku/wso2/maven/.m2/repository/org/eclipse/tycho/tycho-p2-runtime/0.13.0/eclipse/plugins/org.eclipse.equinox.launcher_1.2.0.v20110725-1610.jar -nosplash -application org.eclipse.equinox.p2.publisher.ProductPublisher -metadataRepository file:/home/yangzhanku/wso2/product-iots/modules/p2-profile/iot-core-profile/target/p2-repo -artifactRepository file:/home/yangzhanku/wso2/product-iots/modules/p2-profile/iot-core-profile/target/p2-repo -productFile /home/yangzhanku/wso2/product-iots/modules/p2-profile/iot-core-profile/carbon.product -executables /home/yangzhanku/wso2/product-iots/modules/p2-profile/iot-core-profile/target/org.eclipse.equinox.executable_3.5.0.v20110530-7P7NFUFFLWUl76mart -publishArtifacts -configs gtk.linux.x86 -flavor tooling -append Generating metadata for .. Generation completed with success [0 seconds]. eclipse.update.install.features=true -profile default -bundlepool file:/home/yangzhanku/wso2/product-iots/modules/p2-profile/iot-core-profile/target/wso2carbon-core-4.4.17/wso2/components -shared file:/home/yangzhanku/wso2/product-iots/modules/p2-profile/iot-core-profile/target/wso2carbon-core-4.4.17/wso2/components/p2 -destination file:/home/yangzhanku/wso2/product-iots/modules/p2-profile/iot-core-profile/target/wso2carbon-core-4.4.17/wso2/components/default -p2.os linux -p2.ws gtk -p2.arch x86 -roamingInstalling carbon.product.id 4.4.17.Installation failed.One or more certificates rejected. Cannot proceed with installation.Application failed, log file location: /home/yangzhanku/wso2/maven/.m2/repository/org/eclipse/tycho/tycho-p2-runtime/0.13.0/eclipse/configuration/1521018432599.log [INFO] ------------------------------------------------------------------------[INFO] Reactor Summary: [INFO] [INFO] WSO2 IoT - Parent 3.2.0-update1-SNAPSHOT ........... SUCCESS [ 0.541 s] [INFO] WSO2 IoT - Components Module ....................... SUCCESS [ 0.028 s] [INFO] WSO2 IoT - UI Styles ............................... SUCCESS [ 0.526 s][INFO] WSO2 IoT - Features Module ......................... SUCCESS [ 0.016 s] [INFO] WSO2 IoT - Styles Feature .......................... SUCCESS [ 0.388 s] [INFO] WSO2 IoT - Scripts ................................. SUCCESS [ 0.020 s] [INFO] WSO2 IoT - QSG Script .............................. SUCCESS [ 1.664 s] [INFO] WSO2 IoT - Tools ................................... SUCCESS [ 0.016 s] [INFO] WSO2 IoT - Device Type Archetype ................... SUCCESS [ 0.502 s] [INFO] WSO2 IoT - P2 Profile Module ....................... SUCCESS [ 0.011 s] [INFO] WSO2 IoT - Core P2 Profile Gen ..................... FAILURE [ 33.029 s] [INFO] WSO2 IoT - Analytics P2 Profile Gen ................ SKIPPED [INFO] WSO2 IoT - Broker P2 Profile Gen ................... SKIPPED [INFO] WSO2 IoT - Distribution ............................ SKIPPED [INFO] WSO2 IoT - Integration Module ...................... SKIPPED [INFO] WSO2 IoT - Integration Test Common ................. SKIPPED [INFO] WSO2 IoT - Integration Common ...................... SKIPPED [INFO] WSO2 IoT - Integration Test Common Web UI Pages .... SKIPPED [INFO] WSO2 IOT - Integration Test Module ................. SKIPPED [INFO] WSO2 IoT - Integration Test UI Module 3.2.0-update1-SNAPSHOT SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 37.706 s [INFO] Finished at: 2018-03-14T17:07:15+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.wso2.maven:carbon-p2-plugin:1.5.4:materialize-product (p2-profile-generation-default-profile) on project wso2iot-core-p2-profile: Cannot generate P2 metadata: P2 publisher return code was 13 -> [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 :wso2iot-core-p2-profile

By the way, the 1521018432599.log file content is as follows:

!SESSION 2018-03-14 17:07:12.500 ----------------------------------------------- eclipse.buildId=unknown java.version=1.8.0_151 java.vendor=Oracle Corporation BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=zh_CN Framework arguments: -application org.eclipse.equinox.p2.director -metadataRepository file:/home/yangzhanku/wso2/product-iots/modules/p2-profile/iot-core-profile/target/p2-repo -artifactRepository file:/home/yangzhanku/wso2/product-iots/modules/p2-profile/iot-core-profile/target/p2-repo -installIU carbon.product.id -profileProperties org.eclipse.update.install.features=true -profile default -bundlepool file:/home/yangzhanku/wso2/product-iots/modules/p2-profile/iot-core-profile/target/wso2carbon-core-4.4.17/wso2/components -shared file:/home/yangzhanku/wso2/product-iots/modules/p2-profile/iot-core-profile/target/wso2carbon-core-4.4.17/wso2/components/p2 -destination file:/home/yangzhanku/wso2/product-iots/modules/p2-profile/iot-core-profile/target/wso2carbon-core-4.4.17/wso2/components/default -p2.os linux -p2.ws gtk -p2.arch x86 -roaming Command-line arguments: -application org.eclipse.equinox.p2.director -metadataRepository file:/home/yangzhanku/wso2/product-iots/modules/p2-profile/iot-core-profile/target/p2-repo -artifactRepository file:/home/yangzhanku/wso2/product-iots/modules/p2-profile/iot-core-profile/target/p2-repo -installIU carbon.product.id -profileProperties org.eclipse.update.install.features=true -profile default -bundlepool file:/home/yangzhanku/wso2/product-iots/modules/p2-profile/iot-core-profile/target/wso2carbon-core-4.4.17/wso2/components -shared file:/home/yangzhanku/wso2/product-iots/modules/p2-profile/iot-core-profile/target/wso2carbon-core-4.4.17/wso2/components/p2 -destination file:/home/yangzhanku/wso2/product-iots/modules/p2-profile/iot-core-profile/target/wso2carbon-core-4.4.17/wso2/components/default -p2.os linux -p2.ws gtk -p2.arch x86 -roaming

!ENTRY org.eclipse.equinox.p2.engine 8 0 2018-03-14 17:07:14.403 !MESSAGE One or more certificates rejected. Cannot proceed with installation.

Any help will be greatly appreciated from these problem!

madawas commented 6 years ago

This issue occurs because WSO2 IOT server uses an old version of the Eclipse Equinox framework that is signed with a certificate that is not trusted by recent versions of Java. Refer https://bugs.eclipse.org/bugs/show_bug.cgi?id=309059

In order to solve this, can you try downgrading the JDK to version 1.8.0_144 and try to build the server? (Please make sure to manually install the Oracle JDK 1.8.0_144)

doudoubean commented 6 years ago

thanks, BTW, when I downgrade the JDK to version 1.8.0_144 and try to build the server, another error occurs, this error is as follows:

Tests run: 109, Failures: 17, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] WSO2 IoT - Parent 3.2.0-update1-SNAPSHOT ........... SUCCESS [ 2.201 s] [INFO] WSO2 IoT - Components Module ....................... SUCCESS [ 0.039 s] [INFO] WSO2 IoT - UI Styles ............................... SUCCESS [ 0.742 s] [INFO] WSO2 IoT - Features Module ......................... SUCCESS [ 0.021 s] [INFO] WSO2 IoT - Styles Feature .......................... SUCCESS [ 0.368 s] [INFO] WSO2 IoT - Scripts ................................. SUCCESS [ 0.014 s] [INFO] WSO2 IoT - QSG Script .............................. SUCCESS [ 2.241 s] [INFO] WSO2 IoT - Tools ................................... SUCCESS [ 0.017 s] [INFO] WSO2 IoT - Device Type Archetype ................... SUCCESS [ 0.872 s] [INFO] WSO2 IoT - P2 Profile Module ....................... SUCCESS [ 0.014 s] [INFO] WSO2 IoT - Core P2 Profile Gen ..................... SUCCESS [02:03 min] [INFO] WSO2 IoT - Analytics P2 Profile Gen ................ SUCCESS [ 49.149 s] [INFO] WSO2 IoT - Broker P2 Profile Gen ................... SUCCESS [ 28.401 s] [INFO] WSO2 IoT - Distribution ............................ SUCCESS [ 46.410 s] [INFO] WSO2 IoT - Integration Module ...................... SUCCESS [ 0.074 s] [INFO] WSO2 IoT - Integration Test Common ................. SUCCESS [ 0.071 s] [INFO] WSO2 IoT - Integration Common ...................... SUCCESS [ 3.822 s] [INFO] WSO2 IoT - Integration Test Common Web UI Pages .... SUCCESS [ 1.463 s] [INFO] WSO2 IOT - Integration Test Module ................. FAILURE [31:25 min] [INFO] WSO2 IoT - Integration Test UI Module 3.2.0-update1-SNAPSHOT SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 35:45 min [INFO] Finished at: 2018-03-27T03:06:48Z [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project org.wso2.carbon.iot.test.integration: There are test failures. [ERROR] [ERROR] Please refer to /opt/yangzhanku/wso2/product-iots/modules/integration/tests-integration/target/surefire-reports for the individual test results. [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/MojoFailureException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn -rf :org.wso2.carbon.iot.test.integration

stale[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had recent activity.

madawas commented 6 years ago

@doudoubean Could you point the error logs for the failing tests? We cannot see any test failures in our nightly builds. Are you building from the master branch or a specific tag?

stale[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had recent activity.

ecomdevsolutions commented 3 years ago

Hi, I am using the win10. maven3.5.3 jdk1.8_144 But I have same errors.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity.