Users - RESOLVED: Error creating PDF of Order

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Users - RESOLVED: Error creating PDF of Order

Mark Mantarro

OK,

I’m still pretty new to this product, but I was able to resolve this error.  Now I need to know if I should report this (and how) and how many other problems did I just uncover?

 

RESOLUTION: discovered \applications\order\webapp\ordermgr\WEB-INF\actions\order\companyHeader.bsh has partyId = “Company” hardcoded on line 43!  I changed line to partyId = “10000” (my real company) and I was able to render the PDF.

 

How many other things assume partyId = “Company”? Is this a bug? Should this be a role?  Anyway, I don’t know how to proceed, except to change this every time I update my SVN version.

 

Background: When I installed my “production” OFBIZ , I did a ant run-install-seed to just get the minimum data in the system.  I then added my company and the necessary roles, etc….  Unfortunately, that means that my company is not Party ID of “Company”…. Any suggestions, I’ve got 6 months of data in the system now and can’t just “start over”.

 

Mark

 


From: Mark Mantarro [mailto:[hidden email]]
Sent: Sunday, January 08, 2006 9:25 AM
To: '[hidden email]'
Subject: RE: Error creating PDF of Order

 

 

Sorry for taking so long to reply, Thanks for your comments…  but I still don’t have the answer.

 

I downloaded and tested with the demo data and the PDF rendering works, so the code is good.  So it must be something in the upgrade.  When I re-read the change comments, I am still stuck on the comment: : it will now retrieve company information and logo from the database settings”

 

What database settings?  Where do I set them in the app?  Does my party or facility need a specific role or contactmech that is new?  I had modified the companyLogo.fo.ftl file to have my logo and return address.  Obviously , this will now come from the database.  Also, I found these error messages in the log concerning data/entity issues:

 

E:/Downloads/ofbiz/svncode/ofbiz_6473/specialized/wholesale/entitydef/entitymodel.xml

22593 (main) [    ModelViewEntity.java:626:INFO ] Throwing out field alias in view entity PartyRoleAndPartyDetail because one already exists with the name: statusId

22723 (main) [    ModelViewEntity.java:626:INFO ] Throwing out field alias in view entity ProductInventoryItem because one already exists with the name: facilityId

22733 (main) [    ModelViewEntity.java:626:INFO ] Throwing out field alias in view entity ProductInventoryItem because one already exists with the name: facilityId

22733 (main) [    ModelViewEntity.java:626:INFO ] Throwing out field alias in view entity ProductInventoryItem because one already exists with the name: comments

22953 (main) [    ModelViewEntity.java:626:INFO ] Throwing out field alias in view entity PartyRelationshipAndType because one already exists with the name: statusId

22953 (main) [    ModelViewEntity.java:626:INFO ] Throwing out field alias in view entity OrderHeaderPersonGroupRoleNote because one already exists with the name: externalId

22963 (main) [    ModelViewEntity.java:626:INFO ] Throwing out field alias in view entity OrderHeaderPersonGroupRoleNote because one already exists with the name: statusId

22963 (main) [    ModelViewEntity.java:626:INFO ] Throwing out field alias in view entity OrderHeaderPersonGroupRoleNote because one already exists with the name: comments

 


From: Mark Mantarro [mailto:[hidden email]]
Sent: Thursday, December 29, 2005 11:58 PM
To: '[hidden email]'
Subject: Error creating PDF of Order

 

Hello,

 

I’ve been running on r5664, but am looking to move up to the newest version.  I updated to r6418 and then r6445 but I can not get the PDF option to render when viewing an order.  From the error message it looks like an improvement in r6108 “New and improved company header for order receipts and other PDFs: it will now retrieve company information and logo from the database settings.” is the culprit.  

 

How do I check and correct my company info and logo in the database?  Is that really the problem?

 

Here is the log excerpt.  Can’t wait to understand this better so I can contribute….

 

Mark M

 

 

Expression postalAddress is undefined on line 13, column 31 in companyHeader.fo.ftl.

The problematic instruction:

----------

==> ${postalAddress.address1?if_exists} [on line 13, column 29 in companyHeader.fo.ftl]

----------

 

Java backtrace for programmers:

----------

freemarker.core.InvalidReferenceException: Expression postalAddress is undefined on line 13, column 31 in companyHeader.fo.ftl.

 

 

Exception: org.ofbiz.base.util.GeneralException

