tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tamás Kimmel <kumm0...@gmail.com>
Subject Re: tomee-maven-plugin webappDefaultConfig broken
Date Mon, 28 Jul 2014 21:08:08 GMT
Should i file an issue, or it is just a known limitation of an experimental
function?
- If you can give some pointers about an acceptable fix, maybe i can send a
better patch.

Not related to this bug, but i found another issue with webappDefaultConfig.
javax.servlet annotations does not get processed from WEB-INF/classes when
webappDefaultConfig is true.
For example a class annotated with @WebServlet not started up as a servlet.

OpenEJBContextConfig.isIncludedIn called with the additionalRepo-based url
of the annotated class. This url is not a part of the war, so returns false.
This patch fixes for me:
https://github.com/kumm/tomee/commit/2d2c33642c4c9b4864b02c0b07d60e2ff177f704

I can't check these issues on trunk, because it does not compile for me.
Should it compile?





2014-07-27 17:21 GMT+02:00 Romain Manni-Bucau <rmannibucau@gmail.com>:

> true,
>
> this is a bug, ie only accepted case ATM is you can find more in
> WEB-INF/classes than in target/classes
>
>
> Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau
>
>
> 2014-07-27 17:09 GMT+02:00 Tamás Kimmel <kumm0307@gmail.com>:
> > So (after some debug), i found it.
> > I have a file in my target/classes missing from WEB-INF/classes.
> > - netbeans puts '.netbeans_automatic_build' into target/classes -
> >
> > After the linked change introduced in EmptyDirContext, target/classes
> > listed, but resources looked up from WEB-INF/classes.
> > So all files in target/classes have to exist in WEB-INF/classes.
> > I don't know is it a bug or, is it expected.
> >
> > i'll take a look at trunk too, to check this behavior.
> >
> >
> > 2014-07-27 12:23 GMT+02:00 Romain Manni-Bucau <rmannibucau@gmail.com>:
> >
> >> well trunk should work with the limitation we only add target/classes
> >> etc to existing war to if you remove and it was in war you'll still
> >> find the resource (shouldn't be a big deal)
> >>
> >> about 1.7: url shouldn't be null so I guess the real question is why
> >> it is null? can be an more important issue hidding the fact we don't
> >> handle some kind of url
> >>
> >>
> >> Romain Manni-Bucau
> >> Twitter: @rmannibucau
> >> Blog: http://rmannibucau.wordpress.com/
> >> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> >> Github: https://github.com/rmannibucau
> >>
> >>
> >> 2014-07-27 12:20 GMT+02:00 Tamás Kimmel <kumm0307@gmail.com>:
> >> > Thanks, great!
> >> > Do you mean jsp-development property? i'll take a look at it when you
> >> think
> >> > it should work.
> >> >
> >> > For 1.7.x i think i've found a simple and harmless fix.
> >> > In OpenEJBContextConfig.processAnnotationsUrl a simple null check for
> >> > currentUrl solve my problem.
> >> >
> >> > 524: if (currentUrl == null || NewLoaderLogic.skip(currentUrl)) {
> >> >
> >> > The overridden method from catalina does this too, so it seem to be a
> >> > reasonable fix.
> >> >
> >> >
> >> >
> >> >
> >> > 2014-07-26 0:24 GMT+02:00 Romain Manni-Bucau <rmannibucau@gmail.com>:
> >> >
> >> >> Hi
> >> >>
> >> >> didnt look 1.7 (since tag is already done) but trunk should get
> >> something a
> >> >> bit different but working
> >> >>
> >> >>
> >> >>
> >> >> Romain Manni-Bucau
> >> >> Twitter: @rmannibucau
> >> >> Blog: http://rmannibucau.wordpress.com/
> >> >> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> >> >> Github: https://github.com/rmannibucau
> >> >>
> >> >>
> >> >> 2014-07-24 23:06 GMT+02:00 Tamás Kimmel <kumm0307@gmail.com>:
> >> >>
> >> >> > The regression introduced by
> >> >> >
> >> >> >
> >> >>
> >>
> https://github.com/apache/tomee/commit/12d79a50bbd9504cd386aef62d77a5117768812b#diff-13
> >> >> >
> >> >> > Reverting the changes in EmptyDirContext seem to help.
> >> >> > I don't know (yet) what breaks.
> >> >> >
> >> >> >
> >> >> > 2014-07-24 14:42 GMT+02:00 Tamás Kimmel <kumm0307@gmail.com>:
> >> >> >
> >> >> > > only src/main/resources missing, but adding it does not help.
> >> >> > >
> >> >> > > I've attached the project. But its really an empty web project
> >> created
> >> >> > > with maven prototype.
> >> >> > >
> >> >> > > First i've run into this problem with a complex web project,
but
> >> i've
> >> >> > > realized it can be reproduced with an empty project too.
> >> >> > >
> >> >> > > and sorry ,
> >> >> > > s/Last known broken version/First known broken version/
> >> >> > >
> >> >> > >
> >> >> > >
> >> >> > >
> >> >> > > 2014-07-24 13:48 GMT+02:00 Romain Manni-Bucau <
> >> rmannibucau@gmail.com>:
> >> >> > >
> >> >> > > s/mean/miss/
> >> >> > >>
> >> >> > >>
> >> >> > >>
> >> >> > >> Romain Manni-Bucau
> >> >> > >> Twitter: @rmannibucau
> >> >> > >> Blog: http://rmannibucau.wordpress.com/
> >> >> > >> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> >> >> > >> Github: https://github.com/rmannibucau
> >> >> > >>
> >> >> > >>
> >> >> > >> 2014-07-24 13:37 GMT+02:00 Romain Manni-Bucau <
> >> rmannibucau@gmail.com
> >> >> >:
> >> >> > >>
> >> >> > >> > can mean a folder is missing in your setup (src/main/webapp
or
> >> >> > >> > target/classes)
> >> >> > >> >
> >> >> > >> >
> >> >> > >> >
> >> >> > >> >
> >> >> > >> >
> >> >> > >> > Romain Manni-Bucau
> >> >> > >> > Twitter: @rmannibucau
> >> >> > >> > Blog: http://rmannibucau.wordpress.com/
> >> >> > >> > LinkedIn: http://fr.linkedin.com/in/rmannibucau
> >> >> > >> > Github: https://github.com/rmannibucau
> >> >> > >> >
> >> >> > >> >
> >> >> > >> > 2014-07-24 13:35 GMT+02:00 Tamás Kimmel <kumm0307@gmail.com>:
> >> >> > >> >
> >> >> > >> > Hi!
> >> >> > >> >>
> >> >> > >> >> I know this is an experimental function.
> >> >> > >> >> I'm just sending a signal, it stopped to work.
> >> >> > >> >> Last known working version is snapshot at 20140716.
> >> >> > >> >> Last known broken version is snapshot at 20140722.
> >> >> > >> >>
> >> >> > >> >> I get this stacktrace on tomee:run:
> >> >> > >> >> INFO - Deployed
> >> >> > >> >>
> >> >> > >> >>
> >> >> > >>
> >> >> >
> >> >>
> >>
> Application(path=/home/kumm/Workspace/_try/mavenwebproject/target/apache-tomee/webapps/mavenwebproject-1.0-SNAPSHOT)
> >> >> > >> >> SEVERE - ContainerBase.addChild: start:
> >> >> > >> >> org.apache.catalina.LifecycleException: Failed
to start
> >> component
> >> >> > >> >>
> >> >> > >> >>
> >> >> > >>
> >> >> >
> >> >>
> >>
> [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/mavenwebproject-1.0-SNAPSHOT]]
> >> >> > >> >> at
> >> >> >
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
> >> >> > >> >> at
> >> >> > >> >>
> >> >> > >> >>
> >> >> > >>
> >> >> >
> >> >>
> >>
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
> >> >> > >> >> at
> >> >> > >>
> >> >>
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
> >> >> > >> >> at
> >> >> > >>
> >> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
> >> >> > >> >> at
> >> >> > >>
> >> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1083)
> >> >> > >> >> at
> >> >> > >> >>
> >> >> > >>
> >> >> >
> >> >>
> >>
> org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1880)
> >> >> > >> >> at
> >> >> > >>
> >> >>
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> >> >> > >> >> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> >> >> > >> >> at
> >> >> > >> >>
> >> >> > >> >>
> >> >> > >>
> >> >> >
> >> >>
> >>
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> >> >> > >> >> at
> >> >> > >> >>
> >> >> > >> >>
> >> >> > >>
> >> >> >
> >> >>
> >>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> >> >> > >> >> at java.lang.Thread.run(Thread.java:744)
> >> >> > >> >> Caused by: java.lang.NullPointerException
> >> >> > >> >> at
> >> >> > >>
> >> org.apache.openejb.config.NewLoaderLogic.skip(NewLoaderLogic.java:180)
> >> >> > >> >> at
> >> >> > >>
> >> org.apache.openejb.config.NewLoaderLogic.skip(NewLoaderLogic.java:176)
> >> >> > >> >> at
> >> >> > >> >>
> >> >> > >> >>
> >> >> > >>
> >> >> >
> >> >>
> >>
> org.apache.tomee.catalina.OpenEJBContextConfig.processAnnotationsUrl(OpenEJBContextConfig.java:524)
> >> >> > >> >> at
> >> >> > >> >>
> >> >> > >> >>
> >> >> > >>
> >> >> >
> >> >>
> >>
> org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1298)
> >> >> > >> >> at
> >> >> > >> >>
> >> >> > >> >>
> >> >> > >>
> >> >> >
> >> >>
> >>
> org.apache.tomee.catalina.OpenEJBContextConfig.webConfig(OpenEJBContextConfig.java:366)
> >> >> > >> >> at
> >> >> > >> >>
> >> >> > >> >>
> >> >> > >>
> >> >> >
> >> >>
> >>
> org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:876)
> >> >> > >> >> at
> >> >> > >> >>
> >> >> > >> >>
> >> >> > >>
> >> >> >
> >> >>
> >>
> org.apache.tomee.catalina.OpenEJBContextConfig.configureStart(OpenEJBContextConfig.java:115)
> >> >> > >> >> at
> >> >> > >> >>
> >> >> > >> >>
> >> >> > >>
> >> >> >
> >> >>
> >>
> org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:374)
> >> >> > >> >> at
> >> >> > >> >>
> >> >> > >> >>
> >> >> > >>
> >> >> >
> >> >>
> >>
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
> >> >> > >> >> at
> >> >> > >> >>
> >> >> > >> >>
> >> >> > >>
> >> >> >
> >> >>
> >>
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
> >> >> > >> >> at
> >> >> > >> >>
> >> >> > >> >>
> >> >> > >>
> >> >> >
> >> >>
> >>
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5355)
> >> >> > >> >> at
> >> >> >
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
> >> >> > >> >> ... 10 more
> >> >> > >> >> SEVERE - Error deploying web application archive
> >> >> > >> >>
> >> >> > >> >>
> >> >> > >>
> >> >> >
> >> >>
> >>
> /home/kumm/Workspace/_try/mavenwebproject/target/apache-tomee/webapps/mavenwebproject-1.0-SNAPSHOT.war
> >> >> > >> >>
> >> >> > >> >> My test project is an empty maven web project
created by
> maven
> >> >> > >> >> archetype:generate.
> >> >> > >> >> ( mvn -DarchetypeGroupId=org.codehaus.mojo.archetypes
> >> >> > >> >> -DarchetypeArtifactId=webapp-javaee6 -DarchetypeVersion=1.5
> >> >> > >> >> -DgroupId=com.acme -DartifactId=mavenwebproject
> >> >> > -Dversion=1.0-SNAPSHOT
> >> >> > >> >> -Dpackage=com.acme Dbasedir=/home/kumm/Workspace/_try
> >> >> > >> archetype:generate )
> >> >> > >> >>
> >> >> > >> >> plugin in pom.xml:
> >> >> > >> >> <plugin>
> >> >> > >> >>                 <groupId>org.apache.openejb.maven</groupId>
> >> >> > >> >>                 <artifactId>tomee-maven-plugin</artifactId>
> >> >> > >> >>                 <version>1.7.0-SNAPSHOT</version>
> >> >> > >> >>                 <configuration>
> >> >> > >> >>
> >> <tomeeClassifier>webprofile</tomeeClassifier>
> >> >> > >> >>                     <simpleLog>true</simpleLog>
> >> >> > >> >>
> >> <webappDefaultConfig>true</webappDefaultConfig>
> >> >> > >> >>                 </configuration>
> >> >> > >> >> </plugin>
> >> >> > >> >>
> >> >> > >> >> Without line
> "<webappDefaultConfig>true</webappDefaultConfig>"
> >> >> > >> everything
> >> >> > >> >> works as expected.
> >> >> > >> >>
> >> >> > >> >
> >> >> > >> >
> >> >> > >>
> >> >> > >
> >> >> > >
> >> >> >
> >> >>
> >>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message