question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Java 11 Module: reads package 'io.protostuff' from both 'protostuff.api' and 'protostuff.core'

See original GitHub issue

I am using Java 11 and protostuff, here is the module-info.java:

module nettyrpc.server {
    requires nettyrpc.common;
    requires io.netty.all;
    requires org.apache.logging.log4j;
    requires gson;
    requires protostuff.runtime;
    requires protostuff.api;
    requires protostuff.core;
}

Get the error: Module 'nettyrpc.server' reads package 'io.protostuff' from both 'protostuff.api' and 'protostuff.core'

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:2
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
mikaelgrevcommented, May 25, 2019

Hello, any news on this? It is as far as I understand a requirement for including protostuff in a module enabled project.

0reactions
ChrisTrenkampcommented, Jan 14, 2022

It’s not just protostuff.api and protostuff.core that share the same package; protostuff-runtime and protostuff-runtime-registry share the io.protostuff.runtime package. For people using Gradle, you can use https://github.com/jjohannes/extra-java-module-info/issues/1#issuecomment-734366652 as a workaround:

extraJavaModuleInfo {
	automaticModule("protostuff-core-1.7.2.jar", "io.protostuff") {
		mergeJar("protostuff-api-1.7.2.jar")
		mergeJar("protostuff-collectionschema-1.7.2.jar")
	}
	automaticModule("protostuff-runtime-registry-1.7.2.jar", "io.protostuff.runtime") {
		mergeJar("protostuff-runtime-1.7.2.jar")
	}
	...
}

I don’t know what side-effects this might cause, though…

Has there been any consideration for migrating to JPMS modules, or at least resolving these package conflicts? Would packages such as protostuff-core-api-jpms and protostuff-runtime-registry-jpms suffice?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error:java: module A reads package B from both C and D on ...
I got the following errors when build project using IntelliJ IDEA 2018 2.5 Community after migrating to Java 11 (I got this error...
Read more >
Module reads package from both - java - Stack Overflow
module ChanceTracker.main reads package org.bouncycastle.tsp.cms from both ... from both flying.saucer.pdf and flying.saucer.core.
Read more >
protostuff - issue #96 - Google Code
It implements the encoding of FQNCs using numeric ids. This is done for objects of types unknown in advance, but also for all...
Read more >
https://portal-data-cn.obs.cn-north-4.myhuaweiclou...
(Apache License, Version 2.0) AWS SDK for Java - Core ... (Apache License, Version 2.0) protostuff :: api (io.protostuff:protostuff-api:1.6.2 ...
Read more >
JetBrains/intellij-scala - Gitter
Registry: java.completion.argument.hints.internal=false. Non-Bundled Plugins: com.intellij.plugins.watcher, io.protostuff.protostuff-jetbrains-plugin, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found