Development issues gather-------rookie dish, rookie bird.

Source: Internet
Author: User

One

Recently do a common form upload download module, the test is not a problem, test system testing and problems, very hard to test the system is no problem, the production system there are problems .... Really interlocking, a little can not be wrong AH!!!

1. The first problem encountered by the production system

[ERROR] 2016-11-04 09:26:37,680 method:gnhr.ww.json.CommonFileAction.list (commonfileaction.java:193)
Commonfileaction Exception
     com.microsoft.sqlserver.jdbc.SQLServerException: Object name ' Commonfile ' is not valid.
     At Com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError (Unknown Source)
At Com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult (Unknown Source)
At Com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement (Unknown Source)
At Com.microsoft.sqlserver.jdbc.sqlserverpreparedstatement$prepstmtexeccmd.doexecute (Unknown Source)
At Com.microsoft.sqlserver.jdbc.TDSCommand.execute (Unknown Source)
At Com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand (Unknown Source)
At Com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand (Unknown Source)
At Com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement (Unknown Source)
At Com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery (Unknown Source)
At Org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery (delegatingpreparedstatement.java:96)
At Org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery (delegatingpreparedstatement.java:96)

Reason:

The database of the local and test system is not the same as the database of the production system, and the database of the production system is not commonfile the table.

Workaround:

Create a new table with local and test systems in the database of the production system Commonfile

2. The second problem encountered by a production system

2016-11-04 10:35:58,584 Method:gnhr.dao.helper.BasicCommonFileHelper.pstmtInsert (basiccommonfilehelper.java:223)
Commonfilehelper.pstmtinsert SQLException
     com.microsoft.sqlserver.jdbc.SQLServerException: Cannot insert value NULL into column ' FileId ', table ' Gn_Hr.dbo.CommonFile '; column does not allow null values. INSERT failed.
At Com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError (Unknown Source)
At Com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult (Unknown Source)
At Com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement (Unknown Source)
At Com.microsoft.sqlserver.jdbc.sqlserverpreparedstatement$prepstmtexeccmd.doexecute (Unknown Source)
At Com.microsoft.sqlserver.jdbc.TDSCommand.execute (Unknown Source)
At Com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand (Unknown Source)
At Com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand (Unknown Source)
At Com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement (Unknown Source)
At Com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.execute (Unknown Source)
At Org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.execute (delegatingpreparedstatement.java:172)
At Org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.execute (delegatingpreparedstatement.java:172)

Reason:

Commonfile This table of the primary key Fileid in the local and test system is set to self-growth, non-empty , and the production system is not set to self-growth.

Solve:

The Fileid field of the Commonfile table of the production system is also set to self-increment.

ohyea.! ~!!

Development issues gather-------rookie dish, rookie bird.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.