Sami Jmii
Sami Jmii

Reputation: 470

error starting gravity servlet in tomcat 7

I setup graniteds and gravity servlet in java spring application that runs in tomcat 7. in web xml :

<servlet-class>org.granite.gravity.servlet3.GravityAsyncServlet</servlet-class>

and an AMF meswage servlet class :

<servlet-class>org.granite.messaging.webapp.AMFMessageServlet</servlet-class>

and a graniteConfig classe that is read by tomcat servlet :

@ServerFilter
public class GraniteConfig

the amf messaging works well . but the gravity servlet could not start correctly . i debugged graniteds libraries . this line of code won't pass

ServletGraniteConfig servletGraniteConfig = (ServletGraniteConfig)context.getAttribute(GRANITE_CONFIG_KEY);

(this code is from graniteDs Core librairies) and the error was :

java.lang.ClassCastException: org.granite.config.GraniteConfig cannot be cast to org.granite.config.ServletGraniteConfig

i don't get how the graniteConfig object is set in servletContext attributes instead of ServletGraniteConfig . and what part of graniteds configuration i'm missing .

Upvotes: 0

Views: 149

Answers (0)

Related Questions