I am using turbine & village API's to generate Classes(Database MApping) but i am getting NullPointerException
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Vijay_Kumar
Posted On:   Thursday, August 9, 2001 06:07 AM

import org.apache.tools.ant.BuildException; public class genDBMap extends BaseOMGenerator { public genDBMap() { } public DatabaseMap getDatabaseMap()throws Exception { JDBCSchemaToDatabaseMap gen = new JDBCSchemaToDatabaseMap(); gen.setDbUrl("jdbc:mysql://localhost/hrforms"); gen.setDbDriver("org.gjt.mm.mysql.Driver"); gen.setDbPassword(""); gen.setDbUser(""); DatabaseMap dbMap = gen.generateMap("MapName"); return dbMap; } public static void main(String arg[]) throws Exception {    More>>

import org.apache.tools.ant.BuildException;


public class genDBMap extends BaseOMGenerator


{


public genDBMap()

{

}

public DatabaseMap getDatabaseMap()throws Exception

{

JDBCSchemaToDatabaseMap gen = new JDBCSchemaToDatabaseMap();

gen.setDbUrl("jdbc:mysql://localhost/hrforms");

gen.setDbDriver("org.gjt.mm.mysql.Driver");

gen.setDbPassword("");

gen.setDbUser("");

DatabaseMap dbMap = gen.generateMap("MapName");

return dbMap;

}

public static void main(String arg[]) throws Exception

{

genDBMap gm = new genDBMap();

gm.setRootdir
("c:/unipm/vijay/");

gm.setLicenseFile(null);

gm.setPackage("com.xxx.yy.db");

gm.setExtend("TurbineMapBuilder");

gm.setMapname("TurbineMap");

gm.setSuffix("MapBuilder");

//gm.createDatabaseMapClasses(gm.getDatabaseMap());

gm.execute();


}

}


-------------------------------
i am getting this stack trace

java.lang.NullPointerException
at org.apache.turbine.tools.JDBCSchemaToDatabaseMap.generateMap(JDBCSche
maToDatabaseMap.java:244)
at genDBMap.getDatabaseMap(genDBMap.java:21)
at org.apache.turbine.tools.BaseOMGenerator.execute(BaseOMGenerator.java
:304)
at genDBMap.main(genDBMap.java:34)

please help me

   <<Less

Re: I am using turbine & village API's to generate Classes(Database MApping) but i am getting NullPointerException

Posted By:   Vijay_Kumar  
Posted On:   Tuesday, October 16, 2001 09:39 PM

Sorry guys, by mistake i posted this question in this forum. any way i got the solution for this.


regards
About | Sitemap | Contact