Cold Sores and Skiing

Okay so I know this has nothing to do programming or computers like the other posts do – But it does have something to do with Technology – Read on if your intrigued.

A bit of background: I enjoy skiing every year and every year I come back from the slopes with a face full (not one or two) of cold sores – Damn that herpes simplex virus.

I can deal with the one or two which I without fail get throughout the year, but the ones I get whilst skiing are a pain in the arse & hurt & makes me a miserable sod – Ask my wife.

Okay so if your like me then hopefully the information contained within will help you out.

If you live in the United Kingdom and complain to your doctor about them, then he might if your lucky give you one of these on an NHS prescription : Virulite – I asked and got one!
"Virulite is a electronic device which beams a UV light onto the affected area, reducing the healing time of the cold sore by half."

If not then buy yourself one, as they are the best thing that exists to get rid off cold sores once they start to appear and sometimes it can also preempt them appearing in the first place from tingle onwards, it depends how fast you get your device to the tingle. Boots in the UK sell there own branded one for cheaper than Virulite @ £35.99 : Unfortunately these are no longer sold by Boots.

Other things that I cannot live with whilst skiing and help (slightly, see below) :

If like me it seems if you ski hard and push yourself then you’ll get them no matter what you try or use. This year is the first time that I’ll be trying to use all 3 (Electronic Zapper, Sunsense & Combo Scarf) in the same visit. I’ll update this post if it works as I’ll be ecstatic.

Slight update : At the same time of getting my GP to give me a Virulite on NHS prescription they also gave me a course of tablets, 400mg of Acyclovir, 1 taken twice a day as a preventative measure.

So I’m armed to the teeth this year – Keep posted to see if it works!

After ski holiday update : It worked!! Zero cold sores! for my first time ever – My holiday included skiing most of the Espace Killy mountain range, also with a nice icy fall on the le Face Olympique Black run in Val d’Isere, so plenty of stress and pushing myself to the limit was involved. Still no cold sores – I put these results down to the use of the Acyclovir tablets and the Sunsense SPF 50 lip balm, as they are the two things that I’ve never used before, whether is was one rather than the other, I’ll never be testing that as I’m just happy that I’ve finally got a solution to not getting cold sores & will be doing the same for each and every future ski trip.

Hopefully some of the above will work for you.

Alfresco 4.3.d PDFBox fatal error Java Runtime

Our JVM kept crashing as soon as we went to the ‘Document Library’ within Alfresco 4.3.d

We tracked the issue down to a uploaded PDF file which contained metadata that the shipped version of PDFBox 1.2.1 (pdfbox-1.2.1.jar) chokes on and takes out the JVM.

By replacing the pdfbox.jar with the latest version pdfbox-1.7.1.jar our issues seem to have gone.

Replace old file with new in :  /alfresco-3.4.d/tomcat/webapps/alfresco/WEB-INF/lib/

Random error we where receiving in ‘catalina.out’ shown below:

# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x59ee264a, pid=4534, tid=1553988496
#
# JRE version: 6.0_18-b07
# Java VM: Java HotSpot(TM) Server VM (16.0-b13 mixed mode linux-x86 )
# Problematic frame:
# C [libfontmanager.so+0x2464a]
#
# An error report file with more information is saved as:
# /opt/alfresco-3.4.d/hs_err_pid4534.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.

2012 in review

The WordPress.com stats helper monkeys prepared a 2012 annual report for this blog.

Here’s an excerpt:

4,329 films were submitted to the 2012 Cannes Film Festival. This blog had 55,000 views in 2012. If each view were a film, this blog would power 13 Film Festivals

Click here to see the complete report.

Apologies for the lack of Blog Post in the 2012, 2013 will be full, I’ve loads to write about – just need to find the time.

Access JasperReports Server using LDAP

We had a few issues getting to the bottom of how to add the LDAP functionality to JasperReports.

So here is how we did it:

Open ‘applicationContext-security.xml‘ which is located in:
/usr/local/glassfish3.1.2/glassfish/domains/domain1/autodeploy/jasperserver.war/WEB-INF

This is where it is if you’ve followed our earlier blog post, how to deploy JasperReports Server 4.0 on Glassfish 3.1/3.2.

If you didn’t then it’ll be located within your JasperReports directory somewhere.

Changes:

To help you find what needs to be changed, download my version of the applicationContext-security.xml file and use some file comparing software to note the changes from the original version.

There are changes on lines:

  • 14: Unremarked the “ldapAuthenticationProvider” line.
  • 78: Enter your LDAP host “ldap://blah.blah.co.uk:3286”.
  • 83: Enter username/email address/account name here.
  • 84: Enter the password to the above account on this line.
  • 93: Enter the domain content ‘DC’ structure for your LDAP directory.

i.e.
DC=staff,DC=google,DC=co,DC=uk

Apache Directory Studio will help test the above configuration & help you find your LDAP host, ‘DC’ structure, using its search features.

Once you’ve made the changes to this file, start up Glassfish again and you will be able to login using your corporate account.

*Things to note, if you have a local account in JasperReports with the same name as the account that you’re trying to access from LDAP, access will only be granted using the local password that was set to this account – Not a password coming from your LDAP host.

Jinitiator repaint on Windows 7

When using my fix to get Jinitiator to work with Windows 7, you might of noticed that your screen is reduce to the Windows 7 basic theme.

I thought I’d write a separate post about how to fix this, as it’s something I often get asked how to do.

Click Start > Control Panel > JInitiator
‘Basic’ Tab
In the ‘Java Runtime Pparameters’ box, add this:
-Dsun.java2d.noddraw=true
‘Apply’ & click ‘Close’.

Now restart your machine.

Now on launching your website application, Windows will no longer be forced into using the basic theme.

2011 in review

The WordPress.com stats helper monkeys prepared a 2011 annual report for this blog.

Here’s an excerpt:

The concert hall at the Sydney Opera House holds 2,700 people. This blog was viewed about 35,000 times in 2011. If it were a concert at Sydney Opera House, it would take about 13 sold-out performances for that many people to see it.

Click here to see the complete report.

Alfresco & Flash upload issue

Having issues uploading to Alfresco Share using its Adobe flash up-loader?

As weird as this sounds, try updating your installation of Internet Explorer.

Even if your not using Internet Explorer, lets be honest who still is! 🙂

This has solved issues that we’ve been having, machines which still had IE6 on them, when updated to IE8 the up-loader would work in both Firefox and Chrome.

It also allowed us to use Primefaces 2.2 fileUpload on the machine it wasn’t working on, after updating IE.

VisualVM problem connecting to monitor Glassfish

We had a issue getting VisualVM to connect to one of our Glassfish servers, in order for us to monitor it.

The problem was being caused by the server being behind our firewall, although the issue still existed after we had opened port 8686.

netstat -ano command was showing us that the port was open, but no reasons as to why it wouldn’t connect:

tcp 0 0 :::8686 :::* LISTEN off (0.00/0/0)

Another one of our servers which is behind an older less secure firewall was connecting fine.

After much searching & head scratching, we found that we needed to add the following line to the JVM Option within Glassfish:

-Djava.rmi.server.hostname=YOUR_SERVERS_NAME

See this Oracle blog post for the reason why this is needed.

Summary:
If you are trying to access a server which is behind a NAT – you will most probably have to start your server with the option
-Djava.rmi.server.hostname=

so that the RMI stubs sent to the client contain the server’s public address allowing it to be reached by the clients from the outside.

Glassfish JVM crash issues under Alfresco 3.4d

We’re running Alfresco 3.4d on Glassfish 3.1 / Redhat 5.7

We noticed last week that ‘Java SE Development Kit 6 Update 26’ was occasionally crashing the JVM by using all the available memory, when Alfresco was using resources outside of the JVM.

We solved this by installing ‘Java SE Development Kit 6 Update 29’.

Just thought that we would post that out there, just in case your facing similar issues and haven’t a clue what is causing them, when the JVM crashes it doesn’t post its issues into the Glassfish server.log file, as that has crashed milliseconds beforehand.

Nested subreport within iReport & JasperReports Server

iReport, JasperReports Server & subreports what a nightmare

It has taken far too long to work out how to get them to play nicely, so I thought I’d sum it up since I couldn’t find any complete information on how to do it.

There is partial information which I based the following on here

  • Connect iReports to JasperReports Server, so you can add content.
  • In the ‘Repository Navigator’ Right click on your server name and select ‘Add’ / ‘Folder’.
  • Right click on the new folder and select ‘Add’ / ‘JasperServer Report’.
  • Enter an ID, Name & Description for your report, the ID needs underscores instead of spaces.
  • Locate the main JRXML file, I’ve select one from my HDD.
  • Locate the Data Source, I’ve select one that I’ve already created on the server, its easy to create.
  • On clicking finish, a dialog box ‘JRXML validation’ might pop up, this is iReports checking your main report for any subreports, it then changes any subreports links in order to reference the file in the repository. Click continue to whatever it suggests.
  • Note this above part has changed your master file to point to “repo:subreport.jrxml” rather than what it referenced before, which was “subreport.jasper”.
  • Now if you open out your tree you’ll notice that you’ve got a ‘Main jrxml’ and your subreport in your ‘Resources’ folder.
  • If you’ve multiple nested subreports, now is the time to upload them as well, because iReports has choosen to ignore any but the first one that it found.
  • Its easier to do this on the JasperReports Server side of things, find the new report in your Repository right click and ‘Edit’ it, then click ‘Controls & Resources’ / ‘Add Resource’ now upload another ‘subreport.jrxml’ file, Click ‘Next’ and give it a Name & ID, Click ‘Next’ & ‘Submit’.
  • Repeat above for any other subreports.
  • Switch back to iReports and Refresh your ‘Repository Navigator’ tree, in order to show the files uploaded in JasperReports Server.
  • In the ‘resources’ folder right click the subreport which is referenced first in the main jrxml file & click ‘properties’.
  • Hightlight and Copy with Ctrl + C the ‘Parent Folder’ line which displays, then click ‘Cancel’. In my case I’m copying the line /XX/Report1/Report1_files/Report1-Tenure.jrxml
  • Once copied, Right click & ‘Open in editor’ on the ‘Main jrxml’ report in your tree.
  • Highlight the subreport on the main report and click on the three dots next to the ‘Subreport Expression’ property in the properties panel.
  • Replace everything after “repo: with what is copied to your clipboard. in my case I end up with “repo:/XX/Report1/Report1_files/Report1-Tenure.jrxml”.
  • Click Save icon, and Right click on the Main report and write the changes back to it by selecting ‘Replace with current document’.
  • Link up your other Nested subreports in the same fashion, loading each one in turn to the editor, changing their ‘Subreport Expression’ property and write the information back to the correct resources jrxml file.
  • Making sure that you add “repo: before the path, as that wont be there as the nested subreport wasnt found by iReports first time around.
  • Now finally you can Right click the main report and ‘Run JasperServer Report’. Your report will also work on your server.
  • Other things to note, remove any refernces to ‘$P{SUBREPORT_DIR} +’ and just reference the actual subreport, otherwise it wont be able to find the file.