Good Evening to Yes-Cart Team,
Thanks for helping us to create 'Customise-User'from which we become able to login via our customize user in Yes-cart(admin) module successfully.
1)Now when we are going to add image in the following sub-module of
'PIM & master Catalog' as
a)In 'Brand' sub-module,it's going to upload successfully,but at the of 'saving' this image we get the error as;
<!DOCTYPE html><html><head><title>Apache Tomcat/8.0.46 - Error report</title><style type="text/css">H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}.line {height: 1px; background-color: #525D76; border: none;}</style> </head><body><h1>HTTP Status 500 - Request processing failed; nested exception is java.lang.NullPointerException</h1><div class="line"></div><p><b>type</b> Exception report</p><p><b>message</b> <u>Request processing failed; nested exception is java.lang.NullPointerException</u></p><p><b>description</b> <u>The server encountered an internal error that prevented it from fulfilling this request.</u></p><p><b>exception</b></p><pre>org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.NullPointerException
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:948)
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:838)
javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:183)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
</pre><p><b>root cause</b></p><pre>java.lang.NullPointerException
org.yes.cart.stream.io.impl.AbstractFileSystemIOProviderImpl.getOsAwarePath(AbstractFileSystemIOProviderImpl.java:58)
org.yes.cart.stream.io.impl.WebAppContextIOProviderImpl.resolveFileFromUri(WebAppContextIOProviderImpl.java:51)
org.yes.cart.stream.io.impl.AbstractFileSystemIOProviderImpl.write(AbstractFileSystemIOProviderImpl.java:93)
org.yes.cart.stream.io.impl.IOProviderFactoryImpl.write(IOProviderFactoryImpl.java:90)
org.yes.cart.service.domain.impl.ImageServiceImpl.addImageToRepository(ImageServiceImpl.java:416)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source).......
>>As to solve this problem we goanna follow the docs which you suggested via link
http://www.inspire-software.com/confluence/display/YC3J/From+source#Fromsource-Filepathsconfiguration
& we try to implement the given instruction as given..
Image repository
Initially you must copy imagevault default structure from theme module as it contains default "no image" images to place of your choosing. Recommendation for development environment is to copy it to root directory of the project.
Copy default imagevault
Navigate to the "YC_HOME/theme/imagevault/src/main/resources/default/imagevault/" home directory of YC storefront default theme and copy directory "imagevault" to YC_HOME, so that now you have YC_HOME/imagevault.
on *nix
# from YC_HOME create directory
mkdir imagevault
# copy the directory contents from themes module
cp -r theme/imagevault/src/main/resources/default/imagevault/ ./imagevault
Image repository is set via system preferences (SYSTEM_IMAGE_VAULT) and by default it is configured to one directory up from web app context in directory 'imagevault':
Default relative to web apps path
context://../imagevault
This configuration is valid for setup where both JAM and storefront web apps are under one tomcat instance and 'image vault' is in '$TOMCAT_HOME/webapps/imagevault'.
However it is highly recommended to have this setting as absolute path.
Example absolute path
# linux style (if your YC_HOME is in /development/yes-cart/)
file:///development/yes-cart/imagevault
# Windows style (if your YC_HOME is in C:\development\yes-cart\)
file:///C:/development/yes-cart/imagevault
In real production environment you need to change this value to a shared directory (possibly via network). In order to do this you can use 'file://' protocol and state absolute path
Absolute path example
file:///var/www/static/imagevault
Remember to give permissions for the tomcat user to read/write to that directory
Depending on security policy of Tomcat using 'context://../imagevault' may return null since we are going out of the servlet context root directory. Symptoms for this are: images not rendering on storefront, unable to import images in YUM.
In this case use 'file://' protocol to give absolute path.
>>we are very sorry that we didn't get the above instruction cleary to implement & finally we become unable resolve our image problem(to save Brand image successfully).
please help us regarding this context by providing clear instruction as provided till now so be become able to save our image .