oracle connectivity problems
sfriesen Mar 10, 2011 12:49 PMHi. I am new to Seam and am having trouble connecting to an Oracle database. I am using Seam 2.2.1.Final on JBoss 6.0.0.Final.
I am going through the Seam tutorial. I ran "seam setup", "seam new-project" and "seam generate-entities". Here are some of the results for "seam setup":
settings:
[echo] JBoss AS home: C:/jboss/jboss-6.0.0.Final
[echo] GlassFish home: C:/Program Files/glassfish-v2.1
[echo] Project name: helloworld
[echo] Project location: C:/Develop/seam/helloworld
[echo] Project type: ear
[echo] IceFaces: y
[echo] Action package: com.famoussoftware.helloworld
[echo] Model package: com.famoussoftware.helloworld
[echo] Test package: com.famoussoftware.helloworld.test
[echo] JDBC driver class: oracle.jdbc.driver.OracleDriver
[echo] JDBC DataSource class: oracle.jdbc.pool.OracleDataSource
[echo] Hibernate dialect: org.hibernate.dialect.OracleDialect
[echo] JDBC URL: jdbc:oracle:thin@dogbert:1521:famous
[echo] Database username: [removed]
[echo] Database password: [removed]
[echo]
[echo] Type 'seam create-project' to create the new project
BUILD SUCCESSFUL
Total time: 2 minutes 40 seconds
When I ran "seam generate-entities" I got the following:
generate-model:
[echo] Reverse engineering database using JDBC driver C:\Develop\lib\ojdbc14.jar
[echo] project=C:/Develop/seam/helloworld
[echo] model=com.famoussoftware.helloworld
[hibernate] Executing Hibernate Tool with a JDBC Configuration (for reverse engineering)
[hibernate] 1. task: hbm2java (Generates a set of .java files)
[hibernate] log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
[hibernate] log4j:WARN Please initialize the log4j system properly.
[hibernate] An exception occurred while running exporter #2:hbm2java (Generates a set of .java files)
[hibernate] To get the full stack trace run ant with -verbose
[hibernate] org.hibernate.exception.GenericJDBCException: Getting database metadata
[hibernate] java.sql.SQLException: Invalid Oracle URL specified
BUILD FAILED
C:\jboss\jboss-seam-2.2.1.Final\seam-gen\build.xml:1563: org.hibernate.exception.GenericJDBCException: Getting database metadata
I have an existing Oracle schema and I can connect to it through SqlPlus, so I know the username, password, host, and sid. I have tried re-running seam setup with a few different jdbc urls, but without luck. I have the ojdbc14.jar driver in the directory specified above.
Does anybody have any suggestions?
Thanks,
Steve
I am going through the Seam tutorial. I ran "seam setup", "seam new-project" and "seam generate-entities". Here are some of the results for "seam setup":
settings:
[echo] JBoss AS home: C:/jboss/jboss-6.0.0.Final
[echo] GlassFish home: C:/Program Files/glassfish-v2.1
[echo] Project name: helloworld
[echo] Project location: C:/Develop/seam/helloworld
[echo] Project type: ear
[echo] IceFaces: y
[echo] Action package: com.famoussoftware.helloworld
[echo] Model package: com.famoussoftware.helloworld
[echo] Test package: com.famoussoftware.helloworld.test
[echo] JDBC driver class: oracle.jdbc.driver.OracleDriver
[echo] JDBC DataSource class: oracle.jdbc.pool.OracleDataSource
[echo] Hibernate dialect: org.hibernate.dialect.OracleDialect
[echo] JDBC URL: jdbc:oracle:thin@dogbert:1521:famous
[echo] Database username: [removed]
[echo] Database password: [removed]
[echo]
[echo] Type 'seam create-project' to create the new project
BUILD SUCCESSFUL
Total time: 2 minutes 40 seconds
When I ran "seam generate-entities" I got the following:
generate-model:
[echo] Reverse engineering database using JDBC driver C:\Develop\lib\ojdbc14.jar
[echo] project=C:/Develop/seam/helloworld
[echo] model=com.famoussoftware.helloworld
[hibernate] Executing Hibernate Tool with a JDBC Configuration (for reverse engineering)
[hibernate] 1. task: hbm2java (Generates a set of .java files)
[hibernate] log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
[hibernate] log4j:WARN Please initialize the log4j system properly.
[hibernate] An exception occurred while running exporter #2:hbm2java (Generates a set of .java files)
[hibernate] To get the full stack trace run ant with -verbose
[hibernate] org.hibernate.exception.GenericJDBCException: Getting database metadata
[hibernate] java.sql.SQLException: Invalid Oracle URL specified
BUILD FAILED
C:\jboss\jboss-seam-2.2.1.Final\seam-gen\build.xml:1563: org.hibernate.exception.GenericJDBCException: Getting database metadata
I have an existing Oracle schema and I can connect to it through SqlPlus, so I know the username, password, host, and sid. I have tried re-running seam setup with a few different jdbc urls, but without luck. I have the ojdbc14.jar driver in the directory specified above.
Does anybody have any suggestions?
Thanks,
Steve