liveoak-io / liveoak

Eclipse Public License 1.0
89 stars 49 forks source link

Upgrade to keycloak 1.0-rc-2 #309

Closed mposolda closed 10 years ago

mstruk commented 10 years ago

After this upgrade the dist/target/liveoak/bin/standalone.sh will not start up properly any more.

Caused by: java.lang.NoSuchMethodError: io.liveoak.keycloak.server.KeycloakServerApplication.getSessionFactory()Lorg/keycloak/models/KeycloakSessionFactory;
at io.liveoak.keycloak.server.KeycloakServerApplication.setupDefaultRealm(KeycloakServerApplication.java:32)
at org.keycloak.services.resources.KeycloakApplication.<init>(KeycloakApplication.java:87)
at io.liveoak.keycloak.server.KeycloakServerApplication.<init>(KeycloakServerApplication.java:25)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.8.0]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) [rt.jar:1.8.0]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.8.0]
at java.lang.reflect.Constructor.newInstance(Constructor.java:408) [rt.jar:1.8.0]
at org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInjectorImpl.java:148)
... 15 more
mposolda commented 10 years ago

KeycloakApplication.getSessionFactory() is new method in 1.0-rc-2, which didn't exist in 1.0-beta-2. I guess you have still old keycloak jars in dist/target/liveoak/standalone/deployments/auth-server.war/WEB-INF/lib, that's why you can't see new method.

I think you need to fully rebuild whole project and dist to fix this issue.

mstruk commented 10 years ago

That's after full clean rebuild:

mvn clean install -DskipTests

And to make sure I also did:

rm -rf dist/target
kenfinnigan commented 10 years ago

It worked fine for me.

Aslak had same problem, but clean build fixed it.

Sent from my iPhone

On Sep 3, 2014, at 17:44, Marko Strukelj notifications@github.com wrote:

That's after full clean rebuild:

mvn clean install -DskipTests And to make sure I also did:

rm -rf dist/target — Reply to this email directly or view it on GitHub.

mstruk commented 10 years ago

Ok, I got it to work. Looks like deleting dist/target plays no role, and 'mvn clean' failed somewhere halfway, and then skipped cleaning the rest of the modules or something ...

mvn clean

did it.