Tomcat log file
stout_20090728.log:
========================
commandINSERT INTO Import_Service_Sales(CoLastName,FirstName,AddressLine1,AddressLine2,AddressLine3,AddressLine4,InvoiceNumber,SaleDate,CustomersNumber,DeliverVia,DeliveryStatus,Description,AccountNumber,Amount,Job,Comment,Memo,SalespersonLastName,SalespersonFirstName,DeliveryDate,ReferralSource,TaxCode,NonTaxAmount,FreightTaxCode,FreightNonTaxAmount,FreightAmount,SaleStatus,CurrencyCode,ExchangeRate,PaymentIsDue,DiscountDays,BalanceDueDays,PercentDiscount,PercentMonthlyCharge,AmountPaid,PaymentMethod,PaymentNotes,NameOnCard,CardNumber,ExpiryDate,AuthorisationCode,DrawerChequeNumber,Category) VALUES ('Aadvark Advertising (H)', '' ,'Aadvark Advertising (H)', '15B Golden Hill Mansion Wan Chai','*','511458 020','00000023','2009-6-15','00000010','TNT','P','kenty test insert','11120','21.00','','Final Sale.','Sale; Aadvark Advertising (H)','Long, Alan','','2009-6-15','Advertisement','N-T','21.00','','','','Q','0','0','','','','','','21.00','','','','C050','','1','','')
java.sql.SQLException: General error
at sun.jdbc.odbc.JdbcOdbc.throwGenericSQLException(JdbcOdbc.java:7086)
at sun.jdbc.odbc.JdbcOdbc.SQLTransact(JdbcOdbc.java:5601)
at sun.jdbc.odbc.JdbcOdbcConnection.commit(JdbcOdbcConnection.java:700)
at myob.servlet.Test.process(Test.java:50)
at myob.servlet.ServletBase.doPost(ServletBase.java:50)
at myob.servlet.ServletBase.doGet(ServletBase.java:35)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
stderr_20090728.log:
======================================
Product Version: 5.60.0.3
OPENRDA_INI Configuration file: <C:\WINDOWS\openrda.ini>
Platform: IWINDOWS32
Build: Unicode
**********Contents of file:<C:\WINDOWS\openrda.ini>*********
[Common]
oa_root=C:\MYOBODBC
SchemaPath=C:\MYOBODBC\schema
Config=C:\MYOBODBC\config\iwinnt
CacheOptions=PATH=C:\MYOBODBC\cache;INITIAL_SIZE=10;INCREMENT_SIZE=5;MAX_SIZE=250;DATABLOCK_SIZE=64
CacheMemSize=8192
JoinInQueryOrder=1
SchemaUpdateAllowed=1
SQLEngineVerboseMode=0x00
SQLEngineVerboseTraceFile=C:\MYOBODBC\bin\iwinnt\oasqlverbose.log
EncryptionPackage=0
FETCHBLOCK_SIZE=100
SessPollWaitTime=20
JOINBLOCK_SIZE=10
[Client]
KeyFile=C:\MYOBODBC\config\iwinnt\oaclientkey.lic
TraceFile=
FETCHBLOCK_SIZE=100
PromptForUID=0
[TRACECLIENT]
All=FATAL|SNO|ERRORS
[ODBC32]
MessagePrefix=[MYOB ODBC]
TraceFile=
TraceOptions=0
PromptForUID=0
********************************************************
**********Contents of file:<C:\MYOBODBC\schema\oadrd.ini>*********
[test_local]
CONNECT_STRING=
TYPE=DB3
SCHEMA_PATH=.\test
REMARKS=Test DBase III IP source
[memory_local]
CONNECT_STRING=memory
TYPE=MEM
SCHEMA_PATH=
REMARKS=Test Memory IP source
[CTSL]
CONNECT_STRING=
TYPE=MYOB
SCHEMA_PATH=
REMARKS=
********************************************************
**********Contents of file:<C:\MYOBODBC\schema\oainfo.ini>*********
[DAM]
1=0
8=1
11=N
14=\
16=OpenRDA
17=OpenRDA
18=5.50.20.0
19=Y
20=Y
21=Y
22=0
23=2
24=2
25=N
26=1
27=Y
28=4
29="
30=128
31=128
32=128
33=128
34=128
35=128
36=Y
37=Y
38=Y
39=owner
40=procedure
41=.
42=NULL
43=9
44=1
45=table
46=2
47=OAUSER
48=0
49=16777215
50=16547839
51=3
52=630783
53=0
54=0
55=0
56=0
57=0
58=0
59=0
60=0
61=0
62=0
63=0
64=0
65=0
66=0
67=0
68=0
69=0
70=0
71=0
72=7
73=N
74=2
75=1
78=0
79=0
80=0
81=3
82=0
83=0
84=0
85=1
86=37867
87=Y
88=2
89=HINT,IDENTIFIED
90=N
91=15
92=7
93=4
94=*(){}|:;
95=31
96=3
97=0
98=0
99=0
100=0
101=0
102=0
103=N
104=0
105=32768
106=0
107=32
108=8192
109=0
110=0
111=N
112=8192
113=Y
114=1
115=73
116=0
117=0
118=1
119=0
120=0
121=0
122=0
123=0
124=0
125=0
126=0
127=0
128=0
129=0
130=0
131=0
132=1
133=0
134=1
136=0
137=0
138=0
139=0
140=0
141=1
142=0
143=1
144=0
145=0
146=1
147=0
148=3
149=0
150=0
151=0
152=1
153=2
154=2
155=7
156=2
157=2
158=3184
159=63
160=16135
161=592
162=3184
163=11
164=238
165=0
166=1
167=1
168=0
8194=.
8195=1
8196=15
8197=1
10000=1995
10001=2
10002=Y
10003=Y
10004=ISO=8859-1
10005=128
10022=0
********************************************************
**********Environment Variables *********
OPENRDA_INI = <NOT_SET>
PATH = <c:\Program files\Intel\Wireless\Bin;C:\Program Files\Java\jdk1.6.0_02\bin;;C:\Program Files\Common Files\Thunder Network\KanKan\Codecs;>
LD_LIBRARY_PATH = <NOT_SET>
SHLIB_PATH = <NOT_SET>
CLASSPATH = <C:\Program Files\Java\jdk1.6.0_02\lib\dt.jar;C:\Program Files\Java\jdk1.6.0_02\lib\tools.jar;C:\Program Files\Java\jdk1.6.0_02\bin\;C:\Program Files\Apache Software Foundation\Tomcat 6.0\lib\servlet.jar;C:\RmiJdbc\dist\lib\RmiJdbc.jar;>
ODBCINI = <NOT_SET>
********************************************************
CLI : [TID: 864]:[Tue Jul 28 13:59:13.078 2009] rdacstmt.c:99: *** rda_cliAllocStmt: connection is not opened
SQLD: [TID: 864]:[Tue Jul 28 13:59:14.156 2009] damdrv.c:881: sqldrv_commit(): IP endTransaction() returned error.
SQLS: [TID: 864]:[Tue Jul 28 13:59:14.156 2009] sqlserv.c:501: *** sqls_commit: Unable to commit transaction.
CLI : [TID: 864]:[Tue Jul 28 13:59:14.156 2009] rdacevnt.c:1256: *** procComitCnf: SQL_COMMIT caused a rollback. Error = 20016
CLI : [TID: 864]:[Tue Jul 28 13:59:14.156 2009] rdacutl.c:831: *** RDA_cliCommit: can't execute R-Commit
MYOBODBCError.txt
==========================================
Statement Error: 20016 Unable to determine if import has finished
java连接方式:
Connection con=null;
Statement St=null;
Driver driver=null;
System.out.println("kenty test");
try
{
driver = DriverManager.getDriver("jdbcdbc:CTSL");
con = DriverManager.getConnection("jdbcdbc:CTSL");
con.setAutoCommit(false);
St= con.createStatement();
String command="INSERT INTO Import_Service_Sales(CoLastName,FirstName,AddressLine1,AddressLine2,AddressLine3,AddressLine4,InvoiceNumber,SaleDate,CustomersNumber,DeliverVia,DeliveryStatus,Description,AccountNumber,Amount,Job,Comment,Memo,SalespersonLastName,SalespersonFirstName,DeliveryDate,ReferralSource,TaxCode," + "NonTaxAmount,FreightTaxCode,FreightNonTaxAmount,FreightAmount,SaleStatus,CurrencyCode,ExchangeRate," +
"PaymentIsDue,DiscountDays,BalanceDueDays,PercentDiscount,PercentMonthlyCharge,AmountPaid," +
"PaymentMethod,PaymentNotes,NameOnCard,CardNumber,ExpiryDate,AuthorisationCode," +
"DrawerChequeNumber,Category) " +
"VALUES ('Aadvark Advertising (H)', '' ,'Aadvark Advertising (H)', '15B Golden Hill Mansion Wan Chai','*','511458 020'," +
"'00000023','2009-6-15','00000010','TNT','P','kenty test insert','11120','21.00','','Final Sale.','Sale; Aadvark Advertising (H)','Long, Alan','','2009-6-15','Advertisement','N-T'," +
"'21.00','','','','Q','0','0'," +
"'','','','','','21.00'," +
"'','','','C050','','1'," +
"'','')";
System.out.println(command);
int i=St.executeUpdate(command);
System.out.println("Inserted =1111 ");
con.commit();
}
最终发现原因,是在创建ODBC的时候,在File Access哪里需要选择Single user Access!
本文转自kenty博客园博客,原文链接http://www.cnblogs.com/kentyshang/archive/2009/07/28/1532984.html如需转载请自行联系原作者
kenty