Re: Question about Oracle and Java......
- From: Jurijs Velikanovs <j.velikanovs@xxxxxxxxx>
- To: Mark.Bobak@xxxxxxxxxxxx
- Date: Mon, 1 Jun 2009 15:25:34 +1000
Hi Mark, Form the days I was actively involved in Development project based on OC4J technology (Oracle AS) there have been several thinks that we (DBA-s) have considered to upgrade in AS technology stack (see bellow). This probably will not answer your question directly, but at least will give you some idea on the possible approach to work with your developers. I would strongly suggest to separate DB OH (DBA 100% responsibility) from AS homes. I would install and maintain Application used OH separately even having those on the same server (under different unix users). The following are typical JAVA Apps layers of technology: - JDK/JRE used by OC4J. As AS release cycle is "slightly" behind Java releases it comes with OLD version of java most of the time ($OH/jdk). --- DBA team in our case were driving force to change that version to the newest available within Supportable boundaries (SR to Oracle Support). Newest version of Java tend to have better instrumentation for troubleshooting purpose (1.4.2 for example starting from X release has wonderful XX:+HeapDumpOnOutOfMemoryError option). --- Testing: As soon as you on supported version just minimal testing is required. You just upgrade dev/test wait for 1-2 weeks, upgrade UAT, upgrade PROD NOTE: You could install as many JAVA environments as you want (alike OH). I wouldn't recommend to use embedded OS versions just because of having a better control over versions used by application. You should easily be able (depends on an application) to point to a JAVA version you want the application to use. - JDBC. Quite obvious an important technology component. It is obvious as well that AS comes with out of date driver. --- DBA might be a person to initialize or recommend to upgrade a driver file used for an application (in the same way as DBA would suggest to upgrade 10.2.0.1 client to 10.2.0.4). --- Testing: In the same way light as in case of JAVA. An application should work fine within one JDBC version boundaries BTW: It is a bit of fun to find exact version on JDBC driver used. It is just one file and you use a small java code to get the exact version out of it. - OC4J. Isn't that obvious as JAVA/JDBC components. Sometimes for relatively old AS versions it become out of date. The way to upgrade is simply replace oc4j.jar to newer version. --- DBA & Development should work together on that version. There might be some strict dependencies from higher layers like BC4J and Application itself. --- Testing: Extensive testing is necessary. Sometimes it is worse of efforts spent to improve stability of an applications. I have done this type of upgrades several times. - BC4J is a development framework used in most OC4J applications. --- Development is responsible for suggesting upgrades as there are might be a strong dependencies from Applications side --- Testing: full testing is required. I'm, *NOT* a java guy, I know some of them, and was called to help too often :) Hope it helps someone, Yury On Fri, May 29, 2009 at 12:26 AM, Bobak, Mark <Mark.Bobak@xxxxxxxxxxxx> wrote: > Hi all, > > > > I need a bit of help/advice/information with respect to Java/Oracle/JDBC. > Note: I’m *NOT* a Java guy. I’ve never coded a line of Java in my life, I > haven’t a clue what’s the difference between a Java bean and a servlet, a > JRE and a JDK, etc… Back when I was writing code, there was one language to > know, C. As Mogens would say, “I am legacy!” > > > > So, having said that, I have a question, which may seem a bit naïve. > Although I don’t have any Java knowledge, I have a feeling that the > information I’m being fed doesn’t quite smell right….. > > > > Here’s what’s going on: > > Environment is RHEL4 U6, x86-64, w/ Oracle 10.2.0.3 and 126.96.36.199 > > > > Developer comes to me and says, I need Java 1.5 or 1.6, the server only has > 1.4.2 installed. > > I check, and sure enough, /usr/bin/java is: > > pqrac201:[refpep1]:(/oracle/product/11.1.0/db):$java -version > > java version "1.4.2" > > gcj (GCC) 3.4.6 20060404 (Red Hat 3.4.6-9) > > Copyright (C) 2006 Free Software Foundation, Inc. > > This is free software; see the source for copying conditions. There is NO > > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > > > So, RHEL4 U6 comes w/ 1.4.2 installed. That’s not entirely surprising, > RHEL4 has been around for a while. I suspect I can find a 1.5 or 1.6 RPM > somewhere, but, I know enough to know that recent releases of Oracle come w/ > a JRE in the ORACLE_HOME. I tell the developer, what if you use the JRE in > the 11g ORACLE_HOME, that’s already installed, and it’s 1.5: > > pqrac201:[refpep1]:(/oracle/product/11.1.0/db/jdk/bin):$./java -version > > java version "1.5.0_11" > > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03) > > Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_11-b03, mixed mode) > > > > > > So, he goes off and does that, and I assume he’ll be happy using that > version of Java. Now, this is where I start to smell a problem. He comes > to me and says, ok, fine, but I need you to copy this ojdbc14.jar file to > /oracle/product/11.1.0/db/jdk/jre/lib/ext. This strikes me as odd. I’m not > in the practice of copying “foreign” files into an installed ORACLE_HOME. A > little poking, and I realize that the current Java 1.5 installed under > ORACLE_HOME has various ojdbc*.jar versions installed. > > > > pqrac201:[refpep1]:(/oracle/product/11.1.0/db):$find . -name ojdbc\*.jar > > ./jdbc/lib/ojdbc5_g.jar > > ./jdbc/lib/ojdbc6_g.jar > > ./jdbc/lib/ojdbc5.jar > > ./jdbc/lib/ojdbc6.jar > > ./oc4j/jdbc/lib/ojdbc14dms.jar > > ./owb/wf/lib/ojdbc14.jar > > ./sqldeveloper/jdbc/lib/ojdbc14.jar > > ./sqldeveloper/jdbc/lib/ojdbc14dms.jar > > > > So, I’m wondering why one of the included ojdbc*.jar files that’s already > included aren’t good enough. Additionally, from a bit more digging, I > realize that ojdbc14.jar is for Java 1.4, where as ojdbc5.jar is Java 1.5 > (or 5.0) and ojdbc6.jar is for Java 1.6 (or 6.0). > > > > So, I guess my question is, should I be pushing back and telling the > developer he doesn’t need ojdbc14.jar, and should be using ojdbc5.jar? If > so, which ojdbc5.jar? (the one in O_H/jdbc/lib?) > > > > Sorry if this is a trivial or naïve question, but, I just don’t have the > Java knowledge or experience to fully understand how the pieces fit > together. But it seems to me that copying ojdbc14.jar (part of Java 1.4) > into a Java 1.5 installation is bad, wrong, and nonsensical. > > > > Can someone who writes Java code in their sleep confirm the proper course of > action here? > > > > > > -Mark -- Jurijs +371 29268222 (+2 GMT) ============================================ http://otn.oracle.com/ocm/jvelikanovs.html -- http://www.freelists.org/webpage/oracle-l