[345499] An NPE generating a Client JAR for an EJB project without Enterprise Beans
diff --git a/plugins/org.eclipse.jst.j2ee.ejb/ejbarchive/org/eclipse/jst/j2ee/internal/ejb/archiveoperations/EJBClientJarCreationHelper.java b/plugins/org.eclipse.jst.j2ee.ejb/ejbarchive/org/eclipse/jst/j2ee/internal/ejb/archiveoperations/EJBClientJarCreationHelper.java
index 470ab5b..aa76b5a 100644
--- a/plugins/org.eclipse.jst.j2ee.ejb/ejbarchive/org/eclipse/jst/j2ee/internal/ejb/archiveoperations/EJBClientJarCreationHelper.java
+++ b/plugins/org.eclipse.jst.j2ee.ejb/ejbarchive/org/eclipse/jst/j2ee/internal/ejb/archiveoperations/EJBClientJarCreationHelper.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 2005, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -99,15 +99,17 @@
 				
 				if (ejbJar != null) {
 					EnterpriseBeans enterpriseBeans = ejbJar.getEnterpriseBeans();
-					List<SessionBean> sessionBeans = enterpriseBeans.getSessionBeans();
-					for (SessionBean sessionBean : sessionBeans) {
-						computeJavaTypes(sessionBean);
+					if (enterpriseBeans != null){
+						List<SessionBean> sessionBeans = enterpriseBeans.getSessionBeans();
+						for (SessionBean sessionBean : sessionBeans) {
+							computeJavaTypes(sessionBean);
+						}
+						
+						List<EntityBean> entityBeans = enterpriseBeans.getEntityBeans();
+						for (EntityBean entityBean : entityBeans) {
+							computeJavaTypes(entityBean);
+						}
 					}
-					
-					List<EntityBean> entityBeans = enterpriseBeans.getEntityBeans();
-					for (EntityBean entityBean : entityBeans) {
-						computeJavaTypes(entityBean);
-					}					
 				}
 				computeRMICJavaTypes();