DCN_NOTIFY_ROWIDS cannot be resolved or is not a field - java

I am trying to use OracleConnection.DCN_NOTIFY_ROWIDS but it's showing an error as below:
DCN_NOTIFY_ROWIDS cannot be resolved or is not a field
I am using ojdbc6.jar & JDK1.7 & using below import statements:
import oracle.jdbc.OracleConnection;
import oracle.jdbc.OracleDriver;
Eclipse is being used as IDE.
what could be the reason?

Issue is found. There was another jar (class12.jar) for similar purpose (but didn't have DCN_NOTIFY_ROWIDS) which led to conflict. Once that jar was removed, it worked fine.

Related

Encountering a Problem in IntelliJ which only accepts Wildcard Imports of java packages instead of specific Classes from java packages

Information about my Project:
Gradle Version 6.8.3
Lombok Version 1.18.18
IDE Version 2020.3
My JAVA_HOME Path in the Windows environment variables is set to the newest Java JDK (15.0.2). The Project Language in the Project Structure Path is also set to Java 15.
I am currently using IntelliJ version 2020.3 and since a few days I have the following Problem.
When I want to import specific Classes or Interfaces from the java package e.g java.time.LocalDate. IntelliJ marks this import as an unused import Unused Import java.time.LocalDate
After I replace the LocalDate with an Wildcard * the Message is gone java.time.*
In the next Step I did the same with another Class I want to import. This time I used the java.util.Set import. The same message occurred after I wrote Set<TestClass> foo;. Cannot resolve Symbol 'Set'
When I replaced the java.util.Set with java.util.* the Message disappeared. Wildcard import for java.util
I got this Problem everytime I want to import a specific Class from the Java JDK libraries. When I import libraries from the Gradle Dependencies everythings works fine. So this Problem only occurs on Java libraries.
I Already tried the following Steps to solve the Problem:
import Project with IntelliJ VCS
Checked if there are any incorrect settings in Project structure
File -> Invalidate Caches/Restart
Project Structure -> Project SDK and added the same Java JDK again
Ctrl + Shift + A and Restored default Settings
Code Sample:
import java.time.LocalDate;
import java.util.*;
import lombok.Getter;
import lombok.Builder;
#Builder
#Getter
public class TestClass {
private LocalDate testDate;
private Set<TestClass> foo;
}
After Installing Eclipse and getting the same Error Reports like in IntelliJ. I reinstalled jdk 15.0.2. I reopened the project again in IntelliJ and everything worked fine. IntelliJ recommend imports when I used java.util classes. So I will close this question now. Thank you guys very much for trying to help me with this problem. In the end it was something much easier which fixed the problem.

com.google.api.client.extensions.java6 cannot be resolved

I'm trying to follow the tutorials for using google calendar api in here
https://developers.google.com/google-apps/calendar/quickstart/java
I tried it in eclipse but I have errors in
import com.google.api.client.extensions.java6.auth.oauth2.AuthorizationCodeInstalledApp;
import com.google.api.client.extensions.jetty.auth.oauth2.LocalServerReceiver;
The import com.google.api.client.extensions.java6 cannot be resolved
where it says they cannot be resolved and a
The declared package "" does not match the expected package
"main.java"
in the first line
I think the problem lies in the structure of my files but I have no idea how to structure it , I installed gradle plugin as pre-requisite of using google calendar api stated in the link but I'm not sure how to add in build.gradle so I just add a new file and name it build.gradle
I solved it by changing JDK compliance to 1.7 in project properties > java compiler

Fitnesse importing util.ListUtility.list; is giving error

I am trying to
import static util.ListUtility.list; but it is giving error:
The import util.ListUtility cannot be resolved
I have fitnesse-standalone.jar in my path. I explored util package in jar. It seems that it is not any more. I downloaded latest version of fitnesse.Is it deprecated and not supported any more?
I also tried with fitnesse.util.ListUtility but no avail.
Thanks a lot.
It is resolved, as util.ListUtility.list; is not in fitnesse jar so I created the class in my source with same utility.

what does it mean when there is import error?

I am using a code sample that suppose to be working, but I keep get an error with those 3 import statement.
import com.amazonaws.services.s3.transfer.internal.MultipartUploadCallable;
import com.amazonaws.services.s3.transfer.internal.PutObjectCallable;
import com.amazonaws.services.s3.transfer.internal.TransferStateUpdatingCallable;
the error message says : The import com.amazonaws.services.s3.transfer.internal.MultipartUploadCallable cannot be resolved
why is that happening and how can I solve it ?
Please add jars that contain this classes. This will always solve your problem.
This means that implementations of referenced classes cannot be found in classpath. Since you are using amazonaws you should add appropriate library to your project's dependencies.

GWT import com.google.gwt.user.cellview.client.CellBrowser Problem

I am using GWT 2.1 but I am getting an error when importing this
import com.google.gwt.user.cellview.client.CellBrowser;
it is giving the error
The import com.google.gwt.user.cellview.client.CellBrowser conflicts with a type defined in the same file
I have tried in an emmpty project but getting the same error.
Does somebody know about this??
as a quick fix, try referring to com.google.gwt.user.cellview.client.CellBrowser using the fully qualified name rather than importing it.

Categories

Resources