Skip to Content
0
Former Member
Jan 08, 2006 at 09:25 AM

Could the org.omg.cwm package be used directly?

52 Views

Hi,

I want to use the org.omg.cwm.resource.Relational package directly in my project. I write a simple Java class to test it. The class file like this:

//CwmTest.java

import org.omg.cwm.resource.relational.RelationalPackageImpl;

import org.omg.cwm.resource.relational.Table;

public class CwmTest {

public CwmTest(){

RelationalPackageImpl relPkg = new RelationalPackageImpl();

Table tab = relPkg.getTable().createTable();

}

public static void main(String args[]) {

CwmTest cwmTest = new CwmTest();

}

}

I have imported all the necessary jars in the classpath and this file could be compiled. But when I run it, there are some errors:

Exception in thread "main" java.lang.NullPointerException

at org.omg.cwm.resource.relational.RelationalPackageImpl.refClass(RelationalPackageImpl.java:663)

at org.omg.cwm.resource.relational.RelationalPackageImpl.getTable(RelationalPackageImpl.java:173)

at CwmTest.<init>(CwmTest.java:12)

at CwmTest.main(CwmTest.java:16)

Could the org.omg.cwm package be used directly or may I use it in a wrong manner?

Thank you very much!

Message was edited by: Jianhui Si