Home

4. org.springframework.data.repository.query.QueryCreationException: Could not create query for public abstract java.util.List com.roman.demo.ProgrammerRepo.ProgrammerRepo.findN(java.lang.String)

 Solution : 

Add below query annotation 

@Query(value="SELECT * FROM programmer WHERE name = ?1", nativeQuery = true)

instead of

@Query("SELECT * FROM programmer WHERE name = ?1")

3. Non supported character set (add orai18n.jar in your classpath): AR8MSWIN1256 (MAVEN repository issue, specially occur at use hibernate default method)

 Solution:

Keep your earlier jdbc dependency and add one more dependency, which I have mentioned below -


             <dependency>

<groupId>com.oracle.ojdbc</groupId>

<artifactId>orai18n</artifactId>

<version>19.3.0.0</version>

</dependency>

2. If Java class does not raise syntax error or at runtime controller class not found. Like - The requested resource [/DemoApplication/add] is not available) raise at runtime.

 

Solution:

Your java(Controller) class is not available in the java source folder. Check, is your java(Controller) class is

inside this path src/main/resources then remove it And create a java source folder

like- main.java. And create Controller class inside that java source folder with package




1. During JDK setup in eclipse. If JDK does not support that means a JDK version related error.


Solution:


Add bellows two lines before -vmargs Line of eclipse.ini(C:\Users\roman\Desktop\eclipse\eclipse.ini) file


 -vm

C:\Java\JDK\1.8\bin\javaw.exe ( Use your java installation path of javaw.exe)




java.sql.SQLException: Non supported SQL92 token at position: 377:


Solution:

The syntax is not correct for executing a database query, function, procedure, or package. Make corrections to your query.

Like -

 CallableStatement call = con.prepareCall("{call docnumber_generation(?,?,?,?,?,?,?,?)}"); 

// Here inside string 'call' is important to call the procedure

4. org.springframework.data.repository.query.QueryCreationException: Could not create query for public abstract java.util.List com.roman.demo.ProgrammerRepo.ProgrammerRepo.findN(java.lang.String)

 Solution :  Add below query annotation  @Query(value="SELECT * FROM programmer WHERE name = ?1", nativeQuery = true ) instead of ...