From: Roland Haeder <roland@mxchange.org>
Date: Mon, 7 Sep 2015 13:31:03 +0000 (+0200)
Subject: Well, if that is EJB, it sucks somehow: Logging not allowed and a complexer class... 
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c59f450807dba231849f079a789736b4b3adc22b;p=pizzaservice-war.git

Well, if that is EJB, it sucks somehow: Logging not allowed and a complexer class structure leaves strange errors behind:
----------------------------------------
Caused by: java.lang.NoClassDefFoundError: [Lorg/mxchange/jcore/model/contact/gender/Gender;
	at java.lang.Class.getDeclaredMethods0(Native Method)
	at java.lang.Class.privateGetDeclaredMethods(Class.java:2570)
	at java.lang.Class.privateGetPublicMethods(Class.java:2690)
	at java.lang.Class.getMethods(Class.java:1467)
	at org.glassfish.ejb.deployment.descriptor.EjbDescriptor.addAllInterfaceMethodsIn(EjbDescriptor.java:2577)
	at org.glassfish.ejb.deployment.descriptor.EjbDescriptor.getLocalRemoteBusinessMethodDescriptors(EjbDescriptor.java:2530)
	... 53 more
Caused by: java.lang.ClassNotFoundException: org.mxchange.jcore.model.contact.gender.Gender
----------------------------------------
Signed-off-by:Roland Häder <roland@mxchange.org>
---

diff --git a/lib/jcore.jar b/lib/jcore.jar
index e5e79d68..c7c6f6cf 100644
Binary files a/lib/jcore.jar and b/lib/jcore.jar differ
diff --git a/lib/jcoreee.jar b/lib/jcoreee.jar
index fa4c45af..53e009a3 100644
Binary files a/lib/jcoreee.jar and b/lib/jcoreee.jar differ
diff --git a/lib/jshop-core.jar b/lib/jshop-core.jar
index 1828f72b..9bfd6202 100644
Binary files a/lib/jshop-core.jar and b/lib/jshop-core.jar differ
diff --git a/lib/jshop-ee-lib.jar b/lib/jshop-ee-lib.jar
index c3cca653..93e19d28 100644
Binary files a/lib/jshop-ee-lib.jar and b/lib/jshop-ee-lib.jar differ
diff --git a/lib/jshop-ejb.jar b/lib/jshop-ejb.jar
index 0ba207f1..b96ffadf 100644
Binary files a/lib/jshop-ejb.jar and b/lib/jshop-ejb.jar differ
diff --git a/nbproject/build-impl.xml b/nbproject/build-impl.xml
index 5002b9e3..cd59461d 100644
--- a/nbproject/build-impl.xml
+++ b/nbproject/build-impl.xml
@@ -881,17 +881,11 @@ exists or setup the property manually. For example like this:
         <ant antfile="${project.PizzaService-lib}/build.xml" inheritall="false" target="jar">
             <property name="deploy.on.save" value="false"/>
         </ant>
-        <ant antfile="${project.jshop-ee-lib}/build.xml" inheritall="false" target="jar">
-            <property name="deploy.on.save" value="false"/>
-        </ant>
     </target>
     <target depends="init" if="dist.ear.dir" name="deps-ear-jar" unless="no.deps">
         <ant antfile="${project.PizzaService-lib}/build.xml" inheritall="false" target="jar">
             <property name="deploy.on.save" value="false"/>
         </ant>
-        <ant antfile="${project.jshop-ee-lib}/build.xml" inheritall="false" target="jar">
-            <property name="deploy.on.save" value="false"/>
-        </ant>
     </target>
     <target depends="init, deps-module-jar, deps-ear-jar" name="deps-jar" unless="no.deps"/>
     <target depends="init,deps-jar" name="-pre-pre-compile">
@@ -1046,7 +1040,6 @@ exists or setup the property manually. For example like this:
         <copyfiles files="${file.reference.log4j-api-2.3.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
         <copyfiles files="${file.reference.log4j-core-2.3.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
         <copyfiles files="${file.reference.log4j-web-2.3.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
-        <copyfiles files="${reference.jshop-ee-lib.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
         <mkdir dir="${build.web.dir}/META-INF"/>
         <manifest file="${build.web.dir}/META-INF/MANIFEST.MF" mode="update"/>
     </target>
@@ -1061,7 +1054,6 @@ exists or setup the property manually. For example like this:
         <copyfiles files="${file.reference.log4j-api-2.3.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
         <copyfiles files="${file.reference.log4j-core-2.3.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
         <copyfiles files="${file.reference.log4j-web-2.3.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
-        <copyfiles files="${reference.jshop-ee-lib.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
     </target>
     <target depends="init" if="dist.ear.dir" name="-clean-webinf-lib">
         <delete dir="${build.web.dir}/WEB-INF/lib"/>
@@ -1476,7 +1468,6 @@ exists or setup the property manually. For example like this:
             -->
     <target depends="init" name="deps-clean" unless="no.deps">
         <ant antfile="${project.PizzaService-lib}/build.xml" inheritall="false" target="clean"/>
-        <ant antfile="${project.jshop-ee-lib}/build.xml" inheritall="false" target="clean"/>
     </target>
     <target depends="init" name="do-clean">
         <condition property="build.dir.to.clean" value="${build.web.dir}">
diff --git a/nbproject/genfiles.properties b/nbproject/genfiles.properties
index fd79f48e..2ae24f4c 100644
--- a/nbproject/genfiles.properties
+++ b/nbproject/genfiles.properties
@@ -1,8 +1,8 @@
-build.xml.data.CRC32=e1e3912d
+build.xml.data.CRC32=1edfee4e
 build.xml.script.CRC32=82213886
 build.xml.stylesheet.CRC32=651128d4@1.68.1.1
 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
-nbproject/build-impl.xml.data.CRC32=e1e3912d
-nbproject/build-impl.xml.script.CRC32=c4215d75
+nbproject/build-impl.xml.data.CRC32=1edfee4e
+nbproject/build-impl.xml.script.CRC32=055d9dec
 nbproject/build-impl.xml.stylesheet.CRC32=99ea4b56@1.68.1.1
diff --git a/nbproject/project.properties b/nbproject/project.properties
index 76570c08..a21586fd 100644
--- a/nbproject/project.properties
+++ b/nbproject/project.properties
@@ -68,8 +68,7 @@ javac.classpath=\
     ${file.reference.gf-client.jar}:\
     ${file.reference.log4j-api-2.3.jar}:\
     ${file.reference.log4j-core-2.3.jar}:\
-    ${file.reference.log4j-web-2.3.jar}:\
-    ${reference.jshop-ee-lib.jar}
+    ${file.reference.log4j-web-2.3.jar}
 # Space-separated list of extra javac options
 javac.compilerargs=-Xlint:unchecked -Xlint:deprecation
 javac.debug=true
@@ -98,10 +97,8 @@ javadoc.windowtitle=Pizza-Service Application
 lib.dir=${web.docbase.dir}/WEB-INF/lib
 persistence.xml.dir=${conf.dir}
 platform.active=default_platform
-project.jshop-ee-lib=../jshop-ee-lib
 project.license=gpl30
 project.PizzaService-lib=../pizzaservice-lib
-reference.jshop-ee-lib.jar=${project.jshop-ee-lib}/dist/jshop-ee-lib.jar
 reference.PizzaService-lib.jar=${project.PizzaService-lib}/dist/PizzaService-lib.jar
 resource.dir=setup
 run.test.classpath=\
diff --git a/nbproject/project.xml b/nbproject/project.xml
index 158fd82f..dee8330a 100644
--- a/nbproject/project.xml
+++ b/nbproject/project.xml
@@ -46,10 +46,6 @@
                     <file>${file.reference.log4j-web-2.3.jar}</file>
                     <path-in-war>WEB-INF/lib</path-in-war>
                 </library>
-                <library dirs="200">
-                    <file>${reference.jshop-ee-lib.jar}</file>
-                    <path-in-war>WEB-INF/lib</path-in-war>
-                </library>
             </web-module-libraries>
             <web-module-additional-libraries/>
             <source-roots>
@@ -71,14 +67,6 @@
                 <clean-target>clean</clean-target>
                 <id>jar</id>
             </reference>
-            <reference>
-                <foreign-project>jshop-ee-lib</foreign-project>
-                <artifact-type>jar</artifact-type>
-                <script>build.xml</script>
-                <target>jar</target>
-                <clean-target>clean</clean-target>
-                <id>jar</id>
-            </reference>
         </references>
     </configuration>
 </project>
diff --git a/src/java/org/mxchange/pizzaapplication/beans/basket/PizzaBasketWebBean.java b/src/java/org/mxchange/pizzaapplication/beans/basket/PizzaBasketWebBean.java
index 55bd4087..68ffc3bc 100644
--- a/src/java/org/mxchange/pizzaapplication/beans/basket/PizzaBasketWebBean.java
+++ b/src/java/org/mxchange/pizzaapplication/beans/basket/PizzaBasketWebBean.java
@@ -16,14 +16,14 @@
  */
 package org.mxchange.pizzaapplication.beans.basket;
 
-import org.mxchange.jcoreee.beans.FrameworkBean;
+import java.io.Serializable;
 
 /**
  * An interface for a basket
  *
  * @author Roland Haeder
  */
-public interface PizzaBasketWebBean extends FrameworkBean {
+public interface PizzaBasketWebBean extends Serializable {
 	/**
 	 * Checks whether the basket is empty
 	 *
diff --git a/src/java/org/mxchange/pizzaapplication/beans/basket/PizzaServiceBasketWebBean.java b/src/java/org/mxchange/pizzaapplication/beans/basket/PizzaServiceBasketWebBean.java
index e8da93ea..2c770994 100644
--- a/src/java/org/mxchange/pizzaapplication/beans/basket/PizzaServiceBasketWebBean.java
+++ b/src/java/org/mxchange/pizzaapplication/beans/basket/PizzaServiceBasketWebBean.java
@@ -76,7 +76,6 @@ public class PizzaServiceBasketWebBean extends BaseFrameworkBean implements Pizz
 		return (!this.isEmpty());
 	}
 
-	@Override
 	@PostConstruct
 	public void init () throws RuntimeException {
 		// Call super init first
diff --git a/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaServiceWebBean.java b/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaServiceWebBean.java
index d6e49ac4..c85f8264 100644
--- a/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaServiceWebBean.java
+++ b/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaServiceWebBean.java
@@ -19,9 +19,7 @@ package org.mxchange.pizzaapplication.beans.controller;
 import java.io.IOException;
 import java.rmi.RemoteException;
 import java.util.Deque;
-import java.util.Iterator;
 import javax.annotation.PostConstruct;
-import javax.ejb.EJB;
 import javax.enterprise.context.SessionScoped;
 import javax.faces.FacesException;
 import javax.inject.Named;
@@ -50,25 +48,15 @@ public class PizzaServiceWebBean extends BaseFrameworkBean implements PizzaWebBe
 	/**
 	 * Remote bean
 	 */
-	@EJB
+	//@EJB
 	private final ShopSessionBeanRemote shop;
 
-	/**
-	 * Initializer block
-	 */
-	{
-		// Get new application instance
-		this.getLogger().debug("INITIALIZER!"); //NOI18N
-	}
-
 	/**
 	 * Default constructor
 	 * 
 	 * @throws javax.naming.NamingException Something happened here?
 	 */
 	public PizzaServiceWebBean () throws NamingException {
-		this.getLogger().trace("CALLED!"); //NOI18N
-
 		// Get initial context
 		InitialContext context = new InitialContext();
 
@@ -76,33 +64,12 @@ public class PizzaServiceWebBean extends BaseFrameworkBean implements PizzaWebBe
 		this.shop = (ShopSessionBeanRemote) context.lookup("ejb/stateless-shop"); //NOI18N
 	}
 
-	@Override
 	@PostConstruct
 	public void init () throws RuntimeException {
 		// Call super init first
 		super.genericInit();
 	}
 
-	@Override
-	public Iterator<Product> getAvailableProductsIterator () throws FacesException {
-		try {
-			return this.getShop().getAvailableProductsIterator();
-		} catch (final RemoteException ex) {
-			// Continue to throw
-			throw new FacesException(ex);
-		}
-	}
-
-	@Override
-	public Iterator<Product> getAllProductsIterator () throws FacesException {
-		try {
-			return this.getShop().getAllProductsIterator();
-		} catch (final RemoteException ex) {
-			// Continue to throw
-			throw new FacesException(ex);
-		}
-	}
-
 	@Override
 	public Deque<Product> getAvailableProducts () throws FacesException {
 		try {
@@ -123,16 +90,6 @@ public class PizzaServiceWebBean extends BaseFrameworkBean implements PizzaWebBe
 		}
 	}
 
-	@Override
-	public Iterator<Category> getAllCategoriesIterator () throws FacesException {
-		try {
-			return this.getShop().getAllCategoriesIterator();
-		} catch (final RemoteException ex) {
-			// Continue to throw
-			throw new FacesException(ex);
-		}
-	}
-
 	@Override
 	public Deque<Category> getAllCategories () throws FacesException {
 		try {
diff --git a/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaWebBean.java b/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaWebBean.java
index fb92bcc9..8c248e50 100644
--- a/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaWebBean.java
+++ b/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaWebBean.java
@@ -16,10 +16,9 @@
  */
 package org.mxchange.pizzaapplication.beans.controller;
 
+import java.io.Serializable;
 import java.util.Deque;
-import java.util.Iterator;
 import javax.faces.view.facelets.FaceletException;
-import org.mxchange.jcoreee.beans.FrameworkBean;
 import org.mxchange.jshopcore.model.category.Category;
 import org.mxchange.jshopcore.model.product.Product;
 
@@ -28,31 +27,7 @@ import org.mxchange.jshopcore.model.product.Product;
  *
  * @author Roland Haeder
  */
-public interface PizzaWebBean extends FrameworkBean {
-
-	/**
-	 * Some "getter" for an iterator of only available products
-	 * 
-	 * @return Only available products
-	 * @throws javax.faces.view.facelets.FaceletException If anything went wrong
-	 */
-	public Iterator<Product> getAvailableProductsIterator () throws FaceletException;
-
-	/**
-	 * Some "getter" for an iterator of all products
-	 *
-	 * @return All products
-	 * @throws javax.faces.view.facelets.FaceletException If anything went wrong
-	 */
-	public Iterator<Product> getAllProductsIterator () throws FaceletException;
-
-	/**
-	 * Some "getter" for an iterator of all categories
-	 *
-	 * @return All categories
-	 * @throws javax.faces.view.facelets.FaceletException If anything went wrong
-	 */
-	public Iterator<Category> getAllCategoriesIterator () throws FaceletException;
+public interface PizzaWebBean extends Serializable {
 
 	/**
 	 * Some "getter" for a linked list of only available products
diff --git a/src/java/org/mxchange/pizzaapplication/beans/customer/CustomerWebBean.java b/src/java/org/mxchange/pizzaapplication/beans/customer/CustomerWebBean.java
index fe9dec1b..f2934771 100644
--- a/src/java/org/mxchange/pizzaapplication/beans/customer/CustomerWebBean.java
+++ b/src/java/org/mxchange/pizzaapplication/beans/customer/CustomerWebBean.java
@@ -16,12 +16,12 @@
  */
 package org.mxchange.pizzaapplication.beans.customer;
 
-import org.mxchange.jcoreee.beans.FrameworkBean;
+import java.io.Serializable;
 
 /**
  * An interface for customer beans
  *
  * @author Roland Haeder
  */
-public interface CustomerWebBean extends FrameworkBean {
+public interface CustomerWebBean extends Serializable {
 }
diff --git a/src/java/org/mxchange/pizzaapplication/beans/customer/PizzaServiceCustomerWebBean.java b/src/java/org/mxchange/pizzaapplication/beans/customer/PizzaServiceCustomerWebBean.java
index d0fb08ad..04ed6ffd 100644
--- a/src/java/org/mxchange/pizzaapplication/beans/customer/PizzaServiceCustomerWebBean.java
+++ b/src/java/org/mxchange/pizzaapplication/beans/customer/PizzaServiceCustomerWebBean.java
@@ -57,7 +57,6 @@ public class PizzaServiceCustomerWebBean extends BaseFrameworkBean implements Cu
 		this.customer = (CustomerSessionBeanRemote) context.lookup("ejb/stateless-consumer");
 	}
 
-	@Override
 	@PostConstruct
 	public void init () throws RuntimeException {
 		// Call super init first
diff --git a/src/java/org/mxchange/pizzaapplication/beans/data/DataWebBean.java b/src/java/org/mxchange/pizzaapplication/beans/data/DataWebBean.java
index 6393c84c..c75c80a9 100644
--- a/src/java/org/mxchange/pizzaapplication/beans/data/DataWebBean.java
+++ b/src/java/org/mxchange/pizzaapplication/beans/data/DataWebBean.java
@@ -16,16 +16,16 @@
  */
 package org.mxchange.pizzaapplication.beans.data;
 
+import java.io.Serializable;
 import java.util.List;
 import org.mxchange.jcore.model.contact.gender.Gender;
-import org.mxchange.jcoreee.beans.FrameworkBean;
 
 /**
  * An interface for data beans
  *
  * @author Roland Haeder
  */
-public interface DataWebBean extends FrameworkBean {
+public interface DataWebBean extends Serializable {
 
 	/**
 	 * Getter for all genders as array
diff --git a/src/java/org/mxchange/pizzaapplication/beans/data/PizzaServiceDataWebBean.java b/src/java/org/mxchange/pizzaapplication/beans/data/PizzaServiceDataWebBean.java
index dd4f0d86..b4476b84 100644
--- a/src/java/org/mxchange/pizzaapplication/beans/data/PizzaServiceDataWebBean.java
+++ b/src/java/org/mxchange/pizzaapplication/beans/data/PizzaServiceDataWebBean.java
@@ -16,7 +16,6 @@
  */
 package org.mxchange.pizzaapplication.beans.data;
 
-import java.text.MessageFormat;
 import java.util.List;
 import javax.annotation.PostConstruct;
 import javax.ejb.EJB;
@@ -63,25 +62,16 @@ public class PizzaServiceDataWebBean extends BaseFrameworkBean implements DataWe
 
 	@Override
 	public Gender[] allGenders () {
-		// Trace message
-		this.getLogger().trace("CALLED!"); //NOI18N
-
 		// Return it
 		return this.getData().allGenders();
 	}
 
 	@Override
 	public List<Gender> selectableGenders () {
-		// Trace message
-		this.getLogger().trace("CALLED!"); //NOI18N
-
 		// Init array
 		// TODO Call EJB here?
 		List<Gender> genders = this.getData().selectableGenders();
 
-		// Trace message
-		this.getLogger().trace(MessageFormat.format("genders={0} - EXIT!", genders)); //NOI18N
-
 		// Return it
 		return genders;
 	}
@@ -95,7 +85,6 @@ public class PizzaServiceDataWebBean extends BaseFrameworkBean implements DataWe
 		return this.data;
 	}
 
-	@Override
 	@PostConstruct
 	public void init () throws RuntimeException {
 		// Call super method
diff --git a/web/WEB-INF/faces-config.xml b/web/WEB-INF/faces-config.xml
index 019e6f13..1010e3f5 100644
--- a/web/WEB-INF/faces-config.xml
+++ b/web/WEB-INF/faces-config.xml
@@ -5,10 +5,10 @@
 			  xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd">
 	<validator>
 		<validator-id>PrivacyTermsCheckboxValidator</validator-id>
-		<validator-class>org.mxchange.jcoreejb.validator.bool.privacy_terms.PrivacyTermsCheckboxValidator</validator-class>
+		<validator-class>org.mxchange.jcoreee.validator.bool.privacy_terms.PrivacyTermsCheckboxValidator</validator-class>
 	</validator>
 	<validator>
 		<validator-id>NameValidator</validator-id>
-		<validator-class>org.mxchange.jcoreejb.validator.string.names.NameValidator</validator-class>
+		<validator-class>org.mxchange.jcoreee.validator.string.names.NameValidator</validator-class>
 	</validator>
 </faces-config>
diff --git a/web/WEB-INF/web.xml b/web/WEB-INF/web.xml
index f187d0ca..2e94dad3 100644
--- a/web/WEB-INF/web.xml
+++ b/web/WEB-INF/web.xml
@@ -7,7 +7,7 @@
 	<filter>
 		<description>A servlet filter for setting character encoding to UTF-8</description>
 		<filter-name>Utf8ServletFilter</filter-name>
-		<filter-class>org.mxchange.jcoreejb.filter.servlet.utf8.Utf8ServletFilter</filter-class>
+		<filter-class>org.mxchange.jcoreee.filter.servlet.utf8.Utf8ServletFilter</filter-class>
 	</filter>
 	<filter>
 		<description>A servlet filter for logging</description>