Grails XML error with clean install

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Grails XML error with clean install

Sam Carr
I'm aware that there can be some issues with xml-api.jar but I can't even run grails create-app without seeing the error below. I have even removed Java entirely from my machine (WinXP) and reinstalled JDK 1.6.0_21 from scratch. I have a fresh install of Groovy 1.7.3 and Grails 1.3.2 (can't use 1.3.3 because it breaks my controller unit tests due to a known mocking bug). So I'm a bit flummoxed as to where this error is coming from. It all works fine on my Mac BTW.

Any suggestions as to how to get to the bottom of this very much appreciated as I basically can't do any grails development at all on my work machine as it stands.

Thanks

Sam

> grails create-app GrailsTest
...<snip lots of normal output>...
Created Eclipse project files.
Error executing script CreateApp: loader constraint violation: loader (instance of <bootloader>) previously initiated loading for a different type with name "org/xml/sax/SAXParseException"
java.lang.LinkageError: loader constraint violation: loader (instance of <bootloader>) previously initiated loading for a different type with name "org/xml/sax/SAXParseException"
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
        at java.lang.Class.getDeclaredMethods(Class.java:1791)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46)
        at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33)
        at _PluginDependencies_groovy$_run_closure21_closure45.doCall(_PluginDependencies_groovy:457)
        at _PluginDependencies_groovy$_run_closure21_closure45.doCall(_PluginDependencies_groovy)
        at _PluginDependencies_groovy.withPluginInstall(_PluginDependencies_groovy:480)
        at _PluginDependencies_groovy.this$4$withPluginInstall(_PluginDependencies_groovy)
        at _PluginDependencies_groovy$_run_closure21.doCall(_PluginDependencies_groovy:455)
        at _PluginDependencies_groovy$_run_closure21.call(_PluginDependencies_groovy)
        at _GrailsPlugins_groovy$_run_closure3.doCall(_GrailsPlugins_groovy:100)
        at _GrailsCreateProject_groovy$_run_closure1.doCall(_GrailsCreateProject_groovy:48)
        at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381)
        at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
        at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
        at gant.Gant.withBuildListeners(Gant.groovy:427)
        at gant.Gant.this$2$withBuildListeners(Gant.groovy)
        at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
        at gant.Gant.dispatch(Gant.groovy:415)
        at gant.Gant.this$2$dispatch(Gant.groovy)
        at gant.Gant.invokeMethod(Gant.groovy)
        at gant.Gant.executeTargets(Gant.groovy:590)
        at gant.Gant.executeTargets(Gant.groovy:589)
Error executing script CreateApp: loader constraint violation: loader (instance of <bootloader>) previously initiated loading for a different type with name "org/xml/sax/SAXParseException"

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Grails XML error with clean install

tomas lin
check that there are no other things that might load those XML files
in your classpath.

On Tue, Aug 3, 2010 at 11:06 AM, Sam Carr <[hidden email]> wrote:

> I'm aware that there can be some issues with xml-api.jar but I can't even run grails create-app without seeing the error below. I have even removed Java entirely from my machine (WinXP) and reinstalled JDK 1.6.0_21 from scratch. I have a fresh install of Groovy 1.7.3 and Grails 1.3.2 (can't use 1.3.3 because it breaks my controller unit tests due to a known mocking bug). So I'm a bit flummoxed as to where this error is coming from. It all works fine on my Mac BTW.
>
> Any suggestions as to how to get to the bottom of this very much appreciated as I basically can't do any grails development at all on my work machine as it stands.
>
> Thanks
>
> Sam
>
>> grails create-app GrailsTest
> ...<snip lots of normal output>...
> Created Eclipse project files.
> Error executing script CreateApp: loader constraint violation: loader (instance of <bootloader>) previously initiated loading for a different type with name "org/xml/sax/SAXParseException"
> java.lang.LinkageError: loader constraint violation: loader (instance of <bootloader>) previously initiated loading for a different type with name "org/xml/sax/SAXParseException"
>        at java.lang.Class.getDeclaredMethods0(Native Method)
>        at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
>        at java.lang.Class.getDeclaredMethods(Class.java:1791)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46)
>        at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33)
>        at _PluginDependencies_groovy$_run_closure21_closure45.doCall(_PluginDependencies_groovy:457)
>        at _PluginDependencies_groovy$_run_closure21_closure45.doCall(_PluginDependencies_groovy)
>        at _PluginDependencies_groovy.withPluginInstall(_PluginDependencies_groovy:480)
>        at _PluginDependencies_groovy.this$4$withPluginInstall(_PluginDependencies_groovy)
>        at _PluginDependencies_groovy$_run_closure21.doCall(_PluginDependencies_groovy:455)
>        at _PluginDependencies_groovy$_run_closure21.call(_PluginDependencies_groovy)
>        at _GrailsPlugins_groovy$_run_closure3.doCall(_GrailsPlugins_groovy:100)
>        at _GrailsCreateProject_groovy$_run_closure1.doCall(_GrailsCreateProject_groovy:48)
>        at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381)
>        at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
>        at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
>        at gant.Gant.withBuildListeners(Gant.groovy:427)
>        at gant.Gant.this$2$withBuildListeners(Gant.groovy)
>        at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
>        at gant.Gant.dispatch(Gant.groovy:415)
>        at gant.Gant.this$2$dispatch(Gant.groovy)
>        at gant.Gant.invokeMethod(Gant.groovy)
>        at gant.Gant.executeTargets(Gant.groovy:590)
>        at gant.Gant.executeTargets(Gant.groovy:589)
> Error executing script CreateApp: loader constraint violation: loader (instance of <bootloader>) previously initiated loading for a different type with name "org/xml/sax/SAXParseException"
>
> ---------------------------------------------------------------------
> 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


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Grails XML error with clean install

Ronny Løvtangen
In reply to this post by Sam Carr
Speaking of..
I just sent a mail to the list about this problem.
As you say, xml-api.jar is the problem. It conflicts with Java 6. If your application has a dependency to xml-apis, this dependency is propagated to the grails build scripts as well and causes problems.

Are you on Leopard and Java 5 on your mac? I get this problem on Snow Leopard / Java 6.

The solution? Find and exclude all dependencies causing conflicts.
But, they shouldn't interfere with the build scripts anyhow, this must be a bug with the grails build process.

Ronny

On Aug 3, 2010, at 12:06 PM, Sam Carr wrote:

> I'm aware that there can be some issues with xml-api.jar but I can't even run grails create-app without seeing the error below. I have even removed Java entirely from my machine (WinXP) and reinstalled JDK 1.6.0_21 from scratch. I have a fresh install of Groovy 1.7.3 and Grails 1.3.2 (can't use 1.3.3 because it breaks my controller unit tests due to a known mocking bug). So I'm a bit flummoxed as to where this error is coming from. It all works fine on my Mac BTW.
>
> Any suggestions as to how to get to the bottom of this very much appreciated as I basically can't do any grails development at all on my work machine as it stands.
>
> Thanks
>
> Sam
>
>> grails create-app GrailsTest
> ...<snip lots of normal output>...
> Created Eclipse project files.
> Error executing script CreateApp: loader constraint violation: loader (instance of <bootloader>) previously initiated loading for a different type with name "org/xml/sax/SAXParseException"
> java.lang.LinkageError: loader constraint violation: loader (instance of <bootloader>) previously initiated loading for a different type with name "org/xml/sax/SAXParseException"
>        at java.lang.Class.getDeclaredMethods0(Native Method)
>        at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
>        at java.lang.Class.getDeclaredMethods(Class.java:1791)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46)
>        at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33)
>        at _PluginDependencies_groovy$_run_closure21_closure45.doCall(_PluginDependencies_groovy:457)
>        at _PluginDependencies_groovy$_run_closure21_closure45.doCall(_PluginDependencies_groovy)
>        at _PluginDependencies_groovy.withPluginInstall(_PluginDependencies_groovy:480)
>        at _PluginDependencies_groovy.this$4$withPluginInstall(_PluginDependencies_groovy)
>        at _PluginDependencies_groovy$_run_closure21.doCall(_PluginDependencies_groovy:455)
>        at _PluginDependencies_groovy$_run_closure21.call(_PluginDependencies_groovy)
>        at _GrailsPlugins_groovy$_run_closure3.doCall(_GrailsPlugins_groovy:100)
>        at _GrailsCreateProject_groovy$_run_closure1.doCall(_GrailsCreateProject_groovy:48)
>        at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381)
>        at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
>        at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
>        at gant.Gant.withBuildListeners(Gant.groovy:427)
>        at gant.Gant.this$2$withBuildListeners(Gant.groovy)
>        at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
>        at gant.Gant.dispatch(Gant.groovy:415)
>        at gant.Gant.this$2$dispatch(Gant.groovy)
>        at gant.Gant.invokeMethod(Gant.groovy)
>        at gant.Gant.executeTargets(Gant.groovy:590)
>        at gant.Gant.executeTargets(Gant.groovy:589)
> Error executing script CreateApp: loader constraint violation: loader (instance of <bootloader>) previously initiated loading for a different type with name "org/xml/sax/SAXParseException"
>
> ---------------------------------------------------------------------
> 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


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Grails XML error with clean install

Sam Carr
My Mac is 10.6 with Java 1.6. Everything works fine there.

On the Windows machine I have a fresh JDK 1.6.0_21 install, no CLASSPATH environment variable set, vanilla Grails 1.3.2 install. So I struggle to see where it's picking up this rogue dependency from. Is there anything clever I can do to get it to tell me everything it's loading, so I can try to track it down? Being a bit of a newbie I'm not sure how to go about debugging this.

Sam

On 3 Aug 2010, at 11:22, Ronny Løvtangen wrote:

