Results 1 to 1 of 1
  1. #1
    longtqdayma is offline Member
    Join Date
    Jan 2012
    Posts
    4
    Rep Power
    0

    Post can not sessioncontext lookup local interface jboss 7.1.1

    can not sessioncontext lookup local interface jboss 7.1.1-aaaaaaaaaa.png

    Java Code:
    @Local
    public interface IIdentityManagerLocal extends Serializable {
    	public static final long serialVersionUID = 1L;
    
    	//User Info
    	public UserInfo getUserInfo();
    	
    	// IdentityManager
    	public boolean checkEntityRight(String operativeId, String entityName);
    }
    
    @Stateless
    // @SecurityDomain("FMIS2Domain")
    // @RolesAllowed("user")
    public class IdentityManagerFacade implements IIdentityManager,
    		IIdentityManagerLocal {
    
    	private static final long serialVersionUID = 1L;
    
    	@Resource
    	SessionContext sessionContext;
    	@PersistenceContext(unitName = "FMIS2")
    	private EntityManager entityManager;
    ....................................................
    public UserInfo getUserInfo() {
    		try {
    			userId = sessionContext.getCallerPrincipal().getName();
    			iLoggingFacade = (ILoggingLocal) sessionContext.lookup(CommonUtil
    					.getLocalFacadeName(ILoggingLocal.class));
    			identityService = new IdentityService(entityManager, userId,
    					iLoggingFacade);
    
    			return identityService.getUserInfo();
    		} catch (Exception e) {
    			throw CommonException.error(e,
    					"facade.identitymanager.IdentityManagerFacade.getUserInfo");
    		}
    	}
    
    
    }
    
    
    @Stateless
    public class ReportManagementFacade implements IReportManagement {
    
    	/**
    	 * 
    	 */
    	private static final long serialVersionUID = 1L;
    
    	@Resource
    	SessionContext sessionContext;
    ....................................
    @Override
    	public List<BcLoai> getListBaoCao() {
    		try {
    			identityManagerFacade = (IIdentityManagerLocal) sessionContext
    					.lookup("identitymanager-ejb/IdentityManagerFacade!com.evnit.fmis.local.identitymanager.IIdentityManagerLocal"));
    			identityManagerFacade.getUserInfo();
    			ReportSevice bcService = new ReportSevice(entityManager,
    					iLoggingFacade);
    			return bcService.getAllBaoCao();
    		} catch (Exception ex) {
    			throw CommonException.createRuntime(ex,
    					"facade.reportmanagement.getAllCotMerge");
    		}
    	}
    
    }
    
    RUN Main Call getListBaoCao() ;
    ERROR Line identityManagerFacade = (IIdentityManagerLocal) sessionContext
    					.lookup("identitymanager-ejb/IdentityManagerFacade!com.evnit.fmis.local.identitymanager.IIdentityManagerLocal"));
    com.evnit.futil.exception.FRuntimeException: JBAS014313: Could not lookup jndi name: org.jboss.as.ee.naming.InjectedEENamespaceContextS elector@ee0c in context: org.jboss.as.naming.NamingContext@158e60
    at com.evnit.futil.exception.CommonException.createRu ntime(CommonException.java:78)
    at com.evnit.fmis.facade.reportengine.ReportManagemen tFacade.getListBaoCao(ReportManagementFacade.java: 73)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.jboss.as.ee.component.ManagedReferenceMethodIn terceptorFactory$ManagedReferenceMethodInterceptor .processInvocation(ManagedReferenceMethodIntercept orFactory.java:72)
    at org.jboss.invocation.InterceptorContext.proceed(In terceptorContext.java:288)
    at org.jboss.invocation.WeavedInterceptor.processInvo cation(WeavedInterceptor.java:53)
    at org.jboss.as.ee.component.interceptors.UserInterce ptorFactory$1.processInvocation(UserInterceptorFac tory.java:36)
    at org.jboss.invocation.InterceptorContext.proceed(In terceptorContext.java:288)
    at org.jboss.as.jpa.interceptor.SBInvocationIntercept or.processInvocation(SBInvocationInterceptor.java: 47)
    at org.jboss.invocation.InterceptorContext.proceed(In terceptorContext.java:288)
    at org.jboss.invocation.InitialInterceptor.processInv ocation(InitialInterceptor.java:21)
    at org.jboss.invocation.InterceptorContext.proceed(In terceptorContext.java:288)
    at org.jboss.invocation.ChainedInterceptor.processInv ocation(ChainedInterceptor.java:61)
    at org.jboss.as.ee.component.interceptors.ComponentDi spatcherInterceptor.processInvocation(ComponentDis patcherInterceptor.java:53)
    at org.jboss.invocation.InterceptorContext.proceed(In terceptorContext.java:288)
    at org.jboss.as.ejb3.component.pool.PooledInstanceInt erceptor.processInvocation(PooledInstanceIntercept or.java:51)
    at org.jboss.invocation.InterceptorContext.proceed(In terceptorContext.java:288)
    at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurT x(CMTTxInterceptor.java:228)
    at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMT TxInterceptor.java:304)
    at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvoc ation(CMTTxInterceptor.java:190)
    at org.jboss.invocation.InterceptorContext.proceed(In terceptorContext.java:288)
    at org.jboss.as.ejb3.remote.EJBRemoteTransactionPropa gatingInterceptor.processInvocation(EJBRemoteTrans actionPropagatingInterceptor.java:80)
    at org.jboss.invocation.InterceptorContext.proceed(In terceptorContext.java:288)
    at org.jboss.as.ejb3.component.interceptors.CurrentIn vocationContextInterceptor.processInvocation(Curre ntInvocationContextInterceptor.java:41)
    at org.jboss.invocation.InterceptorContext.proceed(In terceptorContext.java:288)
    at org.jboss.as.ejb3.component.interceptors.LoggingIn terceptor.processInvocation(LoggingInterceptor.jav a:59)
    at org.jboss.invocation.InterceptorContext.proceed(In terceptorContext.java:288)
    at org.jboss.as.ee.component.NamespaceContextIntercep tor.processInvocation(NamespaceContextInterceptor. java:50)
    at org.jboss.invocation.InterceptorContext.proceed(In terceptorContext.java:288)
    at org.jboss.as.ejb3.component.interceptors.Additiona lSetupInterceptor.processInvocation(AdditionalSetu pInterceptor.java:43)
    at org.jboss.invocation.InterceptorContext.proceed(In terceptorContext.java:288)
    at org.jboss.as.ee.component.TCCLInterceptor.processI nvocation(TCCLInterceptor.java:45)
    at org.jboss.invocation.InterceptorContext.proceed(In terceptorContext.java:288)
    at org.jboss.invocation.ChainedInterceptor.processInv ocation(ChainedInterceptor.java:61)
    at org.jboss.as.ee.component.ViewService$View.invoke( ViewService.java:165)
    at org.jboss.as.ejb3.remote.protocol.versionone.Metho dInvocationMessageHandler.invokeMethod(MethodInvoc ationMessageHandler.java:302)
    at org.jboss.as.ejb3.remote.protocol.versionone.Metho dInvocationMessageHandler.access$200(MethodInvocat ionMessageHandler.java:64)
    at org.jboss.as.ejb3.remote.protocol.versionone.Metho dInvocationMessageHandler$1.run(MethodInvocationMe ssageHandler.java:196)
    at java.util.concurrent.Executors$RunnableAdapter.cal l(Executors.java:441)
    at java.util.concurrent.FutureTask$Sync.innerRun(Futu reTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.jav a:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:619)
    at org.jboss.threads.JBossThread.run(JBossThread.java :122)
    at ...asynchronous invocation...(Unknown Source)
    at org.jboss.ejb.client.remoting.InvocationExceptionR esponseHandler$MethodInvocationExceptionResultProd ucer.getResult(InvocationExceptionResponseHandler. java:99)
    at org.jboss.ejb.client.EJBClientInvocationContext.ge tResult(EJBClientInvocationContext.java:270)
    at org.jboss.ejb.client.TransactionInterceptor.handle InvocationResult(TransactionInterceptor.java:47)
    at org.jboss.ejb.client.EJBClientInvocationContext.ge tResult(EJBClientInvocationContext.java:272)
    at org.jboss.ejb.client.ReceiverInterceptor.handleInv ocationResult(ReceiverInterceptor.java:132)
    at org.jboss.ejb.client.EJBClientInvocationContext.ge tResult(EJBClientInvocationContext.java:260)
    at org.jboss.ejb.client.EJBClientInvocationContext.aw aitResponse(EJBClientInvocationContext.java:399)
    at org.jboss.ejb.client.EJBInvocationHandler.doInvoke (EJBInvocationHandler.java:140)
    at org.jboss.ejb.client.EJBInvocationHandler.doInvoke (EJBInvocationHandler.java:121)
    at org.jboss.ejb.client.EJBInvocationHandler.invoke(E JBInvocationHandler.java:104)
    at $Proxy0.getListBaoCao(Unknown Source)
    at org.sample.test.Main.main(Main.java:18)
    Channel end notification received, closing channel Channel ID 958526d9 (outbound) of Remoting connection 0079e304 to null
    Last edited by longtqdayma; 08-07-2012 at 09:22 AM.

Similar Threads

  1. Lookup class from .ear file
    By longtqdayma in forum JavaServer Faces (JSF)
    Replies: 0
    Last Post: 02-05-2012, 05:26 AM
  2. Replies: 1
    Last Post: 03-05-2011, 06:47 PM
  3. sql lookup table maintenance
    By research779 in forum JDBC
    Replies: 0
    Last Post: 01-25-2011, 09:07 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •