File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
    Bookmark Topic Watch Topic
  • New Topic

Connection Pooling Eror in Struts2 application

 
Jay Tai
Ranch Hand
Posts: 221
Java MySQL Database Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
Posts: 9214
9
Linux Mac OS X Windows
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not post the same question more than once. It causes confusion and duplication of effort as the community tries to help everyone.
 
I agree. Here's the link: http://aspose.com/file-tools
    Bookmark Topic Watch Topic
  • New Topic