OSGP / Documentation

This repository contains documentation for the Open Smart Grid Platform project. This repository is built as a GitBook, therefore all content has to be written using markdown syntax. See the latest GitBook:
https://documentation.gxf.lfenergy.org/
Apache License 2.0
24 stars 15 forks source link

Issues with manual set up of OSGP on Ubuntu 14.04 and Ubuntu 18.04 #201

Closed sameersubudhi closed 5 years ago

sameersubudhi commented 5 years ago

Hi,

I'm currently trying to manually install and set up the OSGP on Ubuntu 14.04/18.04 by following the platform setup guide. Upon importing the existing maven projects into Eclipse from under /home/dev/Sources/OSGP/open-smart-grid-platform, I'm experiencing lots of errors/compilation issues.

Could you please help me resolve fix the issues listed below?

Errors/Issues encountered:

Number Description Resource Path Location Type
1 The import org.opensmartgridplatform.oslp.Oslp cannot be resolved AutonomousDeviceReboot.java /web-device-simulator/src/main/java/org/opensmartgridplatform/webdevicesimulator/application/tasks line 17 Java Problem
2 Oslp cannot be resolved to a variable AutonomousDeviceReboot.java /web-device-simulator/src/main/java/org/opensmartgridplatform/webdevicesimulator/application/tasks line 60 Java Problem
3 SetConfigurationRequest cannot be resolved to a type ConfigurationToOslpSetConfigurationRequestConverter.java /osgp-protocol-adapter-oslp-elster/src/main/java/org/opensmartgridplatform/adapter/protocol/oslp/elster/application/mapping line 35 Java Problem
4 The method convert(ConfigurationDto, Type<? extends SetConfigurationRequest>, MappingContext) of type ConfigurationToOslpSetConfigurationRequestConverter must override or implement a supertype method ConfigurationToOslpSetConfigurationRequestConverter.java /osgp-protocol-adapter-oslp-elster/src/main/java/org/opensmartgridplatform/adapter/protocol/oslp/elster/application/mapping line 35 Java Problem
5 The type ConfigurationToOslpSetConfigurationRequestConverter must implement the inherited abstract method Converter<ConfigurationDto,SetConfigurationRequest>.convert(ConfigurationDto, Type<? extends SetConfigurationRequest>, MappingContext) ConfigurationToOslpSetConfigurationRequestConverter.java /osgp-protocol-adapter-oslp-elster/src/main/java/org/opensmartgridplatform/adapter/protocol/oslp/elster/application/mapping line 26 Java Problem
6 IndexAddressMap cannot be resolved to a type DaliConfigurationToOslpDaliConfigurationConverter.java /osgp-protocol-adapter-oslp-elster/src/main/java/org/opensmartgridplatform/adapter/protocol/oslp/elster/application/mapping line 61 Java Problem
7 RelayType cannot be resolved to a variable DaliConfigurationToOslpDaliConfigurationConverter.java /osgp-protocol-adapter-oslp-elster/src/main/java/org/opensmartgridplatform/adapter/protocol/oslp/elster/application/mapping line 45 Java Problem
8 The method convertTo(DaliConfigurationDto, Type, MappingContext) of type DaliConfigurationToOslpDaliConfigurationConverter must override or implement a supertype method DaliConfigurationToOslpDaliConfigurationConverter.java /osgp-protocol-adapter-oslp-elster/src/main/java/org/opensmartgridplatform/adapter/protocol/oslp/elster/application/mapping line 26 Java Problem
9 The type DaliConfigurationToOslpDaliConfigurationConverter must implement the inherited abstract method BidirectionalConverter<DaliConfigurationDto,DaliConfiguration>.convertFrom(DaliConfiguration, Type, MappingContext) DaliConfigurationToOslpDaliConfigurationConverter.java /osgp-protocol-adapter-oslp-elster/src/main/java/org/opensmartgridplatform/adapter/protocol/oslp/elster/application/mapping line 23 Java Problem
10 The type HistoryTermTypeConverter must implement the inherited abstract method BidirectionalConverter<HistoryTermTypeDto,HistoryTermType>.convertFrom(HistoryTermType, Type, MappingContext) HistoryTermTypeConverter.java /osgp-protocol-adapter-oslp-elster/src/main/java/org/opensmartgridplatform/adapter/protocol/oslp/elster/application/mapping line 10 Java Problem
11 The type LightTypeConverter must implement the inherited abstract method BidirectionalConverter<LightTypeDto,LightType>.convertFrom(LightType, Type, MappingContext) LightTypeConverter.java /osgp-protocol-adapter-oslp-elster/src/main/java/org/opensmartgridplatform/adapter/protocol/oslp/elster/application/mapping line 17 Java Problem
12 The type LightValueToOslpLightValueMapper must implement the inherited abstract method BidirectionalConverter<LightValueDto,LightValue>.convertFrom(LightValue, Type, MappingContext) LightValueToOslpLightValueMapper.java /osgp-protocol-adapter-oslp-elster/src/main/java/org/opensmartgridplatform/adapter/protocol/oslp/elster/application/mapping line 18 Java Problem
13 The type LinkTypeConverter must implement the inherited abstract method BidirectionalConverter<LinkTypeDto,LinkType>.convertFrom(LinkType, Type, MappingContext) LinkTypeConverter.java /osgp-protocol-adapter-oslp-elster/src/main/java/org/opensmartgridplatform/adapter/protocol/oslp/elster/application/mapping line 17 Java Problem
14 'protoc' failed. Exit code 0 (com.github.igor-petruk.protobuf:protobuf-maven-plugin:0.6.2:run:default:generate-sources) pom.xml /oslp line 62 Maven Build Problem

Adhoc information

Eclipse version information on Ubuntu 14.04:

Eclipse Java EE IDE for Web Developers.
Version: 2018-09 (4.9.0)
Build id: 20180917-1800
OS: Linux, v.4.4.0-31-generic, x86_64 / gtk 3.10.8
Java version: 1.8.0_171

Java version information on Ubuntu 14.04:

openjdk version "1.8.0_171"
OpenJDK Runtime Environment (build 1.8.0_171-8u171-b11-2~14.04-b11)
OpenJDK 64-Bit Server VM (build 25.171-b11, mixed mode)

Maven version information on Ubuntu 14.04:

Apache Maven 3.0.5
Maven home: /usr/share/maven
Java version: 1.8.0_171, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.4.0-31-generic", arch: "amd64", family: "unix"

Eclipse version information on Ubuntu 18.04:

Eclipse Java EE IDE for Web Developers.
Version: Oxygen.2 Release (4.7.2)
Build id: 20171218-0600
OS: Linux, v.4.15.0-39-generic, x86_64 / gtk 3.22.30

Java version information on ubuntu 18.04:

openjdk version "1.8.0_181"
OpenJDK Runtime Environment (build 1.8.0_181-8u181-b13-1ubuntu0.18.04.1-b13)
OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)

Maven version information on Ubuntu 18.04:

Apache Maven 3.5.2
Maven home: /usr/share/maven
Java version: 1.8.0_181, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.15.0-39-generic", arch: "amd64", family: "unix"
kevinsmeets commented 5 years ago

@sameersubudhi I think you have an issue with compiling the 'oslp' project. This project uses Google Protocol Buffers.

'protoc' failed. Exit code 0 (com.github.igor-petruk.protobuf:protobuf-maven-plugin:0.6.2:run:default:generate-sources)

Can you try to build the open-smart-grid-platform project using maven: mvn clean install

sameersubudhi commented 5 years ago

@kevinsmeets Sorry for the delayed response. mvn clean install still doesn't resolve the issue. Tried searching for methods to resolve the issue encountered while building the open-smart-grid-platform project but to no avail. Any further pointers would be highly appreciable.

