Skip to main content

         This documentation site is for previous versions. Visit our new documentation site for current releases.      

This content has been archived and is no longer being updated.

Links may not function; however, this content may be relevant to outdated versions of the product.

ImportImpl throws error when importing RuleSets

Updated on January 3, 2008


You can use the command line option ImportImpl to run an Apache Ant script and import Process Commander class instances or RuleSets from an external database. (See How to import and export ZIP archives from a command line for more information.)

ImportImpl retrieves a ZIP file containing the new classes and writes the exported class instances to a target Process Commander database. On the command line you can specify database options that control how the records are written to the database.

For example:

com.pega.pegarules.engine.database.ImportImpl –a –o

indicates that the file will be imported and will not overwrite any existing RuleSets (-o).

When using ImportImpl to import RuleSets and classes, you may receive the following NoInitialContextException error:

java] 2007-12-07 11:56:19,387 [                main] (  priv.context.JNDIEnvironment) INFO    - Enterprise-tier default Engine bean name is EngineBMT
     [java] 2007-12-07 11:56:19,394 [                main] (etier.context.EtierEnvironment) ERROR   - Enterprise tier error retrieving local JNDI context
     [java] factory =
     [java]     url =
     [java]    path =
     [java] 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
     [java]     at javax.naming.spi.NamingManager.getInitialContext( [java]     at javax.naming.InitialContext.getDefaultInitCtx(     [java]     at javax.naming.InitialContext.getEnvironment(
     [java]     at com.pega.pegarules.etier.context.EtierEnvironment.runDiscovery

This error occur because, when using Ant to import rulesets to the database, JNDI lookup is done for EngineBMT while initializing the engine. Since no JNDI provider is present in the standalone environment, the lookup fails and throws the above exception

You can ignore this error, as it does not affect the import process.



You can suppress the NoInitialContextException error using the java.naming.factory.initial environment property and a suitable provider, such as the Sun "file system" provider . This property contains the name of the environment property that specifies which initial context format to use. This environment property is passed to initial context constructor, applet parameter, system property, or application resource file.

Set this property in the service provider’s environment parameter, for example:

java.naming.factory.initial = com.sun.jndi.fscontext.RefFSContextFactory

Download and install Sun Microstystem's WWWFile System Service Provider for JNDI 1.2.1 as follows:

  1. From the above link, scroll down to the JNDI 1.2.1 section and click the Download button.
  2. Click the Accept License Agreement radio button.
  3. Select the File System Service Provider checkbox and click Download selected with Sun Download Manager.
  4. Save the file to your hard drive.
  5. Locate the file and double-click to begin the download and installation.
  6. Follow the on-screen instructions to download the fscontext zip file. Note that this file will have version numbers as part of its name.
  7. Extract the contents of the .zip file to your hard drive to use the Service Provider.

NOTE: The .zip file contains two HTML files that provide documentation on using and configuring the Service Provider.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best. is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us