EJB 3.0 & JBoss -- How to run a SLSB in JBoss

Hi All,
I am having trouble running an EJB 3.0 SLSB on JBoss AS. I have also tried those specified by others in their cases but havent been able to solve mine. The ejb-jar file is deploying nicely in the server without any errors but I do find that jar files of aspect are not being deployed (the trace is avbl at the end). Have they got to do anything with this?
I dont know whether I am missing anything or something that has been overlooked. Please diagonise this.
JBoss AS 4.0.4 GA (installed using EJB 3.0 option)
JDeveloper 10.1.3 (updated)
Local
@Local
public interface TestStateLessLocal {
SLSB
@Stateless(name="TestStateLess")
@LocalBinding(jndiBinding="TestStateLess")
public class TestStateLessBean implements TestStateLessLocal {
public TestStateLessBean() {
System.out.println(">>> In the bean constructor");
Client Prg
public class SLSBClient {
public SLSBClient() {
try {
Hashtable env = new Hashtable();
env.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
env.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
env.put("java.naming.provider.url", "jnp://localhost:1099");
Context ctx = new InitialContext(env);
System.out.println("Context created");
ctx.lookup("java:comp/env/ejb/TestStateLessLocal");
System.out.println("Success");
catch (Exception ex) {
System.out.println("... EXCEPTION THROWN ...");
ex.printStackTrace();
public static void main(String[] args) {
SLSBClient sLSBClient = new SLSBClient();
jboss.xml
<session>
<ejb-name>TestStateLess</ejb-name>
<local-jndi-name>TestStateLess</local-jndi-name>
</session>
Exception Trace
javax.naming.NameNotFoundException: comp not bound
     at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
     at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
     at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
     at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
     at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
     at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
     at javax.naming.InitialContext.lookup(InitialContext.java:351)
     at SLSBClient.<init>(SLSBClient.java:18)
     at SLSBClient.main(SLSBClient.java:29)
Process exited with exit code 0.
Trace in JBoss when starting the server
--- Incompletely deployed packages ---
org.jboss.deployment.DeploymentInfo@5b9bf3f3 { url=file:/D:/JBoss/server/default/deploy/jboss-aop.deployer/base-aop.xml }
deployer: org.jboss.aop.deployment.AspectDeployer@4ac216
status: Created
state: CREATED
watch: file:/D:/JBoss/server/default/deploy/jboss-aop.deployer/base-aop.xml
altDD: null
lastDeployed: 1151050772890
lastModified: 1151050772890
mbeans:
org.jboss.deployment.DeploymentInfo@24ac8a8b { url=file:/D:/JBoss/server/default/deploy/jboss-aop.deployer/jboss-aop.jar }
deployer: org.jboss.deployment.JARDeployer@7a1576
status: Created
state: CREATED
watch: file:/D:/JBoss/server/default/deploy/jboss-aop.deployer/jboss-aop.jar
altDD: null
lastDeployed: 1151050773171
lastModified: 1151050772984
mbeans:
org.jboss.deployment.DeploymentInfo@36b91a6d { url=file:/D:/JBoss/server/default/deploy/jboss-aop.deployer/jboss-aspect-library.jar }
deployer: org.jboss.deployment.JARDeployer@7a1576
status: Created
state: CREATED
watch: file:/D:/JBoss/server/default/deploy/jboss-aop.deployer/jboss-aspect-library.jar
altDD: null
lastDeployed: 1151050773281
lastModified: 1151050773203
mbeans:
org.jboss.deployment.DeploymentInfo@baf16a1f { url=file:/D:/JBoss/server/default/deploy/jboss-aop.deployer/trove.jar }
deployer: org.jboss.deployment.JARDeployer@7a1576
status: Created
state: CREATED
watch: file:/D:/JBoss/server/default/deploy/jboss-aop.deployer/trove.jar
altDD: null
lastDeployed: 1151050773406
lastModified: 1151050773312
mbeans:
org.jboss.deployment.DeploymentInfo@c84cee44 { url=file:/D:/JBoss/server/default/deploy/jboss-aop.deployer/ }
deployer: org.jboss.deployment.SARDeployer@5dd582
status: Deployment FAILED reason: Trying to install an already registered mbean: jboss.aop:service=AspectManager
state: FAILED
watch: file:/D:/JBoss/server/default/deploy/jboss-aop.deployer/META-INF/jboss-service.xml
altDD: null
lastDeployed: 1151050773406
lastModified: 1150602082358
mbeans:
Any help would be greatly appreciated.
Thanks & Regards,
Hans.

Hi Prasanth,
Thank you for responding. Checked out the link. As per the steps listed, I added the jar files and tried looking up as mentioned. However, I am not able to find the session bean registered in JNDIView. I am attaching the trace. Could you please check that out.
Thanks & Regards,
Hans.
Trace in JMX Console
java: Namespace
+- jaas (class: javax.naming.Context)
| +- other (class: org.jboss.security.plugins.SecurityDomainContext)
| +- HsqlDbRealm (class: org.jboss.security.plugins.SecurityDomainContext)
| +- jbossmq (class: org.jboss.security.plugins.SecurityDomainContext)
| +- JmsXARealm (class: org.jboss.security.plugins.SecurityDomainContext)
+- TransactionPropagationContextImporter (class: org.jboss.tm.TransactionPropagationContextImporter)
+- JmsXA (class: org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl)
+- comp.ejb3 (class: javax.naming.Context)
| NonContext: null
+- JBossCorbaNaming (class: org.omg.CosNaming.NamingContextExt)
+- DefaultDS (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)
+- StdJMSPool (class: org.jboss.jms.asf.StdServerSessionPoolFactory)
+- TransactionManager (class: org.jboss.tm.TxManager)
+- JBossCorbaPOA (class: org.omg.PortableServer.POA)
+- MSSQLDS (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)
+- TransactionPropagationContextExporter (class: org.jboss.tm.TransactionPropagationContextFactory)
+- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
+- DefaultJMSProvider (class: org.jboss.jms.jndi.JNDIProviderAdapter)
+- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
+- JBossCorbaInterfaceRepositoryPOA (class: org.omg.PortableServer.POA)
+- Mail (class: javax.mail.Session)
+- JBossCorbaORB (class: org.omg.CORBA.ORB)
+- timedCacheFactory (class: javax.naming.Context)
Failed to lookup: timedCacheFactory, errmsg=org.jboss.util.TimedCachePolicy
+- SecurityProxyFactory (class: org.jboss.security.SubjectSecurityProxyFactory)
+- comp (class: javax.naming.Context)
Global JNDI Namespace
+- HASessionState (class: org.jnp.interfaces.NamingContext)
| +- Default (class: org.jboss.ha.hasessionstate.server.HASessionStateImpl)
+- TopicConnectionFactory (class: org.jboss.naming.LinkRefPair)
+- jmx (class: org.jnp.interfaces.NamingContext)
| +- invoker (class: org.jnp.interfaces.NamingContext)
| | +- RMIAdaptor (proxy: $Proxy47 implements interface org.jboss.jmx.adaptor.rmi.RMIAdaptor,interface org.jboss.jmx.adaptor.rmi.RMIAdaptorExt)
| +- rmi (class: org.jnp.interfaces.NamingContext)
| | +- RMIAdaptor[link -> jmx/invoker/RMIAdaptor] (class: javax.naming.LinkRef)
+- HTTPXAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
+- TestStateLess (proxy: $Proxy74 implements No ClassLoaders found for: TestStateLessLocal (no security manager: RMI class loader disabled))
+- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
+- UserTransactionSessionFactory (proxy: $Proxy57 implements interface org.jboss.tm.usertx.interfaces.UserTransactionSessionFactory)
+- HTTPConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
+- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
+- invokers (class: org.jnp.interfaces.NamingContext)
| +- soumitri (class: org.jnp.interfaces.NamingContext)
| | +- iiop (class: org.jboss.invocation.iiop.IIOPInvoker)
+- UserTransaction (class: org.jboss.tm.usertx.client.ClientUserTransaction)
+- UILXAConnectionFactory[link -> XAConnectionFactory] (class: javax.naming.LinkRef)
+- UIL2XAConnectionFactory[link -> XAConnectionFactory] (class: javax.naming.LinkRef)
+- HAPartition (class: org.jnp.interfaces.NamingContext)
| +- DefaultPartition (class: org.jboss.ha.framework.server.HAPartitionImpl)
+- topic (class: org.jnp.interfaces.NamingContext)
| +- testDurableTopic (class: org.jboss.mq.SpyTopic)
| +- testTopic (class: org.jboss.mq.SpyTopic)
| +- securedTopic (class: org.jboss.mq.SpyTopic)
+- queue (class: org.jnp.interfaces.NamingContext)
| +- A (class: org.jboss.mq.SpyQueue)
| +- testQueue (class: org.jboss.mq.SpyQueue)
| +- ex (class: org.jboss.mq.SpyQueue)
| +- DLQ (class: org.jboss.mq.SpyQueue)
| +- D (class: org.jboss.mq.SpyQueue)
| +- C (class: org.jboss.mq.SpyQueue)
| +- B (class: org.jboss.mq.SpyQueue)
+- console (class: org.jnp.interfaces.NamingContext)
| +- PluginManager (proxy: $Proxy49 implements No ClassLoaders found for: org.jboss.console.manager.PluginManagerMBean (no security manager: RMI class loader disabled))
+- UIL2ConnectionFactory[link -> ConnectionFactory] (class: javax.naming.LinkRef)
+- HiLoKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.hilo.HiLoKeyGeneratorFactory)
+- UILConnectionFactory[link -> ConnectionFactory] (class: javax.naming.LinkRef)
+- EventDispatcher (class: org.jboss.ws.eventing.mgmt.DispatcherDelegate)
+- QueueConnectionFactory (class: org.jboss.naming.LinkRefPair)
+- UUIDKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.uuid.UUIDKeyGeneratorFactory)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • How to run a servlet with jboss

    Hello everybody my name is Noe I'm new in the forums . I want some information about how to configure and run a servlet and a jsp for the jboss server . Please help me, I have about 4 days searching information about this, and there is few information or the tutorials that I read were insuficient. I need one tutorial step by step or someone that explain me how to do this. Please help me with this
    Thank's a lot.

    Which error do you get!
    If you just want to run jsps and servlets the you should use tomcat instead of jboss.
    jboss is an aplication server that uses tomcat and adds an EJB container.
    usually you use a build.xml file to run deployment scripts but if not, then you can manually copy the project folder into the jboss --> instance ---> web zone (I said this way because I dont remember the exactly folder)
    Another thing is that you must have the project estructure built on the correct way defined by the estandar. I mean the WEB-INF folder, the web.xml file, the classes folder, etc.
    next time yo may consider to post this on the j2ee section.
    a web.xml file.
    What problem do you exactly have when doing this, you cant ask for a tutorial step by step, but punctual things. Try it and if you cant then ask.

  • How to run richfaces application in JBOSS

    hi,
    I installed jboss-4.2.2.GA and extracted richfaces-ui-3.2.1.GA-src in the jboss-4.2.2.GA\server\default\deploy folder.
    But while running richfaces application through http://localhost:8080/richfaces-ui-3.2.1.GA-src , showing "HTTP Status 404 - /richfaces-ui-3.2.1.GA-src" error. I tried to run other simple applications, but those are also not running, as the same error showing "HTTP Status 404"....
    please help me asap.

    I'm sorry man, but you are not getting out the easy way no matter how many times you post the same question. Whole books have been written on the subjects of JBoss and JSF and you are going to have to read at least some articles online if you are going to get anywhere. It is not something that has a simple 123 step guide, this is complex material that requires research, study and effort to accomplish.
    So your first step is to go figure out what the structure of a JSF web application is and how to deploy one to JBoss. Good luck.

  • How to run EJB session beans outside of a container

    Hello,
    I m trying to run in a testcase some EJB such as Session stateless, Session stateful of entities. For this last one, everythin works fine. Unfortunately, I cant figure out how to run and retrieve by JNDI my session beans.
    I itried to run my beans in the JBOSS embedded EJB runtime, and it works fine.
    It would be nice I anyone could give me some explanations or a link about this subject :)
    Thanks
    Regards,
    Alexandre

    Three things I would want to know before considering answering your question.
    1. What version number to 3 decimal places?
    2. Why?
    3. Why? And this time make it a full and complete explanation. <g>
    Sorry but this is not a normal thing to ask and I am rather concerned about the motivation.

  • How to run EJBs Session in standalone mode

    Hello,
    I m trying to run in a testcase some EJB such as Session stateless, Session stateful of entities. For this last one, everythin works fine. Unfortunately, I cant figure out how to run and retrieve by JNDI my session beans.
    I itried to run my beans in the JBOSS embedded EJB runtime, and it works fine.
    It would be nice I anyone could give me some explanations or a link about this subject :-)
    Thanks
    Regards,
    Alexandre

    Yes, called BootCamp. Enjoy:  http://www.apple.com/support/bootcamp/
    Or you can run the Windows OS virtualized using VMWare Fusion ($49), Parallels Desktop ($99) or Oracle VirtualBox (free). This lets you run both OS at the same time: MacOS is the host and Windows the guest.

  • How to run the ejb project in j2ee server

    How to run the EJB project.
    I give like
    java conveterClient converterClient.jar
    here conveterClient is class file name and converterClient.jar is deployed file
    like wise i give some exception is come
    give some help pls friends

    Navigate to the "DBOrders" module in the catalog, right click on the "ORDERS" database below and click "Export Schema Stucture". That will produce a file containing the DML needed to create the database

  • How to run ejb application OC4J J2EE Container

    Hi all,
    I unable run ejb applications in OC4J J2EE Container.
    I have configure following files.
    in config directory
    Server.xml
    I have .ear file if configured in server.xml. this .ear copied into home/application directory
    I have create following deployment discriptor file.
    in META-INF for ejb.
    ejb-jar.xml
    application.xml
    I have specify all ejb classes details in ejb-jar.xml
    Please help me .How to run ejbs with jsp and application client.Which files shall i configure.
    Thnaks,

    Hi all,
    I unable run ejb applications in OC4J J2EE Container.
    I have configure following files.
    in config directory
    Server.xml
    I have .ear file if configured in server.xml. this .ear copied into home/application directory
    I have create following deployment discriptor file.
    in META-INF for ejb.
    ejb-jar.xml
    application.xml
    I have specify all ejb classes details in ejb-jar.xml
    Please help me .How to run ejbs with jsp and application client.Which files shall i configure.
    Thnaks,

  • How to run EJB in Tomcat4,1

    Hi All
    Can any one tell me how to run EJB in Tomcat4.1?
    Thanks

    Can any one tell me how to run EJB in Tomcat4.1?You would need something for that, like Open EJB
    http://openejb.codehaus.org/

  • How to run EJB IN WEBLOGIC8.1?

    Hi
    Can any one tell me how to run Ejb in Weblogic8.1?
    Thanks

    bikash2007 wrote:
    how to run ejb using WEBLOGIC8.1?you noticed, of course, that the original request was 3 years old.
    same as any other java ee app server, of course - package your ejbs in an ear and deploy it to the /application directory once you've created a user domain for that project. consult the bea docs for the details, but that should be enough to get you started.
    %

  • How to run ejb (JServer) client in web browser

    Did anyone try the ClubMed example under $ORACLE_HOME/javavm/demo/examples/ejb/applets/ClubMed?
    Does anyone know how to run the applets in latest Netscape and/or IE browsers? What do I need to do to set up security, etc. Thanks.
    null

    Forms client side is a Java applet, so it needs a Web browser to run. Anyway you could try to run it with the Java Web Start.
    <p>See this Jan Carlin entry.</p>
    Francois

  • How to run Session ejb client program?

    Hi
    I am using weblogic server8.1 . I was running an ejb session client program it throws exception like below. Can any one tell me how to run a client in weblogic server. give the syntax for running ejb client.
    D:\Weblogicserver\user_projects\domains\mydomain\applications\MyEJB\stateful>jav
    a -cp .;c:\j2ee\j2ee.jar;c:\weblogic\classes;D:\Weblogicserver\weblogic81\server
    \lib\weblogic.jar PortfolioClient
    Exception in thread "main" java.lang.NoClassDefFoundError: PortfolioClient (wron
    g name: stateful/PortfolioClient)
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
    3)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
    bye

    If stateful is the package for the client application, you should be executing from
    D:\Weblogicserver\user_projects\domains\mydomain\applications\MyEJB
    on the command line. The command should look like -
    java -classpath <whatever should be here> stateful.MyClient

  • How to run servlets, jsp, ejb..?

    dear friends,
    i will be happy if anyone suggest how to run jsp, servlets, ejb. and also do give the proper server to run these. it will be helpful if u give the URL's . An early reply is helpful. thanx and bye for now. my email id is [email protected]

    this is the site where i learn jsp from :
    http://www.jsptut.com/

  • How to run jsp and servlet using JBOSS server

    Dear Friend,
    I have JBoss application server and Eclipse id
    now i want to run JSP and Servlet but i am not getting the place where to place my servlet class file to run it .
    before that i run jsp and servlet using tomcat5.0 but in that i place my servlet class in WEB-INF/classes folder and do corresponding entry in web.xml file and run it through browser.
    now i want to use JBOSS how it is possible
    PLZ Help me

    Is the servlet class defined in a package.? If servlet class package is servlets., copy the servlet to
    WEB-INF/classes/servlets directory.

  • I am beginer with EJB .Someone can show me how to run EJB,please

    I am beginer with EJB .Someone can show me how to run EJB,please
    You can give me 1 example Complete and present Compltely!
    My Email : [email protected]
    Thanks you!

    Do the same that the rest of us do: buy a book. Enterprise Javabeans 3 from O'Reilly is an excellent book that will teach you all you need to know, if you are willing to put in a little effort.

  • How to run EJB through a ide and not command line

    I have been trying out a simple Cart EJB. I have no problem running the whole thing through command line using the runclient script. But when i compile and run the same code in my ide it chucks the following error
    Caught an unexpected exception!
    javax.naming.NameNotFoundException: No object bound for java:comp/env/ejb/SimpleCart
         at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:116)
         at javax.naming.InitialContext.lookup(InitialContext.java:350)
         at CartClient.main(CartClient.java:26)
    Is there any reasons you cant run an EJB client code through an ide. This is the code i am using
    // Decompiled by DJ v3.0.0.63 Copyright 2002 Atanas Neshkov Date: 8/20/2002 2:33:45 PM
    // Home Page : http://members.fortunecity.com/neshkov/dj.html - Check often for new version!
    // Decompiler options: packimports(3)
    // Source File Name: CartClient.java
    import java.io.PrintStream;
    import java.util.Enumeration;
    import java.util.Vector;
    import javax.ejb.EJBObject;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.rmi.PortableRemoteObject;
    public class CartClient
    public CartClient()
    public static void main(String args[])
    try
    InitialContext initialcontext = new InitialContext();
    Object obj = initialcontext.lookup("java:comp/env/ejb/SimpleCart");
    CartHome carthome = (CartHome)PortableRemoteObject.narrow(obj, CartHome.class);
    Cart cart = carthome.create("Duke DeEarl", "123");
    cart.addBook("The Martian Chronicles");
    cart.addBook("2001 A Space Odyssey");
    cart.addBook("The Left Hand of Darkness");
    Vector vector = new Vector();
    vector = cart.getContents();
    String s;
    for(Enumeration enumeration = vector.elements(); enumeration.hasMoreElements(); System.out.println(s))
    s = (String)enumeration.nextElement();
    cart.removeBook("Alice in Wonderland");
    cart.remove();
    catch(BookException bookexception)
    System.err.println("Caught a BookException: " + bookexception.getMessage());
    catch(Exception exception)
    System.err.println("Caught an unexpected exception!");
    exception.printStackTrace();
    }

    Are you setting the system properties for your Java runtime in the IDE?
    You might need some command-line options along the lines of
    Djava.naming.provider.url=BAR -Djava.naming.factory.initial=FOO
    Failing that you might have to do a global JNDI lookup instead of a local one but that'd be far from ideal.

Maybe you are looking for

  • How to have multiple default dimension members

    Hi There I am using AS2008, when editing a role, under the dimension data tab, under advanced, you can define a default dimension member. However i need my default dimension member to be members, i have tried using a attribute set to true for many me

  • CS3 export to PDF jagged text

    My file is just text, and it looks beautiful when I print directly from InDesign. However, when I export to PDF, the text has noticeably jagged edges. I've tried all the included export settings. I've tried printing to a PDF directly. These all look

  • Costcenter

    hi sap gurus, When i am clearing the document in f-44 i am getting error message as Cost center is blocked againest Dircet postings. Regards, Mallik.

  • How to read the texts

    i defined standard e-mail text in SO10. which consist of 35 lines content. I want to read this texts and pass this to the function module to sent as an external e-mail Could you please help with a function module to do so ?

  • Build a dictionary with bulk records

    I have 100 million records where key and value are both 64-bit integers. I need to read the records from a flat file and build a dictionary in DB format so that I can load it for random access. During building, DB runs very slow when the cache is use