[INFO] ------------------------------------------------------------------------ [INFO] Building oslp 4.35.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ oslp --- [INFO] [INFO] --- protobuf-maven-plugin:0.6.2:run (default) @ oslp --- [INFO] Protobuf dependency version 2.4.1 [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] parent-shared ...................................... SUCCESS [ 0.347 s] [INFO] shared ............................................. SUCCESS [ 7.553 s] [INFO] osgp-dto ........................................... SUCCESS [ 2.505 s] [INFO] osgp-ws-core ....................................... SUCCESS [ 5.551 s] [INFO] osgp-ws-admin ...................................... SUCCESS [ 1.030 s] [INFO] osgp-ws-microgrids ................................. SUCCESS [ 1.051 s] [INFO] osgp-ws-distributionautomation ..................... SUCCESS [ 1.007 s] [INFO] osgp-ws-publiclighting ............................. SUCCESS [ 1.167 s] [INFO] osgp-ws-tariffswitching ............................ SUCCESS [ 1.018 s] [INFO] osgp-ws-smartmetering .............................. SUCCESS [ 3.351 s] [INFO] parent-pa-iec61850 ................................. SUCCESS [ 0.006 s] [INFO] osgp-iec61850 ...................................... SUCCESS [ 1.999 s] [INFO] osgp-core-db-api-iec61850 .......................... SUCCESS [ 1.110 s] [INFO] osgp-protocol-adapter-iec61850 ..................... SUCCESS [ 8.617 s] [INFO] osgp-protocol-simulator-iec61850 ................... SUCCESS [ 7.807 s] [INFO] parent-pa-oslp ..................................... SUCCESS [ 0.109 s] [INFO] oslp ............................................... FAILURE [ 2.189 s] [INFO] osgp-web-device-simulator .......................... SKIPPED [INFO] osgp-core-db-api ................................... SKIPPED [INFO] osgp-protocol-adapter-oslp-elster .................. SKIPPED [INFO] signing-server ..................................... SKIPPED [INFO] parent-pa-dlms ..................................... SKIPPED [INFO] osgp-dlms .......................................... SKIPPED [INFO] jasper-interface ................................... SKIPPED [INFO] osgp-protocol-adapter-dlms ......................... SKIPPED [INFO] parent-platform .................................... SKIPPED [INFO] osgp-domain-core ................................... SKIPPED [INFO] osgp-domain-logging ................................ SKIPPED [INFO] osgp-domain-microgrids ............................. SKIPPED [INFO] osgp-domain-distributionautomation ................. SKIPPED [INFO] osgp-adapter-domain-shared ......................... SKIPPED [INFO] osgp-adapter-domain-admin .......................... SKIPPED [INFO] osgp-adapter-domain-core ........................... SKIPPED [INFO] osgp-adapter-domain-microgrids ..................... SKIPPED [INFO] osgp-adapter-domain-distributionautomation ......... SKIPPED [INFO] osgp-adapter-domain-publiclighting ................. SKIPPED [INFO] osgp-adapter-domain-tariffswitching ................ SKIPPED [INFO] osgp-adapter-domain-smartmetering .................. SKIPPED [INFO] osgp-adapter-ws-shared ............................. SKIPPED [INFO] osgp-adapter-ws-shared-db .......................... SKIPPED [INFO] osgp-adapter-ws-core ............................... SKIPPED [INFO] osgp-adapter-ws-admin .............................. SKIPPED [INFO] osgp-adapter-ws-publiclighting ..................... SKIPPED [INFO] osgp-adapter-ws-tariffswitching .................... SKIPPED [INFO] osgp-adapter-ws-smartmetering ...................... SKIPPED [INFO] osgp-adapter-ws-microgrids ......................... SKIPPED [INFO] osgp-adapter-ws-distributionautomation ............. SKIPPED [INFO] osgp-core .......................................... SKIPPED [INFO] osgp-logging ....................................... SKIPPED [INFO] parent-integration-tests ........................... SKIPPED [INFO] cucumber-tests-core ................................ SKIPPED [INFO] cucumber-tests-execution ........................... SKIPPED [INFO] cucumber-tests-platform ............................ SKIPPED [INFO] cucumber-tests-platform-common ..................... SKIPPED [INFO] cucumber-tests-platform-publiclighting ............. SKIPPED [INFO] cucumber-tests-platform-smartmetering .............. SKIPPED [INFO] cucumber-tests-platform-microgrids ................. SKIPPED [INFO] os-webapps ......................................... SKIPPED [INFO] osgp-web-demo-app .................................. SKIPPED [INFO] open-smart-grid-platform ........................... SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 47.248 s [INFO] Finished at: 2019-01-17T01:48:31+01:00 [INFO] Final Memory: 63M/758M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.github.igor-petruk.protobuf:protobuf-maven-plugin:0.6.2:run (default) on project oslp: 'protoc' failed. Exit code 0 -> [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 :oslp bsu@bsu-ThinkPad-T470:~/Sources/OSGP/open-smart-grid-platform$

kevinsmeets commented 5 years ago

@sameersubudhi I think you are having trouble with Google Protocol Buffers. The program protoc has to be installed and we are using version 2.4.1 I think. The maven project oslp contains a protocol description which will be read by protoc and will generate Java code: https://github.com/OSGP/open-smart-grid-platform/blob/development/osgp/protocol-adapter-oslp/oslp/src/main/protobuf/oslp.proto.

When you try to compile, protoc will be invoked. Your error shows that it doesn't work for you. When you run whereis protoc, what is your output? This is an example from my development environment:

dev@dev-box:/home/dev$ whereis protoc
protoc: /usr/bin/protoc /usr/share/man/man1/protoc.1.gz

Running protoc --version will show which version is installed:

dev@dev-box:/home/dev$ protoc --version
libprotoc 2.4.1

I understand from the title of this issue, you installed everything manually, good on you :) However, have a look at these commands in our scripted install, they might help you install protoc: https://github.com/OSGP/Config/blob/development/puppet/manifests/install-dev-env.pp

