Dependency issue in SDK 3.0

cancel
Showing results for 
Search instead for 
Did you mean: 
hiten_rastogi1
Established Member

Dependency issue in SDK 3.0

Jump to solution

Hi,

After the release of SDK 3.0 I am trying to port my code to the new SDK in which I am facing dependency issue. While running the code I am getting the following exception. The full stacktrace can be found here .

cannot access org.springframework.context.ApplicationContextAware  class file for org.springframework.context.ApplicationContextAware not found

Though I managed to resolve the issue by commenting out the <scope>test</scope> from the  spring-context dependency or by stating the spring-context dependency in the platform-jar project like below

<dependencies>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context</artifactId>
    </dependency>
</dependencies>

but I still want to know why I am getting the exception.

Thanks

Hiten Rastogi

1 Solution

Accepted Solutions
krutik_jayswal
Senior Member II

Re: Dependency issue in SDK 3.0

Jump to solution

Basically its says that the dependencies are available at compile time , but while we are running the project , maven is unable to find it.The reason behind this is repo POM file have the scope as test,  for spring-context dependency, which mean dependencies will be available only in test scope.

Changing the scope to provided will resolve the issue.

I think its a bug in SDK 3.0.

View solution in original post

1 Reply
krutik_jayswal
Senior Member II

Re: Dependency issue in SDK 3.0

Jump to solution

Basically its says that the dependencies are available at compile time , but while we are running the project , maven is unable to find it.The reason behind this is repo POM file have the scope as test,  for spring-context dependency, which mean dependencies will be available only in test scope.

Changing the scope to provided will resolve the issue.

I think its a bug in SDK 3.0.