Discussion:
upgrading from java 8
Joseph Dornisch
2018-10-22 20:26:45 UTC
Permalink
So, I'm updating my own small project from java 8 - currently to 9 and will
move to 11 later today.

In order to generate the jooq source (which I don't do via maven currently,
I added '--add-modules java.xml.bind' to the command:
java --add-modules java.xml.bind org.jooq.codegen.GenerationTool codegen.xml

Then to compile my code along with the generated code, I added the
following dependency to my pom.xml file:
<dependency>
<groupId>javax.xml.ws</groupId>
<artifactId>jaxws-api</artifactId>
<version>2.3.1</version>
</dependency>

Is this the generally preferred way of moving forwards with jooq with java
9,10,11 right now?
Is there some other replacement dependency I should use for code generation
similarly to adding the javax.xml.ws dependency?

Sorry, if this is covered elsewhere, I did try to find information in the
online jooq documentation.

Thanks.
--
You received this message because you are subscribed to the Google Groups "jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Marshall Pierce
2018-10-22 20:36:09 UTC
Permalink
I'm using Java 11, and I avoided `--add-modules` by using the following
for the gradle jooq plugin so that it can write out the jooq xml config
(in `buildscript`):

classpath "com.sun.xml.bind:jaxb-impl:2.3.0.1"
classpath "com.sun.xml.bind:jaxb-core:2.3.0.1"
classpath "com.sun.activation:javax.activation:1.2.0"

and for actually running jooq codegen (in the typical `dependencies` block):

// also include your jdbc driver
jooqRuntime "com.sun.xml.bind:jaxb-impl:2.3.0.1"
jooqRuntime "com.sun.xml.bind:jaxb-core:2.3.0.1"
jooqRuntime "javax.xml.bind:jaxb-api:2.3.0"
jooqRuntime "com.sun.activation:javax.activation:1.2.0"

I gave up on maven years ago so I don't know how to translate that into
maven-ese exactly, but at least in principle it is possible!

Your dependency on jaxws includes transitive dependencies on jaxb-impl,
jaxb-core, and javax.activation, so you could just use those three if
you don't need the rest of jaxws-api and want to include fewer
extraneous jars in your final artifact.
Post by Joseph Dornisch
So, I'm updating my own small project from java 8 - currently to 9 and
will move to 11 later today.
In order to generate the jooq source (which I don't do via maven
java --add-modules java.xml.bind org.jooq.codegen.GenerationTool codegen.xml
Then to compile my code along with the generated code, I added the
<dependency>
    <groupId>javax.xml.ws</groupId>
    <artifactId>jaxws-api</artifactId>
    <version>2.3.1</version>
</dependency>
Is this the generally preferred way of moving forwards with jooq with
java 9,10,11 right now?
Is there some other replacement dependency I should use for code
generation similarly to adding the javax.xml.ws dependency?
Sorry, if this is covered elsewhere, I did try to find information in
the online jooq documentation.
Thanks.
--
You received this message because you are subscribed to the Google
Groups "jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Marshall Pierce
2018-10-22 20:39:43 UTC
Permalink
Oops, I misspoke -- jaxws-rt has those three transitive dependencies;
jaxws-api only has some of them.
Post by Joseph Dornisch
So, I'm updating my own small project from java 8 - currently to 9 and
will move to 11 later today.
In order to generate the jooq source (which I don't do via maven
java --add-modules java.xml.bind org.jooq.codegen.GenerationTool codegen.xml
Then to compile my code along with the generated code, I added the
<dependency>
<groupId>javax.xml.ws</groupId>
<artifactId>jaxws-api</artifactId>
<version>2.3.1</version>
</dependency>
Is this the generally preferred way of moving forwards with jooq with java
9,10,11 right now?
Is there some other replacement dependency I should use for code
generation similarly to adding the javax.xml.ws dependency?
Sorry, if this is covered elsewhere, I did try to find information in the
online jooq documentation.
Thanks.
--
You received this message because you are subscribed to the Google Groups "jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Joseph Dornisch
2018-10-22 21:13:04 UTC
Permalink
Using the javax.xml.ws made sense to me since I avoided using a deprecated
or internal library from Java. I don't like that I still used
"--add-modules java.xml.bind" for CodeGen, as it doesn't remove this
dependency going forward.

Your solution still makes use of sun packages, which I think it would be
better to avoid. I actually put javax.xml.bind/jaxb-api in my pom.xml file
as well, but it didn't seem to help out.
Post by Marshall Pierce
Oops, I misspoke -- jaxws-rt has those three transitive dependencies;
jaxws-api only has some of them.
Post by Joseph Dornisch
So, I'm updating my own small project from java 8 - currently to 9 and
will move to 11 later today.
In order to generate the jooq source (which I don't do via maven
java --add-modules java.xml.bind org.jooq.codegen.GenerationTool codegen.xml
Then to compile my code along with the generated code, I added the
<dependency>
<groupId>javax.xml.ws</groupId>
<artifactId>jaxws-api</artifactId>
<version>2.3.1</version>
</dependency>
Is this the generally preferred way of moving forwards with jooq with
java 9,10,11 right now?
Is there some other replacement dependency I should use for code
generation similarly to adding the javax.xml.ws dependency?
Sorry, if this is covered elsewhere, I did try to find information in the
online jooq documentation.
Thanks.
--
You received this message because you are subscribed to the Google Groups "jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Marshall Pierce
2018-10-22 21:22:08 UTC
Permalink
As far as I've found, you're not going to get away from the sun packages
until jaxb 2.4.0 is released, which is supposed to be module-friendly. The
JVM will emit warnings about jaxb-impl accessing ClassLoader.defineClass,
but it does work and doesn't require modifying your cli invocation.
Post by Joseph Dornisch
Using the javax.xml.ws made sense to me since I avoided using a
deprecated or internal library from Java. I don't like that I still used
"--add-modules java.xml.bind" for CodeGen, as it doesn't remove this
dependency going forward.
Your solution still makes use of sun packages, which I think it would be
better to avoid. I actually put javax.xml.bind/jaxb-api in my pom.xml file
as well, but it didn't seem to help out.
Post by Marshall Pierce
Oops, I misspoke -- jaxws-rt has those three transitive dependencies;
jaxws-api only has some of them.
Post by Joseph Dornisch
So, I'm updating my own small project from java 8 - currently to 9 and
will move to 11 later today.
In order to generate the jooq source (which I don't do via maven
java --add-modules java.xml.bind org.jooq.codegen.GenerationTool codegen.xml
Then to compile my code along with the generated code, I added the
<dependency>
<groupId>javax.xml.ws</groupId>
<artifactId>jaxws-api</artifactId>
<version>2.3.1</version>
</dependency>
Is this the generally preferred way of moving forwards with jooq with
java 9,10,11 right now?
Is there some other replacement dependency I should use for code
generation similarly to adding the javax.xml.ws dependency?
Sorry, if this is covered elsewhere, I did try to find information in
the online jooq documentation.
Thanks.
--
You received this message because you are subscribed to the Google Groups "jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Lukas Eder
2018-10-23 08:02:52 UTC
Permalink
We'll fully support Java 11 with jOOQ 3.12. Until then, unfortunately, our
internal JAXB dependencies cause trouble with projects upgrading to any of
Java 9-11, in different ways. These things have been moving targets within
the JDK for 2 reasons:

- Java 9/10 introduced modularity and that caused problems with the JAXB
dependency, which still shipped with the JDK, but was no longer on the
module path by default (it could be added using --add-modules java.xml.bind)
- Java 11 removed JAXB (and CORBA, good riddance) from the JDK, so
--add-modules java.xml.bind should no longer work, you need an actual JAXB
dependency on your classpath)

This is the same with all libraries that have a JAXB dependency,
unfortunately.

Thanks,
Lukas
Post by Marshall Pierce
As far as I've found, you're not going to get away from the sun packages
until jaxb 2.4.0 is released, which is supposed to be module-friendly. The
JVM will emit warnings about jaxb-impl accessing ClassLoader.defineClass,
but it does work and doesn't require modifying your cli invocation.
Post by Joseph Dornisch
Using the javax.xml.ws made sense to me since I avoided using a
deprecated or internal library from Java. I don't like that I still used
"--add-modules java.xml.bind" for CodeGen, as it doesn't remove this
dependency going forward.
Your solution still makes use of sun packages, which I think it would be
better to avoid. I actually put javax.xml.bind/jaxb-api in my pom.xml file
as well, but it didn't seem to help out.
Post by Marshall Pierce
Oops, I misspoke -- jaxws-rt has those three transitive dependencies;
jaxws-api only has some of them.
Post by Joseph Dornisch
So, I'm updating my own small project from java 8 - currently to 9 and
will move to 11 later today.
In order to generate the jooq source (which I don't do via maven
java --add-modules java.xml.bind org.jooq.codegen.GenerationTool codegen.xml
Then to compile my code along with the generated code, I added the
<dependency>
<groupId>javax.xml.ws</groupId>
<artifactId>jaxws-api</artifactId>
<version>2.3.1</version>
</dependency>
Is this the generally preferred way of moving forwards with jooq with
java 9,10,11 right now?
Is there some other replacement dependency I should use for code
generation similarly to adding the javax.xml.ws dependency?
Sorry, if this is covered elsewhere, I did try to find information in
the online jooq documentation.
Thanks.
--
You received this message because you are subscribed to the Google Groups
"jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Joseph Dornisch
2018-10-23 20:39:37 UTC
Permalink
So, I definitely have jaxb-api-2.3.1.jar in my classpath, but in order to
run org.jooq.codegen.GenerationTool I still need to add the java.xml.bind
module with --add-modules (java9).

Do I need a different jaxb - I added:
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
</dependency>

to my pom.xml and when I copy the dependencies the jar file is definitely
sitting there.

Any suggestions on what dependencies resolve the issue? Or does this
require an update to the jaxb library?
Post by Lukas Eder
We'll fully support Java 11 with jOOQ 3.12. Until then, unfortunately, our
internal JAXB dependencies cause trouble with projects upgrading to any of
Java 9-11, in different ways. These things have been moving targets within
- Java 9/10 introduced modularity and that caused problems with the JAXB
dependency, which still shipped with the JDK, but was no longer on the
module path by default (it could be added using --add-modules java.xml.bind)
- Java 11 removed JAXB (and CORBA, good riddance) from the JDK, so
--add-modules java.xml.bind should no longer work, you need an actual JAXB
dependency on your classpath)
This is the same with all libraries that have a JAXB dependency,
unfortunately.
Thanks,
Lukas
Post by Marshall Pierce
As far as I've found, you're not going to get away from the sun packages
until jaxb 2.4.0 is released, which is supposed to be module-friendly. The
JVM will emit warnings about jaxb-impl accessing ClassLoader.defineClass,
but it does work and doesn't require modifying your cli invocation.
Post by Joseph Dornisch
Using the javax.xml.ws made sense to me since I avoided using a
deprecated or internal library from Java. I don't like that I still used
"--add-modules java.xml.bind" for CodeGen, as it doesn't remove this
dependency going forward.
Your solution still makes use of sun packages, which I think it would be
better to avoid. I actually put javax.xml.bind/jaxb-api in my pom.xml file
as well, but it didn't seem to help out.
Post by Marshall Pierce
Oops, I misspoke -- jaxws-rt has those three transitive dependencies;
jaxws-api only has some of them.
Post by Joseph Dornisch
So, I'm updating my own small project from java 8 - currently to 9 and
will move to 11 later today.
In order to generate the jooq source (which I don't do via maven
java --add-modules java.xml.bind org.jooq.codegen.GenerationTool codegen.xml
Then to compile my code along with the generated code, I added the
<dependency>
<groupId>javax.xml.ws</groupId>
<artifactId>jaxws-api</artifactId>
<version>2.3.1</version>
</dependency>
Is this the generally preferred way of moving forwards with jooq with
java 9,10,11 right now?
Is there some other replacement dependency I should use for code
generation similarly to adding the javax.xml.ws dependency?
Sorry, if this is covered elsewhere, I did try to find information in
the online jooq documentation.
Thanks.
--
You received this message because you are subscribed to the Google Groups
"jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Joseph Dornisch
2018-10-23 21:18:45 UTC
Permalink
Just following up in case anyone else struggles here. I added the following
to my pom, and I no longer need the add-modules option if I also add the
jaxb-impl library:
<dependency>
<groupId>javax.xml</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.1</version>
</dependency>

So, in order to run my setup right now without using the --add-modules
command for anything I needed to add jaxb-api, jaxws-api, and jaxb-impl.
Post by Joseph Dornisch
So, I definitely have jaxb-api-2.3.1.jar in my classpath, but in order to
run org.jooq.codegen.GenerationTool I still need to add the java.xml.bind
module with --add-modules (java9).
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
</dependency>
to my pom.xml and when I copy the dependencies the jar file is definitely
sitting there.
Any suggestions on what dependencies resolve the issue? Or does this
require an update to the jaxb library?
Post by Lukas Eder
We'll fully support Java 11 with jOOQ 3.12. Until then, unfortunately,
our internal JAXB dependencies cause trouble with projects upgrading to any
of Java 9-11, in different ways. These things have been moving targets
- Java 9/10 introduced modularity and that caused problems with the JAXB
dependency, which still shipped with the JDK, but was no longer on the
module path by default (it could be added using --add-modules java.xml.bind)
- Java 11 removed JAXB (and CORBA, good riddance) from the JDK, so
--add-modules java.xml.bind should no longer work, you need an actual JAXB
dependency on your classpath)
This is the same with all libraries that have a JAXB dependency,
unfortunately.
Thanks,
Lukas
Post by Marshall Pierce
As far as I've found, you're not going to get away from the sun packages
until jaxb 2.4.0 is released, which is supposed to be module-friendly. The
JVM will emit warnings about jaxb-impl accessing ClassLoader.defineClass,
but it does work and doesn't require modifying your cli invocation.
Post by Joseph Dornisch
Using the javax.xml.ws made sense to me since I avoided using a
deprecated or internal library from Java. I don't like that I still used
"--add-modules java.xml.bind" for CodeGen, as it doesn't remove this
dependency going forward.
Your solution still makes use of sun packages, which I think it would
be better to avoid. I actually put javax.xml.bind/jaxb-api in my pom.xml
file as well, but it didn't seem to help out.
Post by Marshall Pierce
Oops, I misspoke -- jaxws-rt has those three transitive dependencies;
jaxws-api only has some of them.
Post by Joseph Dornisch
So, I'm updating my own small project from java 8 - currently to 9
and will move to 11 later today.
In order to generate the jooq source (which I don't do via maven
java --add-modules java.xml.bind org.jooq.codegen.GenerationTool codegen.xml
Then to compile my code along with the generated code, I added the
<dependency>
<groupId>javax.xml.ws</groupId>
<artifactId>jaxws-api</artifactId>
<version>2.3.1</version>
</dependency>
Is this the generally preferred way of moving forwards with jooq with
java 9,10,11 right now?
Is there some other replacement dependency I should use for code
generation similarly to adding the javax.xml.ws dependency?
Sorry, if this is covered elsewhere, I did try to find information in
the online jooq documentation.
Thanks.
--
You received this message because you are subscribed to the Google
Groups "jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Marshall Pierce
2018-10-23 21:22:48 UTC
Permalink
FYI that is a very old jaxb-impl (from 2018). You probably want
https://search.maven.org/artifact/com.sun.xml.bind/jaxb-impl/2.3.1/jar.
Post by Joseph Dornisch
Just following up in case anyone else struggles here. I added the
following to my pom, and I no longer need the add-modules option if I
<dependency>
    <groupId>javax.xml</groupId>
    <artifactId>jaxb-impl</artifactId>
    <version>2.1</version>
</dependency>
So, in order to run my setup right now without using the --add-modules
command for anything I needed to add jaxb-api, jaxws-api, and jaxb-impl.
So, I definitely have jaxb-api-2.3.1.jar in my classpath, but in
order to run org.jooq.codegen.GenerationTool I still need to add the
java.xml.bind module with --add-modules (java9).
<dependency>
    <groupId>javax.xml.bind</groupId>
    <artifactId>jaxb-api</artifactId>
    <version>2.3.1</version>
</dependency>
to my pom.xml and when I copy the dependencies the jar file is
definitely sitting there.
Any suggestions on what dependencies resolve the issue? Or does this
require an update to the jaxb library?
We'll fully support Java 11 with jOOQ 3.12. Until then,
unfortunately, our internal JAXB dependencies cause trouble with
projects upgrading to any of Java 9-11, in different ways. These
- Java 9/10 introduced modularity and that caused problems with
the JAXB dependency, which still shipped with the JDK, but was
no longer on the module path by default (it could be added using
--add-modules java.xml.bind)
- Java 11 removed JAXB (and CORBA, good riddance) from the JDK,
so --add-modules java.xml.bind should no longer work, you need
an actual JAXB dependency on your classpath)
This is the same with all libraries that have a JAXB dependency,
unfortunately.
Thanks,
Lukas
On Mon, Oct 22, 2018 at 11:22 PM Marshall Pierce
As far as I've found, you're not going to get away from the
sun packages until jaxb 2.4.0 is released, which is supposed
to be module-friendly. The JVM will emit warnings about
jaxb-impl accessing ClassLoader.defineClass, but it does
work and doesn't require modifying your cli invocation.
On Monday, October 22, 2018 at 3:13:04 PM UTC-6, Joseph
Using the javax.xml.ws <http://javax.xml.ws> made sense
to me since I avoided using a deprecated or internal
library from Java. I don't like that I still used
"--add-modules java.xml.bind" for CodeGen, as it doesn't
remove this dependency going forward.
Your solution still makes use of sun packages, which I
think it would be better to avoid. I actually put
javax.xml.bind/jaxb-api in my pom.xml file as well, but
it didn't seem to help out.
On Monday, October 22, 2018 at 4:39:43 PM UTC-4,
Oops, I misspoke -- jaxws-rt has those three
transitive dependencies; jaxws-api only has some of
them.
On Monday, October 22, 2018 at 2:26:45 PM UTC-6,
So, I'm updating my own small project from java
8 - currently to 9 and will move to 11 later today.
In order to generate the jooq source (which I
don't do via maven currently, I added
java --add-modules java.xml.bind
org.jooq.codegen.GenerationTool codegen.xml
Then to compile my code along with the generated
code, I added the following dependency to my
<dependency>
    <groupId>javax.xml.ws
<http://javax.xml.ws></groupId>
    <artifactId>jaxws-api</artifactId>
    <version>2.3.1</version>
</dependency>
Is this the generally preferred way of moving
forwards with jooq with java 9,10,11 right now?
Is there some other replacement dependency I
should use for code generation similarly to
adding the javax.xml.ws <http://javax.xml.ws>
dependency?
Sorry, if this is covered elsewhere, I did try
to find information in the online jooq
documentation.
Thanks.
--
You received this message because you are subscribed to the
Google Groups "jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails
For more options, visit https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the Google
Groups "jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Marshall Pierce
2018-10-23 21:28:57 UTC
Permalink
Gah! The old one is from 2010, the one listed is from 2018.

(The old one, despite the lack of com.sun in the name, contains com.sun
types too.)
Post by Marshall Pierce
FYI that is a very old jaxb-impl (from 2018). You probably want
https://search.maven.org/artifact/com.sun.xml.bind/jaxb-impl/2.3.1/jar.
Post by Joseph Dornisch
Just following up in case anyone else struggles here. I added the
following to my pom, and I no longer need the add-modules option if I
<dependency>
     <groupId>javax.xml</groupId>
     <artifactId>jaxb-impl</artifactId>
     <version>2.1</version>
</dependency>
So, in order to run my setup right now without using the --add-modules
command for anything I needed to add jaxb-api, jaxws-api, and jaxb-impl.
    So, I definitely have jaxb-api-2.3.1.jar in my classpath, but in
    order to run org.jooq.codegen.GenerationTool I still need to add the
    java.xml.bind module with --add-modules (java9).
    <dependency>
         <groupId>javax.xml.bind</groupId>
         <artifactId>jaxb-api</artifactId>
         <version>2.3.1</version>
    </dependency>
    to my pom.xml and when I copy the dependencies the jar file is
    definitely sitting there.
    Any suggestions on what dependencies resolve the issue? Or does this
    require an update to the jaxb library?
        We'll fully support Java 11 with jOOQ 3.12. Until then,
        unfortunately, our internal JAXB dependencies cause trouble with
        projects upgrading to any of Java 9-11, in different ways. These
        - Java 9/10 introduced modularity and that caused problems with
        the JAXB dependency, which still shipped with the JDK, but was
        no longer on the module path by default (it could be added using
        --add-modules java.xml.bind)
        - Java 11 removed JAXB (and CORBA, good riddance) from the JDK,
        so --add-modules java.xml.bind should no longer work, you need
        an actual JAXB dependency on your classpath)
        This is the same with all libraries that have a JAXB dependency,
        unfortunately.
        Thanks,
        Lukas
        On Mon, Oct 22, 2018 at 11:22 PM Marshall Pierce
            As far as I've found, you're not going to get away from the
            sun packages until jaxb 2.4.0 is released, which is supposed
            to be module-friendly. The JVM will emit warnings about
            jaxb-impl accessing ClassLoader.defineClass, but it does
            work and doesn't require modifying your cli invocation.
            On Monday, October 22, 2018 at 3:13:04 PM UTC-6, Joseph
                Using the javax.xml.ws <http://javax.xml.ws> made sense
                to me since I avoided using a deprecated or internal
                library from Java. I don't like that I still used
                "--add-modules java.xml.bind" for CodeGen, as it doesn't
                remove this dependency going forward.
                Your solution still makes use of sun packages, which I
                think it would be better to avoid. I actually put
                javax.xml.bind/jaxb-api in my pom.xml file as well, but
                it didn't seem to help out.
                On Monday, October 22, 2018 at 4:39:43 PM UTC-4,
                    Oops, I misspoke -- jaxws-rt has those three
                    transitive dependencies; jaxws-api only has some of
                    them.
                    On Monday, October 22, 2018 at 2:26:45 PM UTC-6,
                        So, I'm updating my own small project from java
                        8 - currently to 9 and will move to 11 later
today.
                        In order to generate the jooq source (which I
                        don't do via maven currently, I added
                        java --add-modules java.xml.bind
                        org.jooq.codegen.GenerationTool codegen.xml
                        Then to compile my code along with the generated
                        code, I added the following dependency to my
                        <dependency>
                             <groupId>javax.xml.ws
                        <http://javax.xml.ws></groupId>
                             <artifactId>jaxws-api</artifactId>
                             <version>2.3.1</version>
                        </dependency>
                        Is this the generally preferred way of moving
                        forwards with jooq with java 9,10,11 right now?
                        Is there some other replacement dependency I
                        should use for code generation similarly to
                        adding the javax.xml.ws <http://javax.xml.ws>
                        dependency?
                        Sorry, if this is covered elsewhere, I did try
                        to find information in the online jooq
                        documentation.
                        Thanks.
            --             You received this message because you are
subscribed to the
            Google Groups "jOOQ User Group" group.
            To unsubscribe from this group and stop receiving emails
            For more options, visit https://groups.google.com/d/optout
            <https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the Google
Groups "jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+***@googlegroups.com.
For more options, visit https://groups.google.com/d/op
Lukas Eder
2018-10-24 06:10:05 UTC
Permalink
Be careful, though. Version 2.3 is modular, which can cause other problems
on JDK 8, in case you distribute to that version of the JDK as well.

Having said so, one of the reasons why I haven't documented all of this is
because the correct setup - very unfortunately - depends on what else is on
your classpath. For example, this is the first time I've seen someone have
a jaxws-api dependency as well. Things might be just a bit different once
that dependency is on the classpath, than when it is not.

jOOQ 3.12 will declare the JAXB API dependency and provide its own "mini"
implementation that will be used in the absence of a JAXB implementation on
the classpath. I do hope that in some more distant future, jOOQ will be
able to do without JAXB entirely.

Thanks,
Lukas
Post by Marshall Pierce
Gah! The old one is from 2010, the one listed is from 2018.
(The old one, despite the lack of com.sun in the name, contains com.sun
types too.)
Post by Marshall Pierce
FYI that is a very old jaxb-impl (from 2018). You probably want
https://search.maven.org/artifact/com.sun.xml.bind/jaxb-impl/2.3.1/jar.
Post by Joseph Dornisch
Just following up in case anyone else struggles here. I added the
following to my pom, and I no longer need the add-modules option if I
<dependency>
<groupId>javax.xml</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.1</version>
</dependency>
So, in order to run my setup right now without using the --add-modules
command for anything I needed to add jaxb-api, jaxws-api, and jaxb-impl.
So, I definitely have jaxb-api-2.3.1.jar in my classpath, but in
order to run org.jooq.codegen.GenerationTool I still need to add the
java.xml.bind module with --add-modules (java9).
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
</dependency>
to my pom.xml and when I copy the dependencies the jar file is
definitely sitting there.
Any suggestions on what dependencies resolve the issue? Or does this
require an update to the jaxb library?
We'll fully support Java 11 with jOOQ 3.12. Until then,
unfortunately, our internal JAXB dependencies cause trouble with
projects upgrading to any of Java 9-11, in different ways. These
- Java 9/10 introduced modularity and that caused problems with
the JAXB dependency, which still shipped with the JDK, but was
no longer on the module path by default (it could be added using
--add-modules java.xml.bind)
- Java 11 removed JAXB (and CORBA, good riddance) from the JDK,
so --add-modules java.xml.bind should no longer work, you need
an actual JAXB dependency on your classpath)
This is the same with all libraries that have a JAXB dependency,
unfortunately.
Thanks,
Lukas
On Mon, Oct 22, 2018 at 11:22 PM Marshall Pierce
As far as I've found, you're not going to get away from the
sun packages until jaxb 2.4.0 is released, which is supposed
to be module-friendly. The JVM will emit warnings about
jaxb-impl accessing ClassLoader.defineClass, but it does
work and doesn't require modifying your cli invocation.
On Monday, October 22, 2018 at 3:13:04 PM UTC-6, Joseph
Using the javax.xml.ws <http://javax.xml.ws> made sense
to me since I avoided using a deprecated or internal
library from Java. I don't like that I still used
"--add-modules java.xml.bind" for CodeGen, as it doesn't
remove this dependency going forward.
Your solution still makes use of sun packages, which I
think it would be better to avoid. I actually put
javax.xml.bind/jaxb-api in my pom.xml file as well, but
it didn't seem to help out.
On Monday, October 22, 2018 at 4:39:43 PM UTC-4,
Oops, I misspoke -- jaxws-rt has those three
transitive dependencies; jaxws-api only has some of
them.
On Monday, October 22, 2018 at 2:26:45 PM UTC-6,
So, I'm updating my own small project from java
8 - currently to 9 and will move to 11 later today.
In order to generate the jooq source (which I
don't do via maven currently, I added
java --add-modules java.xml.bind
org.jooq.codegen.GenerationTool codegen.xml
Then to compile my code along with the generated
code, I added the following dependency to my
<dependency>
<groupId>javax.xml.ws
<http://javax.xml.ws></groupId>
<artifactId>jaxws-api</artifactId>
<version>2.3.1</version>
</dependency>
Is this the generally preferred way of moving
forwards with jooq with java 9,10,11 right now?
Is there some other replacement dependency I
should use for code generation similarly to
adding the javax.xml.ws <http://javax.xml.ws>
dependency?
Sorry, if this is covered elsewhere, I did try
to find information in the online jooq
documentation.
Thanks.
-- You received this message because you are
subscribed to the
Google Groups "jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails
For more options, visit https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the Google
Groups "jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Joseph Dornisch
2018-10-24 15:43:38 UTC
Permalink
Post by Lukas Eder
Be careful, though. Version 2.3 is modular, which can cause other problems
on JDK 8, in case you distribute to that version of the JDK as well.
Having said so, one of the reasons why I haven't documented all of this is
because the correct setup - very unfortunately - depends on what else is on
your classpath. For example, this is the first time I've seen someone have
a jaxws-api dependency as well. Things might be just a bit different once
that dependency is on the classpath, than when it is not.
jOOQ 3.12 will declare the JAXB API dependency and provide its own "mini"
implementation that will be used in the absence of a JAXB implementation on
the classpath. I do hope that in some more distant future, jOOQ will be
able to do without JAXB entirely.
I don't know what to make of your statement about the jaxws-api dependency,
because if I do not have it the generated code does not compile:

[ERROR]
/C:/Users/jad292/Dropbox/testcode/alcuin/src/main/java/com/alcuin/generated/jooq/tables/records/StockDayRecord.java:[11,13]
package javax.annotation is not visible
(package javax.annotation is declared in module java.xml.ws.annotation,
which is not in the module graph)
[ERROR]
/C:/Users/jad292/Dropbox/testcode/alcuin/src/main/java/com/alcuin/generated/jooq/tables/records/TestRecord.java:[9,13]
package javax.annotation is not visible

Maybe there's a better package to include to get javax.annotation, and I
don't really have a 'jaxws-api' dependency, as i would think this would be
pretty common in jooq related projects. Or maybe I'm using some old form of
codegen.xml? Right now I'm using an h2 database.
--
You received this message because you are subscribed to the Google Groups "jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Marshall Pierce
2018-10-24 15:51:41 UTC
Permalink
Post by Joseph Dornisch
I don't know what to make of your statement about the jaxws-api
[ERROR]
/C:/Users/jad292/Dropbox/testcode/alcuin/src/main/java/com/alcuin/generated/jooq/tables/records/StockDayRecord.java:[11,13]
package javax.annotation is not visible
  (package javax.annotation is declared in module
java.xml.ws.annotation, which is not in the module graph)
[ERROR]
/C:/Users/jad292/Dropbox/testcode/alcuin/src/main/java/com/alcuin/generated/jooq/tables/records/TestRecord.java:[9,13]
package javax.annotation is not visible
FWIW I turned off the @Generated annotation to avoid that issue. It's
not in the docs on annotation configuration
(https://www.jooq.org/doc/3.11/manual/code-generation/codegen-advanced/codegen-config-generate/codegen-generate-annotations/)
but it is in the XSD (http://www.jooq.org/xsd/jooq-codegen-3.11.0.xsd).
--
You received this message because you are subscribed to the Google Groups "jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Lukas Eder
2018-10-24 16:44:25 UTC
Permalink
Aha, I see, thanks Joseph.

Indeed, the annotations are not part of JAXB. During the JDK's
modularisation, some previously split packages have been cleaned up and
there had been inevitable package renames for certain annotations. Indeed,
turning off the generated annotations is one option.

Thanks,
Lukas
Post by Joseph Dornisch
Post by Joseph Dornisch
I don't know what to make of your statement about the jaxws-api
dependency, because if I do not have it the generated code does not
[ERROR]
/C:/Users/jad292/Dropbox/testcode/alcuin/src/main/java/com/alcuin/generated/jooq/tables/records/StockDayRecord.java:[11,13]
Post by Joseph Dornisch
package javax.annotation is not visible
(package javax.annotation is declared in module
java.xml.ws.annotation, which is not in the module graph)
[ERROR]
/C:/Users/jad292/Dropbox/testcode/alcuin/src/main/java/com/alcuin/generated/jooq/tables/records/TestRecord.java:[9,13]
Post by Joseph Dornisch
package javax.annotation is not visible
not in the docs on annotation configuration
(
https://www.jooq.org/doc/3.11/manual/code-generation/codegen-advanced/codegen-config-generate/codegen-generate-annotations/)
but it is in the XSD (http://www.jooq.org/xsd/jooq-codegen-3.11.0.xsd).
--
You received this message because you are subscribed to the Google Groups
"jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Joseph Dornisch
2018-10-24 19:14:53 UTC
Permalink
So, I tried adding
<jpaAnnotations>false</jpaAnnotations>
to my codegen.xml file at configuration/generator/generate
It still creates the Generated annotion. Am I missing something as far as
turning this off goes?
Post by Lukas Eder
Aha, I see, thanks Joseph.
Indeed, the annotations are not part of JAXB. During the JDK's
modularisation, some previously split packages have been cleaned up and
there had been inevitable package renames for certain annotations. Indeed,
turning off the generated annotations is one option.
Thanks,
Lukas
Post by Joseph Dornisch
Post by Joseph Dornisch
I don't know what to make of your statement about the jaxws-api
dependency, because if I do not have it the generated code does not
[ERROR]
/C:/Users/jad292/Dropbox/testcode/alcuin/src/main/java/com/alcuin/generated/jooq/tables/records/StockDayRecord.java:[11,13]
Post by Joseph Dornisch
package javax.annotation is not visible
(package javax.annotation is declared in module
java.xml.ws.annotation, which is not in the module graph)
[ERROR]
/C:/Users/jad292/Dropbox/testcode/alcuin/src/main/java/com/alcuin/generated/jooq/tables/records/TestRecord.java:[9,13]
Post by Joseph Dornisch
package javax.annotation is not visible
not in the docs on annotation configuration
(
https://www.jooq.org/doc/3.11/manual/code-generation/codegen-advanced/codegen-config-generate/codegen-generate-annotations/)
but it is in the XSD (http://www.jooq.org/xsd/jooq-codegen-3.11.0.xsd).
--
You received this message because you are subscribed to the Google Groups
"jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Marshall Pierce
2018-10-24 19:42:09 UTC
Permalink
That’s for JPA annotations. If you look in the XSD I linked you’ll find info about “generatedAnnotation”, which is what you’re after.
Post by Joseph Dornisch
So, I tried adding
<jpaAnnotations>false</jpaAnnotations>
to my codegen.xml file at configuration/generator/generate
It still creates the Generated annotion. Am I missing something as far as turning this off goes?
Aha, I see, thanks Joseph.
Indeed, the annotations are not part of JAXB. During the JDK's modularisation, some previously split packages have been cleaned up and there had been inevitable package renames for certain annotations. Indeed, turning off the generated annotations is one option.
Thanks,
Lukas
Post by Joseph Dornisch
I don't know what to make of your statement about the jaxws-api
[ERROR]
/C:/Users/jad292/Dropbox/testcode/alcuin/src/main/java/com/alcuin/generated/jooq/tables/records/StockDayRecord.java:[11,13]
package javax.annotation is not visible
(package javax.annotation is declared in module
java.xml.ws.annotation, which is not in the module graph)
[ERROR]
/C:/Users/jad292/Dropbox/testcode/alcuin/src/main/java/com/alcuin/generated/jooq/tables/records/TestRecord.java:[9,13]
package javax.annotation is not visible
not in the docs on annotation configuration
(https://www.jooq.org/doc/3.11/manual/code-generation/codegen-advanced/codegen-config-generate/codegen-generate-annotations/)
but it is in the XSD (http://www.jooq.org/xsd/jooq-codegen-3.11.0.xsd).
--
You received this message because you are subscribed to the Google Groups "jOOQ User Group" group.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "jOOQ User Group" group.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Joseph Dornisch
2018-10-24 19:59:48 UTC
Permalink
Oh, I see. I got it: <generatedAnnotation>false</generatedAnnotation>
That works fine thanks.

I look forward to doing this without explicitly using any of these
dependencies in jooq 3.12.
That’s for JPA annotations. If you look in the XSD I linked you’ll find
info about “generatedAnnotation”, which is what you’re after.
Post by Joseph Dornisch
So, I tried adding
<jpaAnnotations>false</jpaAnnotations>
to my codegen.xml file at configuration/generator/generate
It still creates the Generated annotion. Am I missing something as far
as turning this off goes?
Post by Joseph Dornisch
Aha, I see, thanks Joseph.
Indeed, the annotations are not part of JAXB. During the JDK's
modularisation, some previously split packages have been cleaned up and
there had been inevitable package renames for certain annotations. Indeed,
turning off the generated annotations is one option.
Post by Joseph Dornisch
Thanks,
Lukas
Post by Joseph Dornisch
I don't know what to make of your statement about the jaxws-api
dependency, because if I do not have it the generated code does not
[ERROR]
/C:/Users/jad292/Dropbox/testcode/alcuin/src/main/java/com/alcuin/generated/jooq/tables/records/StockDayRecord.java:[11,13]
Post by Joseph Dornisch
Post by Joseph Dornisch
package javax.annotation is not visible
(package javax.annotation is declared in module
java.xml.ws.annotation, which is not in the module graph)
[ERROR]
/C:/Users/jad292/Dropbox/testcode/alcuin/src/main/java/com/alcuin/generated/jooq/tables/records/TestRecord.java:[9,13]
Post by Joseph Dornisch
Post by Joseph Dornisch
package javax.annotation is not visible
not in the docs on annotation configuration
(
https://www.jooq.org/doc/3.11/manual/code-generation/codegen-advanced/codegen-config-generate/codegen-generate-annotations/)
Post by Joseph Dornisch
but it is in the XSD (http://www.jooq.org/xsd/jooq-codegen-3.11.0.xsd).
--
You received this message because you are subscribed to the Google
Groups "jOOQ User Group" group.
Post by Joseph Dornisch
To unsubscribe from this group and stop receiving emails from it, send
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google
Groups "jOOQ User Group" group.
Post by Joseph Dornisch
To unsubscribe from this group and stop receiving emails from it, send
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Lukas Eder
2018-10-25 10:54:55 UTC
Permalink
Post by Joseph Dornisch
Oh, I see. I got it: <generatedAnnotation>false</generatedAnnotation>
That works fine thanks.
Glad you got it working
Post by Joseph Dornisch
I look forward to doing this without explicitly using any of these
dependencies in jooq 3.12.
Yes, we all do :-)
--
You received this message because you are subscribed to the Google Groups "jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Continue reading on narkive:
Loading...