Re: JDO TCK Conference Call Thursday June 23 11 PDT 20 CEST

2022-06-26 Thread Craig Russell
I had installed the new java 8 version u333 but it looks like I just installed 
a jre.

So now I have a proper jdk  8u331. And the most recent maven 3.8.6.


clr% java -version
java version "1.8.0_331"
Java(TM) SE Runtime Environment (build 1.8.0_331-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.331-b09, mixed mode)
[MacBook-Pro-10:git/db-jdo/tck] clr% mvn --version
Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63)
Maven home: /Users/clr/apache-maven-3.8.6
Java version: 1.8.0_331, vendor: Oracle Corporation, runtime: 
/Library/Java/JavaVirtualMachines/jdk1.8.0_331.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "12.4", arch: "x86_64", family: "mac"

Now everything compiles and runs ok to completion but I get hundreds of 
warnings of generic class mismatches.

There are many examples, e.g.

/** Map of transaction isolation String values to Integer */
protected final static Map levelValues = new HashMap();
static {
levelValues.put(Constants.TX_READ_UNCOMMITTED, 0);
levelValues.put(Constants.TX_READ_COMMITTED, 1);
levelValues.put(Constants.TX_REPEATABLE_READ, 2);
levelValues.put(Constants.TX_SNAPSHOT, 3);
levelValues.put(Constants.TX_SERIALIZABLE, 4);
}

The untyped levelValues can be changed to HashMap and probably 
should be. But who is issuing these WARNINGs?

I will continue to add https: to all of the pom.xml and xxx.java files but 
would like to figure out what is going on.

Thanks,

Craig

[INFO] Compiling 898 source files to 
/Users/clr/apache/git/db-jdo/tck/target/classes
[WARNING] DataNucleus : JDOQLTypedQuery Q class generation : 
org.apache.jdo.tck.pc.companyAnnotatedPC.PCAppAddress -> 
org.apache.jdo.tck.pc.companyAnnotatedPC.QPCAppAddress
... many more of these messages...
DataNucleus : JDOQLTypedQuery Q class generation : 
org.apache.jdo.tck.pc.companyAnnotatedFC.FCDSAddress -> 
org.apache.jdo.tck.pc.companyAnnotatedFC.QFCDSAddress
DataNucleus : JDOQLTypedQuery Q class generation : 
org.apache.jdo.tck.pc.companyAnnotatedFC.FCAppProject -> 
org.apache.jdo.tck.pc.companyAnnotatedFC.QFCAppProject
DataNucleus : JDOQLTypedQuery Q class generation : 
org.apache.jdo.tck.pc.companyAnnotatedPI.PIAppInsurance -> 
org.apache.jdo.tck.pc.companyAnnotatedPI.QPIAppInsurance
DataNucleus : JDOQLTypedQuery Q class generation : 
org.apache.jdo.tck.pc.companyAnnotatedFC.FCAppMeetingRoom -> 
org.apache.jdo.tck.pc.companyAnnotatedFC.QFCAppMeetingRoom
DataNucleus : JDOQLTypedQuery Q class generation : 
org.apache.jdo.tck.pc.companyAnnotatedPI.PIAppDepartment -> 
org.apache.jdo.tck.pc.companyAnnotatedPI.QPIAppDepartment
DataNucleus : JDOQLTypedQuery Q class generation : 
org.apache.jdo.tck.pc.companyAnnotatedFC.FCAppAddress -> 
org.apache.jdo.tck.pc.companyAnnotatedFC.QFCAppAddress
DataNucleus : JDOQLTypedQuery Q class generation : 
org.apache.jdo.tck.pc.companyAnnotatedFC.FCDSEmployee -> 
org.apache.jdo.tck.pc.companyAnnotatedFC.QFCDSEmployee
DataNucleus : JDOQLTypedQuery Q class generation : 
org.apache.jdo.tck.pc.companyAnnotatedPC.PCDSDepartment -> 
org.apache.jdo.tck.pc.companyAnnotatedPC.QPCDSDepartment
DataNucleus : JDOQLTypedQuery Q class generation : 
org.apache.jdo.tck.pc.companyAnnotatedFC.DatastoreIdDiscriminatorClassNameInheritanceSuperclass
 -> 
org.apache.jdo.tck.pc.companyAnnotatedFC.QDatastoreIdDiscriminatorClassNameInheritanceSuperclass
Note: DataNucleus JDO AnnotationProcessor for generating JDOQLTypedQuery Q 
classes
/Users/clr/apache/git/db-jdo/tck/src/main/java/org/apache/jdo/tck/JDO_Test.java:[166,23]
 [unchecked] unchecked call to put(K,V) as a member of the raw type Map
  where K,V are type-variables:
K extends Object declared in interface Map
V extends Object declared in interface Map
[WARNING] 
/Users/clr/apache/git/db-jdo/tck/src/main/java/org/apache/jdo/tck/JDO_Test.java:[167,23]
 [unchecked] unchecked call to put(K,V) as a member of the raw type Map
  where K,V are type-variables:
K extends Object declared in interface Map
V extends Object declared in interface Map
[WARNING] 
/Users/clr/apache/git/db-jdo/tck/src/main/java/org/apache/jdo/tck/JDO_Test.java:[168,23]
 [unchecked] unchecked call to put(K,V) as a member of the raw type Map
  where K,V are type-variables:
K extends Object declared in interface Map
V extends Object declared in interface Map
[WARNING] 
/Users/clr/apache/git/db-jdo/tck/src/main/java/org/apache/jdo/tck/JDO_Test.java:[169,23]
 [unchecked] unchecked call to put(K,V) as a member of the raw type Map
  where K,V are type-variables:
K extends Object declared in interface Map
V extends Object declared in interface Map
[WARNING] 
/Users/clr/apache/git/db-jdo/tck/src/main/java/org/apache/jdo/tck/JDO_Test.java:[170,23]
 [unchecked] unchecked call to put(K,V) as a member of the raw type Map
  where K,V are type-variables:
K extends Object declared in interface Map
V extends Object declared in interface Map
[WARNING] 

Re: JDO TCK Conference Call Thursday June 23 11 PDT 20 CEST

2022-06-26 Thread Bouschen, Michael
Hi Craig,

I think your JDK version is too old. I downloaded jdk-8u71, installed it and 
see the same errors.
When I use jdk-8u201 everything compiles and runs fine.

Any reason why you are using such an old Java 8 version?
I switched to openjdk from adoptOpenJDK or from Azul (Zulu).

Regards Michael


Hi Michael,

Since I had not really changed anything except my environment, I started with a 
clean main branch. The only thing I've changed is the pom to make the compiler 
work (and removed the errant .mavenrc).

clr% echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/jdk1.8.0_71.jdk/Contents/Home
[MacBook-Pro-10:~/apache/git/db-jdo] clr% java -version
java version "1.8.0_71"
Java(TM) SE Runtime Environment (build 1.8.0_71-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.71-b15, mixed mode)

clr% cat ~/.mavenrc
cat: /Users/clr/.mavenrc: No such file or directory
clr% git status
On branch main
Your branch is up to date with 'origin/main'.

Changes not staged for commit:
  (use "git add ..." to update what will be committed)
  (use "git restore ..." to discard changes in working directory)
modified:   exectck/pom.xml
modified:   tck/pom.xml

no changes added to commit (use "git add" and/or "git commit -a")
[MacBook-Pro-10:~/apache/git/db-jdo] clr% git diff
diff --git a/exectck/pom.xml b/exectck/pom.xml
index 7bc67aed..8c49cc43 100644
--- a/exectck/pom.xml
+++ b/exectck/pom.xml
@@ -73,6 +73,15 @@

 
 
+
+org.apache.maven.plugins
+maven-compiler-plugin
+
+true
+true
+-Xlint:unchecked
+
+
 
 org.apache.maven.plugins
 maven-deploy-plugin
diff --git a/tck/pom.xml b/tck/pom.xml
index 3b70cb8c..4cfffe74 100644
--- a/tck/pom.xml
+++ b/tck/pom.xml
@@ -125,6 +125,15 @@
 ${project.name} 
${pom.currentVersion}
 
 
+
+org.apache.maven.plugins
+maven-compiler-plugin
+
+true
+true
+-Xlint:unchecked
+
+
 
 org.apache.maven.plugins
 maven-deploy-plugin




On Jun 25, 2022, at 03:20, Michael Bouschen 
 wrote:

Hi Craig,

about the test failure in the api submodule:
I'm wondering whether it has to do with the changes for JDO-815 "Change headers 
on source files to use https:// instead of http:".

