jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Sonar
  • SONAR-1738

NPE in EmbeddedDatabaseFactorywhen using JNDI datasource

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 2.2
  • Fix Version/s: 2.3
  • Component/s: Database
  • Labels:
    None
  • Patch Submitted:
    Yes

Description

Using a JNDI database, setting sonar.jdbc.jndiName and commenting out sonar.jdbc.url you get a NPE, due to a comparison that doesn't check for null in EmbeddedDatabaseFactory

Caused by: java.lang.NullPointerException
        at org.sonar.server.database.EmbeddedDatabaseFactory.start(EmbeddedDatabaseFactory.java:35) [classes/:na]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [na:1.6.0_20]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [na:1.6.0_20]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [na:1.6.0_20]
        at java.lang.reflect.Method.invoke(Method.java:597) [na:1.6.0_20]
        at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110) [picocontainer-2.10.2.jar:na]
        ... 28 common frames omitted
  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Text File
    sonar-jndi-npe.patch
    23/Aug/10 11:46 AM
    0.8 kB
    Carlos Sanchez

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
There are no comments yet on this issue.

People

  • Assignee:
    Simon Brandhof
    Reporter:
    Carlos Sanchez
Vote (0)
Watch (0)

Dates

  • Created:
    23/Aug/10 11:46 AM
    Updated:
    12/Oct/10 4:34 AM
    Resolved:
    23/Aug/10 3:30 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.