Exception Outside Of EJB Code
Hello,
I have a BMP EJB module that is talking with a SYBASE database using the jconn2 driver on the J2EE AS (Sun Java App Server 8). I deployed the module using the deploytool. I also have a stand-alone application that has been compiled with the client jar file.
When I call any of my findBy* methods I recieve an object as I would expect. However, when I try to use the object in any way (for example, call getX() on it) I receive the following error in the server.log file:
javax.ejb.EJBException: nested exception is: javax.ejb.EJBException: nested exception is: com.sybase.jdbc2.jdbc.SybSQLException: Incorrect syntax near 'primary_key'
Where primary_key is my primary key value. I have placed print lines in my findBy methods and I see the values I'm receiving are correct and the exception is happening AFTER control leaves my findBy method.
Has anyone seen anything like this? I've scoured the web for two days with no luck.
I'm not sure if I need to configure my module differently, use an Application vice a module, configure the database different, or if I'm missing something with my client. I'm very new to EJBs/Web development...
Here is the stack trace that I am getting. After some more investigation, I see that the following exception is being thrown after leaving ejbLoad. I have a printout as the last thing I do in ejbLoad and I am seeing that, but this exception is being thrown!
It seems to indicate that there is a problem with my SQL, but I have copied and pasted all of my SQL statements into isql and they all work.
I have also print out the other attributes in ejbLoad() that I get from the database and they are all correct. I have no idea what the problem is...
[#|2004-12-13T12:12:40.940-0500|SEVERE|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.ejb|_ThreadID=51;|EJB5071: Some remote or transactional roll back exception occurred
javax.ejb.EJBException: nested exception is: javax.ejb.EJBException: nested exception is: com.sybase.jdbc2.jdbc.SybSQLException: Incorrect syntax near 'port_id'.
javax.ejb.EJBException: nested exception is: com.sybase.jdbc2.jdbc.SybSQLException: Incorrect syntax near 'port_id'.
com.sybase.jdbc2.jdbc.SybSQLException: Incorrect syntax near 'port_id'.
at com.sybase.jdbc2.tds.Tds.processEed(Tds.java:2636)
at com.sybase.jdbc2.tds.Tds.nextResult(Tds.java:1996)
at com.sybase.jdbc2.jdbc.ResultGetter.nextResult(ResultGetter.java:69)
at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:204)
at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:187)
at com.sybase.jdbc2.jdbc.SybStatement.updateLoop(SybStatement.java:1615)
at com.sybase.jdbc2.jdbc.SybStatement.executeUpdate(SybStatement.java:1598)
at com.sybase.jdbc2.jdbc.SybPreparedStatement.executeUpdate(SybPreparedStatement.java:89)
at wsm.ejb.PortEntityBean.ejbStore(PortEntityBean.java:266)
at com.sun.ejb.containers.EntityContainer.callEJBStore(EntityContainer.java:2248)
at com.sun.ejb.containers.EntityContainer.enlistResourcesAndStore(EntityContainer.java:1369)
at com.sun.ejb.containers.EntityContainer.beforeCompletion(EntityContainer.java:1349)
at com.sun.ejb.containers.ContainerSynchronization.beforeCompletion(ContainerSynchronization.java:103)
at com.sun.enterprise.distributedtx.J2EETransaction.commit(J2EETransaction.java:246)
at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:333)
at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:2622)
at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:2411)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:763)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:137)
at $Proxy95.getPortID(Unknown Source)
at wsm.ejb.PortSessionBean.getPortAt(PortSessionBean.java:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.sun.enterprise.security.SecurityUtil$2.run(SecurityUtil.java:146)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.enterprise.security.application.EJBSecurityManager.doAsPrivileged(EJBSecurityManager.java:930)
at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:151)
at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:128)
at $Proxy93.getPortAt(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:117)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:651)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:190)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1653)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1513)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:895)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:172)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:668)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:375)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.read(SocketOrChannelConnectionImpl.java:284)
at com.sun.corba.ee.impl.transport.ReaderThreadImpl.doWork(ReaderThreadImpl.java:73)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:382)
Similar Messages
-
Exception thrown in EJB not captured in ManagedBean
Hi. Im new in community.
I have an EE project using JSF 1.2, EJB 3.0 deployed in Weblogic 10.3.6.
My EJB that throws an Exception that is captured in my ManagedBean. However the exception does not reach to my ManagedBean.
This exception should reload the page with an error message stating that the group already exists, but as the exception does not reach the ManagedBean, the page is not displayed with the error message.
I appreciate the help. Rgrds.
My web.xml
<error-page>
<exception-type>java.lang.Exception</exception-type>
<location>/PRErrorPageView.faces</location>
</error-page>
My EJB:
try {
List<Grupo> grupos = findGrupoByName(grupo.getNomeGrupo());
if (!grupos.isEmpty() && !alteraPermissao)
throw new GrupoException("msgErroGrupoNomeCadastrado");
My ManagedBean:
Here is the call of my EJB
grupoServices.persisteGrupo(grupo, listCR, listCC, listCM, listCP, listMo, alteraGrupo, codigoTela, codigoUsuarioLogado);
cancelar();
FacesUtil.addSuccessMessage("Grupo criado com sucesso!");
} catch (GrupoException e) {
logger.warning(e.getMsg());
FacesUtil.addErrorMessage(e.getMsg());
My class GrupoException:
public class GrupoException extends ComponentException{
/** The serialVersionUID */
private static final long serialVersionUID = -6912605895523623154L;
public GrupoException(String key){
super(key);
My ComponentException:
public class ComponentException extends RuntimeException{
/** The serialVersionUID */
private static final long serialVersionUID = -2534006938034008594L;
private String msg;
public ComponentException(String key) {
String msgBundle = ResourcesUtil.getString(ResourcesUtil.MENSAGENS_FILE, key);
this.msg = msgBundle;
Weblogic log:
]] Root cause of ServletException.
javax.faces.FacesException: #{cadastroGrupo.gravar}: javax.ejb.EJBException: EJB Exception: : br.com.telefonica.portal.services.exceptions.GrupoException
at br.com.telefonica.portal.services.impl.GrupoServiceImpl.persisteGrupo(GrupoServiceImpl.java:93)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.oracle.pitchfork.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:34)
at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:54)
at com.oracle.pitchfork.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:42)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy87.persisteGrupo(Unknown Source)
at br.com.telefonica.portal.services.impl.GrupoServiceImpl_k21zc8_GrupoServicesLocalImpl.__WL_invoke(Unknown Source)
at weblogic.ejb.container.internal.SessionLocalMethodInvoker.invoke(SessionLocalMethodInvoker.java:39)
at br.com.telefonica.portal.services.impl.GrupoServiceImpl_k21zc8_GrupoServicesLocalImpl.persisteGrupo(Unknown Source)
at br.com.telefonica.portal.web.views.CadastroGrupoBean.gravar(CadastroGrupoBean.java:310)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.el.parser.AstValue.invoke(AstValue.java:187)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:297)
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
at javax.faces.component.UICommand.broadcast(UICommand.java:387)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3730)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
; nested exception is: br.com.telefonica.portal.services.exceptions.GrupoException
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:118)
at javax.faces.component.UICommand.broadcast(UICommand.java:387)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
Truncated. see log file for complete stacktrace
Caused By: javax.faces.el.EvaluationException: javax.ejb.EJBException: EJB Exception: : br.com.telefonica.portal.services.exceptions.GrupoException
at br.com.telefonica.portal.services.impl.GrupoServiceImpl.persisteGrupo(GrupoServiceImpl.java:93)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.oracle.pitchfork.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:34)
at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:54)
at com.oracle.pitchfork.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:42)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy87.persisteGrupo(Unknown Source)
at br.com.telefonica.portal.services.impl.GrupoServiceImpl_k21zc8_GrupoServicesLocalImpl.__WL_invoke(Unknown Source)
at weblogic.ejb.container.internal.SessionLocalMethodInvoker.invoke(SessionLocalMethodInvoker.java:39)
at br.com.telefonica.portal.services.impl.GrupoServiceImpl_k21zc8_GrupoServicesLocalImpl.persisteGrupo(Unknown Source)
at br.com.telefonica.portal.web.views.CadastroGrupoBean.gravar(CadastroGrupoBean.java:310)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.el.parser.AstValue.invoke(AstValue.java:187)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:297)
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
at javax.faces.component.UICommand.broadcast(UICommand.java:387)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3730)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
; nested exception is: br.com.telefonica.portal.services.exceptions.GrupoException
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
at javax.faces.component.UICommand.broadcast(UICommand.java:387)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
Truncated. see log file for complete stacktrace
Caused By: javax.ejb.EJBException: EJB Exception: : br.com.telefonica.portal.services.exceptions.GrupoException
at br.com.telefonica.portal.services.impl.GrupoServiceImpl.persisteGrupo(GrupoServiceImpl.java:93)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.oracle.pitchfork.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:34)
at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:54)
at com.oracle.pitchfork.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:42)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy87.persisteGrupo(Unknown Source)
at br.com.telefonica.portal.services.impl.GrupoServiceImpl_k21zc8_GrupoServicesLocalImpl.__WL_invoke(Unknown Source)
at weblogic.ejb.container.internal.SessionLocalMethodInvoker.invoke(SessionLocalMethodInvoker.java:39)
at br.com.telefonica.portal.services.impl.GrupoServiceImpl_k21zc8_GrupoServicesLocalImpl.persisteGrupo(Unknown Source)
at br.com.telefonica.portal.web.views.CadastroGrupoBean.gravar(CadastroGrupoBean.java:310)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.el.parser.AstValue.invoke(AstValue.java:187)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:297)
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
at javax.faces.component.UICommand.broadcast(UICommand.java:387)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3730)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
; nested exception is: br.com.telefonica.portal.services.exceptions.GrupoException
at weblogic.ejb.container.internal.EJBRuntimeUtils.throwEJBException(EJBRuntimeUtils.java:156)
at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:887)
at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:818)
at weblogic.ejb.container.internal.BaseLocalObject.postInvoke1(BaseLocalObject.java:517)
at weblogic.ejb.container.internal.BaseLocalObject.__WL_postInvokeTxRetry(BaseLocalObject.java:455)
Truncated. see log file for complete stacktrace
Caused By: br.com.telefonica.portal.services.exceptions.GrupoException
at br.com.telefonica.portal.services.impl.GrupoServiceImpl.persisteGrupo(GrupoServiceImpl.java:93)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
Truncated. see log file for complete stacktraceTao,
> If your ejb method is in a transaction context, then you throw application
exception, the container will try to commit the transaction.
In the case of an application exception, the caller will be responsible for
committing or rolling back the transaction. (A runtime exception will roll
back the transaction automatically.) That is why, if you use CMT, that the
EJB methods call from outside the EJB container (such as from a servlet)
should never be able to throw runtime exceptions.
Peace,
Cameron Purdy
Tangosol, Inc.
http://www.tangosol.com
+1.617.623.5782
WebLogic Consulting Available
"Tao Zhang" <[email protected]> wrote in message
news:3a33c04a$[email protected]..
>
> Hi,
> It's ok because you look after the transaction yourself. probably you use
the default transaction attribute 'Supports'.
>
> If your ejb method is in a transaction context, then you throw application
exception, the container will try to commit the transaction.
>
> Hope this can help.
> Tao Zhang
>
> "Gormless" <[email protected]> wrote:
> >
> >When I throw an application exception from within a statless session bean
which uses jdbs for DB Lookup Only I get
> >"Exception thrown in non-transactional EJB invoke".
> >
> >As this is a llokup only I have no Transaction Management
>
-
How to catch Exception inside the native code
Hello,
I have an error of unexpected exception during running native code,it occurrs randomly, not every time.
the error text is:
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0x9535F359
Function=acy_match+0xC6
Library=/usr/lib/libNegativeMatcher.so
I don't know what exactly cause the crash inside the c code but I think it might be memory leak . What I'm concern is that this exception cause program termination.
I have few questions:
1. This exception cause the java program to end. How can I catch this exception and avoid program termination?
2. What is 0xC6 in:
Function=acy_match+0xC6
and PC=0x9535F359?
Can it help me track the problem inside the native code?
Thanks for your help.An unexpected exception has been detected in native
code outside the VM.
Unexpected Signal : 11 occurred at PC=0x9535F359
Function=acy_match+0xC6
Library=/usr/lib/libNegativeMatcher.so
I don't know what exactly cause the crash inside the
c code but I think it might be memory leak . What
I'm concern is that this exception cause program
termination.I doubt it is a memory leak (actually I am rather certain that another error would occur if it was just memory exhaustion.)
I have few questions:
1. This exception cause the java program to end. How
can I catch this exception and avoid program
termination?I suspect that would be a really bad idea. That particular signal very likely indicates that you have corrupted memory. Continuing is unlikely to work.
2. What is 0xC6 in:
As a guess it is an offset into the compiled code which indicates where the memory problem was detected.
That it unlikely to help you with a pointer/memory problem because that is where it was detected and not where it happened. By comparing the source you might be able to determine what was bad and then trace it back. -
Ssrs report web service to save report as pdf throws error Soap exception unhandeled by user code
I am creating a C# web application to save an SSRS report as a pdf file on my local machine.
I added the ReportService web reference as RS2005 and ReportExecution2005 web reference as RE2005.
http://myServer/ReportServer_DEVPROJECT/ReportExecution2005.asmx?WSDL
http://myServer/ReportServer_DEVPROJECT/ReportService2005.asmx?WSDL
I created the following function SaveReport that is called on button click. My report can be accessed on the report server with the following url:
http://myServer/Reports_DEVPROJECT/Pages/Report.aspx?ItemPath=%2fData+Mgmt%2fSample+Letter
On the Report Manager home page the report link appears as "SAMPLE LETTER".
It is deployed in the DataMgmt folder on the Report Manager.
It uses a data source called "DS Letter" with option "Credentials stored securely in the report server"
My application gets compiled, but I get the following run time error:
Error: Soap exception unhandeled by user code. The item '/DataMgmt/Sample Letter' cannot be found. ---> Microsoft.ReportingService
s.Diagnostics.Utilities.ItemNotFoundException: The item '/DataMgmt/Sample Letter' cannot be found.
Please check my code and let me know what I can do to run this successfully. Once this is done, I would like to get help with passing a parameter (memberID) to the generate report for that member, through this application.
Thank You in advance for your help.
public static void SaveReport()
RS2005.ReportingService2005 rs;
RE2005.ReportExecutionService rsExec;
// Create a new proxy to the web service
rs = new RS2005.ReportingService2005();
rsExec = new RE2005.ReportExecutionService();
// Authenticate to the Web service using Windows credentials
rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
rsExec.Credentials = System.Net.CredentialCache.DefaultCredentials;
rs.Url = "http://myServer/ReportServer_DEVPROJECT/ReportService2005.asmx";
rsExec.Url = "http://myServer/ReportServer_DEVPROJECT/ReportExecution2005.asmx";
string historyID = null;
string deviceInfo = null;
string format = "pdf";
Byte[] results;
string encoding = String.Empty;
string mimeType = String.Empty;
string extension = String.Empty;
RE2005.Warning[] warnings = null;
string[] streamIDs = null;
string fileName = @"c:\temp\samplerHAPeport.pdf";
string _reportName = @"/DataMgmt/Sample HAP Letter";
string _historyID = null;
bool _forRendering = false;
RS2005.ParameterValue[] _values = null;
RS2005.DataSourceCredentials[] _credentials = null;
RS2005.ReportParameter[] _parameters = null;
try
_parameters = rs.GetReportParameters(_reportName, _historyID, _forRendering, _values, _credentials);
RE2005.ExecutionInfo ei = rsExec.LoadReport(_reportName, historyID);
RE2005.ParameterValue[] parameters = new RE2005.ParameterValue[1];
if (_parameters.Length > 0)
//parameters[0] = new RE2005.ParameterValue();
//parameters[0].Label = "";
//parameters[0].Name = "";
//parameters[0].Value = "";
rsExec.SetExecutionParameters(parameters, "en-us");
results = rsExec.Render(format, deviceInfo,
out extension, out encoding,
out mimeType, out warnings, out streamIDs);
using (FileStream stream = File.OpenWrite(fileName))
stream.Write(results, 0, results.Length);
catch (Exception ex)
throw ex;
protected void BtnGenReport_Click(object sender, EventArgs e)
SaveReport();Hello Devster,
Thank you to post your question on TechNet forum.
After reviewing the whole post, I have a question to you. You can access the report via the link, http://myServer/Reports_DEVPROJECT/Pages/Report.aspx?ItemPath=%2fData+Mgmt%2fSample+Letter.
From the URL, I can see that the report is located at: /Data Mgmt/Sample Letter, instead of /DataMgmt/Sample Letter. In addition, I found that the target report is "/DataMgmt/Sample HAP Letter" instead of "/DataMgmt/Sample Letter" as the error described. I
am not sure whether you post out the correct code segment.
Please check the above things on your side, and hope it is helpful to you.
Regards,
Edward
Edward Zhu
TechNet Community Support -
Hi All.
I hope someone can help.
I have recently installed Oracle XE on my Vista Ultimate laptop and it is up and running with no apparent problems. I then connected to the HR schema on XE with no problems using SQL Developer 1.2.1.3213 (OLD Version). I noticed that SQL Developer 1.5.4.59.40 (NEW version) was available and downloaded it (the offering without JDK included) and renamed the "C:\Program Files\SQLDeveloper" folder holding the older version to "C:\Program Files\SQLDeveloper_Orig" and placed the new version of SQL Developer in the Prog Files directory to give "C:\Program Files\SQLDeveloper".
I then ran SQLDeveloper.exe (NEW) and when requested gave the JDK path as "C:\Program Files\Java\JDK_1.6.0_11\bin\java.exe" ('Java -version' gives 1.6.0_11-b03) and migrated over the settings from the previous version of SQLDeveloper (OLD).
The Application loads fine but when i attempt to connect to XE's HR schema i get the following error:
"IO Exception: Undefined Error
VENDOR CODE 17002"
I have searched to try and find out what is going on but cannot find any solutions that work. The previous 17002 error solutions on this forumn have all failed.
These included changing the JDK.conf file to hold route to JDK directory and also creating a 'bat' file.
My system does not have the directory for the JDK in it's PATH environment setting (either USER or SYSTEM) but does include a directory path under SYSTEM environment vars to another version fo JDK on my machine under "C:\Program Files\Sun\JDK\". I thought this may be causing a conflict but it is version 1.6.0.05_b13 and is also compatible-is it not? I also have Java JRE6 (1.6.0_12-b04) on my machine - this does not have a PATH variable and was not referenced when loading SQL Developer when loading the first time.
Can anyone help me resolve this, why can the previous version still connect OK to XE and not new version? is there something i am missing? Do i require the Java JDK Directory to be placed under a PATH environment SYSTEM variable?
Thanks in advance,
M
Edited by: user592047 on 16-Mar-2009 10:08Taken from about SQL Developer:
Version:
CVS Version Internal to Oracle SQL Developer (client-only)
Java(TM) Platform 1.6.0_11
Oracle IDE 1.5.4.59.40
Versioning Support 1.5.4.59.40
Properties:
apple.laf.useScreenMenuBar true
awt.toolkit sun.awt.windows.WToolkit
class.load.environment oracle.ide.boot.IdeClassLoadEnvironment
class.load.log.level CONFIG
class.transfer delegate
com.apple.macos.smallTabs true
com.apple.mrj.application.apple.menu.about.name "SQL_Developer"
com.apple.mrj.application.growbox.intrudes false
file.encoding Cp1252
file.encoding.pkg sun.io
file.separator \
http.agent Mozilla/5.0 (Java 1.6.0_11; Windows Vista 6.0 x86; en_GB) ICEbrowser/v6_1_3
ice.browser.forcegc false
ice.pilots.html4.ignoreNonGenericFonts true
ice.pilots.html4.tileOptThreshold 0
ide.AssertTracingDisabled true
ide.bootstrap.start 10390897243225
ide.build MAIN-5940
ide.conf C:\Program Files\sqldeveloper_new\sqldeveloper\bin\sqldeveloper.conf
ide.config_pathname C:\Program Files\sqldeveloper_new\sqldeveloper\bin\sqldeveloper.conf
ide.debugbuild false
ide.devbuild false
ide.extension.search.path sqldeveloper/extensions:jdev/extensions:ide/extensions
ide.firstrun false
ide.java.minversion 1.5.0
ide.launcherProcessId 2672
ide.main.class oracle.ide.boot.IdeLauncher
ide.patches.dir ide/lib/patches
ide.pref.dir C:\Users\M\AppData\Roaming\SQL Developer
ide.pref.dir.base C:\Users\M\AppData\Roaming
ide.product oracle.sqldeveloper
ide.shell.enableFileTypeAssociation C:\Program Files\sqldeveloper_new\sqldeveloper.exe
ide.splash.screen splash.gif
ide.startingArg0 C:\Program Files\sqldeveloper_new\sqldeveloper.exe
ide.startingcwd C:\Program Files\sqldeveloper_new
ide.user.dir C:\Users\M\AppData\Roaming\SQL Developer
ide.user.dir.var IDE_USER_DIR
ide.work.dir C:\Users\M\Documents\SQL Developer
ide.work.dir.base C:\Users\M\Documents
java.awt.graphicsenv sun.awt.Win32GraphicsEnvironment
java.awt.printerjob sun.awt.windows.WPrinterJob
java.class.path ..\..\ide\lib\ide-boot.jar
java.class.version 50.0
java.endorsed.dirs C:\Program Files\Java\jdk1.6.0_11\jre\lib\endorsed
java.ext.dirs C:\Program Files\Java\jdk1.6.0_11\jre\lib\ext;C:\Windows\Sun\Java\lib\ext
java.home C:\Program Files\Java\jdk1.6.0_11\jre
java.io.tmpdir C:\Users\M\AppData\Local\Temp\
java.library.path C:\Program Files\sqldeveloper_new;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\oracle\xe\app\oracle\product\10.2.0\server\bin;C:\Program Files\CodeGear\RAD Studio\5.0\bin;C:\Users\Public\Documents\RAD Studio\5.0\Bpl;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\9.0\DLLShared\;c:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Users\Public\Documents\RAD Studio\5.0\Bpl;C:\Program Files\Common Files\Teleca Shared;C:\Program Files\Microsoft Network Monitor 3\;C:\PROGRA~1\DISKEE~1\DISKEE~1\;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Java\jdk1.6.0_11;C:\Program Files\Sun\SDK\bin;C:\Users\Public\Documents\RAD Studio\5.0\Bpl;C:\Program Files\Nmap
java.naming.factory.initial oracle.javatools.jndi.LocalInitialContextFactory
java.runtime.name Java(TM) SE Runtime Environment
java.runtime.version 1.6.0_11-b03
java.specification.name Java Platform API Specification
java.specification.vendor Sun Microsystems Inc.
java.specification.version 1.6
java.util.logging.config.file logging.conf
java.vendor Sun Microsystems Inc.
java.vendor.url http://java.sun.com/
java.vendor.url.bug http://java.sun.com/cgi-bin/bugreport.cgi
java.version 1.6.0_11
java.vm.info mixed mode
java.vm.name Java HotSpot(TM) Client VM
java.vm.specification.name Java Virtual Machine Specification
java.vm.specification.vendor Sun Microsystems Inc.
java.vm.specification.version 1.0
java.vm.vendor Sun Microsystems Inc.
java.vm.version 11.0-b16
jdbc.library /C:/Program Files/sqldeveloper_new/jdbc/lib/ojdbc5.jar
line.separator \r\n
oracle.home C:\Program Files\sqldeveloper_new
oracle.ide.util.AddinPolicyUtils.OVERRIDE_FLAG true
oracle.translated.locales de,es,fr,it,ja,ko,pt_BR,zh_CN,zh_TW
oracle.xdkjava.compatibility.version 9.0.4
orai18n.library /C:/Program Files/sqldeveloper_new/jlib/orai18n.jar
os.arch x86
os.name Windows Vista
os.version 6.0
path.separator ;
reserved_filenames con,aux,prn,lpt1,lpt2,lpt3,lpt4,lpt5,lpt6,lpt7,lpt8,lpt9,com1,com2,com3,com4,com5,com6,com7,com8,com9,conin$,conout,conout$
sun.arch.data.model 32
sun.boot.class.path C:\Program Files\Java\jdk1.6.0_11\jre\lib\resources.jar;C:\Program Files\Java\jdk1.6.0_11\jre\lib\rt.jar;C:\Program Files\Java\jdk1.6.0_11\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.6.0_11\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.6.0_11\jre\lib\jce.jar;C:\Program Files\Java\jdk1.6.0_11\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.6.0_11\jre\classes
sun.boot.library.path C:\Program Files\Java\jdk1.6.0_11\jre\bin
sun.cpu.endian little
sun.cpu.isalist pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86
sun.desktop windows
sun.io.unicode.encoding UnicodeLittle
sun.java2d.ddoffscreen false
sun.jnu.encoding Cp1252
sun.management.compiler HotSpot Client Compiler
sun.os.patch.level Service Pack 1
user.country GB
user.dir C:\Program Files\sqldeveloper_new\sqldeveloper\bin
user.home C:\Users\M
user.language en
user.name M
user.timezone Europe/London
user.variant
windows.shell.font.languages -
SDK: Uncaught exception thrown in native code
We are using java and the DQM SDK, our XML validates and while we are trying to create a MultiRecordTransform, we get the following exception with no information to help diagnose the issue.
com.sap.emdq.EmdqException: Uncaught exception thrown in native code
We are using the dquractransformu shared object and have NCOALink enabled. We have successfully used the URAC transform without NCOALink. We receive no other errors or logs when starting up, and if we turn off NCOALink, it gets past creating the MR transform.
Is there any other information we can get to help us determine what the issue is?FYI: We found our setting in the XML that enabled NCOA processing to begin ( <PROVIDER_TYPE> ), but it would be much easier if the error indicated what was missing, instead of the generic "Uncaught exception thrown in native code". Maybe there is a config setting to get more informative exception messages?
-
SO Wait causes exception occurred within external code called by call library node
when trying to run some old code that used to work ok, i now get this error message:
exception occurred within external code called by call library node
and the vi flagged as calling the exception is SO Wait. the error occurs with different soundcards. does anyone know what is causing this problem?Hi Kreuters
It sounds as if you have a case of memory corruption. Which version of LabVIEW and DAQ (traditonal or DAQmx) are you running and also on which operating system?
would it be possible for you to post your VI on this thread? in some cases there are ways to fix the problem
Regards
YatinM
NIUK -
Hi All,
When I try to open by ejb code ( ejb.java file) I am getting the following error
An internal error occurred during: "Resynching JPA model ...".
IWAE0011E Key already used to access Resource : org.eclipse.wst.common.internal.emfworkbench.EditModelLeastUsedCache@e55d75
Please help me in this
Thanks!
SwarnaprakashHi,
First check in
IMG-FA-FA GS - Tax on sales & Purchase
1. Check the calculation procedure - TAX<Country> E.g. for India - TAXIN
2. Check whether the country has been assignmed to the calculation procedure
3. Calculation - Define Tax codes for Sales / Pur - Enter country and enter tax codes (Tax Type: A: Output tax; v-Input Tax) and give Tax percent
Save
It should solve ur problem
<i>Pls. assign points, if useful</i>
Regards,
sridevi -
Revision: 3766
Author: [email protected]
Date: 2008-10-21 05:59:49 -0700 (Tue, 21 Oct 2008)
Log Message:
Fix for BLZ-261: Null pointer exception in Websphere login code.
Protect the debug logging from being called if the principal variable is null.
Ticket Links:
http://bugs.adobe.com/jira/browse/BLZ-261
Modified Paths:
blazeds/trunk/modules/opt/src/websphere/flex/messaging/security/WebSphereLoginCommand.jav aRevision: 3766
Author: [email protected]
Date: 2008-10-21 05:59:49 -0700 (Tue, 21 Oct 2008)
Log Message:
Fix for BLZ-261: Null pointer exception in Websphere login code.
Protect the debug logging from being called if the principal variable is null.
Ticket Links:
http://bugs.adobe.com/jira/browse/BLZ-261
Modified Paths:
blazeds/trunk/modules/opt/src/websphere/flex/messaging/security/WebSphereLoginCommand.jav a -
How can one prevent passing exceptions over an EJB-Webservice?
Hello,
I would appreciate if someone could give me some advice on the following. I tried to google it/use the search function, however, it was quite hard finding a precise search term.
Let me try to explain the setting conceptionally without much code first.
Three stateless session beans - let's call them BeanA, BeanB and BeanC - perform some specific tasks. Especially, they are using JPA to create and manipulate persistent entities. Clients like graphical user interfaces access these beans. I call them internal clients because they belong the same company like BeanA, BeanB and BeanC. Internal clients can know how to handle exceptions which are thrown in the beans.
However, the functionality of these beans is also relevant to external clients, for example another company. A webservice (WebserviceBean) combines the functionality of the three beans and communicates with the external client. The latter one must not receive any exceptions thrown in my EJB application as this could leak implementation details but they must be informed, that the task could not be performed (some kind of "Please try again later"). As far as I understood (also tested it), JAX-WS takes exceptions and turns them into SOAP-Faults.
My first (naive) approach was to do something like this
Webmethod of the WebserviceBean (
public ReturnType doWebserviceFunctionality(ParameterType parameter) {
try {
beanAinstance.doWork();
beanBinstance.doMoreWork();
beanCinstance.doFinalWork();
catch(SpecificException se) {
// Map specific exception to ReturnType.specificError
} catch(Exception e) { // Bad practice, I know
// Map general exception to ReturnType.encounteredInternalError
}In every bean's method as well as in the webservice, I am using Container Managed Transactions (default setting REQUIRED).
The problem is, that doMoreWork() uses an entity with a versioning attribute (@version) in order to support optimistic locking. This works quite well, however, whenever an OptimisticLockException is thrown, it does not get caught in WebserviceBean and is passed on to the client. I think this is because the complete transaction is commited at the end of doWebserviceFunctionality. I am aware that I could use EntityManager's flush method in bean B in order to catch the OptimisticLockException. However, I am trying not to interfere with transaction commiting as far as possible and furthermore, I am not quite sure, if there could be other exceptions (for example JPA exceptions) which could get thrown in a similar way and are passed on to the client.
Does anybody know a possibility to solve this problem? Do I have to use bean managed transactions? Or mark doWebserviceFunctionality as not part of an transaction and put the bean method calls in a seperate method which commits at the end and allows me to handle exceptions? Or is there a completely different approach necessary?
Any help is appreciated, thanks in advance,
BKelsoHello to all,
thanks again for your suggestions which proved to be valueable hints!
I'll tell you so far the lessons I've learned.
1) Using interceptors (suggested by malrawi)
This would have been a very nice solution, however, it turns out that the problem remains - the exception thrown by the container after the commit is not caught. Here is the code I used
@AroundInvoke
public Object convertException(InvocationContext ctx) throws InternalErrorException {
try {
return ctx.proceed();
} catch(Exception e) {
// just tried to throw another exception here in order to see if it works
throw new InternalErrorException("Internal Error occured. Please try again later.");
}2) Using bean managed transcations (suggested by zsom)
This worked out as I thought it would. The webservice starts and commits the transactions, beanA, B and C can still keep the default CMT Attribute. However, when ut.rollback() is called, an IllegalStateException is always thrown. Don't know why so far, the transaction seems to be set back anyways.
@Resource SessionContext ctx;
public ReturnType doWebserviceFunctionality(ParameterType parameter) {
UserTransaction ut = null;
ut = ctx.getUserTransaction();
try {
ut.begin();
ut.commit();
} catch (Exception e) {
try {
ut.rollback();
// map exception...
} catch (Exception rollbackException) {
// also map exception to return type
}3) Upon the suggestion by malrawi using NotSupported transaction attribute in order to force a commit, I came up with the following: The webservice method uses this transaction attribute while simply calling another local stateless session bean (beanZ), which does the actual work (calling beans A, B, C). It uses the default transaction attribute (Required). This works out perfectly at the cost of an additional bean. But maybe you see some other downsides? Essentially it's the same as the idea with the internalMethod made public and using another transaction attribute.
// web service class
public ReturnType doWebserviceFunctionality(ParameterType parameter) {
try {
beanZinstance.doActualWork();
catch(Exception e) { // Map exceptions here
// bean Z class
public ReturnType doActualWork(ParameterType parameter) {
beanAinstance.doWork();
beanBinstance.doMoreWork();
beanCinstance.doFinalWork();
}4) Using soaphandler (suggested by zsom)
This seems like a good idea but it is also the most complicated and a bit more low-level. But I will check it out in more detail, I think.
Thanks again for your efforts and I still appreciate any feedback!
BobKelso -
WLS 6.1 sp2 crash - exception outside JVM
In the directory wlserver6.1 we get files named hs_err_pidNNN.log for each server
crash. Those files looks like this presented below. Any suggestion why we get
those crashes ? Maybe to low memory (512MB), or to high load. Is this bug can
be in our application or it is weblogic or jvm fault?
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x77fca927
Function name=RtlFreeHeap
Library=C:\WINNT\System32\ntdll.dll
Current Java thread:
at java.io.FileInputStream.readBytes(Native Method)
at java.io.FileInputStream.read(FileInputStream.java:183)
at weblogic.utils.classloaders.FileSource.getBytes(FileSource.java:43)
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:271)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:156)
at weblogic.servlet.jsp.JspClassLoader.findClass(JspClassLoader.java:36)Sounds like JVM bug, what is the JDK?
cheers
mbg
"Jerzy Krawczuk" <[email protected]> wrote in message
news:3ed75842$[email protected]..
>
In the directory wlserver6.1 we get files named hs_err_pidNNN.log for eachserver
crash. Those files looks like this presented below. Any suggestion why weget
those crashes ? Maybe to low memory (512MB), or to high load. Is this bugcan
be in our application or it is weblogic or jvm fault?
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x77fca927
Function name=RtlFreeHeap
Library=C:\WINNT\System32\ntdll.dll
Current Java thread:
at java.io.FileInputStream.readBytes(Native Method)
at java.io.FileInputStream.read(FileInputStream.java:183)
at weblogic.utils.classloaders.FileSource.getBytes(FileSource.java:43)
atweblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLo
ader.java:271)
atweblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.
java:156)
at weblogic.servlet.jsp.JspClassLoader.findClass(JspClassLoader.java:36) -
Handle Custom Exception messages in EJB 3.x
Hi
I would like to know the process to follow in order to handle CustomException as in example
the following code used within the Satteless / statefull /Message EJB's may be
*if(user.account.value <= 100){*
throw new EJBHanldleException("1001")
where "EJBHanldleException" is a normal Custom build java which extends java.lang.Exception
I would like to get the Value "1001" on to the Client which initates the EJB call.
a sample code would be usefull..... : (
with regards
kartthikDidn't you have a thread for this here: Please note *CreateException* extends Exception clause
Were the replies in there completely useless? -
Exception in ContainerManaged EJB
Hai everybody,
I have written a ContaianerManagedEntity Bean. Iam trying to insert data into Oracle8i Database using J2EE server.
There is no problem with database. It is calling ejbCreate() method and it is executing till the last statement of ejbCreate() method.But after ejbCreate() it is not executing ejbPostCreate() method.
The Exception Iam getting is:
at com.sun.corba.ee.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:296)
at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
at com.sun.enterprise.iiop.POAProtocolMgr.createReference(POAProtocolMgr.java:313)
at com.sun.ejb.containers.EntityContainer.internalGetEJBObject(EntityContainer.java:796)
at com.sun.ejb.containers.EntityContainer.getEJBObject(EntityContainer.java:167)
The complete Exception is about 7000(seven thousand) lines. The above are only first 3 lines.
I could not able to trace where the exact problem is. somebody please help me..
This is my ejbCreate and ejbPostCreate() code:
public void ejbCreate(String companyID,String name,String city,String state,String pin,String address)
throws CreateException {
System.out.println("ejbCreate2 Called");
if(companyID==null) {
throw new CreateException("Product id is requiered");
this.companyID=companyID;
this.name=name;
this.city=city;
this.state=state;
this.pin=pin;
this.address=address;
System.out.println("record inserted successfully");
// return null;
public void ejbPostCreate(String companyID,String name,String city,String state,String pin,String address)
throws RemoteException
{System.out.println("ejbPostCreate2 Called"); }
Iam using PrimaryKey Class.
primary key field :companyID
Thank you,
Raghuok...check ur client whether it has the following code.....if its a class cast exception then,may be this is the problem...
objref = initial.lookup("path...");
YourHome yourHome =
(YourHome)PortableRemoteObject.narrow(objref,
YourHome.class);
are u casting the object returned from the PortableRemoteObject to your home object ????? -
Cannot capture the exception generated by EJB components.
Hi, All:
I got a strange problem when developing EJB application under SAP WAS server. I developed an EJB as below:
public class UserAccountBean implements SessionBean{
String getUserEmail(String accountID) throws SAPSystemException{
if(error){
throw new SAPSystemException("Specified user not found.");
Exception I defined as below.
public class SAPSystemException extends Exception {
@param message
public SAPSystemException(String message) {
super(message);
In client side I code as below:
public String getUserMail(String accountID){
UserAccount bean = home.create();
try{
String email = bean.getUserEmail(accountID);
}catch(SAPSystemException e){
// do something here;
}catch(Exception e){
// do some other thing here;
It is strange that the SAPSystemException I throw out in the bean cannot be caught by the block catch(SAPSystemException e), it is only captured as general exception and it is said as UndeclaredThrowableException.
When I deployed EJB components and Web components together, the exception can be captured successfully. But when I deployed them separately, it has problem for exception capture. I think it must be the protocol problem. Before I only use RMI-IIOP but SAP WAS server using RMI-P4. Is anything I can do to solve this problem?
I packed the remote and home interface for the EJB and common classes like value objects and exceptions in both components. Is there anything I forgot to set for the deployment?
Thanks in advance.
Message was edited by: Weimin Guo
Message was edited by: Weimin GuoThank you very much Gregor. In fact, I already defined this throws exception in the remote object interface.
public interface UserAccount extends EJBObject {
public String getUserEmail(String accountID) throws RemoteException, SAPSystemException;
This is application-specific interface and this mechanism works well in my previous in other application server.
I checked the SAP document and found if you using RMI-IIOP, you need to get the client package for your deployed EJBs and put in the path accessible by the WEB components. Based on this suggestion, I put the EJB jar file together with WEB application (Sure the EJB application still deployed in other host and JNDI point to that host. I remembered one book mentioned that if you don't want generate the client package from EJB containter, you can do it this way. For me, I just haven't found the way to get the client package with Administrator Tool it said.), It works!!!. I checked the remote object generated by home object, it is different with EJB jar file there or not. But in the document SAP said that only if you use RMI-IIOP you need do this way, for RMI-P4, you don't need that. Anyway, it seems that RMI-P4 use same way as RMI-IIOP(You only don't need narrow the home object after lookup).
I'll try to find how to get EJB client package from WAS server. For this is my first time to use SAP WAS Server, things a little strange.
Thank you very much for your great help.
Cheers. -
Getting Exception while using JAVA code in XI
Hi,
We are using a JAVA code for encryption decryption, We have imported jce1_2_2.jar, local_policy.jar, sunjce_provider.jar and US_export_policy.jar .
Code is giving exception ": java.lang.SecurityException: The provider SunJCE may not be signed by a trusted party"
Same code is running fine in outside XI means in Eclipse(JAVA EDITOR).
Let me know how to resolve this issue.
ThanksHi vin,
>> Same code is running fine in outside XI means in Eclipse(JAVA EDITOR).
I also faced the same issue.
The reason may be with XIs limitations. The keys used to encrypt and decrypt should have key length supported by XI. Also, the algorithm used must be supported by XI.
Try Storing the keys inside TrustedCAs in Key storage.
Hope this helps.
Regards,
Uma
Maybe you are looking for
-
When I click on any of my movie or TV shows in Itunes I immediately get an error message that says Itunes has stopped working and closes the program. I can sync the movies and shows to my phone okay but I can't watch on Itunes. Can anyone help?
-
Hi When I print a calandar month, the month and year are top left on the paper so that when I hole-punch the page to stick in my filofax, the month has got a big hole in the middle. Is there a way of changing the print layout so that I can move the m
-
I have changed my apple id on the manage my apple id page. For some reason, the id didn't change on my macbook air. My iCloud still registered my old email id and I can't get it to recognize my correct id. Any ideas? Thanks!
-
Internet Explorer 8 will not open
I have been using Internet Explorer a long time with Windows XP SP3. Just recently I needed to do a download for another application and after that download finished I was unable to use Internet Explorer, I downloaded IE8 to try and fix the problem.
-
Floating point numbers into XML file
Hi, I am a learner in Labview and I am using Labview 8.5 version. when I use FlattentoXML component to convert floating point numbers ( having more than 5 decimal points) into XML, the output contains alway 5 decimal points. But, I want exact decimal