[JBoss Seam] - NotSerializableException on JSF rendering (scope Page)
by gonzalad
Hello,
I'm just beginning development with Seam.
I'm trying to build a CRUD application based on the booking sample.
I've a JSF page showing a list backed by an ActionList bean.
When I use session scope for this bean, the page renders fine.
When I use page scope for this bean, seam exception page shows with the following stack Trace.
Has anyone experienced this error ?
java.io.NotSerializableException: java.lang.ThreadLocal
javax.faces.FacesException: java.io.NotSerializableException: java.lang.ThreadLocal
at org.apache.myfaces.shared_impl.util.StateUtils.getAsByteArray(StateUtils.java:190)
at org.apache.myfaces.shared_impl.util.StateUtils.construct(StateUtils.java:150)
at org.apache.myfaces.renderkit.html.HtmlResponseStateManager.writeState(HtmlResponseStateManager.java:102)
at org.apache.myfaces.application.jsp.JspStateManagerImpl.writeState(JspStateManagerImpl.java:430)
at org.ajax4jsf.framework.ajax.AjaxStateManager.writeState(AjaxStateManager.java:91)
at org.jboss.seam.jsf.SeamStateManager.writeState(SeamStateManager.java:66)
at org.ajax4jsf.framework.ajax.AjaxStateManager.writeState(AjaxStateManager.java:91)
at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:599)
at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:101)
at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:222)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:907)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:46)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:32)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:75)
at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:213)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:701)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:646)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:475)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:92)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:744)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:93)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:274)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510)
Caused by: java.io.NotSerializableException: java.lang.ThreadLocal
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1108)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1462)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1434)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1377)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1106)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:324)
at java.util.ArrayList.writeObject(ArrayList.java:595)
at sun.reflect.GeneratedMethodAccessor3547.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:972)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1426)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1377)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1106)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1462)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1434)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1377)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1106)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:324)
at java.util.HashMap.writeObject(HashMap.java:1040)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:972)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1426)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1377)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1106)
at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1102)
at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1102)
at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1102)
at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1102)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:324)
at org.apache.myfaces.shared_impl.util.StateUtils.getAsByteArray(StateUtils.java:180)
... 46 more
Here is the bean code :
package org.pag.seam.example.employe;
|
| import java.io.Serializable;
| import java.util.List;
|
| import org.hibernate.Session;
| import org.jboss.seam.ScopeType;
| import org.jboss.seam.annotations.Factory;
| import org.jboss.seam.annotations.In;
| import org.jboss.seam.annotations.Logger;
| import org.jboss.seam.annotations.Name;
| import org.jboss.seam.annotations.Out;
| import org.jboss.seam.annotations.Scope;
| import org.jboss.seam.annotations.datamodel.DataModel;
| import org.jboss.seam.annotations.datamodel.DataModelSelection;
| import org.jboss.seam.example.hibernate.Hotel;
| import org.jboss.seam.log.Log;
|
|
| @Name("employeListAction")
| @Scope(ScopeType.PAGE)
| public class EmployeListAction implements Serializable {
| private static final long serialVersionUID = -7659479980987467214L;
|
| @DataModel
| private transient List<Employe> employeList;
|
| @In
| private transient Session bookingDatabase;
| private int pageSize = 10;
| private int page = 0;
| private boolean nextPageAvailable = false;
|
| @Logger
| private transient Log log;
| private String searchString = null;
|
| public EmployeListAction () {
| System.out.println("EmployeManagerAction.new() : "+this);
| }
|
| public String getSearchString() {
| return searchString;
| }
|
| public void setSearchString(String aSearchString) {
| searchString = aSearchString;
| }
|
| public void find () {
| page = 0;
| queryEmployes ();
| }
|
| public int getPage() {
| return page;
| }
|
| public void setPage(int page) {
| this.page = page;
| }
|
| private void queryEmployes() {
|
| log.info ("queryEmploye - employeManager=#{employeManager}, employes=#{employes}, page=#{employeListAction.page}");
| String findPattern = searchString==null ? "%" : '%' + searchString.toLowerCase().replace('*', '%') + '%';
| employeList = (List<Employe>) bookingDatabase.createQuery("select e from Employe e where lower(e.name) like :find")
| .setParameter("find", findPattern)
| .setMaxResults(pageSize)
| .setFirstResult( page * pageSize )
| .list();
| }
|
| public void nextPage()
| {
| page++;
| queryEmployes();
| }
|
| public boolean isNextPageAvailable()
| {
| return employeList!=null && employeList.size()==pageSize;
| }
|
| public void previousPage()
| {
| page--;
| queryEmployes();
| }
|
| public boolean isPreviousPageAvailable()
| {
| return page>0;
| }
|
| public int getPageSize() {
| return pageSize;
| }
|
| public void setPageSize(int aPageSize) {
| pageSize = aPageSize;
| }
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4012049#4012049
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4012049
19Â years, 2Â months
[JBoss AOP] - Another AOP Deployment Question -- (Sorry about that)
by mjgreene550
I have been running into the same deployment problem for the last day or two now. I'm not sure if it is related to how my deployment is structured or it's a simple configuration step I missed.
My Situation:
-Running JBoss 4.0.5GA
-Using the JBoss AOP tool inside JBoss IDE
-Copied the jboss-aop-jdk50.deployer into my deploy directory (removing the regular jboss-aop.deployer)
-Set EnableLoadTimeWeaving to true
-Added the pluggable-instrumentor.jar to JBOSS_HOME\bin directory
-Added -javaagent:pluggable-instrumentor.jar to my run.bat
-Created a .aop archive that contains only one file META-INF/jboss-aop.xml
-Added the .aop archive to the top of the list in my application.xml file
The server startup is fine with the exception of some exceptions that are not generated from my application:
12:06:02,753 ERROR [STDERR] [warn] AOP Instrumentor failed to transform org.apache.catalina.core.StandardServer
| 12:06:02,753 ERROR [STDERR] org.jboss.aop.instrument.TransformationException: Failed to aspectize class org.apache.catalina.core.StandardSer
| ver. Could not find class it references org.apache.catalina.core.NamingContextListener It may not be in your classpath and you may not be
| getting field and constructor weaving for this class.
| 12:06:02,753 ERROR [STDERR] at org.jboss.aop.instrument.Instrumentor.convertReferences(Instrumentor.java:666)
| 12:06:02,753 ERROR [STDERR] at org.jboss.aop.instrument.Instrumentor.transform(Instrumentor.java:720)
| 12:06:02,753 ERROR [STDERR] at org.jboss.aop.AspectManager.translate(AspectManager.java:908)
| 12:06:02,753 ERROR [STDERR] at org.jboss.aop.AspectManager.transform(AspectManager.java:820)
| 12:06:02,753 ERROR [STDERR] at org.jboss.aop.standalone.AOPTransformer.aspectTransform(AOPTransformer.java:88)
| 12:06:02,753 ERROR [STDERR] at org.jboss.aop.standalone.AOPTransformer.transform(AOPTransformer.java:75)
| 12:06:02,753 ERROR [STDERR] at sun.instrument.TransformerManager.transform(TransformerManager.java:122)
| 12:06:02,753 ERROR [STDERR] at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:155)
| 12:06:02,753 ERROR [STDERR] at java.lang.ClassLoader.defineClass1(Native Method)
| 12:06:02,753 ERROR [STDERR] at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
When I try to access my application via web browser, I get this exception which doesn't tell me a whole lot:
(Trimmed out the application business exception chain)
| Caused by: java.lang.IllegalArgumentException
| at sun.reflect.UnsafeStaticObjectFieldAccessorImpl.set(UnsafeStaticObjectFieldAccessorImpl.java:61)
| at java.lang.reflect.Field.set(Field.java:656)
| at org.jboss.aop.ClassAdvisor.initializeMethodChain(ClassAdvisor.java:461)
| at org.jboss.aop.ClassAdvisor.createInterceptorChains(ClassAdvisor.java:591)
| at org.jboss.aop.ClassAdvisor.access$300(ClassAdvisor.java:82)
| at org.jboss.aop.ClassAdvisor$1.run(ClassAdvisor.java:299)
| at java.security.AccessController.doPrivileged(Native Method)
| at org.jboss.aop.ClassAdvisor.attachClass(ClassAdvisor.java:271)
| at org.jboss.aop.AspectManager.initialiseClassAdvisor(AspectManager.java:590)
| at org.jboss.aop.AspectManager.getAdvisor(AspectManager.java:578)
| at com.mark.facade.EventManager.<clinit>(EventManager.java)
| ... 33 more
|
The weird thing is, I get this exception without even calling the method that the interceptor is binded to.
Now, if I remove the one and only interceptor from the jboss-aop.xml, and deploy the app, everything works fine. I put the interceptor back into the jboss-aop.xml file, I get the exception stated above.
I'm pretty lost here and would appreciate any insight to this. Thank you in advance.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4012047#4012047
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4012047
19Â years, 2Â months
[Installation, Configuration & Deployment] - Error on JBoss server startup
by srangu
Hi,
I am getting the floowing errors when I am trying to start JBoss applicaton server. We use oracle for persistence.
Has anybody seen this error?
Thanks
Subha
2007-02-06 11:26:25,468 ERROR [org.jboss.deployment.scanner.URLDeploymentScanner] Incomplete Deployment listing:
--- MBeans waiting for other MBeans ---
ObjectName: jboss.ejb:persistencePolicy=database,service=EJBTimerService
State: FAILED
Reason: java.lang.IllegalStateException: Cannot find datasource meta data: jboss.jdbc:datasource=OracleDS,service=metadata
I Depend On:
jboss.jca:name=OracleDS,service=DataSourceBinding
ObjectName: jboss.messaging:service=ServerPeer
State: FAILED
Reason: java.lang.NullPointerException
I Depend On:
jboss.messaging:service=PersistenceManager
jboss.messaging:service=MessageStore
jboss.messaging:service=ChannelMapper
Depends On Me:
jboss.messaging.destination:service=ConnectionFactory
jboss.messaging.destination:name=DLQ,service=Queue
jboss.messaging.destination:name=Queue1,service=Queue
jboss.messaging.destination:name=Queue2,service=Queue
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4012040#4012040
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4012040
19Â years, 2Â months
[JNDI/Naming/Network] - Datasource not correctly bound to JNDI context
by aschulz
Hi,
I'm porting an application from Orion to JBoss. I'm trying to configure the datasource at the same JNDI-names like in Orion (starting with comp/env/jdbc) but I have no success with that. I'm using JBoss [4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)].
I configured the folling datasource:
<local-tx-datasource>
<jndi-name>comp/env/jdbc/bps</jndi-name>
<connection-url>jdbc:oracle:thin:@XYZ</connection-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
...
<exception-sorter-class-name>
org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter
</exception-sorter-class-name>
<type-mapping>Oracle9i</type-mapping>
</local-tx-datasource>
At startup JBoss says:
Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=comp/env/jdbc/bps' to JNDI name 'java:comp/env/jdbc/bps'
When I lookup in the context for that JNDI name I receive the default (hsqldb defaultDS) connection.
If I name the datasource just jdbc/bps everything is working correct. It seems to me that it is not possible to name a datasource beginning with comp/env. Is this correct or a bug?
Some previous posting describe simular problems. This can be a big problem for people porting existing applications to JBoss.
Please, can somebody enlight me.
Tanks in advance.
Alex
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4012034#4012034
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4012034
19Â years, 2Â months
[Tomcat, HTTPD, Servlets & JSP] - Sakai and Jboss with embebed tomcat
by edwinmtriana
Hello
I'm working in a Learning Management System, and I want to try with Sakai, but I work in Jboss and I want to deploy in this application server.
Few day ago I answered a forum in de beginers corner about the deploy on Jboss, nevertheless, I have had some problems when I use the application.
I did the following:
- I download the sakai-bin_2-3-0.tar.gz file.
- Decompress the file
. In the Sakai directory i found:
- common/
- components/
- licenses/
- server/
- shared/
- webapps/
- ECLv1.txt
Now, I put the directories as follows:
- The WAR files in the webapps in JBOSS_HOME/server/default/deploy (only the files, no the directory)
- The "components" dir in JBOSS_HOME/server/default/
- Create a sakai dir in JBOSS_HOME/server/default/
- Copy the sakai properties in the sakai directory
- You can found the sakai.properties file in
| /sakai-src/reference/docs/sakai.properties
- Copy de JARs files of the "common, shared and server" directory in JBOSS_HOME/server/default/lib
Finally, before to start the server you have to set the environment variable JAVA_OPTS as follows:
| export JAVA_OPTS="-server -Xms512m -Xmx768m -XX:PermSize=128m -XX:MaxPermSize=196m -XX:NewSize=192m -XX:MaxNewSize=384
| m"
Beginers Corner forum:
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=100483
Now
I have a problem when a I want to see the "Syllabus"
this is the stacktrace
|
| Technical Details
|
| This information will automatically be included in your bug report.
|
| org.sakaiproject.tool.api.ToolException: Exception in JSP: /syllabus/main.jsp:6
|
| 3: <%@ taglib uri="http://sakaiproject.org/jsf/sakai" prefix="sakai" %>
| 4: <%@ taglib uri="http://sakaiproject.org/jsf/syllabus" prefix="syllabus" %>
| 5: <% response.setContentType("text/html; charset=UTF-8"); %>
| 6:
| 7:
| 8:
| 9:
|
|
| Stacktrace:
| at org.sakaiproject.portal.charon.CharonPortal.forwardTool(CharonPortal.java:1632)
| caused by: org.apache.jasper.JasperException: Exception in JSP: /syllabus/main.jsp:6
|
| 3: <%@ taglib uri="http://sakaiproject.org/jsf/sakai" prefix="sakai" %>
| 4: <%@ taglib uri="http://sakaiproject.org/jsf/syllabus" prefix="syllabus" %>
| 5: <% response.setContentType("text/html; charset=UTF-8"); %>
| 6:
| 7:
| 8:
| 9:
|
|
| Stacktrace:
| at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
| caused by: java.lang.NullPointerException
| at javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:615)
| at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:217)
| at org.apache.myfaces.taglib.core.ViewTag.doStartTag(ViewTag.java:71)
| at org.apache.jsp.syllabus.main_jsp._jspx_meth_f_view_0(main_jsp.java:143)
| at org.apache.jsp.syllabus.main_jsp._jspService(main_jsp.java:120)
| at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
| at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
| at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
| at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
| at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
| at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
| at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
| at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
| at org.sakaiproject.jsf.app.SakaiViewHandler.renderView(SakaiViewHandler.java:137)
| at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
| at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
| at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:501)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
| at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
| at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
| at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
| at org.sakaiproject.tool.syllabus.SyllabusFilePickerServlet.dispatch(SyllabusFilePickerServlet.java:158)
| at org.sakaiproject.jsf.util.JsfTool.doGet(JsfTool.java:241)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:501)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
| at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
| at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:359)
| at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
| at org.sakaiproject.tool.impl.ActiveToolComponent$MyActiveTool.forward(ActiveToolComponent.java:339)
| at org.sakaiproject.portal.charon.CharonPortal.forwardTool(CharonPortal.java:1632)
| at org.sakaiproject.portal.charon.CharonPortal.doTool(CharonPortal.java:1563)
| at org.sakaiproject.portal.charon.CharonPortal.doGet(CharonPortal.java:380)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:532)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Thread.java:595)
|
|
Plase Help Me !!!! ;-(
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4012032#4012032
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4012032
19Â years, 2Â months
[Security & JAAS/JBoss] - Combine FORM and CLIENT-CERT authentication
by lujop
Hello,
In our application we want to try to authenticate users first with a client certificate and if it isn't possible use a typical user/password form.
The problem is that I don't know how to do that in the web.xml because in the <login config> of webm.xml I can only set one auth-method (see at the end).
The documentation says:
anonymous wrote : You can chain together multiple LoginModules to allow for more than one authentication technology to participate in the authentication process. For example, one LoginModule may perform username/password-based authentication, while another may interface to hardware devices such as smart card readers or biometric authenticators.
And its true, I can have multiple loginmodules without problem. But in the web.xml how can I combine certificates with user/password?
Code from web.xml:
| <login-config>
| <auth-method>CLIENT-CERT</auth-method>
| <realm-name>xclinicportal</realm-name>
| <form-login-config>
| <form-login-page>/jsp/login.jsp</form-login-page>
| <form-error-page>/jsp/login.jsp?errorLogin=1</form-error-page>
| </form-login-config>
|
| </login-config>
|
|
A lot of thanks in advance
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4012030#4012030
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4012030
19Â years, 2Â months
[Persistence, JBoss/CMP, Hibernate, Database] - One-to-One Mapping Creates Thousands of Unecessary Queries
by jvandusen
I'm trying to create a simple one-to-one mapping between two tables using Hibernate 2.1.7, but the results are confusing me. What I'm really doing is simply adding a column to an existing table, but for various business reasons beyond my control, I cannot modify the existing table, so I've created a separate table to store the additional column, with the same primary key as the existing table.
My mapping looks something like this (names have been changed to protect the innocent):
| <hibernate-mapping package="com.blah">
| <class name="Foo" table="foo">
| <id name="fooId" type="integer" column="foo_id" >
| <generator class="assigned"/>
| </id>
|
| <one-to-one name="bar" class="Bar" cascade="all" />
|
| <!-- some other columns follow... -->
| </class>
| </hibernate-mapping>
|
| <hibernate-mapping package="com.blah">
| <class name="Bar" table="bar">
| <id name="fooId" type="integer" column="foo_id" >
| <generator class="foreign">
| <param name="property">foo</param>
| </generator>
| </id>
|
| <one-to-one name="foo" class="Foo" constrained="true" />
|
| <!-- the extra columns follow... -->
| </class>
| </hibernate-mapping>
|
I never retrieve a Bar instance. I only ever reference the properties of Bar via Foo's getBar() method. Nevertheless, when I turn on Hibernate's show_sql flag, I get the following query generated 1710 times for each page access:
| 2007-02-06 10:01:23,125 INFO [STDOUT] Hibernate: select bar0_.foo_id as foo_id1_3_, foo1_.foo_id as foo1_0_, from bar bar0_ left outer join foo foo1_ on bar0_.foo_id=foo1_.foo_id where bar0_.foo_id=?
|
I don't know why it's executing that query 1710 times (which is almost, but not quite, the number of rows in the foo table).
Can anyone see anything wrong with my mapping files? Any idea why the query is starting with the bar table and left joining to the foo table, especially considering I never call Bar's getFoo() method (actually, the code I tested that generated the 1710 queries doesn't even call Foo's getBar() method, it merely retrieves a Foo instance)?
Any help is greatly appreciated.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4012026#4012026
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4012026
19Â years, 2Â months