You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Martin Grigorov <mg...@apache.org> on 2014/04/17 15:57:02 UTC

Class loader issues after Maven 3.1.0

Hi,

We have troubles use 'mvn jetty:run' for
https://github.com/apache/wicket/tree/master/wicket-examples after
upgrading to Maven 3.1.0+.

It fails with:

2014-04-17 16:22:57.160:WARN:oejuc.AbstractLifeCycle:FAILED
org.mortbay.jetty.plugin.JettyServer@44e5b006: java.lang.LinkageError:
loader constraint violation: when resolving overridden method
"org.jboss.weld.Weld.select(Ljavax/enterprise/util/TypeLiteral;[Ljava/lang/annotation/Annotation;)Ljavax/enterprise/inject/Instance;"
the class loader (instance of org/eclipse/jetty/webapp/WebAppClassLoader)
of the current class, org/jboss/weld/Weld, and its superclass loader
(instance of org/codehaus/plexus/classworlds/realm/ClassRealm), have
different Class objects for the type
tion/Annotation;)Ljavax/enterprise/inject/Instance; used in the signature
java.lang.LinkageError: loader constraint violation: when resolving
overridden method
"org.jboss.weld.Weld.select(Ljavax/enterprise/util/TypeLiteral;[Ljava/lang/annotation/Annotation;)Ljavax/enterprise/inject/Instance;"
the class loader (instance of org/eclipse/jetty/webapp/WebAppClassLoader)
of the current class, org/jboss/weld/Weld, and its superclass loader
(instance of org/codehaus/plexus/classworlds/realm/ClassRealm), have
different Class objects for the type
tion/Annotation;)Ljavax/enterprise/inject/Instance; used in the signature
 at
org.jboss.weld.servlet.StaticWeldProvider$WeldSingleton.<clinit>(StaticWeldProvider.java:29)
at
org.jboss.weld.servlet.StaticWeldProvider.getCDI(StaticWeldProvider.java:49)
 at javax.enterprise.inject.spi.CDI.current(CDI.java:60)
at
org.jboss.weld.servlet.WeldInitialListener.contextInitialized(WeldInitialListener.java:85)
 at
org.jboss.weld.servlet.api.helpers.ForwardingServletListener.contextInitialized(ForwardingServletListener.java:34)
at
org.jboss.weld.environment.servlet.Listener.contextInitialized(Listener.java:171)
 at
org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:733)
...

The issue is not new. We just noticed that when using 3.0.5 it runs fine so
it should be some change in Maven itself.

I've found that another user had the same issue:
http://stackoverflow.com/a/18168215/497381

How to reproduce:
1) git clone https://github.com/apache/wicket.git
2) mvn install (just to have all dependencies)
3) cd wicket-examples
4) mvn jetty:run (fails with 3.1.0+)

Thanks!


Martin Grigorov
Wicket Training and Consulting

Re: Class loader issues after Maven 3.1.0

Posted by Martin Grigorov <mg...@apache.org>.
Created http://jira.codehaus.org/browse/MNG-5620

Thank you!

Martin Grigorov
Wicket Training and Consulting


On Thu, Apr 17, 2014 at 5:24 PM, Stuart McCulloch <mc...@gmail.com> wrote:

