Example usage for java.lang ClassNotFoundException printStackTrace

List of usage examples for java.lang ClassNotFoundException printStackTrace

Introduction

In this page you can find the example usage for java.lang ClassNotFoundException printStackTrace.

Prototype

public void printStackTrace() 

Source Link

Document

Prints this throwable and its backtrace to the standard error stream.

Usage

From source file:com.jroossien.boxx.nms.NMS.java

public <T> Object loadFromNMS(Class<T> dep, Object... objects) {
    if (!dep.isAnnotationPresent(NMSDependant.class))
        return null;
    NMSDependant nmsDependant = dep.getAnnotation(NMSDependant.class);
    Class<?> impl = null;/*from  ww w . ja va 2  s.  c o  m*/
    try {
        impl = Class.forName(nmsDependant.implementationPath() + "." + dep.getSimpleName() + "_" + version);
        return ConstructorUtils.invokeConstructor(impl, objects);
    } catch (ClassNotFoundException e) {
        Boxx.get().error("The current version is not supported: " + version + ".\n" + e.getMessage());
    } catch (InstantiationException | IllegalAccessException | NoSuchMethodException
            | InvocationTargetException e) {
        e.printStackTrace();
    }
    return impl;
}

From source file:edu.ku.brc.af.auth.specify.SpecifySecurityMgr.java

@Override
public boolean authenticateDB(final String user, final String pass, final String driverClass, final String url,
        final String dbUserName, final String dbPwd) throws Exception {
    Connection conn = null;//from  www  .  j  a va 2 s .c o m
    Statement stmt = null;
    boolean passwordMatch = false;

    try {
        Class.forName(driverClass);

        conn = DriverManager.getConnection(url, dbUserName, dbPwd);

        String query = "SELECT * FROM specifyuser where name='" + user + "'"; //$NON-NLS-1$ //$NON-NLS-2$
        stmt = conn.createStatement();
        ResultSet result = stmt.executeQuery(query);
        String dbPassword = null;

        while (result.next()) {
            if (!result.isFirst()) {
                throw new LoginException("authenticateDB - Ambiguous user (located more than once): " + user); //$NON-NLS-1$
            }
            dbPassword = result.getString(result.findColumn("Password")); //$NON-NLS-1$

            if (StringUtils.isNotEmpty(dbPassword) && StringUtils.isAlphanumeric(dbPassword)
                    && UIHelper.isAllCaps(dbPassword) && dbPassword.length() > 20) {
                dbPassword = Encryption.decrypt(dbPassword, pass);
            }
            break;
        }

        /*if (dbPassword == null)
        {
        throw new LoginException("authenticateDB - Password for User " + user + " undefined."); //$NON-NLS-1$ //$NON-NLS-2$
        }*/
        if (pass != null && dbPassword != null && pass.equals(dbPassword)) {
            passwordMatch = true;
        }

        // else: passwords do NOT match, user will not be authenticated
    } catch (java.lang.ClassNotFoundException e) {
        e.printStackTrace();
        edu.ku.brc.af.core.UsageTracker.incrHandledUsageCount();
        edu.ku.brc.exceptions.ExceptionTracker.getInstance().capture(SpecifySecurityMgr.class, e);
        log.error("authenticateDB - Could not connect to database, driverclass - ClassNotFoundException: "); //$NON-NLS-1$
        log.error(e.getMessage());
        throw new LoginException("authenticateDB -  Database driver class not found: " + driverClass); //$NON-NLS-1$
    } catch (SQLException ex) {
        if (debug)
            log.error("authenticateDB - SQLException: " + ex.toString()); //$NON-NLS-1$
        if (debug)
            log.error("authenticateDB - " + ex.getMessage()); //$NON-NLS-1$
        throw new LoginException("authenticateDB - SQLException: " + ex.getMessage()); //$NON-NLS-1$
    } finally {
        try {
            if (conn != null)
                conn.close();
            if (stmt != null)
                stmt.close();
        } catch (SQLException e) {
            edu.ku.brc.af.core.UsageTracker.incrSQLUsageCount();
            edu.ku.brc.exceptions.ExceptionTracker.getInstance().capture(SpecifySecurityMgr.class, e);
            log.error("Exception caught: " + e.toString()); //$NON-NLS-1$
            e.printStackTrace();
        }
    }
    return passwordMatch;
}

