Quantcast
Channel: JetBrains Developer Community : Thread List - IntelliJ IDEA Users
Viewing all articles
Browse latest Browse all 5661

Spring integration with IDEA 12 Ultimate and TeamCity plugin development issue

$
0
0

Hi Guys

I have a problem with Spring integration developing a TeamCity plugin.

 

I'm using IntelliJ 12 Ultimate (build 123.139) and developing TeamCity plugin. I'm using Spring librabry that comes packed with TeamCity 7.1.3. (the one in TeamCity\webapps\ROOT\WEB-INF\lib). The librabry spring.jar is set as my dependency (in Project Structure -> Modules -> Dependencies) along with spring-webmvc.jar. When I'm trying to build the project I get this error:

 

java: C:\Dev\Projects\blahblah\src\main\java\foo\bar\FooBarController.java:13: cannot access org.springframework.beans.factory.Aware

class file for org.springframework.beans.factory.Aware not found

 

The class org.springframework.beans.factory.Aware appears since Spring 3.x. The spring.jar that is bundled in TeamCity is old Spring 2.5.x and the only thing it has is BeanFactoryAware.

 

Something is not right and I cannot put a finger on it.

My FooBarController.java looks like this:

 

package foo.bar;

 

import jetbrains.buildServer.controllers.BaseController;

import jetbrains.buildServer.web.openapi.WebControllerManager;

import org.jetbrains.annotations.NotNull;

import org.jetbrains.annotations.Nullable;

import org.springframework.web.servlet.ModelAndView;

 

import javax.servlet.http.HttpServletRequest;

import javax.servlet.http.HttpServletResponse;

import java.nio.charset.Charset;

 

public class FooBarController extends BaseController {

 

    public FooBarController(WebControllerManager webControllerManager) {

        logger.info("Registering new controller at URL");

        webControllerManager.registerController(SYNC_CONTROLLER, this);

    }

 

    @Nullable

    protected ModelAndView doHandle(@NotNull HttpServletRequest httpServletRequest, @NotNull HttpServletResponse httpServletResponse) throws Exception {

        httpServletResponse.setStatus(HttpServletResponse.SC_OK);

        httpServletResponse.setContentType("text/plain");

        httpServletResponse.setCharacterEncoding("UTF-8");

        httpServletResponse.getOutputStream().write("OK".getBytes(Charset.forName("UTF-8")));

        return null;

    }

}

Any help would be appriciated.

 

Greg


Viewing all articles
Browse latest Browse all 5661

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>