[go: up one dir, main page]

Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Maven Dependency classes are not resolved in runtime eclipse during plugin development
Maven Dependency classes are not resolved in runtime eclipse during plugin development [message #1847463] Thu, 28 October 2021 07:14 Go to next message
Suseendran Jeevanantham is currently offline Suseendran JeevananthamFriend
Messages: 8
Registered: September 2021
Junior Member
I am trying to create an Eclipse plugin-in project. The functionality of the plug-in is to simply send a gRPC request to another server.

So, I have converted the plug-in project to Maven Project and included the required Maven Dependencies as below:

(Based on the documentation, https://github.com/grpc/grpc-java#readme )

<dependencies>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-netty-shaded</artifactId>
<version>1.41.0</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-protobuf</artifactId>
<version>1.41.0</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-stub</artifactId>
<version>1.41.0</version>
</dependency>
<dependency> <!-- necessary for Java 9+ -->
<groupId>org.apache.tomcat</groupId>
<artifactId>annotations-api</artifactId>
<version>6.0.53</version>
<scope>provided</scope>
</dependency>
</dependencies>

But when I try to launch the application in runtime-Eclipse, the gRPC dependencies are not resolved and so I am getting the below error:

!ENTRY org.eclipse.e4.ui.workbench 4 0 2021-10-28 08:19:37.492
!MESSAGE Unable to create class 'grpcclientmyplugin.parts.SampleView' from bundle '23'
!STACK 0
org.eclipse.e4.core.di.InjectionException: java.lang.NoClassDefFoundError: io/grpc/Channel
at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:414)


I think the Maven Dependencies are not detected by the launched Eclipse Application.

But if I create a normal maven project and execute it, everything is working fine.

I am not sure what needs to be configured (something like Target Platform or VM arguments) so that I can create an Eclipse plug-in that can send gRPC requests.

Any help is highly appreciated.
Re: Maven Dependency classes are not resolved in runtime eclipse during plugin development [message #1847775 is a reply to message #1847463] Mon, 08 November 2021 06:54 Go to previous message
Suseendran Jeevanantham is currently offline Suseendran JeevananthamFriend
Messages: 8
Registered: September 2021
Junior Member
The below steps resolved the issue:

- Created a plugin project with existing JAR files
- Added the Maven Dependency manually (by copying from the m2 folder),
- Added this plugin project to the Target Platform.

Previous Topic:Problems resolving dependency to packages "javax.servlet.*"
Next Topic:Invoking the "run" button command in plugin
Goto Forum:
  


Current Time: Thu Dec 12 16:41:48 GMT 2024

Powered by FUDForum. Page generated in 0.02952 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top