From source file:Converter.java

private static void initLookAndFeel() {
    String lookAndFeel = null;/*from ww w .ja v a  2s  . c  om*/

    if (LOOKANDFEEL != null) {
        if (LOOKANDFEEL.equals("Metal")) {
            lookAndFeel = UIManager.getCrossPlatformLookAndFeelClassName();
        } else if (LOOKANDFEEL.equals("System")) {
            lookAndFeel = UIManager.getSystemLookAndFeelClassName();
        } else if (LOOKANDFEEL.equals("Motif")) {
            lookAndFeel = "com.sun.java.swing.plaf.motif.MotifLookAndFeel";
        } else if (LOOKANDFEEL.equals("GTK+")) { // new in 1.4.2
            lookAndFeel = "com.sun.java.swing.plaf.gtk.GTKLookAndFeel";
        } else {
            System.err.println("Unexpected value of LOOKANDFEEL specified: " + LOOKANDFEEL);
            lookAndFeel = UIManager.getCrossPlatformLookAndFeelClassName();
        }

        try {
            UIManager.setLookAndFeel(lookAndFeel);
        } catch (ClassNotFoundException e) {
            System.err.println("Couldn't find class for specified look and feel:" + lookAndFeel);
            System.err.println("Did you include the L&F library in the class path?");
            System.err.println("Using the default look and feel.");
        } catch (UnsupportedLookAndFeelException e) {
            System.err.println("Can't use the specified look and feel (" + lookAndFeel + ") on this platform.");
            System.err.println("Using the default look and feel.");
        } catch (Exception e) {
            System.err.println("Couldn't get specified look and feel (" + lookAndFeel + "), for some reason.");
            System.err.println("Using the default look and feel.");
            e.printStackTrace();
        }
    }
}

From source file:org.web4thejob.orm.EntityMetadataImpl.java

@SuppressWarnings("unchecked")
private Class<? extends Entity> getEntityType(String entityName) {
    try {/*from  ww w. j  a  v a 2s . c  o  m*/
        return (Class<? extends Entity>) Class.forName(entityName);
    } catch (ClassNotFoundException e) {
        e.printStackTrace();
        throw new IllegalArgumentException(entityName + " is not a valid Entity implementation");
    }
}

From source file:com.cnm.cnmrc.fragment.vodtvch.Base.java

/**
 * ? depth?  fragment Base ?? loadingData()? addToBackStack?  ?.
 * ? MainActivity onBackPressed()? back key ?.
 *   ? isFirstDepth false .  4? ?(,?,TV,)? .
 * vod (1st selectedCategory arg : 2nd title arg) : (0:) / (1:?) / (2:TV) / (3:)
 *///from  ww  w .jav a  2  s .c o m
