Hi,
I am trying to call the createCustomer Simple method service which was a replica of what exists in ecommerce application. But I am not sure as to why its throwing "Locale cannot be null" exception. I have checked the stuff and the locale is getting passed in the map and the property file corresponding to the locale does exists in the jar. Does any one have an idea on this. I am passing in the code snippet that I have written for calling the simple method from my class and the error which I am getting. Appreciate if any one can help Snippet to call the simple method - Map fields = FastMap.newInstance(); fields.put("request",request); fields.put("locale",UtilHttp.getLocale(request)); fields.put("visit",VisitHandler.getVisit(session)); fields.put("USERNAME", username); fields.put("CUSTOMER_EMAIL_ALLOW_SOL", "Y"); fields.put("CUSTOMER_ADDRESS1", "_NA_"); fields.put("CUSTOMER_HOME_ALLOW_SOL", "Y"); fields.put("USER_LAST_NAME", "_NA_"); fields.put("productStoreId", ""); fields.put("USER_TITLE", "_NA_"); fields.put("CUSTOMER_MOBILE_ALLOW_SOL", "Y"); fields.put("PASSWORD", "dummy"); fields.put("USER_FIRST_NAME", "_NA_"); fields.put("CUSTOMER_CITY", "_NA_"); fields.put("CONFIRM_PASSWORD", "dummy"); fields.put("CUSTOMER_FAX_ALLOW_SOL", "Y"); fields.put("CUSTOMER_POSTAL_CODE", "_NA_"); fields.put("CUSTOMER_WORK_ALLOW_SOL", "Y"); fields.put("CUSTOMER_STATE", "_NA_"); fields.put("CUSTOMER_COUNTRY", "_NA_"); fields.put("CUSTOMER_EMAIL", "_NA_"); fields.put("CUSTOMER_ADDRESS_ALLOW_SOL", "Y"); fields.put("CUSTOMER_MOBILE_CONTACT",""); result = SimpleMethod.runSimpleService( "org/ofbiz/ecommerce/customer/CustomerEvents.xml", "createCustomer", ctx, fields); ================================================================== Logs that can be seen on the server 40234 (ExecuteThread: '14' for queue: 'weblogic.kernel.Default') [ UtilXml.java:242:DEBUG] XML Read 0.203s: zip:D:/CI/cidomain/ecomdomain/m yserver/.wlnotdelete/extract/myserver_ofbiz/APP-INF/lib/ofbiz-trialshop.jar!/org/ofbiz/ecommerce/customer/CustomerEvents.xml 41484 (ExecuteThread: '14' for queue: 'weblogic.kernel.Default') [ Log.java:103:INFO ] Calling getProductStore timepassHttp Request: /c onsumerOrders/control/mainen_GB 41906 (ExecuteThread: '14' for queue: 'weblogic.kernel.Default') [ Log.java:103:INFO ] Creating new customer, newUserLogin=[GenericEnti ty:UserLogin][currentPassword,dummy(java.lang.String)][userLoginId,timepass(java.lang.String)] 41906 (ExecuteThread: '14' for queue: 'weblogic.kernel.Default') [ InFieldOper.java:53 :WARN ] [SimpleMapProcessor.InFieldOper.exec] In field U SER_MIDDLE_NAME not found, not appending anything 41953 (ExecuteThread: '14' for queue: 'weblogic.kernel.Default') [ SimpleMethod.java:909:ERROR] ---- runtime exception report -------------------------------------------------- Error in simple-method operation [<call-simple-map-processor/>]: java.lang.IllegalArgumentException: Locale cannot be null Exception: java.lang.IllegalArgumentException Message: Locale cannot be null ---- stack trace --------------------------------------------------------------- java.lang.IllegalArgumentException: Locale cannot be null org.ofbiz.base.util.UtilProperties.getResourceBundleMap(UtilProperties.java:501) org.ofbiz.base.util.UtilProperties.getMessage(UtilProperties.java:404) org.ofbiz.minilang.operation.SimpleMapOperation.addMessage(SimpleMapOperation.java:71) org.ofbiz.minilang.operation.ValidateMethod.exec(ValidateMethod.java:109) org.ofbiz.minilang.operation.SimpleMapProcess.exec(SimpleMapProcess.java:60) org.ofbiz.minilang.operation.MapProcessor.exec(MapProcessor.java:89) org.ofbiz.minilang.method.callops.CallSimpleMapProcessor.exec(CallSimpleMapProcessor.java:100) org.ofbiz.minilang.SimpleMethod.runSubOps(SimpleMethod.java:904) org.ofbiz.minilang.method.ifops.IfCompare.exec(IfCompare.java:128) org.ofbiz.minilang.SimpleMethod.runSubOps(SimpleMethod.java:904) org.ofbiz.minilang.SimpleMethod.exec(SimpleMethod.java:560) org.ofbiz.minilang.SimpleMethod.runSimpleMethod(SimpleMethod.java:115) org.ofbiz.minilang.SimpleMethod.runSimpleService(SimpleMethod.java:91) com.test.security.PerimeterLoginEvent.perimeterLogin(PerimeterLoginEvent.java:111) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:324) org.ofbiz.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java:99) org.ofbiz.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java:85) org.ofbiz.webapp.control.RequestHandler.runEvent(RequestHandler.java:373) org.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:188) org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:221) javax.servlet.http.HttpServlet.service(HttpServlet.java:740) javax.servlet.http.HttpServlet.service(HttpServlet.java:853) weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1072) weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:465) weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28) weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27) org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:241) weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27) com.bt.netc.frameworks.filters.FilterProxyImpl.doFilter(FilterProxyImpl.java:65) org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:137) weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27) weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6987) weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121) weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3892) weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2766) weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224) weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183) 42406 (ExecuteThread: '14' for queue: 'weblogic.kernel.Default') [ SimpleMethod.java:909:ERROR] ---- runtime exception report -------------------------------------------------- Error in simple-method operation [<if-compare field-name="REQUIRE_EMAIL" map-name="parameters" value="false"/>]: java.lang.RuntimeException: Error in simple-method operation [<call-simple-map-processor/>]: java.lang.IllegalArgumentException: Locale cannot be null Exception: java.lang.RuntimeException Message: Error in simple-method operation [<call-simple-map-processor/>]: java.lang.IllegalArgumentException: Locale cannot be null ---- stack trace --------------------------------------------------------------- java.lang.RuntimeException: Error in simple-method operation [<call-simple-map-processor/>]: java.lang.IllegalArgumentException: Locale cannot be null org.ofbiz.minilang.SimpleMethod.runSubOps(SimpleMethod.java:910) org.ofbiz.minilang.method.ifops.IfCompare.exec(IfCompare.java:128) org.ofbiz.minilang.SimpleMethod.runSubOps(SimpleMethod.java:904) org.ofbiz.minilang.SimpleMethod.exec(SimpleMethod.java:560) org.ofbiz.minilang.SimpleMethod.runSimpleMethod(SimpleMethod.java:115) org.ofbiz.minilang.SimpleMethod.runSimpleService(SimpleMethod.java:91) com.test.security.PerimeterLoginEvent.perimeterLogin(PerimeterLoginEvent.java:356) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:324) org.ofbiz.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java:99) org.ofbiz.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java:85) org.ofbiz.webapp.control.RequestHandler.runEvent(RequestHandler.java:373) org.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:188) org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:221) javax.servlet.http.HttpServlet.service(HttpServlet.java:740) javax.servlet.http.HttpServlet.service(HttpServlet.java:853) weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1072) weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:465) weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28) weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27) org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:241) weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27) com.bt.netc.frameworks.filters.FilterProxyImpl.doFilter(FilterProxyImpl.java:65) org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:137) weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27) weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6987) weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121) weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3892) weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2766) weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224) weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183) -------------------------------------------------------------------------------- 42875 (ExecuteThread: '14' for queue: 'weblogic.kernel.Default') [ SimpleMethod.java:564:ERROR] simpleMethod.error_running: Error in simple-meth od operation [<if-compare field-name="REQUIRE_EMAIL" map-name="parameters" value="false"/>]: java.lang.RuntimeException: Error in simple-method operat ion [<call-simple-map-processor/>]: java.lang.IllegalArgumentException: Locale cannot be null 42953 (ExecuteThread: '14' for queue: 'weblogic.kernel.Default') [ TransactionUtil.java:248:ERROR] ---- exception report ---------------------------------------------------------- [TransactionUtil.rollback] Exception: java.lang.Exception Message: Stack Trace ---- stack trace --------------------------------------------------------------- java.lang.Exception: Stack Trace org.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:247) org.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:229) org.ofbiz.minilang.SimpleMethod.exec(SimpleMethod.java:689) org.ofbiz.minilang.SimpleMethod.runSimpleMethod(SimpleMethod.java:115) org.ofbiz.minilang.SimpleMethod.runSimpleService(SimpleMethod.java:91) com.test.security.PerimeterLoginEvent.perimeterLogin(PerimeterLoginEvent.java:356) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:324) org.ofbiz.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java:99) org.ofbiz.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java:85) org.ofbiz.webapp.control.RequestHandler.runEvent(RequestHandler.java:373) org.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:188) org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:221) javax.servlet.http.HttpServlet.service(HttpServlet.java:740) javax.servlet.http.HttpServlet.service(HttpServlet.java:853) weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1072) weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:465) weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28) weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27) org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:241) weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27) com.bt.netc.frameworks.filters.FilterProxyImpl.doFilter(FilterProxyImpl.java:65) org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:137) weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27) weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6987) weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121) weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3892) weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2766) weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224) weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183) -------------------------------------------------------------------------------- 43390 (ExecuteThread: '14' for queue: 'weblogic.kernel.Default') [ TransactionUtil.java:258:INFO ] [TransactionUtil.rollback] transaction rolled ba ck 43469 (ExecuteThread: '14' for queue: 'weblogic.kernel.Default') [PerimeterLoginEvent.java:360:INFO ] perimeterLogin@PerimeterLoginEvent call ing register service :[request=Http Request: /testOrders/control/main, locale=en_GB, visit=[GenericEntity:Visit][clientHostName,127.0.0.1(java.lan g.String)][clientIpAddress,127.0.0.1(java.lang.String)][clientUser,null()][createdStamp,2006-08-23 11:31:59.312(java.sql.Timestamp)][createdTxStamp,20 06-08-23 11:31:59.312(java.sql.Timestamp)][fromDate,2006-08-23 11:31:58.359(java.sql.Timestamp)][initialLocale,en_GB(java.lang.String)][initialReferre r,(java.lang.String)][initialRequest,http://localhost:7001/testOrders/control/main(java.lang.String)][initialUserAgent,Mozilla/5.0 (Windows; U; Wi ndows NT 5.0; en-GB; rv:1.7.12) Gecko/20050919 Firefox/1.0.7(java.lang.String)][lastUpdatedStamp,2006-08-23 11:31:59.328(java.sql.Timestamp)][lastUpda tedTxStamp,2006-08-23 11:31:59.328(java.sql.Timestamp)][serverHostName,BT975709(java.lang.String)][serverIpAddress,10.234.196.100(java.lang.String)][s essionId,GsnpGZ1tGGrgnRwk78XyyBQ3VDptZJjrbX2bhHhLvtGNgpT5vTz6!227147131!1156329118359(java.lang.String)][visitId,10060(java.lang.String)][visitorId,10 000(java.lang.String)][webappName,testOrders(java.lang.String)], USERNAME=timepass, CUSTOMER_EMAIL_ALLOW_SOL=Y, CUSTOMER_ADDRESS1=_NA_, CUSTOMER_H OME_ALLOW_SOL=Y, USER_LAST_NAME=_NA_, productStoreId=, USER_TITLE=_NA_, CUSTOMER_MOBILE_ALLOW_SOL=Y, PASSWORD=dummy, USER_FIRST_NAME=_NA_, CUSTOMER_CI TY=_NA_, CONFIRM_PASSWORD=dummy, CUSTOMER_FAX_ALLOW_SOL=Y, CUSTOMER_POSTAL_CODE=_NA_, CUSTOMER_WORK_ALLOW_SOL=Y, CUSTOMER_STATE=_NA_, CUSTOMER_COUNTRY =_NA_, CUSTOMER_EMAIL=_NA_, CUSTOMER_ADDRESS_ALLOW_SOL=Y, CUSTOMER_MOBILE_CONTACT=, roleTypeId=CUSTOMER, fullName=_NA_ _NA_] 43547 (ExecuteThread: '14' for queue: 'weblogic.kernel.Default') [PerimeterLoginEvent.java:362:INFO ] perimeterLogin@PerimeterLoginEvent resu lt of register call :{errorMessage=simpleMethod.error_running: Error in simple-method operation [<if-compare field-name="REQUIRE_EMAIL" map-name="para meters" value="false"/>]: java.lang.RuntimeException: Error in simple-method operation [<call-simple-map-processor/>]: java.lang.IllegalArgumentExcept ion: Locale cannot be null<br/>null, responseMessage=error} > Thanks and Regards, > > Girish Patil > |
Free forum by Nabble | Edit this page |