> Speaking of..
> I just sent a mail to the list about this problem.
> As you say, xml-api.jar is the problem. It conflicts with Java 6. If your application has a dependency to xml-apis, this dependency is propagated to the grails build scripts as well and causes problems.
>
> Are you on Leopard and Java 5 on your mac? I get this problem on Snow Leopard / Java 6.
>
> The solution? Find and exclude all dependencies causing conflicts.
> But, they shouldn't interfere with the build scripts anyhow, this must be a bug with the grails build process.
>
> Ronny
>
> On Aug 3, 2010, at 12:06 PM, Sam Carr wrote:
>
>> I'm aware that there can be some issues with xml-api.jar but I can't even run grails create-app without seeing the error below. I have even removed Java entirely from my machine (WinXP) and reinstalled JDK 1.6.0_21 from scratch. I have a fresh install of Groovy 1.7.3 and Grails 1.3.2 (can't use 1.3.3 because it breaks my controller unit tests due to a known mocking bug). So I'm a bit flummoxed as to where this error is coming from. It all works fine on my Mac BTW.
>>
>> Any suggestions as to how to get to the bottom of this very much appreciated as I basically can't do any grails development at all on my work machine as it stands.
>>
>> Thanks
>>
>> Sam
>>
>>> grails create-app GrailsTest
>> ...<snip lots of normal output>...
>> Created Eclipse project files.
>> Error executing script CreateApp: loader constraint violation: loader (instance of <bootloader>) previously initiated loading for a different type with name "org/xml/sax/SAXParseException"
>> java.lang.LinkageError: loader constraint violation: loader (instance of <bootloader>) previously initiated loading for a different type with name "org/xml/sax/SAXParseException"
>>       at java.lang.Class.getDeclaredMethods0(Native Method)
>>       at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
>>       at java.lang.Class.getDeclaredMethods(Class.java:1791)
>>       at java.security.AccessController.doPrivileged(Native Method)
>>       at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46)
>>       at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33)
>>       at _PluginDependencies_groovy$_run_closure21_closure45.doCall(_PluginDependencies_groovy:457)
>>       at _PluginDependencies_groovy$_run_closure21_closure45.doCall(_PluginDependencies_groovy)
>>       at _PluginDependencies_groovy.withPluginInstall(_PluginDependencies_groovy:480)
>>       at _PluginDependencies_groovy.this$4$withPluginInstall(_PluginDependencies_groovy)
>>       at _PluginDependencies_groovy$_run_closure21.doCall(_PluginDependencies_groovy:455)
>>       at _PluginDependencies_groovy$_run_closure21.call(_PluginDependencies_groovy)
>>       at _GrailsPlugins_groovy$_run_closure3.doCall(_GrailsPlugins_groovy:100)
>>       at _GrailsCreateProject_groovy$_run_closure1.doCall(_GrailsCreateProject_groovy:48)
>>       at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381)
>>       at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
>>       at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
>>       at gant.Gant.withBuildListeners(Gant.groovy:427)
>>       at gant.Gant.this$2$withBuildListeners(Gant.groovy)
>>       at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
>>       at gant.Gant.dispatch(Gant.groovy:415)
>>       at gant.Gant.this$2$dispatch(Gant.groovy)
>>       at gant.Gant.invokeMethod(Gant.groovy)
>>       at gant.Gant.executeTargets(Gant.groovy:590)
>>       at gant.Gant.executeTargets(Gant.groovy:589)
>> Error executing script CreateApp: loader constraint violation: loader (instance of <bootloader>) previously initiated loading for a different type with name "org/xml/sax/SAXParseException"
>>
>> ---------------------------------------------------------------------
>> 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


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Grails XML error with clean install

Graeme Rocher-4
Administrator
Add an environment variable as follows:

export JAVA_OPTS=-verbose

Then run your application and observe what jar the XML classes are
being loaded from. If the JAR is not part of your JDK then that is the
problem

Cheers
Graeme


On Tue, Aug 3, 2010 at 12:41 PM, Sam Carr <[hidden email]> wrote:

> My Mac is 10.6 with Java 1.6. Everything works fine there.
>
> On the Windows machine I have a fresh JDK 1.6.0_21 install, no CLASSPATH environment variable set, vanilla Grails 1.3.2 install. So I struggle to see where it's picking up this rogue dependency from. Is there anything clever I can do to get it to tell me everything it's loading, so I can try to track it down? Being a bit of a newbie I'm not sure how to go about debugging this.
>
> Sam
>
> On 3 Aug 2010, at 11:22, Ronny Løvtangen wrote:
>
>> Speaking of..
>> I just sent a mail to the list about this problem.
>> As you say, xml-api.jar is the problem. It conflicts with Java 6. If your application has a dependency to xml-apis, this dependency is propagated to the grails build scripts as well and causes problems.
>>
>> Are you on Leopard and Java 5 on your mac? I get this problem on Snow Leopard / Java 6.
>>
>> The solution? Find and exclude all dependencies causing conflicts.
>> But, they shouldn't interfere with the build scripts anyhow, this must be a bug with the grails build process.
>>
>> Ronny
>>
>> On Aug 3, 2010, at 12:06 PM, Sam Carr wrote:
>>
>>> I'm aware that there can be some issues with xml-api.jar but I can't even run grails create-app without seeing the error below. I have even removed Java entirely from my machine (WinXP) and reinstalled JDK 1.6.0_21 from scratch. I have a fresh install of Groovy 1.7.3 and Grails 1.3.2 (can't use 1.3.3 because it breaks my controller unit tests due to a known mocking bug). So I'm a bit flummoxed as to where this error is coming from. It all works fine on my Mac BTW.
>>>
>>> Any suggestions as to how to get to the bottom of this very much appreciated as I basically can't do any grails development at all on my work machine as it stands.
>>>
>>> Thanks
>>>
>>> Sam
>>>
>>>> grails create-app GrailsTest
>>> ...<snip lots of normal output>...
>>> Created Eclipse project files.
>>> Error executing script CreateApp: loader constraint violation: loader (instance of <bootloader>) previously initiated loading for a different type with name "org/xml/sax/SAXParseException"
>>> java.lang.LinkageError: loader constraint violation: loader (instance of <bootloader>) previously initiated loading for a different type with name "org/xml/sax/SAXParseException"
>>>       at java.lang.Class.getDeclaredMethods0(Native Method)
>>>       at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
>>>       at java.lang.Class.getDeclaredMethods(Class.java:1791)
>>>       at java.security.AccessController.doPrivileged(Native Method)
>>>       at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46)
>>>       at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33)
>>>       at _PluginDependencies_groovy$_run_closure21_closure45.doCall(_PluginDependencies_groovy:457)
>>>       at _PluginDependencies_groovy$_run_closure21_closure45.doCall(_PluginDependencies_groovy)
>>>       at _PluginDependencies_groovy.withPluginInstall(_PluginDependencies_groovy:480)
>>>       at _PluginDependencies_groovy.this$4$withPluginInstall(_PluginDependencies_groovy)
>>>       at _PluginDependencies_groovy$_run_closure21.doCall(_PluginDependencies_groovy:455)
>>>       at _PluginDependencies_groovy$_run_closure21.call(_PluginDependencies_groovy)
>>>       at _GrailsPlugins_groovy$_run_closure3.doCall(_GrailsPlugins_groovy:100)
>>>       at _GrailsCreateProject_groovy$_run_closure1.doCall(_GrailsCreateProject_groovy:48)
>>>       at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381)
>>>       at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
>>>       at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
>>>       at gant.Gant.withBuildListeners(Gant.groovy:427)
>>>       at gant.Gant.this$2$withBuildListeners(Gant.groovy)
>>>       at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
>>>       at gant.Gant.dispatch(Gant.groovy:415)
>>>       at gant.Gant.this$2$dispatch(Gant.groovy)
>>>       at gant.Gant.invokeMethod(Gant.groovy)
>>>       at gant.Gant.executeTargets(Gant.groovy:590)
>>>       at gant.Gant.executeTargets(Gant.groovy:589)
>>> Error executing script CreateApp: loader constraint violation: loader (instance of <bootloader>) previously initiated loading for a different type with name "org/xml/sax/SAXParseException"
>>>
>>> ---------------------------------------------------------------------
>>> 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
>
>
>



--
Graeme Rocher
Grails Project Lead
SpringSource - A Division of VMware
http://www.springsource.com

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Grails XML error with clean install

Ronny Løvtangen
In reply to this post by Sam Carr
I mainly use maven for dependencymanagement in Grails. IntelliJ automatically picks up all direct and transitive dependencies from mavens pom.xml. Then I just use the 'Go to class' feature in IntelliJ and type in the conflicting classname. I then get a list of conflicting jars.




I don't know if IntelliJ or other IDE's pick up dependencies from BuildConfig.groovy. If they do, you could use the same approach.



On Aug 3, 2010, at 12:41 PM, Sam Carr wrote:

> My Mac is 10.6 with Java 1.6. Everything works fine there.
>
> On the Windows machine I have a fresh JDK 1.6.0_21 install, no CLASSPATH environment variable set, vanilla Grails 1.3.2 install. So I struggle to see where it's picking up this rogue dependency from. Is there anything clever I can do to get it to tell me everything it's loading, so I can try to track it down? Being a bit of a newbie I'm not sure how to go about debugging this.
>
> Sam
>
> On 3 Aug 2010, at 11:22, Ronny Løvtangen wrote:
>
>> Speaking of..
>> I just sent a mail to the list about this problem.
>> As you say, xml-api.jar is the problem. It conflicts with Java 6. If your application has a dependency to xml-apis, this dependency is propagated to the grails build scripts as well and causes problems.
>>
>> Are you on Leopard and Java 5 on your mac? I get this problem on Snow Leopard / Java 6.
>>
>> The solution? Find and exclude all dependencies causing conflicts.
>> But, they shouldn't interfere with the build scripts anyhow, this must be a bug with the grails build process.
>>
>> Ronny
>>
>> On Aug 3, 2010, at 12:06 PM, Sam Carr wrote:
>>
>>> I'm aware that there can be some issues with xml-api.jar but I can't even run grails create-app without seeing the error below. I have even removed Java entirely from my machine (WinXP) and reinstalled JDK 1.6.0_21 from scratch. I have a fresh install of Groovy 1.7.3 and Grails 1.3.2 (can't use 1.3.3 because it breaks my controller unit tests due to a known mocking bug). So I'm a bit flummoxed as to where this error is coming from. It all works fine on my Mac BTW.
>>>
>>> Any suggestions as to how to get to the bottom of this very much appreciated as I basically can't do any grails development at all on my work machine as it stands.
>>>
>>> Thanks
>>>
>>> Sam
>>>
>>>> grails create-app GrailsTest
>>> ...<snip lots of normal output>...
>>> Created Eclipse project files.
>>> Error executing script CreateApp: loader constraint violation: loader (instance of <bootloader>) previously initiated loading for a different type with name "org/xml/sax/SAXParseException"
>>> java.lang.LinkageError: loader constraint violation: loader (instance of <bootloader>) previously initiated loading for a different type with name "org/xml/sax/SAXParseException"
>>>      at java.lang.Class.getDeclaredMethods0(Native Method)
>>>      at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
>>>      at java.lang.Class.getDeclaredMethods(Class.java:1791)
>>>      at java.security.AccessController.doPrivileged(Native Method)
>>>      at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46)
>>>      at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33)
>>>      at _PluginDependencies_groovy$_run_closure21_closure45.doCall(_PluginDependencies_groovy:457)
>>>      at _PluginDependencies_groovy$_run_closure21_closure45.doCall(_PluginDependencies_groovy)
>>>      at _PluginDependencies_groovy.withPluginInstall(_PluginDependencies_groovy:480)
>>>      at _PluginDependencies_groovy.this$4$withPluginInstall(_PluginDependencies_groovy)
>>>      at _PluginDependencies_groovy$_run_closure21.doCall(_PluginDependencies_groovy:455)
>>>      at _PluginDependencies_groovy$_run_closure21.call(_PluginDependencies_groovy)
>>>      at _GrailsPlugins_groovy$_run_closure3.doCall(_GrailsPlugins_groovy:100)
>>>      at _GrailsCreateProject_groovy$_run_closure1.doCall(_GrailsCreateProject_groovy:48)
>>>      at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381)
>>>      at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
>>>      at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
>>>      at gant.Gant.withBuildListeners(Gant.groovy:427)
>>>      at gant.Gant.this$2$withBuildListeners(Gant.groovy)
>>>      at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
>>>      at gant.Gant.dispatch(Gant.groovy:415)
>>>      at gant.Gant.this$2$dispatch(Gant.groovy)
>>>      at gant.Gant.invokeMethod(Gant.groovy)
>>>      at gant.Gant.executeTargets(Gant.groovy:590)
>>>      at gant.Gant.executeTargets(Gant.groovy:589)
>>> Error executing script CreateApp: loader constraint violation: loader (instance of <bootloader>) previously initiated loading for a different type with name "org/xml/sax/SAXParseException"
>>>
>>> ---------------------------------------------------------------------
>>> 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
>
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

PastedGraphic-7.png (36K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Grails XML error with clean install

Sam Carr
In reply to this post by Graeme Rocher-4
Thanks Graham - that JAVA_OPTS tip showed me the way.

Turned out that SAXParseException was being loaded both form the JDK itself and from C:/Documents%20and%20Settings/SHC/.ivy2/cache/xml-apis/xml-apis/jars/xml-apis-1.3.04.jar.

I can only assume this was left over in my ivy cache on that machine from an entirely other project (not even a Grails one). The error went away when I deleted the cache/xml-apis/ folder. But how come this was being loaded at all? I don't claim to understand ivy very well, but it seems odd that another project's files in the ivy cache should be able to break the Grails scripts.

Sam

On 3 Aug 2010, at 11:48, Graeme Rocher wrote:

> Add an environment variable as follows:
>
> export JAVA_OPTS=-verbose
>
> Then run your application and observe what jar the XML classes are
> being loaded from. If the JAR is not part of your JDK then that is the
> problem
>
> Cheers
> Graeme
>
>
> On Tue, Aug 3, 2010 at 12:41 PM, Sam Carr <[hidden email]> wrote:
>> My Mac is 10.6 with Java 1.6. Everything works fine there.
>>
>> On the Windows machine I have a fresh JDK 1.6.0_21 install, no CLASSPATH environment variable set, vanilla Grails 1.3.2 install. So I struggle to see where it's picking up this rogue dependency from. Is there anything clever I can do to get it to tell me everything it's loading, so I can try to track it down? Being a bit of a newbie I'm not sure how to go about debugging this.
>>
>> Sam
>>
>> On 3 Aug 2010, at 11:22, Ronny Løvtangen wrote:
>>
>>> Speaking of..
>>> I just sent a mail to the list about this problem.
>>> As you say, xml-api.jar is the problem. It conflicts with Java 6. If your application has a dependency to xml-apis, this dependency is propagated to the grails build scripts as well and causes problems.
>>>
>>> Are you on Leopard and Java 5 on your mac? I get this problem on Snow Leopard / Java 6.
>>>
>>> The solution? Find and exclude all dependencies causing conflicts.
>>> But, they shouldn't interfere with the build scripts anyhow, this must be a bug with the grails build process.
>>>
>>> Ronny
>>>
>>> On Aug 3, 2010, at 12:06 PM, Sam Carr wrote:
>>>
>>>> I'm aware that there can be some issues with xml-api.jar but I can't even run grails create-app without seeing the error below. I have even removed Java entirely from my machine (WinXP) and reinstalled JDK 1.6.0_21 from scratch. I have a fresh install of Groovy 1.7.3 and Grails 1.3.2 (can't use 1.3.3 because it breaks my controller unit tests due to a known mocking bug). So I'm a bit flummoxed as to where this error is coming from. It all works fine on my Mac BTW.
>>>>
>>>> Any suggestions as to how to get to the bottom of this very much appreciated as I basically can't do any grails development at all on my work machine as it stands.
>>>>
>>>> Thanks
>>>>
>>>> Sam
>>>>
>>>>> grails create-app GrailsTest
>>>> ...<snip lots of normal output>...
>>>> Created Eclipse project files.
>>>> Error executing script CreateApp: loader constraint violation: loader (instance of <bootloader>) previously initiated loading for a different type with name "org/xml/sax/SAXParseException"
>>>> java.lang.LinkageError: loader constraint violation: loader (instance of <bootloader>) previously initiated loading for a different type with name "org/xml/sax/SAXParseException"
>>>>       at java.lang.Class.getDeclaredMethods0(Native Method)
>>>>       at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
>>>>       at java.lang.Class.getDeclaredMethods(Class.java:1791)
>>>>       at java.security.AccessController.doPrivileged(Native Method)
>>>>       at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46)
>>>>       at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33)
>>>>       at _PluginDependencies_groovy$_run_closure21_closure45.doCall(_PluginDependencies_groovy:457)
>>>>       at _PluginDependencies_groovy$_run_closure21_closure45.doCall(_PluginDependencies_groovy)
>>>>       at _PluginDependencies_groovy.withPluginInstall(_PluginDependencies_groovy:480)
>>>>       at _PluginDependencies_groovy.this$4$withPluginInstall(_PluginDependencies_groovy)
>>>>       at _PluginDependencies_groovy$_run_closure21.doCall(_PluginDependencies_groovy:455)
>>>>       at _PluginDependencies_groovy$_run_closure21.call(_PluginDependencies_groovy)
>>>>       at _GrailsPlugins_groovy$_run_closure3.doCall(_GrailsPlugins_groovy:100)
>>>>       at _GrailsCreateProject_groovy$_run_closure1.doCall(_GrailsCreateProject_groovy:48)
>>>>       at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381)
>>>>       at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
>>>>       at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
>>>>       at gant.Gant.withBuildListeners(Gant.groovy:427)
>>>>       at gant.Gant.this$2$withBuildListeners(Gant.groovy)
>>>>       at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
>>>>       at gant.Gant.dispatch(Gant.groovy:415)
>>>>       at gant.Gant.this$2$dispatch(Gant.groovy)
>>>>       at gant.Gant.invokeMethod(Gant.groovy)
>>>>       at gant.Gant.executeTargets(Gant.groovy:590)
>>>>       at gant.Gant.executeTargets(Gant.groovy:589)
>>>> Error executing script CreateApp: loader constraint violation: loader (instance of <bootloader>) previously initiated loading for a different type with name "org/xml/sax/SAXParseException"


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Grails XML error with clean install

