This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes JBoss/WildFly and the fly likes MySql, JBoss error: NPE @ org.jboss.mx.loading.loadmgr3 .beginloadtask Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "MySql, JBoss error: NPE @ org.jboss.mx.loading.loadmgr3 .beginloadtask" Watch "MySql, JBoss error: NPE @ org.jboss.mx.loading.loadmgr3 .beginloadtask" New topic
Author

MySql, JBoss error: NPE @ org.jboss.mx.loading.loadmgr3 .beginloadtask

Andrew Lohans
Greenhorn

Joined: May 16, 2005
Posts: 4
Hey gang,

Here's my error - I'm running MySQL ver 4.0, with struts 1.2.4, hibernate 2 & jboss version 4.0.1. I use Windows XP, and the MySQL server was started with the net start MySQL command. Sadly, I don't have internet access at home (just moved in) so I'm going to be a bit loose with the details - I'll put in the full error message tomorrow if need be.

Essentially, when I do a search on the database from the webapp that I've deployed, I get a:
java.lang.nullpointerException
at org.jboss.mx.loading.loadmgr3.beginloadtask(loadmgr3.java: 153)
... (some more errors here)
at java.util.timerThread.mainloop (timer.java 432)
at java.util.timerThread.run (timer.java 382)
... (and some more here too)

This error, as far as I can tell, is related to MySQL - but seeing as it's a jboss error spat out, I've snuck it in here. The reason I suspect MySQL is that if I run a net stop MySQL command on the cmd prompt, then net start MySQL again, I can pull from the database.

I threw in c3p0 into the mix, and foud that after about 2 hours c3p0 lost connection with MySQL - effectively throwing the above error with [INFO] statements.

I'm not too familiar with MySQL here - I thought it disconnected after 8hrs generally - could this be the case? If so, isn't the datapool meant to handle this? I'd appreciate any help in the matter!

Cheers,
Andrew
Daniel Webster
Greenhorn

Joined: Dec 04, 2003
Posts: 1
I get the exact same exception and same line number problem when redeploying Cryptix PGP in jboss:

This only happens when I reload my web app from hot-deploy. That is,
  • I can deploy the web application before I start the server, start the server, and it starts fine.
  • I can start the server without the webapp, then deploy the webapp, and the program starts fine
  • If I have the webapp running, then deploy the new webapp over it, it bombs.

  • This is the exact line of code that gives the error. I have a minimal test case that loads this line in a server upon startup:

    I am running jboss 4.0.1 with cryptix (recent version, cannot find version number). I was wondering if this points to some more general problem in the jboss classloader instead of a cryptix or MySql problem?
    [ May 23, 2005: Message edited by: Daniel Webster ]
    Rick Merc
    Greenhorn

    Joined: Jun 10, 2005
    Posts: 1
    I am getting exact same error:

    2005-06-10 22:32:15,848 ERROR [org.jboss.web.localhost.Engine] ApplicationDispatcher[/hrub] Servlet.service() for servlet jsp threw exception
    java.lang.NullPointerException
    at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:153)
    at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:464)
    at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:374)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
    at java.lang.Class.forName0(Native Method)
    etc...

    Again this happens during hot redeployment only. I am using jboss 4.0.1.sp1 with mysql. I tried net stop mysql but to no avail.
    micke berg
    Greenhorn

    Joined: Jun 15, 2005
    Posts: 1
    I have also have the same problem. No errormessages at deploy/startup of the server.
    Using jboss-4.0.1RC2, j2sdk1.4.2_06, mysql-4.1.12-win32 running it all in winXP. Building an application with Hibernate2 and springframework.

    java.lang.NullPointerException
    org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:153)
    org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:464)
    org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:374)
    java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
    net.sf.ehcache.Cache.put(Cache.java:317)
    net.sf.hibernate.cache.EhCache.put(EhCache.java:148)
    net.sf.hibernate.cache.ReadOnlyCache.put(ReadOnlyCache.java:45)
    net.sf.hibernate.impl.SessionImpl.initializeEntity(SessionImpl.java:2214)
    net.sf.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:315)
    net.sf.hibernate.loader.Loader.doQuery(Loader.java:305)
    net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133)
    net.sf.hibernate.loader.Loader.doList(Loader.java:1033)
    net.sf.hibernate.loader.Loader.list(Loader.java:1024)
    net.sf.hibernate.loader.CriteriaLoader.list(CriteriaLoader.java:118)
    net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:3613)
    net.sf.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:238)
    org.springframework.orm.hibernate.HibernateTemplate$5.doInHibernate(HibernateTemplate.java:415)
    org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:312)
    org.springframework.orm.hibernate.HibernateTemplate.loadAll(HibernateTemplate.java:411)
    Oystein Pettersen
    Greenhorn

    Joined: Jun 15, 2005
    Posts: 2
    Yup get the same error. Using jboss 4.0.1, mysql, hibernate and spring.

    This is also only when I hot deploy over a current running version of my app.

    I also think that this is a jboss classloading thing. My theory is that if I move my dep jars from my "war lib" location to jboss/server/default/lib then the classloader will not get so confused.

    The reason why I have not tested this before is that I want my app to be self contained. This means that everything that the app needs should be in the war.

    I'll try this now and repost.

    Cheers
    [ June 15, 2005: Message edited by: Oystein Pettersen ]
    Oystein Pettersen
    Greenhorn

    Joined: Jun 15, 2005
    Posts: 2
    This page shows that this is a problem in the JBossMX. The issue is still open.

    http://jira.jboss.com/jira/browse/JBAS-1712

    I got rid of the NPE by adding the mysql-connector.jar to the jboss/server/default/lib directory.

    I do not like this bug workaround but I helps me avoiding to stop and start the jboss all the time.

    Cheers
    [ June 15, 2005: Message edited by: Oystein Pettersen ]
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: MySql, JBoss error: NPE @ org.jboss.mx.loading.loadmgr3 .beginloadtask
     
    Similar Threads
    getting "Problem with checked-in Statement, discarding " in servlet scheduler
    Getting communication Link failure on executing query
    c3p0 configuration need help!
    class loader problem while jboss clustering(Sorry If my post is being duplicated)
    Problem with running JBoss Seam examples