COVESA/capicxx-core-tools

warning on running common API core code generator in ubuntu 18.04

siddharthav opened this issue Β· 19 comments

Hi,
I have started working on franca for web application. And I am completely a newbie here, So in eclipse DSL tool I started preparing the environment for it. but I stuck at two issues.

Issue: 1.
In eclipse i have installed franca 13 from which I can generate the .js code for the client side.
>But later when I try to install common API core code generator its asking me to downgrade the franca to franca 9 from which the client side code cannot be generated .
> If I keep the franca to franca 13, then its asking me to install common API core code generator 2.9 Is there any way to keep franca 13 and latest common API code generator and runtime simultaneouly.

Issue-2:

On facing the issue 1, I downloaded the common API core generator 3.1.12 and tried to run throug the command liune and I used " ./cgen/commonapi-generator/commonapi-generator-linux-x86_64 ./fidl/HelloWorld.fidl " command but I end up with getting the below error/warning.

"WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.eclipse.osgi.storage.FrameworkExtensionInstaller (file:/home/siddhu/work/project/cgen/commonapi-generator/plugins/org.eclipse.osgi_3.10.2.v20141020-1740.jar) to method java.net.URLClassLoader.addURL(java.net.URL)
WARNING: Please consider reporting this to the maintainers of org.eclipse.osgi.storage.FrameworkExtensionInstaller
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release"
log file: 1552028070703.log
Below is the content of the log file:

`!SESSION 2019-03-08 12:24:29.963 -----------------------------------------------
eclipse.buildId=unknown
java.version=10.0.2
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_IN
Framework arguments: ./fidl/HelloWorld.fidl
Command-line arguments: -os linux -ws gtk -arch x86_64 ./fidl/HelloWorld.fidl

!ENTRY org.genivi.commonapi.console 4 0 2019-03-08 12:24:33.520
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.genivi.commonapi.console [57]
Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=1.8))"

at org.eclipse.osgi.container.Module.start(Module.java:434)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)

!ENTRY org.genivi.commonapi.core 4 0 2019-03-08 12:24:33.578
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.genivi.commonapi.core [58]
Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=1.8))"

at org.eclipse.osgi.container.Module.start(Module.java:434)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)

!ENTRY org.genivi.commonapi.core.cli 4 0 2019-03-08 12:24:33.582
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.genivi.commonapi.core.cli [59]
Unresolved requirement: Require-Bundle: org.genivi.commonapi.core; bundle-version="3.1.12"; visibility:="reexport"
-> Bundle-SymbolicName: org.genivi.commonapi.core; bundle-version="3.1.12.v201705291619"; singleton:="true"
org.genivi.commonapi.core [58]
Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=1.8))"

at org.eclipse.osgi.container.Module.start(Module.java:434)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)

!ENTRY org.genivi.commonapi.console 2 0 2019-03-08 12:24:34.459
!MESSAGE Could not resolve module: org.genivi.commonapi.console [57]
Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=1.8))"

!ENTRY org.genivi.commonapi.core.cli 2 0 2019-03-08 12:24:34.460
!MESSAGE Could not resolve module: org.genivi.commonapi.core.cli [59]
Unresolved requirement: Require-Bundle: org.genivi.commonapi.core; bundle-version="3.1.12"; visibility:="reexport"
-> Bundle-SymbolicName: org.genivi.commonapi.core; bundle-version="3.1.12.v201705291619"; singleton:="true"
org.genivi.commonapi.core [58]
Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=1.8))"

!ENTRY org.genivi.commonapi.core 2 0 2019-03-08 12:24:34.460
!MESSAGE Could not resolve module: org.genivi.commonapi.core [58]
Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=1.8))"

!ENTRY org.eclipse.equinox.launcher.win32.win32.x86 2 0 2019-03-08 12:24:34.461
!MESSAGE Could not resolve module: org.eclipse.equinox.launcher.win32.win32.x86 [34]
Unresolved requirement: Require-Capability: eclipse.platform; filter:="(& (osgi.ws=win32) (osgi.os=win32) (osgi.arch=x86))"

!ENTRY org.eclipse.osgi 4 0 2019-03-08 12:24:34.461
!MESSAGE Application error
!STACK 1
java.lang.RuntimeException: Application "org.genivi.commonapi.console.application" could not be found in the registry. The applications available are: org.eclipse.emf.codegen.CodeGen, org.eclipse.emf.codegen.JMerger, org.eclipse.emf.codegen.ecore.Generator, org.eclipse.emf.mwe.core.WorkflowRunner, org.eclipse.equinox.app.error, org.eclipse.jdt.core.JavaCodeFormatter, org.eclipse.jdt.core.JavaIndexer.
at org.eclipse.equinox.internal.app.EclipseAppContainer.startDefaultApp(EclipseAppContainer.java:248)
at org.eclipse.equinox.internal.app.MainApplicationLauncher.run(MainApplicationLauncher.java:29)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
at org.eclipse.equinox.launcher.Main.main(Main.java:1438)`

Can anybody help me on this please.kind request.

Hi,

Regarding your issue-2:
The code generator requires Java 8 and seems to be incompatible with newer java versions.
I was able fix the errors simply by installing Java 8 on Ubuntu 18.04: sudo apt install openjdk-8-jdk

Hope this helps!

I have the same error message, but under Windows. Java 7 and Java 8 are both installed. But no matter which one I pick, I get this error:

!ENTRY org.eclipse.osgi 4 0 2019-07-10 15:15:40.153 !MESSAGE Application error !STACK 1 java.lang.RuntimeException: Application "org.genivi.commonapi.console.application" could not be found in the registry. The applications available are: org.eclipse.emf.codegen.CodeGen, org.eclipse.emf.codegen.JMerger, org.eclipse.emf.codegen.ecore.Generator, org.eclipse.emf.mwe.core.WorkflowRunner, org.eclipse.equinox.app.error, org.eclipse.jdt.core.JavaCodeFormatter, org.eclipse.jdt.core.JavaIndexer.

Any ideas what might cause this?

I had similar issue. In my linux PC.
I changed the Java version still issue was there.

For me : the issue was Maven was not installed.
To install maven : sudo apt-get install maven

Now it works for me.

I had similar issue. In my linux PC.
I changed the Java version still issue was there.

For me : the issue was Maven was not installed.
To install maven : sudo apt-get install maven

Now it works for me.

I had maven In my system.
maven is already the newest version (3.6.0-1~18.04.1).
with java-version
openjdk version "1.8.0_242"

until i got issue of

!ENTRY org.eclipse.osgi 4 0 2019-07-10 15:15:40.153 !MESSAGE Application error !STACK 1 java.lang.RuntimeException: Application "org.genivi.commonapi.console.application" could not be found in the registry. The applications available are: org.eclipse.emf.codegen.CodeGen, org.eclipse.emf.codegen.JMerger, org.eclipse.emf.codegen.ecore.Generator, org.eclipse.emf.mwe.core.WorkflowRunner, org.eclipse.equinox.app.error, org.eclipse.jdt.core.JavaCodeFormatter, org.eclipse.jdt.core.JavaIndexer.

zeerd commented

I got the some problem on ubuntu 20.04

openjdk version "1.8.0_252"
OpenJDK Runtime Environment (build 1.8.0_252-8u252-b09-1ubuntu1-b09)
OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode)
!ENTRY org.eclipse.equinox.launcher.win32.win32.x86 2 0 2020-05-06 14:37:22.386
!MESSAGE Could not resolve module: org.eclipse.equinox.launcher.win32.win32.x86 [34]
  Unresolved requirement: Require-Capability: eclipse.platform; filter:="(& (osgi.ws=win32) (osgi.os=win32) (osgi.arch=x86))"


