Exception in Hello World Program in Hibernate

Hi All
I am trying to run my first "Hello World" hibernate program in the book "Java Persitance with Hibernate". I have written the model class and the main class.
I have also create the mapping file Message.hbm.xml and hibernate configuration file hibernate.cfg.xml through hibernate tools. Now when I am running the main class i am getting the following exception.
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Exception in thread "main" java.lang.ExceptionInInitializerError
     at com.hibernate.test.HibernateUtil.<clinit>(HibernateUtil.java:17)
     at com.hibernate.test.HelloWorld.main(HelloWorld.java:15)
Caused by: java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder
     at org.slf4j.LoggerFactory.getSingleton(LoggerFactory.java:223)
     at org.slf4j.LoggerFactory.bind(LoggerFactory.java:120)
     at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:111)
     at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:269)
     at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:242)
     at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:255)
     at org.hibernate.cfg.Configuration.<clinit>(Configuration.java:165)
     at com.hibernate.test.HibernateUtil.<clinit>(HibernateUtil.java:15)
     ... 1 more
Caused by: java.lang.ClassNotFoundException: org.slf4j.impl.StaticLoggerBinder
     at java.net.URLClassLoader$1.run(Unknown Source)
     at java.security.AccessController.doPrivileged(Native Method)
     at java.net.URLClassLoader.findClass(Unknown Source)
     at java.lang.ClassLoader.loadClass(Unknown Source)
     at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
     at java.lang.ClassLoader.loadClass(Unknown Source)
     at java.lang.ClassLoader.loadClassInternal(Unknown Source)
     ... 9 moreI have added the following jars from the folder hibernate-distribution-3.5.2-Final\lib\required
commons-collections-3.1.jar
dom4j-1.6.1.jar
javassist-3.9.0.GA.jar
jta-1.1.jar
slf4j-api-1.5.8.jar
and hibernate3.jar to the classpath.
It would be great if someone could help me in resolving this problem
Thanks in advance
Fierof2

user13519911 wrote:
I have posted this question here because this is a hibernate program with is related to database connectivity. What i would like to know is what is the jar file i am missing and why is it not present in the required folders of hibernate distribution.Yeah. With that kind of unproductive attitude I suddenly lose all interest in helping. So weird.
Guess I'll do what I like: be blunt. You are allowed to think. I suggest you do so.

