EJB Exception Layer Design Feedback

I am in the process of creating a EJB layer talking to EIS Tier via JCA adapter. The EJBs are all stateless. The EJBs would be used by servlets, ejbs, or jsps. The EJBs are stateless in nature. I would like to make sure the exception hierarchy I have is considered good design practice and if there are suggestions on how I may improve it. I decided to go for unchecked exception all through my design (this I don't want to change -- pretty sure about this).
So, here is how I designed my exception class. One of my goals was to keep the exception handling very simple at the client-side and not inundate customers with too many types of exceptions. I decided to go for a has-A type relationship to model much of the exceptions because I couldn’t really classify some of them to be a is-A. All exceptions thrown by my EJB layer would be contained within MyApplicationException. A getCause() will give insight into the cause at a very fine level. A getMessage() would suffice for most situations. Whereever exceptions are being thrown, the cause is being stored.
java.lang.Exception
--java.lang.RuntimeException
___ --MyBaseException
_______+----MyApplicationException (this is the container for all my exceptions)
_______+----MyConfigException
I created a exceptionhelper class that handles most of the exceptions and throws the right exception depending on the cause. For brevity sake, I am not including all code details in the sample below.
At the EIS Tier level, we have AutomationExceptions or Windows exception being thrown. These exceptions get thrown by the Windows code that is running in the EIS Tier (server). These exceptions are caught by the EJB code, then we do some processing like looking up the windows error code and producing the right message. The exception is then thrown back to the client with more information (MyApplicationException->getCause() would return AutomationException)
In the EJB code I have something like this….
try {
serverConn.connectToEISTier()
} catch (AutomatedException e) {
throw new MyApplicationException(“Custom Message.”, ExceptionHelper.handleAutomatedException(e)); }
At the EJB level
•we have create, and naming exceptions thrown either on failed lookup or something failing when creating the ejbs or there might be programming errors or there might be missing resources when EJB is trying to connect and possibly encounters data retrieval failures or Some sort of configuration error might be there in the deployment descriptor (user did soemthing wrong - wrong value for environment entry). All these are caught, and converted into runtime exception namely MyApplicationException. Where classification is deemed necessary we for e.g convert then contained exception to say configexception.
try {  
     lookup the context()
} catch(NamingException ex){
Cause = new myConfigException(“lookup failed because ….”);
Throw new MyApplicationException(cause);
At the transport level: some communication exception happened.
At the client level:
Client might be calling the apis wrongly and breaching the contract, or possibly supplied wrong credentials.
Please share feedback / thoughts.

There is an interesting article that discusses EJB Exception Layering:
http://www-128.ibm.com/developerworks/java/library/j-ejbexcept.html
As a rule of thumb: in every layer, create two types of exceptions that extend from the appropriate class (application exceptions and system exceptions). The next layer catches these and handles them appropriately. This way, you hide the implementation of the layers. An example where this is implemented is Spring.
To summarize, I like your idea, but I define exceptions for every layer and not put them in one hiearchy.
Regards,
Lonneke

Similar Messages

  • Java.rmi.RemoteException: EJB Exception: while calling an EJB method,

    Hi
    I am getting below error while calling a stateless EJB method. There is some validation checks while performing ejb's modify() method and a RuntimeException is thrown in case of validation failure.The modify() method internally calls other stateless ejb as well.
    The problem I'm facing is, instead of getting the expected RuntimeException in the Servlet, i am getting RemoteException. I am using WLS 9 MP1, all participating ejbs are stateless and i am using default transaction attributes(Supports) for these ejbs.
    The interesting part is, at the ejb layer RuntimeException is thrown as expected, but this exception changed to RemoteException at the servlet's end where i am catching the ejb call exceptions.
    I am new to WLS, please suggest/help me out of this exception.
    Any help is truly appreciated.
    java.rmi.RemoteException: EJB Exception: ; nested exception is: java.lang.RuntimeException:
         at weblogic.ejb.container.internal.EJBRuntimeUtils.throwRemoteException(EJBRuntimeUtils.java:95)
         at weblogic.ejb.container.internal.BaseEJBObject.handleSystemException(BaseEJBObject.java:713)
         at weblogic.ejb.container.internal.BaseEJBObject.handleSystemException(BaseEJBObject.java:681)
         at weblogic.ejb.container.internal.BaseEJBObject.postInvoke1(BaseEJBObject.java:447)
         at weblogic.ejb.container.internal.StatelessEJBObject.postInvoke1(StatelessEJBObject.java:72)
         at weblogic.ejb.container.internal.BaseEJBObject.postInvokeTxRetry(BaseEJBObject.java:374)
         at com.mycomp.base.BaseController_8x2e52_EOImpl.modify(BaseController_8x2e52_EOImpl.java:149)
         at com.mycomp.webgui.servlet.FrontComponent.service(FrontComponent.java:207)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:223)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3245)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2003)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1909)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1359)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
    Thanks!
    Edited by: user10721298 on Feb 23, 2009 4:16 AM

    Hi,
    If i don't misunderstand, you are using the RuntimeException as an application exception, right?
    Have you annotated it or denoted it in deployment descriptor?
    Thanks,
    Amy

  • EJB Exception occurred during invocation from home: com.bea.content.manager

    BEA 8.1 Team,
    Is there any limitation on BEA Repository such as number of nodes, etc.
    I have a serious production issue. All i could see from the LOG file is the stact trace which i have posted it here.
    ####<Aug 24, 2006 8:04:57 AM CDT> <Info> <EJB> <websrv11> <PORTALSRVR> <ExecuteThread: '99' for queue: 'weblogic.kernel.Default'> <jdcs1400> <BEA1-60BE09B7462F> <BEA-010051> <EJB Exception occurred during invocation from home: [email protected]67bc75 threw exception: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
         at java.lang.String.substring(String.java:1438)
         at java.lang.String.substring(String.java:1411)
         at com.bea.content.PathHelper.removeFirst(PathHelper.java:168)
         at com.bea.content.manager.internal.NodeOpsBean.getNode(NodeOpsBean.java:680)
         at com.bea.content.manager.internal.NodeOpsEJB_e40s0j_ELOImpl.getNode(NodeOpsEJB_e40s0j_ELOImpl.java:111)
         at com.bea.content.manager.servlets.ShowPropertyServlet.printNode(ShowPropertyServlet.java:180)
         at com.bea.content.manager.servlets.ShowPropertyServlet.doPost(ShowPropertyServlet.java:72)
         at com.bea.content.manager.servlets.ShowPropertyServlet.doGet(ShowPropertyServlet.java:64)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:293)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6724)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    >
    ####<Aug 24, 2006 8:04:57 AM CDT> <Error> <HTTP> <websrv11> <PORTALSRVR> <ExecuteThread: '99' for queue: 'weblogic.kernel.Default'> <<WLS Kernel>> <> <BEA-101020> <[ServletContext(id=30691960,name=myServicePoint,context-path=/myServicePoint)] Servlet failed with Exception
    javax.ejb.EJBException: EJB Exception: : java.lang.StringIndexOutOfBoundsException: String index out of range: -1
         at java.lang.String.substring(String.java:1438)
         at java.lang.String.substring(String.java:1411)
         at com.bea.content.PathHelper.removeFirst(PathHelper.java:168)
         at com.bea.content.manager.internal.NodeOpsBean.getNode(NodeOpsBean.java:680)
         at com.bea.content.manager.internal.NodeOpsEJB_e40s0j_ELOImpl.getNode(NodeOpsEJB_e40s0j_ELOImpl.java:111)
         at com.bea.content.manager.servlets.ShowPropertyServlet.printNode(ShowPropertyServlet.java:180)
         at com.bea.content.manager.servlets.ShowPropertyServlet.doPost(ShowPropertyServlet.java:72)
         at com.bea.content.manager.servlets.ShowPropertyServlet.doGet(ShowPropertyServlet.java:64)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:293)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6724)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    ; nested exception is: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
         at java.lang.String.substring(String.java:1438)
         at java.lang.String.substring(String.java:1411)
         at com.bea.content.PathHelper.removeFirst(PathHelper.java:168)
         at com.bea.content.manager.internal.NodeOpsBean.getNode(NodeOpsBean.java:680)
         at com.bea.content.manager.internal.NodeOpsEJB_e40s0j_ELOImpl.getNode(NodeOpsEJB_e40s0j_ELOImpl.java:111)
         at com.bea.content.manager.servlets.ShowPropertyServlet.printNode(ShowPropertyServlet.java:180)
         at com.bea.content.manager.servlets.ShowPropertyServlet.doPost(ShowPropertyServlet.java:72)
         at com.bea.content.manager.servlets.ShowPropertyServlet.doGet(ShowPropertyServlet.java:64)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:293)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6724)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    javax.ejb.EJBException: EJB Exception: : java.lang.StringIndexOutOfBoundsException: String index out of range: -1
         at java.lang.String.substring(String.java:1438)
         at java.lang.String.substring(String.java:1411)
         at com.bea.content.PathHelper.removeFirst(PathHelper.java:168)
         at com.bea.content.manager.internal.NodeOpsBean.getNode(NodeOpsBean.java:680)
         at com.bea.content.manager.internal.NodeOpsEJB_e40s0j_ELOImpl.getNode(NodeOpsEJB_e40s0j_ELOImpl.java:111)
         at com.bea.content.manager.servlets.ShowPropertyServlet.printNode(ShowPropertyServlet.java:180)
         at com.bea.content.manager.servlets.ShowPropertyServlet.doPost(ShowPropertyServlet.java:72)
         at com.bea.content.manager.servlets.ShowPropertyServlet.doGet(ShowPropertyServlet.java:64)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:293)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6724)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    ; nested exception is: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
         at weblogic.ejb20.internal.EJBRuntimeUtils.throwEJBException(EJBRuntimeUtils.java:152)
         at weblogic.ejb20.internal.BaseEJBLocalHome.handleSystemException(BaseEJBLocalHome.java:232)
         at weblogic.ejb20.internal.BaseEJBLocalObject.postInvoke(BaseEJBLocalObject.java:326)
         at com.bea.content.manager.internal.NodeOpsEJB_e40s0j_ELOImpl.getNode(NodeOpsEJB_e40s0j_ELOImpl.java:122)
         at com.bea.content.manager.servlets.ShowPropertyServlet.printNode(ShowPropertyServlet.java:180)
         at com.bea.content.manager.servlets.ShowPropertyServlet.doPost(ShowPropertyServlet.java:72)
         at com.bea.content.manager.servlets.ShowPropertyServlet.doGet(ShowPropertyServlet.java:64)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:293)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6724)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    >
    Any help would be greatly appreciated!!
    Thanks in Advance,
    -Nach.

    Hi Dragan,
    First of all we need to put some debug (System.out.println) to findout exactly which object reference is actually becoming NULL. From there only we can start diagnosis on this issue. that's the root. It should be very easy for your Developers to put some debug on that...because the NullPointerException is being thrown by your code...I m not Blaming on your Code... WLS may be responsible for that...but first of all we need to find out Which Object is becoming NULL.
    Thanks
    Jay SenSharma
    http://jaysensharma.wordpress.com (WebLogic Wonders Are Here)

  • EJB Exception occurred during invocation from home or business:

    Friends,
    I have ejb application deployed in weblogic 10.3 with cluster environment. I have configured the following ejb-jar.xml
    <session>
    <ejb-name>PartSL</ejb-name>
    <home>com.gm.tm.ejb.session.part.PartSLHome</home>
    <remote>com.gm.tm.ejb.session.part.PartSL</remote>
    <ejb-class>com.gm.tm.ejb.session.part.PartSLBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    <ejb-ref>
    <ejb-ref-name>ejb/PartBM</ejb-ref-name>
    <ejb-ref-type>Entity</ejb-ref-type>
    <home>com.gm.tm.ejb.entity.partbm.PartHome</home>
    <remote>com.gm.tm.ejb.entity.partbm.Part</remote>
    <ejb-link>PartBM</ejb-link>
    </ejb-ref>
    <resource-ref>
    <description></description>
    <res-ref-name>jdbc/ToolMoveDS</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </session>
    Sometimes when user doing some manupulation, this object getting disapper and getting the error as EJB Exception occurred during invocation from home or business: com.gm.tm.ejb.session.part.PartSL_ex1s88_HomeImpl@175f214 threw exception: javax.ejb.EJBException: nested exception is: javax.naming.LinkException: [Root exception is javax.naming.NameNotFoundException: Unable to resolve 'PartBM'. Resolved '' [Root exception is javax.naming.NameNotFoundException: Unable to resolve 'PartBM'. Resolved '']; remaining name 'PartBM']; Link Remaining Name: 'PartBM'>
    JNDI tree is clusterable but is incompatible. Make sure all the servers in the cluster use the identical copy of object.
    Pls let me know if anyone know the root cause and i am new to EJB too. So pls help if anyone know better solution for this

    Yes exactly..Let me explain clearly. assume its deployed now and user started using that particular module. It works fine. Later point time like after few days or after few simultenous navigation of that particular ejb jndi object from the application, this exception comes. So for the short time fix, i restart the server and it will work fine and then after few hours/days , this exception comes and i need to restart again. So i need a permanent solution to avoid this issue.

  • BEA-010051 EJB Exception occurred during invocation from home:

    Hi,
    I am getting this exception (below)in the production env. the process is every night my application would load the data which is present in a perticular folder in to the database. After this process has continued for some days this error comes. This error started comming after i did some code changes where in i log all the actions which take place while loading into the database.
    It would be of great help if someone could help me out here.
    weblogic log:
    ####<14-Mar-2007 18:00:00 o'clock GMT> <Info> <Log Management> <dygwt01> <managed1_caprprd> <ExecuteThread: '1' for queue: 'weblogic.kernel.Default'> <<WLS Kernel>> <> <BEA-170018> <The log file has been rotated to managed1_caprprd.log00300. Log messages will continue to be logged in /wls_domains/caprprd/logs/bea/managed1_caprprd.log.>
    ####<14-Mar-2007 18:00:00 o'clock GMT> <Info> <null> <unknown> <unknown> <ExecuteThread: '1' for queue: 'weblogic.kernel.Default'> <null> <null> <000000> <LogRotation trigger for logfile /wls_domains/caprprd/logs/bea/managed1_caprprd.log>
    ####<15-Mar-2007 04:21:04 o'clock GMT> <Info> <EJB> <dygwt01> <managed1_caprprd> <ExecuteThread: '11' for queue: 'weblogic.kernel.Default'> <<anonymous>> <BEA1-20908C95ED2F2185AF9E> <BEA-010051> <EJB Exception occurred during invocation from home: com.bt.pe.capreg.serv.ejb.WebService_auhh9w_HomeImpl@1ba3c1f threw exception: java.lang.NullPointerException
    java.lang.NullPointerException
    >
    ####<15-Mar-2007 04:21:05 o'clock GMT> <Info> <EJB> <dygwt01> <managed1_caprprd> <ExecuteThread: '11' for queue: 'weblogic.kernel.Default'> <<anonymous>> <BEA1-20928C95ED2F2185AF9E> <BEA-010051> <EJB Exception occurred during invocation from home: com.bt.pe.capreg.serv.ejb.WebService_auhh9w_HomeImpl@1ba3c1f threw exception: java.lang.NullPointerException
    java.lang.NullPointerException
    >
    ####<15-Mar-2007 04:21:19 o'clock GMT> <Info> <EJB> <dygwt01> <managed1_caprprd> <ExecuteThread: '11' for queue: 'weblogic.kernel.Default'> <<anonymous>> <BEA1-209A8C95ED2F2185AF9E> <BEA-010051> <EJB Exception occurred during invocation from home: com.bt.pe.capreg.serv.ejb.WebService_auhh9w_HomeImpl@1ba3c1f threw exception: java.lang.NullPointerException
    java.lang.NullPointerException
    >
    ####<15-Mar-2007 04:21:20 o'clock GMT> <Info> <EJB> <dygwt01> <managed1_caprprd> <ExecuteThread: '11' for queue: 'weblogic.kernel.Default'> <<anonymous>> <BEA1-209C8C95ED2F2185AF9E> <BEA-010051> <EJB Exception occurred during invocation from home: com.bt.pe.capreg.serv.ejb.WebService_auhh9w_HomeImpl@1ba3c1f threw exception: java.lang.NullPointerException
    java.lang.NullPointerException
    >
    ####<15-Mar-2007 04:21:31 o'clock GMT> <Info> <EJB> <dygwt01> <managed1_caprprd> <ExecuteThread: '11' for queue: 'weblogic.kernel.Default'> <<anonymous>> <BEA1-20A18C95ED2F2185AF9E> <BEA-010051> <EJB Exception occurred during invocation from home: com.bt.pe.capreg.serv.ejb.WebService_auhh9w_HomeImpl@1ba3c1f threw exception: java.lang.NullPointerException
    java.lang.NullPointerException
    >
    ####<15-Mar-2007 04:21:31 o'clock GMT> <Info> <EJB> <dygwt01> <managed1_caprprd> <ExecuteThread: '11' for queue: 'weblogic.kernel.Default'> <<anonymous>> <BEA1-20A38C95ED2F2185AF9E> <BEA-010051> <EJB Exception occurred during invocation from home: com.bt.pe.capreg.serv.ejb.WebService_auhh9w_HomeImpl@1ba3c1f threw exception: java.lang.NullPointerException
    java.lang.NullPointerException
    >
    ####<15-Mar-2007 04:21:31 o'clock GMT> <Info> <EJB> <dygwt01> <managed1_caprprd> <ExecuteThread: '11' for queue: 'weblogic.kernel.Default'> <<anonymous>> <BEA1-20A58C95ED2F2185AF9E> <BEA-010051> <EJB Exception occurred during invocation from home: com.bt.pe.capreg.serv.ejb.WebService_auhh9w_HomeImpl@1ba3c1f threw exception: java.lang.NullPointerException
    java.lang.NullPointerException
    >
    ####<15-Mar-2007 04:21:41 o'clock GMT> <Info> <EJB> <dygwt01> <managed1_caprprd> <ExecuteThread: '11' for queue: 'weblogic.kernel.Default'> <<anonymous>> <BEA1-20AC8C95ED2F2185AF9E> <BEA-010051> <EJB Exception occurred during invocation from home: com.bt.pe.capreg.serv.ejb.WebService_auhh9w_HomeImpl@1ba3c1f threw exception: java.lang.NullPointerException
    java.lang.NullPointerException
    >
    ####<15-Mar-2007 04:22:48 o'clock GMT> <Info> <EJB> <dygwt01> <managed1_caprprd> <ExecuteThread: '11' for queue: 'weblogic.kernel.Default'> <<anonymous>> <BEA1-20D38C95ED2F2185AF9E> <BEA-010051> <EJB Exception occurred during invocation from home: com.bt.pe.capreg.serv.ejb.WebService_auhh9w_HomeImpl@1ba3c1f threw exception: java.lang.NullPointerException
    java.lang.NullPointerException
    >
    ####<15-Mar-2007 04:22:58 o'clock GMT> <Info> <EJB> <dygwt01> <managed1_caprprd> <ExecuteThread: '11' for queue: 'weblogic.kernel.Default'> <<anonymous>> <BEA1-20D98C95ED2F2185AF9E> <BEA-010051> <EJB Exception occurred during invocation from home: com.bt.pe.capreg.serv.ejb.WebService_auhh9w_HomeImpl@1ba3c1f threw exception: java.lang.NullPointerException
    java.lang.NullPointerException
    >
    ####<15-Mar-2007 04:23:08 o'clock GMT> <Info> <EJB> <dygwt01> <managed1_caprprd> <ExecuteThread: '11' for queue: 'weblogic.kernel.Default'> <<anonymous>> <BEA1-20DB8C95ED2F2185AF9E> <BEA-010051> <EJB Exception occurred during invocation from home: com.bt.pe.capreg.serv.ejb.WebService_auhh9w_HomeImpl@1ba3c1f threw exception: java.lang.NullPointerException
    java.lang.NullPointerException
    >
    ####<15-Mar-2007 04:23:10 o'clock GMT> <Info> <EJB> <dygwt01> <managed1_caprprd> <ExecuteThread: '11' for queue: 'weblogic.kernel.Default'> <<anonymous>> <BEA1-20DD8C95ED2F2185AF9E> <BEA-010051> <EJB Exception occurred during invocation from home: com.bt.pe.capreg.serv.ejb.WebService_auhh9w_HomeImpl@1ba3c1f threw exception: java.lang.NullPointerException
    java.lang.NullPointerException
    >
    ####<15-Mar-2007 04:23:12 o'clock GMT> <Info> <EJB> <dygwt01> <managed1_caprprd> <ExecuteThread: '11' for queue: 'weblogic.kernel.Default'> <<anonymous>> <BEA1-20DF8C95ED2F2185AF9E> <BEA-010051> <EJB Exception occurred during invocation from home: com.bt.pe.capreg.serv.ejb.WebService_auhh9w_HomeImpl@1ba3c1f threw exception: java.lang.NullPointerException
    java.lang.NullPointerException
    >
    ####<15-Mar-2007 04:23:19 o'clock GMT> <Info> <EJB> <dygwt01> <managed1_caprprd> <ExecuteThread: '11' for queue: 'weblogic.kernel.Default'> <<anonymous>> <BEA1-20E58C95ED2F2185AF9E> <BEA-010051> <EJB Exception occurred during invocation from home: com.bt.pe.capreg.serv.ejb.WebService_auhh9w_HomeImpl@1ba3c1f threw exception: java.lang.NullPointerException
    java.lang.NullPointerException
    >
    ####<15-Mar-2007 04:23:22 o'clock GMT> <Info> <EJB> <dygwt01> <managed1_caprprd> <ExecuteThread: '11' for queue: 'weblogic.kernel.Default'> <<anonymous>> <BEA1-20E78C95ED2F2185AF9E> <BEA-010051> <EJB Exception occurred during invocation from home: com.bt.pe.capreg.serv.ejb.WebService_auhh9w_HomeImpl@1ba3c1f threw exception: java.lang.NullPointerException
    java.lang.NullPointerException
    >
    ####<15-Mar-2007 04:23:47 o'clock GMT> <Info> <EJB> <dygwt01> <managed1_caprprd> <ExecuteThread: '11' for queue: 'weblogic.kernel.Default'> <<anonymous>> <BEA1-21008C95ED2F2185AF9E> <BEA-010051> <EJB Exception occurred during invocation from home: com.bt.pe.capreg.serv.ejb.WebService_auhh9w_HomeImpl@1ba3c1f threw exception: java.lang.NullPointerException
    java.lang.NullPointerException
    >
    ####<15-Mar-2007 05:36:53 o'clock GMT> <Info> <Security> <dygwt01> <managed1_caprprd> <ExecuteThread: '0' for queue: 'weblogic.kernel.Default'> <<WLS Kernel>> <> <BEA-090067> <User lockout expired, unlocking user 602054364 in security realm myrealm.>
    ####<15-Mar-2007 05:45:21 o'clock GMT> <Notice> <Security> <dygwt01> <managed1_caprprd> <ExecuteThread: '11' for queue: 'weblogic.kernel.Default'> <<WLS Kernel>> <> <BEA-090078> <User 602054364 in security realm myrealm has had 5 invalid login attempts, locking account for 30 minutes.>
    ####<15-Mar-2007 06:31:03 o'clock GMT> <Info> <EJB> <dygwt01> <managed1_caprprd> <ExecuteThread: '11' for queue: 'weblogic.kernel.Default'> <<anonymous>> <BEA1-221A8C95ED2F2185AF9E> <BEA-010051> <EJB Exception occurred during invocation from home: com.bt.pe.capreg.serv.ejb.WebService_auhh9w_HomeImpl@1ba3c1f threw exception: java.lang.NullPointerException
    java.lang.NullPointerException
         at com.bt.pe.capreg.serv.ejb.WebServiceBean.getBlobBytes(WebServiceBean.java:1068)
         at com.bt.pe.capreg.serv.ejb.WebService_auhh9w_EOImpl.getBlobBytes(WebService_auhh9w_EOImpl.java:5026)
         at com.bt.pe.capreg.serv.ejb.WebService_auhh9w_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:166)
         at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:290)
         at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:247)
         at com.bt.pe.capreg.serv.ejb.WebService_auhh9w_EOImpl_814_WLStub.getBlobBytes(Unknown Source)
         at com.bt.pe.capreg.web.action.GetBlobAction.execute(GetBlobAction.java:29)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
         at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at com.bt.pe.capreg.web.servlet.TargetNameSpaceFilter.doFilter(TargetNameSpaceFilter.java:48)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at com.bt.pe.capreg.web.servlet.AuthorizationFilter.doFilter(AuthorizationFilter.java:22)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at com.bt.pe.capreg.web.servlet.SMHeaderFilter.doFilter(SMHeaderFilter.java:21)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:39)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:326)
         at com.bt.pe.capreg.web.servlet.BlobServlet.doGet(BlobServlet.java:19)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at com.bt.pe.capreg.web.servlet.TargetNameSpaceFilter.doFilter(TargetNameSpaceFilter.java:45)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at com.bt.pe.capreg.web.servlet.AuthorizationFilter.doFilter(AuthorizationFilter.java:22)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at com.bt.pe.capreg.web.servlet.SMHeaderFilter.doFilter(SMHeaderFilter.java:21)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:39)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6724)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    >

    Hi Sai,
    Below are the observation
    In Weblogic 8.1 sp6
    User : system
    Group Assigned : Administrators and OSSTrmi
    Group OSStrmi have assigned under Administrators as well
    In Weblogic 10.3.3
    User : system
    Group Assigned : Administrators
    Group OSSTrmi  is not assigned under Administrators
    Difference in assignment. here it seems. Please suggest
    Thx
    Sudip

  • Moving web-application from WebLogic 10.0.0 to 10.3.3 - EJB Exception

    Hello all,
    I've moved my web-application from weblogic 10.0.0 to the new platform with Weblogic 10.3.3. After this I had some JMSEceptions (unable to run JMS methods inside of servlet or EJB) and they were fixed. For now I got new exception:
    ####<07.12.2012 16:03:06 FET> <Info> <EJB> <pc-XXXXXX> <AdminServer> <[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <BEA1-00340877198035A73969> <1354885386932> <BEA-010227> <EJB Exception occurred during invocation from home or business: weblogic.ejb.container.internal.StatelessEJBHomeImpl@14df37f threw exception: javax.ejb.EJBTransactionRolledbackException: EJB Exception: : java.lang.ClassCastException: com.XXX.XXXX.XXXXXX.persistence.OperatorBean cannot be cast to com.XXX.XXXX.XXXXXX.persistence.SwitchboardBean
    at com.XXX.XXXX.XXXXXX.SwitchboardDataImpl.initialize(SwitchboardDataImpl.java:147) // itsSwitchboardBean = itsEntityManager.find(SwitchboardBean.class, switchboardNumber);
    at com.XXX.XXXX.XXXXXX.SwitchboardDataImpl.create(SwitchboardDataImpl.java:86)
    at com.XXX.XXXX.XXXXXX.SwitchboardDataEJB.create(SwitchboardDataEJB.java:64)
    persistence.xml:
    ... <persistence-unit name="xxxSwitchboard_PU" transaction-type="JTA">
    <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
    <jta-data-source>jdbc/xxSwitchboard</jta-data-source>
    <non-jta-data-source>jdbc/xxSwitchboard</non-jta-data-source>
    <class>com.XXX.XXXX.XXXXXX.switchboard.persistence.OwnerBean</class>
    <class>com.XXX.XXXX.XXXXXX.switchboard.persistence.OperatorBean</class>
    <class>com.XXX.XXXX.XXXXXX.switchboard.persistence.SwitchboardBean</class>
    <class>com.XXX.XXXX.XXXXXX.switchboard.persistence.CallBean</class>
    <exclude-unlisted-classes>false</exclude-unlisted-classes>
    </persistence-unit>...
    @Entity
    public class OperatorBean extends OwnerBean
    @ManyToOne(optional = true, fetch = FetchType.EAGER)
    private SwitchboardBean switchboard;
    @Entity
    public class SwitchboardBean extends OwnerBean
    @OneToMany(mappedBy = "switchboard", cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)
    private List<OperatorBean> itsOperators = new ArrayList<OperatorBean>();
    Seems that it happened due to updating weblogic version (changes in jee, jms, ejb, jpa versions?). Could you please advice me how to fix this issue?
    Thanks, Ilya

    I belive there is no problems for this change, because the versions are the same for java at least for OaS, for weblogic you should see documentation. I think you can try deploying you app to new environment if you get any noclassdeffound error or something like it then you could have problems for versions.
    Regards

  • Java.rmi.RemoteException: EJB Exception: ; nested exception is:

    Hi All,
    Please some out help me out,
    i have a written a stateless session bean, which is compiled with out errors, and i deployed it in wblogic server.
    when i run my client program, i get this exceptions. please some one help me how to tackle this,
    Thanks in advance,
    java.rmi.RemoteException: EJB Exception: ; nested exception is:
    java.lang.NoClassDefFoundError: secure/SDK/SAPIAgent
    Start server side stack trace:
    java.rmi.RemoteException: EJB Exception: ; nested exception is:
    java.lang.NoClassDefFoundError: SDK/SAPIAgent
    java.lang.NoClassDefFoundError: SDK/SAPIAgent
    at SAPI.SAPIBean.<init>(SAPIBean.java:18)
    at SAPI.SAPIBean_163r2w_Impl.<init>(SAPIBean_163r2w_Impl.java:31)
    at java.lang.Class.newInstance0(Native Method)
    at java.lang.Class.newInstance(Class.java:232)
    at weblogic.ejb20.manager.BaseEJBManager.allocateBean(BaseEJBManager.java:129)
    at weblogic.ejb20.manager.StatelessManager.createBean(StatelessManager.java:266)
    at weblogic.ejb20.pool.StatelessSessionPool.createBean(StatelessSessionPool.java:148)
    at weblogic.ejb20.pool.StatelessSessionPool.getBean(StatelessSessionPool.java:101)
    at weblogic.ejb20.manager.StatelessManager.preInvoke(StatelessManager.java:142)
    at weblogic.ejb20.internal.BaseEJBObject.preInvoke(BaseEJBObject.java:138)
    at weblogic.ejb20.internal.StatelessEJBObject.preInvoke(StatelessEJBObject.java:70)
    at valyd.SAPI.SAPIBean_163r2w_EOImpl.getSession(SAPIBean_163r2w_EOImpl.java:234)
    at valyd.SAPI.SAPIBean_163r2w_EOImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:455)
    at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:114)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:396)
    at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:731)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:391)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:261)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:223)
    End server side stack trace
    ; nested exception is: java.lang.NoClassDefFoundError: SDK/SAPIAgent
    Murali

    Hi All,
    Please some out help me out,
    i have a written a stateless session bean, which is compiled with out errors, and i deployed it in wblogic server.
    when i run my client program, i get this exceptions. please some one help me how to tackle this,
    Thanks in advance,
    java.rmi.RemoteException: EJB Exception: ; nested exception is:
    java.lang.NoClassDefFoundError: secure/SDK/SAPIAgent
    Start server side stack trace:
    java.rmi.RemoteException: EJB Exception: ; nested exception is:
    java.lang.NoClassDefFoundError: SDK/SAPIAgent
    java.lang.NoClassDefFoundError: SDK/SAPIAgent
    at SAPI.SAPIBean.<init>(SAPIBean.java:18)
    at SAPI.SAPIBean_163r2w_Impl.<init>(SAPIBean_163r2w_Impl.java:31)
    at java.lang.Class.newInstance0(Native Method)
    at java.lang.Class.newInstance(Class.java:232)
    at weblogic.ejb20.manager.BaseEJBManager.allocateBean(BaseEJBManager.java:129)
    at weblogic.ejb20.manager.StatelessManager.createBean(StatelessManager.java:266)
    at weblogic.ejb20.pool.StatelessSessionPool.createBean(StatelessSessionPool.java:148)
    at weblogic.ejb20.pool.StatelessSessionPool.getBean(StatelessSessionPool.java:101)
    at weblogic.ejb20.manager.StatelessManager.preInvoke(StatelessManager.java:142)
    at weblogic.ejb20.internal.BaseEJBObject.preInvoke(BaseEJBObject.java:138)
    at weblogic.ejb20.internal.StatelessEJBObject.preInvoke(StatelessEJBObject.java:70)
    at valyd.SAPI.SAPIBean_163r2w_EOImpl.getSession(SAPIBean_163r2w_EOImpl.java:234)
    at valyd.SAPI.SAPIBean_163r2w_EOImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:455)
    at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:114)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:396)
    at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:731)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:391)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:261)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:223)
    End server side stack trace
    ; nested exception is: java.lang.NoClassDefFoundError: SDK/SAPIAgent
    Murali

  • EJB Exception : getEnvironment is deprecated

    (Note : this question has been posted in 81beta.server.ejb also)
    Hi All,
    I am getting EJB Exception while deploying my ear file which contains a simple
    stateless session bean (jar module) and a jsp accessing the SSB. (WLS 8.1)
    Here is my code snippet that looks up SSB.
    Hashtable ht = new Hashtable();
    ht.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
    ht.put(Context.PROVIDER_URL,"t3://192.168.66.39:7001");
    try { Context ctx = new InitialContext(ht);
    DemoHome1 d1 = (DemoHome1)ctx.lookup("java:comp/env/ejb1");
    Demo1 demo = d1.create();
    String str1 = demo.demoSelect();
    System.out.println("Result from DemoBean : " + str1); }
    Here is my <ejb-ref> element in web.xml
    <ejb-ref>
    <ejb-ref-name>ejb1</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>ejb.demo.DemoHome1</home>
    <remote>ejb.demo.Demo1</remote>
    <ejb-link>../Demo.jar#DemoBean</ejb-link>
    </ejb-ref>
    And the exception is here
    <Jul 17, 2003 10:24:45 AM IST> <Error> <HTTP> <BEA-101019> <[ServletContext(id=5950347,name=sampletest,context-path=/sampletest)]
    Servlet failed with IOException java.rmi.RemoteException: EJB Exception: ; nested
    exception is: java.lang.RuntimeException: [EJB:010183]javax.ejb.EJBContext.getEnvironment
    is deprecated in EJB 1.1. EJB 1.1 compliant containers are not required to implement
    this method. Use java:comp/env instead. at weblogic.ejb20.internal.EJBRuntimeUtils.throwRemoteException(EJBRuntimeUtils.java:103)
    at weblogic.ejb20.internal.BaseEJBHome.handleSystemException(BaseEJBHome.java:304)
    at weblogic.ejb20.internal.BaseEJBObject.preInvoke(BaseEJBObject.java:140) at
    weblogic.ejb20.internal.StatelessEJBObject.preInvoke(StatelessEJBObject.java:70)
    at ejb.demo.DemoBean_c3ndjf_EOImpl.demoSelect(DemoBean_c3ndjf_EOImpl.java:28)
    at jsp_servlet.__sampletest._jspService(__sampletest.java:144) at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1053)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:387)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:431)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6291)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:97) at
    weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3575)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2573)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:178) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:151)
    Caused by: java.lang.RuntimeException: [EJB:010183]javax.ejb.EJBContext.getEnvironment
    is deprecated in EJB 1.1. EJB 1.1 compliant containers are not required to implement
    this method. Use java:comp/env instead. at weblogic.ejb20.internal.BaseEJBContext.getEnvironment(BaseEJBContext.java:279)
    at ejb.demo.DemoBean1.setSessionContext(DemoBean1.java:48) at ejb.demo.DemoBean_c3ndjf_Impl.setSessionContext(DemoBean_c3ndjf_Impl.java:111)
    at weblogic.ejb20.manager.StatelessManager.createBean(StatelessManager.java:267)
    at weblogic.ejb20.pool.StatelessSessionPool.createBean(StatelessSessionPool.java:157)
    at weblogic.ejb20.pool.StatelessSessionPool.getBean(StatelessSessionPool.java:109)
    at weblogic.ejb20.manager.StatelessManager.preInvoke(StatelessManager.java:140)
    at weblogic.ejb20.internal.BaseEJBObject.preInvoke(BaseEJBObject.java:130) ...
    15 more
    >
    Anybody faced the same kind of problem and have an idea about the solution? Please.
    Thanks Prema

    Thanks for your Help, Rob.
    Problem because of ctx.getEnvironment() in my setSessionContext()
    Thanks
    Prema
    Rob Woollen <[email protected]> wrote:
    The error is coming from your EJB, not a webapp. Somewhere in your EJB,
    you're calling EJBContext.getEnvironment.
    -- Rob
    Prema wrote:
    Rob Woollen <[email protected]> wrote:
    Your EJB called the EJB 1.0! method EJBContext.getEnvironment. As
    the
    exception mentions, wee don't implement that method anymore and throw
    a
    RuntimeException.
    You should be using java:/comp/env to get to environment properties.
    -- Rob
    Prema wrote:
    (Note : this question has been posted in 81beta.server.ejb also)
    Hi All,
    I am getting EJB Exception while deploying my ear file which containsa simple
    stateless session bean (jar module) and a jsp accessing the SSB. (WLS8.1)
    Here is my code snippet that looks up SSB.
    Hashtable ht = new Hashtable();
    ht.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
    ht.put(Context.PROVIDER_URL,"t3://192.168.66.39:7001");
    try { Context ctx = new InitialContext(ht);
    DemoHome1 d1 = (DemoHome1)ctx.lookup("java:comp/env/ejb1");
    Demo1 demo = d1.create();
    String str1 = demo.demoSelect();
    System.out.println("Result from DemoBean : " + str1); }
    Here is my <ejb-ref> element in web.xml
    <ejb-ref>
    <ejb-ref-name>ejb1</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>ejb.demo.DemoHome1</home>
    <remote>ejb.demo.Demo1</remote>
    <ejb-link>../Demo.jar#DemoBean</ejb-link>
    </ejb-ref>
    And the exception is here
    <Jul 17, 2003 10:24:45 AM IST> <Error> <HTTP> <BEA-101019> <[ServletContext(id=5950347,name=sampletest,context-path=/sampletest)]
    Servlet failed with IOException java.rmi.RemoteException: EJB Exception:; nested
    exception is: java.lang.RuntimeException: [EJB:010183]javax.ejb.EJBContext.getEnvironment
    is deprecated in EJB 1.1. EJB 1.1 compliant containers are not requiredto implement
    this method. Use java:comp/env instead. at weblogic.ejb20.internal.EJBRuntimeUtils.throwRemoteException(EJBRuntimeUtils.java:103)
    at weblogic.ejb20.internal.BaseEJBHome.handleSystemException(BaseEJBHome.java:304)
    at weblogic.ejb20.internal.BaseEJBObject.preInvoke(BaseEJBObject.java:140)at
    weblogic.ejb20.internal.StatelessEJBObject.preInvoke(StatelessEJBObject.java:70)
    at ejb.demo.DemoBean_c3ndjf_EOImpl.demoSelect(DemoBean_c3ndjf_EOImpl.java:28)
    at jsp_servlet.__sampletest._jspService(__sampletest.java:144) at
    weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1053)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:387)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:431)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6291)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:97)at
    weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3575)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2573)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:178) atweblogic.kernel.ExecuteThread.run(ExecuteThread.java:151)
    Caused by: java.lang.RuntimeException: [EJB:010183]javax.ejb.EJBContext.getEnvironment
    is deprecated in EJB 1.1. EJB 1.1 compliant containers are not requiredto implement
    this method. Use java:comp/env instead. at weblogic.ejb20.internal.BaseEJBContext.getEnvironment(BaseEJBContext.java:279)
    at ejb.demo.DemoBean1.setSessionContext(DemoBean1.java:48) at ejb.demo.DemoBean_c3ndjf_Impl.setSessionContext(DemoBean_c3ndjf_Impl.java:111)
    at weblogic.ejb20.manager.StatelessManager.createBean(StatelessManager.java:267)
    at weblogic.ejb20.pool.StatelessSessionPool.createBean(StatelessSessionPool.java:157)
    at weblogic.ejb20.pool.StatelessSessionPool.getBean(StatelessSessionPool.java:109)
    at weblogic.ejb20.manager.StatelessManager.preInvoke(StatelessManager.java:140)
    at weblogic.ejb20.internal.BaseEJBObject.preInvoke(BaseEJBObject.java:130)...
    15 more
    Anybody faced the same kind of problem and have an idea about the
    solution?
    Please.
    Thanks Prema
    Hi,
    I tried using JNDI name directly.
    DemoHome1 d1 = (DemoHome1) ctx.lookup("DemoBean");
    //DemoBean is my JNDI name
    It is still displaying same error. What's wrong ? What's the exactway of
    looking up an ejb from a web module in WLS 8.1 ?
    Thanks in advance
    Prema
    >

  • Do I make more then one diagram in Multi layer design Diagrams?

    Do you make more then one Diagrams for Multi layer diagrams?
    develop the multi layer design. ?
    So I had to make a SSD or sequence Diagram now we have to make a multi design diagram?
    for the multi design. will we just be creating one big diagram of the assignment for this part?
    or is it going to be a collection of a bunch of separate diagrams. as books shows a few of them? regarding layers?
    For example create a diagram to cover all different layers/steps
    So should be a collection of 3 or more diagrams for Part 3 of TMA3
    do I have this correct?

    Just click on "Buy" one at a time. If you do them all in one sitting, they will be grouped as a single charge on your credit card.
    Some online music download stores have the ability to combine multiple miscellaneous tracks into a single zip file for purchase and download, but the iTunes Store does not work that way.

  • Error javax.transaction.TransactionRolledbackException: EJB Exception

    Good afternoon, appeared to me the following error, anyone know what it is?
    oracle.iam.connectors.common.dao.OIMUtil : OIMUtil() : EJB Exception: : javax.transaction.TransactionRolledbackException: EJB Exception

    Hi,
    Thanks for the info..But I can't seem to figure out what wrong in my SP.
    This is my stored proc. and line no.20 pointing to ORA-06152 is the insert statement..
    Can someone help me out please!!
    CREATE OR REPLACE PROCEDURE "DBS1"."INS_EXPENSE"
    ( expense_type in VARCHAR2
    , party_payed_to in VARCHAR2
    , expense_amount in NUMBER
    , bill_date in DATE
    , booked_date in DATE
    , payed_from_acc in VARCHAR2
    , payed_to_acc in VARCHAR2
    , payment_mode in VARCHAR2
    , status in VARCHAR2
    , comment in VARCHAR2
    , entry_userid in VARCHAR2
    , last_chg_userid in VARCHAR2
    , expense_no out NUMBER
    IS
    BEGIN
    select max(EXPENSE_NO) into expense_no from DBS1.EXPENSE;
    expense_no := expense_no + 1;
    insert into DBS1.EXPENSE (EXPENSE_NO,EXPENSE_TYPE,PARTY_PAYED_TO
    ,EXPENSE_AMOUNT,BILL_DATE,BOOKED_DATE,PAYED_FROM_ACC,PAYED_TO_ACC
    ,PAYMENT_MODE,STATUS,COMMENT,ENTRY_TIMESTAMP,ENTRY_USERID
    ,LAST_CHANGE_TIMESTAMP,LAST_CHANGE_USERID) VALUES
    (expense_no,expense_type,party_payed_to,expense_amount,TO_DATE(bill_date,'yyyy-mm-dd')
    ,TO_DATE(booked_date,'yyyy-mm-dd'),payed_from_acc,payed_to_acc,payment_mode,status
    ,comment,SYSDATE,entry_userid,SYSDATE,last_chg_userid);
    END INS_EXPENSE;
    TIA

  • EJB/RMI collaboration & design issue

    Hi there,
    I am in the process of migrating a JSP/servlet application to EJB. In
    the current version of the application, I have a Log class which is used
    to output trace & debugging information. One instance of this class is
    instanciated at the application startup and stored in a singleton which
    is referenced all over the application.
    Because I want my application to be distributed and fail-over ready,
    I've decided to move this Log class and a couple of other technical
    services to RMI. When the application starts-up, I instanciate the RMI
    Log class and everytime I use an EJB, I want to pass him the RMI Log
    class interface. But this does not seem to work, I receive a Marshall
    exception.
    What are the different design patterns to make my EJBs aware of my RMI
    classes ?
    Thanks,
    Stephane

    Thanks Joe,
    When I insert the JNDI Log lookup in the EJB instanciation code, it works but
    I want to avoid every EJB instanciation to lookup for the Log service in
    order to make the code faster. That's why I want to look it up only once when
    the application is starting, and after that, to pass the reference of the
    interface to every EJB that I am instanciating. I tried to create a proxy
    class around my Log RMI service, but I still get a Marshal Error when I pass
    the Log interface as a parameter to my EJB:
    java.rmi.MarshalException: CORBA MARSHAL 0[Could not cast logInterface of
    class test.LogServiceProxy to org.omg.CORBA.Object]
    at test._PO_Stub.setLog(_PO_Stub.java:1100)
    at test.CApplication.test(CApplication.java:443)
    at test.CApplication.initApplication(CApplication.java:88)
    at test.InitApp.doGet(InitApp.java:39)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:715)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
    at com.sun.web.core.ServletWrapper.handleRequest(ServletWrapper.java:155)
    at com.sun.web.core.InvokerServlet.service(InvokerServlet.java:168)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
    at com.sun.web.core.ServletWrapper.handleRequest(ServletWrapper.java:155)
    at com.sun.web.core.Context.handleRequest(Context.java:414)
    at com.sun.web.server.ConnectionHandler.run(ConnectionHandler.java:139)
    Is it impossible to pass an interface as a parameter through RMI ? Is it a
    serialization issue ?
    Joe Weder wrote:
    Stephane,
    I added a service like yours to our WL Server. I use a Startup class to
    instantiate the RMI instance and then add it to the JNDI environment. Now
    your beans can lookup the service.
    context.bind(ClientServicesFactory.JNDI_REGNAME, new
    ClientServicesFactoryImpl());
    In doing so I discovered that I had to use java's rmi compiler and
    weblogic's rmi compiler to make the RMI objects accessible to my bean
    instances from within the running server. Maybe this will solve the
    marshalling problem (it sounds familiar).
    rmic -v1.2 -verbose
    com.icsaward.award.common.clientservices.ClientServicesFactoryImpl
    java weblogic.rmic
    com.icsaward.award.common.clientservices.ClientServicesFactoryImpl
    Hope that helps.
    Stephane Louet wrote in message <[email protected]>...
    Hi there,
    I am in the process of migrating a JSP/servlet application to EJB. In
    the current version of the application, I have a Log class which is used
    to output trace & debugging information. One instance of this class is
    instanciated at the application startup and stored in a singleton which
    is referenced all over the application.
    Because I want my application to be distributed and fail-over ready,
    I've decided to move this Log class and a couple of other technical
    services to RMI. When the application starts-up, I instanciate the RMI
    Log class and everytime I use an EJB, I want to pass him the RMI Log
    class interface. But this does not seem to work, I receive a Marshall
    exception.
    What are the different design patterns to make my EJBs aware of my RMI
    classes ?
    Thanks,
    Stephane

  • In need of some website design feedback (experts please)

    Hey guys I've been designing and redesigning my personal website this is the 5th time I've basically done it over and started from scratch, I find it is very difficult to be objective when designing for myself, and I know that there are probably a number of you who have been doing graphic design far longer than I have (about 6 months), and I'd like to get your feedback, anything that is constructive criticism is appreciated. Just as a background my website is to show my music, select graphic design, and sound design projects I have done. "Future Someday" is what I put out electronic music as, and is somewhat of the largest section (a bit how Tycho designs as iso50, but both are equally important to his "brand"). So my site is futuresomeday.com . I'm designing in muse, here are some sites that look quite good from my perspective and I would like to create something comparable, though I don't need to have their exactl layout/ design style: bleed.com , Alex Goose , Kurppa Hosk , The Designers Republic™ , and Form: Design-led furniture, lighting and accessories for contract environments. . Thanks in advance.

    Download and install the correct versions of the MSVC 2012 runtimes directly from Microsoft after running the cleaner tool. Then try again.
    Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6
    Mylenium

  • 802.1x Guest Vlan and Routed access layer design

    Hi!
    For many reasons, I have to re-design my campus network in a more ISP like way. The plan is to move to a routed access layer in the next two years. I have 802.1x with guest vlan on my access ports(3750). I was reading on the subject and I found that the guest vlan feature was not availeble with internal vlan(routed port).
    Is this limitation realy there, is there a way I can get around it without complicating my design even more. Do cisco have plan to lift this???

    You cannot use/configure 802.1X on a routed port today. Typically, 802.1X is to be used for LAN edge ports.
    The Guest-VLAN should work with a routed access design though. If your Guest-VLAN is chosen to be separate from say otherwise statically configured access VLANs, you would need to configure it via separate SVI with corresponding IP info (in a routed access model).
    Hope this helps,

  • Application Exceptions for User Feedback

    Hi all!
    I guess this is a best practice question.
    I have a struts-based web app that contains various forms and fields that the user can interact with. When a user is filling out a form, I want to validate that the information s/he is inputting is correct. Now, for basic validation (valid date, string, number, etc) I plan on using javascript. However, there are some instances where I need to allow the user to submit the form, perform some action in my Action servlet and check to see if the data being submitted is correct (for instance, if a user is submitting a item, I would check against my session object, DB, EJB, etc, to see if it already exists). Now if somewhere down the stack of my methods, a piece of the submitted data is found to be invalid, I want to somehow feed back to the user that this is so by displaying it in a status section on my JSP.
    From what I've read, it looks like I'm dealing with an application exception. So here's what I've come up with:
    //Here's an application exception I created
    public class MyAppException extends Exception {
         String errorCode;
         String errorDescription;
         public MyAppException () {
              super();
         public MyAppException (
              String pErrorDescription) {
              errorCode = null;
              errorDescription = pErrorDescription.toUpperCase();
         public MyAppException (
              String pErrorCode,
              String pErrorDescription) {
              errorCode = pErrorCode.toUpperCase();
              errorDescription = pErrorDescription.toUpperCase();
         //Gets...
         public String getErrorCode() {
              return this.errorCode;
         public String getErrorDescription() {
              return this.errorDescription;
    //And here's the code that uses it
    public class ThisAction extends AdmAction {
    public ActionForward perform(
         ActionMapping          pMapping,
         ActionForm               pForm,
         HttpServletRequest pRequest,
         HttpServletResponse pResponse) throws ServletException {
    try{
    this.doSomething();
    catch (MyAppException e){
    pRequest.setAttribute("aToUsrMsg", e.getErrorDescription());
    catch (Exception e){
    e.printStackTrace();
    public void doSomething() throws MyAppException, Exception{
    try{
    SomeClass.someMethod();
    catch(MyAppException e){
    throw new MyAppException(e.getErrorDescription());
    catch(Exception e){
    e.printStackTrace();
    throw new Exception(e.getMessage());
    public static class SomeClass throws MyAppException, Exception{
    public static someMethod(
    try{
    if (SomeConditionExists){
    throw new MyAppException("You did something wrong");
    catch(Exception e){
    throw new Exception("Unexpected:" + e.fillInStackTrace());
    The problem instead of the application continuing as it should, reporting the app exception to the user, it halts and prints out the stack trace. Am I approaching this incorrectly?
    Thanks for your help!
    Leo

    try{
    if (SomeConditionExists){
    throw new MyAppException("You did something wrong"); // (1)
    catch(Exception e){ // (2)
    throw new Exception("Unexpected:" + e.fillInStackTrace());
    }Since MyAppException extends Exception, if MyAppException is thrown in (1), it will be caught in (2) and will later get "converted" to an ordinary Exception.

  • Exception handling design issue

    I have a class that's a low level building block of my application. It takes as its single constructor argument a String that needs to be in a known format. At present the constructor takes this String and checks it, throwing an Exception if it's not in the expected format. Given that the String can be built up from user sourced data, this check is absolutely required.
    The problem is that 95% of the time I build these objects using well known Strings - frequently constants from my code. In these cases I don't need the check. That's not really the issue - the checks don't cost a great deal. The problem is the Exception: each time I want to create one of these objects I have to handle the exception I know is never going to happen. I now have dozens of try/catch's in my code that just wrap a call to the constructor and have an empty catch block because I know that's never going to go wrong and I just want to shut the complier up.
    This can't be the right way to do it! I don't want to take out the String check entirely, and I do need the safety net of the Exception in some cases, but without the hassle it provides so much of the time. How should I change the design of this class so that I get the balance I want?

    new Foo(Bar.DEFAULT_BAR_1); //without try-catch
    //or
    new Foo(new Bar("blublab")); //requires try-catchHmm, maybe I haven't quite got this sussed yet.
    The nature of my String value is a location - like a URI. My application is full of them. A good number of them are known at compile time and can be defined and used as constants by the code that needs them, but the underlying class needs to be able deal with user supplied strings as well.
    I define a class called Location which used to have a single constructor that took a String. If the String was of the wrong format it threw an Exception, but in most cases I know what I'm passing and I know it's valid. That makes the Exception, and associated try/catch, redundant 95% of the time.
    So I added another constructor: the original still takes a String and throws the exception, and the new one takes a String and a dontCheck flag and doesn't throw anything. This new constructor doesn't do the format check - things will go wrong if an invalid String is passed into this constructor. In principle this works as long as I stick to the rule - only use the constructor with the dontCheck flag when I know the String I'm passing is valid. But it feels like a bug waiting to happen.
    If I understood correctly, your suggestion was to create a new class - let's call it ValidatedPath. Now I can change my Location's constructors:
    public Location( ValidatedPath trustedPath )
    public Location( String untrustedPath ) throws LocationException
    ...This looks good - I can't create a ValidatedPath without getting an error, so that Location constructor doesn't need to throw anything.
    But hang on - all I've done is move the problem back a step. When I create a ValidatedPath from a constant, I still need to handle the exception the ValidatedPath constructor will throw if it's given an invalid path:
    public static final String goodPath = "THIS:IS:A:GOOD:VALUE";
    ValidatedPath vp = new ValidatedPath( goodPath );   // I now need to handle the potential exception here...
    Location l = new Location(vp);   // ...instead of hereIn the above snippet, goodPath is a valid, constant path. But when I use it as an argument to the ValidatedPath constructor I still need to wrap the call in a try/catch because the ValidatedPath constructor still needs to be able to throw an Exception if the argument is invalid. I haven't really achieved anything.
    Puzzlement continues. I'm just looking at your use of the IllegalArgumentException, as also suggested by others. I think I need to understand this concept of "unchecked" properly - maybe that's the key.

Maybe you are looking for

  • Is there a way to transfer music from iPhone to iTunes?

    I recently had a nasty virus on my Sony Vaio and my hard drive had to be replaced. Although I had all of my pictures and documents backed up, the only places that I had my music (3,000 songs) was on my iTunes library and my iPhone 4. All of my music

  • Ipad 4.3.3 does not show events in Photo

    Hello, I updated my IPAD to Software Version 4.3.3 and now when I go into PHOTOS, it only has tabs for PHOTOs, Albums, Faces and Places. I currently have IPHOTO 11.  Before the update, I had a tab for EVENTS.  Having the EVENTS tab is very useful.  H

  • IDVD quits while writing lead in showing 3 minutes left

    Start to burn disk and audio and video starts but as soon as it gets to "writing lead-in" it shows 3 minutes remaing. Progress bar stops moving. Drive ejects disk before it's done burning. Using iDVD 7.1.2 Doing a Share to iDVD from iMovie 11. Used M

  • Question about using built-in Web Authentication.

    Is it possible to use LDAP servers as an Authentication Server for webauth? I'm running code 4.2. We can use RADIUS which I know works fine, but I'm unclear on how to get it to work with just LDAP (if it's even possible). We'd like to use LDAP so tha

  • E61: Cannot install nokia maps application

    I used to have Nokia Maps application installed in my E61 SD card, together with the maps. Then I had to re-format the card, loosing all information. Once I try again to install Nokia Maps application in my handset, there is an "update error", and th