!ENTRY org.eclipse.osgi 4 0 2020-05-06 14:37:22.387
!MESSAGE Application error
!STACK 1
java.lang.RuntimeException: Application "org.genivi.commonapi.console.application" could not be found in the registry. The applications available are: org.eclipse.emf.codegen.CodeGen, org.eclipse.emf.codegen.JMerger, org.eclipse.emf.codegen.ecore.Generator, org.eclipse.emf.mwe.core.WorkflowRunner, org.eclipse.equinox.app.error, org.eclipse.jdt.core.JavaCodeFormatter, org.eclipse.jdt.core.JavaIndexer.
	at org.eclipse.equinox.internal.app.EclipseAppContainer.startDefaultApp(EclipseAppContainer.java:248)
	at org.eclipse.equinox.internal.app.MainApplicationLauncher.run(MainApplicationLauncher.java:29)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
zeerd commented

my problem fixed after this

rm -rf ~/.eclipse/

Hi All,

I am trying to generate code on Ubuntu 20.04 STL running in VirtualBox on Windows. I get the same error. I don't have .eclipse in home directory. What is the fix for the issue? @zeerd @gunnarx ?

I too had Java 11 but downgraded to Java 8. After that I see below error. Following are the logs:

!SESSION 2020-07-07 19:21:33.826 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_252
java.vendor=Private Build
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments: -sk ./fidl/HelloWorld.fidl
Command-line arguments: -os linux -ws gtk -arch x86_64 -sk ./fidl/HelloWorld.fidl

!ENTRY org.eclipse.equinox.launcher.win32.win32.x86 2 0 2020-07-07 19:21:35.320
!MESSAGE Could not resolve module: org.eclipse.equinox.launcher.win32.win32.x86 [34]
Unresolved requirement: Require-Capability: eclipse.platform; filter:="(& (osgi.ws=win32) (osgi.os=win32) (osgi.arch=x86))"

!ENTRY org.eclipse.osgi 4 0 2020-07-07 19:21:35.321
!MESSAGE Application error
!STACK 1
java.lang.RuntimeException: Application "org.genivi.commonapi.console.application" could not be found in the registry. The applications available are: org.eclipse.emf.codegen.CodeGen, org.eclipse.emf.codegen.JMerger, org.eclipse.emf.codegen.ecore.Generator, org.eclipse.emf.mwe.core.WorkflowRunner, org.eclipse.equinox.app.error, org.eclipse.jdt.core.JavaCodeFormatter, org.eclipse.jdt.core.JavaIndexer.
at org.eclipse.equinox.internal.app.EclipseAppContainer.startDefaultApp(EclipseAppContainer.java:248)
at org.eclipse.equinox.internal.app.MainApplicationLauncher.run(MainApplicationLauncher.java:29)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
at org.eclipse.equinox.launcher.Main.main(Main.java:1438)

My bad, may be I was using old tools. I downloaded latest generator binaries and there was no issue.

Thanks!

I have the same error message, but under Windows. Java 7 and Java 8 are both installed. But no matter which one I pick, I get this error:

!ENTRY org.eclipse.osgi 4 0 2019-07-10 15:15:40.153 !MESSAGE Application error !STACK 1 java.lang.RuntimeException: Application "org.genivi.commonapi.console.application" could not be found in the registry. The applications available are: org.eclipse.emf.codegen.CodeGen, org.eclipse.emf.codegen.JMerger, org.eclipse.emf.codegen.ecore.Generator, org.eclipse.emf.mwe.core.WorkflowRunner, org.eclipse.equinox.app.error, org.eclipse.jdt.core.JavaCodeFormatter, org.eclipse.jdt.core.JavaIndexer.

Any ideas what might cause this?

I also have the same issues in windows.

