Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java 9 Modules - split package errors #8001

Closed
nullterminated opened this issue Jan 13, 2018 · 3 comments
Closed

Java 9 Modules - split package errors #8001

nullterminated opened this issue Jan 13, 2018 · 3 comments
Assignees
Milestone

Comments

@nullterminated
Copy link

OrientDB Version: 3.0.0RC1

Java Version: OpenJDK 64-Bit Server VM (build 9+181, mixed mode)

OS: Arch Linux ARM

Create bare maven project in netbeans. Add orientdb-graphdb to dependencies. Create new modules-info.java. Generated result is:

module MyApp {
	requires orientdb.graphdb;
	requires orientdb.server;
	requires orientdb.client;
	requires mail;
	requires activation;
	requires jaxb.impl;
	requires jaxb.api;
	requires stax.api;
	requires orientdb.tools;
	requires orientdb.core;
	requires jna;
	requires jna.platform;
	requires snappy.java;
	requires concurrentlinkedhashmap.lru;
	requires blueprints.core;
	requires jettison;
	requires hppc;
	requires commons.configuration;
	requires commons.lang;
	requires commons.digester;
	requires commons.beanutils;
	requires commons.beanutils.core;
	requires commons.logging;
}

And fails to compile with errors:

-------------------------------------------------------------
COMPILATION ERROR : 
-------------------------------------------------------------
the unnamed module reads package com.orientechnologies.orient.core.metadata.schema from both orientdb.core and orientdb.client
the unnamed module reads package com.orientechnologies.orient.core.db from both orientdb.core and orientdb.client
the unnamed module reads package com.orientechnologies.orient.core.db.document from both orientdb.core and orientdb.client
the unnamed module reads package com.orientechnologies.orient.server.network.protocol.http from both orientdb.server and orientdb.graphdb
the unnamed module reads package org.apache.commons.collections from both commons.beanutils and commons.beanutils.core
the unnamed module reads package org.apache.commons.beanutils.locale.converters from both commons.beanutils and commons.beanutils.core
the unnamed module reads package org.apache.commons.beanutils.locale from both commons.beanutils and commons.beanutils.core
the unnamed module reads package org.apache.commons.beanutils.converters from both commons.beanutils and commons.beanutils.core
the unnamed module reads package org.apache.commons.beanutils from both commons.beanutils and commons.beanutils.core
module commons.beanutils reads package com.orientechnologies.orient.core.metadata.schema from both orientdb.core and orientdb.client
module commons.beanutils reads package com.orientechnologies.orient.core.db from both orientdb.core and orientdb.client
module commons.beanutils reads package com.orientechnologies.orient.core.db.document from both orientdb.core and orientdb.client
module commons.beanutils reads package com.orientechnologies.orient.server.network.protocol.http from both orientdb.graphdb and orientdb.server
module commons.beanutils reads package org.apache.commons.collections from both commons.beanutils and commons.beanutils.core
module commons.beanutils reads package org.apache.commons.beanutils.locale.converters from both commons.beanutils and commons.beanutils.core
module commons.beanutils reads package org.apache.commons.beanutils.locale from both commons.beanutils and commons.beanutils.core
module commons.beanutils reads package org.apache.commons.beanutils.converters from both commons.beanutils and commons.beanutils.core
module commons.beanutils reads package org.apache.commons.beanutils from both commons.beanutils and commons.beanutils.core
module commons.digester reads package com.orientechnologies.orient.core.metadata.schema from both orientdb.core and orientdb.client
module commons.digester reads package com.orientechnologies.orient.core.db from both orientdb.core and orientdb.client
module commons.digester reads package com.orientechnologies.orient.core.db.document from both orientdb.core and orientdb.client
module commons.digester reads package com.orientechnologies.orient.server.network.protocol.http from both orientdb.graphdb and orientdb.server
module commons.digester reads package org.apache.commons.collections from both commons.beanutils and commons.beanutils.core
module commons.digester reads package org.apache.commons.beanutils.locale.converters from both commons.beanutils and commons.beanutils.core
module commons.digester reads package org.apache.commons.beanutils.locale from both commons.beanutils and commons.beanutils.core
module commons.digester reads package org.apache.commons.beanutils.converters from both commons.beanutils and commons.beanutils.core
module commons.digester reads package org.apache.commons.beanutils from both commons.beanutils and commons.beanutils.core
module commons.lang reads package com.orientechnologies.orient.core.metadata.schema from both orientdb.core and orientdb.client
module commons.lang reads package com.orientechnologies.orient.core.db from both orientdb.core and orientdb.client
module commons.lang reads package com.orientechnologies.orient.core.db.document from both orientdb.core and orientdb.client
module commons.lang reads package com.orientechnologies.orient.server.network.protocol.http from both orientdb.graphdb and orientdb.server
module commons.lang reads package org.apache.commons.collections from both commons.beanutils and commons.beanutils.core
module commons.lang reads package org.apache.commons.beanutils.locale.converters from both commons.beanutils and commons.beanutils.core
module commons.lang reads package org.apache.commons.beanutils.locale from both commons.beanutils and commons.beanutils.core
module commons.lang reads package org.apache.commons.beanutils.converters from both commons.beanutils and commons.beanutils.core
module commons.lang reads package org.apache.commons.beanutils from both commons.beanutils and commons.beanutils.core
module commons.configuration reads package com.orientechnologies.orient.core.metadata.schema from both orientdb.core and orientdb.client
module commons.configuration reads package com.orientechnologies.orient.core.db from both orientdb.core and orientdb.client
module commons.configuration reads package com.orientechnologies.orient.core.db.document from both orientdb.core and orientdb.client
module commons.configuration reads package com.orientechnologies.orient.server.network.protocol.http from both orientdb.graphdb and orientdb.server
module commons.configuration reads package org.apache.commons.collections from both commons.beanutils and commons.beanutils.core
module commons.configuration reads package org.apache.commons.beanutils.locale.converters from both commons.beanutils and commons.beanutils.core
module commons.configuration reads package org.apache.commons.beanutils.locale from both commons.beanutils and commons.beanutils.core
module commons.configuration reads package org.apache.commons.beanutils.converters from both commons.beanutils and commons.beanutils.core
module commons.configuration reads package org.apache.commons.beanutils from both commons.beanutils and commons.beanutils.core
module hppc reads package com.orientechnologies.orient.core.metadata.schema from both orientdb.core and orientdb.client
module hppc reads package com.orientechnologies.orient.core.db from both orientdb.core and orientdb.client
module hppc reads package com.orientechnologies.orient.core.db.document from both orientdb.core and orientdb.client
module hppc reads package com.orientechnologies.orient.server.network.protocol.http from both orientdb.graphdb and orientdb.server
module hppc reads package org.apache.commons.collections from both commons.beanutils and commons.beanutils.core
module hppc reads package org.apache.commons.beanutils.locale.converters from both commons.beanutils and commons.beanutils.core
module hppc reads package org.apache.commons.beanutils.locale from both commons.beanutils and commons.beanutils.core
module hppc reads package org.apache.commons.beanutils.converters from both commons.beanutils and commons.beanutils.core
module hppc reads package org.apache.commons.beanutils from both commons.beanutils and commons.beanutils.core
module jettison reads package com.orientechnologies.orient.core.metadata.schema from both orientdb.core and orientdb.client
module jettison reads package com.orientechnologies.orient.core.db from both orientdb.core and orientdb.client
module jettison reads package com.orientechnologies.orient.core.db.document from both orientdb.core and orientdb.client
module jettison reads package com.orientechnologies.orient.server.network.protocol.http from both orientdb.graphdb and orientdb.server
module jettison reads package org.apache.commons.collections from both commons.beanutils and commons.beanutils.core
module jettison reads package org.apache.commons.beanutils.locale.converters from both commons.beanutils and commons.beanutils.core
module jettison reads package org.apache.commons.beanutils.locale from both commons.beanutils and commons.beanutils.core
module jettison reads package org.apache.commons.beanutils.converters from both commons.beanutils and commons.beanutils.core
module jettison reads package org.apache.commons.beanutils from both commons.beanutils and commons.beanutils.core
module blueprints.core reads package com.orientechnologies.orient.core.metadata.schema from both orientdb.core and orientdb.client
module blueprints.core reads package com.orientechnologies.orient.core.db from both orientdb.core and orientdb.client
module blueprints.core reads package com.orientechnologies.orient.core.db.document from both orientdb.core and orientdb.client
module blueprints.core reads package com.orientechnologies.orient.server.network.protocol.http from both orientdb.graphdb and orientdb.server
module blueprints.core reads package org.apache.commons.collections from both commons.beanutils and commons.beanutils.core
module blueprints.core reads package org.apache.commons.beanutils.locale.converters from both commons.beanutils and commons.beanutils.core
module blueprints.core reads package org.apache.commons.beanutils.locale from both commons.beanutils and commons.beanutils.core
module blueprints.core reads package org.apache.commons.beanutils.converters from both commons.beanutils and commons.beanutils.core
module blueprints.core reads package org.apache.commons.beanutils from both commons.beanutils and commons.beanutils.core
module concurrentlinkedhashmap.lru reads package com.orientechnologies.orient.core.metadata.schema from both orientdb.core and orientdb.client
module concurrentlinkedhashmap.lru reads package com.orientechnologies.orient.core.db from both orientdb.core and orientdb.client
module concurrentlinkedhashmap.lru reads package com.orientechnologies.orient.core.db.document from both orientdb.core and orientdb.client
module concurrentlinkedhashmap.lru reads package com.orientechnologies.orient.server.network.protocol.http from both orientdb.graphdb and orientdb.server
module concurrentlinkedhashmap.lru reads package org.apache.commons.collections from both commons.beanutils and commons.beanutils.core
module concurrentlinkedhashmap.lru reads package org.apache.commons.beanutils.locale.converters from both commons.beanutils and commons.beanutils.core
module concurrentlinkedhashmap.lru reads package org.apache.commons.beanutils.locale from both commons.beanutils and commons.beanutils.core
module concurrentlinkedhashmap.lru reads package org.apache.commons.beanutils.converters from both commons.beanutils and commons.beanutils.core
module concurrentlinkedhashmap.lru reads package org.apache.commons.beanutils from both commons.beanutils and commons.beanutils.core
module snappy.java reads package com.orientechnologies.orient.core.metadata.schema from both orientdb.core and orientdb.client
module snappy.java reads package com.orientechnologies.orient.core.db from both orientdb.core and orientdb.client
module snappy.java reads package com.orientechnologies.orient.core.db.document from both orientdb.core and orientdb.client
module snappy.java reads package com.orientechnologies.orient.server.network.protocol.http from both orientdb.graphdb and orientdb.server
module snappy.java reads package org.apache.commons.collections from both commons.beanutils and commons.beanutils.core
module snappy.java reads package org.apache.commons.beanutils.locale.converters from both commons.beanutils and commons.beanutils.core
module snappy.java reads package org.apache.commons.beanutils.locale from both commons.beanutils and commons.beanutils.core
module snappy.java reads package org.apache.commons.beanutils.converters from both commons.beanutils and commons.beanutils.core
module snappy.java reads package org.apache.commons.beanutils from both commons.beanutils and commons.beanutils.core
module jna.platform reads package com.orientechnologies.orient.core.metadata.schema from both orientdb.core and orientdb.client
module jna.platform reads package com.orientechnologies.orient.core.db from both orientdb.core and orientdb.client
module jna.platform reads package com.orientechnologies.orient.core.db.document from both orientdb.core and orientdb.client
module jna.platform reads package com.orientechnologies.orient.server.network.protocol.http from both orientdb.graphdb and orientdb.server
module jna.platform reads package org.apache.commons.collections from both commons.beanutils and commons.beanutils.core
module jna.platform reads package org.apache.commons.beanutils.locale.converters from both commons.beanutils and commons.beanutils.core
module jna.platform reads package org.apache.commons.beanutils.locale from both commons.beanutils and commons.beanutils.core
module jna.platform reads package org.apache.commons.beanutils.converters from both commons.beanutils and commons.beanutils.core
module jna.platform reads package org.apache.commons.beanutils from both commons.beanutils and commons.beanutils.core
module jna reads package com.orientechnologies.orient.core.metadata.schema from both orientdb.core and orientdb.client
100 errors 
-------------------------------------------------------------
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
@tglman tglman self-assigned this Jan 15, 2018
@scotthoye
Copy link

