Printer FriendlyEmail Article Link

Gateway: Why are gateway requests failing with error code 0400?

Environment/Versions
Gateway: All such as OewGcpGateway, AseGcpGateway, SSCInventoryGateway, MesOemGateway, GraniteInventory.
Answer
One possible cause is the database.log file is not readable.
To confirm this is the problem check the catalina.out file for the time when the process was started for a message similar to (note exact wording may vary depending on OS, following is from Linux. This is just the first few lines of the error):
 
Initializing inventory web client application ...
Application home is set to /spirent/CenterOpGateway/MesOemGateway
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: database.log (Permission denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:221)
at java.io.FileOutputStream.<init>(FileOutputStream.java:142)
 
Secondary Check:
Check the Gateway application log file for message similar to this when request for service load occurs (this is snipits of the error message):
 
Tue Sep 04 12:20:54 CDT 2018  [1] DBUtil.saveEvent: ERROR saving data 47: org.hibernate.exception.GenericJDBCException: Could not read entity state from ResultSet : EntityKey[com.spirentcom.ciras.db.Data#47], roll back changes.
Tue Sep 04 12:20:54 CDT 2018  [1] 20180904122006-admin-48BB55B36EE1DB1FC6B708C4D4695B8B: ERROR updating event
Tue Sep 04 12:20:54 CDT 2018  [1] org.hibernate.exception.GenericJDBCException: Could not read entity state from ResultSet : EntityKey[com.spirentcom.ciras.db.Data#47]
org.hibernate.exception.GenericJDBCException: Could not read entity state from ResultSet : EntityKey[com.spirentcom.ciras.db.Data#47]
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:54)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:126)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:112)
at org.hibernate.loader.plan.exec.process.internal.EntityReferenceInitializerImpl.loadFromResultSet(EntityReferenceInitializerImpl.java:339)
at org.hibernate.loader.plan.exec.process.internal.EntityReferenceInitializerImpl.hydrateEntityState
...
...
at java.lang.Thread.run(Thread.java:745)
Caused by: java.sql.SQLException: Blob not found
at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:407)
at com.informix.jdbc.IfxResultSet.blobCheck(IfxResultSet.java:1539)
at com.informix.jdbc.IfxResultSet.a(IfxResultSet.java:632)
...
...
at org.hibernate.loader.plan.exec.process.internal.EntityReferenceInitializerImpl.loadFromResultSet(EntityReferenceInitializerImpl.java:324)
... 54 more
Caused by: java.sql.SQLException: System or internal error java.security.PrivilegedActionException: java.io.IOException: Permission denied
at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:509)
at com.informix.jdbc.IfxTmpFile.<init>(IfxTmpFile.java:85)
at com.informix.jdbc.IfxSqli.executeFetchBlob(IfxSqli.java:4496)
at com.informix.jdbc.IfxResultSet.blobCheck(IfxResultSet.java:1535)
... 64 more
Caused by: java.security.PrivilegedActionException: java.io.IOException: Permission denied
at java.security.AccessController.doPrivileged(Native Method)
at com.informix.jdbc.IfxTmpFile.<init>(IfxTmpFile.java:72)
... 66 more
Caused by: java.io.IOException: Permission denied
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.createTempFile(File.java:2001)
at com.informix.jdbc.IfxTmpFile$1.run(IfxTmpFile.java:74)
... 68 more

Product : TEST PORTAL,GRANITE,Gateway