Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Weld 4+ Jersey3+ Mojarra3 + Jetty Maven plugin start failed.

Hi

On Sun, Apr 4, 2021 at 2:52 PM hantsy bai <hantsy@xxxxxxxxx> wrote:
>
> It seems too old, I rarely used Jetty in projects.  I tried the way in the article  in the above and weld doc,  some config are out of data due to  property not found or class not found etc.
> I think jetty is changed too frequently.

Bear in mind you are currently using jetty 11 which is very new and
already supporting the new namespace "jakarta" so there might be some
missing configuration for this.
There is an issue and a fix/pr ready
https://github.com/eclipse/jetty.project/issues/6123
And even a workaround to fix the dependencies imported by weld
https://github.com/eclipse/jetty.project/issues/6123#issuecomment-812433263
I have tested the workaround with your sample project and it seems to work file

>
>
> Hantsy Bai
>
> Self-employed consultant, fullstack developer, agile coach
>
> GitHub: https://github.com/hantsy
>
> Twitter: https://twitter.com/@hantsy
>
> Medium: https://medium.com/@hantsy
>
>
> On Sat, Apr 3, 2021 at 11:14 PM Som Lima <somplasticllc@xxxxxxxxx> wrote:
>>
>> Have you seen this article, it may have resolution for you.
>>
>> https://github.com/jetty-project/weld-example-base/issues/1
>>
>>
>>
>> On Sat, 3 Apr 2021, 15:20 hantsy bai, <hantsy@xxxxxxxxx> wrote:
>>>
>>> Hi everybody,
>>>
>>> Currently, I am working on a template project for servlet 5.0,
>>>
>>> https://github.com/hantsy/jakartaee9-servlet-starter-boilerplate
>>>
>>> Firstly I want to run the application via cargo maven plugin(tomat) and jetty maven plugin .but encountered an issue with configuring Jetty maven plugin.
>>>
>>> When running the following command and failed.
>>>
>>> > >mvn clean package jetty:run-war -Pjetty
>>>
>>> Apr 03, 2021 10:04:58 PM org.jboss.weld.environment.servlet.WeldServletLifecycle initialize
>>> INFO: WELD-ENV-001001: No supported servlet container detected, CDI injection will NOT be available in Servlets, Filters or Listeners
>>> [WARNING] Failed startup of context o.e.j.m.p.MavenWebAppContext@c79780{/jakartaee9-servlet-starter-boilerplate,[file:///D:/hantsylabs/jakartaee9-servlet-starter-boilerplate/target/jak
>>> artaee9-servlet-starter-boilerplate/, jar:file:///D:/hantsylabs/jakartaee9-servlet-starter-boilerplate/target/jakartaee9-servlet-starter-boilerplate/WEB-INF/lib/jakarta.faces-3.0.0.jar
>>> !/META-INF/resources],UNAVAILABLE}{D:\hantsylabs\jakartaee9-servlet-starter-boilerplate\target\jakartaee9-servlet-starter-boilerplate.war}
>>> java.lang.LinkageError: loader constraint violation: when resolving interface method 'void jakarta.servlet.jsp.JspApplicationContext.addELResolver(jakarta.el.ELResolver)' the class loa
>>> der org.eclipse.jetty.webapp.WebAppClassLoader @51c6e775 of the current class, org/jboss/weld/environment/servlet/WeldServletLifecycle, and the class loader org.codehaus.plexus.classwo
>>> rlds.realm.ClassRealm @cef885d for the method's defining class, jakarta/servlet/jsp/JspApplicationContext, have different Class objects for the type jakarta/el/ELResolver used in the s
>>> ignature (org.jboss.weld.environment.servlet.WeldServletLifecycle is in unnamed module of loader org.eclipse.jetty.webapp.WebAppClassLoader @51c6e775, parent loader org.codehaus.plexus
>>> .classworlds.realm.ClassRealm @cef885d; jakarta.servlet.jsp.JspApplicationContext is in unnamed module of loader org.codehaus.plexus.classworlds.realm.ClassRealm @cef885d, parent loade
>>> r 'bootstrap')
>>>
>>> I have read the weld doc, and jetty doc, I can not find some way to fix it.
>>>
>>> Hantsy Bai
>>>
>>> Self-employed consultant, fullstack developer, agile coach
>>>
>>> GitHub: https://github.com/hantsy
>>>
>>> Twitter: https://twitter.com/@hantsy
>>>
>>> Medium: https://medium.com/@hantsy
>>> _______________________________________________
>>> jetty-users mailing list
>>> jetty-users@xxxxxxxxxxx
>>> To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jetty-users
>>
>> _______________________________________________
>> jetty-users mailing list
>> jetty-users@xxxxxxxxxxx
>> To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jetty-users
>
> _______________________________________________
> jetty-users mailing list
> jetty-users@xxxxxxxxxxx
> To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jetty-users



-- 
Olivier


Back to the top