Similar Messages

  • While running hello world program for 12.1.3, getting error

    We followed the instruction given in dev tutorial and set the 12.1.3 jdev.
    When try to run the “Hello World” program, got error
    “You have insufficient privilege”
    Solution:
    I changed the setting as below and it worked.
    Jdeveloper -> Tools -> Embedded OC4J server setting -> start up
    Choose option: Default IP address
    And issue got resolved.
    I want to share this with everyone.

    We followed the instruction given in dev tutorial and set the 12.1.3 jdev.
    When try to run the “Hello World” program, got error
    “You have insufficient privilege”
    Solution:
    I changed the setting as below and it worked.
    Jdeveloper -> Tools -> Embedded OC4J server setting -> start up
    Choose option: Default IP address
    And issue got resolved.
    I want to share this with everyone.

  • How to compile a simple "Hello World" program in Java by using Netbeans

    Hi all, I am very new to java programming arena. i am trying to learn the most demanding language for the time being. To program, i always use IDE's as it makes programming experience much easier by underline the syntax errors or sometimes showing codehint. However, I am facing some problem when i use Netbeabs to compile a simple "Hello world" program. my problem is whenever i write the code and press compile button, netbeans says "main class not found". Consequently,i am becoming frustated. So, i am here in this forum to get some kind help on How i can compile java programs in Netbeans. Please help me out, otherwise i may lose my enthusiasm in Java. please help me, i m stuck

    Go to http://www.netbeans.org/
    You should find tutorials there.

  • Steps To execute Simple Hello world programs of struts

    Hi,
    Can u tell me how to execute the simple hello world programs in struts by using eclipse ID..
    and send me the screen shots and what all the jar files we have to copy in lib folder.

    >
    Can u tell me how to execute the simple hello world programs in struts by using eclipse ID..
    and send me the screen shots and what all the jar files we have to copy in lib folder.
    >
    No. Post the question in an Eclipse forum.

  • Exception while running hello world program

    Hi OAF guys
    i am getting the following exception when i am trying to run the Hello world example. Any body knows this problem, respond asap
    Exception Details.
    oracle.apps.fnd.framework.OAException: Application: FND, Message Name: FND_GENERIC_MESSAGE. Tokens: MESSAGE = oracle.adf.mds.exception.MDSRuntimeException; (Could not lookup message because there is no database connection)
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:888)
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1145)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1960)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:497)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:418)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    ## Detail 0 ##
    oracle.adf.mds.exception.MDSRuntimeException
         at oracle.apps.fnd.framework.mds.cache.ATGCacheMgrDelegateImpl.<init>(ATGCacheMgrDelegateImpl.java:325)
         at oracle.apps.fnd.framework.mds.cache.ATGCacheFactoryImpl.<init>(ATGCacheFactoryImpl.java:44)
         at oracle.apps.fnd.framework.mds.OAMDSContextUtils.createMDSContext(OAMDSContextUtils.java:202)
         at oracle.apps.fnd.framework.mds.OAMDSContextUtils.createMDSContext(OAMDSContextUtils.java:149)
         at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.getRootApplicationModuleClass(OAWebBeanFactoryImpl.java:3444)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:988)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:497)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:418)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    oracle.adf.mds.exception.MDSRuntimeException
         at oracle.apps.fnd.framework.mds.cache.ATGCacheMgrDelegateImpl.<init>(ATGCacheMgrDelegateImpl.java:325)
         at oracle.apps.fnd.framework.mds.cache.ATGCacheFactoryImpl.<init>(ATGCacheFactoryImpl.java:44)
         at oracle.apps.fnd.framework.mds.OAMDSContextUtils.createMDSContext(OAMDSContextUtils.java:202)
         at oracle.apps.fnd.framework.mds.OAMDSContextUtils.createMDSContext(OAMDSContextUtils.java:149)
         at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.getRootApplicationModuleClass(OAWebBeanFactoryImpl.java:3444)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:988)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:497)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:418)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    thanks in advance
    Thanks & Regards
    U.Palakondaiah

    For a quick resolution please add the below -D parameter to Java Options under "Project Settings->Configurations->Development->Runner"
    -DCACHEMODE=DISTRIBUTED
    Next thing I want you to do is, check what version of "oracle.apps.jtf.cache.HTCacheProvider" class
    your jdeveloper has? It should be >= 115.33. If not then try after deleting all your class files (myclasses/myglobalclasses and other external classes - may be one of them might have older version of this class file).
    Thanks,
    Eshwar

  • Simple "hello world" program

    I have the following code:
    public class hello
    public static void main(String[] args)
    System.out.println("Hello World");
    I get the following message when I try to run this program:
    Exception in thread "main" java.lang.NoClassDefFoundError: hello
    Does anyone know what could be the cause of this error?
    Thanks in Advance!!

    Please check your class path. Make sure that current working directory is included in it.
    If not add it as shown below
    set classpath=%classpath%;.;

  • While running hello world program for 12.1.1 getting "Error Page"

    Hi all,
    I am beginner for JDeveloper, I have followed up the instructions given in tutorial documents to install these applications "Tutorials, LabSolutions and Hello World!" but all are giving me this error.
    Error Page
    You have encountered an unexpected error. Please contact the System Administrator for assistance.
    I had tried most of the given solutions in this forum , but still I can not find solution for my problem.
    Any help please!
    Regards
    Hesham

    Hi,
    right now I am playing with parameters , reading
    and now i got this error please check if it make sense for you .
    500 Internal Server Error
    oracle.apps.fnd.common.AppsException: oracle.apps.fnd.common.PoolException: Exception creating new Poolable object.     at oracle.apps.fnd.profiles.Profiles.getProfileOption(Profiles.java:1509)     at oracle.apps.fnd.profiles.Profiles.getProfile(Profiles.java:362)     at oracle.apps.fnd.profiles.ExtendedProfileStore.getSpecificProfileFromDB(ExtendedProfileStore.java:211)     at oracle.apps.fnd.profiles.ExtendedProfileStore.getSpecificProfile(ExtendedProfileStore.java:171)     at oracle.apps.fnd.profiles.ExtendedProfileStore.getProfile(ExtendedProfileStore.java:148)     at oracle.apps.fnd.common.logging.DebugEventManager.configureUsingDatabaseValues(DebugEventManager.java:1294)     at oracle.apps.fnd.common.logging.DebugEventManager.configureLogging(DebugEventManager.java:1149)     at oracle.apps.fnd.common.logging.DebugEventManager.internalReinit(DebugEventManager.java:1118)     at oracle.apps.fnd.common.logging.DebugEventManager.reInitialize(DebugEventManager.java:1085)     at oracle.apps.fnd.common.logging.DebugEventManager.reInitialize(DebugEventManager.java:1072)     at oracle.apps.fnd.common.AppsLog.reInitialize(AppsLog.java:595)     at oracle.apps.fnd.common.AppsContext.initLog(AppsContext.java:593)     at oracle.apps.fnd.common.AppsContext.initializeContext(AppsContext.java:570)     at oracle.apps.fnd.common.AppsContext.initializeContext(AppsContext.java:524)     at oracle.apps.fnd.common.WebAppsContext.<init>(WebAppsContext.java:1108)     at oracle.apps.fnd.common.WebRequestUtil.validateContext(WebRequestUtil.java:225)     at OAErrorPage.jspService(_OAErrorPage.java:62)     [OAErrorPage.jsp]     at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.3.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)     at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)     at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)     at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:259)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.access$100(ServletRequestDispatcher.java:51)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:193)     at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:283)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:198)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.EvermindPageContext.handlePageThrowable(EvermindPageContext.java:847)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.EvermindPageContext.handlePageException(EvermindPageContext.java:813)     at test_fwktutorial._jspService(_test__fwktutorial.java:104)     [test_fwktutorial.jsp]     at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.3.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)     at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)     at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)     at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)     at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)     at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)     at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)     at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)     at java.lang.Thread.run(Thread.java:595)Caused by: oracle.apps.fnd.common.PoolException: Exception creating new Poolable object.     at oracle.apps.fnd.common.Pool.createObject(Pool.java:1286)     at oracle.apps.fnd.common.Pool.borrowObject(Pool.java:1027)     at oracle.apps.fnd.security.DBConnObjPool.borrowObject(DBConnObjPool.java:583)     at oracle.apps.fnd.security.AppsConnectionManager.borrowConnection(AppsConnectionManager.java:300)     at oracle.apps.fnd.common.Context.borrowConnection(Context.java:1719)     at oracle.apps.fnd.common.AppsContext.getPrivateConnectionFinal(AppsContext.java:2266)     at oracle.apps.fnd.common.AppsContext.getPrivateConnection(AppsContext.java:2203)     at oracle.apps.fnd.common.AppsContext.getJDBCConnection(AppsContext.java:2061)     at oracle.apps.fnd.common.AppsContext.getJDBCConnection(AppsContext.java:1871)     at oracle.apps.fnd.common.AppsContext.getJDBCConnection(AppsContext.java:1715)     at oracle.apps.fnd.common.AppsContext.getJDBCConnection(AppsContext.java:1728)     at oracle.apps.fnd.common.Context.getJDBCConnection(Context.java:1453)     at oracle.apps.fnd.cache.GenericCacheLoader.load(GenericCacheLoader.java:170)     at oracle.apps.fnd.profiles.Profiles.getProfileOption(Profiles.java:1500)     ... 49 moreCaused by: oracle.apps.fnd.common.AppsException: java.sql.SQLException: Io exception: Got minus one from a read call     at oracle.apps.fnd.security.ConnectionManager.dbConnect(ConnectionManager.java:1423)     at oracle.apps.fnd.security.AppsConnectionManager.localAppsConnect(AppsConnectionManager.java:1218)     at oracle.apps.fnd.security.AppsConnectionManager.localAppsConnect(AppsConnectionManager.java:1113)     at oracle.apps.fnd.security.AppsConnectionManager.localAppsConnect(AppsConnectionManager.java:1102)     at oracle.apps.fnd.security.AppsConnectionManager.makeGuestConnection(AppsConnectionManager.java:787)     at oracle.apps.fnd.security.DBConnObj.<init>(DBConnObj.java:228)     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)     at java.lang.reflect.Constructor.newInstance(Constructor.java:494)     at oracle.apps.fnd.common.Pool.createObject(Pool.java:1273)     ... 62 moreCaused by: java.sql.SQLException: Io exception: Got minus one from a read call     at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)     at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:175)     at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:287)     at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:328)     at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:430)     at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:151)     at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)     at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:608)     at java.sql.DriverManager.getConnection(DriverManager.java:525)     at java.sql.DriverManager.getConnection(DriverManager.java:140)     at oracle.apps.fnd.security.ConnectionManager.dbConnect(ConnectionManager.java:1410)     ... 72 more
    --------------

  • Problem with "Hello World"  program

    i am new to java.
    i have recently installed java and the version is :
    E:\>java -showversion
    java version "1.6.0_06"
    Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
    Java HotSpot(TM) Client VM (build 10.0-b22, mixed mode, sharing)
    First.java_
    class First
    public static void main (String[] args)
    System.out.println("Hello World!");
    My "First.java" compiles fine.
    but,when i execute it, i got the following Error:
    E:\>javac First.java
    E:\>java First
    Exception in thread "main" java.lang.NoClassDefFoundError: First
    Caused by: java.lang.ClassNotFoundException: First
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    i need assistance..

    As stated in the [thread earlier today|http://forum.java.sun.com/thread.jspa?threadID=5304111&tstart=0], you need to specify the classpath like this:
    java -cp . First(Note that there is a period between the -cp and First with spaces separating the period from the -cp and the First).

  • Can't get even a hello world program to work

    Hello,
    I am new to java and have written the following and saved it
    to hello.java:
    public class hello
    public static void main(String[] args)
    System.out.println("Hello, world");
    Then I run javac as follows:
    javac hello.java
    No errors, so I type:
    java hello
    and I get
    Exception in thread "main" java.lang.NoClassDefFoundError: hello
    I have been careful for upper and lower case.
    What am I missing?
    I just installed java on this machine.
    Thanks,
    Mike

    Do this instead:java -cp . hello... note the dot following the '-cp' flag. The Java virtual machine needs to
    know where your classes are stored, i.e. it doesn't assume a concept
    of a 'current working directory'. The '-cp' flag is followed by a list of dirs
    (here it's just the current directory '.') that store .class files.
    kind regards,
    Jos

  • Hello World Program

    hello, i'm making a program, that is suppose to take as an arugument the name of a paerson, and greet that person. For example;
    class Hello
    { static void main( String[] args)
    System.out.println("Hello, World!");
    Using this program to modify, one would be able to type this in the command line and get the output underneath:
    %java Hello tara
    Hello tara!
    %java Hello there
    Hello there!
    please any help as to what to do would be helpful

    Hi,
    is this a homework? if it is i suggest you read a java book first and learn java.
    Anyways, for your sake... here is the explanation... args is an array of String that accepts parameters from command line. Since you want to get the first argument from the command line (the name) then you should get the first String object in the args array. Index 0 is the first String.
    Note: "args" is just a variable name... you can change it to whatever name you like as long as it doesnt cause conflict to the Java's Keyword
    I hope next time... you read java tutorials first. =)
    Good luck
    class Hello
    { static void main( String[] args)
    System.out.println("Hello, "+args[0]);

  • Help getting started w Xcode 3.0 and C++ hello world program

    Friends:
    I open xCode 3.0 on Leopard and I make a new project using the command line utility standard tool and enter the following application:
    #include <iostream>
    using namespace std;
    int main()
    cout << "Hello world";
    return 0;
    ...and it doesn't build.
    How can I fix this?
    Thanks amigos! -Migs

    The errors:
    After the include: error: iostream: No such file or directory
    After using namesapce: error: syntax error before namespace and warning: data definition has no type or storage calss
    After cout: error: 'cout' undeclared
    Thanks for helping!!!
    Migs

  • BEPL Hello world program error

    Hi
    I am new to BEPL , when i try to compile the Helloworld example , Eclipse BPEL Designer displays the following error
    1.     Error - Element type "bpelc" must be declared.     build.xml     SyncHelloWorld     line 28     May 27, 2006 12:08:36 PM
    2     Error - The content of element type "target" must match "(propertyfile|vsscheckin|sql|cvspass|p4reopen|csc|dirname|wlrun|p4label|p4revert|replaceregexp|get|jjtree|sleep|jarlib-display|dependset|zip|patch|jspc|style|test|tstamp|unwar|vsshistory|icontract|cvschangelog|p4submit|ccmcheckin|p4change|bzip2|p4delete|vssadd|javadoc|translate|signjar|vajload|jarlib-available|WsdlToDotnet|buildnumber|jpcovmerge|ejbjar|war|rename|sequential|serverdeploy|property|move|copydir|cccheckin|wljspc|fixcrlf|sosget|pathconvert|record|p4sync|exec|p4edit|manifest|maudit|antlr|netrexxc|jpcovreport|execon|ccmcheckout|ant|xmlvalidate|xslt|iplanet-ejbc|ccmcheckintask|gzip|native2ascii|starteam|ear|input|rmic|checksum|mail|loadfile|vsscheckout|stylebook|soscheckin|mimemail|stlabel|gunzip|concat|cab|touch|parallel|splash|antcall|cccheckout|typedef|p4have|filter|xmlproperty|copy|antstructure|ccmcreatetask|rpm|delete|replace|mmetrics|waitfor|untar|loadproperties|available|echoproperties|vajexport|stcheckout|bunzip2|copyfile|vsscreate|ejbc|unjar|wsdltodotnet|mkdir|condition|cvs|tempfile|junitreport|taskdef|echo|ccupdate|java|renameext|vsslabel|basename|javadoc2|vsscp|tar|vajimport|setproxy|wlstop|p4counter|ilasm|soscheckout|apply|ccuncheckout|jarlib-resolve|cvstagdiff|jlink|javacc|jarlib-manifest|pvcs|chmod|jar|sound|mparse|blgenclient|uptodate|genkey|javah|ccmreconfigure|fail|unzip|javac|p4add|soslabel|jpcoverage|depend|vssget|deltree|ddcreator|preprocess|patternset|filterset|libfileset|filterreader|extension|fileset|dirset|filelist|filterchain|path|classfileset|description|xmlcatalog|selector|mapper|substitution|extensionSet|regexp)*".     build.xml     SyncHelloWorld     line 29     May 27, 2006 1:32:07 PM
    syncHelloWorld.wsdl code
    <?xml version="1.0"?>
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Run cxant on this file to build, package and deploy the
    SyncHelloWorld BPEL process
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <project name="SyncHelloWorld" default="main" basedir=".">
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Name of the domain the generated BPEL suitcase will be deployed to
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <property name="deploy" value="default"/>
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    What version number should be used to tag the generated BPEL archive?
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <property name="rev" value="1.0"/>
    <target name="main">
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    the bpelc task compiles and package BPEL processes into versioned BPEL
    archives (bpel_...jar). See the "Programming BPEL" guide for more
    information on the options of this task.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <bpelc input="${basedir}/bpel.xml"
    rev="${rev}"
    deploy="${deploy}"
    />
    </target>
    </project>
    Help me to find out the error
    thanks in advance
    partha

    This sounds strange, as the build.xml looks good to me,
    can you pls try to compile your project in the filesystem by using obant - located in $BPEL_HOME/integration/orabpel/bin
    hth clemens

  • Newbie trying to write toplink hello world program

    I am trying to write my first toplink app using POJOs, and I'm having a hard time finding a sample toplink application. In this case, I'd like to run outside of a J2EE container with a stand-alone java application to do some basic CRUD operations. I've already run the mapping workbench on my Java classes and generated the deployment file and sessions.xml file. Where (Oracle docs) can I find source code for a simple stand-alone java main() app that uses the toplink API?
    Thanks in advance.

    TopLink ships with many examples - complete with runtime and workbench componants - in 9.0.4.X Find them here: <TopLink_install_dir>\examples\
    For non app server simple CRUD examples, I suggest you look here first:
    <TopLink_install_dir>\examples\foundation\threetier

  • Xcode unabled to run any program (even Hello World default)

    I've started into programming c++ and java in Osx (come from linux) and i've tried xcode (after trying netbeans, eclipse etc) because i find it the most comfortable IDE to work.
    The problem comes when i download xcode on my own laptop, after the large download and installation (and few updates) i tried the basic Hello World program.
    What is my surprise when, after building succesfully, i get no output at all outputs sections, but more surprised when i try to stop running the program and xcode doesn't respond.
    I get this error with every program, doesnt matter which language.
    I also have a crash when quitting xcode (it freezes and colored ballon pointer appears), so i have to force xcode quit.
    Have anyone faced this issue before? or known whats the issue related with?
    I'll really appreciate any help (as i can't program anything in osx if i want to use xcode)

    From my Guest account it works perfectly.
    How can I make it works on my Account ? Which preference file should I need to change.
    Here is the message from the debugger
    Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Could not find a storyboard named 'Main' in bundle NSBundle </Users/USER/Library/Application Support/iPhone Simulator/7.1/Applications/A0D30F60-57F6-41C5-9EB0-E5FE46F50DB1/ToDoList.app> (loaded)'
    Thank you for your help

  • Problem with JNI hello world

    I found some tutorial on SUN site on how to use JNI. I'm using Eclipse to compije Java and C (via Cygwin) files. Here are complete files:
    Hello.java:
    class Hello
         public native void sayHello();
         static
              try
              System.loadLibrary("hello");
              catch(Exception e)
                   System.out.println("exc");
         public static void main(String[] args)
              Hello h = new Hello();
              h.sayHello ();
    }Hello.c:
    #include <mingw/_mingw.h> //because there are some types needed for JNI
    #include <jni.h>
    #include "Hello.h"
    #include <stdio.h>
    JNIEXPORT void JNICALL Java_Hello_sayHello
      (JNIEnv *env, jobject obj)
         printf("Hello world!\n");
         return;
    }Makefile:
    hello.dll : Hello.o Hello.def
         gcc -g -shared -Wl,--kill-at -o hello.dll Hello.o hello.def
    Hello.o : Hello.c Hello.h
         gcc -c -g -I"$(JAVA_HOME)\include" -I"$(JAVA_HOME)\include\win32" Hello.c -o Hello.o
    Hello.h : Hello.class
         javah -jni Hello
    clean :
         rm Hello.h
         rm Hello.o
         rm hello.dllHello.def
    EXPORTS
    Java_Hello_sayHelloEverything goes well, but when I run java program it does nothin (it should print message, but it just exit without any error).I'm sure that it's something stupid, but I cant see what. Can anyone tell me what am I doing wrong?
    Thenks.

    Answer 1: yes, there was no problem. I compiled and started simple 'hello world' program from Cygwin and from WinXP console, and it worked well.
    Answer 2: This is weird, I changed code to this:
    Hello.java:
         public native int getInt();
              System.out.println("Returned int is " + h.getInt());Hello.c:
    JNIEXPORT jint JNICALL Java_Hello_getInt
      (JNIEnv *env, jobject obj)
         return 25;
    }It does not print anything. I started this program from Cygwin and from WinXP console, and from Eclipse. Only if I debug in Eclipse (step by step) I get:
    Returned int is 25and still I don't get Hello string printed (even if I go step by step). It looks like cygwin has some problem with OS. Do you have any idea what to do, I'm a bit confused?
    Thank you.
    Message was edited by:
    zly

