Hi,

thank you for these links. The first one provided a working temporary solution. Copying that line into settings (and changing "enable" to lowercase) has at least hidden the amount of errors.

I came across this blog post: https://moduliertersingvogel.de/2017/12/15/building-java-9-projects-with-eclipse-and-gradle/

The first code block successfully moved all foreign library jars into the module path. But I couldn't get the generation of module-info files to work. Maybe this can help you.


Best regards

Cheng Hu Shan

Am 16.02.23 um 17:59 schrieb Jacques Le Roux:
Hi,

It's a complicated matter due to indecision in an OpenJDK.

I'm curious to know if people using Intellij are crossing the same issue? That could explain why it has not been reported. Most OFBiz committers are using Intellij, I guess.

I looked at this issue some time ago and found that Eclipse compiler (used by UI to build the project) is not using the same way than javac. That's why, as Cheng Hu Shan said: " OFBiz actually starts and is operating properly thanks to the backwards compatibility of Java"

It's a "philosophy" difference. I found it well explained in this stackoverflow answer (and links from there): https://s.apache.org/8n6op

You may also read https://stackoverflow.com/questions/55571046/eclipse-is-confused-by-imports-accessible-from-more-than-one-module

Anyway, I need to fix that myself and will look at the best option when I'll get a chance. I tried some w/o success so far, . It's very annoying in Eclipse UI. The best way could be to follow the point 7 at https://www.eclipse.org/community/eclipse_newsletter/2018/june/java9andbeyond.php I did not try yet, just found it :)

HTH

Jacques

Le 16/02/2023 à 17:10, Cheng Hu Shan a écrit :
Hi,

I've encounterd the same problem. I cannot offer a solution. But maybe a better description of this problem may help you.

The root problem seems to be how the Java Platform Modular System introduced in version 9 and foreign libraries interact: Since Java 9 one particular package may only exists once in your entire project system, but if you import foreign libraries, they may bring their own version of a that package.

If you mouse over a faulty import statement in any of the java classes, you may find an error similiar to "The package [name] is accessible from more than one module: <unnamed> java.xml". The <unnamed> module refers to all foreign libraries stuffed into the classpath which counts as one huge unnamed module.

I'm surprised that this issue has not been reported yet, as it seems to be a fundamental one. My guess would be that we need to somehow update the build.gradle file.

On a side note: OfBiz actually starts and is operating properly thanks to the backwards compatiblity of Java, but the error messages remain.

Best regards,

Cheng Hu Shan


Am 14.02.23 um 23:15 schrieb Carlos Navarro:
Hello Community,

Hope you're all doing well.

I'm trying to setup OFBiz 22 and Eclipse in order to get a debugging
environment following
https://cwiki.apache.org/confluence/display/ofbiz/eclipse+tips

OFBiz version: 22.01
JDK: 17
Eclipse: Eclipse IDE for Enterprise Java and Web Developers (includes
Incubating components) Version: 2022-12 (4.26.0)
OS: Windows 10

However, as far as I import an existente OFBiz 22 Eclipse project, there
are a lot of errors (that I have have not experienced with OFBiz 18).

Here are some of them (100 of 3967 errors):


