aspose file tools*
The moose likes Struts and the fly likes Connection Pooling Eror in Struts2 application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Reply locked New topic
Author

Connection Pooling Eror in Struts2 application

Jay Tai
Ranch Hand

Joined: Apr 25, 2012
Posts: 162

I'm trying to build a Struts 2 app in Netbeans and Tomcat. I can't seem to make a connection to the mySql DB. When trying to run the application the Build fails with the following stack:


SEVERE: Exception sending context initialized event to listener instance of class app11a.listener.AppListener
java.lang.NullPointerException
at javax.naming.InitialContext.getURLScheme(InitialContext.java:288)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:337)
at javax.naming.InitialContext.lookup(InitialContext.java:411)
at app11a.listener.AppListener.contextInitialized(AppListener.java:18)


Doing some research I found out that this type of error is sometimes due to missing or outdated libraries, but I'm using the same libraries as a prior MVC JSP application which also implements connection pooling and works fine. I've included the main files in my application. Would appreciate any guidance about where I'm going wrong. Thanks in advance!

/WEB-INF/classes/app11a.listener.AppListener


/META-INF/context.xml



/WEB-INF/web.xml




Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8903
    
    8

Please do not post the same question more than once. It causes confusion and duplication of effort as the community tries to help everyone.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Connection Pooling Eror in Struts2 application