[Beginners Corner] - problem caused by distributable tag
by ddai
Hi folks,
My session replication just doesn't work. Once I add distributable tag into the web.xml, an exception was thrown. After I delete it, things look fine. So I guess maybe is the trouble maker. Then what is the problem and what should I do to fix it?
Here is the outline of that error. Please help me. It is very important to me. Thanks a lot!!
HTTP Status 500 -
--------------------------------------------------------------------------------
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: setAttribute: Non-serializable attribute
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:512)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:395)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
InputValidationFilter.doFilter(InputValidationFilter.java:54)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
root cause
java.lang.IllegalArgumentException: setAttribute: Non-serializable attribute
org.jboss.web.tomcat.tc5.session.ClusteredSession.setAttribute(ClusteredSession.java:532)
org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:129)
org.apache.jsp.gcsMenu_jsp._jspService(gcsMenu_jsp.java:450)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
InputValidationFilter.doFilter(InputValidationFilter.java:54)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.20 logs.
--------------------------------------------------------------------------------
Apache Tomcat/5.5.20
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4057894#4057894
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4057894
18Â years, 10Â months
[JBoss Seam] - Re: Recommendation for layered architecture???
by cwash
"gavin.king(a)jboss.com" wrote : Well, basically, I think these problem becomes much easier once you stop thinking in terms of "what layers should I have", and start thinking in terms of "what code do I have that is reusable when the client is not JSF, and what code do I have that is not reusable?", and then implement the reusable code into reusable Seam components.
|
| This doesn't stop you from thinking about component dependencies, and about separation of concerns - in fact it makes it easier.
|
| It's my strong belief that conceptualizing reusability in terms of "layers" has been the source of much evil in the Java world. I try to write reusable objects, not reusable layers. But this is not an approach that Seam forces upon you, it is just my approach.
That's an interesting way to look at it. Do you feel you could say the same for loose-coupling, maintainability, scalability, and all of the arguments people give for layering? Perhaps it's hard for people to see that a lot of the old-school layering techniques are done for you under the covers with Seam, and feel like they're taking the "red pill" by not self-imposing their own layers.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4057891#4057891
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4057891
18Â years, 10Â months
[EJB 3.0] - Problem with enum datatype
by imranpariyani
hello
I have a problem with the enum datatye. If i try to get an entity with enum as a field in it every thing works fine the problem occurs when i have a native query with only the enum field ..
for example :
| String query = "SELECT DISTINCT type FROM card WHERE type IS NOT NULL ORDER BY type";
| return this.manager.createNativeQuery(query.toString()).getResultList();
as output instead of the enum string i get only the first character .. here is the debug output of jboss
| 2007-06-26 22:10:57,267 DEBUG [org.hibernate.SQL] SELECT DISTINCT type FROM card WHERE type IS NOT NULL ORDER BY type
| 2007-06-26 22:10:57,316 TRACE [org.hibernate.type.CharacterType] returning 'M' as column: type
| 2007-06-26 22:10:57,316 TRACE [org.hibernate.type.CharacterType] returning 'V' as column: type
| 2007-06-26 22:10:57,317 TRACE [org.hibernate.type.CharacterType] returning 'E' as column: type
| 2007-06-26 22:10:57,318 TRACE [org.hibernate.type.CharacterType] returning 'N' as column: type
|
the question is why does it map the enum datatype of mysql to charactertype instead of string ..
It sounds like a silly question but as i am new to ejb3 i had no other option but to ask :)
Awaiting response ..
thanks
Imran
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4057889#4057889
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4057889
18Â years, 10Â months