sameersubudhi commented 5 years ago

@kevinsmeets Seems like a mismatch in the protoc version is causing the issue.

bsu@bsu-ThinkPad-T470:~$ whereis protoc
protoc: /usr/bin/protoc /usr/local/bin/protoc /usr/share/man/man1/protoc.1.gz
bsu@bsu-ThinkPad-T470:~$ protoc --version
libprotoc 3.2.0

Let me retry installing protoc version 2.4.1.

sameersubudhi commented 5 years ago

@kevinsmeets After installing protoc v2.4.1 the maven build process ran successfully. Thank you for your help and time.

I'm closing this issue and will be raising another in case I encounter any.

bsu@bsu-ThinkPad-T470:~$ whereis protoc
protoc: /usr/bin/protoc /usr/share/man/man1/protoc.1.gz

bsu@bsu-ThinkPad-T470:~$ protoc --version
libprotoc 2.4.1

[INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] parent-shared ...................................... SUCCESS [ 0.478 s] [INFO] shared ............................................. SUCCESS [ 7.422 s] [INFO] osgp-dto ........................................... SUCCESS [ 2.729 s] [INFO] osgp-ws-core ....................................... SUCCESS [ 3.747 s] [INFO] osgp-ws-admin ...................................... SUCCESS [ 1.211 s] [INFO] osgp-ws-microgrids ................................. SUCCESS [ 1.362 s] [INFO] osgp-ws-distributionautomation ..................... SUCCESS [ 1.398 s] [INFO] osgp-ws-publiclighting ............................. SUCCESS [ 1.333 s] [INFO] osgp-ws-tariffswitching ............................ SUCCESS [ 1.197 s] [INFO] osgp-ws-smartmetering .............................. SUCCESS [ 4.009 s] [INFO] parent-pa-iec61850 ................................. SUCCESS [ 0.006 s] [INFO] osgp-iec61850 ...................................... SUCCESS [ 2.096 s] [INFO] osgp-core-db-api-iec61850 .......................... SUCCESS [ 1.097 s] [INFO] osgp-protocol-adapter-iec61850 ..................... SUCCESS [ 9.914 s] [INFO] osgp-protocol-simulator-iec61850 ................... SUCCESS [ 6.661 s] [INFO] parent-pa-oslp ..................................... SUCCESS [ 0.022 s] [INFO] oslp ............................................... SUCCESS [ 8.072 s] [INFO] osgp-web-device-simulator .......................... SUCCESS [ 4.798 s] [INFO] osgp-core-db-api ................................... SUCCESS [ 1.348 s] [INFO] osgp-protocol-adapter-oslp-elster .................. SUCCESS [ 6.727 s] [INFO] signing-server ..................................... SUCCESS [ 3.490 s] [INFO] parent-pa-dlms ..................................... SUCCESS [ 0.007 s] [INFO] osgp-dlms .......................................... SUCCESS [ 1.121 s] [INFO] jasper-interface ................................... SUCCESS [ 9.712 s] [INFO] osgp-protocol-adapter-dlms ......................... SUCCESS [ 9.605 s] [INFO] parent-platform .................................... SUCCESS [ 0.008 s] [INFO] osgp-domain-core ................................... SUCCESS [ 5.976 s] [INFO] osgp-domain-logging ................................ SUCCESS [ 1.053 s] [INFO] osgp-domain-microgrids ............................. SUCCESS [ 0.986 s] [INFO] osgp-domain-distributionautomation ................. SUCCESS [ 0.732 s] [INFO] osgp-adapter-domain-shared ......................... SUCCESS [ 0.786 s] [INFO] osgp-adapter-domain-admin .......................... SUCCESS [ 3.706 s] [INFO] osgp-adapter-domain-core ........................... SUCCESS [ 6.645 s] [INFO] osgp-adapter-domain-microgrids ..................... SUCCESS [ 4.192 s] [INFO] osgp-adapter-domain-distributionautomation ......... SUCCESS [ 4.028 s] [INFO] osgp-adapter-domain-publiclighting ................. SUCCESS [ 6.450 s] [INFO] osgp-adapter-domain-tariffswitching ................ SUCCESS [ 3.843 s] [INFO] osgp-adapter-domain-smartmetering .................. SUCCESS [ 11.352 s] [INFO] osgp-adapter-ws-shared ............................. SUCCESS [ 1.770 s] [INFO] osgp-adapter-ws-shared-db .......................... SUCCESS [ 0.932 s] [INFO] osgp-adapter-ws-core ............................... SUCCESS [ 8.630 s] [INFO] osgp-adapter-ws-admin .............................. SUCCESS [ 4.594 s] [INFO] osgp-adapter-ws-publiclighting ..................... SUCCESS [ 5.137 s] [INFO] osgp-adapter-ws-tariffswitching .................... SUCCESS [ 3.840 s] [INFO] osgp-adapter-ws-smartmetering ...................... SUCCESS [ 9.769 s] [INFO] osgp-adapter-ws-microgrids ......................... SUCCESS [ 3.816 s] [INFO] osgp-adapter-ws-distributionautomation ............. SUCCESS [ 3.987 s] [INFO] osgp-core .......................................... SUCCESS [ 9.561 s] [INFO] osgp-logging ....................................... SUCCESS [ 4.813 s] [INFO] parent-integration-tests ........................... SUCCESS [ 0.009 s] [INFO] cucumber-tests-core ................................ SUCCESS [ 4.580 s] [INFO] cucumber-tests-execution ........................... SUCCESS [ 0.196 s] [INFO] cucumber-tests-platform ............................ SUCCESS [ 1.438 s] [INFO] cucumber-tests-platform-common ..................... SUCCESS [ 1.620 s] [INFO] cucumber-tests-platform-publiclighting ............. SUCCESS [ 0.866 s] [INFO] cucumber-tests-platform-smartmetering .............. SUCCESS [ 1.248 s] [INFO] cucumber-tests-platform-microgrids ................. SUCCESS [ 0.744 s] [INFO] os-webapps ......................................... SUCCESS [ 0.017 s] [INFO] osgp-web-demo-app .................................. SUCCESS [ 2.822 s] [INFO] open-smart-grid-platform ........................... SUCCESS [ 0.002 s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 03:30 min [INFO] Finished at: 2019-01-21T10:46:33+01:00 [INFO] Final Memory: 99M/763M [INFO] ------------------------------------------------------------------------ bsu@bsu-ThinkPad-T470:~/Sources/OSGP/open-smart-grid-platform$