Maybe you are looking for

  • New Mac Pro 8-core / D700 not much faster than an iMac... in PPro CC.

    So.... my very preliminary testing with our new Mac Pro using the plugin I use most (filmconvert -FC) anyway, shows that Premiere CC needs more optimization for the dual GPUs. In fact, I'd say the CPU utilization is not up to snuff either. I know FC

  • Is adobe photoshop elements 2.0 still worth ?

    I couldn't afford to buy the latest version of photoshop elements so I went ahead and got me this 2.0 version but after a few attempts I can not install it in my windows vista PC...please help

  • Pairing iPhone 3GS with iPad 2

    I thank all of you for the post related to Iphone and Ipad tethering. But, I'm wondering why the iPhone cannot be paired with the iPad using Bluetooth without turning on the Personal Hotspot? If this is possible, please, help me doing it, if not Appl

  • Bindings panel bug in Dreamweaver

    I'm using a flickr rss feed which uses tags like <media:thumbnail url="pathtoimage" height="75" width="75" /> When you open the dataset in the bindings tab the xpath displays properly: "rss/channel/item/media:thumbnail/@url". However if you expand th

  • How do I disable finder from opening a new window upon mount?

    When an external drive is mounted (such as an iPod in disk mode) Finder opens a new window showing the root of the new drive. I realise why this happens, but is there any way of disabling this feature?. Cheers, Ebsy