[jboss-user] [Security & JAAS/JBoss] - Re: SecurityAssociaton.getSubject is null

2007-05-07 Thread AbhayaJha
*
***URGENT***
*

Hi ,
Please help at your earliest. Below are the detailed description for tbe above.

We have a two ear deployed in JBoss. One ear contains all EJBs. Second Ear 
contains war file and internally invokes EJBs.

When my system receives (Using MDBs) messages it?s processed perfectly but when 
I am unable to login in web application.

I thought during migration just I can deploy my ear files but I found some 
class loader problems. But when I removed all the EJB client jars from the 
.war/web-inf/lib, It worked. 

But login problem is still there, I believe this problem is due to JAAS/SSL 
configuration.


We have a problem with JAAS in new version of JBoss-4.0.5. The same approach is 
working in JBoss-3.2.3 version.


We are using customized login module and this login module is invoked properly 
and subject is populated

subject.getPrivateCredentials().add(userBean);
logger.info("Adding role '" + userBean.getRole() + "' to 
context");
userRoles.addMember(new SimplePrincipal(userBean.getRole()));

Login module returns true.

But from action class, when we call below code subject is null.
EntryUser user = EISDataHelper().getUser();

signature of getUser is as below:
 public EntryUserBean getUser() throws CustodyException, RemoteException {
Subject subj = SecurityAssociation.getSubject(); //Here subject is 
null(in JBoss-4.0.5.GA), while same code is running in JBoss-3.2.3
 if (subj == null) {
 logger.debug("subject is null");
  return null;
 }
:
:
:
}

Configuration for login module in login-config.xml  is as below :

  
 
  true


  



Configuration for JAAS  in conf/jboss-service.xml  is as below :


  
  
  
jboss.security:service=XMLLoginConfig
  
  
login-config.xml
  
  
  
  

 org.jboss.security.plugins.JaasSecurityDomain
  
  
  
  
  
jboss.security:service=JaasSecurityManager




${jboss.server.home.dir}/ssl/abc.keystore
XYZ


Configuration for SSL  in deploy/jbossweb-tomcat55.sar/server.xml  is as below :

 


Configuration for security domain  in 
deploy/settlement-webapp.ear/settlement-webapp.war/jboss-web.xml is as below :

  java:/jaas/settlement




View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4043629#4043629

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043629
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Security & JAAS/JBoss] - SecurityAssociaton.getSubject is null

2007-04-24 Thread AbhayaJha
Hi,

We are migrating JBoss 3.2.3 to JBoss 4.0.5.GA.
We have configured login-config.xml and jboss-service.xml for JAAS.

configurations  are as below:

anonymous wrote : conf/login-config.xml


  
   
false




anonymous wrote : conf/jboss-service.xml

mbean code="org.jboss.security.plugins.SecurityConfig" 
name="jboss.security:service=SecurityConfig">
jboss.security:service=XMLLoginConfig


login-config.xml





 org.jboss.security.plugins.JaasSecurityDomain
  




jboss.security:service=JaasSecurityManager




anonymous wrote : default\deploy\jbossweb-tomcat55.sar\server.xml

  

 
   



LoginModule is invoked properly but when we try to get the subject 
by SecurityAssociation.getSubject() then subject is null.



View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4040141#4040141

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4040141
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB/JBoss] - Re: Getting ClassCastException during remote EJB call

2007-04-12 Thread AbhayaJha
Hi,

I am calling ejb from a web application which is inside second.ear and ejb 
related files are in .war/WEB-INF/lib directory.

I also tried by changing deploy/ear-deployer.xml and conf/jboss-service.xml as 
callByValue value as true. But still same problem is coming.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4036636#4036636

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4036636
___
jboss-user mailing list
[EMAIL PROTECTED]
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Installation, Configuration & Deployment] - Re: War deployment problem

2007-04-11 Thread AbhayaJha
I got the problem. Problem was log4j.jar was inside my war file. I removed from 
war file. And it worked fine.

Second problem with NOTYETINSTALLED 
--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM --- 
ObjectName: jboss.jca:name='',service=RARDeployment 
State: NOTYETINSTALLED 
Depends On Me: 
jboss.jca:name=JmsXA,service=ManagedConnectionFactory 
jboss.jca:name=EuroNextJDO,service=ManagedConnectionFactory 

ObjectName: jboss.jca:name=OracleDS,service=DataSourceBinding 
State: NOTYETINSTALLED 
Depends On Me: 
jboss.mq:service=PersistenceManager 

