Today encountered a wonderful problem, project switching environment, resulting in the foreground query time format programming a string of numbers. The above illustration shows (the old Environment), (the new environment), the system is ported as is.
This problem plagued for a long time, online search methods, but not fruit.
Analysis of the problem: The project is a transplant, so it is not a project problem, certainly environmental issues.
Environmental analysis:
1, the old system: weblogic9.2 oracle10g jdk1.5 Use the WebLogic configuration data source way to connect the database
2, the new system: weblogic10.3 oracle11g jdk1.6 to use the WebLogic configuration data source way to connect the database
Because of the large difference,
1, so in the local environment with weblogic10.3 to connect the old environment database, the date shows still have problems, so exclude the database reasons.
2, then use Tomcat in the local deployment project to connect the old environment database, the date is normal; Connect the new environment database, the date is normal, the local environment is jdk1.7, so exclude JDK and database reason.
3, the problem is finally fixed in the middleware, careful observation of the background log, found using Tomcat query, backstage SQL results in the 2018-01-01 format, and with WebLogic, background time format for the 2018-01-01 00:00:00.0 format, The problem is then locked on the database connection
4, add Weblogic.xml in the project, configure the first project jar package, found that the foreground data format is normal, so the problem is again identified as a JDBC problem.
5, check the old environment JDBC Connection (path:/wls10/wlserver_9.2/server/lib) adopted is Ojdbc14.jar, and new Environment (path:/wls10/wlserver_10.3/server/lib) The Ojdbc6.jar is used, so the Ojdbc14.jar is copied to the corresponding path in the new environment, the startup project is still invalid, so it should be weblogic call jar order problem. Note: Be sure not to delete the Ojdbc6.jar, otherwise use the WebLogic configuration data source, will be reported to find the driver error.
6, in the WebLogic configuration load Ojdbc14.jar (configuration method:/wls10/wlserver_10.3/common/bin/commenv.sh file Weblogic_classpath= "" property to write to the jar path, the project starts normally, but when you log on to the system, the error java.io.StreamCorruptedException:invalid the stream header: 00540001, found that the error in the above two lines in the database in the time of operation, online inquiries, the problem should be ojdbc14.jar and jdk1.6 have incompatible places
7, check the local project is Ojdbc14_g.jar, so put this jar again into the new environment Server/lib, and then configure the first load the jar, the final problem solved.
This problem is mainly due to jar conflicts and jar upgrades caused by the hope that a similar situation with friends to help, careful analysis of problems and analysis of data, often faster to solve the problem.