Tuesday, June 23, 2009
Tuesday, March 03, 2009
How to Fix Eclipse BIRT Font Problems
I faced two irritating font problems while using BIRT. They are:
1) Turkish character problems while exporting report as PDF. Some Turkish characters were not displaying well while using BIRT PDF engine(iText). Use Ariel font, it is an easy fix I know but it just works, and saves hours, that is all.
2) The other problem was using same width the fonts. You can find the full list of same width fonts here. I used Courier New, it worked.
Have fun ;)
1) Turkish character problems while exporting report as PDF. Some Turkish characters were not displaying well while using BIRT PDF engine(iText). Use Ariel font, it is an easy fix I know but it just works, and saves hours, that is all.
2) The other problem was using same width the fonts. You can find the full list of same width fonts here. I used Courier New, it worked.
Have fun ;)
Friday, February 27, 2009
How to Solve Drupal out of Memory Error
It is easy to solve.
memory_limit = 16M
memory_limit = 16M
upload_max_filesize = 100M
post_max_size = 100M
;) get fun.
- create a file named php.ini on root directory of your drupal installation.
- Then write the configuration below to the file.
memory_limit = 16M
- If you have problems with uploading max file size, you can write the lines below too, it will just work
memory_limit = 16M
upload_max_filesize = 100M
post_max_size = 100M
;) get fun.
Tuesday, February 17, 2009
How to Change Glassfish Ports
I wanted to change default http port other than 8080. (I am using tomcat with the same port)
To do so you should go to glassfish home directory
cd glassfish (this will be yours)
After than you should change the port to an other value. Write the command below
vim domains/domain1/config/domain.xml
Find 8080, and change to the desired port. Save and exit then.
to start web server write the command below
bin/./asadmin start-domain domain1
To stop you should write
bin/./asadmin stop-domain domain1
To do so you should go to glassfish home directory
cd glassfish (this will be yours)
After than you should change the port to an other value. Write the command below
vim domains/domain1/config/domain.xml
Find 8080, and change to the desired port. Save and exit then.
to start web server write the command below
bin/./asadmin start-domain domain1
To stop you should write
bin/./asadmin stop-domain domain1
Tags:
glassfish
How to Install Glassfish v2.1 on Debian v4
The page below shows how to install it
https://glassfish.dev.java.net/downloads/v2.1-b60e.html
But after writing the command below
java -Xmx256m -jar glassfish-installer-v2.1-b60e-linux.jar
I got a error, which is described below
Exception in thread "main" java.awt.AWTError: Cannot load AWT toolkit: gnu.java.awt.peer.gtk.GtkToolkit
at java.awt.Toolkit.getDefaultToolkit(libgcj.so.70)
at java.awt.Font.tk(libgcj.so.70)
at java.awt.Font.getPeerFromToolkit(libgcj.so.70)
at java.awt.Font.(libgcj.so.70)
at javax.swing.plaf.FontUIResource.(libgcj.so.70)
at javax.swing.plaf.metal.DefaultMetalTheme.(libgcj.so.70)
at java.lang.Class.initializeClass(libgcj.so.70)
at java.lang.Class.initializeClass(libgcj.so.70)
at javax.swing.plaf.metal.MetalLookAndFeel.createDefaultTheme(libgcj.so.70)
at javax.swing.plaf.metal.MetalLookAndFeel.(libgcj.so.70)
at javax.swing.UIManager.(libgcj.so.70)
at java.lang.Class.initializeClass(libgcj.so.70)
at org.jvnet.poormans_installer.Main.setUILookAndFeel(Main.java:91)
at org.jvnet.poormans_installer.Main.main(Main.java:50)
Caused by: java.lang.UnsatisfiedLinkError: libgtkpeer: libgtkpeer.so: cannot open shared object file: No such file or directory
at java.lang.Runtime._load(libgcj.so.70)
at java.lang.Runtime.loadLibrary(libgcj.so.70)
at java.lang.System.loadLibrary(libgcj.so.70)
at gnu.java.awt.peer.gtk.GtkToolkit.(libgcj.so.70)
at java.lang.Class.initializeClass(libgcj.so.70)
at java.lang.Class.forName(libgcj.so.70)
at java.awt.Toolkit.getDefaultToolkit(libgcj.so.70)
...13 more
To solve it write
java -Xmx256m -jar glassfish-installer-v2.1-b60e-linux.jar -console
It will work. And then continue installing. Good luck
https://glassfish.dev.java.net/downloads/v2.1-b60e.html
But after writing the command below
java -Xmx256m -jar glassfish-installer-v2.1-b60e-linux.jar
I got a error, which is described below
Exception in thread "main" java.awt.AWTError: Cannot load AWT toolkit: gnu.java.awt.peer.gtk.GtkToolkit
at java.awt.Toolkit.getDefaultToolkit(libgcj.so.70)
at java.awt.Font.tk(libgcj.so.70)
at java.awt.Font.getPeerFromToolkit(libgcj.so.70)
at java.awt.Font.
at javax.swing.plaf.FontUIResource.
at javax.swing.plaf.metal.DefaultMetalTheme.
at java.lang.Class.initializeClass(libgcj.so.70)
at java.lang.Class.initializeClass(libgcj.so.70)
at javax.swing.plaf.metal.MetalLookAndFeel.createDefaultTheme(libgcj.so.70)
at javax.swing.plaf.metal.MetalLookAndFeel.
at javax.swing.UIManager.
at java.lang.Class.initializeClass(libgcj.so.70)
at org.jvnet.poormans_installer.Main.setUILookAndFeel(Main.java:91)
at org.jvnet.poormans_installer.Main.main(Main.java:50)
Caused by: java.lang.UnsatisfiedLinkError: libgtkpeer: libgtkpeer.so: cannot open shared object file: No such file or directory
at java.lang.Runtime._load(libgcj.so.70)
at java.lang.Runtime.loadLibrary(libgcj.so.70)
at java.lang.System.loadLibrary(libgcj.so.70)
at gnu.java.awt.peer.gtk.GtkToolkit.
at java.lang.Class.initializeClass(libgcj.so.70)
at java.lang.Class.forName(libgcj.so.70)
at java.awt.Toolkit.getDefaultToolkit(libgcj.so.70)
...13 more
To solve it write
java -Xmx256m -jar glassfish-installer-v2.1-b60e-linux.jar -console
It will work. And then continue installing. Good luck
Thursday, February 12, 2009
How to Call Shell Scripts Using Ant
The example code below will execute a shell script named rpcBuild.sh, which is located at src/util directory. That is all.
<target name="RPC">
<exec dir="src/util" executable="./rpcBuild.sh" output="rpcBuild.log"></exec>
</target>
Tags:
ant
How to Solve Tomcat OutofMemory Error on Linux
Go to your tomcat home directory. Edit catalina.sh file using the command below.
vim bin/catalina.sh
Then find the line
CATALINA_OPTS="$CATALINA_OPTS $JPDA_OPTS"
And edit it like below
CATALINA_OPTS="$CATALINA_OPTS $JPDA_OPTS -Xmx1200M"
For mine memory is assigned to 1200Mb.(You can change the value according to your system configurations) I think it will be fine. Goog luck.
vim bin/catalina.sh
Then find the line
CATALINA_OPTS="$CATALINA_OPTS $JPDA_OPTS"
And edit it like below
CATALINA_OPTS="$CATALINA_OPTS $JPDA_OPTS -Xmx1200M"
For mine memory is assigned to 1200Mb.(You can change the value according to your system configurations) I think it will be fine. Goog luck.
Subscribe to:
Posts (Atom)