Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

12775220 DatabaseMetaData.getColumns() returns unexpected values in COLUMN_SIZE and DECIMAL_DIGITS

Rod AllenFeb 24 2015 — edited Mar 6 2015

Hi All,

I posted a while ago asking about Bug 12775220

I just wanted to provide an update on this as I found a potential solution to the underlying problem that I facing (with NUMBER columns which lacked precision and scale). If you add the JVM argument -Doracle.jdbc.J2EE13Compliant=true it appears to resolve this problem.

Regards


Rod

Comments

843807
It means that g was probably not initialized.. you can quickly check this by commenting out that g.drawImage line and put an if statement to check if g is null or not.. chances are you will find that it is null.. then you'll have to figure out why it is null..
843807
Right, g (a Graphics object) is null. What is it supposed to equal? The reference books just show the paint method and the g.drawImage() but they don't set g to anything.

Thanks,
Shawn
843807
Also... since you're using an applet, try not to use Toolkit as it is usually used for applications. Also, to make 'g' not null, just use it in your paint method like so:
import java.applet.*;
import java.awt.*;
public class Example extends Applet {
	Image splashImage;
	public void init() {
		splashImage = getImage(getCodeBase(),"R2Splash.gif");
	}
	public void paint(Graphics g) {
		g.drawImage(splashImage,30,40,null);
	}
}
843807
Thanks for the help. Unfortunately, I received the same exception at the same line. I understand that Applets automatically use the Paint(), but in this case, how is it accessing the paint() before the init() and setting the value of g? I just think it's stopping before it gets to that method.

Shawn
843807
Applets automatically use the Paint(), but in this
case, how is it accessing the paint() before the
init() and setting the value of g? I just think it's
stopping before it gets to that method.

Shawn
You don't use g.drawImage() in init(), you use it in paint(). Try using the exact code I gave you, and you'll see.
1 - 5
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Apr 3 2015
Added on Feb 24 2015
2 comments
4,085 views