Hello, and thank you to everyone involved with creating OrientDB! This is my first post (we've been using OrientDB for a few years now, and it has been quite useful!). We are currently looking into modularization of our code, and this issue (currently marked closed as completed) has become a blocker for us. Our code depends on orientdb-core-3.2.16, orientdb-client-3.2.16, orientdb-server-3.2.16, and orientdb-tools-3.2.16. Really we only need orientdb-server, but it depends on all of the others (and their transitive dependencies). The problem is that orientdb-core and orientdb-client contain split packages, which are not allowed by Java 9+ modules. Split packages can be detected by the jdeps tool, but we actually use this jsplitpkgscan tool, as it can better identify split packages. The following split packages are still being identified between orientdb-core-3.2.16 and orientdb-client-3.2.16, which is blocking the ability for us to move forward with Java 9+ modularity. Can these packages be renamed in a future 3.2.X release, perhaps just in the orientdb-client jar, so that they are unique between the two jars?

Package com.orientechnologies.orient.core.db exists in both orientdb-core-3.2.16 and orientdb-client-3.2.16

Package com.orientechnologies.orient.core.db.document exists in both orientdb-core-3.2.16 and orientdb-client-3.2.16

Package com.orientechnologies.orient.core.metadata.schema exists in both orientdb-core-3.2.16 and orientdb-client-3.2.16

Package com.orientechnologies.orient.core.metadata.security exists in both orientdb-core-3.2.16 and orientdb-client-3.2.16

Hopefully fixing this now would make OrientDB more robust in future Java versions as modularity is used more and more. Please let me know if I should create a separate ticket instead of reusing this one. Thanks again!

@tglman tglman reopened this Mar 14, 2023
@tglman
Copy link
Member

tglman commented Mar 14, 2023

Hi,

Yes it make sense for orientdb to support modularization in long term, will check and try to move the things that can be moved to the right packages, without breaking the APIs.

Bye

@scotthoye
Copy link

This split package issue appears to be fixed in the latest 3.2.X versions of the orientdb jars. Thank you!

@tglman tglman closed this as completed Oct 4, 2023
@tglman tglman modified the milestones: 3.2.x, 3.2.19 Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants