Help for deploying uaa.war on Websphere Liberty server

239 views
Skip to first unread message

Weiping Lu

unread,
Mar 5, 2015, 5:59:08 PM3/5/15
to vcap...@cloudfoundry.org
I simply replaced an old uaa.war (version 1.4.3) with the latest uaa.war (version 2.0.3) deployed on  Websphere Liberty server. When I tested it in browser with the url http://localhost:8080/uaa/

I got the following errors -attached at the end of this post. None of the source and configuration files in 1.4.3 uaa.war and 2.0.3 uaa.war have not been altered - but 1.4.3 uaa.war works fine.

Help would be greatly appreciated :-)

Thanks,

Weiping


=================================================================================
Error Page Exception
SRVE0260E: The server cannot use the error page specified for your application to handle the Original Exception printed below.

Original Exception:
Error Message: java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener registered?
Error Code: 500
Target Servlet: spring
Error Stack:
java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener registered?
     at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:252)
     at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:192)
     at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:85)
     at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:968)
     at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1054)
     at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:4526)
     at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost$2.handleRequest(DynamicVirtualHost.java:282)
     at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:955)
     at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost$2.run(DynamicVirtualHost.java:252)
     at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink$TaskWrapper.run(HttpDispatcherLink.java:676)
     at com.ibm.ws.threading.internal.Worker.executeWork(Worker.java:439)
     at com.ibm.ws.threading.internal.Worker.run(Worker.java:421)
     at java.lang.Thread.run(Thread.java:853)
    


Error Page Exception:
Error Message: javax.servlet.ServletException: SRVE0207E: Uncaught initialization exception created by servlet
Error Code: 0
Target Servlet:
Error Stack:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flyway' defined in class path resource [spring/data-source.xml]: Invocation of init method failed; nested exception is com.googlecode.flyway.core.api.FlywayException: Unable to determine URL for classpath location: org/cloudfoundry/identity/uaa/db/oracle (ClassLoader: com.ibm.ws.classloading.internal.ThreadContextClassLoader@4feb38a1) On WebSphere an empty file named flyway.location must be present on the classpath location for WebSphere to find it!
     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1554)
     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
     at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)
     at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
     at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)
     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
     at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:706)
     at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:762)
     at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
     at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:658)
     at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:624)
     at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:672)
     at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:543)
     at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:484)
     at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
     at javax.servlet.GenericServlet.init(GenericServlet.java:161)
     at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:324)
     at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:610)
     at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:461)
     at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:127)
     at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:73)
     at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:968)
     at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1054)
     at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:1377)
     at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:185)
     at com.ibm.ws.webcontainer.webapp.WebApp.sendError(WebApp.java:3988)
     at com.ibm.ws.webcontainer.webapp.WebApp.handleException(WebApp.java:4575)
     at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:4556)
     at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost$2.handleRequest(DynamicVirtualHost.java:282)
     at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:955)
     at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost$2.run(DynamicVirtualHost.java:252)
     at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink$TaskWrapper.run(HttpDispatcherLink.java:676)
     at com.ibm.ws.threading.internal.Worker.executeWork(Worker.java:439)
     at com.ibm.ws.threading.internal.Worker.run(Worker.java:421)
     at java.lang.Thread.run(Thread.java:853)
     Caused by: com.googlecode.flyway.core.api.FlywayException: Unable to determine URL for classpath location: org/cloudfoundry/identity/uaa/db/oracle (ClassLoader: com.ibm.ws.classloading.internal.ThreadContextClassLoader@4feb38a1) On WebSphere an empty file named flyway.location must be present on the classpath location for WebSphere to find it!
     at com.googlecode.flyway.core.util.scanner.classpath.ClassPathScanner.getLocationUrlsForPath(ClassPathScanner.java:169)
     at com.googlecode.flyway.core.util.scanner.classpath.ClassPathScanner.findResourceNames(ClassPathScanner.java:135)
     at com.googlecode.flyway.core.util.scanner.classpath.ClassPathScanner.scanForResources(ClassPathScanner.java:60)
     at com.googlecode.flyway.core.resolver.sql.SqlMigrationResolver.resolveMigrations(SqlMigrationResolver.java:98)
     at com.googlecode.flyway.core.resolver.CompositeMigrationResolver.collectMigrations(CompositeMigrationResolver.java:166)
     at com.googlecode.flyway.core.resolver.CompositeMigrationResolver.doFindAvailableMigrations(CompositeMigrationResolver.java:148)
     at com.googlecode.flyway.core.resolver.CompositeMigrationResolver.resolveMigrations(CompositeMigrationResolver.java:120)
     at com.googlecode.flyway.core.info.MigrationInfoServiceImpl.refresh(MigrationInfoServiceImpl.java:87)
     at com.googlecode.flyway.core.command.DbMigrate$1.doInTransaction(DbMigrate.java:141)
     at com.googlecode.flyway.core.command.DbMigrate$1.doInTransaction(DbMigrate.java:135)
     at com.googlecode.flyway.core.util.jdbc.TransactionTemplate.execute(TransactionTemplate.java:72)
     at com.googlecode.flyway.core.command.DbMigrate.migrate(DbMigrate.java:135)
     at com.googlecode.flyway.core.Flyway$1.execute(Flyway.java:872)
     at com.googlecode.flyway.core.Flyway$1.execute(Flyway.java:819)
     at com.googlecode.flyway.core.Flyway.execute(Flyway.java:1200)
     at com.googlecode.flyway.core.Flyway.migrate(Flyway.java:819)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:94)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
     at java.lang.reflect.Method.invoke(Method.java:619)
     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1682)
     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1621)
     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1550)
     ... 35 more
    






