Illegal access exception : Eclipse Persistence Localization - java

I'm developing a web application using JPA and Spring MVC, and I get an annoying exception about Eclipse Persistence localization. Here is the stack trace :
mars 09, 2014 2:23:06 PM org.apache.catalina.loader.WebappClassLoader findResourceInternal
Infos: Illegal access: this web application instance has been stopped already. Could not load org/eclipse/persistence/internal/localization/i18n/LoggingLocalizationResource_fr.properties. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
mars 09, 2014 2:23:06 PM org.apache.catalina.loader.WebappClassLoader loadClass
Infos: Illegal access: this web application instance has been stopped already. Could not load org.eclipse.persistence.internal.localization.i18n.LoggingLocalizationResource_fr_FR. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
java.lang.IllegalStateException
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1600)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
at java.util.ResourceBundle$Control.newBundle(ResourceBundle.java:2566)
at java.util.ResourceBundle.loadBundle(ResourceBundle.java:1436)
at java.util.ResourceBundle.findBundle(ResourceBundle.java:1400)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1296)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:795)
at org.eclipse.persistence.internal.localization.EclipseLinkLocalization.buildMessage(EclipseLinkLocalization.java:60)
at org.eclipse.persistence.internal.localization.EclipseLinkLocalization.buildMessage(EclipseLinkLocalization.java:34)
at org.eclipse.persistence.internal.localization.LoggingLocalization.buildMessage(LoggingLocalization.java:25)
at org.eclipse.persistence.logging.AbstractSessionLog.formatMessage(AbstractSessionLog.java:987)
at org.eclipse.persistence.logging.DefaultSessionLog.log(DefaultSessionLog.java:142)
at org.eclipse.persistence.internal.sessions.AbstractSession.log(AbstractSession.java:3480)
at org.eclipse.persistence.internal.sessions.AbstractSession.log(AbstractSession.java:4669)
at org.eclipse.persistence.internal.sessions.AbstractSession.log(AbstractSession.java:4641)
at org.eclipse.persistence.internal.sessions.AbstractSession.log(AbstractSession.java:4617)
at org.eclipse.persistence.internal.sessions.AbstractSession.log(AbstractSession.java:4539)
at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.logout(DatabaseSessionImpl.java:937)
at org.eclipse.persistence.sessions.server.ServerSession.logout(ServerSession.java:776)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.removeSessionFromGlobalSessionManager(EntityManagerSetupImpl.java:511)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.undeploy(EntityManagerSetupImpl.java:2850)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.close(EntityManagerFactoryDelegate.java:267)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.finalize(EntityManagerFactoryDelegate.java:344)
at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:101)
at java.lang.ref.Finalizer.access$100(Finalizer.java:32)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:190)
As I'm new to JPA and Spring MVC, I don't know what causes this exception. Why do I have this exception and how to solve it ? Thanks.

I've setup my Eclipse WTP server to "Automatically publish after a build event". After each automatic publish I've encountered the same error messages as You have shown.
There are two ways to solve this issue.
Turn your Eclipse Server Setting to "Never publish automatically".
Add a Servlet Shutdown Hook, which does close the JPA's EntityManagerFactory explicitly.
You can add a shotdown hook easily to a ServletContextListener. In my case this is a GuiceServletContextListener, but it should be valid for any ServletContextListener.
import javax.persistence.EntityManagerFactory;
import javax.servlet.ServletContextEvent;
import javax.servlet.annotation.WebListener;
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.servlet.GuiceServletContextListener;
#WebListener
public class BmjServletContextListener extends GuiceServletContextListener {
Injector injector;
public void contextDestroyed(ServletContextEvent servletContextEvent) {
injector.getInstance(EntityManagerFactory.class).close(); // <--- POI !!
super.contextDestroyed(servletContextEvent);
}
public void contextInitialized(ServletContextEvent servletContextEvent) {
super.contextInitialized(servletContextEvent);
}
protected Injector getInjector() {
injector = Guice.createInjector(new MyModule1(), new MyModule2());
return injector;
}
}

Related

Spring-MVC TaskScheduler

I want to create dynamic cron with Spring-MVC.
User can toggle cron from xhtml page. Cron works perfectly but when tomcat shutdown , i faced an error and tomcat couldnt stop properly. Tried this solution but error continues. Sharing the error message and code below (JDK 17 + Tomcat 9).
02-Feb-2023 14:17:58.960 WARNING [main] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [MuhurUM] registered the JDBC driver [oracle.jdbc.OracleDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
02-Feb-2023 14:17:58.961 WARNING [main] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [MuhurUM] appears to have started a thread named [Timer-0] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.base#17.0.4/java.lang.Object.wait(Native Method)
java.base#17.0.4/java.lang.Object.wait(Object.java:338)
java.base#17.0.4/java.util.TimerThread.mainLoop(Timer.java:537)
java.base#17.0.4/java.util.TimerThread.run(Timer.java:516)
02-Feb-2023 14:17:58.962 WARNING [main] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [MuhurUM] appears to have started a thread named [pool-3-thread-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.base#17.0.4/jdk.internal.misc.Unsafe.park(Native Method)
java.base#17.0.4/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:252)
java.base#17.0.4/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:1672)
java.base#17.0.4/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1182)
java.base#17.0.4/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:899)
java.base#17.0.4/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1062)
java.base#17.0.4/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1122)
java.base#17.0.4/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
java.base#17.0.4/java.lang.Thread.run(Thread.java:833)
#Service
public class CronUtil {
#Autowired
private TaskScheduler taskScheduler;
public void scheduleATask(Long id, Runnable tasklet, String cronExpression) {
ScheduledFuture<?> scheduledTask = taskScheduler.schedule(tasklet, new CronTrigger(cronExpression, TimeZone.getTimeZone(TimeZone.getDefault().getID())));
TestApplication.jobsMap.put(id, scheduledTask);
}
public void removeScheduledTask(Long id) {
ScheduledFuture<?> scheduledTask = TestApplication.jobsMap.get(id);
if (scheduledTask != null) {
scheduledTask.cancel(true);
TestApplication.jobsMap.remove(id);
}
}
}

NullPointerException when deploying to JBoss with #Schedule

I am using the wildfly maven plugin to deploy my Java app to a local jboss server.
I created a class with a #Scheduleannotation like this:
#Startup
#Singleton
#Slf4j
public class ClassName {
#Schedule(hour = "*", minute = "*", second = "*/20", persistent = false)
public void method() {
// Code
log.info("some log");
}
}
Now, when deploying I get the following error:
ERROR [org.jboss.as.ejb3.timer] (EJB default - 1) WFLYEJB0020: Error invoking timeout for timer: [id=879a76e7-b06d-458c-a722-70d8f1d40bc2 timedObjectId=xx-yy-server-1.0-SNAPSHOT.xx-yy-server-1.0-SNAPSHOT.ClassName auto-timer?:true persistent?:false timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl#42cdd9a initialExpiration=null intervalDuration(in milli sec)=0 nextExpiration=Tue Oct 15 17:21:00 CEST 2019 timerState=IN_TIMEOUT info=null]: javax.ejb.EJBException: java.lang.NullPointerException
Does anyone have any idea what is causing this? I am rather new to scheduling in Java so it might be something stupid, but I could not find anything online.
Thanks!
Hello,
so as this Stackoverflow question mentioned all the Timeout restrictions apply and more than it is recommended using #Stateless EJB instead of #Singleton when you have multiple timers that will be scheduled.
The #Startup annotation is to inform the EJB container to initialize the bean at the startup, you might be misusing it.

Multi-tenant Quarkus with KeyCloak?

I am writing a suite of services using the Quarkus framework. The services are designed to be multitenant, and are supposed to be protected using KeyCloak. Each tenant will have a separate KeyCloak security realm, with its own set of users, groups, roles, etc.
I’ve found the Quarkus guide to KeyCloak protection, explaining how to configure JAX-RS for authorization using KeyCloak. However, this guide assumes only 1 KeyCloak realm. I also found this example showing how to deploy a WAR file to Wildfly that loads one of multiple KeyCloak realm configuration files depending on the specified realm.
However, it’s not clear if this code can translate over to Quarkus.
Is it possible to dynamically load the KeyCloak configuration in Quarkus this way? Is there a better way to implement multi-tenant security for these Quarkus services?
UPDATE: Based on Pedro and Shadov's suggestions below, I added a really simple KeycloakConfigResolver implementation and marked it as #ApplicationScoped. However, when I attempted to launch Quarkus, I get the following exception and never see my custom KeycloakConfigResolver being called:
17:53:55,340 INFO [io.qua.dep.QuarkusAugmentor] Beginning quarkus augmentation
17:53:55,758 INFO [org.jbo.threads] JBoss Threads version 3.0.0.Beta4
17:53:56,888 INFO [org.hib.Version] HHH000412: Hibernate Core {5.4.3.Final}
17:53:57,812 INFO [io.qua.dep.QuarkusAugmentor] Quarkus augmentation completed in 2472ms
17:53:57,967 ERROR [io.qua.dev.DevModeMain] Failed to start quarkus: java.lang.ExceptionInInitializerError
at java.base/java.lang.J9VMInternals.ensureError(J9VMInternals.java:193)
at java.base/java.lang.J9VMInternals.recordInitializationFailure(J9VMInternals.java:182)
at java.base/java.lang.J9VMInternals.newInstanceImpl(Native Method)
at java.base/java.lang.Class.newInstance(Class.java:2082)
at io.quarkus.runner.RuntimeRunner.run(RuntimeRunner.java:117)
at io.quarkus.dev.DevModeMain.doStart(DevModeMain.java:166)
at io.quarkus.dev.DevModeMain.main(DevModeMain.java:88)
Caused by: java.lang.RuntimeException: Failed to start quarkus
at io.quarkus.runner.ApplicationImpl1.<clinit>(ApplicationImpl1.zig:333)
... 5 more
Caused by: java.lang.RuntimeException: com.fasterxml.jackson.databind.exc.MismatchedInputException: No content to map due to end-of-input
at [Source: UNKNOWN; line: 1, column: 0]
at org.keycloak.adapters.KeycloakDeploymentBuilder.loadAdapterConfig(KeycloakDeploymentBuilder.java:198)
at org.keycloak.adapters.KeycloakDeploymentBuilder.build(KeycloakDeploymentBuilder.java:187)
at io.quarkus.keycloak.KeycloakTemplate.createKeycloakDeploymentContext(KeycloakTemplate.java:36)
at io.quarkus.deployment.steps.KeycloakAdapterProcessor$configureAdapter5.deploy_0(KeycloakAdapterProcessor$configureAdapter5.zig:47)
at io.quarkus.deployment.steps.KeycloakAdapterProcessor$configureAdapter5.deploy(KeycloakAdapterProcessor$configureAdapter5.zig:106)
at io.quarkus.runner.ApplicationImpl1.<clinit>(ApplicationImpl1.zig:207)
... 5 more
Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: No content to map due to end-of-input
at [Source: UNKNOWN; line: 1, column: 0]
at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59)
at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:4145)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4000)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3070)
at org.keycloak.adapters.KeycloakDeploymentBuilder.loadAdapterConfig(KeycloakDeploymentBuilder.java:196)
... 10 more
17:53:57,968 ERROR [io.qua.dev.DevModeMain] Failed to start Quarkus, attempting to start hot replacement endpoint to recover
17:53:58,003 INFO [org.xnio] XNIO version 3.7.2.Final
17:53:58,017 INFO [org.xni.nio] XNIO NIO Implementation Version 3.7.2.Final
My custom KeycloakConfigResolver is empty, save for some logging statements. I never see my resolve method being called or any of the logging statements. Here's what the implementation looks like:
#ApplicationScoped
public class MultiTenantKeycloakConfigResolver implements KeycloakConfigResolver {
/**
* Logger for this class
*/
private static final Logger logger = LoggerFactory.getLogger(MultiTenantKeycloakConfigResolver.class);
/*
* (non-Javadoc)
*
* #see
* org.keycloak.adapters.KeycloakConfigResolver#resolve(org.keycloak.adapters.
* spi.HttpFacade.Request)
*/
#Override
public KeycloakDeployment resolve(Request facade) {
if (logger.isDebugEnabled()) {
logger.debug("resolve(Request) - start"); //$NON-NLS-1$
}
if (logger.isInfoEnabled()) {
logger.info("resolve(Request) - HERE!!!"); //$NON-NLS-1$
}
// TODO Implement method
if (logger.isDebugEnabled()) {
logger.debug("resolve(Request) - end"); //$NON-NLS-1$
}
return null;
}
}
#Shadov, is right. You need a KeycloakConfigResolver.
With Quarkus, you just need to create a class that implements KeycloakConfigResolver. Similar to this.
I'll update the guide with some reference about this.
It's possible in Spring-Boot, almost the same way like in example you posted. Only starting with version 4.6.0-Final tho, they added class KeycloakSpringBootConfigResolverWrapper that actually checks if there is any KeycloakConfigResolver already. In the previous version it was just putting it's own resolver. Now all you have to do is register a custom KeycloakConfigResolver bean and it works.
I see there is very similiar class in Quarkus as in keycloak-spring-boot-adapters - https://github.com/quarkusio/quarkus/blob/master/extensions/keycloak/runtime/src/main/java/io/quarkus/keycloak/QuarkusKeycloakConfigResolver.java. Code is pretty obvious, no need to explain it.
Since I'm not familiar with Quarkus, I can't be 100% sure it's gonna work, but the field is annotated with Inject, so it suggests that you can just provide your own resolver, the same way as possible in Spring-Boot and in the example you posted.