> On 17 Apr 2014, at 15:15, Martin Grigorov <mg...@apache.org> wrote:
>
> > Thanks, Stuart!
> >
> > I can confirm that the issue is still there in 3.2.1.
> > Is there an open issue at http://jira.codehaus.org/browse/MNG that I can
> > follow ?
>
> I don’t believe so, suggest you open a new issue and refer to that
> maven-dev discussion.
>
> > Martin Grigorov
> > Wicket Training and Consulting
> >
> > On Thu, Apr 17, 2014 at 5:12 PM, Stuart McCulloch <mc...@gmail.com>
> wrote:
> >
> >> See
> >>
> http://mail-archives.apache.org/mod_mbox/maven-dev/201402.mbox/%3cA70F13EF-38E2-49A8-B696-B5E59209226A@gmail.com%3eforwhy this is happening
> >>
> >> AFAICT neither of the suggested solutions mentioned in the above email
> >> have been applied to DefaultClassRealmManager, so I believe this is
> still
> >> an issue in Maven 3.2.1
> >>
> >> On 17 Apr 2014, at 14:57, Martin Grigorov <mg...@apache.org> wrote:
> >>
> >>> Hi,
> >>>
> >>> We have troubles use 'mvn jetty:run' for
> >>> https://github.com/apache/wicket/tree/master/wicket-examples after
> >>> upgrading to Maven 3.1.0+.
> >>>
> >>> It fails with:
> >>>
> >>> 2014-04-17 16:22:57.160:WARN:oejuc.AbstractLifeCycle:FAILED
> >>> org.mortbay.jetty.plugin.JettyServer@44e5b006: java.lang.LinkageError:
> >>> loader constraint violation: when resolving overridden method
> >>>
> >>
> "org.jboss.weld.Weld.select(Ljavax/enterprise/util/TypeLiteral;[Ljava/lang/annotation/Annotation;)Ljavax/enterprise/inject/Instance;"
> >>> the class loader (instance of
> org/eclipse/jetty/webapp/WebAppClassLoader)
> >>> of the current class, org/jboss/weld/Weld, and its superclass loader
> >>> (instance of org/codehaus/plexus/classworlds/realm/ClassRealm), have
> >>> different Class objects for the type
> >>> tion/Annotation;)Ljavax/enterprise/inject/Instance; used in the
> signature
> >>> java.lang.LinkageError: loader constraint violation: when resolving
> >>> overridden method
> >>>
> >>
> "org.jboss.weld.Weld.select(Ljavax/enterprise/util/TypeLiteral;[Ljava/lang/annotation/Annotation;)Ljavax/enterprise/inject/Instance;"
> >>> the class loader (instance of
> org/eclipse/jetty/webapp/WebAppClassLoader)
> >>> of the current class, org/jboss/weld/Weld, and its superclass loader
> >>> (instance of org/codehaus/plexus/classworlds/realm/ClassRealm), have
> >>> different Class objects for the type
> >>> tion/Annotation;)Ljavax/enterprise/inject/Instance; used in the
> signature
> >>> at
> >>>
> >>
> org.jboss.weld.servlet.StaticWeldProvider$WeldSingleton.<clinit>(StaticWeldProvider.java:29)
> >>> at
> >>>
> >>
> org.jboss.weld.servlet.StaticWeldProvider.getCDI(StaticWeldProvider.java:49)
> >>> at javax.enterprise.inject.spi.CDI.current(CDI.java:60)
> >>> at
> >>>
> >>
> org.jboss.weld.servlet.WeldInitialListener.contextInitialized(WeldInitialListener.java:85)
> >>> at
> >>>
> >>
> org.jboss.weld.servlet.api.helpers.ForwardingServletListener.contextInitialized(ForwardingServletListener.java:34)
> >>> at
> >>>
> >>
> org.jboss.weld.environment.servlet.Listener.contextInitialized(Listener.java:171)
> >>> at
> >>>
> >>
> org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:733)
> >>> ...
> >>>
> >>> The issue is not new. We just noticed that when using 3.0.5 it runs
> fine
> >> so
> >>> it should be some change in Maven itself.
> >>>
> >>> I've found that another user had the same issue:
> >>> http://stackoverflow.com/a/18168215/497381
> >>>
> >>> How to reproduce:
> >>> 1) git clone https://github.com/apache/wicket.git
> >>> 2) mvn install (just to have all dependencies)
> >>> 3) cd wicket-examples
> >>> 4) mvn jetty:run (fails with 3.1.0+)
> >>>
> >>> Thanks!
> >>>
> >>>
> >>> Martin Grigorov
> >>> Wicket Training and Consulting
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Class loader issues after Maven 3.1.0

