Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Atmosphere/TomEE] WARNING: Unable to detect annotations. Application may fail to deploy. #1349

Closed
smithh032772 opened this issue Oct 18, 2013 · 13 comments

Comments

@smithh032772
Copy link

see mail list topic[1]

[1] https://groups.google.com/forum/?fromgroups#!topic/atmosphere-framework/PcYoqKZ3_Aw

@jfarcand
Copy link
Member

OK you are using a 1.6.0-SNAPSHOT so they must have fixed the issue because with today's SNAPSHOT, I can't reproduce it

INFO: Atmosphere is using org.atmosphere.cpr.DefaultAnnotationProcessor for processing annotation
Oct 21, 2013 3:42:40 PM org.atmosphere.cpr.DefaultAnnotationProcessor configure
INFO: AnnotationProcessor class org.atmosphere.cpr.DefaultAnnotationProcessor$ServletContainerInitializerAnnotationProcessor being used
Oct 21, 2013 3:42:40 PM org.atmosphere.samples.chat.custom.SampleConfig handle
INFO: Custom annotation @org.atmosphere.samples.chat.custom.Config() discovered. Starting the Chat Sample
Oct 21, 2013 3:42:41 PM org.atmosphere.cpr.AtmosphereFramework addAtmosphereHandler

@smithh032772
Copy link
Author

Hmmm, i just download latest TomEE+ 1.6.0 snapshot; i don't use web profile. did you download-and-test tomee+ or tomee 'web profile' ?

I still get the same WARNING. at gist URL below, you will see entire tomee+ (catalina) log after starting tomee+.

https://gist.github.com/smithh032772/7091129

@karlkilden
Copy link

I have the same behavior on TomEE 1.6

@jfarcand
Copy link
Member

jfarcand commented Jun 7, 2014

@karlkilden Which Atmosphere version are you using? Try 2.2.0-RC2

@jfarcand
Copy link
Member

jfarcand commented Jun 7, 2014

In any case, this is just a warning, so you application will still works.

@karlkilden
Copy link

jfarcand hi and thank you for a quick response. My compliments on a great project too, really looking forward to using it in my upcoming project. However for now It is not working for me, this is the full log using latest versions of Atmosphere-CDI, Tomcat7-compat and the runtime.

https://gist.github.com/karlkilden/ea505f8e6641b33b28b3

I got hello world working some time ago using a plain tomcat but other then that I am a novice so I apologize if I have some stupid error...

I commited and pushed to my test project. If you would like to try it yourself it can be browsed and cloned from here: https://github.com/karlkilden/ref The readme explains how to run it.

I added PrimePush for the function "Group Setup". In the gui you click Admin -> Group Management -> Setup Group and create a group (just random name will suffice).

the source code is groupSetup.xhtml (the socket is in template.xhtml) The bean is GroupSetupBean.java

The EndPoint is: NotifyResource.java

I am on twitter, google+ and your irc channel if you want to talk to me live...

@karlkilden
Copy link

Also, scanning does not make sense. I would rather demand from TomEE that they scan and give Atmosphere the result. I feel combined scanning for all frameworks is required to maintain lean boot time.

My preferred method of feeding you my annotated instances would be to have a simple config class like:

public interface AtmosphereAnnotatedTypeControl {
public Collection<Class<?>> atmosphereAnnotatedTypes();
}

@jfarcand
Copy link
Member

jfarcand commented Jun 9, 2014

@karlkilden Contribution welcomed :-) Atmosphere do get the list of annotaed classes from the Servlet 3.0 mechanism (looking inside the AnnotationDetector class in Atmosphere).

I won't have time to debug this this week for sure. But I know it works, so most probably an application error. Try with the atmosphere-samples (here and let me know if that one fail. You can also go on EE mailing list and ask them.

@karlkilden
Copy link

Ok but note that this is when using Atmosphere with PrimePush and I am already using the samples from Primefaces...

2014:06:09 09:41:46 ERROR org.primefaces.push.PushServlet: No Annotated class using @PushEndpoint found. Push will not work.

I am pretty sure I have a class annotated with @PushEndpoint ;)

@jfarcand
Copy link
Member

jfarcand commented Jun 9, 2014

OK please open another issue. In the issue, turn the Atmosphere log to TRACE as well as org.primefaces.push.* and attach it (or gist it) to the new issue.

@karlkilden
Copy link

Thanks and done:

#1624

@salviof
Copy link

salviof commented Nov 8, 2017

Maybe Atmosphere should use The Reflection API tools from apache:
The easy mode:
List lista = new ArrayList<>();
Reflections reflections = new Reflections("pakage");
Set<Class<?>> annotated = reflections.getTypesAnnotatedWith(anotation.class);

   <dependency>
        <groupId>org.reflections</groupId>
        <artifactId>reflections</artifactId>
        <version>0.9.10</version>
    </dependency>

Or maybe alow custom AnnotationProcessor...

@jfarcand
Copy link
Member

jfarcand commented Nov 9, 2017

@salviof Atmosphere supports that. Check the documentation (via web.xml)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants