views:

36

answers:

2

I'm in the process of moving a Java/Spring MVC app to Grails. I was able to get a couple of pages along with Spring Security working. However, when I added cxf-bundle-minimal as a dependency I started to get the errors below.

    ::::::::::::::::::::::::::::::::::::::::::::::

    ::          UNRESOLVED DEPENDENCIES         ::

    ::::::::::::::::::::::::::::::::::::::::::::::

    :: javax.ejb#ejb;3.0: not found             ::

    ::::::::::::::::::::::::::::::::::::::::::::::

Exception starting filter springSecurityFilterChain org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'springSecurityFilterChain' is defined

Now, even if I remove the dependency the error continues. Anyone know what the cause of the problem is and how to resolve it? My dependency list follows.

    dependencies {

    runtime 'mysql:mysql-connector-java:5.1.12'

    compile('log4j:log4j:1.2.16',
            'org.apache.cxf:cxf-bundle-minimal:2.2.9',
            'org.springframework:spring-beans:3.0.2.RELEASE',
            'org.springframework:spring-context:3.0.2.RELEASE',
            'org.springframework:spring-core:3.0.2.RELEASE',
            'org.springframework:spring-jdbc:3.0.2.RELEASE',
            'org.springframework.security:spring-security-core:3.0.2.RELEASE',
            'org.springframework.security:spring-security-config:3.0.2.RELEASE',
            'org.springframework.security:spring-security-web:3.0.2.RELEASE')
}
A: 

This isn't what you want to hear, I'm sure, but nearly every time I've strayed from the default Grails configuration (using Maven or the native build), I've found myself beating my head against these types of configuration problems. I don't have a magical solution for you, but I'd first run a dependency report to see what the graph looks like (http://grails.org/doc/1.3.x/). After that it becomes detective work and more than a little trial-and-error. Anyway, start with the dependency report and see what it shows. Good luck.

ecodan
A: 

Chances are you need to add a new maven repo dependency into your BuildConfig.groovy file. Find (or create) a repo that has the jar files that are missing, and add it in. By default the jboss maven repo is commented out, but it might have what you're looking for as a starting place.

Ted Naleid