protected void loadingData(int selectedCategory, String title, boolean isFirstDepth, Bundle bundle) {

    //    ft.replace(R.id.loading_data_panel, base)? base?
    //  base? isSldebar? ? ?,  ?  ?, newInstance() ? .
    // this.isFirstDepth = isFirstDepth;

    // 1 depth?  ft.replace(R.id.loading_data_panel, base)? base? ?? hide.
    if (this.isFirstDepth) { // ? ??   ?? ?  ? ??.
        Fragment f = getActivity().getSupportFragmentManager().findFragmentById(R.id.loading_data_panel);
        FragmentTransaction ft = getActivity().getSupportFragmentManager().beginTransaction();
        if (f != null) {
            if (f.isVisible())
                ft.hide(f).commit();
        }

        if (!isFirstDepth)
            setTitle(title);
    } else {
        Fragment f = getActivity().getSupportFragmentManager()
                .findFragmentByTag(((MainActivity) getActivity()).TAG_FRAGMENT_BASE);
        FragmentTransaction ft = getActivity().getSupportFragmentManager().beginTransaction();
        if (f != null) {
            if (f.isVisible())
                ft.hide(f).commit();
        }

        setTitle(title);
    }

    FragmentManager fm = getActivity().getSupportFragmentManager();
    Log.i("hwang", "before adding base fragment count --> " + Integer.toString(fm.getBackStackEntryCount()));

    FragmentTransaction ft = getActivity().getSupportFragmentManager().beginTransaction();
    Class<?> classObject;
    try {
        String packageName = this.getClass().getPackage().getName() + ".";

        classObject = Class.forName(packageName + mClassTypeArray[selectedCategory]);
        Object obj = classObject.newInstance();
        Log.v("hwang", "classObject : " + obj.getClass());

        Base base = ((Base) obj).newInstance(selectedCategory, title, isFirstDepth, bundle);

        Fragment f = getActivity().getSupportFragmentManager().findFragmentById(R.id.vod_tvch_panel);
        if (f != null) {

            ft.add(R.id.loading_data_panel, base, ((MainActivity) getActivity()).TAG_FRAGMENT_BASE);
            ft.addToBackStack(null); // push to "fragment stack" for back key operation
        }
        ft.commit();
        fm.executePendingTransactions();

        // ------------------------------------
        // ? bottom menu? depth level 
        // ------------------------------------
        addDepthLevel();

    } catch (ClassNotFoundException e) {
        e.printStackTrace();
    } catch (java.lang.InstantiationException e) {
        e.printStackTrace();
    } catch (IllegalAccessException e) {
        e.printStackTrace();
    }

    FragmentManager fm1 = getActivity().getSupportFragmentManager();
    Log.i("hwang", "after adding base fragment count --> " + Integer.toString(fm1.getBackStackEntryCount()));
}

From source file:cn.vlabs.duckling.vwb.service.auth.policy.AuthorizationFileParser.java

private Permission parsePermission() throws AuthorizationSyntaxParseException, IOException {
    String perm = ats.nextUsefulToken();
    if (perm == null) {
        throw new AuthorizationSyntaxParseException("Line " + ats.getLineNum() + ", permission syntax error");
    } else if (!perm.toLowerCase().equals("permission")) {
        String rightBracket = perm;
        if (rightBracket == null || !rightBracket.contains("}")) {
            throw new AuthorizationSyntaxParseException("Line " + ats.getLineNum() + ", no right bracket");
        } else if (!rightBracket.contains(";")) {
            throw new AuthorizationSyntaxParseException("Line " + ats.getLineNum() + ", no \";\" sign finded");
        }/*from  w w  w .  ja v a2  s . c  o m*/
        return null;
    }
    String className = ats.nextUsefulToken();
    String isEnd = ats.nextUsefulToken();
    if (className == null) {
        throw new AuthorizationSyntaxParseException("Line " + ats.getLineNum() + ", className is null");
    }
    if (isEnd == null) {
        throw new AuthorizationSyntaxParseException("Line " + ats.getLineNum() + ", no operate object defined");
    } else {
        try {
            if (!isEnd.contains(";")) {
                String oper = isEnd;
                oper = oper.replace("\"", "");
                oper = oper.replace(",", "");
                isEnd = ats.nextUsefulToken();
                if (isEnd != null && isEnd.contains(";")) {
                    String actions = isEnd.replace(";", "");
                    actions = actions.replace("\"", "");
                    Class<?> clazz = Class.forName(className, false, VWBPermission.class.getClassLoader());
                    return ((Permission) clazz
                            .getDeclaredConstructor(new Class[] { String.class, String.class })
                            .newInstance(oper, actions));
                } else {
                    throw new AuthorizationSyntaxParseException(
                            "Line " + ats.getLineNum() + ", no \";\" sign finded");
                }
            } else {
                String oper = isEnd.replace(";", "");
                oper = oper.replace("\"", "");
                Class<?> clazz = Class.forName(className);
                return ((Permission) clazz.getDeclaredConstructor(String.class).newInstance(oper));
            }
        } catch (ClassNotFoundException e) {
            throw new AuthorizationSyntaxParseException(
                    "Line " + ats.getLineNum() + ", ClassNotFoundException, " + e.getMessage());
        } catch (Exception e) {
            e.printStackTrace();
            throw new AuthorizationSyntaxParseException(
                    "Line " + ats.getLineNum() + ", Exception happens, " + e.getMessage());
        }
    }
}

