6 Replies Latest reply on May 21, 2003 3:18 PM by ali575

    Out of Memory

    vjboss

      Hi All!

      I am new to Jboss I did simple Jboss " interest " example and deployed jar file on the server with out any problem. Then I compiled client program successfully and tryed to run it I was getting below error message javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interf
      aces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: o
      rg.jnp.interfaces.NamingContextFactory]

      Then I modified client program and when I trying to compile I am getting message saying System is out of resources "Out Of Memory Error".

      I tryed to increase the VM size by giving java -Xms[] -Xmx[] it throws me in valid initial size irrespective of the given value.

      Can any one help me out please...

      Thanks
      Tom

        • 1. Re: Out of Memory
          lochenkinov

          be sure to put "m" after the number to denote megabytes, like this -Xmx180m and not -Xmx180

          • 2. Re:Bean  Not Bound Exception
            vjboss

            I solved memory problem but now I get bean not bound exception can any one let me know what I have to do please check my ejb-jar.xml and jboss.xml and let me know where I did mistake.

            ejb-jar.xml

            <?xml version="1.0" encoding="UTF-8"?>

            <ejb-jar>
            JBoss Interest Sample Application
            <display-name>Test</display-name>
            <enterprise-beans>

            <ejb-ref-name>java:comp/env/Interest</ejb-ref-name>
            com.web_tomorrow.interest.InterestHome
            com.web_tomorrow.interest.Interest
            <ejb-class>com.web_tomorrow.interest.InterestBean</ejb-class>
            <session-type>Stateless</session-type>
            <transaction-type>Bean</transaction-type>

            </enterprise-beans>
            </ejb-jar>
            ----------------------------------------------------------------------------jboss.xml
            <?xml version="1.0" encoding="UTF-8"?>

            <enterprise-beans>

            <ejb-name>Interest</ejb-name>
            <jndi-name>interest/Interest</jndi-name>

            </enterprise-beans>


            Thanks!


            Tom

            • 3. Re: Re:Bean  Not Bound Exception

              <ejb-ref-name> doesn't belong there, should be <ejb-name>Interest</ejb-name>

              • 4. Re: Re:Bean  Not Bound Exception
                vjboss

                I used that before but it was not working then I replaced ejb-name with ejb-ref-name

                • 5. Re: Re:Bean  Not Bound Exception

                  well it won't work with ejb-ref-name for sure

                  go to your jboss-service.xml and set ValidateDTDs to true.

                  • 6. Re: Re:Bean  Not Bound Exception
                    ali575

                    whn u got a memory error one or your source or taget file in comilation probably got wackecd out; check for it.