|
ran into same problem, but could fix it with a "grails clean". So everything will compile from source and you will have a war which should run under 1.5. But now I'm getting <b>java.lang.NoClassDefFoundError: javax.xml.bind.JAXBContext</b> btw, I'm on Grails 2.0.3 and replaced WEB-INF/lib/grails-datastore-*1.0.4.RELEASE.jar with grails-*-core-1.0.7.BUILD-SNAPSHOT.jar (see http://jira.grails.org/browse/GRAILS-8791) http://grails.1312388.n4.nabble.com/Grails-2-0-0RC1-Deploying-on-Java-1-5-td3926344.html |
|
On 30/04/2012 09:51, Markus Ernst wrote:
> ran into same problem, but could fix it with a "grails clean". > > So everything will compile from source and you will have a war which > should run under 1.5. > > But now I'm getting <b>java.lang.NoClassDefFoundError: > javax.xml.bind.JAXBContext</b> JAXB is provided by the JRE on Java 6 but not on Java 5, you probably need to add dependencies on jaxb-api and jaxb-impl. The same is true of other APIs like JAX-WS, StAX and javax.activation. Ian -- Ian Roberts | Department of Computer Science [hidden email] | University of Sheffield, UK --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
OK, I tried downloading JAXB from http://jaxb.java.net/ but this site is
currently under maintenance. Is there a possibility to add these dependencies in BuildConfig.groovy (in order that the needed jar get automatically fetched from a repository)? Thanks, Markus -----Ursprüngliche Nachricht----- Von: Ian Roberts [mailto:[hidden email]] Gesendet: Montag, 30. April 2012 11:20 An: [hidden email] Betreff: Re: [grails-user] Re: Grails 2.0.0RC1: Deploying on Java 1.5 On 30/04/2012 09:51, Markus Ernst wrote: > ran into same problem, but could fix it with a "grails clean". > > So everything will compile from source and you will have a war which > should run under 1.5. > > But now I'm getting <b>java.lang.NoClassDefFoundError: > javax.xml.bind.JAXBContext</b> JAXB is provided by the JRE on Java 6 but not on Java 5, you probably need to add dependencies on jaxb-api and jaxb-impl. The same is true of other APIs like JAX-WS, StAX and javax.activation. Ian -- Ian Roberts | Department of Computer Science [hidden email] | University of Sheffield, UK --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
On 30/04/2012 11:04, Markus Ernst wrote:
> OK, I tried downloading JAXB from http://jaxb.java.net/ but this site is > currently under maintenance. > > Is there a possibility to add these dependencies in BuildConfig.groovy (in > order that the needed jar get automatically fetched from a repository)? That's what I meant, both the API (javax.xml.bind:jaxb-api) and impl (com.sun.xml.bins:jaxb-impl) are in Maven Central. Ian -- Ian Roberts | Department of Computer Science [hidden email] | University of Sheffield, UK --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
Ah, great, thanks a lot! Now my Grails 2.0.3 app is running with Java 1.5 on
WebSphere 6.1. But I'm curious from where I could get the correct dependency syntax, especially the version? According to http://mvnrepository.com/artifact/javax.xml.bind/jaxb-api the latest release of jaxb-api is 2.2.6, so I added runtime 'javax.xml.bind:jaxb-api:2.2.6' This caused to download following jars during war creating: - activation-1.1.jar - jaxb-api-2.2.jar - stax-api-1.0-2.jar Since everything seems to work fine I think it's not a problem that I don't have the newest jar of jaxb-api. But I'm wondering if it's possible to get always the latest stable release with another syntax? Omitting :version does not work. Thank you, Markus -----Ursprüngliche Nachricht----- Von: Ian Roberts [mailto:[hidden email]] Gesendet: Montag, 30. April 2012 12:37 An: [hidden email] Betreff: Re: [grails-user] Re: Grails 2.0.0RC1: Deploying on Java 1.5 On 30/04/2012 11:04, Markus Ernst wrote: > OK, I tried downloading JAXB from http://jaxb.java.net/ but this site is > currently under maintenance. > > Is there a possibility to add these dependencies in BuildConfig.groovy (in > order that the needed jar get automatically fetched from a repository)? That's what I meant, both the API (javax.xml.bind:jaxb-api) and impl (com.sun.xml.bins:jaxb-impl) are in Maven Central. Ian -- Ian Roberts | Department of Computer Science [hidden email] | University of Sheffield, UK --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
sorry, my mistake.
jaxb-api-2.2.6.jar is correctly downloaded (I was in the wrong project...) But my question remains: Do I always have to hardcode the version of a dependency or is there another way to get always the "best" or latest stable one? -----Ursprüngliche Nachricht----- Von: Markus Ernst [mailto:[hidden email]] Gesendet: Montag, 30. April 2012 14:45 An: [hidden email] Betreff: AW: [grails-user] Re: Grails 2.0.0RC1: Deploying on Java 1.5 Ah, great, thanks a lot! Now my Grails 2.0.3 app is running with Java 1.5 on WebSphere 6.1. But I'm curious from where I could get the correct dependency syntax, especially the version? According to http://mvnrepository.com/artifact/javax.xml.bind/jaxb-api the latest release of jaxb-api is 2.2.6, so I added runtime 'javax.xml.bind:jaxb-api:2.2.6' This caused to download following jars during war creating: - activation-1.1.jar - jaxb-api-2.2.jar - stax-api-1.0-2.jar Since everything seems to work fine I think it's not a problem that I don't have the newest jar of jaxb-api. But I'm wondering if it's possible to get always the latest stable release with another syntax? Omitting :version does not work. Thank you, Markus -----Ursprüngliche Nachricht----- Von: Ian Roberts [mailto:[hidden email]] Gesendet: Montag, 30. April 2012 12:37 An: [hidden email] Betreff: Re: [grails-user] Re: Grails 2.0.0RC1: Deploying on Java 1.5 On 30/04/2012 11:04, Markus Ernst wrote: > OK, I tried downloading JAXB from http://jaxb.java.net/ but this site is > currently under maintenance. > > Is there a possibility to add these dependencies in BuildConfig.groovy (in > order that the needed jar get automatically fetched from a repository)? That's what I meant, both the API (javax.xml.bind:jaxb-api) and impl (com.sun.xml.bins:jaxb-impl) are in Maven Central. Ian -- Ian Roberts | Department of Computer Science [hidden email] | University of Sheffield, UK --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
In reply to this post by MarkusE
> Do I always have to hardcode the version of a dependency > or is there another way to get always the "best" or latest stable one? I figured out that I can use runtime 'javax.xml.bind:jaxb-api:latest.release' in BuildConfig.groovy which will pack jaxb-api-2.2.6.jar into the war. |
| Powered by Nabble | Edit this page |