Description Resource Path Location Type
Attributes cannot be resolved to a type EntitySaxReader.java
/ofbiz/framework/entity/src/main/java/org/apache/ofbiz/entity/util line 527
Java Problem
Comment cannot be resolved to a type LabelManagerFactory.java
/ofbiz/framework/webtools/src/main/java/org/apache/ofbiz/webtools/labelmanager
line 164 Java Problem
Comment cannot be resolved to a type LabelManagerFactory.java
/ofbiz/framework/webtools/src/main/java/org/apache/ofbiz/webtools/labelmanager
line 169 Java Problem
Comment cannot be resolved to a type SaveLabelsToXmlFile.java
/ofbiz/framework/webtools/src/main/java/org/apache/ofbiz/webtools/labelmanager
line 128 Java Problem
Comment cannot be resolved to a type SaveLabelsToXmlFile.java
/ofbiz/framework/webtools/src/main/java/org/apache/ofbiz/webtools/labelmanager
line 143 Java Problem
Comment cannot be resolved to a type WebToolsDbEvents.java
/ofbiz/framework/webtools/src/main/java/org/apache/ofbiz/webtools line 99
Java Problem
DefaultHandler cannot be resolved to a type EntitySaxReader.java
/ofbiz/framework/entity/src/main/java/org/apache/ofbiz/entity/util line 75
Java Problem
DefaultHandler cannot be resolved to a type WebAppUtil.java
/ofbiz/framework/webapp/src/main/java/org/apache/ofbiz/webapp line 261 Java
Problem
DocumentBuilder cannot be resolved to a type CsrfUtilTests.java
/ofbiz/framework/security/src/test/java/org/apache/ofbiz/security line 115
Java Problem
DocumentBuilder cannot be resolved to a type CsrfUtilTests.java
/ofbiz/framework/security/src/test/java/org/apache/ofbiz/security line 152
Java Problem
DocumentBuilder cannot be resolved to a type GatewayResponse.java
/ofbiz/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/eway
line 169 Java Problem
DocumentBuilder cannot be resolved to a type ModelService.java
/ofbiz/framework/service/src/main/java/org/apache/ofbiz/service line 1883
Java Problem
DocumentBuilder cannot be resolved to a type WebToolsServices.java
/ofbiz/framework/webtools/src/main/java/org/apache/ofbiz/webtools line 163
Java Problem
DocumentBuilderFactory cannot be resolved CsrfUtilTests.java
/ofbiz/framework/security/src/test/java/org/apache/ofbiz/security line 114
Java Problem
DocumentBuilderFactory cannot be resolved CsrfUtilTests.java
/ofbiz/framework/security/src/test/java/org/apache/ofbiz/security line 151
Java Problem
DocumentBuilderFactory cannot be resolved GatewayResponse.java
/ofbiz/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/eway
line 167 Java Problem
DocumentBuilderFactory cannot be resolved ModelService.java
/ofbiz/framework/service/src/main/java/org/apache/ofbiz/service line 1882
Java Problem
DocumentBuilderFactory cannot be resolved WebToolsServices.java
/ofbiz/framework/webtools/src/main/java/org/apache/ofbiz/webtools line 163
Java Problem
DocumentBuilderFactory cannot be resolved to a type CsrfUtilTests.java
/ofbiz/framework/security/src/test/java/org/apache/ofbiz/security line 114
Java Problem
DocumentBuilderFactory cannot be resolved to a type CsrfUtilTests.java
/ofbiz/framework/security/src/test/java/org/apache/ofbiz/security line 151
Java Problem
DocumentBuilderFactory cannot be resolved to a type GatewayResponse.java /ofbiz/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/eway
line 167 Java Problem
DocumentBuilderFactory cannot be resolved to a type ModelService.java
/ofbiz/framework/service/src/main/java/org/apache/ofbiz/service line 1882
Java Problem
Document cannot be resolved to a type BirtServices.java
/ofbiz/plugins/birt/src/main/java/org/apache/ofbiz/birt/flexible line 336
Java Problem
Document cannot be resolved to a type CCPaymentServices.java
/ofbiz/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/clearcommerce
line 68 Java Problem
Document cannot be resolved to a type CCPaymentServices.java
/ofbiz/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/clearcommerce
line 71 Java Problem
Document cannot be resolved to a type CCPaymentServices.java
/ofbiz/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/clearcommerce
line 100 Java Problem
Document cannot be resolved to a type CCPaymentServices.java
/ofbiz/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/clearcommerce
line 102 Java Problem
Document cannot be resolved to a type CCPaymentServices.java
/ofbiz/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/clearcommerce
line 134 Java Problem
Document cannot be resolved to a type CCPaymentServices.java
/ofbiz/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/clearcommerce
line 137 Java Problem
Document cannot be resolved to a type CCPaymentServices.java
/ofbiz/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/clearcommerce
line 169 Java Problem
Document cannot be resolved to a type CCPaymentServices.java
/ofbiz/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/clearcommerce
line 172 Java Problem
Document cannot be resolved to a type CCPaymentServices.java
/ofbiz/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/clearcommerce
line 226 Java Problem
Document cannot be resolved to a type CCPaymentServices.java
/ofbiz/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/clearcommerce
line 229 Java Problem
Document cannot be resolved to a type CCPaymentServices.java
/ofbiz/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/clearcommerce
line 261 Java Problem
Document cannot be resolved to a type CCPaymentServices.java
/ofbiz/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/clearcommerce
line 264 Java Problem
Document cannot be resolved to a type CCPaymentServices.java
/ofbiz/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/clearcommerce
line 304 Java Problem
Document cannot be resolved to a type CCPaymentServices.java
/ofbiz/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/clearcommerce
line 381 Java Problem
Document cannot be resolved to a type CCPaymentServices.java
/ofbiz/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/clearcommerce
line 427 Java Problem
Document cannot be resolved to a type CCPaymentServices.java
/ofbiz/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/clearcommerce
line 461 Java Problem
Document cannot be resolved to a type CCPaymentServices.java
/ofbiz/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/clearcommerce
line 495 Java Problem
Document cannot be resolved to a type CCPaymentServices.java
/ofbiz/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/clearcommerce
line 529 Java Problem
Document cannot be resolved to a type CCPaymentServices.java
/ofbiz/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/clearcommerce
line 563 Java Problem
Document cannot be resolved to a type CCPaymentServices.java
/ofbiz/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/clearcommerce
line 597 Java Problem
Document cannot be resolved to a type CCPaymentServices.java
/ofbiz/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/clearcommerce
line 622 Java Problem
Document cannot be resolved to a type CCPaymentServices.java
/ofbiz/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/clearcommerce
line 640 Java Problem
Document cannot be resolved to a type CCPaymentServices.java
/ofbiz/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/clearcommerce
line 652 Java Problem
Document cannot be resolved to a type CCPaymentServices.java
/ofbiz/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/clearcommerce
line 739 Java Problem
Document cannot be resolved to a type CCPaymentServices.java
/ofbiz/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/clearcommerce
line 836 Java Problem
Document cannot be resolved to a type CCPaymentServices.java
/ofbiz/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/clearcommerce
line 891 Java Problem
Document cannot be resolved to a type CdyneServices.java
/ofbiz/framework/common/src/main/java/org/apache/ofbiz/common line 61 Java
Problem
Document cannot be resolved to a type ComponentConfig.java
/ofbiz/framework/base/src/main/java/org/apache/ofbiz/base/component line
409 Java Problem
Document cannot be resolved to a type ComponentLoaderConfig.java
/ofbiz/framework/base/src/main/java/org/apache/ofbiz/base/component line 80
Java Problem
Document cannot be resolved to a type ComponentLoaderConfig.java
/ofbiz/framework/base/src/main/java/org/apache/ofbiz/base/component line
161 Java Problem
Document cannot be resolved to a type ComponentResourceHandler.java
/ofbiz/framework/base/src/main/java/org/apache/ofbiz/base/component line 73
Java Problem
Document cannot be resolved to a type ConfigXMLReader.java
/ofbiz/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control line
232 Java Problem
Document cannot be resolved to a type CsrfUtilTests.java
/ofbiz/framework/security/src/test/java/org/apache/ofbiz/security line 116
Java Problem
Document cannot be resolved to a type CsrfUtilTests.java
/ofbiz/framework/security/src/test/java/org/apache/ofbiz/security line 153
Java Problem
Document cannot be resolved to a type DataResourceWorker.java
/ofbiz/applications/content/src/main/java/org/apache/ofbiz/content/data
line 783 Java Problem
Document cannot be resolved to a type DataResourceWorker.java
/ofbiz/applications/content/src/main/java/org/apache/ofbiz/content/data
line 813 Java Problem
Document cannot be resolved to a type Delegator.java
/ofbiz/framework/entity/src/main/java/org/apache/ofbiz/entity line 702 Java
Problem
Document cannot be resolved to a type DhlServices.java
/ofbiz/applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/dhl
line 293 Java Problem
Document cannot be resolved to a type DhlServices.java
/ofbiz/applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/dhl
line 309 Java Problem
Document cannot be resolved to a type DhlServices.java
/ofbiz/applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/dhl
line 395 Java Problem
Document cannot be resolved to a type DhlServices.java
/ofbiz/applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/dhl
line 428 Java Problem
Document cannot be resolved to a type DhlServices.java
/ofbiz/applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/dhl
line 447 Java Problem
Document cannot be resolved to a type DhlServices.java
/ofbiz/applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/dhl
line 796 Java Problem
Document cannot be resolved to a type DhlServices.java
/ofbiz/applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/dhl
line 854 Java Problem
Document cannot be resolved to a type DhlServices.java
/ofbiz/applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/dhl
line 855 Java Problem
Document cannot be resolved to a type DispatchContext.java
/ofbiz/framework/service/src/main/java/org/apache/ofbiz/service line 241
Java Problem
Document cannot be resolved to a type DynamicViewEntity.java
/ofbiz/framework/entity/src/main/java/org/apache/ofbiz/entity/model line 98
Java Problem
Document cannot be resolved to a type DynamicViewEntity.java
/ofbiz/framework/entity/src/main/java/org/apache/ofbiz/entity/model line
109 Java Problem
Document cannot be resolved to a type EbayHelper.java
/ofbiz/plugins/ebay/src/main/java/org/apache/ofbiz/ebay line 103 Java
Problem
Document cannot be resolved to a type EbayOrderServices.java
/ofbiz/plugins/ebay/src/main/java/org/apache/ofbiz/ebay line 180 Java
Problem
Document cannot be resolved to a type EbayOrderServices.java
/ofbiz/plugins/ebay/src/main/java/org/apache/ofbiz/ebay line 230 Java
Problem
Document cannot be resolved to a type EbayOrderServices.java
/ofbiz/plugins/ebay/src/main/java/org/apache/ofbiz/ebay line 267 Java
Problem
Document cannot be resolved to a type EbayOrderServices.java
/ofbiz/plugins/ebay/src/main/java/org/apache/ofbiz/ebay line 454 Java
Problem
Document cannot be resolved to a type EbayOrderServices.java
/ofbiz/plugins/ebay/src/main/java/org/apache/ofbiz/ebay line 681 Java
Problem
Document cannot be resolved to a type EbayOrderServices.java
/ofbiz/plugins/ebay/src/main/java/org/apache/ofbiz/ebay line 993 Java
Problem
Document cannot be resolved to a type EntitySaxReader.java
/ofbiz/framework/entity/src/main/java/org/apache/ofbiz/entity/util line 112
Java Problem
Document cannot be resolved to a type EntitySaxReader.java
/ofbiz/framework/entity/src/main/java/org/apache/ofbiz/entity/util line 339
Java Problem
Document cannot be resolved to a type EntitySaxReader.java
/ofbiz/framework/entity/src/main/java/org/apache/ofbiz/entity/util line 556
Java Problem
Document cannot be resolved to a type EntitySaxReader.java
/ofbiz/framework/entity/src/main/java/org/apache/ofbiz/entity/util line 561
Java Problem
Document cannot be resolved to a type EntitySyncServices.java
/ofbiz/framework/entityext/src/main/java/org/apache/ofbiz/entityext/synchronization
line 483 Java Problem
Document cannot be resolved to a type EntitySyncServices.java
/ofbiz/framework/entityext/src/main/java/org/apache/ofbiz/entityext/synchronization
line 561 Java Problem
Document cannot be resolved to a type FedexServices.java
/ofbiz/applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/fedex
line 381 Java Problem
Document cannot be resolved to a type FedexServices.java
/ofbiz/applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/fedex
line 1020 Java Problem
Document cannot be resolved to a type FormFactory.java
/ofbiz/framework/widget/src/main/java/org/apache/ofbiz/widget/model line 58
Java Problem
Document cannot be resolved to a type FormFactory.java
/ofbiz/framework/widget/src/main/java/org/apache/ofbiz/widget/model line 71
Java Problem
Document cannot be resolved to a type FormFactory.java
/ofbiz/framework/widget/src/main/java/org/apache/ofbiz/widget/model line
101 Java Problem
Document cannot be resolved to a type FormFactory.java
/ofbiz/framework/widget/src/main/java/org/apache/ofbiz/widget/model line
114 Java Problem
Document cannot be resolved to a type FormFactory.java
/ofbiz/framework/widget/src/main/java/org/apache/ofbiz/widget/model line
142 Java Problem
Document cannot be resolved to a type GatewayResponse.java
/ofbiz/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/eway
line 170 Java Problem
Document cannot be resolved to a type GenericDelegator.java
/ofbiz/framework/entity/src/main/java/org/apache/ofbiz/entity line 2182
Java Problem
Document cannot be resolved to a type GenericEntity.java
/ofbiz/framework/entity/src/main/java/org/apache/ofbiz/entity line 1230
Java Problem
Document cannot be resolved to a type GenericEntity.java
/ofbiz/framework/entity/src/main/java/org/apache/ofbiz/entity line 1231
Java Problem
Document cannot be resolved to a type GenericEntity.java
/ofbiz/framework/entity/src/main/java/org/apache/ofbiz/entity line 1241
Java Problem
Document cannot be resolved to a type GenericEntity.java
/ofbiz/framework/entity/src/main/java/org/apache/ofbiz/entity line 1245
Java Problem
Document cannot be resolved to a type GenericEntity.java
/ofbiz/framework/entity/src/main/java/org/apache/ofbiz/entity line 1268
Java Problem
Document cannot be resolved to a type GenericEntity.java
/ofbiz/framework/entity/src/main/java/org/apache/ofbiz/entity line 1277
Java Problem
Document cannot be resolved to a type GridFactory.java
/ofbiz/framework/widget/src/main/java/org/apache/ofbiz/widget/model line 60
Java Problem

Any clue on how to fix these issues?

Thanks.

Carlos Navarro

Reply via email to