Posted by Stuart McCulloch <mc...@gmail.com>.
On 17 Apr 2014, at 15:15, Martin Grigorov <mg...@apache.org> wrote:

> Thanks, Stuart!
> 
> I can confirm that the issue is still there in 3.2.1.
> Is there an open issue at http://jira.codehaus.org/browse/MNG that I can
> follow ?

I don’t believe so, suggest you open a new issue and refer to that maven-dev discussion.

> Martin Grigorov
> Wicket Training and Consulting
> 
> On Thu, Apr 17, 2014 at 5:12 PM, Stuart McCulloch <mc...@gmail.com> wrote:
> 
>> See
>> http://mail-archives.apache.org/mod_mbox/maven-dev/201402.mbox/%3cA70F13EF-38E2-49A8-B696-B5E59209226A@gmail.com%3efor why this is happening
>> 
>> AFAICT neither of the suggested solutions mentioned in the above email
>> have been applied to DefaultClassRealmManager, so I believe this is still
>> an issue in Maven 3.2.1
>> 
>> On 17 Apr 2014, at 14:57, Martin Grigorov <mg...@apache.org> wrote:
>> 
>>> Hi,
>>> 
>>> We have troubles use 'mvn jetty:run' for
>>> https://github.com/apache/wicket/tree/master/wicket-examples after
>>> upgrading to Maven 3.1.0+.
>>> 
>>> It fails with:
>>> 
>>> 2014-04-17 16:22:57.160:WARN:oejuc.AbstractLifeCycle:FAILED
>>> org.mortbay.jetty.plugin.JettyServer@44e5b006: java.lang.LinkageError:
>>> loader constraint violation: when resolving overridden method
>>> 
>> "org.jboss.weld.Weld.select(Ljavax/enterprise/util/TypeLiteral;[Ljava/lang/annotation/Annotation;)Ljavax/enterprise/inject/Instance;"
>>> the class loader (instance of org/eclipse/jetty/webapp/WebAppClassLoader)
>>> of the current class, org/jboss/weld/Weld, and its superclass loader
>>> (instance of org/codehaus/plexus/classworlds/realm/ClassRealm), have
>>> different Class objects for the type
>>> tion/Annotation;)Ljavax/enterprise/inject/Instance; used in the signature
>>> java.lang.LinkageError: loader constraint violation: when resolving
>>> overridden method
>>> 
>> "org.jboss.weld.Weld.select(Ljavax/enterprise/util/TypeLiteral;[Ljava/lang/annotation/Annotation;)Ljavax/enterprise/inject/Instance;"
>>> the class loader (instance of org/eclipse/jetty/webapp/WebAppClassLoader)
>>> of the current class, org/jboss/weld/Weld, and its superclass loader
>>> (instance of org/codehaus/plexus/classworlds/realm/ClassRealm), have
>>> different Class objects for the type
>>> tion/Annotation;)Ljavax/enterprise/inject/Instance; used in the signature
>>> at
>>> 
>> org.jboss.weld.servlet.StaticWeldProvider$WeldSingleton.<clinit>(StaticWeldProvider.java:29)
>>> at
>>> 
>> org.jboss.weld.servlet.StaticWeldProvider.getCDI(StaticWeldProvider.java:49)
>>> at javax.enterprise.inject.spi.CDI.current(CDI.java:60)
>>> at
>>> 
>> org.jboss.weld.servlet.WeldInitialListener.contextInitialized(WeldInitialListener.java:85)
>>> at
>>> 
>> org.jboss.weld.servlet.api.helpers.ForwardingServletListener.contextInitialized(ForwardingServletListener.java:34)
>>> at
>>> 
>> org.jboss.weld.environment.servlet.Listener.contextInitialized(Listener.java:171)
>>> at
>>> 
>> org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:733)
>>> ...
>>> 
>>> The issue is not new. We just noticed that when using 3.0.5 it runs fine
>> so
>>> it should be some change in Maven itself.
>>> 
>>> I've found that another user had the same issue:
>>> http://stackoverflow.com/a/18168215/497381
>>> 
>>> How to reproduce:
>>> 1) git clone https://github.com/apache/wicket.git
>>> 2) mvn install (just to have all dependencies)
>>> 3) cd wicket-examples
>>> 4) mvn jetty:run (fails with 3.1.0+)
>>> 
>>> Thanks!
>>> 
>>> 
>>> Martin Grigorov
>>> Wicket Training and Consulting
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>> 
>> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Class loader issues after Maven 3.1.0

