Hi Rohit,

For your information no changes are made in upsShipmentConfirm service of UpsService.java , which can create a problem. Only one Util Package "HashMap" is been removed which was not used any where in that service. Yes, new service are added in that file. Refer Commit: 780582 for more details.

I think one of your element's value is missing when ShipmentConfirmRequest XML document is prepared. Putting log messages will help you to find exact element which is missing.

As I believe and observed that all of the functionalities are well tested by the Commiter when they check in the code. And they understand their responsibility more than you and me. It may happen that few things get break, but I also believe that Commiters are not God. And those issues can be sorted out by community efforts.

Its just my thought and not in anyway to point you. ;-)

Thanks
--
Divesh


As I believe,
rohit2006 wrote:
Hi Pranay,

Yes i am doing it from Route Segments, BTW i guess thats only how you can
get ofbiz to prepare a shipping label.

However, The secure URL error that you wrote about in your email, has been
existing for a quite a while and its being radually sorted out, I was
assuming that if the service.http.parameters.require.encrypted property in
the  url.properties file, was changed it wourl just throw a warning and not
interfere with the process.

Also, if think the UpsServices.java was updated recently, i was just
wandering if the commiter did any checks on his code before commiting it.
Because had the commitor tried to run a test shipments it would have not
have succeeded and thus the code should not have been committed in the first
place. I am just trying to understand the process of commiting the code, as
some commits has given me the impression as having been committed without
actually checking them for accuracy. Its just a thought and not in anyway to
point faults at anyone.

Rohit




Pranay Pandey-2 wrote:
Hello Rohit,

Are you doing it from Shipment --> Rout Segments screen.
If yes then this screen is not having issue which your log is saying. Its clear from log that its a secure url problem.:

observe:
======================================
============== Found URL parameter [shipmentId] passed to secure (https) request-map with uri [duplicateShipmentRouteSegment] with an event that
calls service [duplicateShipmentRouteSegment]; this is not allowed for
security reasons! The data should be encrypted by making it part of the request body (a form field) instead of the request URL. Moreover it would be
kind if you could create a Jira sub-task of
https://issues.apache.org/jira/browse/OFBIZ-2330 (check before if a sub-task for this error does not exist). If you are not sure how to create a Jira issue please have a look before at http://docs.ofbiz.org/x/r. Thank you in advance for your help.; In session [743586BA803CB620BFE228FE0D77AA60.jvm1];
Note that this can be changed using the
service.http.parameters.require.encrypted property in the url.properties
file
======================================

"
The Following Errors Occurred:

Error writing the ShipmentConfirmRequest XML Document to a String:
java.io.IOException: javax.xml.transform.TransformerException:
java.lang.NullPointerException

"
This error usually comes when the xml begin prepared is not proper or having a string null for some value. The code there should be improved and I and on it. Will submit a patch for it soon.


Thanks & Regards
--
Pranay Pandey

On Jun 4, 2009, at 2:31 PM, rohit2006 wrote:

Hi,

I think there is a bug in UpsServices.java. Its throwing the following
error. I am using the latest code from svn, still its throwing the error.

"
The Following Errors Occurred:

Error writing the ShipmentConfirmRequest XML Document to a String:
java.io.IOException: javax.xml.transform.TransformerException:
java.lang.NullPointerException

"
Has anyone else encountered similar error ?

Rohit

The log reads as below:

