I am getting this error when I started migrating my project from JBoss 3.2.5 to 
4.0.2
All the EJBs in the application are local.

In JBoss 3.2.5

  | JNDI name
  | public static final String CUST_LOCAL_HOME = "local/CustomerEJB";
  | 
  | ejb-jar.xml
  | <entity>
  |          <description>CUSTOMER table</description>
  |          <ejb-name>CustomerEJB</ejb-name>
  |          
<local-home>com.xyz.components.customer.LocalCustomerHome</local-home>
  |          <local>com.xyz.components.customer.LocalCustomer</local>
  |          <ejb-class>com.xyz.components.customer.CustomerEJB</ejb-class>
  |          <persistence-type>Container</persistence-type>
  |          <prim-key-class>java.lang.String</prim-key-class>
  |          <reentrant>-1</reentrant>
  |          <cmp-version>2.x</cmp-version>
  |          <abstract-schema-name>Customer</abstract-schema-name>
  |          <cmp-field><field-name>CustID</field-name></cmp-field>
  |             ....
  |            ....
  |          <primkey-field>CustID</primkey-field>  
  |  </entity>
  |  
  |   No JBoss.xml
  |   
  |   
  |   EJB Access code:
  |   LocalCustomerHome custHome = 
(LocalCustomerHome)servicelocator.getLocalHome(JNDINames.CUST_LOCAL_HOME);      
                     
  |   LocalCustomer custObj = custHome.create(myCustVO);
  |  
  | 
 For project we have xyzEJB.jar with all EJB and related classes
 xyz.war has all classes in xyzEJB.jar + web stuff such as JSP,.html, tld,etc.
 

I made following changes for JBoss 4.0.2


  | JNDI name
  | public static final String CUST_LOCAL_HOME = "java:comp/env/CustomerEJB";
  | 
  | ejb-jar.xml  same as above
  | 
  | No JBoss.xml
  | 
  | Added following in web.xml  for each EJB
  | <ejb-local-ref>
  |         <ejb-ref-name>CustomerEJB</ejb-ref-name>
  |         <ejb-ref-type>Entity</ejb-ref-type>
  |         
<local-home>com.xyz.components.customer.LocalCustomerHome</local-home>
  |         <local>com.xyz.components.customer.LocalCustomer</local>
  |         <ejb-link>CustomerEJB</ejb-link>
  |  </ejb-local-ref> 
  | 
  | EJB Access code:
  | same as above.
  | 


For JBoss 4.0.2, I excluded all the EJBs (3 files for each EJB) from xyz.war 
file.
So xyz.war will not have any EJBs now.
Somebody told me that we can get these kinds of errors if:
1) we have duplicate classes in xyz.war & xyzEJB.jar file  (I checked that I 
don't have any)
2) some classes which should be xhyEJB.jar are in xyz.jar instead.  
e.g.in CustomerEJB create() has myCustVO , so CustVo.class should be in 
xyzEJB.jar not in zyz.jar.

I haven't tried the option 2 yet.

Thanks in advance.







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

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


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to