Posted by Martin Grigorov <mg...@apache.org>.
Thanks, Stuart!

I can confirm that the issue is still there in 3.2.1.
Is there an open issue at http://jira.codehaus.org/browse/MNG that I can
follow ?

Martin Grigorov
Wicket Training and Consulting


On Thu, Apr 17, 2014 at 5:12 PM, Stuart McCulloch <mc...@gmail.com> wrote:

> See
> http://mail-archives.apache.org/mod_mbox/maven-dev/201402.mbox/%3cA70F13EF-38E2-49A8-B696-B5E59209226A@gmail.com%3efor why this is happening
>
> AFAICT neither of the suggested solutions mentioned in the above email
> have been applied to DefaultClassRealmManager, so I believe this is still
> an issue in Maven 3.2.1
>
> On 17 Apr 2014, at 14:57, Martin Grigorov <mg...@apache.org> wrote:
>
> > Hi,
> >
> > We have troubles use 'mvn jetty:run' for
> > https://github.com/apache/wicket/tree/master/wicket-examples after
> > upgrading to Maven 3.1.0+.
> >
> > It fails with:
> >
> > 2014-04-17 16:22:57.160:WARN:oejuc.AbstractLifeCycle:FAILED
> > org.mortbay.jetty.plugin.JettyServer@44e5b006: java.lang.LinkageError:
> > loader constraint violation: when resolving overridden method
> >
> "org.jboss.weld.Weld.select(Ljavax/enterprise/util/TypeLiteral;[Ljava/lang/annotation/Annotation;)Ljavax/enterprise/inject/Instance;"
> > the class loader (instance of org/eclipse/jetty/webapp/WebAppClassLoader)
> > of the current class, org/jboss/weld/Weld, and its superclass loader
> > (instance of org/codehaus/plexus/classworlds/realm/ClassRealm), have
> > different Class objects for the type
> > tion/Annotation;)Ljavax/enterprise/inject/Instance; used in the signature
> > java.lang.LinkageError: loader constraint violation: when resolving
> > overridden method
> >
> "org.jboss.weld.Weld.select(Ljavax/enterprise/util/TypeLiteral;[Ljava/lang/annotation/Annotation;)Ljavax/enterprise/inject/Instance;"
> > the class loader (instance of org/eclipse/jetty/webapp/WebAppClassLoader)
> > of the current class, org/jboss/weld/Weld, and its superclass loader
> > (instance of org/codehaus/plexus/classworlds/realm/ClassRealm), have
> > different Class objects for the type
> > tion/Annotation;)Ljavax/enterprise/inject/Instance; used in the signature
> > at
> >
> org.jboss.weld.servlet.StaticWeldProvider$WeldSingleton.<clinit>(StaticWeldProvider.java:29)
> > at
> >
> org.jboss.weld.servlet.StaticWeldProvider.getCDI(StaticWeldProvider.java:49)
> > at javax.enterprise.inject.spi.CDI.current(CDI.java:60)
> > at
> >
> org.jboss.weld.servlet.WeldInitialListener.contextInitialized(WeldInitialListener.java:85)
> > at
> >
> org.jboss.weld.servlet.api.helpers.ForwardingServletListener.contextInitialized(ForwardingServletListener.java:34)
> > at
> >
> org.jboss.weld.environment.servlet.Listener.contextInitialized(Listener.java:171)
> > at
> >
> org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:733)
> > ...
> >
> > The issue is not new. We just noticed that when using 3.0.5 it runs fine
> so
> > it should be some change in Maven itself.
> >
> > I've found that another user had the same issue:
> > http://stackoverflow.com/a/18168215/497381
> >
> > How to reproduce:
> > 1) git clone https://github.com/apache/wicket.git
> > 2) mvn install (just to have all dependencies)
> > 3) cd wicket-examples
> > 4) mvn jetty:run (fails with 3.1.0+)
> >
> > Thanks!
> >
> >
> > Martin Grigorov
> > Wicket Training and Consulting
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Class loader issues after Maven 3.1.0

