This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I�m trying to execute an Entity EJB 3.0 created with JBOSS IDE 2.0 for eclipse and JBOSS 4.0.4. It happens I�m getting an exception when I start the Jboss server inside eclipse regarding the database. I looked at the JNDI view and there is the entry �OracleDS (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)�. I�m getting the following exception in the Jboss startup:
19:13:29,480 INFO [Ejb3Configuration] found EJB3 Entity bean: test.ejbs.Person 19:13:29,480 WARN [Ejb3Configuration] Persistence provider caller does not implements the EJB3 spec correctly. PersistenceUnitInfo.getNewTempClassLoader() is null. 19:13:29,605 INFO [Configuration] Reading mappings from resource: META-INF/orm.xml 19:13:29,605 INFO [Ejb3Configuration] [PersistenceUnit: shoestringPU] no META-INF/orm.xml found 19:13:29,715 INFO [AnnotationBinder] Binding entity from annotated class: test.ejbs.Person 19:13:29,793 INFO [EntityBinder] Bind entity test.ejbs.Person on table Person 19:13:30,090 INFO [ConnectionProviderFactory] Initializing connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider 19:13:30,105 INFO [InjectedDataSourceConnectionProvider] Using provided datasource 19:13:37,090 WARN [JBossManagedConnectionPool] Throwable while attempting to get a new connection: null org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: ORA-01017: invalid username/password; logon denied )
I have the following content in the xml files:
The persistence.xml file:
I'm not using hibernate to create the tables. But, as I said, this happens during JBoss startup. I would appreciate any help.
ORA-01017: invalid username/password means that for Oracle, your user name/password does not exist.
Joined: May 08, 2007
I already verified the user name and password and I can use them in SGL Plus. Do you think my xml files are missing something? I already copied the file classes12.zip from Oracle to the default\lib path. Can it be a problem with the driver?
Thank you very much.
Joined: May 08, 2007
Is happens there are two files with username and password. I updated the login-config.xml file and forgot the oracle-ds.xml.
I would appreciate if you help with another question: Do I really have to put the database user and password in the xml files? It doesn't seem a safe thing to do. Is there another way to inform the user and password of the database? Perhaps in the entity bean code?