Topic
  • 13 replies
  • Latest Post - ‏2012-10-19T08:53:09Z by bwa
Tony_G
Tony_G
6 Posts

Pinned topic Getting exception when publishing to Liberty Profile 8.5

‏2012-07-10T02:40:19Z |
This use to work but doesn't seem to anymore.

I am getting a NPE every time I add the project to WAS 8.5 Liberty Profile

An exception window pops up with

Publishing failed
OK
Publish *failed.
java.lang.NullPointerException
Publish of application *failed.
This is in the logs

java.lang.NullPointerException
at com.ibm.ws.st.core.internal.looseconfig.LooseArchive.process(LooseArchive.java:139)
at com.ibm.ws.st.core.internal.looseconfig.LooseArchive.<init>(LooseArchive.java:67)
at com.ibm.ws.st.core.internal.looseconfig.LooseconfigXMLGenerator.fillLooseContent(LooseconfigXMLGenerator.java:55)
at com.ibm.ws.st.core.internal.looseconfig.LooseconfigXMLGenerator.generateRepository(LooseconfigXMLGenerator.java:48)
at com.ibm.ws.st.core.internal.ApplicationPublisher.handleAppLooseConfigXML(ApplicationPublisher.java:189)
at com.ibm.ws.st.core.internal.ApplicationPublisher.postPublishApplication(ApplicationPublisher.java:230)
at com.ibm.ws.st.jee.core.internal.JEEPublisher.postPublishApplication(JEEPublisher.java:347)
at com.ibm.ws.st.core.internal.ServerExtensionWrapper.postPublishApplication(ServerExtensionWrapper.java:324)
at com.ibm.ws.st.core.internal.WebSphereServerBehaviour.publishApplication(WebSphereServerBehaviour.java:844)
at com.ibm.ws.st.core.internal.WebSphereServerBehaviour.publishModules(WebSphereServerBehaviour.java:748)
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:955)
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:774)
at org.eclipse.wst.server.core.internal.Server.publishImpl(Server.java:3087)
at org.eclipse.wst.server.core.internal.Server$PublishJob.run(Server.java:345)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
The application is using Spring 3.1.1
JDK 6

