Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-9326

JndiRegistry should default to use CamelInitialContextFactory if no env factory specified

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.16.1
    • 2.16.2, 2.17.0
    • camel-core
    • None
    • Unknown

    Description

      You will get errors like

      	at org.apache.camel.impl.JndiRegistry.bind(JndiRegistry.java:126)
      	at camelinaction.JndiRegistryTest.setUp(JndiRegistryTest.java:25)
      	at junit.framework.TestCase.runBare(TestCase.java:139)
      	at junit.framework.TestResult$1.protect(TestResult.java:122)
      	at junit.framework.TestResult.runProtected(TestResult.java:142)
      	at junit.framework.TestResult.run(TestResult.java:125)
      	at junit.framework.TestCase.run(TestCase.java:129)
      	at junit.framework.TestSuite.runTest(TestSuite.java:252)
      	at junit.framework.TestSuite.run(TestSuite.java:247)
      	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:86)
      	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
      	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:117)
      	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
      	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:483)
      	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
      Caused by: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
      

      If using JndiRegistry manually.

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            davsclaus Claus Ibsen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: