I know that the `orphanRemoval` attribute is present in `hibernate-jpa-2.1-api-1.0.0.Final.jar` and this is the library being used in my project.

I added the Maven dependency:

> 
> 
> ```
> <dependency>
>     <groupId>org.hibernate</groupId>
>     <artifactId>hibernate-core</artifactId>
>     <version>4.3.0.Final</version>
> </dependency>
> 
> ```
> 
> 

And I'm still getting the error: `The attribute orphanRemoval is undefined for the annotation type OneToMany` in the line:

```
@OneToMany(fetch = FetchType.LAZY, mappedBy = "id.store", cascade = {
        CascadeType.PERSIST, CascadeType.MERGE }, orphanRemoval=true)

```

What is the problem here, and what can I do to troubleshoot this problem?

**EDIT:** These are my dependencies:

> 
> 
> ```
> <dependencies>
>     <dependency>
>         <groupId>com.sun.jersey</groupId>
>         <artifactId>jersey-server</artifactId>
>         <version>${jersey-version}</version>
>     </dependency>
>     <dependency>
>         <groupId>com.sun.jersey</groupId>
>         <artifactId>jersey-json</artifactId>
>         <version>${jersey-version}</version>
>     </dependency>
>     <dependency>
>         <groupId>junit</groupId>
>         <artifactId>junit</artifactId>
>         <version>4.8.2</version>
>         <scope>test</scope>
>     </dependency>
>     <dependency>
>         <groupId>com.sun.jersey</groupId>
>         <artifactId>jersey-client</artifactId>
>         <version>${jersey-version}</version>
>         <scope>test</scope>
>     </dependency>
>     <dependency>
>         <groupId>org.glassfish.distributions</groupId>
>         <artifactId>web-all</artifactId>
>         <version>10.0-build-20080430</version>
>         <scope>test</scope>
>     </dependency>
>     <dependency>
>         <groupId>org.glassfish.embedded</groupId>
>         <artifactId>gf-embedded-api</artifactId>
>         <version>1.0-alpha-4</version>
>         <scope>test</scope>
>     </dependency>
>     <dependency>
>         <groupId>javax.servlet</groupId>
>         <artifactId>servlet-api</artifactId>
>         <version>2.5</version>
>         <scope>provided</scope>
>     </dependency>
>     <dependency>
>        <groupId>org.hibernate</groupId>
>        <artifactId>hibernate-core</artifactId>
>        <version>4.3.0.Final</version>
>     </dependency>
> </dependencies>
> 
> ```
> 
>