Hello, Please try to ise the latest 3.1.12 version generator I think you are using the old version. In the below link you will get the newest generators. https://github.com/GENIVI/capicxx-core-tools/releases/tag/3.1.12.4 Regards, Siddhartha V
…
On Wed, 12 Aug, 2020, 8:12 AM rlokanathan, @.***> wrote: I have the same error message, but under Windows. Java 7 and Java 8 are both installed. But no matter which one I pick, I get this error: !ENTRY org.eclipse.osgi 4 0 2019-07-10 15:15:40.153 !MESSAGE Application error !STACK 1 java.lang.RuntimeException: Application "org.genivi.commonapi.console.application" could not be found in the registry. The applications available are: org.eclipse.emf.codegen.CodeGen, org.eclipse.emf.codegen.JMerger, org.eclipse.emf.codegen.ecore.Generator, org.eclipse.emf.mwe.core.WorkflowRunner, org.eclipse.equinox.app.error, org.eclipse.jdt.core.JavaCodeFormatter, org.eclipse.jdt.core.JavaIndexer. Any ideas what might cause this? I also have the same issues in windows. β€” You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#15 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJAOYQO5EI6RK5OTUSK7IS3SAH6PZANCNFSM4G4TDLLA .

Hi, no, I am using the latest version generator. 3.1.12.4. And still I have the same issue.

Are you using the generator throgh command prompt? Or through eclipse?
…
On Wed, 12 Aug, 2020, 3:17 PM rlokanathan, @.> wrote: Hello, Please try to ise the latest 3.1.12 version generator I think you are using the old version. In the below link you will get the newest generators. https://github.com/GENIVI/capicxx-core-tools/releases/tag/3.1.12.4 Regards, Siddhartha V … <#m_-1791056389088043377_> On Wed, 12 Aug, 2020, 8:12 AM rlokanathan, @.> wrote: I have the same error message, but under Windows. Java 7 and Java 8 are both installed. But no matter which one I pick, I get this error: !ENTRY org.eclipse.osgi 4 0 2019-07-10 15:15:40.153 !MESSAGE Application error !STACK 1 java.lang.RuntimeException: Application "org.genivi.commonapi.console.application" could not be found in the registry. The applications available are: org.eclipse.emf.codegen.CodeGen, org.eclipse.emf.codegen.JMerger, org.eclipse.emf.codegen.ecore.Generator, org.eclipse.emf.mwe.core.WorkflowRunner, org.eclipse.equinox.app.error, org.eclipse.jdt.core.JavaCodeFormatter, org.eclipse.jdt.core.JavaIndexer. Any ideas what might cause this? I also have the same issues in windows. β€” You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#15 (comment) <#15 (comment)>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJAOYQO5EI6RK5OTUSK7IS3SAH6PZANCNFSM4G4TDLLA . Hi, no, I am using the latest version generator. 3.1.12.4. And still I have the same issue. β€” You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#15 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJAOYQNF4O5Z7WOWNWISDNLSAJQMVANCNFSM4G4TDLLA .

Through the command prompt.
Well the command I use is commonapi-generator\commonapi-generator-windows-x86_64.exe -sk fidl\HelloWorld.fidl

Hi,

I think you got me wrong, I am trying to run in Windows, not Ubuntu. So backward slash works for me. That's the reason I had to use commonapi-generator for Windows.

But in the subjectvitvis mentioned ubuntu 18.04. warning on running common API core code generator in ubuntu 18.04 (#15) Plz do check.
…
On Thu, 13 Aug, 2020, 6:48 AM rlokanathan, @.***> wrote: Hi, I think you got me wrong, I am trying to run in Windows, not Ubuntu. So backward slash works for me. That's the reason I had to use commonapi-generator for Windows. β€” You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#15 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJAOYQJWD3DKRM4USHGZM43SAM5NPANCNFSM4G4TDLLA .

Ah.. sorry for that, It wasn't my post. I just commented here as I was finding a solution for Windows. I have also posted a separate issue for Windows. Maybe you can reply there too.

I am facing the same issue with version 3.1.12.4, and finally root-caused to be jre version not match.

My ubuntu default java exeutiable is at /usr/bin/java, whose version is 11.0.6, which is not compaitable with generation tool.

So I manually downloaded jdk1.8 and put it in the hone dir, and update the PATH as:
export path = "/jdk1.8.0_191/bin" : $PATH, to let 1.8 jre take priority, problem resolved