Whenever we will define the JNDI name in any -ds.xml file we will have to 
provide connection factory name and .rar  file loader.


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4036338#4036338

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4036338
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB/JBoss] - Getting ClassCastException during remote EJB call

2007-04-11 Thread AbhayaJha
Hi,

I am migrating jboss-3.2.3 to Jboss-4.0.5.GA.

I have two say  first.ear and second.ear files deployed in the same 
JBoss-4.0.5.GA server. When ejb deployed in first.ear is invoked from 
second.ear, ClassCastException is thrown. But for local bean call, it works 
fine. 

Can some body help what is the actual reason for class cast exception?

I tried to debug it out and I found  problem  is at
ejbHome = (EJBHome) PortableRemoteObject.narrow(ref, clazz);

I also inspected ref object it contains the correct home name as we are passing 
as second argument.

StackTrace is as below:
17:23:13,306 DEBUG [ServiceLocatorConfigurator] Looking up for
17:57:56,560 ERROR [STDERR] java.lang.ClassCastException
17:57:56,576 ERROR [STDERR] at 
com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:293)
17:57:56,576 ERROR [STDERR] at 
javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134)
17:57:56,576 ERROR [STDERR] at 
com.db.dcs.model.settlements.ejb.services.locator.impl.ServiceLocatorConfigurator.getEJBHome(ServiceLocatorConfigurator.java:671)
17:57:56,576 ERROR [STDERR] at 
com.db.dcs.model.settlements.ejb.services.locator.impl.ServiceLocatorConfigurator.getEjbProvider(ServiceLocatorConfigurator.java:494)
17:57:56,576 ERROR [STDERR] at 
com.db.dcs.model.settlements.ejb.services.locator.impl.ServiceLocatorConfigurator.createProviderInstance(ServiceLocatorConfigurator.java:374)
17:57:56,591 ERROR [STDERR] at 
com.db.dcs.model.settlements.ejb.services.locator.impl.ServiceLocatorConfigurator.getServiceInstance(ServiceLocatorConfigurator.java:182)
17:57:56,591 ERROR [STDERR] at 
com.db.dcs.model.settlements.ejb.services.locator.impl.SimpleServiceFactoryImpl.getInstance(SimpleServiceFactoryImpl.java:80)
17:57:56,591 ERROR [STDERR] at 
com.db.dcs.model.settlements.ejb.services.locator.impl.SimpleServiceLocatorImpl.getService(SimpleServiceLocatorImpl.java:60)
17:57:56,591 ERROR [STDERR] at 
com.db.dcs.model.settlements.ejb.services.locator.ServiceLocator.getService(ServiceLocator.java:63)
17:57:56,607 ERROR [STDERR] at 
com.db.dcs.model.settlements.jboss.security.LdapDBLoginModule.validatePassword(LdapDBLoginModule.java:217)
17:57:56,607 ERROR [STDERR] at 
org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:210)
17:57:56,607 ERROR [STDERR] at 
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
17:57:56,607 ERROR [STDERR] at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
17:57:56,607 ERROR [STDERR] at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
17:57:56,623 ERROR [STDERR] at 
java.lang.reflect.Method.invoke(Method.java:324)
17:57:56,623 ERROR [STDERR] at 
javax.security.auth.login.LoginContext.invoke(LoginContext.java:675)
17:57:56,623 ERROR [STDERR] at 
javax.security.auth.login.LoginContext.access$000(LoginContext.java:129)
17:57:56,623 ERROR [STDERR] at 
javax.security.auth.login.LoginContext$4.run(LoginContext.java:610)
17:57:56,623 ERROR [STDERR] at 
java.security.AccessController.doPrivileged(Native Method)
17:57:56,623 ERROR [STDERR] at 
javax.security.auth.login.LoginContext.invokeModule(LoginContext.java:607)
17:57:56,638 ERROR [STDERR] at 
javax.security.auth.login.LoginContext.login(LoginContext.java:534)
17:57:56,638 ERROR [STDERR] at 
org.jboss.security.plugins.JaasSecurityManager.defaultLogin(JaasSecurityManager.java:601)
17:57:56,638 ERROR [STDERR] at 
org.jboss.security.plugins.JaasSecurityManager.authenticate(JaasSecurityManager.java:535)
17:57:56,638 ERROR [STDERR] at 
org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityManager.java:344)
17:57:56,638 ERROR [STDERR] at 
org.jboss.web.tomcat.security.JBossSecurityMgrRealm.authenticate(JBossSecurityMgrRealm.java:491)
17:57:56,654 ERROR [STDERR] at 
org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:257)
17:57:56,654 ERROR [STDERR] at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:416)
17:57:56,654 ERROR [STDERR] at 
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
17:57:56,654 ERROR [STDERR] at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
17:57:56,654 ERROR [STDERR] at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
17:57:56,670 ERROR [STDERR] at 
org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
17:57:56,670 ERROR [STDERR] at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
17:57:56,670 ERROR [STDERR] at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
17:57:56,670 ERROR [STDERR] at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
17:57:56,685 E