And will load if I build with Maven and the drop in the "dropin" directory
  • SystemAdmin
    SystemAdmin
    590 Posts

    Re: Getting exception when publishing to Liberty Profile 8.5

    ‏2012-07-11T15:32:04Z  
    This is a defect that we are investigating. The problem should be limited to some special settings in the project deployment assembly of your application.

    As a workaround, can you try the following?

    • Double click your server in the Servers view to open the server configuration editor
    • In the Liberty Profile Settings section, uncheck the Run applications directly from the workspace check box
    • Save the editor.

    It will do a republish and your application should work.
  • Tony_G
    Tony_G
    6 Posts

    Re: Getting exception when publishing to Liberty Profile 8.5

    ‏2012-07-11T15:43:08Z  
    This is a defect that we are investigating. The problem should be limited to some special settings in the project deployment assembly of your application.

    As a workaround, can you try the following?

    • Double click your server in the Servers view to open the server configuration editor
    • In the Liberty Profile Settings section, uncheck the Run applications directly from the workspace check box
    • Save the editor.

    It will do a republish and your application should work.
    Thank you so much.

    That fixed my issue.
  • bwa
    bwa
    47 Posts

    Re: Getting exception when publishing to Liberty Profile 8.5

    ‏2012-09-20T07:57:25Z  
    This is a defect that we are investigating. The problem should be limited to some special settings in the project deployment assembly of your application.

    As a workaround, can you try the following?

    • Double click your server in the Servers view to open the server configuration editor
    • In the Liberty Profile Settings section, uncheck the Run applications directly from the workspace check box
    • Save the editor.

    It will do a republish and your application should work.
    Any info when this is going to be fixed? There is a lot of maven use with RAD and Liberty Profile ...
  • SystemAdmin
    SystemAdmin
    590 Posts

    Re: Getting exception when publishing to Liberty Profile 8.5

    ‏2012-10-18T16:34:23Z  
    This is a defect that we are investigating. The problem should be limited to some special settings in the project deployment assembly of your application.

    As a workaround, can you try the following?

    • Double click your server in the Servers view to open the server configuration editor
    • In the Liberty Profile Settings section, uncheck the Run applications directly from the workspace check box
    • Save the editor.

    It will do a republish and your application should work.
    I get this error too, but I've figured out what triggers it: it's only when I select entries from Eclipse's classpath into the deployment assembly configuration.

    e.g. If I select (from project properties 'Deployment Assembly Configuration'), 'Add...' -> 'Java Build Path Entries' and add some items from the classpath, it produces a Web Deployment Assembly configuration that blows up on deployment with a NPE. If I remove all those entries, it's fine.
    (Although I do then need to add all those entries explicitly via 'Add...' -> 'Archives from Workspace'.)

    N.B. If you don't have your classpath entries in the deployment assembly configuration, Eclipse will whine at you, saying "Classpath entry XXX will not be exported or published. Runtime ClassNotFoundExceptions may result." You can turn those off via CTRL-1->Quick Fix. (One by one. :-()
  • SystemAdmin
    SystemAdmin
    590 Posts

    Re: Getting exception when publishing to Liberty Profile 8.5

    ‏2012-10-18T20:57:27Z  
    I get this error too, but I've figured out what triggers it: it's only when I select entries from Eclipse's classpath into the deployment assembly configuration.

    e.g. If I select (from project properties 'Deployment Assembly Configuration'), 'Add...' -> 'Java Build Path Entries' and add some items from the classpath, it produces a Web Deployment Assembly configuration that blows up on deployment with a NPE. If I remove all those entries, it's fine.
    (Although I do then need to add all those entries explicitly via 'Add...' -> 'Archives from Workspace'.)

    N.B. If you don't have your classpath entries in the deployment assembly configuration, Eclipse will whine at you, saying "Classpath entry XXX will not be exported or published. Runtime ClassNotFoundExceptions may result." You can turn those off via CTRL-1->Quick Fix. (One by one. :-()
    This problem is fixed in the latest IBM WebSphere Application Server Developer Tools for Eclipse (WDT) V.Next Alpha (https://www.ibm.com/developerworks/mydeveloperworks/blogs/wasdev/entry/download_wdt_alpha?lang=en).

    I don't know if bwa's Maven problem in the previous post is related to this one.

    Regards,

    Jason
  • bwa
    bwa
    47 Posts

    Re: Getting exception when publishing to Liberty Profile 8.5

    ‏2012-10-19T08:51:57Z  
    This problem is fixed in the latest IBM WebSphere Application Server Developer Tools for Eclipse (WDT) V.Next Alpha (https://www.ibm.com/developerworks/mydeveloperworks/blogs/wasdev/entry/download_wdt_alpha?lang=en).

    I don't know if bwa's Maven problem in the previous post is related to this one.

    Regards,

    Jason
    I did a mistanke on this, so my problem is not a Liberty Profile Next Alpha problem. I misunderstood how it works and anly updated the Liberty Runtime with the new Alpha. You also need to install the WDT Alpha as well. I did not do that, and probably a lot of other people will also do this error, so
  • bwa
    bwa
    47 Posts

    Re: Getting exception when publishing to Liberty Profile 8.5

    ‏2012-10-19T08:51:57Z  
    This problem is fixed in the latest IBM WebSphere Application Server Developer Tools for Eclipse (WDT) V.Next Alpha (https://www.ibm.com/developerworks/mydeveloperworks/blogs/wasdev/entry/download_wdt_alpha?lang=en).

    I don't know if bwa's Maven problem in the previous post is related to this one.

    Regards,

    Jason
    I did a mistanke on this, so my problem is not a Liberty Profile Next Alpha problem. I misunderstood how it works and anly updated the Liberty Runtime with the new Alpha. You also need to install the WDT Alpha as well. I did not do that, and probably a lot of other people will also do this error, so
  • bwa
    bwa
    47 Posts

    Re: Getting exception when publishing to Liberty Profile 8.5

    ‏2012-10-19T08:52:00Z  
    This problem is fixed in the latest IBM WebSphere Application Server Developer Tools for Eclipse (WDT) V.Next Alpha (https://www.ibm.com/developerworks/mydeveloperworks/blogs/wasdev/entry/download_wdt_alpha?lang=en).

    I don't know if bwa's Maven problem in the previous post is related to this one.

    Regards,

    Jason
    I did a mistanke on this, so my problem is not a Liberty Profile Next Alpha problem. I misunderstood how it works and anly updated the Liberty Runtime with the new Alpha. You also need to install the WDT Alpha as well. I did not do that, and probably a lot of other people will also do this error, so
  • bwa
    bwa
    47 Posts

    Re: Getting exception when publishing to Liberty Profile 8.5

    ‏2012-10-19T08:52:01Z  
    This problem is fixed in the latest IBM WebSphere Application Server Developer Tools for Eclipse (WDT) V.Next Alpha (https://www.ibm.com/developerworks/mydeveloperworks/blogs/wasdev/entry/download_wdt_alpha?lang=en).

    I don't know if bwa's Maven problem in the previous post is related to this one.

    Regards,

    Jason
    I did a mistanke on this, so my problem is not a Liberty Profile Next Alpha problem. I misunderstood how it works and anly updated the Liberty Runtime with the new Alpha. You also need to install the WDT Alpha as well. I did not do that, and probably a lot of other people will also do this error, so
  • bwa
    bwa
    47 Posts

    Re: Getting exception when publishing to Liberty Profile 8.5

    ‏2012-10-19T08:52:03Z  
    This problem is fixed in the latest IBM WebSphere Application Server Developer Tools for Eclipse (WDT) V.Next Alpha (https://www.ibm.com/developerworks/mydeveloperworks/blogs/wasdev/entry/download_wdt_alpha?lang=en).

    I don't know if bwa's Maven problem in the previous post is related to this one.

    Regards,

    Jason
    I did a mistanke on this, so my problem is not a Liberty Profile Next Alpha problem. I misunderstood how it works and anly updated the Liberty Runtime with the new Alpha. You also need to install the WDT Alpha as well. I did not do that, and probably a lot of other people will also do this error, so
  • bwa
    bwa
    47 Posts

    Re: Getting exception when publishing to Liberty Profile 8.5

    ‏2012-10-19T08:52:04Z  
    This problem is fixed in the latest IBM WebSphere Application Server Developer Tools for Eclipse (WDT) V.Next Alpha (https://www.ibm.com/developerworks/mydeveloperworks/blogs/wasdev/entry/download_wdt_alpha?lang=en).

    I don't know if bwa's Maven problem in the previous post is related to this one.

    Regards,

    Jason
    I did a mistanke on this, so my problem is not a Liberty Profile Next Alpha problem. I misunderstood how it works and anly updated the Liberty Runtime with the new Alpha. You also need to install the WDT Alpha as well. I did not do that, and probably a lot of other people will also do this error, so
  • bwa
    bwa
    47 Posts

    Re: Getting exception when publishing to Liberty Profile 8.5

    ‏2012-10-19T08:52:05Z  
    This problem is fixed in the latest IBM WebSphere Application Server Developer Tools for Eclipse (WDT) V.Next Alpha (https://www.ibm.com/developerworks/mydeveloperworks/blogs/wasdev/entry/download_wdt_alpha?lang=en).

    I don't know if bwa's Maven problem in the previous post is related to this one.

    Regards,

    Jason
    I did a mistanke on this, so my problem is not a Liberty Profile Next Alpha problem. I misunderstood how it works and anly updated the Liberty Runtime with the new Alpha. You also need to install the WDT Alpha as well. I did not do that, and probably a lot of other people will also do this error, so
  • bwa
    bwa
    47 Posts

    Re: Getting exception when publishing to Liberty Profile 8.5

    ‏2012-10-19T08:53:09Z  
    • bwa
    • ‏2012-10-19T08:52:05Z
    I did a mistanke on this, so my problem is not a Liberty Profile Next Alpha problem. I misunderstood how it works and anly updated the Liberty Runtime with the new Alpha. You also need to install the WDT Alpha as well. I did not do that, and probably a lot of other people will also do this error, so
    I did a mistanke on this, so my problem is not a Liberty Profile Next Alpha problem. I misunderstood how it works and anly updated the Liberty Runtime with the new Alpha. You also need to install the WDT Alpha as well. I did not do that, and probably a lot of other people will also do this error, so remember to also INSTALL THE WDT AND THE RUNTIME.

    /bwa