Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0006297Openbravo ERPB. User interfacepublic2008-12-01 13:162009-01-30 09:53
networkb 
networkb 
immediateminoralways
closedout of date 
20
2.35MP9 
 
Core
No
0006297: After configure the application with the machine name, if you acced with the IP address the reports with images does not work
After configure the application with the machine name, if you acced with the IP address the reports with images does not work

The error you get is the following:

Error:
Error loading byte data : http://<<IP_ADDRESS>>/openbravo/web/images/logo_albaran.jpg [^]
1-Configure Openbravo ERP with the name of the machine
2-Acced to the aplicatio with the ip address instead of using the server name
3-Execute a report that contains an image
4-The report is not loaded because an error when try to load the image.
No tags attached.
Issue History
2008-12-01 13:16networkbNew Issue
2008-12-01 13:16networkbAssigned To => rafaroda
2008-12-01 13:16networkbsf_bug_id0 => 2370769
2008-12-01 13:16networkbRegression testing => No
2008-12-02 01:21pnudingAssigned Torafaroda => pheenan
2008-12-02 10:20pheenanStatusnew => scheduled
2008-12-02 10:20pheenanNote Added: 0010864
2008-12-02 10:20pheenanfix_in_branch => trunk
2008-12-02 11:16pheenanNote Added: 0010872
2008-12-12 09:31pheenanNote Added: 0011220
2008-12-18 10:19pheenanNote Added: 0011508
2008-12-18 15:37pheenanNote Added: 0011524
2008-12-18 15:37pheenanStatusscheduled => feedback
2008-12-19 10:58networkbNote Added: 0011575
2008-12-23 07:56pjuvaraNote Added: 0011689
2008-12-23 07:56pjuvaraStatusfeedback => new
2008-12-23 10:14pheenanNote Added: 0011691
2008-12-23 10:51pheenanAssigned Topheenan => networkb
2008-12-23 10:51pheenanStatusnew => feedback
2008-12-23 14:02dbazNote Added: 0011705
2009-01-02 09:50networkbNote Added: 0011834
2009-01-02 09:51networkbStatusfeedback => new
2009-01-02 09:51networkbfix_in_branchtrunk =>
2009-01-02 13:32pnudingNote Added: 0011855
2009-01-02 13:32pnudingAssigned Tonetworkb => pheenan
2009-01-02 13:45dbazNote Added: 0011856
2009-01-03 19:51rafarodaNote Added: 0011899
2009-01-03 19:51rafarodaStatusnew => feedback
2009-01-09 18:22networkbNote Added: 0012066
2009-01-09 18:23networkbStatusfeedback => new
2009-01-09 18:24networkbNote Added: 0012067
2009-01-12 14:20pheenanNote Added: 0012110
2009-01-12 15:27pheenanAssigned Topheenan => networkb
2009-01-12 15:28pheenanNote Added: 0012114
2009-01-12 15:28pheenanStatusnew => feedback
2009-01-14 13:11networkbNote Added: 0012168
2009-01-14 13:11networkbStatusfeedback => new
2009-01-14 14:51rafarodaAssigned Tonetworkb => pheenan
2009-01-15 18:05pheenanStatusnew => scheduled
2009-01-15 18:05pheenanNote Added: 0012238
2009-01-15 18:05pheenanfix_in_branch => trunk
2009-01-19 00:01pheenanNote Added: 0012286
2009-01-19 00:01pheenanStatusscheduled => acknowledged
2009-01-19 00:01pheenanStatusacknowledged => scheduled
2009-01-19 17:28pheenanNote Added: 0012362
2009-01-21 17:43pheenanNote Added: 0012467
2009-01-21 17:59pheenanNote Added: 0012470
2009-01-21 18:00pheenanAssigned Topheenan => networkb
2009-01-21 18:01pheenanNote Added: 0012472
2009-01-21 18:01pheenanStatusscheduled => feedback
2009-01-28 12:25pheenanNote Added: 0012726
2009-01-30 09:53pnudingStatusfeedback => closed
2009-01-30 09:53pnudingNote Added: 0012869
2009-01-30 09:53pnudingResolutionopen => out of date

Notes
(0010864)
pheenan   
2008-12-02 10:20   
Validating issue.
(0010872)
pheenan   
2008-12-02 11:16   
There is a possible work around for this with configuring reports to not 'fail' when a report is unable to load an image successfully.

Phil
(0011220)
pheenan   
2008-12-12 09:31   
Changing the onErrorType value for the image to "Blank" will only produce a blank page. We can change to "Icon" which will return a default jasper icon.
(0011508)
pheenan   
2008-12-18 10:19   
I have just tested this again in both Tecnicia14 and my local system and the Purchase Order report generated correctly.

http://192.168.102.114/openbravo-branch-r2.3x_oracle_demo [^]
and
http://tecnicia14/openbravo-branch-r2.3x_oracle_demo [^]

