Catatan

Menunjukkan catatan yang berlabel SPRING Tool Suite

[t18c18] Invalid Column Name padahal ada ja column tu

Imej
Ini lagi satu error yang membuatkan Tedi stuck tiga hari tiga malam.  ERROR org.hibernate.engine.jdbc.spi.SqlExceptionHelper - invalid column name 'companyMain' Padahal property companyMain tu dah memang ada dalam CmsUser tu dan mapping-nya semua betul. Fikir punya fikir dan selepas solat hajat, tiba-tiba didatangkan ilham untuk rever satu class yang lain yang juga property foreign key dalam CmsUser, nama class tu StaffMain. Tedi check dalam tu memang ada companyMain juga, maka Tedi pun segera menghapuskannya. Selepas run apps, memang benarlah, itulah puncanya. Benda kecil yang menjadi besar.... huhuhu... Inilah masalahnya berkongsi kod dengan orang lain tapi tidak berada di tempat sama. Masalahnya mereka okay sahaja jadi environment dalam local machine Tedi sahajalah yang tak okay.   Mar 18, 2018 7:29:37 AM org.apache.tomcat.util.digester.SetPropertiesRule begin WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to ...

Class not found walaupun ia ada

Puaslah Tedi mencari apa masalah "java.lang.ClassNotFoundException: my.appzz.util.async.ExceptionHandlingAsyncTaskExecutor" ni padahal terang tang tang lagi bahawa kelas tersebut ada dalam kod. Lastly Tedi cuma clean kod tersebut dan rebuild dan tiba-tiba sahaja semuanya okay macam tiada apa-apa. Mar 12, 2018 1:37:06 PM org.apache.tomcat.util.digester.SetPropertiesRule begin Mar 12, 2018 1:37:06 PM org.apache.tomcat.util.digester.SetPropertiesRule begin WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:{your_system_name}' did not find a matching property. Mar 12, 2018 1:37:06 PM org.apache.catalina.startup.VersionLoggerListener log INFO: Server version:        Apache Tomcat/8.5.24 Mar 12, 2018 1:37:06 PM org.apache.catalina.startup.VersionLoggerListener log INFO: Server built:          Nov 27 2017 13:05:30 UTC Mar 12, 2018 1:37:06 PM org.apache.catalina.startup....

Class dependency error occurred on aspect definition

Imej
Class dependency error occurred on aspect definition 'Aspect definition advise type [after] advise [org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke]' while processing bean Check if builder classpath is complete. Solution: Here's a workaround. Right click the project and go to "Properties >> Spring" Select the "Enable Project Specific settings" checkbox. Go to "Project Builders" tab and disable "AOP Reference Model Builder". My guess is that the AOP reference model builder is running into references to types that a regular compile would not visit, and these types are not on the project classpath, causing that error.

Error Log SPRING 4 MVC DOJO Hibernate JPA

Imej
Catatan error yang Master hadapi dan penyelesaiannya semasa membangunkan sistem web menggunakan framework Spring 4 MVC dengan DOJO , Hibernate , dan Java Persistence API (JPA) . Cabaran besar semasa membangunkan sistem adalah untuk mengenalpasti punca sesuatu ralat ( error ). Jika tidak tahu punca masalah macam mana kita nak selesaikan sesuatu masalah? Menyelesaikan sesuatu masalah dalam kod sistem adalah melalui proses debugging atau dalam Bahasa Malaysia disebut nyahralat. How to debug SPRING MVC application in Spring Tool Suite? Pilih Window-->Show View--> Servers . Right Click pada nama server pada panel Servers, Pilih "Restart in Debug" atau pilihan Debug , Tambah breakpoints dalam kod, Klik kanan pada nama aplikasi anda, pilih Debug As --> Debug on Server . Gunakan bebutang F5 untuk masuk ke dalam method . Gunakan bebutang F6 untuk ke Statement seterusnya. Page Not Found 404 Periksa jika link pada View tidak sama dengan apa yang set pa...

Error converting data type nvarchar to numeric

Imej
Isu Semasa guna function findOne(example), dapat error yang panjang berjela, didahului dengan tajuk masalah tukar data jenis nvarchar kepada numeric. Error yang sama juga berlaku apabila Tedi cuba gunakan isExists. Penyelesaian Setelah hantuk kepala beberapa kali akhirnya Tedi mendapati ada column dalam model utama yang asalnya ialah numeric telah ditukar kepada nvarchar dalam pangkalan data. Log 2018-04-17 17:36:23,100 [http-nio-8888-exec-11] ERROR org.hibernate.engine.jdbc.spi.SqlExceptionHelper - Error converting data type nvarchar to numeric. org.springframework.orm.jpa.JpaSystemException: org.hibernate.exception.SQLGrammarException: could not execute query; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query      at org.springframework.orm.jpa.EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(EntityManagerFactoryUtils.java:418)      at org.springframewor...

Popular