2012-01-10 2 views
0

나는 6 localhost를 그대로 독립 보스에 내 귀를 배포 할 때 왜 다음과 같은 오류가 점점 오전에 관해서는 약간의 혼란 스러워요 :지정된 참조는 하나 이상의 EJB에 의해 일치 된 - EJB 3.1

"java.lang.RuntimeException가 -

DEPLOYMENTS IN ERROR: Deployment "vfs:///C:/jboss/jboss-6.0.0.Final/server/default/deploy/ear-1.0.0.ear" is in error due to the following reason(s): java.lang.RuntimeException: Specified reference [EJB Reference: beanI erface 'com.ls.forecast.ejb.util.ForecastUtilityLocal', beanName 'null', mappedName 'null', lookupName 'null', owning unit '[email protected]{org.jboss.metadata.ejb.jboss.JBossEnte riseBeanMetaData.ExpectedReturnEngineServiceImpl}'] was matched by more than one EJB: [[email protected]{ForecastCacheManager}, org.jboss.metadata.ejb. [email protected]{ForecastUtility}]. Specify beanName explciitly or ensure beanInterface is unique.

at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1228) [:2.2.0.GA] 
    at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:905) [:2.2.0.GA] 
    at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.checkComplete(MainDeployerPlugin.java:87) [:6.0.0.Final] 
    at org.jboss.profileservice.deployment.ProfileDeployerPluginRegistry.checkAllComplete(ProfileDeployerPluginRegistry.java:107) [:0.2.2] 
    at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:135) [:6.0.0.Final] 
    at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:56) [:6.0.0.Final] 
    at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:827) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-5] 
    at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:417) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-5] 
    at java.lang.Thread.run(Thread.java:619) [:1.6.0_20] 

이 EJB는 어떻게 하나 개 이상의 인스턴스가있을 수 @Singleton의 주석을 붙일 수 있고 ... 자세한 내용은 아래를 참조 지정된 참조 (ForecastUtilityLocal ')는 "하나 이상의 EJB 일치했다? 다른 EJB에 실수로 @Local(ForecastUtilityLocal.class)을 두지 않았다

@Singleton 
@Startup 
@Local(CacheHelperLocal.class) 
public class CacheHelper implements CacheHelperLocal { 

@EJB 
private ForecastModelUtilityLocal forecastModelUtility; 

@EJB 
private ConnectionManagerLocal connectionManager; 

@EJB 
private ForecastCacheManagerLocal forecastCacheManager; 

@EJB 
private ForecastUtilityLocal forecastUtility; 
... 
} 

답변

1

확인 :

@Singleton 
@Local(ForecastUtilityLocal.class) 
public class ForecastUtility implements ForecastUtilityLocal { 

private static final Logger logger = LoggerFactory 
     .getLogger(ForecastUtility.class); 

@EJB 
private CacheHelperLocal cacheHelper; 
.... 
} 

그것은 같은 다른 EJB에서 참조 예입니다.

관련 문제