I both cases the Purchase Order report generated correctly.
(0011524)
pheenan   
2008-12-18 15:37   
Awaiting confirmation of the issue. Tried to reproduce and purchase order report is working with both the ipaddress and the machine name.
(0011575)
networkb   
2008-12-19 10:58   
Customer environment access has been given to the developer (pheenan) to test it
(0011689)
pjuvara   
2008-12-23 07:56   
networkb: please remember to change the status from Feedback to New when you have provided the requested information.
(0011691)
pheenan   
2008-12-23 10:14   
Have received an environment for testing this issue but awaiting information on whether it is possible to create test data for this.
(0011705)
dbaz   
2008-12-23 14:02   
Please ensure that in
Openbravo.properties
the following lines are exactly like

context.url=@actual_url_context@
web.url=@actual_url_context@/web

if not change them, compile, and try again.
(0011834)
networkb   
2009-01-02 09:50   
The version we are using is 2.35 so we have modify the build.xml instead of modifying the Openbravo.properties, but we get the same error when printing reports with images. The image can not be loaded.
(0011855)
pnuding   
2009-01-02 13:32   
Phil, back to you, please have a look when you're back
(0011856)
dbaz   
2009-01-02 13:45   
Another clue. If it is 2.35 try to change in build.xml

<property name="context.url" value="http://localhost:8880/openbravo"/> [^]

with this

<property name="context.url" value="@actual_url_context@"/>

if it doesn't work I don't have any other idea... sorry
(0011899)
rafaroda   
2009-01-03 19:51   
Feedback is required with the change suggested by dbaz.
(0012066)
networkb   
2009-01-09 18:22   
Phil is testing the change suggested
(0012067)
networkb   
2009-01-09 18:24   
Tests have failed. Phil is installing the same application in local
(0012110)
pheenan   
2009-01-12 14:20   
After viewing the logs for the test system the actual issue is not in locating the file but the way the file is being displayed.

When using http://212.145.140.171/openbravo/web/images/logo_albaran.jpg [^] the image is returned correctly.

In the logs the error is Error captured: javax.servlet.ServletException: Error loading byte data : http://212.145.140.171/openbravo/web/images/CompanyLogo_big.png [^]

This error points towards a problem with the image file or the passing of the image file to the report.

Investigating this now.
(0012114)
pheenan   
2009-01-12 15:28   
After investigation it looks like this issue is caused by a customisation to the standard jasper report implementation. Asking the reporter for feedback on this.
(0012168)
networkb   
2009-01-14 13:11   
Some tests have been done and we found in Openbravo MP9 does not work as well.
So it does not matter the method used to create the Jasper Report.

In MP9 does not work (so it is supposed that it is an OBN bug), but in branch 2.3x, yes.
(0012238)
pheenan   
2009-01-15 18:05   
Have applied a change to the path to find the image files. This change has been applied to the test system provided by 2nd level support and is currently being tested by them to verify the fix.

If this is confirmed the patch can be applied to the appropriate branches for 2.35, 2.40, and trunk.
(0012286)
pheenan   
2009-01-19 00:01   
Fix is not consistent with the design aims of the web.url attribute in the Openbravo.properties file.

The correct resolution for this problem is to resolve the ip address to the server name. The base of the issue is that the server is not able to resolve it's own ip address when looking for the image file.

Will investigate redirecting a URL with the ip address to the server name for that server.
(0012362)
pheenan   
2009-01-19 17:28   
A new fix has been applied to the test system that redirects a request sent with the ipaddress to the actual server name. An email has been sent to all parties regarding whether this fix is suitable for the application and depending on the response from this email the fix will either be committed or discarded.
(0012467)
pheenan   
2009-01-21 17:43   
The fix for this issue lies in configuration of the server and network. No patch will be created for this in the Openbravo ERP application.
(0012470)
pheenan   
2009-01-21 17:59   
When checking in the demo application this bug is not replicable.

http://75.101.167.196/openbravo/security/Menu.html [^]

or

http://demo3.openbravo.com/openbravo/security/Menu.html [^]

In both instances the purchase order displays the CompanyLogo image correctly.

Therefore this issue lies in the configuration of the network in which the server is running. The server needs to be able to resolve it's own external ip address not just by it's name.
(0012472)
pheenan   
2009-01-21 18:01   
Please check the network configuration for this server to ensure that it is able to 'loopback' which will allow it to resolve it's external ip address.
(0012726)
pheenan   
2009-01-28 12:25   
To enable IP Loopback access the router settings and switch on or enable "IP NAT loopback".

You can test if this is successful by using the following command

wget http://[Openbravo [^] web context]/web/images/CompanyLogo_big.png

In the [Openbravo web context] use both the server name and the ip address. The IP Address should be the external IP address for the server.

Following IP Nat Loopback being enabled this process should return the image for both the server name and the external ip address.
(0012869)
pnuding   
2009-01-30 09:53   
No code change required, therefore closed as discussed in OBN status meeting this morning