From source file:io.s4.meter.controller.RestletCommunicator.java

/**
 * Creates an implementation of the {@link Communicator}. This is the only
 * way to create an instance.//from ww w  .  j a va  2  s  . c  om
 * 
 * @param hosts
 *            the remote generators hostnames.
 * @param ports
 *            the remote generators ports.
 * @param classURI
 *            the URI used to upload the custom generator class and
 *            dependent classes.
 * @param instanceURI
 *            the URI used to upload the generator object.
 * @param actionURI
 *            the URI for sending commands to the remote generators.
 * @param eventGeneratorClassname
 *            the class name of the custom event generator.
 * @param dependentClassnames
 *            the class names of the classes used by the event generator
 *            that are not available in the classpath of the remote event
 *            generators.
 */
public RestletCommunicator(String[] hosts, String[] ports, String classURI, String instanceURI,
        String actionURI, String eventGeneratorClassname, String[] dependentClassnames) {

    /* Validate parameters. */
    if (hosts == null) {
        throw new NullPointerException("hosts.");
    }
    if (ports == null) {
        throw new NullPointerException("ports.");
    }
    if (hosts.length != ports.length) {
        throw new IllegalArgumentException("Number of hosts (" + hosts.length + ") and number of ports ("
                + ports.length + ") don't match.");
    }
    if (eventGeneratorClassname == null) {
        throw new NullPointerException("eventGeneratorClassname.");
    }
    if (classURI == null) {
        throw new NullPointerException("classURI.");
    }
    if (instanceURI == null) {
        throw new NullPointerException("instanceURI.");
    }
    if (actionURI == null) {
        throw new NullPointerException("actionURI.");
    }

    this.hosts = hosts;
    int numHosts = hosts.length;
    this.ports = ports;

    /* Create REST resources. */
    genClassResource = new ClientResource[numHosts];
    genResource = new ClientResource[numHosts];
    actionResource = new ClientResource[numHosts];

    for (int i = 0; i < numHosts; i++) {
        genClassResource[i] = new ClientResource("http://" + hosts[i] + ":" + ports[i] + classURI);
        genResource[i] = new ClientResource("http://" + hosts[i] + ":" + ports[i] + instanceURI);
        actionResource[i] = new ClientResource("http://" + hosts[i] + ":" + ports[i] + actionURI);

        logger.trace(genClassResource.toString());
        logger.trace(genResource.toString());
        logger.trace(actionResource.toString());
    }

    /*
     * We need to send the event generator class and dependent classes to
     * the remote hosts. These classes are not available in the remote host
     * and need to all be loaded with the same ClassLoader.
     */
    int i = 0;
    try {
        int numClasses = 1;
        if (dependentClassnames != null)
            numClasses = dependentClassnames.length + 1;
        classes = new Class[numClasses];
        classes[i++] = Class.forName(eventGeneratorClassname);
        for (; i < numClasses; i++) {
            classes[i] = Class.forName(dependentClassnames[i - 1]);
        }

    } catch (ClassNotFoundException e) {
        String className = (i == 0) ? eventGeneratorClassname : dependentClassnames[i - 1];
        logger.error("Couldn't find class for name: " + className);
        e.printStackTrace();
    }
}

From source file:cai.flow.packets.V5_Packet.java

/**
 * UDPflowsVector/*  w w w  .j a  v a  2s  .c  o m*/
 *
 * @param RouterIP
 * @param buf
 * @param len
 * @throws DoneException
 */
