Libs missing when pushing a java app from Eclipse to Bluemix

342 views Asked by At

When pushing the application talent-manager (https://github.com/jsloyer/talent-manager/) to Bluemix using cf push, the app works fine.

However, when deploying the same from Eclipse using Bluemix plugin, most of the libs are missing on Bluemix as I cannot see them in app\wlp\usr\servers\defaultServer\apps\myapp.war\WEB-INF. Yet, the appname.war being push from Eclipse does contain the lib.

I cannot figure out what's wrong. Any idea?

Below is the message.log if that can help.

********************************************************************************
product = WebSphere Application Server 2015.5.0.0 (wlp-1.0.9.20150503-0151)
wlp.install.dir = /home/vcap/app/.liberty/
server.config.dir = /home/vcap/app/wlp/usr/servers/defaultServer/
java.home = /home/vcap/app/.java/jre
java.version = 1.7.0
java.runtime = Java(TM) SE Runtime Environment (pxa6470_27sr3ifx-20150501_01 (SR3+IV72914 SR3+IV72914))
os = Linux (3.13.0-39-generic; amd64) (en_US)
process = 86@18nihrbmd6q
********************************************************************************
[6/17/15 12:21:08:224 UTC] 00000001 com.ibm.ws.kernel.launch.internal.FrameworkManager           I CWWKE0002I: The kernel started after 9.141 seconds
[6/17/15 12:21:08:325 UTC] 00000023 com.ibm.ws.kernel.feature.internal.FeatureManager            I CWWKF0007I: Feature update started.
[6/17/15 12:21:11:605 UTC] 00000029 com.ibm.ws.tcpchannel.internal.TCPChannel                    I CWWKO0219I: TCP Channel httpEndpoint-200 has been started and is now listening for requests on host *  (IPv6) port 61643.
[6/17/15 12:21:11:620 UTC] 00000025 com.ibm.ws.tcpchannel.internal.TCPChannel                    I CWWKO0219I: TCP Channel defaultHttpEndpoint has been started and is now listening for requests on host localhost  (IPv4: 127.0.0.1) port 9080.
[6/17/15 12:21:12:926 UTC] 00000019 .management.client.service.internal.ManagedBeanContainerImpl I CWSCX0122I: Register management Bean provider: com.ibm.ws.cloudoe.management.client.provider.dump.JavaDumpBeanProvider@1fde3b7a.
[6/17/15 12:21:12:951 UTC] 00000019 .management.client.service.internal.ManagedBeanContainerImpl I CWSCX0122I: Register management Bean provider: com.ibm.ws.cloudoe.management.client.provider.logging.LibertyLoggingBeanProvider@ba278d55.
[6/17/15 12:21:13:574 UTC] 0000002a com.ibm.ws.webcontainer.osgi.webapp.WebGroup                 I SRVE0169I: Loading Web Module: com.ibm.ws.cloudoe.management.client.liberty.connector.
[6/17/15 12:21:13:579 UTC] 0000002a com.ibm.ws.webcontainer                                      I SRVE0250I: Web Module com.ibm.ws.cloudoe.management.client.liberty.connector has been bound to default_host.
[6/17/15 12:21:13:581 UTC] 0000002a com.ibm.ws.http.internal.VirtualHostImpl                     A CWWKT0016I: Web application available (default_host): http://localhost:9080/IBMMGMTRest/
[6/17/15 12:21:13:794 UTC] 00000029 com.ibm.ws.app.manager.AppMessageHelper                      I CWWKZ0018I: Starting application myapp.
[6/17/15 12:21:14:551 UTC] 00000029 com.ibm.ws.webcontainer.osgi.webapp.WebGroup                 I SRVE0169I: Loading Web Module: Hello Java.
[6/17/15 12:21:14:551 UTC] 00000029 com.ibm.ws.webcontainer                                      I SRVE0250I: Web Module Hello Java has been bound to default_host.
[6/17/15 12:21:14:552 UTC] 00000029 com.ibm.ws.http.internal.VirtualHostImpl                     A CWWKT0016I: Web application available (default_host): http://localhost:9080/
[6/17/15 12:21:14:555 UTC] 00000029 com.ibm.ws.app.manager.AppMessageHelper                      A CWWKZ0001I: Application myapp started in 0.761 seconds.
[6/17/15 12:21:14:613 UTC] 00000023 com.ibm.ws.kernel.feature.internal.FeatureManager            A CWWKF0012I: The server installed the following features: [json-1.0, jpa-2.0, couchdb-1.0, beanValidation-1.0, icap:managementConnector-1.0, jdbc-4.0, managedBeans-1.0, cloudAutowiring-1.0, jsf-2.0, jsp-2.2, servlet-3.0, jaxrs-1.1, jndi-1.0, appState-1.0, ejbLite-3.1, cdi-1.0].
[6/17/15 12:21:14:614 UTC] 00000023 com.ibm.ws.kernel.feature.internal.FeatureManager            I CWWKF0008I: Feature update completed in 6.395 seconds.
[6/17/15 12:21:14:615 UTC] 00000023 com.ibm.ws.kernel.feature.internal.FeatureManager            A CWWKF0011I: The server defaultServer is ready to run a smarter planet.
[6/17/15 12:21:17:548 UTC] 0000002b com.ibm.ws.session.WASSessionCore                            I SESN8501I: The session manager did not find a persistent storage location; HttpSession objects will be stored in the local application server's memory.
[6/17/15 12:21:17:552 UTC] 0000002b com.ibm.ws.session.WASSessionCore                            I SESN0176I: A new session context will be created for application key default_host/
[6/17/15 12:21:17:581 UTC] 0000002b com.ibm.ws.util                                              I SESN0172I: The session manager is using the Java default SecureRandom implementation for session ID generation.
[6/17/15 12:21:17:666 UTC] 0000002b com.ibm.ws.jsp                                               I JSPG8502I: The value of the JSP attribute jdkSourceLevel is "15".
[6/17/15 12:21:17:837 UTC] 0000002b SystemOut                                                    O Creating CouchDB instance...
[6/17/15 12:21:17:839 UTC] 0000002b SystemOut                                                    O 285c4164-660e-48af-8187-5bb7b11e5a1e-bluemix
[6/17/15 12:21:20:224 UTC] 0000002b org.apache.wink.server.internal.servlet.RestServlet          I The system is using the /WEB-INF/resources JAX-RS application class named in the applicationConfigLocation init-param initialization parameter.
[6/17/15 12:21:20:268 UTC] 0000002b pache.wink.common.internal.application.ApplicationFileLoader E The runtime environment failed to instantiate the com.ibm.personafusion.controller.SearchController class. Ensure that the class is not abstract, has a valid constructor, has the right visibility, and is not an inner member class.
java.lang.NoClassDefFoundError: com.ibm.personafusion.controller.SearchController (initialization failure)
    at java.lang.J9VMInternals.initializationAlreadyFailed(Unknown Source)
    at java.lang.Class.forNameImpl(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at org.apache.wink.common.internal.utils.ClassUtils$1.run(ClassUtils.java:73)
    at java.security.AccessController.doPrivileged(Unknown Source)
    at org.apache.wink.common.internal.utils.ClassUtils.loadClass(ClassUtils.java:66)
    at org.apache.wink.common.internal.application.ApplicationFileLoader.loadClasses(ApplicationFileLoader.java:131)
    at org.apache.wink.common.internal.application.ApplicationFileLoader.<init>(ApplicationFileLoader.java:107)
    at org.apache.wink.server.internal.application.ServletApplicationFileLoader.<init>(ServletApplicationFileLoader.java:44)
    at org.apache.wink.server.internal.application.ServletWinkApplication.getApplicationFileLoader(ServletWinkApplication.java:44)
    at org.apache.wink.common.internal.application.SimpleWinkApplication.loadImplAppConfigFiles(SimpleWinkApplication.java:78)
    at org.apache.wink.common.internal.application.SimpleWinkApplication.getClasses(SimpleWinkApplication.java:67)
    at org.apache.wink.server.internal.application.ApplicationProcessor.process(ApplicationProcessor.java:89)
    at org.apache.wink.server.internal.DeploymentConfiguration.addApplication(DeploymentConfiguration.java:339)
    at org.apache.wink.server.internal.servlet.RestServlet.createRequestProcessor(RestServlet.java:139)
    at org.apache.wink.server.internal.servlet.RestServlet.init(RestServlet.java:94)
    at javax.servlet.GenericServlet.init(GenericServlet.java:161)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:330)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.loadOnStartupCheck(ServletWrapper.java:1421)
    at com.ibm.ws.webcontainer.webapp.WebApp.doLoadOnStartupActions(WebApp.java:1179)
    at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinally(WebApp.java:1147)
    at com.ibm.ws.webcontainer.webapp.WebApp.initialize(WebApp.java:1053)
    at com.ibm.ws.webcontainer.webapp.WebApp.initialize(WebApp.java:6409)
    at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost.startWebApp(DynamicVirtualHost.java:446)
    at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost.createRunnableHandler(DynamicVirtualHost.java:248)
    at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost.createRunnableHandler(DynamicVirtualHost.java:313)
    at com.ibm.ws.http.internal.VirtualHostImpl.discriminate(VirtualHostImpl.java:251)
    at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink.ready(HttpDispatcherLink.java:306)
    at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:449)
    at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleNewRequest(HttpInboundLink.java:383)
    at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.processRequest(HttpInboundLink.java:283)
    at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.ready(HttpInboundLink.java:254)
    at com.ibm.ws.tcpchannel.internal.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:174)
    at com.ibm.ws.tcpchannel.internal.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:83)
    at com.ibm.ws.tcpchannel.internal.WorkQueueManager.requestComplete(WorkQueueManager.java:504)
    at com.ibm.ws.tcpchannel.internal.WorkQueueManager.attemptIO(WorkQueueManager.java:574)
    at com.ibm.ws.tcpchannel.internal.WorkQueueManager.workerRun(WorkQueueManager.java:929)
    at com.ibm.ws.tcpchannel.internal.WorkQueueManager$Worker.run(WorkQueueManager.java:1018)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: com.google.gson.Gson
    at com.ibm.personafusion.controller.JsonUtils.getPersonFromJson(JsonUtils.java:34)
    at com.ibm.personafusion.db.CloudantClient.getAllPeopleNotInGroup(CloudantClient.java:160)
    at com.ibm.personafusion.controller.SearchController.<clinit>(SearchController.java:26)
    at java.lang.Class.forNameImpl(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at com.ibm.ws.webcontainer.osgi.webapp.WebApp.addClassToHandlesTypesStartupSet(WebApp.java:1091)
    at com.ibm.ws.webcontainer.osgi.webapp.WebApp.scanForHandlesTypesClasses(WebApp.java:954)
    at com.ibm.ws.webcontainer.webapp.WebApp.initializeServletContainerInitializers(WebApp.java:2472)
    at com.ibm.ws.webcontainer.webapp.WebApp.initialize(WebApp.java:1038)
    ... 19 more
1

There are 1 answers

3
Jeff Sloyer On

The app is not meant to pushed from eclipse. You need to build the war file with build.xml and then push from the command line.

I will take a todo to update the app so it can be pushed from eclipse.