Sam Carr
Actually further to that, though my Grails scripts now seem to work, and my app runs, there is a warning message in the run-app output that suggests further intrigue regards that xml-apis jar that I deleted from the ivy cache. Note that I get this even with grails create-app, so it's not specific to my project and it's dependencies.

I just discovered that if I delete my ivy cache directory entirely, things start working properly (no errors, no warnings) so I presume that the xml-apis was a dependency of something else that was being picked up from the ivy cache and that was messing things up. I'm now suspecting that this is more of an ivy cache issue that I've stumbled into than a grails one, though it really doesn't seem right.

Resolving dependencies...
:: problems summary ::
:::: WARNINGS
                                module not found: xml-apis#xml-apis;1.3.04
 
                ==== grailsPlugins: tried
 
                  -- artifact xml-apis#xml-apis;1.3.04!xml-apis.jar:
 
                  D:\Work\LunchApp/lib/xml-apis-1.3.04.jar
 
                  C:\Documents and Settings\SHC\.grails\1.3.2\projects\LunchApp\plugins\hibernate-1.3.3/lib/xml-apis-1.3.04.jar
 
                  C:\Documents and Settings\SHC\.grails\1.3.2\projects\LunchApp\plugins\spring-security-core-1.0/lib/xml-apis-1.3.04.jar
 
                  C:\Documents and Settings\SHC\.grails\1.3.2\projects\LunchApp\plugins\tomcat-1.3.3/lib/xml-apis-1.3.04.jar
 
                ==== grailsHome: tried
 
                  C:\grails-1.3.2\lib/xml-apis-1.3.04.xml
 
                  -- artifact xml-apis#xml-apis;1.3.04!xml-apis.jar:
 
                  C:\grails-1.3.2\lib/xml-apis-1.3.04.jar
 
                ==== grailsHome: tried
 
                  C:\grails-1.3.2\dist/xml-apis-1.3.04.xml
 
                  -- artifact xml-apis#xml-apis;1.3.04!xml-apis.jar:
 
                  C:\grails-1.3.2\dist/xml-apis-1.3.04.jar
 
                ==== grailsHome: tried
 
                  -- artifact xml-apis#xml-apis;1.3.04!xml-apis.jar:
 
                  C:\grails-1.3.2/plugins/grails-xml-apis-1.3.04.jar
 
                ==== grailsCentral: tried
 
                  -- artifact xml-apis#xml-apis;1.3.04!xml-apis.jar:
 
 
                ==== grailsCore: tried
 
                  -- artifact xml-apis#xml-apis;1.3.04!xml-apis.jar:
 
 
                ==== ebrRelease: tried
 
 
                  -- artifact xml-apis#xml-apis;1.3.04!xml-apis.jar:
 
 
                ==== ebrExternal: tried
 
 
                  -- artifact xml-apis#xml-apis;1.3.04!xml-apis.jar:
 
 
                                ::::::::::::::::::::::::::::::::::::::::::::::
 
                                ::          UNRESOLVED DEPENDENCIES         ::
 
                                ::::::::::::::::::::::::::::::::::::::::::::::
 
                                :: xml-apis#xml-apis;1.3.04: not found
 
                                ::::::::::::::::::::::::::::::::::::::::::::::
 
 
Dependencies resolved in 1797ms.

On 3 Aug 2010, at 14:02, Sam Carr wrote:

Thanks Graham - that JAVA_OPTS tip showed me the way.

Turned out that SAXParseException was being loaded both form the JDK itself and from C:/Documents%20and%20Settings/SHC/.ivy2/cache/xml-apis/xml-apis/jars/xml-apis-1.3.04.jar.

I can only assume this was left over in my ivy cache on that machine from an entirely other project (not even a Grails one). The error went away when I deleted the cache/xml-apis/ folder. But how come this was being loaded at all? I don't claim to understand ivy very well, but it seems odd that another project's files in the ivy cache should be able to break the Grails scripts.

Sam

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Grails XML error with clean install

Graeme Rocher-4
Administrator
I would suggest clearing out your ivy cache completely and trying
again. There is probably one of Grails' default dependencies being
cached with a different set of transitive dependencies in the ivy
metadata

Cheers
Graeme

On Tue, Aug 3, 2010 at 3:14 PM, Sam Carr <[hidden email]> wrote:

> Actually further to that, though my Grails scripts now seem to work, and my
> app runs, there is a warning message in the run-app output that suggests
> further intrigue regards that xml-apis jar that I deleted from the ivy
> cache. Note that I get this even with grails create-app, so it's not
> specific to my project and it's dependencies.
> I just discovered that if I delete my ivy cache directory entirely, things
> start working properly (no errors, no warnings) so I presume that the
> xml-apis was a dependency of something else that was being picked up from
> the ivy cache and that was messing things up. I'm now suspecting that this
> is more of an ivy cache issue that I've stumbled into than a grails one,
> though it really doesn't seem right.
> Resolving dependencies...
> :: problems summary ::
> :::: WARNINGS
>                                 module not found: xml-apis#xml-apis;1.3.04
>
>                 ==== grailsPlugins: tried
>
>                   -- artifact xml-apis#xml-apis;1.3.04!xml-apis.jar:
>
>                   D:\Work\LunchApp/lib/xml-apis-1.3.04.jar
>
>                   C:\Documents and
> Settings\SHC\.grails\1.3.2\projects\LunchApp\plugins\hibernate-1.3.3/lib/xml-apis-1.3.04.jar
>
>                   C:\Documents and
> Settings\SHC\.grails\1.3.2\projects\LunchApp\plugins\spring-security-core-1.0/lib/xml-apis-1.3.04.jar
>
>                   C:\Documents and
> Settings\SHC\.grails\1.3.2\projects\LunchApp\plugins\tomcat-1.3.3/lib/xml-apis-1.3.04.jar
>
>                 ==== grailsHome: tried
>
>                   C:\grails-1.3.2\lib/xml-apis-1.3.04.xml
>
>                   -- artifact xml-apis#xml-apis;1.3.04!xml-apis.jar:
>
>                   C:\grails-1.3.2\lib/xml-apis-1.3.04.jar
>
>                 ==== grailsHome: tried
>
>                   C:\grails-1.3.2\dist/xml-apis-1.3.04.xml
>
>                   -- artifact xml-apis#xml-apis;1.3.04!xml-apis.jar:
>
>                   C:\grails-1.3.2\dist/xml-apis-1.3.04.jar
>
>                 ==== grailsHome: tried
>
>                   -- artifact xml-apis#xml-apis;1.3.04!xml-apis.jar:
>
>                   C:\grails-1.3.2/plugins/grails-xml-apis-1.3.04.jar
>
>                 ==== grailsCentral: tried
>
>                   -- artifact xml-apis#xml-apis;1.3.04!xml-apis.jar:
>
>
>   http://svn.codehaus.org/grails-plugins/grails-xml-apis/tags/RELEASE_1_3_04/grails-xml-apis-1.3.04.jar
>
>                 ==== grailsCore: tried
>
>                   -- artifact xml-apis#xml-apis;1.3.04!xml-apis.jar:
>
>
>   http://svn.codehaus.org/grails/trunk/grails-plugins/grails-xml-apis/tags/RELEASE_1_3_04/grails-xml-apis-1.3.04.jar
>
>                 ==== ebrRelease: tried
>
>
>   http://repository.springsource.com/maven/bundles/release/xml-apis/xml-apis/1.3.04/xml-apis-1.3.04.pom
>
>                   -- artifact xml-apis#xml-apis;1.3.04!xml-apis.jar:
>
>
>   http://repository.springsource.com/maven/bundles/release/xml-apis/xml-apis/1.3.04/xml-apis-1.3.04.jar
>
>                 ==== ebrExternal: tried
>
>
>   http://repository.springsource.com/maven/bundles/external/xml-apis/xml-apis/1.3.04/xml-apis-1.3.04.pom
>
>                   -- artifact xml-apis#xml-apis;1.3.04!xml-apis.jar:
>
>
>   http://repository.springsource.com/maven/bundles/external/xml-apis/xml-apis/1.3.04/xml-apis-1.3.04.jar
>
>
> ::::::::::::::::::::::::::::::::::::::::::::::
>
>                                 ::          UNRESOLVED DEPENDENCIES
> ::
>
>
> ::::::::::::::::::::::::::::::::::::::::::::::
>
>                                 :: xml-apis#xml-apis;1.3.04: not found
>
>
> ::::::::::::::::::::::::::::::::::::::::::::::
>
>
> Dependencies resolved in 1797ms.
> On 3 Aug 2010, at 14:02, Sam Carr wrote:
>
> Thanks Graham - that JAVA_OPTS tip showed me the way.
>
> Turned out that SAXParseException was being loaded both form the JDK itself
> and from
> C:/Documents%20and%20Settings/SHC/.ivy2/cache/xml-apis/xml-apis/jars/xml-apis-1.3.04.jar.
>
> I can only assume this was left over in my ivy cache on that machine from an
> entirely other project (not even a Grails one). The error went away when I
> deleted the cache/xml-apis/ folder. But how come this was being loaded at
> all? I don't claim to understand ivy very well, but it seems odd that
> another project's files in the ivy cache should be able to break the Grails
> scripts.
>
> Sam
>
>



