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

On Tue, Oct 23, 2018 at 11:29 PM Marshall Pierce <[email protected]>
wrote:

> 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.)
>
> On 10/23/2018 03:22 PM, Marshall Pierce wrote:
> > 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.
> >
> >
> > On 10/23/2018 03:18 PM, Joseph Dornisch wrote:
> >> 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.
> >>
> >> On Tuesday, October 23, 2018 at 4:39:37 PM UTC-4, Joseph Dornisch wrote:
> >>
> >>     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?
> >>
> >>     On Tuesday, October 23, 2018 at 4:03:05 AM UTC-4, Lukas Eder wrote:
> >>
> >>         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
> >>
> >>         On Mon, Oct 22, 2018 at 11:22 PM Marshall Pierce
> >>         <[email protected]> wrote:
> >>
> >>             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
> >>             Dornisch wrote:
> >>
> >>                 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,
> >>                 Marshall Pierce wrote:
> >>
> >>                     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,
> >>                     Joseph Dornisch wrote:
> >>
> >>                         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
> >>                         <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
> >>             from it, send an email to [email protected].
> >>             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
> >> an email to [email protected]
> >> <mailto:[email protected]>.
> >> 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 [email protected].
> 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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to