shopizer-uncached

Runtime Exceptions

11/11/2016 11:26:16 AM

Changes

Details

diff --git a/shopizer-canadapost/target/classes/META-INF/maven/com.shopizer/shopizer-shipping-canadapost-module/pom.properties b/shopizer-canadapost/target/classes/META-INF/maven/com.shopizer/shopizer-shipping-canadapost-module/pom.properties
index ae65ffc..ff65afe 100644
--- a/shopizer-canadapost/target/classes/META-INF/maven/com.shopizer/shopizer-shipping-canadapost-module/pom.properties
+++ b/shopizer-canadapost/target/classes/META-INF/maven/com.shopizer/shopizer-shipping-canadapost-module/pom.properties
@@ -1,5 +1,5 @@
 #Generated by Maven Integration for Eclipse
-#Wed Nov 09 09:28:41 EST 2016
+#Thu Nov 10 09:33:21 EST 2016
 version=2.5.0-SNAPSHOT
 groupId=com.shopizer
 m2e.projectName=shopizer-canadapost
diff --git a/shopizer-shipping-distance-module/target/classes/META-INF/maven/com.shopizer/shopizer-shipping-distance-processor/pom.properties b/shopizer-shipping-distance-module/target/classes/META-INF/maven/com.shopizer/shopizer-shipping-distance-processor/pom.properties
index 45f16d2..991104c 100644
--- a/shopizer-shipping-distance-module/target/classes/META-INF/maven/com.shopizer/shopizer-shipping-distance-processor/pom.properties
+++ b/shopizer-shipping-distance-module/target/classes/META-INF/maven/com.shopizer/shopizer-shipping-distance-processor/pom.properties
@@ -1,5 +1,5 @@
 #Generated by Maven Integration for Eclipse
-#Wed Nov 09 09:28:40 EST 2016
+#Thu Nov 10 09:33:20 EST 2016
 version=2.5.0-SNAPSHOT
 groupId=com.shopizer
 m2e.projectName=shopizer-shipping-distance-processor
diff --git a/sm-search/target/classes/META-INF/maven/com.shopizer/sm-search/pom.properties b/sm-search/target/classes/META-INF/maven/com.shopizer/sm-search/pom.properties
index 86a600b..3e76762 100644
--- a/sm-search/target/classes/META-INF/maven/com.shopizer/sm-search/pom.properties
+++ b/sm-search/target/classes/META-INF/maven/com.shopizer/sm-search/pom.properties
@@ -1,5 +1,5 @@
 #Generated by Maven Integration for Eclipse
-#Wed Nov 09 09:28:42 EST 2016
+#Thu Nov 10 09:33:21 EST 2016
 version=2.5.0-SNAPSHOT
 groupId=com.shopizer
 m2e.projectName=sm-search
diff --git a/sm-shop/.classpath b/sm-shop/.classpath
index fc5f96c..b130f32 100644
--- a/sm-shop/.classpath
+++ b/sm-shop/.classpath
@@ -27,7 +27,7 @@
 			<attribute name="maven.pomderived" value="true"/>
 		</attributes>
 	</classpathentry>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
 		<attributes>
 			<attribute name="maven.pomderived" value="true"/>
 		</attributes>
diff --git a/sm-shop/files/store/StoreRepository.dat b/sm-shop/files/store/StoreRepository.dat
index b2476e0..1d54bba 100644
Binary files a/sm-shop/files/store/StoreRepository.dat and b/sm-shop/files/store/StoreRepository.dat differ
diff --git a/sm-shop/SALESMANAGER.h2.db b/sm-shop/SALESMANAGER.h2.db
index b948116..35395bc 100644
Binary files a/sm-shop/SALESMANAGER.h2.db and b/sm-shop/SALESMANAGER.h2.db differ
diff --git a/sm-shop/SALESMANAGER.lock.db b/sm-shop/SALESMANAGER.lock.db
index 41a36ec..75e0b53 100644
--- a/sm-shop/SALESMANAGER.lock.db
+++ b/sm-shop/SALESMANAGER.lock.db
@@ -1,4 +1,4 @@
 #FileLock
-#Wed Nov 09 13:06:58 EST 2016
-id=1584a457842e9e1377802b3d165d466c925966e04aa
+#Thu Nov 10 17:00:59 EST 2016
+id=158504214a9b9ec0e9905fe7daf7562c5c9906b555b
 method=file