[jboss-user] [Installation, Configuration & Deployment] - War deployment problem

2007-04-03 Thread AbhayaJha
Hi All,

During deployment of my .war file to the server I got below errors.
I have already added set JAVA_OPTS=%JAVA_OPTS% -Dlog4j.defaultInitOverride=true 
in run.bat file.
Please advise.

10:39:41,984 INFO  [EARDeployer] Init J2EE application: 
file:/D:/jboss-4.0.5.GA/server/default/deploy/settlement_webapp.ear
10:39:46,031 INFO  [TomcatDeployer] deploy, ctxPath=/settlement-admin, 
warUrl=.../tmp/deploy/tmp20798settlement_webapp.ear-contents/settlement_webapp-exp.war/
10:39:46,718 ERROR [STDERR] log4j:ERROR Could not create an Appender. Reported 
error follows.
10:39:46,718 ERROR [STDERR] java.lang.ClassCastException
10:39:46,718 ERROR [STDERR] at 
org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:165)
10:39:46,718 ERROR [STDERR] at 
org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:140)
10:39:46,718 ERROR [STDERR] at 
org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:153)
10:39:46,718 ERROR [STDERR] at 
org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:415)
10:39:46,718 ERROR [STDERR] at 
org.apache.log4j.xml.DOMConfigurator.parseCategory(DOMConfigurator.java:335)
10:39:46,718 ERROR [STDERR] at 
org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:781)
10:39:46,718 ERROR [STDERR] at 
org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:666)
10:39:46,718 ERROR [STDERR] at 
org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:616)
10:39:46,734 ERROR [STDERR] at 
org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:602)
10:39:46,734 ERROR [STDERR] at 
org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:460)
10:39:46,734 ERROR [STDERR] at 
org.apache.log4j.LogManager.(LogManager.java:113)
10:39:46,734 ERROR [STDERR] at 
org.apache.log4j.Logger.getLogger(Logger.java:85)
10:39:46,734 ERROR [STDERR] at 
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
10:39:46,734 ERROR [STDERR] at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
10:39:46,734 ERROR [STDERR] at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
10:39:46,734 ERROR [STDERR] at 
java.lang.reflect.Method.invoke(Method.java:324)
10:39:46,734 ERROR [STDERR] at 
org.apache.commons.logging.impl.Log4jProxy.(Log4jProxy.java:132)
10:39:46,734 ERROR [STDERR] at 
org.apache.commons.logging.impl.Log4JLogger.(Log4JLogger.java:39)
10:39:46,734 ERROR [STDERR] at 
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
10:39:46,734 ERROR [STDERR] at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
10:39:46,734 ERROR [STDERR] at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
10:39:46,734 ERROR [STDERR] at 
java.lang.reflect.Constructor.newInstance(Constructor.java:274)
10:39:46,734 ERROR [STDERR] at 
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
10:39:46,734 ERROR [STDERR] at 
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
10:39:46,734 ERROR [STDERR] at 
org.apache.commons.logging.LogFactory.getLog(LogFactory.java:372)
10:39:46,734 ERROR [STDERR] at 
org.apache.catalina.core.ContainerBase.getLogger(ContainerBase.java:380)
10:39:46,734 ERROR [STDERR] at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4114)
10:39:46,734 ERROR [STDERR] at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
10:39:46,734 ERROR [STDERR] at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
10:39:46,734 ERROR [STDERR] at 
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
10:39:46,734 ERROR [STDERR] at 
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
10:39:46,750 ERROR [STDERR] at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
10:39:46,750 ERROR [STDERR] at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
10:39:46,750 ERROR [STDERR] at 
java.lang.reflect.Method.invoke(Method.java:324)
10:39:46,750 ERROR [STDERR] at 
org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
10:39:46,750 ERROR [STDERR] at 
org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
10:39:46,750 ERROR [STDERR] at 
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
10:39:46,750 ERROR [STDERR] at 
org.apache.catalina.core.StandardContext.init(StandardContext.java:5052)
10:39:46,750 ERROR [STDERR] at 
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
10:39:46,750 ERROR [STDERR] at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
1