[jboss-user] [Beginners Corner] - Entity Bean: $Proxy<nn> cannot be cast to ...

speedo2k do-not-reply at jboss.com
Sat Jan 24 15:18:50 EST 2009


I try to learn Elcipse and JEE technology from book: Elcipse Web Tools Platform.
While I study chapter 9 I get the following error:

20:45:01,671 ERROR [STDERR] java.lang.ClassCastException: $Proxy126 cannot be cast to com.leagueplanet.cmp.GameLocalHome
20:45:01,671 ERROR [STDERR] 	at com.leagueplanet.cmp.GameUtil.getLocalHome(GameUtil.java:63)
20:45:01,671 ERROR [STDERR] 	at com.leagueplanet.servlet.GameServlet.doPost(GameServlet.java:67)

When I look at JINDI I see that:

GameLocal (proxy: $Proxy126 implements interface com.leagueplanet.cmp.GameLocalHome)

Line which case error is (File: GameUtil): 
   /** Cached local home (EJBLocalHome). Uses lazy loading to obtain its value (loaded by getLocalHome() methods). */
   private static com.leagueplanet.cmp.GameLocalHome cachedLocalHome = null;

  public static com.leagueplanet.cmp.GameLocalHome getLocalHome() throws javax.naming.NamingException
   {
      if (cachedLocalHome == null) {
            cachedLocalHome = (com.leagueplanet.cmp.GameLocalHome) lookupHome(null, com.leagueplanet.cmp.GameLocalHome.JNDI_NAME, com.leagueplanet.cmp.GameLocalHome.class);
      }
      return cachedLocalHome;
   }
(File: GameLocalHome)
  public static final String JNDI_NAME="GameLocal";



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4204546#4204546

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4204546



More information about the jboss-user mailing list