EJB local invocation with getEJBLocalObject()

Hello,
Imagine I have the following business service which is an EJB:
@Stateless
@Local
public class Service1
     public void operation1()
          // Treatment started...
          this.operation2();
          // Treatment finished.
     public void operation2()
          // Treatment ...
Let's assume that the required annotations have been added so that:
-) the operation1 must be in transaction
-) the operation2 can't be in transaction.
If the operation1 is invoked from another client (a front-end for example), a transaction will be opened by the EJB container.
But if I invoke the operation2 from the operation1 as described in the code (with the this. referencing the current instance and not the local EJB), what will it happen?
Should I make something like getEJBLocalObject().operation2() to ensure that the operation2 won't be in transaction as configured?
Thank you in advance.
Kind regards,
bgOnline

Yes, it has always been this way. The behavior is independent of how the CMT metadata is specified. Container-managed transactions, method authorization, etc. only take place when an EJB component invocation occurs. The only way to make an EJB component invocation is on an EJB reference. getBusinessObject() is just a convenience method that returns the same thing "@EJB MyLocalIntf myLocal" would.
If the bean instance calls this.operation2() the container is not involved. It's just a plain Java method call.
--ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • Creating a simple java client for a session EJB local interface

    Hi all
    Is it possible to create a simple java client for a session ejb local interface with JDeveloper.
    The problem is that it creates a test client for a remote interface only...
    i.e.
    MySessionEJB sessionEJB = context.lookup("MySessionEJB")
    and once i try to adjust it manually for the local interface...
    MySessionEJBLocal sessionEJB = (MySessionEJBLocal) context.lookup("MySessionEJBLocal") (MySessionEJBLocal - is the name of my local interface)
    it generates the exception:
    javax.naming.NotFoundException: SessionEJBLocal not found
    at...........................(RMIClientContext.java:52)
    There is still no problem with accessing the local interface object from the jsf project where i've added <ejb-local-ref> tag into the web.xml file.
    but i need the possibility of testing the simple java client for the local interface to test business methods wich should return objects without indirect properties
    Thanks in advance.
    Alex.

    Pedja thanks for reply.
    I still dont understand what is wrong with my example.
    The first peace of the code i wrote (getting the reference to the remote interface object) works pretty well, and even more it is produced automatically by JDeveloper, so why we cant get a reference to the local interface object the same way?
    Certanly we should use the local interface for getting access to the resource functioning under the same local jvm and i think it doesnt metter wich app server we really use wls or oas or others
    Thanks. Alex.

  • Using EJB Local Interface problem

    Hi to all
    I have got a problem in using Local EJB Interface in Weblogic , please attention to my description
    I use JDeveloper as IDE
    At first I create an Application in JDeveloper that has two projects that their names are Model and ViewContorller that first one contains my EJB and another contains my JSP page respectively
    The EJB code is :
    @Stateless(name="AliEJB001Bean")
    @Remote
    @Local
    public class AliEJB001Bean implements AliEJB001, AliEJB001Local {
    public AliEJB001Bean() {
    public String Hi(){
    return "Hi000";
    And its Local Interface code is :
    @Local
    public interface AliEJB001Local {
    String Hi();
    I deploy Model project to an EJB Jar file that its name is AliEE1ejb1.jar
    and I deploy the ViewContorller project to a WAR file that its name is AliEE1WebApp.war
    Now I add this tags to web.xml
    <ejb-local-ref>
    <ejb-ref-name>ali/testejb</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local>model.AliEJB001Local</local>
    </ejb-local-ref>
    Then I deploy the Application to an EAR file by name AliEE1
    After those I run my JSP page witch calls the EJB in JDeveloper (through Local EJB Interface) , JDeveloper deploy my Application to the ItegratedWeblogicServer
    Ultimately the JSP can calls the EJB through Local Interface and use the Hi method and shows me the result but JDeveloper while compiles the application give me these Warnings :
    Warning: <May 15, 2011 9:02:52 AM PDT> <Error> <J2EE> <BEA-160187> <weblogic.appc failed to compile your application. Recompile with the -verbose option for more details. Please see the error message(s) below.>
    Warning: There are 1 nested errors:
    Warning: weblogic.servlet.internal.dd.compliance.ComplianceException: Element "<ejb-local-ref>" with ejb-ref-name "ali/testejb" must either specify a valid ejb-link element or have a corresponding ejb-reference-descriptor element in weblogic.xml with a valid jndi-name.
    Warning:      at weblogic.servlet.internal.dd.compliance.BaseComplianceChecker.addDescriptorError(BaseComplianceChecker.java:74)
    Warning:      at weblogic.servlet.internal.dd.compliance.BaseComplianceChecker.addDescriptorError(BaseComplianceChecker.java:80)
    Warning:      at weblogic.servlet.internal.dd.compliance.EJBRefsComplianceChecker.validate(EJBRefsComplianceChecker.java:97)
    Warning:      at weblogic.servlet.internal.dd.compliance.EJBRefsComplianceChecker.checkEJBLocalRef(EJBRefsComplianceChecker.java:47)
    Warning:      at weblogic.servlet.internal.dd.compliance.EJBRefsComplianceChecker.check(EJBRefsComplianceChecker.java:39)
    Warning:      at weblogic.servlet.internal.dd.compliance.ComplianceUtils.checkCompliance(ComplianceUtils.java:48)
    Warning:      at weblogic.servlet.jsp.JspcInvoker.checkCompliance(JspcInvoker.java:145)
    Warning:      at weblogic.servlet.jsp.JspcInvoker.compile(JspcInvoker.java:198)
    Warning:      at weblogic.application.compiler.AppcUtils.compileWAR(AppcUtils.java:376)
    Warning:      at weblogic.application.compiler.WARModule.compile(WARModule.java:245)
    Warning:      at weblogic.application.compiler.flow.SingleModuleCompileFlow.proecessModule(SingleModuleCompileFlow.java:18)
    Warning:      at weblogic.application.compiler.flow.SingleModuleFlow.compile(SingleModuleFlow.java:36)
    Warning:      at weblogic.application.compiler.FlowDriver$FlowStateChange.next(FlowDriver.java:69)
    Warning:      at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
    Warning:      at weblogic.application.compiler.FlowDriver.nextState(FlowDriver.java:36)
    Warning:      at weblogic.application.compiler.FlowDriver.run(FlowDriver.java:26)
    Warning:      at weblogic.application.compiler.WARCompiler.compile(WARCompiler.java:29)
    Warning:      at weblogic.application.compiler.flow.AppCompilerFlow.compileInput(AppCompilerFlow.java:112)
    Warning:      at weblogic.application.compiler.flow.AppCompilerFlow.compile(AppCompilerFlow.java:37)
    Warning:      at weblogic.application.compiler.Appc.runBody(Appc.java:198)
    Warning:      at weblogic.utils.compiler.Tool.run(Tool.java:158)
    Warning:      at weblogic.utils.compiler.Tool.run(Tool.java:115)
    Warning:      at weblogic.application.compiler.Appc.main(Appc.java:257)
    Warning:      at weblogic.appc.main(appc.java:14)
    According to the warning messages I wanna add <ejb-link> tag to the web.xml for resolving warnings I add the <ejb-link> like this:
    <ejb-local-ref>
    <ejb-ref-name>ali/testejb</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local>model.AliEJB001Local</local>
    <ejb-link>AliEE1ejb1.jar#AliEJB001Bean </ejb-link>
    </ejb-local-ref>
    But when JDeveloper want deploy my application again it shows me this Error
    [09:29:59 AM] Redeploying Application...
    <May 15, 2011 9:29:59 AM PDT> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1305476999381' for task '7'. Error is: 'weblogic.application.ModuleException: Could not setup environment'
    weblogic.application.ModuleException: Could not setup environment
         at weblogic.servlet.internal.WebAppModule.activateContexts(WebAppModule.java:1499)
         at weblogic.servlet.internal.WebAppModule.activate(WebAppModule.java:442)
         at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:375)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
         at weblogic.application.internal.flow.ModuleStateDriver.activate(ModuleStateDriver.java:95)
         Truncated. see log file for complete stacktrace
    Caused By: weblogic.deployment.EnvironmentException: [J2EE:160101]Error: The ejb-link 'AliEE1ejb1.jar#AliEJB001Bean' declared in the ejb-ref or ejb-local-ref 'ali/testejb' in the application module 'ViewControllerWebApp.war' could not be resolved. The target EJB for the ejb-ref could not be found. Please ensure the link is correct.
         at weblogic.deployment.BaseEnvironmentBuilder.addEJBLinkRef(BaseEnvironmentBuilder.java:464)
         at weblogic.deployment.EnvironmentBuilder.addEJBReferences(EnvironmentBuilder.java:485)
         at weblogic.servlet.internal.CompEnv.activate(CompEnv.java:157)
         at weblogic.servlet.internal.WebAppServletContext.activate(WebAppServletContext.java:3117)
         at weblogic.servlet.internal.WebAppModule.activateContexts(WebAppModule.java:1497)
         Truncated. see log file for complete stacktrace
    >
    <May 15, 2011 9:29:59 AM PDT> <Error> <Deployer> <BEA-149202> <Encountered an exception while attempting to commit the 9 task for the application 'AliEE1'.>
    <May 15, 2011 9:29:59 AM PDT> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating deploy task for application 'AliEE1'.>
    <May 15, 2011 9:29:59 AM PDT> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
    weblogic.application.ModuleException: Could not setup environment
         at weblogic.servlet.internal.WebAppModule.activateContexts(WebAppModule.java:1499)
         at weblogic.servlet.internal.WebAppModule.activate(WebAppModule.java:442)
         at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:375)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
         at weblogic.application.internal.flow.ModuleStateDriver.activate(ModuleStateDriver.java:95)
         Truncated. see log file for complete stacktrace
    Caused By: weblogic.deployment.EnvironmentException: [J2EE:160101]Error: The ejb-link 'AliEE1ejb1.jar#AliEJB001Bean' declared in the ejb-ref or ejb-local-ref 'ali/testejb' in the application module 'ViewControllerWebApp.war' could not be resolved. The target EJB for the ejb-ref could not be found. Please ensure the link is correct.
         at weblogic.deployment.BaseEnvironmentBuilder.addEJBLinkRef(BaseEnvironmentBuilder.java:464)
         at weblogic.deployment.EnvironmentBuilder.addEJBReferences(EnvironmentBuilder.java:485)
         at weblogic.servlet.internal.CompEnv.activate(CompEnv.java:157)
         at weblogic.servlet.internal.WebAppServletContext.activate(WebAppServletContext.java:3117)
         at weblogic.servlet.internal.WebAppModule.activateContexts(WebAppModule.java:1497)
         Truncated. see log file for complete stacktrace
    >
    [09:30:00 AM] #### Deployment incomplete. ####
    [09:30:00 AM] Remote deployment failed
    Do you know how I can solve this issue ?
    thanks

    Thank you so much
    I find out the solution
    I have to define my EJB in ejb-jar.xml like this
    <enterprise-beans>
         <session>
         <ejb-name>ReplicableSFSB2</ejb-name>
         <business-local>model2.AliEJB001Local</business-local>
         <business-remote>model2.AliEJB001</business-remote>
         <ejb-class>model2.AliEJB001Bean</ejb-class>
         <session-type>Stateless</session-type>
         </session>
    </enterprise-beans>
    And then I use the EJB name witch I defined in <ejb-name> tag in <ejb-link> tag of web.xml
    like this
    <ejb-local-ref>
    <ejb-ref-name>ali/testejb2</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local>model2.AliEJB001Local</local>
    <ejb-link>Model2EJB.jar#ReplicableSFSB2</ejb-link>
    </ejb-local-ref>

  • Stalling action-instance: with message: javax.ejb.TransactionRolledbackLocalException: Invocation error.; CausedByException is:

    Suddenly the server has started throwing an exception. I don't know what would have caused it. I also reverted all the changes from when the error started. The action stalls but it completes the process.
    Below are the logs
    2009-07-03 13:05:17,349 ERROR [com.adobe.workflow.AWS] stalling action-instance: 21772 with message: javax.ejb.TransactionRolledbackLocalException: Invocation error.; CausedByException is:
    Invocation error.
    at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:247)
    at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
    at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
    at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:153)
    at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
    at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor. java:122)
    at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
    at org.jboss.ejb.Container.invoke(Container.java:873)
    at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:415)
    at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:88)
    at $Proxy201.finalizeCompleteProcess(Unknown Source)
    at com.adobe.workflow.engine.SynchronousBranch.updateBranchInstanceStatus(SynchronousBranch. java:709)
    at com.adobe.workflow.engine.SynchronousBranch.execute(SynchronousBranch.java:887)
    at com.adobe.workflow.engine.ProcessEngineBMTBean.continueBranchAtAction(ProcessEngineBMTBea n.java:2773)
    at com.adobe.workflow.engine.ProcessEngineBMTBean.asyncContinueBranchCommand(ProcessEngineBM TBean.java:2528)
    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:585)
    at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
    at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionConta iner.java:214)
    at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionI nterceptor.java:149)
    at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor. java:54)
    at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
    at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
    at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:1 58)
    at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:62)
    at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstance Interceptor.java:154)
    at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:153)
    at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
    at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor. java:122)
    at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
    at org.jboss.ejb.Container.invoke(Container.java:873)
    at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:415)
    at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:88)
    at $Proxy202.asyncContinueBranchCommand(Unknown Source)
    at com.adobe.workflow.engine.ProcessCommandControllerBean.doOnMessage(ProcessCommandControll erBean.java:144)
    at com.adobe.workflow.engine.ProcessCommandControllerBean.onMessage(ProcessCommandController Bean.java:99)
    at sun.reflect.GeneratedMethodAccessor547.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
    at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.j ava:475)
    at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionI nterceptor.java:149)
    at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterc eptor.java:101)
    at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
    at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
    at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
    at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:94)
    at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
    at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:389)
    at org.jboss.ejb.Container.invoke(Container.java:873)
    at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:1077)
    at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerI nvoker.java:1379)
    at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:256)
    at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:904 )
    at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:160)
    at org.jboss.mq.SpySession.run(SpySession.java:333)
    at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180)
    at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
    at java.lang.Thread.run(Thread.java:595)
    ALC-DSC-003-000: com.adobe.idp.dsc.DSCInvocationException: Invocation error.
    at com.adobe.idp.dsc.component.impl.DefaultPOJOInvokerImpl.invoke(DefaultPOJOInvokerImpl.jav a:152)
    at com.adobe.idp.dsc.interceptor.impl.InvocationInterceptor.intercept(InvocationInterceptor. java:140)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
    at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor$1.doInTransaction(Transa ctionInterceptor.java:74)
    at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterBean.execute(EjbTr ansactionCMTAdapterBean.java:342)
    at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterBean.doSupports(Ej bTransactionCMTAdapterBean.java:212)
    at sun.reflect.GeneratedMethodAccessor338.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
    at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionConta iner.java:214)
    at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionI nterceptor.java:149)
    at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstance Interceptor.java:154)
    at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor. java:54)
    at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
    at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
    at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:363)
    at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
    at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:153)
    at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
    at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor. java:122)
    at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
    at org.jboss.ejb.Container.invoke(Container.java:873)
    at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:415)
    at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:88)
    at $Proxy169.doSupports(Unknown Source)
    at com.adobe.idp.dsc.transaction.impl.ejb.EjbTransactionProvider.execute(EjbTransactionProvi der.java:104)
    at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor.intercept(TransactionInt erceptor.java:72)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
    at com.adobe.idp.dsc.interceptor.impl.InvocationStrategyInterceptor.intercept(InvocationStra tegyInterceptor.java:55)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
    at com.adobe.idp.dsc.interceptor.impl.InvalidStateInterceptor.intercept(InvalidStateIntercep tor.java:37)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
    at com.adobe.idp.dsc.interceptor.impl.AuthorizationInterceptor.intercept(AuthorizationInterc eptor.java:109)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
    at com.adobe.idp.dsc.interceptor.impl.JMXInterceptor.intercept(JMXInterceptor.java:48)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
    at com.adobe.idp.dsc.engine.impl.ServiceEngineImpl.invoke(ServiceEngineImpl.java:115)
    at com.adobe.idp.dsc.routing.Router.routeRequest(Router.java:118)
    at com.adobe.idp.dsc.provider.impl.base.AbstractMessageReceiver.routeMessage(AbstractMessage Receiver.java:91)
    at com.adobe.idp.dsc.provider.impl.vm.VMMessageDispatcher.doSend(VMMessageDispatcher.java:21 5)
    at com.adobe.idp.dsc.provider.impl.base.AbstractMessageDispatcher.send(AbstractMessageDispat cher.java:57)
    at com.adobe.idp.dsc.clientsdk.ServiceClient.invoke(ServiceClient.java:208)
    at com.adobe.idp.dsc.clientsdk.ServiceClient.sendInvocationResponse(ServiceClient.java:147)
    at com.adobe.workflow.engine.PEUtil.completeLongLivedJob(PEUtil.java:1156)
    at com.adobe.workflow.engine.ProcessEngineCMTBean.finalizeCompleteProcess(ProcessEngineCMTBe an.java:1163)
    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:585)
    at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
    at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionConta iner.java:214)
    at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionI nterceptor.java:149)
    at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstance Interceptor.java:154)
    at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor. java:54)
    at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
    at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
    at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
    at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
    at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:153)
    at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
    at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor. java:122)
    at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
    at org.jboss.ejb.Container.invoke(Container.java:873)
    at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:415)
    at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:88)
    at $Proxy201.finalizeCompleteProcess(Unknown Source)
    at com.adobe.workflow.engine.SynchronousBranch.updateBranchInstanceStatus(SynchronousBranch. java:709)
    at com.adobe.workflow.engine.SynchronousBranch.execute(SynchronousBranch.java:887)
    at com.adobe.workflow.engine.ProcessEngineBMTBean.continueBranchAtAction(ProcessEngineBMTBea n.java:2773)
    at com.adobe.workflow.engine.ProcessEngineBMTBean.asyncContinueBranchCommand(ProcessEngineBM TBean.java:2528)
    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:585)
    at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
    at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionConta iner.java:214)
    at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionI nterceptor.java:149)
    at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor. java:54)
    at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
    at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
    at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:1 58)
    at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:62)
    at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstance Interceptor.java:154)
    at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:153)
    at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
    at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor. java:122)
    at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
    at org.jboss.ejb.Container.invoke(Container.java:873)
    at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:415)
    at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:88)
    at $Proxy202.asyncContinueBranchCommand(Unknown Source)
    at com.adobe.workflow.engine.ProcessCommandControllerBean.doOnMessage(ProcessCommandControll erBean.java:144)
    at com.adobe.workflow.engine.ProcessCommandControllerBean.onMessage(ProcessCommandController Bean.java:99)
    at sun.reflect.GeneratedMethodAccessor547.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
    at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.j ava:475)
    at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionI nterceptor.java:149)
    at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterc eptor.java:101)
    at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
    at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
    at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
    at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:94)
    at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
    at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:389)
    at org.jboss.ejb.Container.invoke(Container.java:873)
    at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:1077)
    at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerI nvoker.java:1379)
    at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:256)
    at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:904 )
    at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:160)
    at org.jboss.mq.SpySession.run(SpySession.java:333)
    at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180)
    at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
    at java.lang.Thread.run(Thread.java:595)
    Caused by: com.adobe.idp.jobmanager.common.JobManagerException: ALC-EMP-001-000: com.adobe.idp.dsc.provider.ProviderRuntimeException: Error in sending results
    at com.adobe.idp.jobmanager.ejb.JobManagerBean.completeJob(JobManagerBean.java:531)
    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:585)
    at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
    at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionConta iner.java:214)
    at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionI nterceptor.java:149)
    at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor. java:54)
    at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
    at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
    at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:1 58)
    at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:62)
    at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstance Interceptor.java:154)
    at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:153)
    at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
    at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor. java:122)
    at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
    at org.jboss.ejb.Container.invoke(Container.java:873)
    at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:415)
    at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:88)
    at $Proxy214.completeJob(Unknown Source)
    at com.adobe.idp.jobmanager.service.JobManagerService.completeJob(JobManagerService.java:115 )
    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:585)
    at com.adobe.idp.dsc.component.impl.DefaultPOJOInvokerImpl.invoke(DefaultPOJOInvokerImpl.jav a:118)
    ... 116 more
    Caused by: ALC-EMP-001-000: com.adobe.idp.dsc.provider.ProviderRuntimeException: Error in sending results
    at com.adobe.idp.dsc.provider.service.email.impl.write.EmailResultHandlerImpl.sendResults(Em ailResultHandlerImpl.java:363)
    at com.adobe.idp.dsc.provider.service.email.impl.write.EmailResultHandlerImpl.handleSuccess( EmailResultHandlerImpl.java:83)
    at com.adobe.idp.dsc.provider.service.email.impl.write.EmailResultHandlerImpl.handleSuccess( EmailResultHandlerImpl.java:72)
    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:585)
    at com.adobe.idp.dsc.component.impl.DefaultPOJOInvokerImpl.invoke(DefaultPOJOInvokerImpl.jav a:118)
    at com.adobe.idp.dsc.interceptor.impl.InvocationInterceptor.intercept(InvocationInterceptor. java:140)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
    at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor$1.doInTransaction(Transa ctionInterceptor.java:74)
    at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterBean.execute(EjbTr ansactionCMTAdapterBean.java:342)
    at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterBean.doSupports(Ej bTransactionCMTAdapterBean.java:212)
    at sun.reflect.GeneratedMethodAccessor338.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
    at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionConta iner.java:214)
    at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionI nterceptor.java:149)
    at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstance Interceptor.java:154)
    at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor. java:54)
    at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
    at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
    at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:363)
    at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
    at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:153)
    at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
    at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor. java:122)
    at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
    at org.jboss.ejb.Container.invoke(Container.java:873)
    at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:415)
    at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:88)
    at $Proxy169.doSupports(Unknown Source)
    at com.adobe.idp.dsc.transaction.impl.ejb.EjbTransactionProvider.execute(EjbTransactionProvi der.java:104)
    at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor.intercept(TransactionInt erceptor.java:72)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
    at com.adobe.idp.dsc.interceptor.impl.InvocationStrategyInterceptor.intercept(InvocationStra tegyInterceptor.java:55)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
    at com.adobe.idp.dsc.interceptor.impl.InvalidStateInterceptor.intercept(InvalidStateIntercep tor.java:37)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
    at com.adobe.idp.dsc.interceptor.impl.AuthorizationInterceptor.intercept(AuthorizationInterc eptor.java:132)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
    at com.adobe.idp.dsc.interceptor.impl.JMXInterceptor.intercept(JMXInterceptor.java:48)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
    at com.adobe.idp.dsc.engine.impl.ServiceEngineImpl.invoke(ServiceEngineImpl.java:115)
    at com.adobe.idp.dsc.routing.Router.routeRequest(Router.java:118)
    at com.adobe.idp.dsc.provider.impl.base.AbstractMessageReceiver.routeMessage(AbstractMessage Receiver.java:91)
    at com.adobe.idp.dsc.provider.impl.vm.VMMessageDispatcher.doSend(VMMessageDispatcher.java:21 5)
    at com.adobe.idp.dsc.provider.impl.base.AbstractMessageDispatcher.send(AbstractMessageDispat cher.java:57)
    at com.adobe.idp.dsc.clientsdk.ServiceClient.invoke(ServiceClient.java:208)
    at com.adobe.idp.jobmanager.ejb.JobManagerBean.processResponseCallBackInfo(JobManagerBean.ja va:1395)
    at com.adobe.idp.jobmanager.ejb.JobManagerBean.completeJob(JobManagerBean.java:511)
    ... 143 more
    Caused by: java.lang.NullPointerException
    at com.adobe.idp.dsc.provider.service.email.impl.write.EmailResultHandlerImpl.sendResults(Em ailResultHandlerImpl.java:194)
    ... 194 more

    hi experts,
        Am using Store Content - EMCDocumentumContentRepositoryConnector service in LC ES2 process. It gets stalled saying with the message:
    "javax.ejb.TransactionRolledbackLocalException
    at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:262)
    at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
    at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
    at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
    at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
    at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor. java:138)
    at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
    at org.jboss.ejb.Container.invoke(Container.java:960)
    at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:430)
    at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:103)
    at $Proxy223.finalizeCompleteProcess(Unknown Source)"
    I have configured the path and credentials properly but still i encounter this issue.
    Guys can you help me in this regard.?  Thanks
    Balaji

  • How can use EJB local call in WLS 7.0 without EAR

    I have web application as jsp files.
    and I made .jar for some EJBs
    and I used local call for calling EJB from jsps in WLS 6.1
    but in WLS 7.0 .. occured error calling EJB as Local call
    while JNDI lookup.
    So I packed all applications as EAR and deployed then all works good.
    but in developing I want to use JSPs as jsp files.
    There is no way to use Local call to EJB in WLS 7.0 without packing EAR ? (like
    WLS 6.1)

    The way JNDI lookups were implemented in 6.1 allowed to deploy individual ejb-jars
    and access their local interfaces via JNDI lookups from other ejb-jars during
    development. In production all ejb-jars will be packaged into an ear.
    This is extremely helpful on large projects. E.g. my current project has over
    120 CMP entity beans and over 40 session beans. Even on 2GHz class machine with
    1Gb memory and JDK 1.4 (to enable full-speed debugging) it takes almost a minute
    to deploy the ear (no matter whether it is exploded or not). It takes minutes
    with 1.3 and debugging turned on.
    6.1 implementation allowed to "pre-deploy" relatively static ejb-jars and still
    access their local interfaces (by putting them on WL system classpath and deploying
    as individual ejb-jars, so classes are accessible to local clients; it requires
    WL restart when they are changed, but they don't change often). So during development
    only changed jars (typically session facade) need to be redeployed on changes,
    which takes only seconds. We didn't have problem with JNDI lookup performance
    since we use the EJBHomeFactory pattern.
    The behind-the-scene JNDI optimization "improvement" introduced in 7.0 makes it
    no longer possible to use this technique, since even though classloading still
    works in the same way, no objects are bound to JNDI tree and thus could not be
    access from another ejb-jar. This significantly impacts developer productivity
    (in our large project). It's not only about minutes lost (which btw makes hours
    over time), it just disrupts developer's train of thought to have such long round
    trip times. In fact this is the reason we are not going to migrate to WL 7.0.
    Is it possible to provide an option to turn this "optimization" off and actually
    bind JNDI objects?
    Thank you,
    Sergey
    "Dimitri I. Rakitine" <[email protected]> wrote:
    Park <[email protected]> wrote:
    Thanks Rakitine.
    I wonder if I use EAR while developing could I apply changes to EARwhithout packing
    again.Sure - you can simply deploy your app as an 'exploded' EAR during development.
    There is no probelm delivering time but in developing time ..
    If I can not use that kind of way how can I make modification ?
    Plz. let me know.
    And I have one more question.
    When I use EAR I met some problem.
    I packed all JSP into one .war file.
    fot that I had to inclde requred classes into .war because jsps usethese classes.
    then I packed EAR file with WAR and some EJB jar files.
    After then I deployed EAR file to WLS.
    But If remove classes from classpth while EJB deploying Error occured.Because
    EJBs reference these classes.
    I thoght if I packed classes into .WAR .. there is no problem.
    But Error occured.
    I have to include classes into classpth for that ? or
    Any mistakes in my way.No, you do not have to add anything to the system classpath. In fact,
    you should
    make sure that none of your application classes are in the system classpath.
    thank you.
    "Dimitri I. Rakitine" <[email protected]> wrote:
    Yup, that appears to be the difference between 6.1 and 7.0 - in
    6.1 success of a local invocation depended only on the Classloaders
    arrangement, so everything worked when you added your classes to the
    system classpath. In 7.0 looks like it also depends on the application
    context - that's why you cannot do a JNDI lookup from another deployment
    unit.
    Is there any reason why you do not want to use EAR's ???
    Park <[email protected]> wrote:
    in WLS 6.1 ..
    I have EJB as jar files. (deployed each to WLS)
    and I added EJB interface class to classpath.
    and I made WebApplication as Directory (not war file).
    in that webappication jsp call EJB as Local interface.
    These environment .. local call workes well in WLS 6.1.
    but in 7.1 not works .. (JNDI look up error)
    of course Remote call works well. and If I make EAR .. works well.
    Rob Woollen <[email protected]> wrote:
    You can have an exploded EAR and have it work.
    Can you give some more detail on how you are deploying in 6.1. Is
    it
    an
    exploded EAR, or do you have the ejb interfaces in the classpath?
    This behavior should not have changed between 6.1 and 7.0.
    -- Rob
    park wrote:
    I have web application as jsp files.
    and I made .jar for some EJBs
    and I used local call for calling EJB from jsps in WLS 6.1
    but in WLS 7.0 .. occured error calling EJB as Local call
    while JNDI lookup.
    So I packed all applications as EAR and deployed then all works
    good.
    but in developing I want to use JSPs as jsp files.
    There is no way to use Local call to EJB in WLS 7.0 without packingEAR ? (like
    WLS 6.1)
    Dimitri
    Dimitri

  • ejb-local-ref where to put this tag in ejb-jar.xml ??

    I have an ejb-jar.xml that looks like this. I have had no problem with remote interfaces. Now I want the bean to have a local interface too.
    Just let me know where the tag I have mentioned for the <ejb-local-ref> has to be put into.
    When I compile this file it throws me an error which i have shown below the output of the ejb-jar.xml file
    <ejb-jar>
    <enterprise-beans>
    <entity>
    <ejb-name>IDMaster</ejb-name>
    <home>maxateev.mondial.brg.idmaster.IDMasterHome</home>
    <remote>maxateev.mondial.brg.idmaster.IDMaster</remote>
    <local-home>maxateev.mondial.brg.idmaster.IDMasterLocalHome</local-home>
    <local>maxateev.mondial.brg.idmaster.IDMasterLocal</local>
    <ejb-class>maxateev.mondial.brg.idmaster.IDMasterEJB</ejb-class>
    <persistence-type>Container</persistence-type>
    <ejb-local-ref>
    <ejb-ref-name>ejb/IDMasterLocalHome</ejb-ref-name>
    <ejb-ref-type>Entity</ejb-ref-type>
    <local-home>maxateev.mondial.brg.idmaster.IDMasterLocalHome</local-home>
    <local>maxateev.mondial.brg.idmaster.IDMasterLocal</local>
    </ejb-local-ref>
    <prim-key-class>java.lang.String</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>IDMaster</abstract-schema-name>
    <cmp-field>
    <field-name>idPrefix</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>idValue</field-name>
    </cmp-field>
    <primkey-field>idPrefix</primkey-field>
    <query>
         <query-method>
              <method-name>findAllIDMasters</method-name>
              <method-params/>
         </query-method>
         <ejb-ql><![CDATA[SELECT OBJECT (f) FROM IDMaster as f]]></ejb-ql>
    </query>
    </entity>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>IDMaster</ejb-name>
         <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    I have also added the following tag in the weblogic-jar.xml
    <local-jndi-name>IDMasterEJB.IDMasterLocalHome</local-jndi-name>
    Just let me know whether I am correct
    On compilation (using ant utility) the error thrown is like this :
    ejbc:
    [java] ERROR: Error parsing 'ejb-jar.xml' line 47: The content of element type "entity" must ma
    tch "(description?,display-name?,small-icon?,large-icon?,ejb-name,home?,remote?,local-home?,local?,e
    jb-class,persistence-type,prim-key-class,reentrant,cmp-version?,abstract-schema-name?,cmp-field*,pri
    mkey-field?,env-entry*,ejb-ref*,ejb-local-ref*,security-role-ref*,security-identity?,resource-ref*,r
    esource-env-ref*,query*)".
    [java] ERROR: ejbc found errors
    [java] Java Result: 1
    Kindly Help !!!
    Thanks n regards
    Sajiv

    This should take care of it
    <ejb-jar>
    <enterprise-beans>
    <entity>
    <ejb-name>IDMaster</ejb-name>
    <home>maxateev.mondial.brg.idmaster.IDMasterHome</home>
    <remote>maxateev.mondial.brg.idmaster.IDMaster</remote>
    <local-home>maxateev.mondial.brg.idmaster.IDMasterLocalHome</local-home>
    <local>maxateev.mondial.brg.idmaster.IDMasterLocal</local>
    <ejb-class>maxateev.mondial.brg.idmaster.IDMasterEJB</ejb-class>
    <persistence-type>Container</persistence-type>
    <ejb-local-ref>
    <ejb-ref-name>ejb/IDMasterLocalHome</ejb-ref-name>
    <ejb-ref-type>Entity</ejb-ref-type>
    <local-home>maxateev.mondial.brg.idmaster.IDMasterLocalHome</local-home>
    <local>maxateev.mondial.brg.idmaster.IDMasterLocal</local>
    </ejb-local-ref>
    <prim-key-class>java.lang.String</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>IDMaster</abstract-schema-name>
    <cmp-field>
    <field-name>idPrefix</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>idValue</field-name>
    </cmp-field>
    <primkey-field>idPrefix</primkey-field>
    <ejb-local-ref>
    <ejb-ref-name>ejb/IDMasterLocalHome</ejb-ref-name>
    <ejb-ref-type>Entity</ejb-ref-type>
    <local-home>maxateev.mondial.brg.idmaster.IDMasterLocalHome</local-home>
    <local>maxateev.mondial.brg.idmaster.IDMasterLocal</local>
    </ejb-local-ref>
    <query>
    <query-method>
    <method-name>findAllIDMasters</method-name>
    <method-params/>
    </query-method>
    <ejb-ql><![CDATA[SELECT OBJECT (f) FROM IDMaster as f]]></ejb-ql>
    </query>
    </entity>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>IDMaster</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>

  • EJB Local Interfaces / javax.naming.NamingException

    Hi!
    I have tried to deploy a very simple (Hello World like)EJB-Application. It contains a simple stateless SessionBean (with local interfaces) and a JSP which is using the EJB.
    Opening the JSP i get the following error message:
    javax.naming.NamingException: Error instantiating web-app JNDI-context: No location specified and no suitable instance found for the ejb-local-ref 'ejb/TesterEJB', an EJB matching it's ejb-link 'ejb-jar-ic.jar#TesterEJB' was found, but it contained an Entity, not a Session
    Here's my ejb-jar.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
    <ejb-jar>
         <display-name>oc4jJAR</display-name>
         <enterprise-beans>
              <session>
                   <display-name>TesterEJB</display-name>
                   <ejb-name>TesterEJB</ejb-name>
                   <local-home>oc4jtest.TesterHome</local-home>
                   <local>oc4jtest.Tester</local>
                   <ejb-class>oc4jtest.TesterBean</ejb-class>
                   <session-type>Stateless</session-type>
                   <transaction-type>Container</transaction-type>
                   <security-identity>
                        <description/>
                        <use-caller-identity/>
                   </security-identity>
              </session>
         </enterprise-beans>
         <assembly-descriptor>
              <method-permission>
                   <unchecked/>
                   <method>
                        <ejb-name>TesterEJB</ejb-name>
                        <method-intf>Local</method-intf>
                        <method-name>getMessage</method-name>
                        <method-params/>
                   </method>
                   <method>
                        <ejb-name>TesterEJB</ejb-name>
                        <method-intf>Local</method-intf>
                        <method-name>getPrimaryKey</method-name>
                        <method-params/>
                   </method>
                   <method>
                        <ejb-name>TesterEJB</ejb-name>
                        <method-intf>Local</method-intf>
                        <method-name>getEJBLocalHome</method-name>
                        <method-params/>
                   </method>
                   <method>
                        <ejb-name>TesterEJB</ejb-name>
                        <method-intf>LocalHome</method-intf>
                        <method-name>remove</method-name>
                        <method-params>
                             <method-param>java.lang.Object</method-param>
                        </method-params>
                   </method>
                   <method>
                        <ejb-name>TesterEJB</ejb-name>
                        <method-intf>Local</method-intf>
                        <method-name>remove</method-name>
                        <method-params/>
                   </method>
                   <method>
                        <ejb-name>TesterEJB</ejb-name>
                        <method-intf>Local</method-intf>
                        <method-name>isIdentical</method-name>
                        <method-params>
                             <method-param>javax.ejb.EJBLocalObject</method-param>
                        </method-params>
                   </method>
                   <method>
                        <ejb-name>TesterEJB</ejb-name>
                        <method-intf>LocalHome</method-intf>
                        <method-name>create</method-name>
                        <method-params/>
                   </method>
              </method-permission>
              <container-transaction>
                   <method>
                        <ejb-name>TesterEJB</ejb-name>
                        <method-intf>Local</method-intf>
                        <method-name>getMessage</method-name>
                        <method-params/>
                   </method>
                   <trans-attribute>Required</trans-attribute>
              </container-transaction>
         </assembly-descriptor>
    </ejb-jar>
    And here's my web.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN' 'http://java.sun.com/dtd/web-app_2_3.dtd'>
    <web-app>
         <display-name>oc4jWAR</display-name>
         <filter>
              <filter-name>TestFilter</filter-name>
              <display-name>TestFilter</display-name>
              <description/>
              <filter-class>oc4jtest.TestFilter</filter-class>
         </filter>
         <filter-mapping>
              <filter-name>TestFilter</filter-name>
              <url-pattern>*.jsp</url-pattern>
         </filter-mapping>
         <servlet>
              <servlet-name>test</servlet-name>
              <display-name>test</display-name>
              <jsp-file>/test.jsp</jsp-file>
         </servlet>
         <session-config>
              <session-timeout>30</session-timeout>
         </session-config>
         <welcome-file-list>
              <welcome-file>/test.jsp</welcome-file>
         </welcome-file-list>
         <ejb-local-ref>
              <ejb-ref-name>ejb/TesterEJB</ejb-ref-name>
              <ejb-ref-type>Session</ejb-ref-type>
              <local-home>oc4jtest.TesterHome</local-home>
              <local>oc4jtest.Tester</local>
              <ejb-link>ejb-jar-ic.jar#TesterEJB</ejb-link>
         </ejb-local-ref>
    </web-app>
    What's wrong?
    Comments would be appreciated!
    Thanks!
    Peter
    PS: The application runs fine on Sun's Reference Implementation!

    Hi!
    I have tried to deploy a very simple (Hello World like)EJB-Application. It contains a simple stateless SessionBean (with local interfaces) and a JSP which is using the EJB.
    Opening the JSP i get the following error message:
    javax.naming.NamingException: Error instantiating web-app JNDI-context: No location specified and no suitable instance found for the ejb-local-ref 'ejb/TesterEJB', an EJB matching it's ejb-link 'ejb-jar-ic.jar#TesterEJB' was found, but it contained an Entity, not a Session
    Here's my ejb-jar.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
    <ejb-jar>
         <display-name>oc4jJAR</display-name>
         <enterprise-beans>
              <session>
                   <display-name>TesterEJB</display-name>
                   <ejb-name>TesterEJB</ejb-name>
                   <local-home>oc4jtest.TesterHome</local-home>
                   <local>oc4jtest.Tester</local>
                   <ejb-class>oc4jtest.TesterBean</ejb-class>
                   <session-type>Stateless</session-type>
                   <transaction-type>Container</transaction-type>
                   <security-identity>
                        <description/>
                        <use-caller-identity/>
                   </security-identity>
              </session>
         </enterprise-beans>
         <assembly-descriptor>
              <method-permission>
                   <unchecked/>
                   <method>
                        <ejb-name>TesterEJB</ejb-name>
                        <method-intf>Local</method-intf>
                        <method-name>getMessage</method-name>
                        <method-params/>
                   </method>
                   <method>
                        <ejb-name>TesterEJB</ejb-name>
                        <method-intf>Local</method-intf>
                        <method-name>getPrimaryKey</method-name>
                        <method-params/>
                   </method>
                   <method>
                        <ejb-name>TesterEJB</ejb-name>
                        <method-intf>Local</method-intf>
                        <method-name>getEJBLocalHome</method-name>
                        <method-params/>
                   </method>
                   <method>
                        <ejb-name>TesterEJB</ejb-name>
                        <method-intf>LocalHome</method-intf>
                        <method-name>remove</method-name>
                        <method-params>
                             <method-param>java.lang.Object</method-param>
                        </method-params>
                   </method>
                   <method>
                        <ejb-name>TesterEJB</ejb-name>
                        <method-intf>Local</method-intf>
                        <method-name>remove</method-name>
                        <method-params/>
                   </method>
                   <method>
                        <ejb-name>TesterEJB</ejb-name>
                        <method-intf>Local</method-intf>
                        <method-name>isIdentical</method-name>
                        <method-params>
                             <method-param>javax.ejb.EJBLocalObject</method-param>
                        </method-params>
                   </method>
                   <method>
                        <ejb-name>TesterEJB</ejb-name>
                        <method-intf>LocalHome</method-intf>
                        <method-name>create</method-name>
                        <method-params/>
                   </method>
              </method-permission>
              <container-transaction>
                   <method>
                        <ejb-name>TesterEJB</ejb-name>
                        <method-intf>Local</method-intf>
                        <method-name>getMessage</method-name>
                        <method-params/>
                   </method>
                   <trans-attribute>Required</trans-attribute>
              </container-transaction>
         </assembly-descriptor>
    </ejb-jar>
    And here's my web.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN' 'http://java.sun.com/dtd/web-app_2_3.dtd'>
    <web-app>
         <display-name>oc4jWAR</display-name>
         <filter>
              <filter-name>TestFilter</filter-name>
              <display-name>TestFilter</display-name>
              <description/>
              <filter-class>oc4jtest.TestFilter</filter-class>
         </filter>
         <filter-mapping>
              <filter-name>TestFilter</filter-name>
              <url-pattern>*.jsp</url-pattern>
         </filter-mapping>
         <servlet>
              <servlet-name>test</servlet-name>
              <display-name>test</display-name>
              <jsp-file>/test.jsp</jsp-file>
         </servlet>
         <session-config>
              <session-timeout>30</session-timeout>
         </session-config>
         <welcome-file-list>
              <welcome-file>/test.jsp</welcome-file>
         </welcome-file-list>
         <ejb-local-ref>
              <ejb-ref-name>ejb/TesterEJB</ejb-ref-name>
              <ejb-ref-type>Session</ejb-ref-type>
              <local-home>oc4jtest.TesterHome</local-home>
              <local>oc4jtest.Tester</local>
              <ejb-link>ejb-jar-ic.jar#TesterEJB</ejb-link>
         </ejb-local-ref>
    </web-app>
    What's wrong?
    Comments would be appreciated!
    Thanks!
    Peter
    PS: The application runs fine on Sun's Reference Implementation!

  • Cant resolve ejb-local-ref

    Hi!
    Im a novice at this environment so I have been running the EJB Tutorial provided
    with 8.1
    Everything works as i should until I deploy the application.
    I get a:
    weblogic.management.DeploymentException: Could not setup environment - with nest
    ed exception:
    [weblogic.deployment.EnvironmentException: [J2EE:160101]Error: The ejb-link 'Ban
    dsExampleEJB.jar#Music' declared in the ejb-ref or ejb-local-ref 'ejb/MusicLink'
    in the application module 'webapp' could not be resolved. The target EJB for
    th
    e ejb-ref could not be found. Please ensure the link is correct.]
    The code for the ejb-local-ref is as folows:
    <ejb-local-ref>
    <ejb-ref-name>ejb/MusicLink</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local-home>examples.ejb20.relationships.bands.MusicHome</local-home>
    <local>examples.ejb20.relationships.bands.Music</local>
    <ejb-link>BandsExampleEJB.jar#Music</ejb-link>
    </ejb-local-ref>
    What can I be doing wrong?
    /Peter

    Gunnar,
    There are a few mistakes in the tutorial that will
    be fixed for the upcoming SP2 release. As far as the tutorial code
    itself goes I've reproduced this problem by following the tutorial
    exactly as its stated and there's a couple of things that can be
    what's causing all the problems for you and others.
    The easiest solution is to use the supplied MusicBean source that's
    supplied with the tutorial. That bean code is correct and functional.
    The tutorial is missing some of the steps required to reproduce that
    exact bean code.
    I'll cover all the errors I found. One of these is quite possibly what's
    tripping you and others up.
    1) The getBands() and addBand() method should be made to be local
    methods instead of remote methods.
    So in step 4 after you've created these methods change the interface
    exposure
    to be local either directly in the source by changing the tag, or in the
    design view
    by right clicking the method and selecting "local". This will show the
    methods
    with a yellow diamond next to them in the design view.
    You also need to enable local interfaces as well as update the local
    interface and local home interface.
    To do this:
    1) switch to the design view
    2) click on the EJB
    3) find the "naming" node in the property editor and uncheck "Remote EJB"
    4) check the "Local EJB" checkbox which will then enable the fields for
    the local and local home interfaces
    5) enter the value of local interface to be: "Music"
    6) enter the value of local home interface to be: "MusicHome"
    2) The setup datasource step is incorrect in the tutorial.
    The entity beans that are imported use a datasource called
    "examples-dataSource-demoPool".
    This datasource doesn't exist in the default workshop domain so in this step
    the user
    is to create the missing datasource. So going to the datasource viewer and
    choosing "add datasource"
    and pasting in the above name will create the datasource that's needed for
    the entity beans.
    3) In the source code listing for MusicBean there's missing imports for:
    javax.naming.InitialContext
    javax.naming.NamingException
    4) the ejb-local-ref XML has one problem, possibly two:
    1) The case is incorrect for the EJB ref name. The tutorial has it as:
    ejb/MusicLink
    but addBand.jsp refers to it as ejb/musicLink. So either change the
    jsp file or the ejb-ref-name so
    that the two match.
    2) The placement of the <ejb-local-ref> XML may be in the wrong spot.
    This element must
    appear at the bottom of web.xml. i.e.
    <webapp>
    <ejb-local-ref>
    <ejb-ref-name>ejb/musicLink</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local-home>examples.ejb20.relationships.bands.MusicHome</local-home>
    <local>examples.ejb20.relationships.bands.Music</local>
    <ejb-link>BandsExampleEJB.jar#Music</ejb-link>
    </ejb-local-ref>
    </web-app>
    5) and finally ensure that your application's build order is correct. Make
    sure that the EJB
    project builds before the web project.
    This can be verified by selecting the menu "tools->application properties"
    and then
    clicking on the "build" node to get the build order.
    All of these mistakes will be fixed for the SP02 release. Hopefully one of
    these solutions fixes
    the problems you're experiencing.
    -Michael
    "Gunnar Skogen" <[email protected]> wrote in message
    news:[email protected]...
    >
    This thread :
    Suggestions on newbie tutorials for Workshop and Weblogic 8.1
    Date: 8 Aug 2003 15:06:55 -0700
    From: "Morgan" <[email protected]>
    Organization: BEA NEWS SITE
    Newsgroup: weblogic.developer.interest.workshop
    Describes the same problem, no solution - so:
    1) When will the tutorial(s)/ and or workshop be fixed ?
    2) Could we get a fix for this particular problem ? ( I tried more than Iwant
    to admit )
    "Gunnar Skogen" <[email protected]> wrote:
    Hi,
    (chiming in because:)
    I have exactly the same problem with the same app:
    This is following the tutorial for 8.1 :"Tutorial EJB project, Part one"
    to the
    letter and running the build.
    The link names etc are correct, however, nothing is/has been deployed
    according
    to console..
    NB: Following the tutorial the MusicBean is set up as a remote bean
    (default
    in
    workshop?) - have tried going the local way also without any success.
    It appears
    the tutorial itself is faulty(?) ( it also shows the dialog for importing
    a webapp
    when it most probably means to create an empty one )
    Michael Kovacs <[email protected]> wrote:
    Hi Peter,
    A couple of things...
    Ensure that your EJBs are deployed to the server properly. It
    seems from your error that they might very well already be
    deployed successfully, but that's just a guess. To verify this you
    can have a look at the WebLogic admin console and see that your
    beans have been deployed to the server by looking at your
    application.
    Assuming your beans are deployed....
    Ensure that the reference to the EJB ref is using the exact
    name of the ejb-ref-name. The name is case sensitive.
    So when you do your lookup of the bean in your JSP
    ensure that the "ejb/MusicLink" from the <ejb-ref-name>
    matches exactly. i.e.
    Object obj = ctx.lookup("java:comp/env/ejb/MusicLink");
    Also, make sure that the <ejb-link> is correct.
    The format for the link name is:
    EJBprojectname.jar#EJBName
    So for your example, make sure that "BandsExampleEJB"
    is the name of your EJB project or correct that value in the
    link name, and that your Bean's EJB name is "Music".
    Let me know if this helps.
    -Michael
    Peter Hegedüs wrote:
    Hi!
    Im a novice at this environment so I have been running the EJB
    Tutorial
    provided
    with 8.1
    Everything works as i should until I deploy the application.
    I get a:
    weblogic.management.DeploymentException: Could not setup environment- with nest
    ed exception:
    [weblogic.deployment.EnvironmentException: [J2EE:160101]Error: Theejb-link 'Ban
    dsExampleEJB.jar#Music' declared in the ejb-ref or ejb-local-ref
    'ejb/MusicLink'
    in the application module 'webapp' could not be resolved. The targetEJB for
    th
    e ejb-ref could not be found. Please ensure the link is correct.]
    The code for the ejb-local-ref is as folows:
    <ejb-local-ref>
    <ejb-ref-name>ejb/MusicLink</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local-home>examples.ejb20.relationships.bands.MusicHome</local-home>
    <local>examples.ejb20.relationships.bands.Music</local>
    <ejb-link>BandsExampleEJB.jar#Music</ejb-link>
    </ejb-local-ref>
    What can I be doing wrong?
    /Peter

  • What are the necessary elements in ejb-jar.xml with CMP entity bean

    What are the necessary elements in ejb-jar.xml with CMP entity bean
    Actually i am using webligic 8.1 and while deployment getting the error that
    some elements r missing
    Thanks
    Anand Pritam

    According to the ejb-jar.xml dtd ejb-name, ejb-class, persistence-type, prim-key-class, reentrant are the required elements for an entity bean.
    <!ELEMENT entity (description?, display-name?, small-icon?,
              large-icon?, ejb-name, home?, remote?, local-home?,
              local?, ejb-class, persistence-type, prim-key-class,
              reentrant, cmp-version?, abstract-schema-name?,
              cmp-field*, primkey-field?, env-entry*, ejb-ref*,
              ejb-local-ref*, security-role-ref*, security-identity?,
              resource-ref*, resource-env-ref*, query*)>

  • Unable to lookup ejb local home interface after moving to wls 7.0

    I'm getting an exception trying to lookup an ejb's local home interface
    which I believe was deployed correctly. On startup I get the message:
    EJB Deployed EJB with JNDI name
    com.logistics.basedata.ejb.shipperspecificfveb.ShipperSpecificFVDOLocalHome.
    However, when I try to do a lookup using this jndi name, I get the
    following exception:
    javax.naming.LinkException: . Root exception is
    javax.naming.NameNotFoundException: Unable to resolve
    'app/ejb/ShipperSpecificFVDO.jar#com.logistics.basedata.ejb.shipperspecificfveb/local-home'
    Resolved: 'app/ejb'
    Unresolved:'ShipperSpecificFVDO.jar#com.logistics.basedata.ejb.shipperspecificfveb'
    ; remaining name
    'ShipperSpecificFVDO.jar#com.logistics.basedata.ejb.shipperspecificfveb/local-home'
    The name it can't resolve is different than the name I was trying to
    look up. I can see
    com.logistics.basedata.ejb.shipperspecificfveb.ShipperSpecificFVDOLocalHome
    in the jndi tree through the admin console, but the attributes Object
    Class, Object Hash Code, and Object To String are blank.
    This worked with weblogic 6.1 sp3. Is there something I missed in the
    migration to 7.0?
    Any help would be appreciated. Thanks in advance,
    -Brad

    That explains it - in 7.0 (unlike 6.1 - then the only factor was
    classloaders arrangement) client has to be
    in the same application (ear) - note JNDI links used to be able to lookup
    local homes.
    "Brad Geddes" <[email protected]> wrote in message
    news:[email protected]...
    I'm looking it up from a web application. I did notice a message on thistopic
    from last thursday (subject: "Pls Help! Failed to access local Sessionbean in
    7.0!"). In it, the individual said he had to add ejb-local-ref elementsin the
    web.xml. I tried this but can't seem to get it to work.
    javax.naming.NameNotFoundException: Unable to resolve ejb-link.
    ShipperSpecificFVDO.jar#com.logistics.basedata.ejb.shipperspecificfveb isnot in
    the context. The context includes the following link bindings: {} Makesure the
    link reference is relative to the URI of the referencing module.
    Also, I don't have a war or ear in the environment I'm working in; theejb's are
    all deployed separately in jar files, and the web app is in explodedformat.
    >
    -Brad
    "Dimitri I. Rakitine" wrote:
    Are you looking up the local home from outside of an application ?
    "Brad Geddes" <[email protected]> wrote in message
    news:[email protected]...
    I'm getting an exception trying to lookup an ejb's local home
    interface
    which I believe was deployed correctly. On startup I get the message:
    EJB Deployed EJB with JNDI name
    com.logistics.basedata.ejb.shipperspecificfveb.ShipperSpecificFVDOLocalHome.
    >>>
    However, when I try to do a lookup using this jndi name, I get the
    following exception:
    javax.naming.LinkException: . Root exception is
    javax.naming.NameNotFoundException: Unable to resolve
    'app/ejb/ShipperSpecificFVDO.jar#com.logistics.basedata.ejb.shipperspecificf
    veb/local-home'
    Resolved: 'app/ejb'
    Unresolved:'ShipperSpecificFVDO.jar#com.logistics.basedata.ejb.shipperspecif
    icfveb'
    ; remaining name
    'ShipperSpecificFVDO.jar#com.logistics.basedata.ejb.shipperspecificfveb/loca
    l-home'
    The name it can't resolve is different than the name I was trying to
    look up. I can see
    com.logistics.basedata.ejb.shipperspecificfveb.ShipperSpecificFVDOLocalHome
    in the jndi tree through the admin console, but the attributes Object
    Class, Object Hash Code, and Object To String are blank.
    This worked with weblogic 6.1 sp3. Is there something I missed in the
    migration to 7.0?
    Any help would be appreciated. Thanks in advance,
    -Brad
    Dimitri--
    Dimitri

  • Is there support for ejb local interface?

    Hi,
    Is there support for ejb local intefaces in JDev? By default it creates remote interfaces
    & I have to manually edit the interfaces as well as the ejb-jar.xml files.
    I am using JDev 9.0.2.
    Thanks in advance...
    Regards..
    Dipankar

    Right. The aforementioned -migrate flag on the jdev or jdevw command line will migrate the IDE settings from your previous build.
    Other upgrade issues are handled automatically the first time you open a project and save it with the new version.

  • Ejb-ref and ejb-local-ref tags

    Hi everyone,
    Can someone please tell me
    1) Is it necessary for me to define ejb-ref or ejb-local-ref tags if I am referering one ejb from other ejb? I mean to say is it mandatory that I should have these deployment descriptor tags?
    2) What is purpose of ejb-link tag ?

    Hi everyone,
    Can someone please tell me
    1) Is it necessary for me to define ejb-ref or
    ejb-local-ref tags if I am referering one ejb from
    other ejb? I mean to say is it mandatory that I should
    have these deployment descriptor tags?Yes, to write portable J2EE components, every time you have a dependency on an ejb, you need to declare an ejb-ref (for a Remote EJB client) or ejb-local-ref (for a Local EJB client). This is true no matter what kind of J2EE component is accessing the ejb (Application Client, JSP, Servlet, or another ejb).
    Think of the ejb-ref or ejb-local-ref as a pointer. It's different from the thing that is pointed to. Instead, it represents a dependency between a client component and a target ejb.
    2) What is purpose of ejb-link tag ?Every ejb-ref or ejb-local-ref must be resolved to unambiguously point to the target ejb. The ejb-link tag is one way to resolve this dependency for the case where the target ejb lives in the same .ear as the referring component. The ejb-link tag is the ejb-name (or <ejb-jar uri>#<ejb-name>) of the target ejb.
    Note that this means ejb-link is the ONLY way to resolve an ejb-local-ref, since by definition Local EJB access can only take place between two ejbs within the same .ear or a web component/ejb that live within the same .ear.
    For ejb-refs, you can use ejb-link if the target ejb is within the same .ear. If not, the ejb specification does not prescribe how the dependency is resolved. It's left up to the J2EE implementation. The most common approach is for the vendor to provide a product-specific runtime .xml element that resolves the ejb-ref by associating it with the global JNDI name of the target EJB. That's the approach used in the J2EE SDK and Sun Java System Application Server.
    Kenneth Saks
    J2EE SDK Team
    SUN Microsystems

  • Creating local interfaces with JDeveloper (release 2)

    Hi
    Maybe I'm missing something here, but how does one create a local- and a local-home interface with JDeveloper? It only seems to give me the option to create a remote- and a home interface.
    I've tried creating the local interfaces by hand and then adding them as <ejb-local-ref> references in the ejb-jar.xml deployment descriptor, but I get the message "local/local-home tag not supported in this version" when trying to test the code with the Embedded OC4J Server.
    Now, I've managed to create EJB 2.0-style CMP entity beans by modifying the code and deployment descriptors a little, which made me believe that EJB 2.0 is supported, but that seems to be where it stops.
    Am I doing something wrong, or is EJB 2.0 not fully implemented in the Embedded OC4J Server yet?
    Hope you can help
    Christof

    JDeveloper 9.0.2 doesn't have support for local interfaces or any EJB 2.0 features.
    Next release of JDeveloper (9.0.3) will have complete support of J2EE 1.3 features including EJB 2.0.
    This release is slated for this summer (2002)
    raghu
    JDev Team

  • Calling Glassfish jdbc Datasorce in EJB 3.0 with @Resource annotation.

    I tried EJB 3.0 with netbeans and glassfish and "{color:#ff0000}+_ORACLE_+{color}". I wanted to link the oracle database to GLASSFISH server and I followed the instructions.After I clicked 'ping' button, it displayed as *{color:#339966}'PING SUCCEED".{color}*
    But I couldn't call my datasource from the eje stateless session bean with @Resource annotation.It resulted a dependency injection exception. Can some one tell me how to do this properly.
    {color:#ff0000}Thanks in Advance!!!!{color}

    Frank, yes, I can modify if it is necessary the datasource but, how can I say in the xxxx-jdbc.xml not to use JTA transactions when this data source is called inside a ejb 3.0 method?
    I'm using Jdev11g and the integrated Web Logic Server.
    Thank's

  • A Tip for using EJB 3.0 with WebLogic Ant Tasks

    I started out writing this up as a problem, but then I found the answer so I'm, posting a tip instead.
    When I tried to write an EJB [stateless] using EJB 3.0 in my legacy Weblogic ear project I started getting this error:
    <pre>
    No EJBs found in the ejb-jar file 'test'. Please ensure the ejb-jar contains EJB declarations via an ejb-jar.xml deployment descriptor or at least one class annotated with the @Stateless, @Stateful or @MessageDriven EJB annotation.
    </pre>
    This is why: wlcompile will put the class files in the App-Inf/classes directory unless it finds an ejb-jar.xml file in the META-INF directory for the module it is working on. With EJB 3.0, I wasn't using an ejb-jar.xml file because it was unnecessary. Later, Appc runs and it complains <b>because there are no classes module directory, they went into the shared ear folder instead.</b>
    Here's I how it working again: Use javac [not wlcompile] to compile the EJB 3.0 module and make sure that the class files go into the correct module directory. Then you can use wlappc to generate all the associated files for the EJB. I have sucessfully deployed an ear file that uses both EJB 2.x and EJB 3.0 with this approach.
    I wish Weblogic's own ejb3.0 sample application used their split directory deployment.
    Good Luck.
    John Aronson

    Hi John,
    I am working on development an enterprise application using EJB 3.0 on Weblogic 10.
    While developing, I am keeping all my classes (from ejb's as well as web) into APP-INF/classes directory. It is working fine for Web and ejb 2.0 packages, but ejb 3.0 packages, I get the following error when I keep my ejb 3.0 beans classes in APP-INF/classes directory.
    No EJBs found in the ejb-jar file 'customer'. Please ensure the ejb-jar contains EJB declarations via an ejb-jar.xml deployment descriptor or at least one class annotated with the @Stateless, @Stateful or @MessageDriven EJB annotation.
    One solution is to keep the classes under customer ejb directory, but I wan tto keep all the classes in APP-INF/classes directory so that when using Eclipse IDE I can output all compiled sources into APP-INF/classes directory.
    Has anyone faced this situation? Any suggestions to fix this issue?

Maybe you are looking for

  • MM- FI reconciliation report

    Hi, do u have any report in SAP which shows MM and FI balances in stock after any adjustments. thanks RP

  • VGA DVI conversion?

    I have the iMac G5 with the VGA out, and I was bummed to discover that it was VGA ONLY! So I bought the mini-VGA cable anyway, and ordered and VGA>DVI adapter. After re-booting I noticed both monitors showed up in the Finder's Display Menu(at top of

  • ..........query in the report issue..............

    There is a table which contains all the records for a certain CID. CID, area,city... cid1 area1 cid2 area2 cid3 area3 cid4 area4 cid5 area44 cid6 area55 ANother table have the columns. CID, NCID, totalequipment.... Now i would like to have a list of

  • Action Script & Components

    Hey gang. I am new to Flash & FlashCom so please bare with me but I have been learning very quickly. I am writting a FlashCom video conferencing application. All is well I have learned AS very fast on both FlashCom and Flash client sides. One part wh

  • How to make address labels to print

    I'm trying to create labels to use on the back of photos.  I am using Avery 18160 style labels to print on. Thank you.