Posted by Stuart McCulloch <mc...@gmail.com>.
See http://mail-archives.apache.org/mod_mbox/maven-dev/201402.mbox/%3cA70F13EF-38E2-49A8-B696-B5E59209226A@gmail.com%3e for why this is happening

AFAICT neither of the suggested solutions mentioned in the above email have been applied to DefaultClassRealmManager, so I believe this is still an issue in Maven 3.2.1

On 17 Apr 2014, at 14:57, Martin Grigorov <mg...@apache.org> wrote:

> Hi,
> 
> We have troubles use 'mvn jetty:run' for
> https://github.com/apache/wicket/tree/master/wicket-examples after
> upgrading to Maven 3.1.0+.
> 
> It fails with:
> 
> 2014-04-17 16:22:57.160:WARN:oejuc.AbstractLifeCycle:FAILED
> org.mortbay.jetty.plugin.JettyServer@44e5b006: java.lang.LinkageError:
> loader constraint violation: when resolving overridden method
> "org.jboss.weld.Weld.select(Ljavax/enterprise/util/TypeLiteral;[Ljava/lang/annotation/Annotation;)Ljavax/enterprise/inject/Instance;"
> the class loader (instance of org/eclipse/jetty/webapp/WebAppClassLoader)
> of the current class, org/jboss/weld/Weld, and its superclass loader
> (instance of org/codehaus/plexus/classworlds/realm/ClassRealm), have
> different Class objects for the type
> tion/Annotation;)Ljavax/enterprise/inject/Instance; used in the signature
> java.lang.LinkageError: loader constraint violation: when resolving
> overridden method
> "org.jboss.weld.Weld.select(Ljavax/enterprise/util/TypeLiteral;[Ljava/lang/annotation/Annotation;)Ljavax/enterprise/inject/Instance;"
> the class loader (instance of org/eclipse/jetty/webapp/WebAppClassLoader)
> of the current class, org/jboss/weld/Weld, and its superclass loader
> (instance of org/codehaus/plexus/classworlds/realm/ClassRealm), have
> different Class objects for the type
> tion/Annotation;)Ljavax/enterprise/inject/Instance; used in the signature
> at
> org.jboss.weld.servlet.StaticWeldProvider$WeldSingleton.<clinit>(StaticWeldProvider.java:29)
> at
> org.jboss.weld.servlet.StaticWeldProvider.getCDI(StaticWeldProvider.java:49)
> at javax.enterprise.inject.spi.CDI.current(CDI.java:60)
> at
> org.jboss.weld.servlet.WeldInitialListener.contextInitialized(WeldInitialListener.java:85)
> at
> org.jboss.weld.servlet.api.helpers.ForwardingServletListener.contextInitialized(ForwardingServletListener.java:34)
> at
> org.jboss.weld.environment.servlet.Listener.contextInitialized(Listener.java:171)
> at
> org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:733)
> ...
> 
> The issue is not new. We just noticed that when using 3.0.5 it runs fine so
> it should be some change in Maven itself.
> 
> I've found that another user had the same issue:
> http://stackoverflow.com/a/18168215/497381
> 
> How to reproduce:
> 1) git clone https://github.com/apache/wicket.git
> 2) mvn install (just to have all dependencies)
> 3) cd wicket-examples
> 4) mvn jetty:run (fails with 3.1.0+)
> 
> Thanks!
> 
> 
> Martin Grigorov
> Wicket Training and Consulting


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org