spring-security-saml2-core:1.0.3.BUILD-SNAPSHOT is not found in the repo https://repo.spring.io/libs-snapshot - spring

I am trying to upgrade to Spring 5. I want to upgrade to spring Security 5 too.
Spring security 5 upgrade causes issue with Spring Saml2.
This issue of class not found error is solved in the PR which is merged.
The snapshot, 1.0.3.BUILD-SNAPSHOT is not there in the specified repo.
Warning:project ':api': Web Facets/Artifacts will not be configured properly
Details: org.gradle.api.artifacts.ResolveException: Could not resolve all dependencies for configuration ':api:runtimeClasspath'.
Caused by: org.gradle.internal.resolve.ModuleVersionNotFoundException:
Could not find org.springframework.security.extensions:spring-security-saml2-core:1.0.3.BUILD-SNAPSHOT.
Required by:
project :api
project :api > project :common
project :api > project :core
Help me with finding the snapshot in the spring repo.

This issue is solved in the December release 1.0.3.RELEASE of Spring security Saml.

Related

SpringBoot 1.5.1 uses snapshot sub dependencies?

I just started using SpringBoot 1.5.1. When I select the spring-cloud related dependencies from the Spring Initilzr and make a build for my application, I end up with SNAPSHOT dependencies for the following, among others
spring-cloud-aws-dependencies
spring-cloud-bus-dependencies
spring-cloud-commons
spring-cloud-config-server
spring-cloud-consul
Is this correct? My companies MAVEN repo does not allow SNAPSHOT files to be uploaded.
For some reason Initilzr prefers the Dalston snapshot release of spring-cloud to the current stable Camdem.SR5 release.
Just update your POM file and replace Dalston.BUILD-SNAPSHOT with Camden.SR5 for the spring-cloud-dependencies dependency management.

EnvironmentCapable Not available Spring 3.2.3

Am trying to integrate Spring 3.2.3 with JSF 2.2.1 and getting an error like Caused by: java.lang.NoClassDefFoundError: org/springframework/core/env/EnvironmentCapable The class is available in my classpath (spring-core-3.2.3.RELEASE.jar) but not sure why this error occurs.
It worked fine when I removed the project from the server, clean/build and restarted again. Thanks.

Jboss missing log4j jar, when deploying maven app that has dependency?

I'm in the process of maven-ising and old ant app that we have. I have added a dependency on log4j-1.2.8 in my pom (as it is required for compilation). However, when I try and deploy on jboss (stuck with version 4.0.2) I get the following:
org.jboss.deployment.DeploymentException: Failed to find module file: log4j-1.2.8.jar
at org.jboss.deployment.EARDeployer.init(EARDeployer.java:244)
at org.jboss.deployment.MainDeployer.init(MainDeployer.java:828)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:765)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:121)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy8.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:325)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:483)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:215)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:194)
I'm not sure who setup jboss and I don't have any control over its configuration. I can however see it has the following log4j jars in various locations:
/opt/jboss-4.0.2]$ find -L . -name '*log4j*.jar'
./client/log4j.jar
./server/minimal/lib/log4j.jar
./server/all/lib/log4j.jar
./server/default/lib/log4j-1.2.16.jar
./lib/log4j-boot.jar
Does anyone have any idea what is setup wrong? I know the old ant app used to work on the same jboss server. I have tried using various versions of log4j in my pom (i.e. those found in the jboss directory), and even tried adding a dependency on jboss-logging - but i'm just guessing here.
Cheers!
Consider adding your log4j dependency as <scope>provided</scope>, as it is provided by your application server and so is not required in the artifact you deploy.

Tomcat Jersey SPI Error

I have a Jersey (1.4) app deployed on Tomcat 5.5, when Tomcat starts up I can see its loading all the resources and providers. But as soon as I access any of the web services I get this strange error
java.lang.NoClassDefFoundError: com/sun/jersey/spi/inject/Errors$Closure
I spent good long time finding out what's going on but had no luck.
I converted maven project into eclipse project using mvn eclipse:eclipse -Dwtpversion=1.5.
Any ideas?
I got this error when I also had a nuxeo related dependancy in my maven pom.xml, which itself has a dependency on jersey libraries, but at an earlier version (1.1.5 to be specific).
I changed the pom to depend on the latest version of jersey-core, jersey-server and jersey-client dependencies and ran mvn eclipse:eclipse and the problem went away!
There must have been a class clash involved.

Grails 1.2.1 with Spring 3.0.0 dependency problem under Jetty

Just moved to Grails 1.2.1 (used 1.1.1 before). Changed application.properties, ran grails upgrade, fixed BuildConfig and Bootstrap - everything works just fine from grails console.
However, getting a problem when deploy packaged war under jetty 6.1.22:
1581 [main] ERROR org.springframework.web.context.ContextLoader - Context initialization failed org.springframework.beans.factory.access.BootstrapException: Error executing bootstraps; nested exception is java.lang.NoSuchMethodError: org.codehaus.groovy.grails.commons.spring.ReloadAwareAutowireCapableBeanFactory.setParameterNameDiscoverer(Lorg/springframework/core/ParameterNameDiscoverer;)V
My project is built with maven2. I researched the war dependencies and see that both spring 2.5.6 and 3.0.0.RELEASE are used there.
I then tried to suppress use of spring 2.5.6 and got a problem with Acegi plugin (using version 0.5.1):
2010-03-10 21:06:56.440:WARN::Nested in org.springframework.beans.factory.access.BootstrapException: Error executing bootstraps; nested exception is java.lang.NoSuchMethodError: org.springframework.web.context.ConfigurableWebApplicationContext.setId(Ljava/lang/String;)V
Any help would be greatly appreciated.
The problem is caused by the fact that in new version of Spring
ConfigurableWebApplicationContext is located in spring-web.jar, but the interface it inherits ConfigurableApplicationContext, which contains setId(String) method is in located in spring-context.jar.
If you have a library which has been compiled against older version of spring-context it will fail with NoMethodFound exception.
The solution is to locate and recompile that library against latest Spring version.
If you are using Spring version below 3.0 you could try to put full Spring bundle Jar instead of separate packages.

Resources