[JBoss Seam] - Re: Integrating Seam and Trinidad
by jarkko@jab.fi
There seems to be a known incompatability issue with Myfaces and Trinidad when using TR in portlets.
http://issues.apache.org/jira/browse/MYFACES-1383
anonymous wrote :
| Caused by: java.lang.ClassCastException: org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$CacheRenderKit
| at org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGenericPortlet.java:387)
| ... 140 more
| Nested Exception is
| java.lang.ClassCastException: org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$CacheRenderKit
| at org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGenericPortlet.java:387)
| at org.apache.myfaces.portlet.MyFacesGenericPortlet.doView(MyFacesGenericPortlet.java:265)
| at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:235)
| at javax.portlet.GenericPortlet.render(GenericPortlet.java:163)
| at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:89)
| 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.doInclude(ApplicationDispatcher.java:574)
| at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
| at com.liferay.portlet.CachePortlet._invoke(CachePortlet.java:295)
| at com.liferay.portlet.CachePortlet.render(CachePortlet.java:155)
| at org.apache.jsp.html.portal.render_005fportlet_jsp._jspService(render_005fportlet_jsp.java:708)
| 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)
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3973702#3973702
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973702
19 years, 7 months
[Security & JAAS/JBoss] - Can't get access right from Java Client
by jmcollin92
I'm sorry to ask this question another time but I read all documentation and FAQ and I can't get my java client access to my EJB.
I'm on this pb for 3 days, and I had to make it works.
Thank's for your help.
Environnemt : Jboss4.0.1.SP1 and I try with 4.0.4.GA without success.
Here are some piece of code :
In the client :
| System.setProperty("java.security.auth.login.config", "file://path/to/auth.conf");
| Hashtable env = new Hashtable();
| env.put(Context.INITIAL_CONTEXT_FACTORY,"org.jboss.security.jndi.LoginInitialContextFactory");
| env.put(Context.URL_PKG_PREFIXES,"org.jboss.naming:org.jnp.interfaces");
| env.put(Context.PROVIDER_URL, "jnp://localhost:1099");
| env.put(Context.SECURITY_CREDENTIALS,"root");
| env.put(Context.SECURITY_PRINCIPAL,"root");
| env.put(Context.SECURITY_PROTOCOL,"CPIProject");
|
| javax.naming.InitialContext initialContext = new javax.naming.InitialContext(env);
|
| Object objRef = initialContext.lookup(jndiName);
|
| MyHome home = javax.rmi.PortableRemoteObject.narrow(objRef, MyHome.class);
|
| /* It's fails at the next line !! */
| MyBean bean = home.create();
| ...
|
The auth.conf is :
| CPIProject {
| org.jboss.security.ClientLoginModule required
| password-stacking="useFirstPass"
| ;
| };
|
The login-config.xml is :
| <application-policy name="CPIProject">
| <authentication>
| <login-module code="org.jboss.security.ClientLoginModule" flag="required"/>
| <login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule" flag="required">
| <module-option name="unauthenticatedIdentity">guest</module-option>
| <module-option name="dsJndiName">java:/CPIDS</module-option>
| <module-option name="principalsQuery">Select PASSWORD from COLLABORATEUR where LOGIN=?</module-option>
| <module-option name="rolesQuery">Select P.ROLES_FK, 'Roles' from PROFIL P,COLLABORATEUR C where C.LOGIN=? AND C.ID=COLLABORATEURS_FK</module-option>
| </login-module>
| </authentication>
| </application-policy>
|
The debug security trace in server.log :
| 2006-09-23 10:45:44,671 TRACE [org.jboss.security.plugins.JaasSecurityManager.CPIProject] Begin isValid, principal:, cache info: null
| 2006-09-23 10:45:44,671 TRACE [org.jboss.security.plugins.JaasSecurityManager.CPIProject] defaultLogin, principal=
| 2006-09-23 10:45:44,671 TRACE [org.jboss.security.auth.login.XMLLoginConfigImpl] Begin getAppConfigurationEntry(CPIProject), size=9
| 2006-09-23 10:45:44,671 TRACE [org.jboss.security.auth.login.XMLLoginConfigImpl] End getAppConfigurationEntry(CPIProject), authInfo=AppConfigurationEntry[]:
| [0]
| LoginModule Class: org.jboss.security.ClientLoginModule
| ControlFlag: LoginModuleControlFlag : required
| Options:[1]
| LoginModule Class: org.jboss.security.auth.spi.DatabaseServerLoginModule
| ControlFlag: LoginModuleControlFlag : required
| Options:name=rolesQuery, value=Select P.ROLES_FK, 'Roles' from PROFIL P,COLLABORATEUR C where C.LOGIN=? AND C.ID=COLLABORATEURS_FK
| name=principalsQuery, value=Select PASSWORD from COLLABORATEUR where LOGIN=?
| name=unauthenticatedIdentity, value=guest
| name=dsJndiName, value=java:/CPIDS
|
| 2006-09-23 10:45:44,671 TRACE [org.jboss.security.ClientLoginModule] Begin login
| 2006-09-23 10:45:44,671 TRACE [org.jboss.security.ClientLoginModule] Obtained login: , credential.class: null
| 2006-09-23 10:45:44,671 TRACE [org.jboss.security.ClientLoginModule] End login
| 2006-09-23 10:45:44,671 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] initialize, instance=@4626217
| 2006-09-23 10:45:44,671 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] Saw unauthenticatedIdentity=guest
| 2006-09-23 10:45:44,671 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] DatabaseServerLoginModule, dsJndiName=java:/CPIDS
| 2006-09-23 10:45:44,671 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] principalsQuery=Select PASSWORD from COLLABORATEUR where LOGIN=?
| 2006-09-23 10:45:44,671 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] rolesQuery=Select P.ROLES_FK, 'Roles' from PROFIL P,COLLABORATEUR C where C.LOGIN=? AND C.ID=COLLABORATEURS_FK
| 2006-09-23 10:45:44,671 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] suspendResume=true
| 2006-09-23 10:45:44,671 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] login
| 2006-09-23 10:45:44,671 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] suspendAnyTransaction
| 2006-09-23 10:45:44,671 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] Excuting query: Select PASSWORD from COLLABORATEUR where LOGIN=?, with username:
| 2006-09-23 10:45:44,671 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] Query returned no matches from db
| 2006-09-23 10:45:44,671 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] resumeAnyTransaction
| 2006-09-23 10:45:44,671 TRACE [org.jboss.security.ClientLoginModule] abort
| 2006-09-23 10:45:44,671 TRACE [org.jboss.security.SecurityAssociation] clear, server=true
| 2006-09-23 10:45:44,671 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] abort
| 2006-09-23 10:45:44,671 TRACE [org.jboss.security.plugins.JaasSecurityManager.CPIProject] Login failure
| javax.security.auth.login.FailedLoginException: No matching username found in Principals
| at org.jboss.security.auth.spi.DatabaseServerLoginModule.getUsersPassword(DatabaseServerLoginModule.java:152)
|
We can see that the Principal is empty !
The security informations seems to be not propagating from Client to Server.
The FAQ says "put a ClientLoginModule". I've done this without sucess.
For information, authentication is all right from a struts web app.
What goes wrong ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3973696#3973696
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973696
19 years, 7 months
[Beginners Corner] - Compile the tutorial examples
by zetzioni
Hi,
I installed JBoss, downloaded the examples (both sun tutorial and JBoss), set the jboss.home to the correct value, and JAVA_HOME to the correct value. I'm getting the following errors in compilation:
compile:
[javac] Compiling 5 source files to C:\jboss-4.0.4.GA\j2ee14\examples\bank\b
uild
[javac] C:\jboss-4.0.4.GA\j2ee14\examples\bank\src\com\jboss\ebank\TellerBea
n.java:16: package com.sun.ebank.ejb.account does not exist
[javac] import com.sun.ebank.ejb.account.AccountController;
[javac] ^
[javac] C:\jboss-4.0.4.GA\j2ee14\examples\bank\src\com\jboss\ebank\TellerBea
n.java:17: package com.sun.ebank.ejb.account does not exist
[javac] import com.sun.ebank.ejb.account.AccountControllerHome;
[javac] ^
[javac] C:\jboss-4.0.4.GA\j2ee14\examples\bank\src\com\jboss\ebank\TellerBea
n.java:18: package com.sun.ebank.util does not exist
[javac] import com.sun.ebank.util.AccountDetails;
[javac] ^
[javac] C:\jboss-4.0.4.GA\j2ee14\examples\bank\src\com\jboss\ebank\TellerBea
n.java:26: cannot find symbol
[javac] symbol : class AccountController
[javac] location: class com.jboss.ebank.TellerBean
[javac] private AccountController getController()
[javac] ^
[javac] C:\jboss-4.0.4.GA\j2ee14\examples\bank\src\com\jboss\ebank\web\Custo
merHackFilter.java:5: package com.sun.ebank.util does not exist
[javac] import com.sun.ebank.util.Debug;
[javac] ^
[javac] C:\jboss-4.0.4.GA\j2ee14\examples\bank\src\com\jboss\ebank\web\Custo
merHackFilter.java:6: package com.sun.ebank.web does not exist
[javac] import com.sun.ebank.web.*;
[javac] ^
[javac] C:\jboss-4.0.4.GA\j2ee14\examples\bank\src\com\jboss\ebank\TellerBea
n.java:32: cannot find symbol
[javac] symbol : class AccountControllerHome
[javac] location: class com.jboss.ebank.TellerBean
[javac] AccountControllerHome home = (AccountControllerHome)
[javac] ^
[javac] C:\jboss-4.0.4.GA\j2ee14\examples\bank\src\com\jboss\ebank\TellerBea
n.java:32: cannot find symbol
[javac] symbol : class AccountControllerHome
[javac] location: class com.jboss.ebank.TellerBean
[javac] AccountControllerHome home = (AccountControllerHome)
[javac] ^
[javac] C:\jboss-4.0.4.GA\j2ee14\examples\bank\src\com\jboss\ebank\TellerBea
n.java:40: cannot find symbol
[javac] symbol : class AccountController
[javac] location: class com.jboss.ebank.TellerBean
[javac] AccountController mgr = getController();
[javac] ^
[javac] C:\jboss-4.0.4.GA\j2ee14\examples\bank\src\com\jboss\ebank\TellerBea
n.java:41: cannot find symbol
[javac] symbol : class AccountDetails
[javac] location: class com.jboss.ebank.TellerBean
[javac] AccountDetails details = mgr.getDetails(accountID);
[javac] ^
[javac] C:\jboss-4.0.4.GA\j2ee14\examples\bank\src\com\jboss\ebank\TellerBea
n.java:53: cannot find symbol
[javac] symbol : class AccountController
[javac] location: class com.jboss.ebank.TellerBean
[javac] AccountController mgr = getController();
[javac] ^
[javac] C:\jboss-4.0.4.GA\j2ee14\examples\bank\src\com\jboss\ebank\TellerBea
n.java:60: cannot find symbol
[javac] symbol : class AccountDetails
[javac] location: class com.jboss.ebank.TellerBean
[javac] AccountDetails details = (AccountDetails) it_list.next()
;
[javac] ^
[javac] C:\jboss-4.0.4.GA\j2ee14\examples\bank\src\com\jboss\ebank\TellerBea
n.java:60: cannot find symbol
[javac] symbol : class AccountDetails
[javac] location: class com.jboss.ebank.TellerBean
[javac] AccountDetails details = (AccountDetails) it_list.next()
;
[javac] ^
[javac] C:\jboss-4.0.4.GA\j2ee14\examples\bank\src\com\jboss\ebank\web\Custo
merHackFilter.java:40: cannot find symbol
[javac] symbol : class BeanManager
[javac] location: class com.jboss.ebank.web.CustomerHackFilter
[javac] BeanManager beanManager =
[javac] ^
[javac] C:\jboss-4.0.4.GA\j2ee14\examples\bank\src\com\jboss\ebank\web\Custo
merHackFilter.java:41: cannot find symbol
[javac] symbol : class BeanManager
[javac] location: class com.jboss.ebank.web.CustomerHackFilter
[javac] (BeanManager) session.getAttribute("beanManager");
[javac] ^
[javac] C:\jboss-4.0.4.GA\j2ee14\examples\bank\src\com\jboss\ebank\web\Custo
merHackFilter.java:44: cannot find symbol
[javac] symbol : variable Debug
[javac] location: class com.jboss.ebank.web.CustomerHackFilter
[javac] Debug.print("hack - Creating bean manager.");
[javac] ^
[javac] C:\jboss-4.0.4.GA\j2ee14\examples\bank\src\com\jboss\ebank\web\Custo
merHackFilter.java:45: cannot find symbol
[javac] symbol : class BeanManager
[javac] location: class com.jboss.ebank.web.CustomerHackFilter
[javac] beanManager = new BeanManager();
[javac] ^
[javac] C:\jboss-4.0.4.GA\j2ee14\examples\bank\src\com\jboss\ebank\web\Custo
merHackFilter.java:49: cannot find symbol
[javac] symbol : class CustomerBean
[javac] location: class com.jboss.ebank.web.CustomerHackFilter
[javac] CustomerBean customerBean = new CustomerBean();
[javac] ^
[javac] C:\jboss-4.0.4.GA\j2ee14\examples\bank\src\com\jboss\ebank\web\Custo
merHackFilter.java:49: cannot find symbol
[javac] symbol : class CustomerBean
[javac] location: class com.jboss.ebank.web.CustomerHackFilter
[javac] CustomerBean customerBean = new CustomerBean();
[javac] ^
[javac] C:\jboss-4.0.4.GA\j2ee14\examples\bank\src\com\jboss\ebank\web\Custo
merHackFilter.java:52: cannot find symbol
[javac] symbol : variable Debug
[javac] location: class com.jboss.ebank.web.CustomerHackFilter
[javac] Debug.print("hack - added customerBean to request");
[javac] ^
[javac] 20 errors
BUILD FAILED
C:\jboss-4.0.4.GA\j2ee14\examples\bank\jboss-build.xml:44: Compile failed; see the compiler error output for details.
I guess I'm doing something real wrong... can anybody point what this thing is?
Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3973695#3973695
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973695
19 years, 7 months