Jump to content
We've recently updated our Privacy Statement, available here ×

Bad storage format for themes css in postgres metadatabase JS 4


Gaby38

Recommended Posts

 Hello,

I was asked to install a jasperserver 4.0 with a postgres metadatabase. Ok : I saw that it was supported in the install guide and I followed the instructions. When I tried to first login, I got a "page" with no errors but which obviously had no "presentation". All the items were verlapping each other and nothing in relation with the "standard  presentation of the welcome login page.

I supposed it was due to the "themes" which were "misunderstood" and I had a glance to the source code of the html welcome page.

At the beginning of this page, there are some hyperlinks to the css pages.

If I click on a link in the source of the welcome page got from a Mysql metadatabase ( for instance /jasperserver/themes/themes.css) I get a classical css sheet with 

"

/*

theme.css

 

intended scope:

- global page styles

- styles for the decorator

- utility styles

- typography

- colors 

 

pods skin

tim sheiner & christie rixford......................"

 

If I do the same thing on the same hyperlink of the same page got from a postgres metadatabase I get :

"F2a0d0a7468656d652e6373730d0a0d0a696e74656e6465642073636f7......................................"

So I think there is a problem with the storage format of css sheets in a postgres database.

Has anybody else got the same troubles with postgres ??

Thanks for yur help

Link to comment
Share on other sites

  • Replies 8
  • Created
  • Last Reply

Top Posters In This Topic

A couple things to try is the clear the "work" directory of your application server and also clear the browser javascript cache (ie just clear the browser cache). There can be javascript and or compiled JSPs hanging around.

Also, was this an upgrade from 3.7? I'm surprised you are getting clean css resources from the jasperserver repository database.

Also, how was the js-catalog-minimal-ce.zip file loaded? Did you use the "auto-install" js-install.sh/bat script?

It's a little confusing, but the css files are pulled from the repository database and *not* from the jasperserver war file (as a normal css file would be). This enables changing themes on the fly and setting alternate default themes, etc.

Link to comment
Share on other sites

 The Mysql metadatabase was an upgrade from JS 3.7.

For the postgres metadatabase, it was a fresh install "from war file" with autoinstall scripts on a system with an installed tomcat and postgres database.

Did you test and get a jasperserver 4 running through standard installation scripts for a postgres metadatabase. I precise that from tomcat point of view all is correct. No errors : the html page contents are all present but the display is crazy. It seems like that css files are not taken into account.

Thanks for the time you spend on my problem.

Edit : in fact I looked at the content of the databases : in Mysql or in postgresql, the data are all in binary. But when I want to get them from the hyperlink inside the html of the login welcome page, for Mysql it is converted to string but for postgres it remains in binary. Is there a parameter to change in  the xml files for postgres???



Post Edited by Gaby38 at 04/19/2011 20:33
Link to comment
Share on other sites

In general there shouldn't be anything you need to change. I use PostgreSQL, and I always use the WAR file installer. It works well for me.

Obviously something is different in your case... but I don't really have a good guess. Maybe start with re-importing the information into the repository (and setting it to update). I almost always install the sample reports. Did you?

Regards,
Matt

Link to comment
Share on other sites

 Thanks for your answer Matt !!

I decided to re instal on another system and effectively it worked !!

I don't know why on the previous system it didn't work in the right manner. Perhaps is it due to the fact that , on this previous system, I first installed jasperserver with the installer(including Tomcat) on a Mysql metadatabase and after I removed the jasperserver and work directories in Tomcat and I reinstalled from war file but with a postgres metadatabase.

I tried twice with or without the samples and it was the same thing.

Now it's working on the new system : perhaps I'll try to understand why it doesn't work on the previous.

A lot of thanks !!

Gaby

Link to comment
Share on other sites

I too was afflicted by this and it drove me insane for ages. The root cause is likely the Postgres version - as of Postgres 9 the default has changed to be always hex, which breaks the output of all the jifileresource objects. See below the relevant section from the PostgreSQL changelog:

bytea_output (enum)

Sets the output format for values of type bytea. Valid values are hex (the default) and escape (the traditional PostgreSQL format). See Section 8.4 for more information. The bytea type always accepts both formats on input, regardless of this setting.

.. so a quick solution is maybe to go into your postgresql.conf and add:

bytea_output = escape

Worked for me.

.. there has to be a better way to run a railroad tho'.

Link to comment
Share on other sites

 I confirm what "blackgoose" said :

- the first system on which jasperserver was not working with postgres included a 9.0 postgres release.

- the second system on which jasperserver was working with postgres included a 8.6 postgres release.

As suggested, I added "bytea_output = escape" in the postgres.conf of the first system, restarted postgres and jasperserver and all worked fine.

Thanks to "blackgoose" for this information.

Link to comment
Share on other sites

  • 5 months later...

Thanks for the help on this also. Had me stumped for a while.But after fixing this, I am still having issues with custom images not being copied to the respective folders in the sub-organisation themes. Any ideas on this (suppose I really should raise another case..)

 

Post Edited by neilelliott at 10/11/2011 10:16

Link to comment
Share on other sites

  • 5 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...