I propose you stash your changes (or clone the db-jdo repository into a new 
directory) and do a mvn clean install on the original main branch. I expect 
this does not show the failures from below.
If so could you please checkin your current changes into a branch and push the 
branch? Then I can run the api tests using s diffent JDK, e.g. openjdk 11 from 
Zulu and whether this makes a difference.

Regards Michael




Hi Michael,

Thanks for checking... You found the issue.

My .mavenrc:
clr% cat ~/.mavenrc
echo "Maven config from .mavenrc"
export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)

So that needs to be changed (or removed since it has no value).

I also looked at the difference between the api module which has an explicit 
maven-compiler-plugin:


org.apache.maven.plugins
maven-compiler-plugin

true
true
-Xlint:unchecked



The other modules do not have the compiler plugin.

Removing .mavenrc makes everything... almost ok. There is this...

MacBook-Pro-10:~/apache/git/db-jdo] clr% mvn clean install
[INFO] Scanning for projects...
[INFO] 
[INFO] Reactor Build Order:
[INFO]
[INFO] JDO PARENT [pom]
[INFO] JDO API [jar]
[INFO] JDO TCK Execution Maven Mojo [maven-plugin]
[INFO] JDO Technology Compatibility Kit (TCK) [jar]
[INFO] JDO Root POM [pom]
[INFO]
[INFO] -< org.apache.jdo:parent-pom >--
[INFO] Building JDO PARENT 3.2.2-SNAPSHOT [1/5]
[INFO] [ pom ]-
[INFO]
[INFO] --- maven-clean-plugin:3.2.0:clean (default-clean) @ parent-pom ---
[INFO] Deleting /Users/clr/apache/git/db-jdo/parent-pom/target
[INFO]
[INFO] --- maven-enforcer-plugin:3.0.0:enforce (enforce-maven-version) @ 
parent-pom ---
[INFO]
[INFO] --- maven-enforcer-plugin:3.0.0:enforce (enforce-java-version) @ 
parent-pom ---
[INFO]
[INFO] --- maven-remote-resources-plugin:1.7.0:process 
(process-resource-bundles) @ parent-pom ---
[INFO] Preparing remote bundle org.apache:apache-jar-resource-bundle:1.4
[INFO] Copying 3 resources from 1 bundle.
[INFO]
[INFO] --- maven-site-plugin:3.11.0:attach-descriptor (attach-descriptor) @ 
parent-pom ---
[INFO] No site descriptor found: nothing to attach.
[INFO]
[INFO] --- maven-install-plugin:2.5.2:install (default-install) @ parent-pom ---
[INFO] Installing 

[jira] [Commented] (JDO-812) Move to JDK 11 as the lowest supported version

2022-06-26 Thread Andy Jefferson (Jira)


[ 
https://issues.apache.org/jira/browse/JDO-812?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17558863#comment-17558863
 ] 

Andy Jefferson commented on JDO-812:


FWIW DataNucleus v6.0 moved to supporting Java 11+ only, and is now released. 
Oracle Premier support for Java 8 ended in March 2022, even if their extended 
support continues.

DataNucleus (v6) has some use of things like List.of, or '@Generated' (which 
moved package for some reason from Java 8 -> 9 hence forced the move for us) 
but doesn't yet define modules or much else.

> Move to JDK 11 as the lowest supported version
> --
>
> Key: JDO-812
> URL: https://issues.apache.org/jira/browse/JDO-812
> Project: JDO
>  Issue Type: Task
>  Components: api, site and infrastructure, tck
>Affects Versions: JDO 3.2.1
>Reporter: Tobias Bouschen
>Priority: Minor
> Fix For: JDO 3.3
>
>
> I propose to move the lowest supported JDK version to JDK11 to allow us to 
> move the used libraries (like Derby) to the newest version. Additionally, 
> this would allow us to use some of the comfort features that were introduced 
> in-between JDK 8 and 11 (like In-line Collection creation through 
> {{{}List.of(...){}}}, etc.).
> From what I remember, we should already be fully compatible with JDK 11, so 
> the switch itself should only require minimal effort.
> This would definitely be a breaking change, so the benefit of this change 
> would have to be considered under this aspect as well (if we don't already 
> have breaking changes since 3.2). A second consideration would also be when 
> the next release is likely to take place (and whether JDK 8 will still be 
> relevant at that point.)



--
This message was sent by Atlassian Jira
(v8.20.7#820007)