henderunal
henderunal

Reputation: 749

Struts DB query execution error

I am trying to insert a data to my db2 9.7 database from IBM RAD 7.5 using struts 1.3 But when I execute the query I got this errors: http://pastebin.com/3UPTVKbh

KayitBean kayit=(KayitBean)form;

     //String name = kayit.getName();
     String name="endee";
     DBConn hb = new DBConn();
     Connection conn =hb.getConnection();
     System.out.println("basarili");


     //String sql = "SELECT * FROM ENDER.\"MEKANDENEME\"";
     String sql = "INSERT INTO ENDER.\"MEKANDENEME\" VALUES (\'endere\' ,\'bos\');";
     System.out.println(sql);
      System.out.println("basarili2");

      PreparedStatement ps = conn.prepareStatement(sql);
      System.out.println("basarili3");
      ResultSet rs = ps.executeQuery();


    //  String ender=rs.getArray(1).toString();
    System.out.println("basarili4");
   // System.out.println(rs);
     conn.close();

I am receiving this after System.out.println("basarili3");" Please help me.

Upvotes: -1

Views: 473

Answers (2)

henderunal
henderunal

Reputation: 749

I found my problem. My problem was a simple wrong bracket before forward. But it was interesting that i was getting exception always while executing the query.

Upvotes: 0

leonbloy
leonbloy

Reputation: 76006

This has nothing to do (apparently) with DB, just with Struts (please correct the title),and the code posted seems irrelevant.

Googling for "The path of an ForwardConfig cannot be null", you'll find this. Check your Struts configuration, and discover if you are using validation or not.

Upvotes: 0

Related Questions