Filip Hanik

unread,
Mar 6, 2015, 9:44:02 AM3/6/15
to vcap...@cloudfoundry.org
The UAA no longer carries Oracle support. There are no migration scripts for Oracle. Since 1.4.3 we have moved to a runtime dynamic schema versioning using Flyway so that we can correctly track our database changes.
You can see these scripts in two forms, some are in Java for migrations and some are SQL

Java:

SQL:

You can read about flyway DB migrations here:

Currently Oracle is not a goal for the open source code in UAA. We would consider a pull request, if there was some way to test it as well.

Filip


--
You received this message because you are subscribed to the Google Groups "Cloud Foundry Developers" group.
To view this discussion on the web visit https://groups.google.com/a/cloudfoundry.org/d/msgid/vcap-dev/88355c81-a71f-4e8f-a23e-49630ca4e65b%40cloudfoundry.org.

To unsubscribe from this group and stop receiving emails from it, send an email to vcap-dev+u...@cloudfoundry.org.

Weiping Lu

unread,
Mar 6, 2015, 6:05:36 PM3/6/15
to vcap...@cloudfoundry.org
Hi Filip,

Thank you again for the help - I was able to add the customized migration for my database and work around the issue - but hit another exception. It failed at the loading the certificate given in the login.yml file.

I debugged into code before the failed line at (SamlLoginServerKeyManager.java:56), and found the certificate string and password were correctly passed from those in login.yml file. Any idea that it would throw a EncryptionException when loading the certificate - should I do anything with the jdk used in my server container?

Thanks,

Weiping


================================================================================
[2015-03-06 11:50:33.120] uaa/uaa - ???? [Default Executor-thread-3] .... ERROR --- SamlLoginServerKeyManager: Could not load certificate
org.bouncycastle.openssl.EncryptionException: exception using cipher - please check password and data.
    at org.bouncycastle.openssl.PEMUtilities.crypt(Unknown Source)
    at org.bouncycastle.openssl.PEMUtilities.crypt(Unknown Source)
    at org.bouncycastle.openssl.PEMReader$KeyPairParser.readKeyPair(Unknown Source)
    at org.bouncycastle.openssl.PEMReader$RSAKeyPairParser.parseObject(Unknown Source)
    at org.bouncycastle.openssl.PEMReader.readObject(Unknown Source)
    at org.cloudfoundry.identity.uaa.login.SamlLoginServerKeyManager.<init>(SamlLoginServerKeyManager.java:56)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:85)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:57)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:541)
    at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:148)
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:125)
    at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:270)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1115)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(
.....
Reply all
Reply to author
Forward
0 new messages