Archive for December, 2008

how to “send to back” or “bring to front” an object inside the iReport

Sunday, December 14th, 2008

I used iReport version 2.0.2. in the past before I installed a new iReport version 3.1.2 few days ago.

User has to click with right button on the object inside the report and select either “Send to back” either “Bring to front” to change Z-order in the old iReport version.

I could not find “Send to back” and “Bring to front” options in a new version. I tried to find a solution with google but I did not find any useful information.

So here is the solution:
1.select the object on the report (for example rectangle)
2.find Opaque in properties
3.uncheck the check box value

I hope this will help you.

Do you find this post useful? Do not hesitate to leave a reply! Go to the bottom of this page.

mod_plsql: HTTP-403 It is forbidden to call this procedure directly from the browser!

Friday, December 12th, 2008

I wanted to call a procedure from Oracle database and display the data in the browser but I got an error:
Forbidden
You don’t have permission to access /pls/apex1/html_test on this server.
——————————————————————————–
Oracle-Application-Server-10g/10.1.2.0.0 Oracle-HTTP-Server Server at localhost Port 7777

Here is my procedure:
CREATE OR REPLACE PROCEDURE HELLOWORLD.html_test IS
tmpVar NUMBER;
BEGIN
htp.htmlopen;
htp.p('Hello World!');
htp.htmlclose;
tmpVar := 0;
EXCEPTION
WHEN NO_DATA_FOUND THEN
NULL;
WHEN OTHERS THEN
-- Consider logging the error and then re-raise
RAISE;
END html_test;
/

I checked out the Apache error log and I found an error:
mod_plsql: /pls/apex1/html_test HTTP-403 It is forbidden to call this procedure directly from the browser!

Solution:
1.search dads.conf
2.comment PlsqlRequestValidationFunction wwv_flow_epg_include_modules.authorize
3.restart http server
4.Ohhhh, it works

Do you find this post useful? Do not hesitate to leave a reply! Go to the bottom of this page.

how to change a default oracle home

Friday, December 12th, 2008

I have installed Oracle database 10g but I could not find a Home selector anymore. You can change oracle home on 10g with the following steps:
1.run oracle universal installer (OUI)
2.select button “Installed products”
3.click tab “Environment”
4.move up selected oracle home

Exception in thread “Thread-6″ java.lang.NoSuchMethodError: com.lowagie.text.Image.getPlainWidth()F

Thursday, December 11th, 2008

I used jasperReports version 2.0.2. in the past. I decided to upgrade my jasperReports library and I selected the latest version at the moment – JasperReports 3.1.2. I got the error below when I executed particular report:

Exception in thread "Thread-6" java.lang.NoSuchMethodError: com.lowagie.text.Image.getPlainWidth()F

Majority of the reports work fine. I found out that the problem is connected to itext library. I used itext-1.3.1.jar before. I have downloaded the latest itext library (iText-2.1.4.jar) and the error has gone away.

Do you find this post useful? Do not hesitate to leave a reply! Go to the bottom of this page.

net.sf.jasperreports.engine.JRException: com.sun.org.apache.xerces.internal impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence.

Thursday, December 11th, 2008

I used iReport version 2.0.2 in the past. Today I installed a new version of iReport 3.1.2. It looks great. I have reopened the report and suddenly I got an error:

net.sf.jasperreports.engine.JRException: com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence.

I have installed plugin for XML (Tools->Plugins->Available plugins->XML and Schema). I restarted the ireport but I got a new error:

net.sf.jasperreports.engine.JRException: org.xml.sax.SAXParseException: The element type "queryString" must be terminated by the matching end-tag "".

I have restored my report from backup and I have opened the iReport once again. I have modified the report and closed the iReport. Everything works fine after reopening the iReport.

My suggestion:
Install “XML and Schema” plugin immediatelly after installing a new iReport version.

Do you find this post useful? Do not hesitate to leave a reply! Go to the bottom of this page.

Basic LAMP(Linux Apache Mysql Php) and phpMyAdmin installation

Saturday, December 6th, 2008

I have installed Lamp. Here are the basic LAMP installation steps:

yum install perl-DBD-MySQL mysql-server mysql php-mysql mod_auth_mysql openssl mod_ssl php httpd perl-CPAN

Enable programs to start after the reboot:

chkconfig httpd on
chkconfig mysqld on

Here is how to start them now ….

/etc/init.d/mysqld start
/etc/init.d/httpd start

More about that Installing a LAMP

Download phpMyAdmin
cd /var/www/html
mv /root/Desktop/phpMyAdmin-2.11.9.3-english.tar.gz .
tar -zxvf phpMyAdmin-2.11.9.3-english.tar.gz
rm phpMyAdmin-2.11.9.3-english.tar.gz
mv phpMyAdmin-2.11.9.3-english phpmyadmin

Please note that 3.x versions require at least PHP 5.2 and MySQL 5 to use them. At the moment there is no PHP 5.2 using CentOS.

Start phpmyadmin in web browser:
http://localhost/phpmyadmin/

Do you find this post useful? Do not hesitate to leave a reply! Go to the bottom of this page.

how to drop all the constraints in ms access?

Thursday, December 4th, 2008

I would like to make an anonymization of data. I used update statement to modify some values but update statement returned error. Error is raised according to the foreign keys. I decided to drop all  foreign keys in the microsoft access database.

How should you do that?

First you should find out all foreign keys in the database. You can select MSysRelationships table. I used the sql below:

SELECT 'alter table [' + szobject + '] drop constraint ['  + szrelationship+'];'
   FROM MSysRelationships

[] are used if also spaces are used for table and constraint names.

Unfortunately you can not put multiple SQL statements under one named query so you must executed them one by one. I decided to execute the above sql through the java script. You can also try to develop a module inside the access.

MSysObjects is also a very interesting table. You can get all objects in the database (tables, indexes, constraints).

https://localhost:8333/ui does not work

Monday, December 1st, 2008

I have installed vmware server. I got

Internet Explorer cannot display the webpage

when I tried to launch VMware Server home page.

Solution: Check out the service VMware Host Agent. Start this service.

Do you find this post useful? Do not hesitate to leave a reply! Go to the bottom of this page.