RE: [Quickfix-developers] SessionQualifier not allow null
Brought to you by:
orenmnero
|
From: David V. <dvi...@sm...> - 2005-08-30 07:39:46
|
Hi,
This issued should be solved in the CVS repository, so please make an =
update
and it should be ok. Otherwise, you can make the following patch in
SessionID.java - this is the one you have in CVS :
public SessionID(String beginString, String senderCompID, String
targetCompID, String sessionQualifier) {
=3D=3D=3D=3D=3D=3D> Add the following block
if (sessionQualifier =3D=3D null) {
sessionQualifier =3D "";
}
=3D=3D=3D=3D=3D=3D>
create(beginString, senderCompID, targetCompID, =
sessionQualifier);
}
Hope it helps.
Regards
David
-----Message d'origine-----
De=A0: qui...@li...
[mailto:qui...@li...] De la part de
Vengoal Chang
Envoy=E9=A0: lundi 29 ao=FBt 2005 09:44
=C0=A0: qui...@li...
Objet=A0: [Quickfix-developers] SessionQualifier not allow null
QuickFIX Documentation:
http://www.quickfixengine.org/quickfix/doc/html/index.html
QuickFIX Support: http://www.quickfixengine.org/services.html
Hi ,
I want use quickfixj on IBM AS/400. So I create some class upon
jdbcxxxx.java. I also create the Exectuor.java for acceptor. I found the
session table have a Session_Qualifier not allow null value, but when I
start the myown class ,
I got the java.sql.SQLException: [SQL0407] Null values not allowed in
column or variable SESSI00001. the SESSI00001 is the check-constraint
for Session table primary key.
And I saw the the jdbcstore.java code will insert the Session following
information in loadCache()
query.setString(1, sessionID.getBeginString());
query.setString(2, sessionID.getSenderCompID());
query.setString(3, sessionID.getTargetCompID());
query.setString(4, sessionID.getSessionQualifier());
......
insert.execute(); <=3D=3D this line run error
So I got that error, becuase I didn't set the SessionQualifier at cfg
file. If I set the parameter , I got CfgError: SessionQualifier could
not set at acceptor mode. If SessionQualifier is not defined at cfg
file, the SessionQualifier value always null, so the above statement
never execute normal. If table definition is not NULL. Does the SQL
function correct ?
Following is Exectutor.java code section:
try {
Application application =3D new Application();
SessionSettings settings =3D
new SessionSettings(inputStream);
//MessageStoreFactory messageStoreFactory =3D
// new FileStoreFactory(settings);
//LogFactory logFactory =3D new ScreenLogFactory(true, true, true);
MessageStoreFactory messageStoreFactory =3D
new AS400JdbcStoreFactory(settings);
System.out.println("AS400JdbcStoreFactory created");
LogFactory logFactory =3D new AS400JdbcLogFactory(settings);
System.out.println("AS400JdbcLogFactory created");
MessageFactory messageFactory =3D new DefaultMessageFactory();
acceptor =3D new SocketAcceptor
(application, messageStoreFactory, settings, logFactory, =
messageFactory);
acceptor.start();
System.out.println("press <enter> to quit");
System.in.read();
acceptor.stop();
System.exit(0);
}
following is the error code:
D:\Vengoal\My Documents\FIX\quickfix\quickfixj\bin>as400executor.bat
AS400JdbcStoreFactory created
AS400JdbcLogFactory created
AS400JdbcStoreFactory.create()
AS400JdbcStore.sessionID=3DFIX.4.2:EXEC->BANZAI
AS400JdbcStore.connect
sessionID.getBeginString()=3DFIX.4.2
sessionID.getSenderCompID()=3DEXEC
sessionID.getTargetCompID()=3DBANZAI
sessionID.getSessionQualifier()=3Dnull
cache.getCreationTime().getTime()=3D2005-08-29 15:17:23.984
AS400JdbcStoreFactory.create() error
java.sql.SQLException: [SQL0407] Null values not allowed in column or
variable S
ESSI00001.
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:643)
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:614)
at com.ibm.as400.access.AS400JDBCStatement.commonExecute(AS400JDBCStatem
ent.java:862)
at com.ibm.as400.access.AS400JDBCPreparedStatement.execute(AS400JDBCPrep
aredStatement.java:777)
at quickfix.AS400JdbcStore.loadCache(AS400JdbcStore.java:87)
at quickfix.AS400JdbcStore.<init>(AS400JdbcStore.java:51)
at quickfix.AS400JdbcStoreFactory.create(AS400JdbcStoreFactory.java:24)
at quickfix.Session.<init>(Session.java:175)
at quickfix.DefaultSessionFactory.create(DefaultSessionFactory.java:130)
at quickfix.netty.AbstractSocketAcceptor.initialize(AbstractSocketAccept
or.java:171)
at quickfix.netty.AbstractSocketAcceptor.start(AbstractSocketAcceptor.ja
va:121)
at quickfix.example.as400.fixserver.Executor.main(Executor.java:60)
java.lang.RuntimeException: java.sql.SQLException: [SQL0407] Null values
not all
owed in column or variable SESSI00001.
--=20
Best Regards,
Vengoal Chang=20
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle =
Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & =
QA
Security * Process Improvement & Measurement * =
http://www.sqe.com/bsce5sf
_______________________________________________
Quickfix-developers mailing list
Qui...@li...
https://lists.sourceforge.net/lists/listinfo/quickfix-developers
|