java.lang.NullPointerException

JFrog JIRA | Jan Novotný | 9 years ago
  1. 0

    Recently I havent been able to keep Artifactory alive more than a few hours. I found out, that on clear installation (with empty artifactory home - only with default /etc directory) when I first start Tomcat everything goes ok. When I stop it - it seems that locks are not cleared properly on Derby or Jackrabbit level?! Tomcat shuts down properly by shutdown.sh script. When I start Tomcat next time in log I can found this: catalina.out: 2007-08-01 10:58:28,673 [WARN ] core.util.RepositoryLock - Existing lock file /www/p_prj/p_java/artifactory-home/data/jcr/.lock detected. Repository was not shut down properly. 2007-08-01 10:58:28,675 [ERROR] repo.spring.CentralConfigFactoryBean - Failed to load configuration from '/www/p_prj/p_java/artifactory-home/etc/artifactory.config.xml'. java.lang.RuntimeException: Faild to config jcr repo. at org.artifactory.jcr.JcrHelper.<init>(JcrHelper.java:93) at org.artifactory.repo.CentralConfig.afterPropertiesSet(CentralConfig.java:131) at org.artifactory.repo.spring.CentralConfigFactoryBean.afterPropertiesSet(CentralConfigFactoryBean.java:84) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1175) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1145) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:427) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:144) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:276) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:360) at org.artifactory.webapp.servlet.ArtifactoryContextConfigurer.contextInitialized(ArtifactoryContextConfigurer.java:45) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022) at org.apache.catalina.core.StandardHost.start(StandardHost.java:736) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:448) at org.apache.catalina.core.StandardServer.start(StandardServer.java:700) at org.apache.catalina.startup.Catalina.start(Catalina.java:552) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433) Caused by: javax.jcr.RepositoryException: The repository home /www/p_prj/p_java/artifactory-home/data/jcr appears to be already locked by the current process. at org.apache.jackrabbit.core.util.RepositoryLock.acquire(RepositoryLock.java:146) at org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:229) at org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:521) at org.artifactory.jcr.JcrHelper.<init>(JcrHelper.java:91) ... 36 more I will attach full logs listing. In derby.log I can found: ---------------------------------------------------------------- 2007-08-01 08:58:57.078 GMT: Booting Derby version The Apache Software Foundation - Apache Derby - 10.2.2.0 - (485682): instance c013800d-0114-20a6-3448-000001858410 on database directory /www/p_prj/p_java/artifactory-home/data/jcr/db Database Class Loader started - derby.database.classpath='' 2007-08-01 08:58:58.349 GMT Thread[Finalizer,8,system] (XID = 810), (SESSIONID = 2), (DATABASE = /www/p_prj/p_java/artifactory-home/data/jcr/db), (DRDAID = null), Cleanup action starting 2007-08-01 08:58:58.349 GMT Thread[Finalizer,8,system] (XID = 810), (SESSIONID = 2), (DATABASE = /www/p_prj/p_java/artifactory-home/data/jcr/db), (DRDAID = null), Failed Statement is: null java.lang.NullPointerException at org.apache.derby.iapi.services.monitor.Monitor.newInstanceFromIdentifier(Unknown Source) at org.apache.derby.iapi.services.io.FormatIdInputStream.readObject(Unknown Source) at org.apache.derby.iapi.services.io.ArrayInputStream.readObject(Unknown Source) at org.apache.derby.impl.store.raw.log.Scan.getNextRecordBackward(Unknown Source) at org.apache.derby.impl.store.raw.log.Scan.getNextRecord(Unknown Source) at org.apache.derby.impl.store.raw.log.FileLogger.undo(Unknown Source) at org.apache.derby.impl.store.raw.xact.Xact.abort(Unknown Source) at org.apache.derby.impl.store.access.RAMTransaction.abort(Unknown Source) at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.doRollback(Unknown Source) at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.userRollback(Unknown Source) at org.apache.derby.impl.jdbc.TransactionResourceImpl.rollback(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.close(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.finalize(Unknown Source) at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method) at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83) at java.lang.ref.Finalizer.access$100(Finalizer.java:14) at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160) Cleanup action completed 2007-08-01 08:58:58.360 GMT Thread[Finalizer,8,system] Cleanup action starting java.lang.NullPointerException at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.javaException(Unknown Source) at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source) at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.close(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.finalize(Unknown Source) at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method) at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83) at java.lang.ref.Finalizer.access$100(Finalizer.java:14) at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160) 2007-08-01 08:58:58.360 GMT Thread[Finalizer,8,system] Equally severe exception raised during cleanup (ignored) null java.lang.NullPointerException at org.apache.derby.impl.sql.compile.CompilerContextImpl.initRequiredPriv(Unknown Source) at org.apache.derby.impl.sql.compile.CompilerContextImpl.resetContext(Unknown Source) at org.apache.derby.impl.sql.compile.CompilerContextImpl.cleanupOnError(Unknown Source) at org.apache.derby.iapi.services.context.ContextManager.cleanupOnError(Unknown Source) at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.close(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.finalize(Unknown Source) at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method) at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83) at java.lang.ref.Finalizer.access$100(Finalizer.java:14) at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160) Cleanup action completed

    JFrog JIRA | 9 years ago | Jan Novotn??
    java.lang.NullPointerException
  2. 0

    Recently I havent been able to keep Artifactory alive more than a few hours. I found out, that on clear installation (with empty artifactory home - only with default /etc directory) when I first start Tomcat everything goes ok. When I stop it - it seems that locks are not cleared properly on Derby or Jackrabbit level?! Tomcat shuts down properly by shutdown.sh script. When I start Tomcat next time in log I can found this: catalina.out: 2007-08-01 10:58:28,673 [WARN ] core.util.RepositoryLock - Existing lock file /www/p_prj/p_java/artifactory-home/data/jcr/.lock detected. Repository was not shut down properly. 2007-08-01 10:58:28,675 [ERROR] repo.spring.CentralConfigFactoryBean - Failed to load configuration from '/www/p_prj/p_java/artifactory-home/etc/artifactory.config.xml'. java.lang.RuntimeException: Faild to config jcr repo. at org.artifactory.jcr.JcrHelper.<init>(JcrHelper.java:93) at org.artifactory.repo.CentralConfig.afterPropertiesSet(CentralConfig.java:131) at org.artifactory.repo.spring.CentralConfigFactoryBean.afterPropertiesSet(CentralConfigFactoryBean.java:84) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1175) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1145) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:427) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:144) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:276) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:360) at org.artifactory.webapp.servlet.ArtifactoryContextConfigurer.contextInitialized(ArtifactoryContextConfigurer.java:45) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022) at org.apache.catalina.core.StandardHost.start(StandardHost.java:736) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:448) at org.apache.catalina.core.StandardServer.start(StandardServer.java:700) at org.apache.catalina.startup.Catalina.start(Catalina.java:552) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433) Caused by: javax.jcr.RepositoryException: The repository home /www/p_prj/p_java/artifactory-home/data/jcr appears to be already locked by the current process. at org.apache.jackrabbit.core.util.RepositoryLock.acquire(RepositoryLock.java:146) at org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:229) at org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:521) at org.artifactory.jcr.JcrHelper.<init>(JcrHelper.java:91) ... 36 more I will attach full logs listing. In derby.log I can found: ---------------------------------------------------------------- 2007-08-01 08:58:57.078 GMT: Booting Derby version The Apache Software Foundation - Apache Derby - 10.2.2.0 - (485682): instance c013800d-0114-20a6-3448-000001858410 on database directory /www/p_prj/p_java/artifactory-home/data/jcr/db Database Class Loader started - derby.database.classpath='' 2007-08-01 08:58:58.349 GMT Thread[Finalizer,8,system] (XID = 810), (SESSIONID = 2), (DATABASE = /www/p_prj/p_java/artifactory-home/data/jcr/db), (DRDAID = null), Cleanup action starting 2007-08-01 08:58:58.349 GMT Thread[Finalizer,8,system] (XID = 810), (SESSIONID = 2), (DATABASE = /www/p_prj/p_java/artifactory-home/data/jcr/db), (DRDAID = null), Failed Statement is: null java.lang.NullPointerException at org.apache.derby.iapi.services.monitor.Monitor.newInstanceFromIdentifier(Unknown Source) at org.apache.derby.iapi.services.io.FormatIdInputStream.readObject(Unknown Source) at org.apache.derby.iapi.services.io.ArrayInputStream.readObject(Unknown Source) at org.apache.derby.impl.store.raw.log.Scan.getNextRecordBackward(Unknown Source) at org.apache.derby.impl.store.raw.log.Scan.getNextRecord(Unknown Source) at org.apache.derby.impl.store.raw.log.FileLogger.undo(Unknown Source) at org.apache.derby.impl.store.raw.xact.Xact.abort(Unknown Source) at org.apache.derby.impl.store.access.RAMTransaction.abort(Unknown Source) at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.doRollback(Unknown Source) at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.userRollback(Unknown Source) at org.apache.derby.impl.jdbc.TransactionResourceImpl.rollback(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.close(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.finalize(Unknown Source) at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method) at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83) at java.lang.ref.Finalizer.access$100(Finalizer.java:14) at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160) Cleanup action completed 2007-08-01 08:58:58.360 GMT Thread[Finalizer,8,system] Cleanup action starting java.lang.NullPointerException at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.javaException(Unknown Source) at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source) at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.close(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.finalize(Unknown Source) at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method) at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83) at java.lang.ref.Finalizer.access$100(Finalizer.java:14) at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160) 2007-08-01 08:58:58.360 GMT Thread[Finalizer,8,system] Equally severe exception raised during cleanup (ignored) null java.lang.NullPointerException at org.apache.derby.impl.sql.compile.CompilerContextImpl.initRequiredPriv(Unknown Source) at org.apache.derby.impl.sql.compile.CompilerContextImpl.resetContext(Unknown Source) at org.apache.derby.impl.sql.compile.CompilerContextImpl.cleanupOnError(Unknown Source) at org.apache.derby.iapi.services.context.ContextManager.cleanupOnError(Unknown Source) at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.close(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.finalize(Unknown Source) at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method) at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83) at java.lang.ref.Finalizer.access$100(Finalizer.java:14) at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160) Cleanup action completed

    JFrog JIRA | 9 years ago | Jan Novotný
    java.lang.NullPointerException
  3. 0

    Android: Saving Map State in Google map

    Stack Overflow | 11 months ago | Junie Negentien
    java.lang.RuntimeException: Unable to resume activity {com.ourThesis.junieNegentien2015/com.ourThesis.junieNegentien2015.MainActivity}: java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at org.apache.derby.impl.jdbc.Util.newEmbedSQLException()
    2. Derby
      EmbedConnection.finalize
      1. org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
      2. org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
      3. org.apache.derby.impl.jdbc.Util.javaException(Unknown Source)
      4. org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
      5. org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
      6. org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
      7. org.apache.derby.impl.jdbc.EmbedConnection.close(Unknown Source)
      8. org.apache.derby.impl.jdbc.EmbedConnection.finalize(Unknown Source)
      8 frames
    3. Java RT
      Finalizer$FinalizerThread.run
      1. java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
      2. java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
      3. java.lang.ref.Finalizer.access$100(Finalizer.java:14)
      4. java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)
      4 frames