This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes Error connecting to Oracle database during Jboss startup Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Error connecting to Oracle database during Jboss startup" Watch "Error connecting to Oracle database during Jboss startup" New topic
Author

Error connecting to Oracle database during Jboss startup

Nei San
Greenhorn

Joined: May 08, 2007
Posts: 12
Hi there,

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 oracle-ds.xml:


The standardjaws.xml:



The standardjbosscmp-jdbc.xml:



The login-config.xml:



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.

Thank you.

Nei
[ May 15, 2007: Message edited by: Nei San ]
Edvins Reisons
Ranch Hand

Joined: Dec 11, 2006
Posts: 364
ORA-01017: invalid username/password means that for Oracle, your user name/password does not exist.
Nei San
Greenhorn

Joined: May 08, 2007
Posts: 12
Hi,

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.

Nei
Nei San
Greenhorn

Joined: May 08, 2007
Posts: 12
Hi,

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?

Thank you.

Nei
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9343
    
111

Do I really have to put the database user and password in the xml files? It doesn't seem a safe thing to do.


Have a look at EncryptingDataSourcePasswords


[My Blog] [JavaRanch Journal]
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2477
    
    7

On the jboss faq there is a section Encrypt DataSource Passwords. You can render your passwords unreadable.

Regards, Jan


OCUP UML fundamental and ITIL foundation
youtube channel
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error connecting to Oracle database during Jboss startup
 
Similar Threads
Deploying EJB using MySql as a datasource
cannot perform access control without an authenticated principal
Deploying EJB using MySql as a datasource
error on jboss start up
JBoss 5.1.0 GA. FORM based authentication