aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes problem of using EJB + spring with Sun App Server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "problem of using EJB + spring with Sun App Server" Watch "problem of using EJB + spring with Sun App Server" New topic
Author

problem of using EJB + spring with Sun App Server

damayanti kulkarni
Greenhorn

Joined: Jan 23, 2005
Posts: 3
I am trying to establish an application with stand-alone Client communicating with EJBs deployed on Sun Java System Application Server8.1.However i am using only stateless session bean acting as a Facade whereas actual DB communication is managed by a Hibernate+Spring Layer.

Whenever I am executing the same application with JBoss it works quite well however when i am executing the application with Sun App Server it gives a stack trace saying....

Caused by: java.lang.ExceptionInInitializerError
at net.sf.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:167)
at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:215)
at net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java:145)
at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:117)
at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:108)
at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:104)
at net.sf.hibernate.impl.SessionFactoryImpl.<clinit>(SessionFactoryImpl.java:237)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:805)
at org.springframework.orm.hibernate.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:436)
at org.springframework.orm.hibernate.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:374)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:801)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:249)
... 43 more
Caused by: java.security.AccessControlException: access denied (java.lang.RuntimePermission getProtectionDomain)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
at java.security.AccessController.checkPermission(AccessController.java:401)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
at java.lang.Class.getProtectionDomain(Class.java:1384)
at net.sf.cglib.core.ReflectUtils$1.run(ReflectUtils.java:42)
at java.security.AccessController.doPrivileged(Native Method)
at net.sf.cglib.core.ReflectUtils.<clinit>(ReflectUtils.java:40)
... 56 more
|#]


I do get the following message logged in the file....

Configuring ehcache from ehcache-failsafe.xml found in the classpath:file:/E:/Sun/AppServer/domains/domain1/applications/j2ee-modules/torinoSample/ehcache-failsafe.xml

But I have ehcache.jar file in classpath and it contains the ehcache-failsafe.xml file.
 
 
subject: problem of using EJB + spring with Sun App Server