diff --git a/sm-shop/src/main/java/com/salesmanager/shop/admin/security/UserServicesImpl.java b/sm-shop/src/main/java/com/salesmanager/shop/admin/security/UserServicesImpl.java
index 62b9b09..4397d53 100644
--- a/sm-shop/src/main/java/com/salesmanager/shop/admin/security/UserServicesImpl.java
+++ b/sm-shop/src/main/java/com/salesmanager/shop/admin/security/UserServicesImpl.java
@@ -60,7 +60,6 @@ public class UserServicesImpl implements WebUserServices{
 	
 	
 	
-	@SuppressWarnings("deprecation")
 	public UserDetails loadUserByUsername(String userName)
 			throws UsernameNotFoundException, DataAccessException {
 
diff --git a/sm-shop/src/main/java/com/salesmanager/shop/application/ShopApplication.java b/sm-shop/src/main/java/com/salesmanager/shop/application/ShopApplication.java
index 3040565..03f9cf1 100644
--- a/sm-shop/src/main/java/com/salesmanager/shop/application/ShopApplication.java
+++ b/sm-shop/src/main/java/com/salesmanager/shop/application/ShopApplication.java
@@ -2,9 +2,10 @@ package com.salesmanager.shop.application;
 
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.context.web.SpringBootServletInitializer;
 
 @SpringBootApplication
-public class ShopApplication {
+public class ShopApplication extends SpringBootServletInitializer {
 	
     public static void main(String[] args) {
         SpringApplication.run(ShopApplication.class, args);
diff --git a/sm-shop/src/main/java/com/salesmanager/shop/init/data/InitStoreData.java b/sm-shop/src/main/java/com/salesmanager/shop/init/data/InitStoreData.java
index 7dec6b0..5f317a6 100644
--- a/sm-shop/src/main/java/com/salesmanager/shop/init/data/InitStoreData.java
+++ b/sm-shop/src/main/java/com/salesmanager/shop/init/data/InitStoreData.java
@@ -464,8 +464,6 @@ public class InitStoreData implements InitData {
 		    productService.create(product);
 		    
 		    try {
-		    	//InputStream inStream = this.getClass().getClassLoader().getResourceAsStream("/demo/spring.png");
-		    	//TODO TO BE TESTED
 		    	ClassPathResource classPathResource = new ClassPathResource("/demo/spring.png");
 		    	InputStream inStream = classPathResource.getInputStream();
 		    	this.saveFile(inStream, "spring.png", product);
@@ -523,7 +521,8 @@ public class InitStoreData implements InitData {
 		    productService.create(product2);
 		    
 		    try {
-		    	InputStream inStream = this.getClass().getClassLoader().getResourceAsStream("/demo/node.jpg");
+		    	ClassPathResource classPathResource = new ClassPathResource("/demo/node.jpg");
+		    	InputStream inStream = classPathResource.getInputStream();
 		    	this.saveFile(inStream, "node.jpg", product2);
 		    } catch(Exception e) {
 		    	LOGGER.error("Error while reading demo file node.jpg",e);
@@ -581,7 +580,8 @@ public class InitStoreData implements InitData {
 
 		    
 		    try {
-		    	InputStream inStream = this.getClass().getClassLoader().getResourceAsStream("/demo/paas.JPG");
+		    	ClassPathResource classPathResource = new ClassPathResource("/demo/paas.JPG");
+		    	InputStream inStream = classPathResource.getInputStream();
 		    	this.saveFile(inStream, "paas.JPG", product3);
 		    } catch(Exception e) {
 		    	LOGGER.error("Error while reading demo file paas.jpg",e);
@@ -637,7 +637,8 @@ public class InitStoreData implements InitData {
 
 		    
 		    try {
-		    	InputStream inStream = this.getClass().getClassLoader().getResourceAsStream("/demo/android.jpg");
+		    	ClassPathResource classPathResource = new ClassPathResource("/demo/android.jpg");
+		    	InputStream inStream = classPathResource.getInputStream();
 		    	this.saveFile(inStream, "android.jpg", product4);
 		    } catch(Exception e) {
 		    	LOGGER.error("Error while reading demo file android.jpg",e);
@@ -695,7 +696,8 @@ public class InitStoreData implements InitData {
 
 		    
 		    try {
-		    	InputStream inStream = this.getClass().getClassLoader().getResourceAsStream("/demo/android2.jpg");
+		    	ClassPathResource classPathResource = new ClassPathResource("/demo/android2.jpg");
+		    	InputStream inStream = classPathResource.getInputStream();
 		    	this.saveFile(inStream, "android2.jpg", product5);
 		    } catch(Exception e) {
 		    	LOGGER.error("Error while reading demo file android2.jpg",e);
@@ -753,7 +755,9 @@ public class InitStoreData implements InitData {
 
 		    
 		    try {
-		    	InputStream inStream = this.getClass().getClassLoader().getResourceAsStream("/demo/google.jpg");
+
+		    	ClassPathResource classPathResource = new ClassPathResource("/demo/google.jpg");
+		    	InputStream inStream = classPathResource.getInputStream();
 		    	this.saveFile(inStream, "google.jpg", product6);
 		    } catch(Exception e) {
 		    	LOGGER.error("Error while reading demo file google.jpg",e);
diff --git a/sm-shop/src/main/java/com/salesmanager/shop/utils/EmailTemplatesUtils.java b/sm-shop/src/main/java/com/salesmanager/shop/utils/EmailTemplatesUtils.java
index f07f290..5d42c9f 100644
--- a/sm-shop/src/main/java/com/salesmanager/shop/utils/EmailTemplatesUtils.java
+++ b/sm-shop/src/main/java/com/salesmanager/shop/utils/EmailTemplatesUtils.java
@@ -20,7 +20,7 @@ import com.salesmanager.shop.constants.EmailConstants;
 import com.salesmanager.shop.model.customer.PersistableCustomer;
 import com.salesmanager.shop.model.shop.ContactForm;
 import org.apache.commons.lang3.StringUtils;
-import org.apache.http.impl.cookie.DateUtils;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Qualifier;
@@ -223,7 +223,7 @@ public class EmailTemplatesUtils {
 		           templateTokens.put(EmailConstants.EMAIL_CUSTOMER_LASTNAME, order.getBilling().getLastName());
 		           
 		           String[] params = {String.valueOf(order.getId())};
-		           String[] dt = {DateUtils.formatDate(order.getDatePurchased())};
+		           String[] dt = {DateUtil.formatDate(order.getDatePurchased())};
 		           templateTokens.put(EmailConstants.EMAIL_ORDER_NUMBER, messages.getMessage("email.order.confirmation", params, customerLocale));
 		           templateTokens.put(EmailConstants.EMAIL_ORDER_DATE, messages.getMessage("email.order.ordered", dt, customerLocale));
 		           templateTokens.put(EmailConstants.EMAIL_ORDER_THANKS, messages.getMessage("email.order.thanks",customerLocale));
@@ -250,7 +250,7 @@ public class EmailTemplatesUtils {
 		           }
 		           
 			       String status = messages.getMessage("label.order." + order.getStatus().name(), customerLocale, order.getStatus().name());
-			       String[] statusMessage = {DateUtils.formatDate(order.getDatePurchased()),status};
+			       String[] statusMessage = {DateUtil.formatDate(order.getDatePurchased()),status};
 		           templateTokens.put(EmailConstants.ORDER_STATUS, messages.getMessage("email.order.status", statusMessage, customerLocale));
 		           
 
@@ -380,9 +380,9 @@ public class EmailTemplatesUtils {
 		        templateTokens.put(EmailConstants.EMAIL_CUSTOMER_FIRSTNAME, customer.getBilling().getFirstName());
 		        templateTokens.put(EmailConstants.EMAIL_CUSTOMER_LASTNAME, customer.getBilling().getLastName());
 				
-		        String[] statusMessageText = {String.valueOf(order.getId()),DateUtils.formatDate(order.getDatePurchased())};
+		        String[] statusMessageText = {String.valueOf(order.getId()),DateUtil.formatDate(order.getDatePurchased())};
 		        String status = messages.getMessage("label.order." + order.getStatus().name(), customerLocale, order.getStatus().name());
-		        String[] statusMessage = {DateUtils.formatDate(lastHistory.getDateAdded()),status};
+		        String[] statusMessage = {DateUtil.formatDate(lastHistory.getDateAdded()),status};
 		        
 		        String comments = lastHistory.getComments();
 		        if(StringUtils.isBlank(comments)) {
diff --git a/sm-shop/src/main/resources/spring/shopizer-security.xml b/sm-shop/src/main/resources/spring/shopizer-security.xml
index 4a9f198..694a384 100644
--- a/sm-shop/src/main/resources/spring/shopizer-security.xml
+++ b/sm-shop/src/main/resources/spring/shopizer-security.xml
@@ -47,7 +47,8 @@
 	
 	
 	<http pattern="/admin/**" auto-config="true" use-expressions="true" authentication-manager-ref="userAuthenticationManager">
-		<intercept-url pattern="/admin/logon.html*" access="permitAll" />
+		<!--<intercept-url pattern="/admin/logon.html*" access="permitAll" />-->
+		<intercept-url pattern="/admin/logon*" access="permitAll" />
 		<intercept-url pattern="/admin/denied.html" access="permitAll" />
 		<intercept-url pattern="/admin/unauthorized.html" access="permitAll" />
 		<intercept-url pattern="/admin/users/resetPassword.html*" access="permitAll" />
@@ -60,7 +61,7 @@
 
 		
 		<form-login 
-			login-processing-url="/admin/j_spring_security_check" 
+			login-processing-url="/admin/logon" 
 			login-page="/admin/logon.html"
 			authentication-success-handler-ref="userAuthenticationSuccessHandler"
 			authentication-failure-url="/admin/logon.html?login_error=true"
@@ -69,7 +70,8 @@
 			
 		<logout invalidate-session="true" 
 			logout-success-url="/admin/home.html" 
-			logout-url="/admin/j_spring_security_logout" />
+			logout-url="/admin/logout" />
+			
 		<access-denied-handler ref="adminAccessDenied"/>
 	</http>
 	
@@ -84,7 +86,7 @@
 		<intercept-url pattern="/shop/customer/registration.html*" access="permitAll" />
 		<intercept-url pattern="/shop/customer/customLogon.html*" access="permitAll" />
 		<intercept-url pattern="/shop/customer/denied.html" access="permitAll" />
-		<intercept-url pattern="/shop/customer/j_spring_security_check" access="permitAll" />
+		<intercept-url pattern="/shop/customer/logon" access="permitAll" />
 		<intercept-url pattern="/shop/customer" access="hasRole('AUTH_CUSTOMER')" />
 		<intercept-url pattern="/shop/customer/" access="hasRole('AUTH_CUSTOMER')" />
 		<intercept-url pattern="/shop/customer/*.html*" access="hasRole('AUTH_CUSTOMER')" />
@@ -95,7 +97,7 @@
 			
 		<logout invalidate-session="false" 
 			logout-success-url="/shop/" 
-			logout-url="/shop/customer/j_spring_security_logout" />
+			logout-url="/shop/customer/logout" />
 		<access-denied-handler error-page="/shop/"/>
 	</http>
 	
diff --git a/sm-shop/src/main/webapp/WEB-INF/views/admin/logon.jsp b/sm-shop/src/main/webapp/WEB-INF/views/admin/logon.jsp
index f597033..d49ddf5 100644
--- a/sm-shop/src/main/webapp/WEB-INF/views/admin/logon.jsp
+++ b/sm-shop/src/main/webapp/WEB-INF/views/admin/logon.jsp
@@ -227,7 +227,7 @@
 
 						var username = $.cookie('usernamecookie');
 						if (username != null && username != '') {
-							$('#j_username').val(username);
+							$('#username').val(username);
 							$('#remember').attr('checked', true);
 						}
 
@@ -239,13 +239,13 @@
 											
 
 											var hasError = false;
-											$('#j_username_help').html("");
-											$('#j_password_help').html("");
+											$('#username_help').html("");
+											$('#password_help').html("");
 											
 											
 											if ($('#remember').attr('checked')) {
 												$.cookie('usernamecookie', $(
-														'#j_username').val(), {
+														'#username').val(), {
 													expires : 1024,
 													path : '/'
 												});
@@ -256,16 +256,16 @@
 															path : '/'
 														});
 											}
-											if ($.trim($('#j_username').val()) == '') {
+											if ($.trim($('#username').val()) == '') {
 												hasError = true;
-												$('#j_username_help')
+												$('#username_help')
 														.html(
 																"<font color='red' size='4'><strong>*</strong></font>");
 											}
 
-											if ($.trim($('#j_password').val()) == '') {
+											if ($.trim($('#password').val()) == '') {
 												hasError = true;
-												$('#j_password_help')
+												$('#password_help')
 														.html(
 																"<font color='red' size='4'><strong>*</strong></font>");
 											}
@@ -326,15 +326,15 @@
 					<div class="row">
 						<div id="controls">
 
-							<form method="post" id="logonForm" class="form-horizontal" action="<c:url value="/admin/j_spring_security_check"/>">
+							<form method="post" id="logonForm" class="form-horizontal" action="<c:url value="/admin/logon"/>">
 								<div class="control-group">
 									<label class="control-label" for="inputUser">
 										<s:message code="label.username" text="Username" />
 									</label>
 									<div class="controls">
-										<input type="text" id="j_username" name="j_username"
+										<input type="text" id="username" name="username"
 											placeholder="<s:message code="label.username" text="Username"/>">
-											<span id="j_username_help" class="help-inline"></span>
+											<span id="username_help" class="help-inline"></span>
 									</div>
 								</div>
 								<div class="control-group">
@@ -343,9 +343,9 @@
 									</label>
 
 									<div class="controls">
-										<input type="password" id="j_password" name="j_password"
+										<input type="password" id="password" name="password"
 											placeholder="<s:message code="label.password" text="Password"/>">
-											<span id="j_password_help" class="help-inline"></span>
+											<span id="password_help" class="help-inline"></span>
 									</div>
 								</div>
 								<div class="control-group">
diff --git a/sm-shop/target/classes/com/salesmanager/shop/populator/customer/CustomerBillingAddressPopulator.class b/sm-shop/target/classes/com/salesmanager/shop/populator/customer/CustomerBillingAddressPopulator.class
index 8f1d36d..78fda20 100644
Binary files a/sm-shop/target/classes/com/salesmanager/shop/populator/customer/CustomerBillingAddressPopulator.class and b/sm-shop/target/classes/com/salesmanager/shop/populator/customer/CustomerBillingAddressPopulator.class differ
diff --git a/sm-shop/target/classes/com/salesmanager/shop/populator/customer/CustomerDeliveryAddressPopulator.class b/sm-shop/target/classes/com/salesmanager/shop/populator/customer/CustomerDeliveryAddressPopulator.class
index e812413..80b4d9a 100644
Binary files a/sm-shop/target/classes/com/salesmanager/shop/populator/customer/CustomerDeliveryAddressPopulator.class and b/sm-shop/target/classes/com/salesmanager/shop/populator/customer/CustomerDeliveryAddressPopulator.class differ
diff --git a/sm-shop/target/classes/com/salesmanager/shop/populator/customer/CustomerEntityPopulator.class b/sm-shop/target/classes/com/salesmanager/shop/populator/customer/CustomerEntityPopulator.class
index 603320f..2750625 100644
Binary files a/sm-shop/target/classes/com/salesmanager/shop/populator/customer/CustomerEntityPopulator.class and b/sm-shop/target/classes/com/salesmanager/shop/populator/customer/CustomerEntityPopulator.class differ
diff --git a/sm-shop/target/classes/com/salesmanager/shop/populator/customer/CustomerOptionPopulator.class b/sm-shop/target/classes/com/salesmanager/shop/populator/customer/CustomerOptionPopulator.class
index f3be656..153010d 100644
Binary files a/sm-shop/target/classes/com/salesmanager/shop/populator/customer/CustomerOptionPopulator.class and b/sm-shop/target/classes/com/salesmanager/shop/populator/customer/CustomerOptionPopulator.class differ
diff --git a/sm-shop/target/classes/com/salesmanager/shop/populator/customer/CustomerPopulator.class b/sm-shop/target/classes/com/salesmanager/shop/populator/customer/CustomerPopulator.class
index 3b97392..75db926 100644
Binary files a/sm-shop/target/classes/com/salesmanager/shop/populator/customer/CustomerPopulator.class and b/sm-shop/target/classes/com/salesmanager/shop/populator/customer/CustomerPopulator.class differ
diff --git a/sm-shop/target/m2e-wtp/web-resources/META-INF/maven/com.shopizer/sm-shop/pom.properties b/sm-shop/target/m2e-wtp/web-resources/META-INF/maven/com.shopizer/sm-shop/pom.properties
index 7c415f5..c42bea6 100644
--- a/sm-shop/target/m2e-wtp/web-resources/META-INF/maven/com.shopizer/sm-shop/pom.properties
+++ b/sm-shop/target/m2e-wtp/web-resources/META-INF/maven/com.shopizer/sm-shop/pom.properties
@@ -1,5 +1,5 @@
 #Generated by Maven Integration for Eclipse
-#Wed Nov 09 12:49:51 EST 2016
+#Thu Nov 10 16:48:39 EST 2016
 version=2.5.0-SNAPSHOT
 groupId=com.shopizer
 m2e.projectName=sm-shop