--
Graeme Rocher
Grails Project Lead
SpringSource - A Division of VMware
http://www.springsource.com

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Grails XML error with clean install

Ronny Løvtangen
In reply to this post by Sam Carr
If you uncomment
mavenCentral()
in BuldConfig.groovy, then xml-apis should be found.


On Aug 3, 2010, at 3:14 PM, Sam Carr wrote:

Actually further to that, though my Grails scripts now seem to work, and my app runs, there is a warning message in the run-app output that suggests further intrigue regards that xml-apis jar that I deleted from the ivy cache. Note that I get this even with grails create-app, so it's not specific to my project and it's dependencies.

I just discovered that if I delete my ivy cache directory entirely, things start working properly (no errors, no warnings) so I presume that the xml-apis was a dependency of something else that was being picked up from the ivy cache and that was messing things up. I'm now suspecting that this is more of an ivy cache issue that I've stumbled into than a grails one, though it really doesn't seem right.

Resolving dependencies...
:: problems summary ::
:::: WARNINGS
                                module not found: xml-apis#xml-apis;1.3.04
 
                ==== grailsPlugins: tried
 
                  -- artifact xml-apis#xml-apis;1.3.04!xml-apis.jar:
 
                  D:\Work\LunchApp/lib/xml-apis-1.3.04.jar
 
                  C:\Documents and Settings\SHC\.grails\1.3.2\projects\LunchApp\plugins\hibernate-1.3.3/lib/xml-apis-1.3.04.jar
 
                  C:\Documents and Settings\SHC\.grails\1.3.2\projects\LunchApp\plugins\spring-security-core-1.0/lib/xml-apis-1.3.04.jar
 
                  C:\Documents and Settings\SHC\.grails\1.3.2\projects\LunchApp\plugins\tomcat-1.3.3/lib/xml-apis-1.3.04.jar
 
                ==== grailsHome: tried
 
                  C:\grails-1.3.2\lib/xml-apis-1.3.04.xml
 
                  -- artifact xml-apis#xml-apis;1.3.04!xml-apis.jar:
 
                  C:\grails-1.3.2\lib/xml-apis-1.3.04.jar
 
                ==== grailsHome: tried
 
                  C:\grails-1.3.2\dist/xml-apis-1.3.04.xml
 
                  -- artifact xml-apis#xml-apis;1.3.04!xml-apis.jar:
 
                  C:\grails-1.3.2\dist/xml-apis-1.3.04.jar
 
                ==== grailsHome: tried
 
                  -- artifact xml-apis#xml-apis;1.3.04!xml-apis.jar:
 
                  C:\grails-1.3.2/plugins/grails-xml-apis-1.3.04.jar
 
                ==== grailsCentral: tried
 
                  -- artifact xml-apis#xml-apis;1.3.04!xml-apis.jar:
 
 
                ==== grailsCore: tried
 
                  -- artifact xml-apis#xml-apis;1.3.04!xml-apis.jar:
 
 
                ==== ebrRelease: tried
 
 
                  -- artifact xml-apis#xml-apis;1.3.04!xml-apis.jar:
 
 
                ==== ebrExternal: tried
 
 
                  -- artifact xml-apis#xml-apis;1.3.04!xml-apis.jar:
 
 
                                ::::::::::::::::::::::::::::::::::::::::::::::
 
                                ::          UNRESOLVED DEPENDENCIES         ::
 
                                ::::::::::::::::::::::::::::::::::::::::::::::
 
                                :: xml-apis#xml-apis;1.3.04: not found
 
                                ::::::::::::::::::::::::::::::::::::::::::::::
 
 
Dependencies resolved in 1797ms.

On 3 Aug 2010, at 14:02, Sam Carr wrote:

Thanks Graham - that JAVA_OPTS tip showed me the way.

Turned out that SAXParseException was being loaded both form the JDK itself and from C:/Documents%20and%20Settings/SHC/.ivy2/cache/xml-apis/xml-apis/jars/xml-apis-1.3.04.jar.

I can only assume this was left over in my ivy cache on that machine from an entirely other project (not even a Grails one). The error went away when I deleted the cache/xml-apis/ folder. But how come this was being loaded at all? I don't claim to understand ivy very well, but it seems odd that another project's files in the ivy cache should be able to break the Grails scripts.

Sam


Sid
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Grails XML error with clean install

Sid
This post has NOT been accepted by the mailing list yet.
Hi,

Can you please tell me How its possible for you to delete .ivy/cache folder? I can delete it vut every time while compiling it will autmatically creating that folder. And agian ame errors are coming in my project.


Thank You.
Loading...