[jboss-user] [EJB 3.0] - java.lang.NoClassDefFoundError: ${main/class} when running E

sagimann do-not-reply at jboss.com
Sun Dec 23 11:24:54 EST 2007


Hi,
I've been using NetBeans 5.5.1 with SJSAS9.1 to write and test Enterprise apps with EJBs, web EJB clients and non-web EJB clients.

Now, I need to work with the same IDE and JBoss 4.2.2.
I've created a new Enterprise Application project using NetBeans wizard,
and set up a small MyBean stateless bean with my MyRemote interface, containing a 'test1' method:


  | @Stateless
  | public class MyBean implements ejb1.MyRemote {
  |     
  |     public void test1() { System.out.println("test1"); }
  |     
  | 

I also set up an EJB app client that calls MyBean:


  | public class Main {
  |     @EJB static MyRemote ejb;
  |     public static void main(String[] args) { ejb.test1(); }
  | }
  | 

The result when I ask NetBeans to deploy the entire application:

In the app client console:

java.lang.NoClassDefFoundError: ${main/class}
Exception in thread "main" 
Java Result: 1

In the app server console:

  | 18:23:04,421 INFO  [EARDeployer] Init J2EE application: file:/C:/Apps/Dev/jboss-4.2.2.GA/server/default/deploy/ejb1.ear
  | 18:23:04,578 WARN  [MainDeployer] Found non-jar deployer for ejb1-ejb.jar: MBeanProxyExt[jboss.ejb3:service=EJB3Deployer]
  | 
  | 18:23:04,890 INFO  [ClientDeployer] Client ENC bound under: ejb1-app-client
  | 18:23:04,890 INFO  [JmxKernelAbstraction] creating wrapper delegate for: org.jboss.ejb3.stateless.StatelessContainer
  | 18:23:04,890 INFO  [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=ejb1.ear,jar=ejb1-ejb.jar,name=MyBean,service=EJB3 with dependencies:
  | 18:23:05,078 INFO  [EJBContainer] STARTED EJB: ejb1.MyBean ejbName: MyBean
  | 18:23:05,093 INFO  [EJB3Deployer] Deployed: file:/C:/Apps/Dev/jboss-4.2.2.GA/server/default/tmp/deploy/tmp29720ejb1.ear-contents/ejb1-ejb.jar
  | 18:23:05,125 INFO  [TomcatDeployer] deploy, ctxPath=/ejb1-war, warUrl=.../tmp/deploy/tmp29720ejb1.ear-contents/ejb1-war-exp.war/
  | 18:23:05,578 INFO  [EARDeployer] Started J2EE application: file:/C:/Apps/Dev/jboss-4.2.2.GA/server/default/deploy/ejb1.ear
  | 

any ideas what is going on?
thanks...

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

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



More information about the jboss-user mailing list