2011-06-23 3 views
0

Eclipseで動的Webプロジェクトを作成しました。私は2豆、1 @Entityともう1つ@Statelessを持っています。私は警告してTomcatを6でジェロニモ2.2.1への戦争を展開してきました:EJBが見つからない.war

Unresolved ejb reference "com.myconnection.servlet.AddServlet/srvc" in bean 
"GeronimoEnc". Will attempt resolution again at runtime. 

私は、サーブレット(AddServlet)にアクションを持つ.jspファイルの形式を持っています。サーブレットが(インターフェイス経由で)@Stateless beanを参照しようとしています。私は、サーブレットに行くために私のフォームに提出するヒットしかし、一度、私はこのエラーを取得:それはどこだ場合

java.lang.InstantiationException: Some objects to be injected were not found in jndi:  
[javax.naming.NameNotFoundException: No EJB found for reference "com. 

私ものsrc/META-INFの私のpersistence.xmlファイルを持って、私は肯定的ではありませんよそのはず。

私は間違っていますか?ありがとう

答えて

0

EJBでWARファイルをデプロイするためのサポートは、Geronimo 3.0で固定されています(ただし、利用できない可能性があります。次のテキストを参照してください)。bug report 5117。この報告書によれば、2.2.1の依存性注入は失敗する可能性が高い。

one report on the mailing listがあります.Geronimo 3.0 M1は、WebアプリケーションにデプロイされたEJBに対して依存性注入が機能するかどうかを検証するために使用される可能性があります。しかし、これは同じトピックの失敗に関して発生したクエリに対してです。メールの主要な内容を再現:上記のすべてを行く


Łukasz:

Geronimo is not able to inject @EJB into a servlet. Both SLSB and my serlvet are packaged in war. ... By looking at the release notes I know that EJB 3.1 is supported only partially. I take it that the part that is not yet implemented in deploying EJBs inside war package?

Ivan:

Hmm, IIRC, the EJB injection should work in the M1 release, although it have some bugs in EJB 3.1 integration. I would suggest to use the latest trunk codes (just update some codes to try to work around the address binding issue on the building machine, hopefully a snapshot build could be generated in the next round), as we got a much better TCK result comparing with M1 release. JCDI related packages are definitely included in the latest trunk build.

を、3.0 M1は、現時点ではこれを試みるのリリースになりますが、この機能のいくつかの可能性が欠けている(与えられたが確かにありますそのバグ5117は、リリースノートの修正されたバグのリストに含まれていないようです)。

関連する問題