You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nifi.apache.org by Rishab Prasad <ri...@gmail.com> on 2018/04/17 09:49:07 UTC

The import org.apache.nifi.dbcp.DBCPService cannot be resolved

Hi,

I am trying to create a custom processor equivalent to that of
ListDatabaseTable. I copied and pasted the source code of ListDatabaseTableand
used the same for my custom processor. But I am getting the following
error: -

[image: enter image description here] <https://i.stack.imgur.com/370N8.png>

The error says *The import org.apache.nifi.dbcp.DBCPService cannot be
resolved*. I tried downloading this jar file
<https://mvnrepository.com/artifact/org.apache.nifi/nifi-dbcp-service/1.5.0>
 for org.apache.nifi.dbcp and added it as an external jar in my build path.
The error still can't be resolved. How can i resolve this error?
‌

Re: The import org.apache.nifi.dbcp.DBCPService cannot be resolved

Posted by Sivaprasanna <si...@gmail.com>.
*not the implementation bundle itself

On Tue, Apr 17, 2018 at 6:33 PM, Sivaprasanna <si...@gmail.com>
wrote:

> Yep. That's correct. You have to use the api and the implementation bundle
> itself. Add the following to your processor's POM:
>
> <dependency>
>     <groupId>org.apache.nifi</groupId>
>     <artifactId>nifi-dbcp-service-api</artifactId>
>     <version>1.6.0</version>
> </dependency>
>
> Change the version if you're trying to deploy your custom processor bundle
> on a different NiFi version.
>
> -
> Sivaprasanna
>
> On Tue, Apr 17, 2018 at 5:31 PM, Mike Thomsen <mi...@gmail.com>
> wrote:
>
>> Did you declare a dependency on nifi-dbcp-service-api? If not, you have to
>> do that and set the scope to "provided.
>>
>> On Tue, Apr 17, 2018 at 7:05 AM Rishab Prasad <ri...@gmail.com>
>> wrote:
>>
>> > Hi,
>> >
>> > I am trying to create a custom processor equivalent to that of
>> > ListDatabaseTable. I copied and pasted the source code of
>> > ListDatabaseTableand
>> > used the same for my custom processor. But I am getting the following
>> > error: -
>> >
>> > [image: enter image description here] <https://i.stack.imgur.com/370
>> N8.png
>> > >
>> >
>> > The error says *The import org.apache.nifi.dbcp.DBCPService cannot be
>> > resolved*. I tried downloading this jar file
>> > <
>> > https://mvnrepository.com/artifact/org.apache.nifi/nifi-dbcp
>> -service/1.5.0
>> > >
>> >  for org.apache.nifi.dbcp and added it as an external jar in my build
>> path.
>> > The error still can't be resolved. How can i resolve this error?
>> > ‌
>> >
>>
>
>

Re: The import org.apache.nifi.dbcp.DBCPService cannot be resolved

Posted by Sivaprasanna <si...@gmail.com>.
Yep. That's correct. You have to use the api and the implementation bundle
itself. Add the following to your processor's POM:

<dependency>
    <groupId>org.apache.nifi</groupId>
    <artifactId>nifi-dbcp-service-api</artifactId>
    <version>1.6.0</version>
</dependency>

Change the version if you're trying to deploy your custom processor bundle
on a different NiFi version.

-
Sivaprasanna

On Tue, Apr 17, 2018 at 5:31 PM, Mike Thomsen <mi...@gmail.com>
wrote:

> Did you declare a dependency on nifi-dbcp-service-api? If not, you have to
> do that and set the scope to "provided.
>
> On Tue, Apr 17, 2018 at 7:05 AM Rishab Prasad <ri...@gmail.com>
> wrote:
>
> > Hi,
> >
> > I am trying to create a custom processor equivalent to that of
> > ListDatabaseTable. I copied and pasted the source code of
> > ListDatabaseTableand
> > used the same for my custom processor. But I am getting the following
> > error: -
> >
> > [image: enter image description here] <https://i.stack.imgur.com/
> 370N8.png
> > >
> >
> > The error says *The import org.apache.nifi.dbcp.DBCPService cannot be
> > resolved*. I tried downloading this jar file
> > <
> > https://mvnrepository.com/artifact/org.apache.nifi/nifi-
> dbcp-service/1.5.0
> > >
> >  for org.apache.nifi.dbcp and added it as an external jar in my build
> path.
> > The error still can't be resolved. How can i resolve this error?
> > ‌
> >
>

Re: The import org.apache.nifi.dbcp.DBCPService cannot be resolved

Posted by Mike Thomsen <mi...@gmail.com>.
Did you declare a dependency on nifi-dbcp-service-api? If not, you have to
do that and set the scope to "provided.

On Tue, Apr 17, 2018 at 7:05 AM Rishab Prasad <ri...@gmail.com>
wrote:

> Hi,
>
> I am trying to create a custom processor equivalent to that of
> ListDatabaseTable. I copied and pasted the source code of
> ListDatabaseTableand
> used the same for my custom processor. But I am getting the following
> error: -
>
> [image: enter image description here] <https://i.stack.imgur.com/370N8.png
> >
>
> The error says *The import org.apache.nifi.dbcp.DBCPService cannot be
> resolved*. I tried downloading this jar file
> <
> https://mvnrepository.com/artifact/org.apache.nifi/nifi-dbcp-service/1.5.0
> >
>  for org.apache.nifi.dbcp and added it as an external jar in my build path.
> The error still can't be resolved. How can i resolve this error?
> ‌
>