Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link

Alex Ioannou

Greenhorn
+ Follow
since Nov 14, 2001
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 Alex Ioannou

[I have also posted this in the weblogic forum, not sure where it should go]

Hi there

I have successfully executed a WLST script over an SSL connection to perform operations such as deploy/undeploy EAR files and configure resources. I imported the demo certificate from my BEA install into my client JVM to achieve this.

I now want to specify the keystore on the command line so I can run a script without having to modify the JVM first.

So I tried -Djavax.net.ssl.keyStore=C:/jdk15/cacerts which didn't work.

I'm running WLST using ant so I also tried this which didn't work either



Here is the error (remember the code works fine when the certificate is added to the default location).



Am I using the correct system properties?
Hi there

I have successfully executed a WLST script over an SSL connection to perform operations such as deploy/undeploy EAR files and configure resources. I imported the demo certificate from my BEA install into my client JVM to achieve this.

I now want to specify the keystore on the command line so I can run a script without having to modify the JVM first.

So I tried -Djavax.net.ssl.keyStore=C:/jdk15/cacerts which didn't work.

I'm running WLST using ant so I also tried this which didn't work either



Here is the error (remember the code works fine when the certificate is added to the default location).



Am I using the correct system properties?
14 years ago
Hi there

I was wondering if anyone else has noticed the "feature" in the ojdbc14.jar that ships with weblogic, regarding the clob constants.

Specifically, the values of oracle.sql.CLOB.DURATION_SESSION and oracle.sql.CLOB.DURATION_CALL (10 and 12) are incorrect when using oracle 9i. They are set to the values used in oracle 8i (1 and 2).

So if you do any clob operations in weblogic you must override the oracle driver with your own (if using 9i) otherwise you will get invalid duration errors reported from the database.
17 years ago
Found the problem.

The ojdbc14.jar that ships with weblogic 8.1.2 is incorrect. That jar contains invalid values for the constants CLOB.DURATION_SESSION and CLOB.DURATION_CALL.
Hi there

We're trying to insert a clob into a database table using the JDBC OCI driver and prepared statements.
The client and server versions of the database we are using are 9.2.0.4.0 - the linux version.

The code is resident on weblogic application server version 8.1.2, and it works fine using the thin driver regardless of the version of the database. As soon as we tried to use the oci driver the code began to fail where it tries to build the temporary clob.

The code fails with :-



This is the code we use to populate the prepared statement with the clob :-


Any ideas on what the problem might be? Is there a known bug with the oci driver for version 9.2.0.4.0? We tried to use but that didn't work either.

Thanks
Hi there
I'm experiencing a problem with some xml binding.
I'm trying to unmarshal an xml file to some java objects, the file conforms to an xsd schema.

I have renamed the package structure to a/b/c/d.
If I had validating on the unmarshaller to false then this error does not occur, but that is not the desired result!
Al
I had to manual change the code in the ejb so that the java objects are timestamps.
The issue is highlighted in this piece of code :-

If you convert a date to anything but timestamp then the seconds get chopped off. How annoying.
Now I need help on the other issue regarding those stupid BLOBs.
Al
Hi there
Here are two problems.
EJBQL Date Problem
Ok here is a statement :-

Is it possible to format the date field that is returned? My problem is that the seconds and milliseconds keep getting truncated!
I'm using an oracle db, so if I set will it feed the full date back to the server?
CMP BLOB Problem
I have a CMP bean where one of the fields is a BLOB. As the bean is CMP, the java field that maps to the BLOB isn't being converted properly.
As a result my code now looks like this :-

The first line creates the ejb without the BLOB being populated, the second line finishes it off with a manual JDBC call. Is there a better way to do this? I tried putting the 2nd line into but the ejb didn't exist in the database yet!!
Thanks
Al
I had a go with the clear parameters like this

Only thing is I kept getting exceptions stating that the parameters were not populated when the batch was executed. Took out the clear method and then everything was fine.
I wonder why that is?
Did I run clearParameters too soon?
I'm a bit confused here.
I want to use prepared statements and batch updates too.
After a simple loop iteration endign with pstmt.addBatch(), do I have to clear the parameters or can I just overwrite them with the set methods again?
Short reply :-
Write a helper class that does all the JNDI so that in jsp you simply call something like :-
EJB = EJBHelper.getEJBHome().create()
or whatever method you wish to use. I always write a helper class for each EJB as a rule of thumb.
Hi there
I have a for loop going through an ArrayList of Maps. In each iteration all the data in the map is converted into a new EJB using a custom create method.
The problem is that the java/ejb container/whatever can't keep up and the database connections just mushroom until exceptions are thrown. How do a manually close the bean to free up the resources?
Is the fact that the arraylist might contain over 8,000 maps an issue?
And don't say a word about BMP as this is out of the question!!
At present I have (in shorthand)
Also, to be safe on .equals I did .equalsIgnoreCase() and used .trim() on both strings.
19 years ago
Ok we all know that Strings are immutable, and that Strings with the same characters share the same characters in memory.
So with hashtables, it's possible to do this :-

so that

all work.
But, I have found a case where this doesn't work, and I can't figure out why. Here is some code:-

So the code selects all weeks in the table, and builds an arraylist of beans for each week.
But if I say that the week is "17-JULY" and try and do a null object is returned. I thought that maybe the value was never stored, so I did an iterator on the keys and the week existed! I also iterated on the values and the object was there also!
I also did :-

The only way I could get the code above to return true was to pass in the original string that was used in the put method.
So what's going on there? Has anyone seen this problem before? I'm using j2sdk1.4.1.
Alex
19 years ago
Thought about your possible solutions.
The stream or parser will never know when the file is ready to read, so there will be have to be some mickey mouse testing in whatever class is delegated the task of IO.
Another thing that I can think of is in the FTP process itself, perhaps ftp supports file locking, then the security manager can be used to detect whether a file is ready for processing or not?
Al