Hi,
I want to develop an application using Servlet and CORBA. I wrote 2 inteface (reistapu.idl and reisbelediye.idl) and compiled them with idlj. I wrote my servers (ReisTapuServer.java and ReisBelediyeServer.java) and client codes (ReisCORBAClientServlet.java), and compiled them javac. I want to explain my application briefly;
1- A user enter his/her tax number in a HTML form and press submit button.
2- tax number is sent a CORBA client (it is a servlet)
3- Servlet calls a remote method using this tax number,
4- In the server, connecting access database, executing a query, creating Statement and ResulSet and writing results into the struct MalikInfo, ArsaInfo, BinaInfo are perfomed.
To run application, I'm doing following process;
1- prompt> start tnameserv
2- prompt> start java ReisTapuServer
3- prompt> start java ReisBelediyeServer
4- prompt> tomcat3.3.1 in> startup
5- Enter a tax number and push submit button
While I was waiting taxpayer information, the empty HTML page was displayed. When I looked to the Tomcat's DOS console, I saw an error message. Complete error message exsist below. How can I correct this error? Can anyone help me?
----------part of the MalikServer.java -----------------
public MalikInfo getMalikBilgi (String vno){
Connection conn = null;
ResultSet rset = null;
Statement stmt = null;
MalikInfo minfo = new MalikInfo ();
try {
/*create a JDBC connection*/
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
conn = DriverManager.getConnection("jdbc:odbc:ReisTapu","","");
/*Create a SQL statement for the database query*/
stmt = conn.createStatement();
rset = stmt.executeQuery("SELECT * FROM Malik WHERE VergiNo='"+vno+"' ");
/*return the result in a MalikInfo structure */
if(rset==null){
System.out.println("sorgu yurutulemedi");
}else {
System.out.println("sorgu sonuclari MalikInfo formatinda yazdiriliyor");
while(rset.next()) {
minfo.Adi = rset.getString("Adý");
minfo.Soyadi = rset.getString("Soyadý");
minfo.BabaAdi = rset.getString("BabaAdý");
minfo.DogumYeri = rset.getString("DogumYeri");
minfo.DogumTarihi = rset.getString("DogumTarihi");
minfo.TCKimlikNo = rset.getString("TCKimlikNo");
minfo.Mahalle = rset.getString("Mahalle");
minfo.Cadde = rset.getString("Cadde");
minfo.Sokak = rset.getString("Sokak");
minfo.KapiNo = rset.getString("KapýNo");
minfo.il = rset.getString("Ýl");
minfo.ilce = rset.getString("Ýlce");
}
}
}catch(ClassNotFoundException cnf) {cnf.printStackTrace(); }
catch(SQLException se) { se.printStackTrace();}
catch (Exception e) {
System.out.println("ERROR :" + e);
e.printStackTrace(System.out);
}
finally{
if (rset != null) try { rset.close(); } catch(SQLException se) { System.out.println("Error"); }
if (stmt != null) try { stmt.close(); } catch(SQLException se) { System.out.println("Error"); }
if (conn != null) try { conn.close(); } catch(SQLException se) { System.out.println("Error"); }
}
return minfo;
}
--------- COMPLETE ERROR MESSAGE---------------------
org.omg.CORBA.DATA_CONVERSION: wmcid : OMG minor code : 1 completed : No
at sun.reflect.GeneratedConstructorAccessor9.newInstanse (Unknown Source)
at un.reflect.DelegatingConstructorAccessorImpl.newIstance (DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newIstance (Constructor.java:274)
at java.lang.Class.newIstance0 (Class.java:296)
at java.lang.Class.newIstance (Class.java:249)
at m.sun.corba.se.internal.iiop.messages.ReplyMessage_1_2.getSystemException (ReplyMessage_1_2.java:90)
at com.sun.corba.se.internal.iiop.ClientResponseImpl.getSystemException (ClientResponseImpl.java:105)
at com.sun.corba.se.internal.POA.GenericPOAClientSC.invoke (GenericPOAClientSC.java:129)
at org.omg.CORBA.portable.ObjectImpl._invoke(objectImpl.java:457)
at reisTapuInterface._ReisTapuInterfaceStub.getMalikBilgi(_ReisTapuInterfaceStub.java:20)
at ReisCORBAClient.doPost(ReisCORBAClient.java:75)
at javax.servlet.http.HttpServlet.service (HttpServlet.java)
at javax.servlet.http.HttpServlet.service (HttpServlet.java)
at org.apache.tomcat.facade.ServletHandler.doService (ServletHandler.java:574)
at org.apache.tomcat.core.Handler.invoke (Handler.java:322)
at org.apache.tomcat.core.Handler.service (Handler.java:235)
at org.apache.tomcat.facade.ServletHandler.service (ServletHandler.java:485)
at org.apache.tomcat.core.ContextManager.internalService (ContextManager.java:917)
at org.apache.tomcat.core.ContextManager.service (ContextManager.java:833)
at org.apache.tomcat.modules.server.Http10Interceptor.processConnection (Http10Interceptor.java:176)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt (PoolTcpEndpoint.java:494)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run (ThreadPool.java:516)
at java.lang.Thread.run (Thread.java:536)
<<Less