Menu

access to data base

Help
hanani
2006-02-28
2013-03-22
  • hanani

    hanani - 2006-02-28

    hi ;
    plz can you tell me how can i configure the acces to my dataBase with Jtri ??
    i use Oracle 9 , jboss4.0.1sp1
    when i try to log in i got an error :
    description The server encountered an internal error () that prevented it from fulfilling this request.

    exception

    javax.servlet.ServletException: Servlet execution threw an exception
        org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)

    .........

    thanks

     
    • Alexandre Torres

      First you have to configure a jboss datasource. Look in the doc/jca directory of your jboss to an configuration file example. You have to copy the file to the deploy folder and configure with your database info.
      Them, you put the jndi name of your application.jtri config file.
      Take a look in this tutorial for an example:
      http://jtri.sourceforge.net/docs/en/Jboss.pdf
      Good Luck

       
    • hanani

      hanani - 2006-03-03

      Bonjour ;
      je n'arrive toujours pas à accéder à la Base de données oracle
      -j'ai copié le fichier oracle-ds.xml dans el repertoire all\deploy
      -je l'ai modifié: <jndi-name>jdbc/pethotel</jndi-name>
          <connection-url>jdbc:oracle:thin:@hanani:1521:wind</connection-url>

      -j'ai modifié le fichier login-config.xml qui est dans C:\Logiciels\jboss-4.0.1sp1\server\all\conf

      Bref j'ai fait tout ce qui est dit dans le fichier JBoss Tips

      mais dès que je veux me logger dans l'application j'ai cette erreur :
      15:01:35,553 WARN  [JBossManagedConnectionPool] Throwable while attempting to get a new connection: null
      org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Failed to register driver for: org.postgresql.Driver; - nested throwable: (java.lang.ClassNotFoundException: org.postgresql.Driver))
          at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:161)
      ........
      ........
      at java.lang.Thread.run(Thread.java:534)
      Caused by: org.jboss.resource.JBossResourceException: Failed to register driver for: org.postgresql.Driver; - nested throwable: (java.lang.ClassNotFoundException: org.postgresql.Driver)
          at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getDriver(LocalManagedConnectionFactory.java:284)
          at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:150)
          ... 58 more
      Caused by: java.lang.ClassNotFoundException: org.postgresql.Driver
          at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
      .......
      .......
      at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getDriver(LocalManagedConnectionFactory.java:266)
          ... 59 more
      15:01:35,646 INFO  [Dialect] Using dialect: org.hibernate.dialect.Oracle9Dialect
      15:01:35,693 INFO  [TransactionFactoryFactory] Transaction strategy: org.hibernate.transaction.JTATransactionFactory
      ......

      dans les propriétés du projet j'utilise OraclDialect et non pas postresqlDialect!!!
      pouvez vous m'eclairer s'il vous plaît
      Merci

       
    • hanani

      hanani - 2006-03-03

      j'ai trouvé l'erreur !!
      c'etait un fichier que j'avais utilisé avant pour un autre projet qui appelait postresql je l'ai supprimé.
      Mias n'empeche j'arrive toujours pas a fair marcher la DB
      10:03:52,354 INFO  [SettingsFactory] Default entity-mode: POJO
      10:03:52,370 ERROR [Engine] StandardWrapperValve[action]: Servlet.service() for servlet action threw exception
      java.lang.NoClassDefFoundError
          at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1145)
          at org.hibernate.jmx.HibernateService.buildSessionFactory(HibernateService.java:64)
          at org.hibernate.jmx.SessionFactoryStub.getImpl(SessionFactoryStub.java:80)
         
      ..............................
      ..............................
      at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
          at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
          at java.lang.Thread.run(Thread.java:534)

      Merci

       
    • Alexandre Torres

      If the problem still happen, try to discover wich class the "NoClassDefFoundError " is pointing...

       

Log in to post a comment.