wood burning stoves*
The moose likes IDEs, Version Control and other tools and the fly likes JBoss 4.2.0 and Oracle 10g Configuration Issue with new DataSource Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "JBoss 4.2.0 and Oracle 10g Configuration Issue with new DataSource" Watch "JBoss 4.2.0 and Oracle 10g Configuration Issue with new DataSource" New topic
Author

JBoss 4.2.0 and Oracle 10g Configuration Issue with new DataSource

Joydeep Ghatak
Ranch Hand

Joined: Sep 30, 2009
Posts: 41

I have a EAR file which runs fine on IBM websphere (6.0 and 6.1), now I want to run it on Jboss 4.2.0.As this is a dynamic website I need to make an oracle
connection and where the datasource name is different from DefaultDS. I am not using EJB's.
I have configured JBoss inside Eclipse 3.7 (Indigo) and going to do any modification on the code etc through eclipse-JBoss combination only.

What I have done so far in this approach,(in other approach as per http://community.jboss.org/wiki/ConfigJBossMQDB, I was getting some other Exception)

1. Created the oracle-ds.xml with DB and application specific parameters.
2. Deployed the oracle-ds.xml in C:\jboss-4.2.0.GA\server\default\deploy directory
3. Kept the hsqldb-ds.xml as it is, in the same location (As it comes default)
4. Provided the ojdbc14.jar in C:\jboss-4.2.0.GA\server\default\lib

Output ::
==========
1. JBoss starts successfully, showing it is able to detect the new application specific JNDI name (MY_ds)


2. But When I have deployed my application .EAR file, I am receiving the following exception(s),

2.1
2.2

2.3

Info ::
====
1. oracle-ds.xml

I am able to connect to this database with the above user_name and password using TOAD
2.
web.xml of the application is as follows,



Do I have to modify some other .xml file(s) as well ?


“Men are only as good as their technical development allows them to be.”
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5811
    
    7

You also need a jboss-web.xml file. This post might help you put it all together:
http://community.jboss.org/message/251298#251298


JBoss In Action
Joydeep Ghatak
Ranch Hand

Joined: Sep 30, 2009
Posts: 41

Thanks Peter.

Well by default I do not have jboss-web.xml file in my project.
So do I have to create a new jboss-web.xml and put it in <project_home>/src/web/WEB-INF directory ? or in some other location ?

Do I have to provide the same file anywhere in Jboss server ?

Thanks in advance !!!

Thanks,
Joydeep
Joydeep Ghatak
Ranch Hand

Joined: Sep 30, 2009
Posts: 41

Thanks a lot Peter,

I have create a new jboss-web.xml and put it in <project_home>/src/web/WEB-INF directory and its working !!! :-)
But in the log I have seen some exceptions as follows,



Thanks,
Joydeep
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5811
    
    7

These errors suggest that you have the log4j or commons-logging JAR file in your WAR, remove them.
Joydeep Ghatak
Ranch Hand

Joined: Sep 30, 2009
Posts: 41

Thanks a lot Peter.

Sorry for the delay in replying back, was entangled with some other project and other issues. (http://www.coderanch.com/t/549915/JBoss/JBoss-Oracle-Configuration-new-DataSource)

Well my project WEB-INF/lib contains both "log4j" and "commons-logging" JAR and to test, I have removed both the jar's from project location WEB-INF/lib in IDE.
Now IDE(Eclipse) is giving the following "Java Build Path Problem",


Am I missing something ?

Thanks,
Joydeep
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5811
    
    7

Your question has turned into a question about Eclipse. In fact, it is the same question that Naresh has in this post:
http://www.coderanch.com/t/550522/vc/ClassCastException-org-apache-struts-action

What you need to know is how to include a JAR file in your Eclipse build path so that Eclipse can compile your code, but how to prevent Eclipse from packaging that JAR within your web application when you need to deploy it to the application server. Personally, I rarely use Eclipse to build or package my applications (I use Ant or Maven), so I can't tell you how to accomplish this (without first doing some research on this topic myself). Perhaps someone on the Eclipse forum will know. I'll cross-link you post to that forum.
Joydeep Ghatak
Ranch Hand

Joined: Sep 30, 2009
Posts: 41

Thanks a lot Peter for all the help !!!

Well sure putting the jar's in "eclipse build" path and the Application's "WEB-INF/lib" should be seperated.

Thanks again !!

~Joydeep
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JBoss 4.2.0 and Oracle 10g Configuration Issue with new DataSource
 
Similar Threads
Binding DataSource with JBoss
Error in configuration/accessing JBoss datasource jdbc not bound
How to install JBoss with MyEclipse IDE? I am having problems
JBoss 5.1.0 and Oracle 10g Configuration Issue with new DataSource
deployment exception