aarti savant

Greenhorn
+ Follow
since Oct 27, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by aarti savant

Hi everyone,
what is the best way to convert a xml document to a DNAList...DNAList is a data structure from Blue Martini product suite, which is basically a HashMap like data structure with name, type and value pair...I will post an example below...

Here is the xml I generated from resultset object.
<?xml version="1.0" encoding="UTF-8"?>
<dna xmlns="http://bluemartini.com/eng/arch/dna/name/" xmlns:dna="http://bluemartini.com/eng/arch/dna/type/">
<priceOverrideAccomBasePrice type="dna">
<use_quote_override_price type="dna">
<B2B type="boolean">true</B2B>
<B2C type="boolean">false</B2C>
</use_quote_override_price>
</priceOverrideAccomBasePrice>
</dna>


and here is the DNAList i want this converted to :

DNA {
"priceOverrideAccomBasePrice" DNA {
"use_quote_override_price" DNA {
"B2B" Boolean "true",
"B2C" Boolean "false"
}
}
}

Any pointers or XSL templates towards this direction will be highly appreciated.

Thanks
Arati
here's the stack trace :

does the loading of TestDB2Conn prior to loading the COM.....DB2driver class make any difference ?

here's the stack trace :

bmadmin @ blueapp1
[/www/a/bm603]# bms java -verbose TestDB2Conn
-- module = core/tools
-- command = java
[Opened /usr/j2se/jre/lib/rt.jar]
[Opened /usr/j2se/jre/lib/i18n.jar]
[Opened /usr/j2se/jre/lib/sunrsasign.jar]
[Loaded java.lang.Object from /usr/j2se/jre/lib/rt.jar]
[Loaded java.io.Serializable from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.Comparable from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.String from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.Class from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.Cloneable from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.ClassLoader from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.Throwable from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.Error from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.ThreadDeath from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.Exception from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.RuntimeException from /usr/j2se/jre/lib/rt.jar]
[Loaded java.security.ProtectionDomain from /usr/j2se/jre/lib/rt.jar]
[Loaded java.security.AccessControlContext from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.ClassNotFoundException from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.LinkageError from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.NoClassDefFoundError from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.ClassCastException from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.ArrayStoreException from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.VirtualMachineError from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.OutOfMemoryError from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.StackOverflowError from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.ref.Reference from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.ref.SoftReference from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.ref.WeakReference from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.ref.FinalReference from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.ref.PhantomReference from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.ref.Finalizer from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.Runnable from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.Thread from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.ThreadGroup from /usr/j2se/jre/lib/rt.jar]
[Loaded java.util.Dictionary from /usr/j2se/jre/lib/rt.jar]
[Loaded java.util.Map from /usr/j2se/jre/lib/rt.jar]
[Loaded java.util.Hashtable from /usr/j2se/jre/lib/rt.jar]
[Loaded java.util.Properties from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.reflect.AccessibleObject from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.reflect.Member from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.reflect.Method from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.reflect.Constructor from /usr/j2se/jre/lib/rt.jar]
[Loaded java.util.Collection from /usr/j2se/jre/lib/rt.jar]
[Loaded java.util.AbstractCollection from /usr/j2se/jre/lib/rt.jar]
[Loaded java.util.List from /usr/j2se/jre/lib/rt.jar]
[Loaded java.util.AbstractList from /usr/j2se/jre/lib/rt.jar]
[Loaded java.util.Vector from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.StringBuffer from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.Boolean from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.Character from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.Number from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.Float from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.Double from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.Byte from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.Short from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.Integer from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.Long from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.NullPointerException from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.ArithmeticException from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.Shutdown from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.StrictMath from /usr/j2se/jre/lib/rt.jar]
[Loaded java.io.ObjectStreamField from /usr/j2se/jre/lib/rt.jar]
[Loaded java.util.Comparator from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.String$CaseInsensitiveComparator from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.System from /usr/j2se/jre/lib/rt.jar]
[Loaded java.security.AccessController from /usr/j2se/jre/lib/rt.jar]
[Loaded java.security.Guard from /usr/j2se/jre/lib/rt.jar]
[Loaded java.security.Permission from /usr/j2se/jre/lib/rt.jar]
[Loaded java.security.BasicPermission from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.reflect.ReflectPermission from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.ref.Reference$Lock from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.ref.Reference$ReferenceHandler from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.ref.ReferenceQueue from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.ref.ReferenceQueue$Null from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.ref.ReferenceQueue$Lock from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.ref.Finalizer$FinalizerThread from /usr/j2se/jre/lib/rt.jar]
[Loaded java.util.Enumeration from /usr/j2se/jre/lib/rt.jar]
[Loaded java.util.Hashtable$EmptyEnumerator from /usr/j2se/jre/lib/rt.jar]
[Loaded java.util.Iterator from /usr/j2se/jre/lib/rt.jar]
[Loaded java.util.Hashtable$EmptyIterator from /usr/j2se/jre/lib/rt.jar]
[Loaded java.io.ObjectStreamClass from /usr/j2se/jre/lib/rt.jar]
[Loaded java.io.ObjectStreamClass$ObjectStreamClassEntry from /usr/j2se/jre/lib/rt.jar]
[Loaded java.io.ObjectStreamClass$CompareClassByName from /usr/j2se/jre/lib/rt.jar]
[Loaded java.io.ObjectStreamClass$CompareMemberByName from /usr/j2se/jre/lib/rt.jar]
[Loaded java.util.Map$Entry from /usr/j2se/jre/lib/rt.jar]
[Loaded java.util.Hashtable$Entry from /usr/j2se/jre/lib/rt.jar]
[Loaded sun.misc.Version from /usr/j2se/jre/lib/rt.jar]
[Loaded java.io.InputStream from /usr/j2se/jre/lib/rt.jar]
[Loaded java.io.FileInputStream from /usr/j2se/jre/lib/rt.jar]
[Loaded java.io.FileDescriptor from /usr/j2se/jre/lib/rt.jar]
[Loaded java.io.OutputStream from /usr/j2se/jre/lib/rt.jar]
[Loaded java.io.FileOutputStream from /usr/j2se/jre/lib/rt.jar]
[Loaded java.io.FilterInputStream from /usr/j2se/jre/lib/rt.jar]
[Loaded java.io.BufferedInputStream from /usr/j2se/jre/lib/rt.jar]
[Loaded java.io.FilterOutputStream from /usr/j2se/jre/lib/rt.jar]
[Loaded java.io.PrintStream from /usr/j2se/jre/lib/rt.jar]
[Loaded java.io.BufferedOutputStream from /usr/j2se/jre/lib/rt.jar]
[Loaded java.io.Writer from /usr/j2se/jre/lib/rt.jar]
[Loaded java.io.OutputStreamWriter from /usr/j2se/jre/lib/rt.jar]
[Loaded sun.io.CharToByteConverter from /usr/j2se/jre/lib/rt.jar]
[Loaded sun.io.Converters from /usr/j2se/jre/lib/rt.jar]
[Loaded java.util.Stack from /usr/j2se/jre/lib/rt.jar]
[Loaded java.security.PrivilegedAction from /usr/j2se/jre/lib/rt.jar]
[Loaded sun.security.action.GetPropertyAction from /usr/j2se/jre/lib/rt.jar]
[Loaded sun.io.CharToByteISO8859_1 from /usr/j2se/jre/lib/rt.jar]
[Loaded java.io.BufferedWriter from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.Terminator from /usr/j2se/jre/lib/rt.jar]
[Loaded sun.misc.SignalHandler from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.Terminator$1 from /usr/j2se/jre/lib/rt.jar]
[Loaded sun.misc.Signal from /usr/j2se/jre/lib/rt.jar]
[Loaded sun.misc.NativeSignalHandler from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.Compiler from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.Compiler$1 from /usr/j2se/jre/lib/rt.jar]
[Loaded sun.misc.Launcher from /usr/j2se/jre/lib/rt.jar]
[Loaded java.net.URLStreamHandlerFactory from /usr/j2se/jre/lib/rt.jar]
[Loaded sun.misc.Launcher$Factory from /usr/j2se/jre/lib/rt.jar]
[Loaded sun.misc.Launcher$1 from /usr/j2se/jre/lib/rt.jar]
[Loaded java.security.SecureClassLoader from /usr/j2se/jre/lib/rt.jar]
[Loaded java.net.URLClassLoader from /usr/j2se/jre/lib/rt.jar]
[Loaded sun.misc.Launcher$ExtClassLoader from /usr/j2se/jre/lib/rt.jar]
[Loaded sun.security.util.Debug from /usr/j2se/jre/lib/rt.jar]
[Loaded java.util.StringTokenizer from /usr/j2se/jre/lib/rt.jar]
[Loaded java.io.File from /usr/j2se/jre/lib/rt.jar]
[Loaded java.io.FileSystem from /usr/j2se/jre/lib/rt.jar]
[Loaded java.io.UnixFileSystem from /usr/j2se/jre/lib/rt.jar]
[Loaded java.security.PrivilegedExceptionAction from /usr/j2se/jre/lib/rt.jar]
[Loaded sun.misc.Launcher$2 from /usr/j2se/jre/lib/rt.jar]
[Loaded java.net.URL from /usr/j2se/jre/lib/rt.jar]
[Loaded java.net.URLStreamHandler from /usr/j2se/jre/lib/rt.jar]
[Loaded sun.net.www.protocol.file.Handler from /usr/j2se/jre/lib/rt.jar]
[Loaded java.util.Set from /usr/j2se/jre/lib/rt.jar]
[Loaded java.util.AbstractSet from /usr/j2se/jre/lib/rt.jar]
[Loaded java.util.HashSet from /usr/j2se/jre/lib/rt.jar]
[Loaded java.util.AbstractMap from /usr/j2se/jre/lib/rt.jar]
[Loaded java.util.HashMap from /usr/j2se/jre/lib/rt.jar]
[Loaded java.util.HashMap$EmptyHashIterator from /usr/j2se/jre/lib/rt.jar]
[Loaded java.util.HashMap$Entry from /usr/j2se/jre/lib/rt.jar]
[Loaded sun.misc.URLClassPath from /usr/j2se/jre/lib/rt.jar]
[Loaded java.util.ArrayList from /usr/j2se/jre/lib/rt.jar]
[Loaded sun.net.www.protocol.jar.Handler from /usr/j2se/jre/lib/rt.jar]
[Loaded sun.misc.Launcher$AppClassLoader from /usr/j2se/jre/lib/rt.jar]
[Loaded sun.misc.Launcher$3 from /usr/j2se/jre/lib/rt.jar]
[Loaded java.net.URLClassLoader$1 from /usr/j2se/jre/lib/rt.jar]
[Loaded java.util.Locale from /usr/j2se/jre/lib/rt.jar]
[Loaded sun.misc.URLClassPath$2 from /usr/j2se/jre/lib/rt.jar]
[Loaded sun.misc.URLClassPath$Loader from /usr/j2se/jre/lib/rt.jar]
[Loaded sun.misc.URLClassPath$JarLoader from /usr/j2se/jre/lib/rt.jar]
[Loaded java.util.zip.ZipConstants from /usr/j2se/jre/lib/rt.jar]
[Loaded java.util.zip.ZipFile from /usr/j2se/jre/lib/rt.jar]
[Loaded java.util.jar.JarFile from /usr/j2se/jre/lib/rt.jar]
[Loaded sun.security.action.LoadLibraryAction from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.Runtime from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.ClassLoader$4 from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.ClassLoader$NativeLibrary from /usr/j2se/jre/lib/rt.jar]
[Loaded sun.misc.JarIndex from /usr/j2se/jre/lib/rt.jar]
[Loaded sun.misc.ExtensionDependency from /usr/j2se/jre/lib/rt.jar]
[Loaded java.util.zip.ZipEntry from /usr/j2se/jre/lib/rt.jar]
[Loaded java.util.jar.JarEntry from /usr/j2se/jre/lib/rt.jar]
[Loaded java.util.jar.JarFile$JarFileEntry from /usr/j2se/jre/lib/rt.jar]
[Loaded java.io.DataInput from /usr/j2se/jre/lib/rt.jar]
[Loaded java.io.DataInputStream from /usr/j2se/jre/lib/rt.jar]
[Loaded java.util.zip.ZipFile$ZipFileInputStream from /usr/j2se/jre/lib/rt.jar]
[Loaded java.util.zip.InflaterInputStream from /usr/j2se/jre/lib/rt.jar]
[Loaded java.util.zip.ZipFile$1 from /usr/j2se/jre/lib/rt.jar]
[Loaded java.util.zip.Inflater from /usr/j2se/jre/lib/rt.jar]
[Loaded java.util.jar.Manifest from /usr/j2se/jre/lib/rt.jar]
[Loaded java.io.ByteArrayInputStream from /usr/j2se/jre/lib/rt.jar]
[Loaded java.util.jar.Attributes from /usr/j2se/jre/lib/rt.jar]
[Loaded java.util.jar.Manifest$FastInputStream from /usr/j2se/jre/lib/rt.jar]
[Loaded java.util.jar.Attributes$Name from /usr/j2se/jre/lib/rt.jar]
[Loaded java.util.jar.JarVerifier from /usr/j2se/jre/lib/rt.jar]
[Loaded java.io.ByteArrayOutputStream from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.Math from /usr/j2se/jre/lib/rt.jar]
[Loaded java.security.PrivilegedActionException from /usr/j2se/jre/lib/rt.jar]
[Loaded sun.misc.URLClassPath$FileLoader from /usr/j2se/jre/lib/rt.jar]
[Loaded sun.misc.Resource from /usr/j2se/jre/lib/rt.jar]
[Loaded sun.misc.URLClassPath$6 from /usr/j2se/jre/lib/rt.jar]
[Loaded java.security.CodeSource from /usr/j2se/jre/lib/rt.jar]
[Loaded java.security.Policy from /usr/j2se/jre/lib/rt.jar]
[Loaded java.security.Policy$1 from /usr/j2se/jre/lib/rt.jar]
[Loaded java.security.Security from /usr/j2se/jre/lib/rt.jar]
[Loaded java.security.Security$1 from /usr/j2se/jre/lib/rt.jar]
[Loaded java.io.Reader from /usr/j2se/jre/lib/rt.jar]
[Loaded java.io.BufferedReader from /usr/j2se/jre/lib/rt.jar]
[Loaded java.io.InputStreamReader from /usr/j2se/jre/lib/rt.jar]
[Loaded sun.io.ByteToCharConverter from /usr/j2se/jre/lib/rt.jar]
[Loaded sun.io.ByteToCharISO8859_1 from /usr/j2se/jre/lib/rt.jar]
[Loaded java.security.Provider from /usr/j2se/jre/lib/rt.jar]
[Loaded sun.security.provider.Sun from /usr/j2se/jre/lib/rt.jar]
[Loaded sun.security.provider.Sun$1 from /usr/j2se/jre/lib/rt.jar]
[Loaded com.sun.rsajca.Provider from /usr/j2se/jre/lib/sunrsasign.jar]
[Loaded com.sun.rsajca.Provider$1 from /usr/j2se/jre/lib/sunrsasign.jar]
[Loaded sun.security.provider.PolicyFile from /usr/j2se/jre/lib/rt.jar]
[Loaded java.security.PermissionCollection from /usr/j2se/jre/lib/rt.jar]
[Loaded sun.security.provider.PolicyPermissions from /usr/j2se/jre/lib/rt.jar]
[Loaded java.net.URLConnection from /usr/j2se/jre/lib/rt.jar]
[Loaded sun.net.www.URLConnection from /usr/j2se/jre/lib/rt.jar]
[Loaded sun.net.www.protocol.file.FileURLConnection from /usr/j2se/jre/lib/rt.jar]
[Loaded java.net.ContentHandler from /usr/j2se/jre/lib/rt.jar]
[Loaded java.net.UnknownContentHandler from /usr/j2se/jre/lib/rt.jar]
[Loaded sun.net.www.MessageHeader from /usr/j2se/jre/lib/rt.jar]
[Loaded sun.net.www.ParseUtil from /usr/j2se/jre/lib/rt.jar]
[Loaded java.util.BitSet from /usr/j2se/jre/lib/rt.jar]
[Loaded java.io.FilePermission from /usr/j2se/jre/lib/rt.jar]
[Loaded java.io.FilePermission$1 from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.RuntimePermission from /usr/j2se/jre/lib/rt.jar]
[Loaded java.security.cert.Certificate from /usr/j2se/jre/lib/rt.jar]
[Loaded TestDB2Conn]
[Loaded java.sql.SQLException from /usr/j2se/jre/lib/rt.jar]
[Loaded sun.misc.URLClassPath$4 from /usr/j2se/jre/lib/rt.jar]
[Loaded java.lang.Package from /usr/j2se/jre/lib/rt.jar]
[Loaded sun.security.util.ManifestEntryVerifier from /usr/j2se/jre/lib/rt.jar]
[Loaded sun.misc.CharacterDecoder from /usr/j2se/jre/lib/rt.jar]
[Loaded sun.misc.BASE64Decoder from /usr/j2se/jre/lib/rt.jar]
[Loaded com.bluemartini.dna.BMException]
[Loaded java.sql.Connection from /usr/j2se/jre/lib/rt.jar]
[Loaded java.sql.Driver from /usr/j2se/jre/lib/rt.jar]
[Loaded COM.ibm.db2.jdbc.app.DB2Driver]
[Loaded java.lang.UnsatisfiedLinkError from /usr/j2se/jre/lib/rt.jar]
[Loaded COM.ibm.db2.mri.DB2Messages]
[Loaded java.util.ResourceBundle from /usr/j2se/jre/lib/rt.jar]
[Loaded java.util.ResourceBundle$ResourceCacheKey from /usr/j2se/jre/lib/rt.jar]
[Loaded sun.misc.SoftCache from /usr/j2se/jre/lib/rt.jar]
[Loaded sun.misc.SoftCache$ValueCell from /usr/j2se/jre/lib/rt.jar]
[Loaded java.util.ListResourceBundle from /usr/j2se/jre/lib/rt.jar]
[Loaded COM.ibm.db2.mri.DB2ErrorMessages]
[Loaded COM.ibm.db2.mri.DB2ErrorMessages_en]
[Loaded COM.ibm.db2.mri.DB2ErrorMessages_en_US]
[Loaded java.sql.DriverManager from /usr/j2se/jre/lib/rt.jar]
[Loaded java.sql.SQLPermission from /usr/j2se/jre/lib/rt.jar]
[Loaded java.sql.SQLWarning from /usr/j2se/jre/lib/rt.jar]
SQL Exception:
No suitable driver
[Loaded java.lang.Shutdown$Lock from /usr/j2se/jre/lib/rt.jar]