Security errors on startup with Nashorn when deploying Spring application on server

I have a Spring Webapp that throws some confusing errors on startup when I deploy it to my production server (they don't happen when I run it locally)- the errors don't seem to impact anything, so this question is more out of curiosity than a true need for help.
Here is the stacktrace:
20-Apr-2016 17:31:31.711 INFO [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.loadClass Security Violation, attempt to use Restricted Class: jdk.internal.dynalink.support.messages_en_US
java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessClassInPackage.jdk.internal.dynalink.support")
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
at java.security.AccessController.checkPermission(AccessController.java:884)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1564)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1268)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1167)
at java.util.ResourceBundle$Control.newBundle(ResourceBundle.java:2640)
at java.util.ResourceBundle.loadBundle(ResourceBundle.java:1501)
at java.util.ResourceBundle.findBundle(ResourceBundle.java:1465)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1361)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:1082)
at java.util.logging.Logger.findResourceBundle(Logger.java:1879)
at java.util.logging.Logger.setupResourceInfo(Logger.java:1940)
at java.util.logging.Logger.<init>(Logger.java:380)
at java.util.logging.LogManager.demandLogger(LogManager.java:554)
at java.util.logging.Logger.demandLogger(Logger.java:455)
at java.util.logging.Logger.getLogger(Logger.java:553)
at jdk.internal.dynalink.support.Guards.<clinit>(Guards.java:101)
at jdk.nashorn.internal.runtime.Undefined.<clinit>(Undefined.java:51)
at jdk.nashorn.internal.runtime.JSType.<clinit>(JSType.java:263)
at jdk.nashorn.internal.runtime.AccessorProperty.<clinit>(AccessorProperty.java:60)
at jdk.nashorn.internal.objects.Global.$clinit$(Global.java)
at jdk.nashorn.internal.objects.Global.<clinit>(Global.java:919)
at jdk.nashorn.internal.runtime.Context.newGlobal(Context.java:1102)
at jdk.nashorn.api.scripting.NashornScriptEngine$2.run(NashornScriptEngine.java:347)
at jdk.nashorn.api.scripting.NashornScriptEngine$2.run(NashornScriptEngine.java:343)
at java.security.AccessController.doPrivileged(Native Method)
at jdk.nashorn.api.scripting.NashornScriptEngine.createNashornGlobal(NashornScriptEngine.java:343)
at jdk.nashorn.api.scripting.NashornScriptEngine.<init>(NashornScriptEngine.java:143)
at jdk.nashorn.api.scripting.NashornScriptEngineFactory.getScriptEngine(NashornScriptEngineFactory.java:148)
at javax.script.ScriptEngineManager.getEngineByName(ScriptEngineManager.java:238)
at com.my.applicationlib.security.ScriptSandbox.<init>(ScriptSandbox.java:60)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:147)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:89)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$4.run(AbstractAutowireCapableBeanFactory.java:1089)
at java.security.AccessController.doPrivileged(Native Method)
...
And the relevant code is as follows:
#Service
public class ScriptSandbox {
ScriptEngine _scriptEngine;
AccessControlContext _accessControlContext;
public ScriptSandbox() throws InstantiationException{
ScriptEngineManager sem = new ScriptEngineManager();
_scriptEngine = sem.getEngineByName("nashorn");//This error happens on this line.
if (_scriptEngine==null){
throw new InstantiationException("Could not load script engine: "+
"nashorn");
}
setPermissions(null);
}
}
I haven't been able to turn up much relevant information on google, the most I've seen is that I need it in my java security configuration. Mine looks like this so I think I have what I need:
grant {permission java.security.AllPermission; permission java.lang.RuntimePermission;};
Any thoughts?
Edit: This question was marked as a duplicate of this question. I don't think it is for the following reasons:
it works just fine when I initialize nashorn later in the application it seems to work. I only get this error on bean definition from what I can tell. Don't think it's a signing issue as it only comes up on bean definition.
Furthermore, that question has no accepted answers and few votes. Are any of those actually solutions to this problem?
For what it's worth, I got around this in a way I'm not super happy about. Since I only used this in one service, I removed the service annotation entirely, and call initialized it in a #PostConstruct method. I still want to know why this doesn't work during the bean creation phase of Spring.
#Service
public class MyServiceThatUsesScriptSandbox(){
private ScriptSandbox sandbox;
#PostConstruct
public void initSandbox(){
sandbox = new ScriptSandbox();
}
}

Expecting NamingException, getting NoSuchObjectException

I'm running Java 6 on Weblogic 11g.
I'm working on a Web Service projects that uses an EJB to communicate with a database. Currently I'm working on error-handling, and thus I tried undeploying the EJB before invoking the web service. My EJBClientHelper-class looks like this:
package mypackage.elkom.utils;
import java.io.Serializable;
import java.util.Properties;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import mypackage.elkom.ejb.beans.session.remote.ElkomRemote;
public class EJBClientHelper implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
private ElkomRemote elkomRemote;
private static final String ELKOM_JNDI = "ElkomBean#mypackage.ejb.beans.session.remote.ElkomRemote";
private Context ctx;
private void prepareEjb3Connection() throws PropsFileException, NamingException {
// Here's code for getting the ejbProviderURL from propsfile //
props.put("java.naming.factory.initial", weblogic.jndi.WLInitialContextFactory");
props.put("java.naming.provider.url",ejbProviderURL);
ctx = new InitialContext(props);
}
public void setElkomRemote(ElkomRemote elkomRemote) {
this.elkomRemote = elkomRemote;
}
public ElkomRemote getElkomRemote() throws NamingException, PropsFileException {
prepareEjb3Connection();
if(elkomRemote == null) {
elkomRemote = (ElkomRemote)ctx.lookup(ELKOM_JNDI);
}
return elkomRemote;
}
}
But, when i use the getElkomRemote(); I get this message insted of NamingException:
SEVERE: The object identified by: '678' could not be found. Either it was has not been exported or it has been collected by the distributed garbage collector.;
nested exception is: java.rmi.NoSuchObjectException: The object identified by: '678' could not be found.
Either it was has not been exported or it has been collected by the distributed garbage collector.
javax.ejb.EJBException: The object identified by: '678' could not be found. Either it was has not been exported or it has been collected by the distributed garbage collector.;
nested exception is: java.rmi.NoSuchObjectException: The object identified by: '678' could not be found.
Either it was has not been exported or it has been collected by the distributed garbage collector.
java.rmi.NoSuchObjectException: The object identified by: '678' could not be found. Either it was has not been exported or it has been collected by the distributed garbage collector.
Anyone know why I get this message instead of NamingException? And perhaps how to fix it?
There are three Exception categories:
System Exceptions
JVM Exceptions
Application Exceptions
Α system exception may occur due to a code bug or a misconfigured resource such as a misconfigured JNDI lookup. If an enterprise bean faces a system error it normally throws a javax.ejb.EJBException. The container wraps the EJBException in a RemoteException and finally the RemoteException is passed back to the client. That's what happened in your case and that's why you received a RemoteException.
The system exceptions cannot be handled from the client applications and should be thrown as unchecked exceptions.
For more detailed information you can see the following articles:
http://www.ibm.com/developerworks/java/library/j-ejbexcept/index.html
http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/BMP6.html
I hope this helps you.

Categories

Resources