@SuppressWarnings("unchecked")
public V5_Packet(String RouterIP, byte[] buf, int len) throws DoneException {
    if (false) {//(Params.DEBUG) {
        // 
        File tmpFile = new File(Params.path + File.separator + "cache.tmp");
        if (tmpFile.exists()) {
            try {
                ObjectInputStream fIn = new ObjectInputStream(new FileInputStream(tmpFile));
                try {
                    buf = (byte[]) fIn.readObject();
                    len = ((Integer) fIn.readObject()).intValue();
                } catch (ClassNotFoundException e) {
                    e.printStackTrace();
                }
                fIn.close();
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            }
        } else {
            try {
                ObjectOutputStream fOut;
                fOut = new ObjectOutputStream(new FileOutputStream(tmpFile));
                fOut.writeObject(buf);
                fOut.writeObject(new Integer(len));
                fOut.flush();
                fOut.close();
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            } catch (IOException e1) {
                e1.printStackTrace();
            }
        }
        // 
    }
    if (len < V5_Header_Size)
        throw new DoneException("    * incomplete header *");

    this.RouterIP = RouterIP;
    count = Util.to_number(buf, 2, 2);

    if (count <= 0 || len != V5_Header_Size + count * V5_Flow_Size)
        throw new DoneException("    * corrupted packet " + len + "/" + count + "/"
                + (V5_Header_Size + count * V5_Flow_Size) + " *");

    SysUptime = Util.to_number(buf, 4, 4);
    unix_secs = Util.to_number(buf, 8, 4);
    unix_nsecs = Util.to_number(buf, 12, 4);
    flow_sequence = Util.to_number(buf, 16, 4);
    engine_type = buf[20];
    engine_id = buf[21];

    logger.debug("    uptime: " + Util.uptime(SysUptime / 1000) + ", date: " + unix_secs + "." + unix_nsecs);
    logger.debug("    sequence: " + flow_sequence + ", count: " + count + ", engine: " + engine_type + "/"
            + engine_id);

    flows = new Vector((int) count);

    for (int i = 0, p = V5_Header_Size; i < count; i++, p += V5_Flow_Size) {
        V5_Flow f;
        try {
            f = new V5_Flow(RouterIP, buf, p);
            if (Params.DEBUG) {
                if (!f.equals(
                        new V5_Flow(RouterIP, buf, p, TemplateManager.getTemplateManager().getV5Template()))) {
                    logger.error("ERROR: Data inconsistency with different algorithm");
                }
            }
            if (f.srcaddr != null && f.dstaddr != null) {
                flows.add(f);
            } else {
                if (Params.DEBUG) {
                    logger.error(f.srcaddr + "  " + f.dstaddr + "    ");
                }
            }
        } catch (DoneException e) {
            if (Params.DEBUG) {
                logger.debug("", e);
            }
            if (e.getMessage() != null && (!e.getMessage().equals(""))) {
                logger.debug("", e);
            }
        }
    }
}

From source file:com.he5ed.lib.cloudprovider.picker.CloudPickerActivity.java

/**
 * @hide/*from ww  w .  j ava2  s.c  o  m*/
 */
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.cp_activity_picker);
    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);

    DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
    // lock right drawer from been swiped open
    drawer.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED, GravityCompat.END);
    ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(this, drawer, toolbar,
            R.string.navigation_drawer_open, R.string.navigation_drawer_close);
    drawer.setDrawerListener(toggle);
    toggle.syncState();

    NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
    navigationView.setNavigationItemSelectedListener(this);
    navigationView.setItemIconTintList(null); // remove the auto grey tint to keep icon color
    Menu menu = navigationView.getMenu();
    CloudProvider cloudProvider = CloudProvider.getInstance(this);
    // check whether individual account is assigned
    String accountId = getIntent().getStringExtra(EXTRA_PICK_ACCOUNT_ID);
    if (!TextUtils.isEmpty(accountId)) {
        mAccounts = new CloudAccount[1];
        mAccounts[0] = cloudProvider.getAccountById(accountId);
    } else {
        mAccounts = cloudProvider.getCloudAccounts();
    }
    // populate navigation menu
    for (int i = 0; i < mAccounts.length; i++) {
        CloudAccount account = mAccounts[i];
        MenuItem item = menu.add(0, i, 0, account.getUser().email);
        // use cloud API class reflection
        try {
            Class clazz = Class.forName(account.api);
            Field iconResource = clazz.getField("ICON_RESOURCE");
            item.setIcon(iconResource.getInt(null));
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        } catch (NoSuchFieldException e) {
            e.printStackTrace();
            item.setIcon(R.drawable.ic_cloud_black_24dp);
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        }

        item.setCheckable(true);
    }

    mFragmentManager = getSupportFragmentManager();
    mItemFragment = (ItemFragment) mFragmentManager.findFragmentById(R.id.right_drawer_view);
    if (mItemFragment == null) {
        mItemFragment = new ItemFragment();
        mFragmentManager.beginTransaction().add(R.id.right_drawer_view, mItemFragment).commit();
    }

    mProgressBar = (ProgressBar) findViewById(R.id.progress_bar);
    mErrorView = (LinearLayout) findViewById(R.id.error_view);
    if (savedInstanceState != null) {
        switch (savedInstanceState.getInt("empty_view_visibility")) {
        case View.VISIBLE:
            mErrorView.setVisibility(View.VISIBLE);
            ImageView icon = (ImageView) mErrorView.findViewById(R.id.empty_icon_image_view);
            TextView title = (TextView) mErrorView.findViewById(R.id.empty_title_text_view);
            TextView detail = (TextView) mErrorView.findViewById(R.id.empty_detail_text_view);
            Bitmap bitmap = savedInstanceState.getParcelable("icon_drawable");
            icon.setImageBitmap(bitmap);
            title.setText(savedInstanceState.getCharSequence("title_text"));
            detail.setText(savedInstanceState.getCharSequence("detail_text"));
            break;
        case View.INVISIBLE:
            mErrorView.setVisibility(View.INVISIBLE);
            break;
        case View.GONE:
            mErrorView.setVisibility(View.GONE);
            break;
        }
    } else {
        // open drawer on first load
        drawer.openDrawer(GravityCompat.START);
    }
}

From source file:edu.uw.sig.frames2owl.util.ConfigReader.java

private void init() {
    /*//  w  ww  .j  a va2  s.co  m
     <iri project='cho'>
       <value_source>FMAID</value_source>
       <value_comp>{value}</value_comp>
       <fragment_separator>#</fragment_separator>
    </iri>
     */
    // read iri config info
    List<HierarchicalConfiguration> iriConfs = config.configurationsAt("iri");
    for (HierarchicalConfiguration iriConf : iriConfs) {
        // get the project name
        String projectName = iriConf.getString("[@project]");
        String iriDomain = iriConf.getString("iri_domain");
        String valSource = iriConf.getString("value_source");
        String valComp = iriConf.getString("value_comp");
        String fragSep = iriConf.getString("fragment_separator");
        IRIConf currIriConf = new IRIConf(valSource, iriDomain, valComp, fragSep);
        proj2IriConfMap.put(projectName, currIriConf);
    }

    // read config flags and add to map
    HierarchicalConfiguration flags = config.configurationAt("conf-flags");
    if (flags != null) {
        Iterator<String> flagsIt = flags.getKeys();
        while (flagsIt.hasNext()) {
            // get the name of the flag
            String flagName = flagsIt.next();

            // get flag value as string
            boolean flagVal = flags.getBoolean(flagName);

            // put in flag map
            configFlags.put(flagName, flagVal);
        }
    }
    //System.err.println(configFlags);

    // read general configuration parameters
    List<HierarchicalConfiguration> reifExcl = config.configurationsAt("general_conv_args.reif_exclusion");
    for (HierarchicalConfiguration exclusion : reifExcl) {
        // get slot name and conversion class name
        String excludedSlots = exclusion.getString("[@excluded_slots]");
        for (String excl : excludedSlots.split(","))
            reifExclusions.add(excl);
    }

    List<HierarchicalConfiguration> slotAnnotExcl = config
            .configurationsAt("general_conv_args.slot_annot_exclusion");
    for (HierarchicalConfiguration exclusion : slotAnnotExcl) {
        // get slot name and conversion class name
        String excludedSlots = exclusion.getString("[@excluded_slots]");
        for (String excl : excludedSlots.split(","))
            slotAnnotExclusions.add(excl);
    }

    // name and location of class that will be used to contruct named domain classes for annotation props
    List<HierarchicalConfiguration> domainConfs = config.configurationsAt("general_conv_args.domain");
    for (HierarchicalConfiguration domainConf : domainConfs) {
        // get slot name and conversion class name
        domainClsName = domainConf.getString("[@cls-name]");
        domainSuperClsName = domainConf.getString("[@super-cls-name]");
    }

    // name and location of class that will be used to contruct named range classes for annotation props
    List<HierarchicalConfiguration> rangeConfs = config.configurationsAt("general_conv_args.range");
    for (HierarchicalConfiguration rangeConf : rangeConfs) {
        // get slot name and conversion class name
        rangeClsName = rangeConf.getString("[@cls-name]");
        rangeSuperClsName = rangeConf.getString("[@super-cls-name]");
    }

    // read config file to determine which Java classes to use for which slot conversion
    List<HierarchicalConfiguration> slotConverters = config
            .configurationsAt("slot_conv_classes.slot_conv_class");
    for (HierarchicalConfiguration slotConverter : slotConverters) {
        // get slot name and conversion class name
        String slotName = slotConverter.getString("[@slot_name]");
        String convClsName = slotConverter.getString("[@conv_cls_name]");

        try {
            Class convClass = Class.forName(convClsName);
            slotConvMap.put(slotName, convClass);
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
            continue;
        }

        // gather additional arguments if there are any
        Iterator<String> iter = slotConverter.getKeys();
        Map<String, String> attrMap = new HashMap<String, String>();
        while (iter.hasNext()) {
            String key = iter.next();

            if (!key.equals("[@slot_name]") && !key.equals("[@conv_cls_name]")) {
                //System.err.println("found key for init args = "+key+" for slot "+slotName);
                String attrVal = slotConverter.getString(key);
                key = key.replaceAll("^\\[@", "");
                key = key.replaceAll("\\]$", "");
                attrMap.put(key, attrVal);
            }

        }
        convInitArgsMap.put(slotName, attrMap);
    }

    /*
     <inst_conv_classes>
      <inst_conv_class type="Mapping" 
    conv_cls_name="edu.uw.sig.frames2owl.instconv.impl.MappingConverter" 
    source_slot="source" 
    target_slot="target" 
    direct_property_name="mapsTo" 
    excluded_slots=""/>
    </inst_conv_classes>
     */

    // read config file to determine which Java classes to use for which slot conversion
    List<HierarchicalConfiguration> instConverters = config
            .configurationsAt("inst_conv_classes.inst_conv_class");
    for (HierarchicalConfiguration instConverter : instConverters) {
        String typeName = instConverter.getString("[@type_name]");
        String convClsName = instConverter.getString("[@conv_cls_name]");

        try {
            Class convClass = Class.forName(convClsName);
            instConvMap.put(typeName, convClass);
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
            continue;
        }

        // gather additional arguments if there are any
        Iterator<String> iter = instConverter.getKeys();
        Map<String, String> attrMap = new HashMap<String, String>();
        while (iter.hasNext()) {
            String key = iter.next();

            if (!key.equals("[@type]") && !key.equals("[@conv_cls_name]")) {
                //System.err.println("found key for init args = "+key+" for slot "+slotName);
                String attrVal = instConverter.getString(key);
                key = key.replaceAll("^\\[@", "");
                key = key.replaceAll("\\]$", "");
                attrMap.put(key, attrVal);
            }

        }
        instConvInitArgsMap.put(typeName, attrMap);
    }

}