Showing posts with label oracle. Show all posts
Showing posts with label oracle. Show all posts

Thursday, June 18, 2009

I run my Tomcat, instead I get this "ORACLE DATABASE 10g EXPRESS..." message

You try to run  Apache Tomcat, but instead you  get this message "ORACLE DATABASE 10g EXPRESS EDITION LICENSE AGREEMENT".
This simply means
If you bump into this problem, you have an Oracle 10g Express Edition (OracleXE 10g) installation sitting on the same port as your Tomcat default port (TCP/IP port 8080). As the TCP/IP protocol doesn't allow you to have more than one process listening to the same port (except when you use the advanced channel/selector), then when you start Tomcat, it will fail. You might not be aware that your Tomcat has failed to start, until you get into that message mentioned above.

There are 2 cures to this symptoms, the first cure  is to let Oracle XE take the port, and we move the tomcat installation to another port. The second cure is to set the Oracle XE to use another port.

To achieve the first one, you need to modify your $CATALINA_HOME/conf/server.xml file. Find the portion of the file that contains this snippet (assuming you are using the standard Tomcat installation):

[sourcecode lang="xml"]
connectionTimeout="20000"
redirectPort="8443" />
[/sourcecode]

Change the port 8080 to something else, e.g. 8484.

[sourcecode lang="xml"]
connectionTimeout="20000"
redirectPort="8443" />
[/sourcecode]

By now you should be able to run you application.
Don't forget that you have to run it from port 8484. So if the application you deploy is someapp.war the URL that you aim should be http://localhost:8484/someapp/ instead of http://localhost:8080/someapp/

Ok, now if you want to take the second cure, go to your Oracle XE 10g console using sqlplus. Replace mypassword with that your SYS user password (as specified during the installation process). Note that the number 2, 3, 4 at the left side is generated by the sqlplus tools prompt (you don't need to type them in).

[sourcecode lang="sql"]
C:\> sqlplus sys/mypassword@xe as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jun 18 17:53:47 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.

Connected to:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production

SQL> begin
2 dbms_xdb.sethttpport('8484');
3 end;
4 /
[/sourcecode]

Oracle XE should reply:

[sourcecode lang="sql"]
PL/SQL procedure successfully completed.
[/sourcecode]

After that check to ensure that the configuration has been changed properly:

[sourcecode lang="sql"]
SQL> select dbms_xdb.gethttpport as "HTTP-Port is " from dual;
[/sourcecode]

You should get a message like this:

[sourcecode lang="sql"]
HTTP-Port is
------------
8484
[/sourcecode]

Exit from sqlplus by typing "exit" at the prompt.

If everything as expected, now you can start the Tomcat server and use the port 8080 for Tomcat. To access the Oracle XE 10g database web console, access through http://localhost:8484/apex

HTTP Error 404 on Your Java Web App?

Somebody in the JUG-ID mailing list was asking where does this HTTP Error 404 comes from? He has successfully run the application before, but now get this error when hitting the page.

For me, I would run through these diagnostic process:

  1. Because the browser returned error HTTP status 404, means that the application server is there serving the HTTP request; make sure that the application server serving there is the Tomcat/JBoss/WebLogic/WebSphere that you intended to get the data from; typical mistakes would be that you are trying to get the data from your application server, ended up that you hit an Oracle XE web console running on the same port, or you are hitting something else other than what you intended to.

  2. Check whether your application has been deployed. The error could come because your application actually has not been deployed to the application server. Use Tomcat Manager for Apache Tomcat, use WebLogic console, or Glassfish console, or whatever console your application server provides.

  3. Check whether there are some failure in the deployment process. This time you or your IDE deployed the application, yet there are some failure that causes the deployment to stop. It is typical for example, on finding error on your Spring context configuration or your Hibernate context configuration, your application will cease to deploy. It is also common when you have something wrong in your web.xml file, the application server will refuse to deploy. Check what error you get from your console and application server's log.

  4. And if you find out that the application has been successfully deployed, check whether the URL is actually available: check whether your web application uses filter (check the web.xml file), and check whether the JSP file exists (if it hits the JSP file directly), or check whether the action request is configured property (in action based MVC framework such as Struts1.x, WebWork, Struts2, Spring MVC, etc).


Better luck next time.

Tuesday, October 16, 2007

AquaLogic Portal and WebLogic Portal

The event of Oracle Corp (NASQ: ORCL) bidded price on BEA Systems, Inc (NASQ: BEAS) has raised some users' eye brows.

This time I read and found out that the AquaLogic set of products were actually the PlumTree products which was bought by BEA Systems, Inc on 2005. BEA Systems made a major rebranding of the products as AquaLogic, with AquaLogic User Interface (ALUI) actually a complete, more mature, service oriented based, portal solution. AquaLogic was positioned as SOA based portal solution because it is not just involving Java technology instead it could be integrated with other platforms such as .NET technology.
The WebLogic Portal (WLP) gives illusion that this is the best portal product of BEA Systems' line of products, but I seemed the AquaLogic is somehow a better product than WLP. I haven't dug it well enough into the ALUI, but my experience with WLP has shown that it has a steeper learning curve. WLP technology is not just simply easy to use out-of-the-box.

Oracle Corp now keep adding more and more middleware products from the companies it buys. Some of them intersected each other. Some other obviously overlapped. When there are 2 products of the same kind within the same company, one must die. While ALUI and WLP still co-exist, the acquisition by Oracle, if it really happens would have created a company with overcrowded portofolio of enterprise portals. Then, 3 out of the 4 must die slowly?!? 

Let's watch for the Survival of The Fittest game once again...

Saturday, July 21, 2007

No INNER JOINs in Oracle 8i

Yesterday we encountered a problem when testing an already working version of our web application. The application works well in the development environment. When we move the application to hit the production database, it throws an exception.
The application uses Hibernate as its persistence manager. Our team has been hassled for quite some times, until one of our colleagues found out that the query produced by Hibernate was not runnable from Oracle's console. Digging further we found out that the database in production used an older version, the Oracle 8i. Oracle 8i does not support INNER JOIN syntax, therefore it rejects the query produced by Hibernate.
It came across my mind that we should change the dialect. If 8i does not support what is running on 9i, then the developer of Hibernate should have put different dialects for them. This is found out to be true. There is org.hibernate.dialect. Oracle9Dialect for Oracle 9i databases, and org.hibernate.dialect.OracleDialect for older Oracle 8i databases.
After we change it to the correct dialect, the problem somehow is still there. After browsing for a while I eventually found out that we also need to change the query translator to the older version, org.hibernate.class.ClassicQueryTranslator.
Then the application is working in the production database. Voila! It works!

Wednesday, March 28, 2007

Oracle Acquired Tangosol

Last year it was TimesTen and SleepyCat (BerkeleyDB).
This year it is Tangosol.
Who will be the next?

This database giant acquired Tangosol (vendor of Coherence data cache which has been used in many large financials), adding to its "Extreme Transaction Processing" initiative.

http://go.techtarget.com/r/1194471/5981609
http://www.oracle.com/tangosol/index.html