ejb lookup failing with NamingException

前端 未结 3 2055
青春惊慌失措
青春惊慌失措 2020-12-01 10:01

I\'ve added the following in my web.xml:


        ejb/userManagerBean
        Ses         


        
3条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-01 10:17

    First, fix your web.xml and add the Remote Interface in it:

    
      Sample EJB
      SampleBean
      Session
      com.SampleHome
      com.Sample 
    
    

    Then, regarding the java.lang.NoSuchMethodError, Sean is right, you have a mismatch between the version of the app server "client library" you are using inside NetBeans and the app server version (server-side). I can't tell you exactly which JARs you need to align though, refer to the Sun Application Server documentation.

    PS: This is not a direct answer to the problem but I don't think you're currently passing any useful properties when creating your initial context with the results of the call to System.getProperties(), there is nothing helpful in these properties to define the environment of a context (e.g. the initial context factory). Refer to the InitialContext javadocs for more details.

提交回复
热议问题