any input is appreciated...

Thanks
Arati
Hi again,
here's the code snippet :

import java.sql.*;
//DB2 UDB JDBC classes. this is needed for type 2 driver
import COM.ibm.db2.jdbc.app.DB2Driver;

public class TestDB2Conn {
static
{
try
{
//Load type 1 Driver
Class.forName("COM.ibm.db2.jdbc.app.DB2Driver");
}
catch (ClassNotFoundException e)
{
System.err.println("Could not load DB2 driver \n");
System.err.println(e.getMessage());
System.exit(1);
}
}

public static void main(String args[])
{

// url
String url = "jdbc:db2:bssdsnd";
String userName = "aratid1", userPwd = "password";

// Query String
String query = "SELECT * FROM DB2DEV1.TS101 WHERE TRANSFER_NBR = 34531765";

try
{
//Connect to a database
Connection conn = DriverManager.getConnection(url, userName, userPwd);

// Create a BM Statement here
BMStatement bmStmt = null;

// Create statement for the connection
Statement stmt = conn.createStatement();

//Execute the query
ResultSet rs = stmt.executeQuery(query);

Thanks
Arati
Hi Everyone,
I am getting a really strange error. I am using jdk 131._09 and the code compiles and runs when i run using eclipse in a windows xp professional box. I am using the java code to connect to a DB2 database using COM.ibm.db2.jdbc.app.DB2Driver. I am using version 9.1 of DB2 client from my system.

However, when i try running the same program in a solaris OS environment with latest db2 classes, I hit the No suitable Driver error.

On comparing the drivers, I noted the drivers I used for my local enviroment was 1.3 megs and the one in /opt/ibm/db2/java/db2java.zip to be 850 kb.

Though i do NOT have rights to modify files in the above folder, I tried appending the my client driver to the classpath at runtime using :

java -cp :/www/a/bi603/core/classes/test:/opt/IBM/db2/V9.1/java/db2java.zip TestDB2Conn

and it dosen't seem to override and still see the no suitable driver message. If i echo the classpath, I see the path to my custom driver.

I also tried another thing...Copying over the db2 driver from solaris box to my local environment. Then while running it says, "could not find main, program will exit in eclipse " and displays the following trace

java.lang.NoSuchMethodError
at COM.ibm.db2.jdbc.app.DB2Driver.<init>(Unknown Source)
at COM.ibm.db2.jdbc.app.DB2Driver.<clinit>(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:115)
at TestDB2Conn.<clinit>(TestDB2Conn.java:19)
Exception in thread "main"

Can anyone suggest what is going wrong here ? I know there is a driver mismatch. What else can i do to resolve this ?

Do I really have to involve the DB2 admin to replace the exisiting 850 kb drivers under java folder with those (1.3 megs) in my client system ?

Please advice

Thanks
Arati
Class diagrams are supposed to be implementation independent ie whether you use a j2ee system or vb, they will not change. For the architecture exam, however, you can add some stateless beans(like customermanager, transactionprocessor etc) to strengthen a j2ee solution.
All specific j2ee components will be in component diagram ONLY.
This is the ideal place to use Fast Lane readers. You are reading data from an external system which does NOT need updates. Why you need the overhead to create beans ???
Yes and NO. You may or may not need to mention about the NFR's in the assumption doc. Whether you detail in length or just highlight it, it depends on how crucial you consider them to be in the whole architecture.
The part 3 of the exam will test some NFR knowledge so its well worth planning and documenting it within the assumption section.
load balancing holds a critical place in overall J2EE architecture design and is hence recommended as well.
<%@ page isErrorPage="false" %>
<%@ page errorPage="error1.jsp" %>
<HEAD>
<%@ page import="myclasses.*" %>
<jsp:useBean id="theo" scope="page" class="TT" />
<% try {
theo.computeTitle("hello");
} catch(Exception e) {
throw e;
} %>
<% String title=theo.getTitle(); %>
<TITLE><%= title %></TITLE>
</HEAD>
What is the output to the browser from the code above if the method "computeTitle()" in class TT throws a java.lang.NullPointerException?
A blank screen is sent to the browser.
No title will be shown.
The title will be java.lang.NullPointerException.
Only the output of error1.jsp.
The Title will be "null" plus the contents of error1.jsp
The memory footprint of a JSP page can be measured by serializing the generated JSP Servlet to disk and seeing how large that file is. Which one of the following statements about the above approach is TRUE?
This approach is too slow to perform on a live system.
The measurement is not accurate.
JSP pages do not have access to the Server's hard drive.
Serialization will not take into account objects referenced by the JSP page in all cases.
JSP pages cannot serialize JSP Servlets.
20 years ago
<%@ page isErrorPage="false" %>
<%@ page errorPage="error1.jsp" %>
<HEAD>
<%@ page import="myclasses.*" %>
<jsp:useBean id="theo" scope="page" class="TT" />
<% try {
theo.computeTitle("hello");
} catch(Exception e) {
throw e;
} %>
<% String title=theo.getTitle(); %>
<TITLE><%= title %></TITLE>
</HEAD>
What is the output to the browser from the code above if the method "computeTitle()" in class TT throws a java.lang.NullPointerException?
A blank screen is sent to the browser.
No title will be shown.
The title will be java.lang.NullPointerException.
Only the output of error1.jsp.
The Title will be "null" plus the contents of error1.jsp
The memory footprint of a JSP page can be measured by serializing the generated JSP Servlet to disk and seeing how large that file is. Which one of the following statements about the above approach is TRUE?
This approach is too slow to perform on a live system.
The measurement is not accurate.
JSP pages do not have access to the Server's hard drive.
Serialization will not take into account objects referenced by the JSP page in all cases.
JSP pages cannot serialize JSP Servlets.
<%@ page isErrorPage="false" %>
<%@ page errorPage="error1.jsp" %>
<HEAD>
<%@ page import="myclasses.*" %>
<jsp:useBean id="theo" scope="page" class="TT" />
<% try {
theo.computeTitle("hello");
} catch(Exception e) {
throw e;
} %>
<% String title=theo.getTitle(); %>
<TITLE><%= title %></TITLE>
</HEAD>
What is the output to the browser from the code above if the method "computeTitle()" in class TT throws a java.lang.NullPointerException?
A blank screen is sent to the browser.
No title will be shown.
The title will be java.lang.NullPointerException.
Only the output of error1.jsp.
The Title will be "null" plus the contents of error1.jsp
The memory footprint of a JSP page can be measured by serializing the generated JSP Servlet to disk and seeing how large that file is. Which one of the following statements about the above approach is TRUE?
This approach is too slow to perform on a live system.
The measurement is not accurate.
JSP pages do not have access to the Server's hard drive.
Serialization will not take into account objects referenced by the JSP page in all cases.
JSP pages cannot serialize JSP Servlets.
20 years ago
JSP
You are writing a JSP/Servlet Web application that will execute in a Web container located on a Linux server. Your Web application is required to access an Oracle customer database on a Solaris server and an MS SQL inventory database running on Windows 2000. All systems are running on a local intranet. Referring to the application description above, what JDBC driver is appropriate?
Type 1
Type 2
Type 3
Type 4
Type 2 or 4 (depending on vendor)

Which JSP tag transfers the processing completely to another resource such that the output does NOT include any output specified in the original JSP?
<jsp aram>
<jsp:include>
<jsp:forward>
<jsp:setProperty>
<%@ response redirect %>
Which statement is true for a Web application that is distributed across multiple servers?
You cannot use sendRedirect().
You cannot depend on events generated when a session is activated or passivated.
You cannot use HttpSession.
You cannot use RequestDispatcher.include() or RequestDispatcher.forward().
You cannot share application information with ServletContext.


Which one of the following URLs can be used inside a <jsp:include /> statement?
https://www.xyz.com
/f1/temp1.jsp
ftp://ftp.xyz.com/dir1/temp1.jsp
http://www.xyz.com/jsp
http://www.xyz.com/code/tt.jsp

<jsp:forward page="eBusiness.jsp" />
Within a JSP document, where can the above code appear, given that the JspWriter's buffer will NOT be flushed until the end of the JSP page has been reached?
Only on the very first line of the document
Only before any directives
Anywhere within the document
Only before any declarations
Only before any scriptlets that write output to the Response object

By default, a client has access to all of a Bean's properties.
Given the above context, how can you prevent a client from accessing sensitive Bean properties?
Do not place the Bean in the root or virtual root directory.
Mark sensitive Bean attributes as "Read-Only" in BeanInfo PropertyDescriptors.
Use a shadow Bean, also known as a proxy Bean, to set non-sensitive Bean properties.
Use a firewall or a proxy to discourage data from being sent back to the client browser.
Avoid revealing the name of sensitive properties by not using Bean aliases

The majority of the integration of JSP pages within the J2EE platform is inherited from the reliance on what specification?
EJB 1.1
JSP 1.1
HTTP 4.0
JNDI
Servlet 2.2

Which one of the following is a Java keyword used in a class definition to specify that a class is NOT to be instantiated but inherited by other classes?
ownership
throws
abstract
exception
interface
Which one of the following is NOT a requirement for having the JSP-generated servlet extend "my own custom servlet class," instead of the default?
The init() method has to invoke the jspInit() method.
All methods in the Servlet interface must be declared final.
Each .class file must be signed by a Certificate Authority (CA).
The destroy() method has to invoke the jspDestroy() method.
The service() method has to invoke the _jspService() method.

The memory footprint of a JSP page can be measured by serializing the generated JSP Servlet to disk and seeing how large that file is. Which one of the following statements about the above approach is TRUE?
This approach is too slow to perform on a live system.
The measurement is not accurate.
JSP pages do not have access to the Server's hard drive.
Serialization will not take into account objects referenced by the JSP page in all cases.
JSP pages cannot serialize JSP Servlets.

What effect on variables does the keyword "static" have when used in the declaration section of a JSP page?
Static cannot be used because it is a server-assigned keyword and will throw an exception error.
Its value is shared by all instances of the class.
Static must be assigned as a variable within an array before use.
Static is similar to declaring an include variable in the declaration section.
The static keyword is ignored when used within the declaration section.

50. A security policy domain is a scope over which security policies are defined and enforced by a security administrator.
Based on the information above, which one of the following is NOT a characteristic of a security policy domain upon which a JSP can run?

The security policy ensures that multiple security policy domains can exist within a single technology domain.
The security policy may have groups to simplify setting of security policies.
The security policy uses a well-defined authentication protocol(s) for authenticating users.
The security policy has a collection of users or principals.
The security policy contains an object that encapsulates single state information between two entities.


51. <html>
<body>
<jsp:include file="sidemenu.html"/>

<jsp:useBean id="checkout" scope="page" class="com.shop.CheckOut" />
<% if (checkout.ifTransactionComplete()) { %>
<jsp:forward page="confirmpurchase.jsp" />
<% } %>

<jsp:include file="checkout.html"/>
</body>
</html>
Assume that the sample sales JSP page above for an e-commerce store is syntactically correct. Why does the page sometimes result in an IllegalStateException being thrown?



The jsp:useBean tag must be declared at the top of the file.
One of the relative URLs does not exist.
The sample JSP page is not thread safe.
The jsp:forward cannot be called after jsp:include.
The jsp:forward only works if the JSP buffer has been flushed prior to the jsp:forward call.

52. Your Java applet, which needs to be sent to a browser by means of a JSP page, is contained within a JAR file called foo.jar.
Based on the scenario above, how can the browser download this JAR file?

Recompile the .JAR file to a .class file
Rename the foo.jar file to .js
Add an archive="foo.jar" line to the plugin statement
Embed the applet within the JSP page itself
Add the .JAR file to a .ZIP file for the client browser to download

53. <%!
HashMap users2resource = new HashMap();
%>
<% HashMap people = new HashMap() %>
<% users2resource.put(..) %>
<% int j;
j = j+1; %>
.
.
.
<%= users2resource.get(..) %>
What potential problem, if any, exists for the sample JSP page above?

j = j+1 is not atomic.
The users2resource is not thread safe.
The resources put into people will never be garbage collected.
The people is not thread safe.
There is no problem.

54. Which one of the following is NOT a valid reason to use the <jsp:useBean> tag instead of instantiating beans directly inside scriptlets?

Instantiating beans directly inside a scriptlet can allow malicious code to access the client browser.
If the variable is persistent (session or application), useBean initializes it if necessary but fetches the variable if it already exists.
The useBean has a "scope" parameter that automatically determines whether the bean should be stored as a local variable, within the request object, within the session object, or within the ServletContext object.
The tag syntax is arguably less intimidating to HTML designers.
The tags are potentially more portable to future versions of the JSP spec, or alternate implementations.

55. <%
Cookie mycookie = new Cookie("aName","aValue");
response.addCookie(mycookie);
%>
Where is the above code fragment located to set this cookie at the client?

Before <language> is set
At the beginning of a JSP page
Anywhere before the output stream to the client is emptied
After the headers and before the first script tag
Within the first <script> tag

56. try{
String s="X";
int i=Integer.parseInt(s);
}
catch(NumberFormatException ex){
System.out.println(s + " can't be converted to an int");
return;
}
finally{
System.out.println("The sky is blue.");
}
In the above code fragment, when does the "finally" exception handler execute?

Always
When int=I is equal to a number above zero
When String=S is equal to X
When int=I is a string
After NumberFormatException has been thrown

57. Which one of the following results in an error stating that a Java Bean was NOT found?

You have not compiled your applet using the latest API.
The JSP0.9 Engine does not support Java Beans.
You are trying to write a second response to the client browser.
You have attempted to use the getProperty action before the useBean tag.
You have set "lang=" incorrectly.
20 years ago