This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
I have deployed a WAR file which contains Servlet accessing the entity bean....
This is the exception i get...
java.security.AccessControlException: access denied (java.io.FilePermission G:\j
at org.jboss.virtual.plugins.context.file.FileHandler.exists(FileHandler .java:140)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor .java:908)
Have you checked that the file mentioned exists? Have you checked the security settings for that file? (What exact version and variant of Windows are you using? Example: XP Professional) This error means that the account used to run JBoss AS does not have sufficient permission to open and read that file (if it exists).
Are you running JBoss AS under a security manager?
Are you using EJB 2.1 or 3? If 2.1, why not 3? I very strongly recommend using 3 for any new apps. It's been ages since I did anything with 2.1.
How simple is your EJB? Does it do anything with a database? If it does, then t think that the issue is that you are attempting to do too much at one time (this opinion is based on your other post that says you are new to JBoss AS). I recommend starting off with a simple "hello" EJB and a simple servlet that calls it. You could change your existing EJB to not do any persistence and return a hard-coded string for the getPhone() method. Once you have that working correctly, you can add in more and more of your existing code, which will hopefully narrow down the problem.
I have never had to provide an RMI security manager for a servlet accessing an EJB. I have seen RMI security-related errors from stand-alone clients, but those issues were always solved by providing the necessary client JAR files in the client's classpath.
Hi..... Its perfectly working now... What the mistake i have done is i separately deployed war file and jar file (contains EJB Comp) . So it was not working since no link between these two Components.
When i deployed as an EAR file linking together, i got it working... Really nice working in JBOSS... I learn something core things from JBOSS... Most configs has to be done manually which gives a very good scope of learning behind the screen concepts...