Re: OFBiz 22.01 - Eclipse - Issues on setting up a debugging environment.

2023-02-16 Thread Carlos Navarro
Hello,

Many thanks for your helpful answers.

Carlos

El jue, 16 feb 2023 a las 14:01, Jacques Le Roux (<
jacques.le.r...@les7arts.com>) escribió:

> 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:  java.xml". The  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
> >> 

Re: OFBiz 22.01 - Eclipse - Issues on setting up a debugging environment.

2023-02-16 Thread 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:  java.xml". The  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

Re: OFBiz 22.01 - Eclipse - Issues on setting up a debugging environment.

2023-02-16 Thread Cheng Hu Shan

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:  java.xml". The  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