Announcement Announcement Module
Collapse
No announcement yet.
Problem with glassfish 3.1.1, cloud, and application context. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem with glassfish 3.1.1, cloud, and application context.

    I am trying to deploy to a cloud glassfish 3.1.1 instance and the application will not deploy. Seems to be an issue with getting the application context. I run it locally just fine with Windows 7, glassfish v 3.1.1, and mysql. Is there something I am missing?

    basic error is this :
    Error occurred during deployment: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'startupServiceImpl' defined in file [/opt/glassfishv3/glassfish/domains/domain1/applications/ChiroTrack3/WEB-INF/classes/com/jmsolutions/chiro/service/impl/StartupServiceImpl.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationExcepti on: Could not instantiate bean class [com.jmsolutions.chiro.service.impl.StartupServiceI mpl]: Constructor threw exception; nested exception is java.lang.NullPointerException. Please see server.log for more details.

    I dug through the server.log and found the class where the null pointer is actually happening is:



    @Service
    public class ApplicationContextUtility implements ApplicationContextAware{

    private static ApplicationContext ctx;

    public void setApplicationContext(ApplicationContext appContext)
    throws BeansException {
    this.ctx = appContext;
    }

    public static Object getBean(String bean) {

    Object o = ctx.getBean(bean); // ERROR HERE
    if (o == null) o = new Object();
    return o;
    }

    }


    Please HELP I have no idea why it is doing this.
Working...
X