009-06-04 04:35:20,438 (TP-Processor7) [ RequestHandler.java: 692:INFO ]
Rendering View [EditShipmentRouteSegments],
sessionId=743586BA803CB620BFE228FE0D77AA60.jvm1
2009-06-04 04:35:21,315 (TP-Processor7) [ ControlServlet.java: 309:INFO ]
[[[EditShipmentRouteSegments] Request Done- total:0.88,since
last([EditShipmentRout...):0.88]]
2009-06-04 04:35:24,799 (TP-Processor6) [ ControlServlet.java: 131:INFO ]
[[[duplicateShipmentRouteSegment] Request Begun, encoding=[UTF-8]-
total:0.0,since last(Begin):0.0]]
2009-06-04 04:35:24,807 (TP-Processor6) [ServiceEventHandler.java: 407:ERROR] =============== Found URL parameter [shipmentId] passed to secure (https) request-map with uri [duplicateShipmentRouteSegment] with an event that
calls service [duplicateShipmentRouteSegment]; this is not allowed for
security reasons! The data should be encrypted by making it part of the request body (a form field) instead of the request URL. Moreover it would be
kind if you could create a Jira sub-task of
https://issues.apache.org/jira/browse/OFBIZ-2330 (check before if a sub-task for this error does not exist). If you are not sure how to create a Jira issue please have a look before at http://docs.ofbiz.org/x/r. Thank you in advance for your help.; In session [743586BA803CB620BFE228FE0D77AA60.jvm1];
Note that this can be changed using the
service.http.parameters.require.encrypted property in the url.properties
file
2009-06-04 04:35:24,808 (TP-Processor6) [ServiceEventHandler.java: 407:ERROR]
=============== Found URL parameter [shipmentRouteSegmentId] passed to
secure (https) request-map with uri [duplicateShipmentRouteSegment] with an
event that calls service [duplicateShipmentRouteSegment]; this is not
allowed for security reasons! The data should be encrypted by making it part of the request body (a form field) instead of the request URL. Moreover it
would be kind if you could create a Jira sub-task of
https://issues.apache.org/jira/browse/OFBIZ-2330 (check before if a sub-task for this error does not exist). If you are not sure how to create a Jira issue please have a look before at http://docs.ofbiz.org/x/r. Thank you in advance for your help.; In session [743586BA803CB620BFE228FE0D77AA60.jvm1];
Note that this can be changed using the
service.http.parameters.require.encrypted property in the url.properties
file
2009-06-04 04:35:25,391 (TP-Processor6) [ ServiceDispatcher.java: 586:INFO ]
Sync service [facility/createShipmentRouteSegment] finished in [472]
milliseconds
2009-06-04 04:35:25,414 (TP-Processor6) [ ServiceDispatcher.java: 586:INFO ] Sync service [facility/duplicateShipmentRouteSegment] finished in [606]
milliseconds
2009-06-04 04:35:25,415 (TP-Processor6) [ RequestHandler.java: 588:INFO ] Ran Event [service:#duplicateShipmentRouteSegment] from [request], result is
[success]
2009-06-04 04:35:25,416 (TP-Processor6) [ RequestHandler.java: 692:INFO ]
Rendering View [EditShipmentRouteSegments],
sessionId=743586BA803CB620BFE228FE0D77AA60.jvm1
2009-06-04 04:35:25,979 (TP-Processor6) [ ControlServlet.java: 309:INFO ]
[[[duplicateShipmentRouteSegment] Request Done- total:1.179,since
last([duplicateShipmen...):1.179]]
2009-06-04 04:35:31,867 (TP-Processor7) [ ControlServlet.java: 131:INFO ] [[[upsShipmentConfirm] Request Begun, encoding=[UTF-8]- total: 0.0,since
last(Begin):0.0]]
2009-06-04 04:35:31,871 (TP-Processor7) [ServiceEventHandler.java: 407:ERROR] =============== Found URL parameter [shipmentId] passed to secure (https) request-map with uri [upsShipmentConfirm] with an event that calls service [upsShipmentConfirm]; this is not allowed for security reasons! The data should be encrypted by making it part of the request body (a form field) instead of the request URL. Moreover it would be kind if you could create a Jira sub-task of https://issues.apache.org/jira/browse/OFBIZ-2330 (check before if a sub-task for this error does not exist). If you are not sure how
to create a Jira issue please have a look before at
http://docs.ofbiz.org/x/r. Thank you in advance for your help.; In session [743586BA803CB620BFE228FE0D77AA60.jvm1]; Note that this can be changed using the service.http.parameters.require.encrypted property in the url.properties
file
2009-06-04 04:35:31,871 (TP-Processor7) [ServiceEventHandler.java: 407:ERROR]
=============== Found URL parameter [shipmentRouteSegmentId] passed to
secure (https) request-map with uri [upsShipmentConfirm] with an event that
calls service [upsShipmentConfirm]; this is not allowed for security
reasons! The data should be encrypted by making it part of the request body (a form field) instead of the request URL. Moreover it would be kind if you
could create a Jira sub-task of
https://issues.apache.org/jira/browse/OFBIZ-2330 (check before if a sub-task for this error does not exist). If you are not sure how to create a Jira issue please have a look before at http://docs.ofbiz.org/x/r. Thank you in advance for your help.; In session [743586BA803CB620BFE228FE0D77AA60.jvm1];
Note that this can be changed using the
service.http.parameters.require.encrypted property in the url.properties
file
2009-06-04 04:35:32,322 (TP-Processor7) [ UpsServices.java: 518:ERROR] ---- exception report ----------------------------------------------------------
Error writing the ShipmentConfirmRequest XML Document to a String:
java.io.IOException: javax.xml.transform.TransformerException:
java.lang.NullPointerException Exception: java.io.IOException Message:
javax.xml.transform.TransformerException: java.lang.NullPointerException
---- stack trace
---------------------------------------------------------------
java.io.IOException: javax.xml.transform.TransformerException:
java.lang.NullPointerException
org.ofbiz.base.util.UtilXml.writeXmlDocument(UtilXml.java:321)
org.ofbiz.base.util.UtilXml.writeXmlDocument(UtilXml.java:301)
org.ofbiz.base.util.UtilXml.writeXmlDocument(UtilXml.java:236)
org.ofbiz.base.util.UtilXml.writeXmlDocument(UtilXml.java:226)
org .ofbiz .shipment .thirdparty.ups.UpsServices.upsShipmentConfirm(UpsServices.java:515)
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:597)
org .ofbiz .service .engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:96) org .ofbiz .service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:54) org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java: 392) org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java: 221) org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java: 159) org .ofbiz .webapp.event.ServiceEventHandler.invoke(ServiceEventHandler.java:336) org.ofbiz.webapp.control.RequestHandler.runEvent(RequestHandler.java: 587) org .ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java: 361)
org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:211)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org .apache .catalina .core .ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: 290) org .apache .catalina .core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java: 263) org .apache .catalina .core .ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: 235) org .apache .catalina .core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) org .apache .catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java: 233) org .apache .catalina.core.StandardContextValve.invoke(StandardContextValve.java: 175) org .apache .catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) org .apache .catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) org .apache .catalina.core.StandardEngineValve.invoke(StandardEngineValve.java: 109) org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java: 568) org .ofbiz .catalina .container .CrossSubdomainSessionValve.invoke(CrossSubdomainSessionValve.java:44) org .apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java: 286)
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
org .apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java: 697) org.apache.jk.common.ChannelSocket $SocketConnection.runIt(ChannelSocket.java:889) org.apache.tomcat.util.threads.ThreadPool $ControlRunnable.run(ThreadPool.java:690)
java.lang.Thread.run(Thread.java:619)
--------------------------------------------------------------------------------
2009-06-04 04:35:32,322 (TP-Processor7) [ ServiceDispatcher.java: 530:ERROR]
Error in Service [upsShipmentConfirm]: Error writing the
ShipmentConfirmRequest XML Document to a String: java.io.IOException:
javax.xml.transform.TransformerException: java.lang.NullPointerException 2009-06-04 04:35:32,323 (TP-Processor7) [ TransactionUtil.java: 285: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:284) org .ofbiz .entity.transaction.TransactionUtil.rollback(TransactionUtil.java:266) org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java: 534) org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java: 221) org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java: 159) org .ofbiz .webapp.event.ServiceEventHandler.invoke(ServiceEventHandler.java:336) org.ofbiz.webapp.control.RequestHandler.runEvent(RequestHandler.java: 587) org .ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java: 361)
org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:211)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org .apache .catalina .core .ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: 290) org .apache .catalina .core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java: 263) org .apache .catalina .core .ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: 235) org .apache .catalina .core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) org .apache .catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java: 233) org .apache .catalina.core.StandardContextValve.invoke(StandardContextValve.java: 175) org .apache .catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) org .apache .catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) org .apache .catalina.core.StandardEngineValve.invoke(StandardEngineValve.java: 109) org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java: 568) org .ofbiz .catalina .container .CrossSubdomainSessionValve.invoke(CrossSubdomainSessionValve.java:44) org .apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java: 286)
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
org .apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java: 697) org.apache.jk.common.ChannelSocket $SocketConnection.runIt(ChannelSocket.java:889) org.apache.tomcat.util.threads.ThreadPool $ControlRunnable.run(ThreadPool.java:690)
java.lang.Thread.run(Thread.java:619)
--------------------------------------------------------------------------------
2009-06-04 04:35:32,324 (TP-Processor7) [ TransactionUtil.java: 295:INFO ]
[TransactionUtil.rollback] transaction rolled back
2009-06-04 04:35:32,324 (TP-Processor7) [ ServiceDispatcher.java: 586:INFO ] Sync service [facility/upsShipmentConfirm] finished in [452] milliseconds 2009-06-04 04:35:32,324 (TP-Processor7) [ RequestHandler.java: 588:INFO ] Ran
Event [service:#upsShipmentConfirm] from [request], result is [error]
2009-06-04 04:35:32,349 (TP-Processor7) [ RequestHandler.java: 399:ERROR] Request upsShipmentConfirm caused an error with the following message: Error
writing the ShipmentConfirmRequest XML Document to a String:
java.io.IOException: javax.xml.transform.TransformerException:
java.lang.NullPointerException
2009-06-04 04:35:32,371 (TP-Processor7) [ RequestHandler.java: 692:INFO ]
Rendering View [EditShipmentRouteSegments],
sessionId=743586BA803CB620BFE228FE0D77AA60.jvm1
2009-06-04 04:35:33,134 (TP-Processor7) [ ControlServlet.java: 309:INFO ]
[[[upsShipmentConfirm] Request Done- total:1.267,since
last([upsShipmentConfi...):1.267]]

--
View this message in context:
http://www.nabble.com/Error-while-processing-UPS-shipment.-tp23866240p23866240.html
Sent from the OFBiz - User mailing list archive at Nabble.com.




Reply via email to