Thanks Chad! I will try it.
Another question: Can you give me a short instruction how do I can bound the login page into the application? Do I have to model that? Is there a defined usecase for that? Or do I have to merge it as action? I wanna use a rdbms realm. Oemer Am 28 Jan 2005 um 7:20 hat Chad Brandon geschrieben: > I know what the problem is, I'm setting the principal so that the Spring > POJO services have access to the principal, however I'm doing it even when > security is turned off (which causes the exception below since you aren't > logging into your application). I'll add the check for security before > setting this. To fix this yourself (until you get the fix from CVS), you > can add the check for security around this code (this is in the > templates/spring/ejb/SpringSessionBean.vsl (the part to add is the check for > $ejbSecurityEnabled) > > #if ($ejbSecurityEnabled) > #set ($principalStoreClassName = "${principalStoreName}") > #if($stringUtils.isNotEmpty($springTypesPackage)) > #set ($principalStoreClassName = > "${springTypesPackage}.${principalStoreClassName}") > #end > > ${principalStoreClassName}.set(super.getSessionContext().getCallerPrincipal( > )); > #end > > ________________________________________ > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Friday, January 28, 2005 12:46 AM > To: Chad Brandon > Subject: RE: [Andromda-user] o security context set > > Here is my trace. Exceptions are bold. > > Do I have to set an EntityContext null? > > > thx > ___________________________________________________________________ > > 08:35:32,575 INFO [ubaDS] Bound connection factory for resource adapter for > Con > nectionManager 'jboss.jca:service=LocalTxCM,name=ubaDS to JNDI name > 'java:/ubaDS > ' > 08:36:14,736 INFO [TilesRequestProcessor] Tiles definition factory found > for re > quest processor ''. > 08:37:26,028 INFO [XmlBeanDefinitionReader] Loading XML bean definitions > from U > RL > [jar:file:/C:/jboss/server/default/tmp/deploy/tmp15914uba-app-0.1.ear-conten > t > s/uba-core-0.1.jar!/beanRefFactory.xml] > 08:37:26,078 INFO [ClassPathXmlApplicationContext] Bean factory for > application > context > [org.springframework.context.support.ClassPathXmlApplicationContext;has > hCode=13577225]: > org.springframework.beans.factory.support.DefaultListableBeanFa > ctory defining beans [beanRefFactory]; root of BeanFactory hierarchy > 08:37:26,098 INFO [ClassPathXmlApplicationContext] 1 beans defined in > applicati > on context > [org.springframework.context.support.ClassPathXmlApplicationContext;h > ashCode=13577225] > 08:37:26,118 INFO [ClassPathXmlApplicationContext] Unable to locate > MessageSour > ce with name 'messageSource': using default > [org.springframework.context.support > .StaticMessageSource: {}] > 08:37:26,118 INFO [ClassPathXmlApplicationContext] Unable to locate > Application > EventMulticaster with name 'applicationEventMulticaster': using default > [org.spr > [EMAIL PROTECTED] > 08:37:26,118 INFO [ClassPathXmlApplicationContext] Refreshing listeners > 08:37:26,118 INFO [DefaultListableBeanFactory] Pre-instantiating singletons > in > factory > [org.springframework.beans.factory.support.DefaultListableBeanFactory de > fining beans [beanRefFactory]; root of BeanFactory hierarchy] > 08:37:26,118 INFO [DefaultListableBeanFactory] Creating shared instance of > sing > leton bean 'beanRefFactory' > 08:37:27,030 INFO [XmlBeanDefinitionReader] Loading XML bean definitions > from c > lass path resource [applicationContext.xml] > 08:37:27,160 INFO [ClassPathXmlApplicationContext] Bean factory for > application > context > [org.springframework.context.support.ClassPathXmlApplicationContext;has > hCode=12920029]: > org.springframework.beans.factory.support.DefaultListableBeanFa > ctory defining beans > [messageSource,dataSource,sessionFactory,hibernateIntercept > or,customerDao,customerDaoTarget,customerServiceTarget,customerService]; > root of > BeanFactory hierarchy > 08:37:27,160 INFO [ClassPathXmlApplicationContext] 8 beans defined in > applicati > on context > [org.springframework.context.support.ClassPathXmlApplicationContext;h > ashCode=12920029] > 08:37:27,160 INFO [DefaultListableBeanFactory] Creating shared instance of > sing > leton bean 'messageSource' > 08:37:27,180 INFO [ClassPathXmlApplicationContext] Using MessageSource > [org.spr > ingframework.context.support.ResourceBundleMessageSource: > basenames=[messages]] > 08:37:27,180 INFO [ClassPathXmlApplicationContext] Unable to locate > Application > EventMulticaster with name 'applicationEventMulticaster': using default > [org.spr > [EMAIL PROTECTED] > 08:37:27,180 INFO [ClassPathXmlApplicationContext] Refreshing listeners > 08:37:27,180 INFO [DefaultListableBeanFactory] Pre-instantiating singletons > in > factory > [org.springframework.beans.factory.support.DefaultListableBeanFactory de > fining beans > [messageSource,dataSource,sessionFactory,hibernateInterceptor,custo > merDao,customerDaoTarget,customerServiceTarget,customerService]; root of > BeanFac > tory hierarchy] > 08:37:27,180 INFO [DefaultListableBeanFactory] Creating shared instance of > sing > leton bean 'dataSource' > 08:37:27,220 INFO [JndiObjectFactoryBean] Located object with JNDI name > [java:/ > ubaDS]: [EMAIL PROTECTED] > 08:37:27,220 INFO [DefaultListableBeanFactory] Creating shared instance of > sing > leton bean 'sessionFactory' > 08:37:27,260 INFO [Environment] Hibernate 2.1.7 > 08:37:27,270 INFO [Environment] hibernate.properties not found > 08:37:27,270 INFO [Environment] using CGLIB reflection optimizer > 08:37:27,270 INFO [Environment] using JDK 1.4 java.sql.Timestamp handling > 08:37:27,430 INFO [Binder] Mapping class: org.uba.customers.CustomerImpl -> > CUS > TOMER > 08:37:27,570 INFO [LocalSessionFactoryBean] Building new Hibernate > SessionFacto > ry > 08:37:27,570 INFO [Configuration] processing one-to-many association > mappings > 08:37:27,570 INFO [Configuration] processing one-to-one association > property re > ferences > 08:37:27,570 INFO [Configuration] processing foreign key constraints > 08:37:27,610 INFO [Dialect] Using dialect: > net.sf.hibernate.dialect.PostgreSQLD > ialect > 08:37:27,630 INFO [SettingsFactory] Use outer join fetching: true > 08:37:27,640 INFO [ConnectionProviderFactory] Initializing connection > provider: > org.springframework.orm.hibernate.LocalDataSourceConnectionProvider > 08:37:27,650 INFO [TransactionManagerLookupFactory] No > TransactionManagerLookup > configured (in JTA environment, use of process level read-write cache is not > re > commended) > 08:37:30,745 INFO [SettingsFactory] Use scrollable result sets: true > 08:37:30,745 INFO [SettingsFactory] Use JDBC3 getGeneratedKeys(): false > 08:37:30,745 INFO [SettingsFactory] Optimize cache for minimal puts: false > 08:37:30,745 INFO [SettingsFactory] echoing all SQL to stdout > 08:37:30,745 INFO [SettingsFactory] Query language substitutions: {} > 08:37:30,745 INFO [SettingsFactory] cache provider: > net.sf.hibernate.cache.EhCa > cheProvider > 08:37:30,755 INFO [Configuration] instantiating and configuring caches > 08:37:31,426 INFO [SessionFactoryImpl] building session factory > 08:37:31,796 INFO [SessionFactoryObjectFactory] Not binding factory to > JNDI, no > JNDI name configured > 08:37:31,796 INFO [DefaultListableBeanFactory] Creating shared instance of > sing > leton bean 'hibernateInterceptor' > 08:37:31,907 INFO [XmlBeanDefinitionReader] Loading XML bean definitions > from c > lass path resource [org/springframework/jdbc/support/sql-error-codes.xml] > 08:37:31,917 INFO [XmlBeanFactory] Creating shared instance of singleton > bean ' > DB2' > 08:37:31,927 INFO [XmlBeanFactory] Creating shared instance of singleton > bean ' > HSQL' > 08:37:31,927 INFO [XmlBeanFactory] Creating shared instance of singleton > bean ' > MS-SQL' > 08:37:31,927 INFO [XmlBeanFactory] Creating shared instance of singleton > bean ' > MySQL' > 08:37:31,937 INFO [XmlBeanFactory] Creating shared instance of singleton > bean ' > Oracle' > 08:37:31,937 INFO [XmlBeanFactory] Creating shared instance of singleton > bean ' > Informix' > 08:37:31,937 INFO [XmlBeanFactory] Creating shared instance of singleton > bean ' > PostgreSQL' > 08:37:31,937 INFO [XmlBeanFactory] Creating shared instance of singleton > bean ' > Sybase' > 08:37:31,947 INFO [SQLErrorCodesFactory] SQLErrorCodes loaded: [HSQL > Database E > ngine, Oracle, Sybase SQL Server, Informix Dynamic Server, Microsoft SQL > Server, > PostgreSQL, MySQL, DB2*] > 08:37:31,967 INFO [DefaultListableBeanFactory] Creating shared instance of > sing > leton bean 'customerDao' > 08:37:31,987 INFO [CollectionFactory] Using JDK 1.4 collections > 08:37:32,027 INFO [DefaultListableBeanFactory] Creating shared instance of > sing > leton bean 'customerDaoTarget' > 08:37:32,127 INFO [DefaultListableBeanFactory] Creating shared instance of > sing > leton bean 'customerServiceTarget' > 08:37:32,127 INFO [DefaultListableBeanFactory] Creating shared instance of > sing > leton bean 'customerService' > 08:37:32,167 INFO [DefaultListableBeanFactory] Bean 'beanRefFactory' > instantiat > ed via constructor [public > org.springframework.context.support.ClassPathXmlAppli > cationContext(java.lang.String[]) throws > org.springframework.beans.BeansExceptio > n] > 08:37:32,177 INFO [ClassPathXmlApplicationContext] Closing application > context > [org.springframework.context.support.ClassPathXmlApplicationContext;hashCode > =135 > 77225] > 08:37:32,177 INFO [DefaultListableBeanFactory] Destroying singletons in > factory > {org.springframework.beans.factory.support.DefaultListableBeanFactory > defining > beans [beanRefFactory]; root of BeanFactory hierarchy} > 08:37:32,177 INFO [DefaultListableBeanFactory] Destroying inner beans in > factor > y {org.springframework.beans.factory.support.DefaultListableBeanFactory > defining > beans [beanRefFactory]; root of BeanFactory hierarchy} > 08:37:32,177 ERROR [LogInterceptor] RuntimeException: > java.lang.IllegalStateException: No security context set > at > org.jboss.ejb.EnterpriseContext$EJBContextImpl.getCallerPrincipal(Ent > erpriseContext.java:276) > at > org.uba.customers.ejb.CustomerServiceBean.createCustomer(CustomerServ > iceBean.java:23) > > > > ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Andromda-user mailing list Andromda-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/andromda-user