Message: Error rendering screen [CompanyLogo]: java.lang.RuntimeException: Error rendering included template at location [component://order/webapp/ordermgr/order/companyHeader.fo.ftl]: freemarker.core.InvalidReferenceException: Expression postalAddress is undefined on line 13, column 31 in companyHeader.fo.ftl. (Error rendering included template at location [component://order/webapp/ordermgr/order/companyHeader.fo.ftl]: freemarker.core.InvalidReferenceException: Expression postalAddress is undefined on line 13, column 31 in companyHeader.fo.ftl.)


 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - RESOLVED: Error creating PDF of Order

David E. Jones

Actually, that line is just a default. If you read a few lines down  
in the script you will see where it really looks for the partyIds. I  
agree this shouldn't even be there, so I'm removing it... (rev 6478).  
So, it's not a resolution to the problem.

Hopefully nothing else assumes that partyId or anything else, but not  
every contribution has been finally picked through and people  
sometimes take short cuts, so it's certainly something to keep an eye  
out for.

For your new company, just make sure you have all of the needed  
internal organization data in place, probably far easiest done by  
looking through all of the demo data XML files for records related to  
the Company partyId.

-David


On Jan 8, 2006, at 12:39 PM, Mark Mantarro wrote:

> OK,
>
> I’m still pretty new to this product, but I was able to resolve  
> this error.  Now I need to know if I should report this (and how)  
> and how many other problems did I just uncover?
>
>
> RESOLUTION: discovered \applications\order\webapp\ordermgr\WEB-INF
> \actions\order\companyHeader.bsh has partyId = “Company” hardcoded  
> on line 43!  I changed line to partyId = “10000” (my real company)  
> and I was able to render the PDF.
>
>
> How many other things assume partyId = “Company”? Is this a bug?  
> Should this be a role?  Anyway, I don’t know how to proceed, except  
> to change this every time I update my SVN version.
>
>
> Background: When I installed my “production” OFBIZ , I did a ant  
> run-install-seed to just get the minimum data in the system.  I  
> then added my company and the necessary roles, etc….  
> Unfortunately, that means that my company is not Party ID of  
> “Company”…. Any suggestions, I’ve got 6 months of data in the  
> system now and can’t just “start over”.
>
>
> Mark
>
>
> From: Mark Mantarro [mailto:[hidden email]]
> Sent: Sunday, January 08, 2006 9:25 AM
> To: '[hidden email]'
> Subject: RE: Error creating PDF of Order
>
>
>
> Sorry for taking so long to reply, Thanks for your comments…  but I  
> still don’t have the answer.
>
>
> I downloaded and tested with the demo data and the PDF rendering  
> works, so the code is good.  So it must be something in the  
> upgrade.  When I re-read the change comments, I am still stuck on  
> the comment: : it will now retrieve company information and logo  
> from the database settings”
>
>
> What database settings?  Where do I set them in the app?  Does my  
> party or facility need a specific role or contactmech that is new?  
> I had modified the companyLogo.fo.ftl file to have my logo and  
> return address.  Obviously , this will now come from the database.  
> Also, I found these error messages in the log concerning data/
> entity issues:
>
>
> E:/Downloads/ofbiz/svncode/ofbiz_6473/specialized/wholesale/
> entitydef/entitymodel.xml
>
> 22593 (main) [    ModelViewEntity.java:626:INFO ] Throwing out  
> field alias in view entity PartyRoleAndPartyDetail because one  
> already exists with the name: statusId
>
> 22723 (main) [    ModelViewEntity.java:626:INFO ] Throwing out  
> field alias in view entity ProductInventoryItem because one already  
> exists with the name: facilityId
>
> 22733 (main) [    ModelViewEntity.java:626:INFO ] Throwing out  
> field alias in view entity ProductInventoryItem because one already  
> exists with the name: facilityId
>
> 22733 (main) [    ModelViewEntity.java:626:INFO ] Throwing out  
> field alias in view entity ProductInventoryItem because one already  
> exists with the name: comments
>
> 22953 (main) [    ModelViewEntity.java:626:INFO ] Throwing out  
> field alias in view entity PartyRelationshipAndType because one  
> already exists with the name: statusId
>
> 22953 (main) [    ModelViewEntity.java:626:INFO ] Throwing out  
> field alias in view entity OrderHeaderPersonGroupRoleNote because  
> one already exists with the name: externalId
>
> 22963 (main) [    ModelViewEntity.java:626:INFO ] Throwing out  
> field alias in view entity OrderHeaderPersonGroupRoleNote because  
> one already exists with the name: statusId
>
> 22963 (main) [    ModelViewEntity.java:626:INFO ] Throwing out  
> field alias in view entity OrderHeaderPersonGroupRoleNote because  
> one already exists with the name: comments
>
>
> From: Mark Mantarro [mailto:[hidden email]]
> Sent: Thursday, December 29, 2005 11:58 PM
> To: '[hidden email]'
> Subject: Error creating PDF of Order
>
>
> Hello,
>
>
> I’ve been running on r5664, but am looking to move up to the newest  
> version.  I updated to r6418 and then r6445 but I can not get the  
> PDF option to render when viewing an order.  From the error message  
> it looks like an improvement in r6108 “New and improved company  
> header for order receipts and other PDFs: it will now retrieve  
> company information and logo from the database settings.” is the  
> culprit.
>
>
> How do I check and correct my company info and logo in the  
> database?  Is that really the problem?
>
>
> Here is the log excerpt….  Can’t wait to understand this better so  
> I can contribute….
>
>
> Mark M
>
>
>
> Expression postalAddress is undefined on line 13, column 31 in  
> companyHeader.fo.ftl.
>
> The problematic instruction:
>
> ----------
>
> ==> ${postalAddress.address1?if_exists} [on line 13, column 29 in  
> companyHeader.fo.ftl]
>
> ----------
>
>
> Java backtrace for programmers:
>
> ----------
>
> freemarker.core.InvalidReferenceException: Expression postalAddress  
> is undefined on line 13, column 31 in companyHeader.fo.ftl.
>
>
>
> Exception: org.ofbiz.base.util.GeneralException
>
> Message: Error rendering screen [CompanyLogo]:  
> java.lang.RuntimeException: Error rendering included template at  
> location [component://order/webapp/ordermgr/order/
> companyHeader.fo.ftl]: freemarker.core.InvalidReferenceException:  
> Expression postalAddress is undefined on line 13, column 31 in  
> companyHeader.fo.ftl. (Error rendering included template at  
> location [component://order/webapp/ordermgr/order/
> companyHeader.fo.ftl]: freemarker.core.InvalidReferenceException:  
> Expression postalAddress is undefined on line 13, column 31 in  
> companyHeader.fo.ftl.)
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users