There was an ordinary project, made Maven a project from it. Everything compiles, everything works. But Intellij does not see packets. On

import oracle.ucp.jdbc.PoolDataSource; import oracle.ucp.jdbc.PoolDataSourceFactory; 

allocates red ucp and writes

Cannot resolve symbol 'ucp'

And accordingly when announcing

 PoolDataSource poolConnections 

allocates in red PoolDataSource and writes

Cannot resolve symbol 'PoolDataSource'

Packages added depending

 <dependency> <groupId>com.oracle.jdbc</groupId> <artifactId>ojdbc8</artifactId> <version>12.2.0.1</version> </dependency> <dependency> <groupId>com.oracle.jdbc</groupId> <artifactId>ucp</artifactId> <version>12.2.0.1</version> </dependency> 

login and password for the maven-repository orakla specified. I see the jar myself in the local repository and once again everything compiles in the same Intellij and runs

Invalidate Caches / Restart did - did not help

  • You need to import the project. Usually, Idea itself offers the import project window, but sometimes you need to explicitly go to View -> Tool Windows -> maven projects and click on the spin arrow - Uraty
  • @Uraty did not help. The same can be done from the context menu for the pom file - Anton Shchyrov

1 answer 1

Addiction

 <dependency> <groupId>com.oracle.jdbc</groupId> <artifactId>ojdbc8</artifactId> <version>12.2.0.1</version> </dependency> 

no need to add to your project. She pulls herself up with the ucp package. Removed it from the pom file and left only

 <dependency> <groupId>com.oracle.jdbc</groupId> <artifactId>ucp</artifactId> <version>12.2.0.1</version> </dependency> 

Recompiled project and problem disappeared