wood burning stoves 2.0*
The moose likes JBoss/WildFly and the fly likes JBoss 5.1.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
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "JBoss 5.1.0 and Oracle 10g Configuration Issue with new DataSource" Watch "JBoss 5.1.0 and Oracle 10g Configuration Issue with new DataSource" New topic
Author

JBoss 5.1.0 and Oracle 10g Configuration Issue with new DataSource

Joydeep Ghatak
Ranch Hand

Joined: Sep 30, 2009
Posts: 41

NOTE :: This issue looks similar to http://www.coderanch.com/t/549502/JBoss/JBoss-Oracle-Configuration-new-DataSource, but the application, config info and JBoss server version all are different.

I have a EAR file which runs fine on IBM websphere (6.0 and 6.1), now I want to run it on Jboss 5.1.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,

1. Created the oracle-ds.xml with DB and application specific parameters.
2. Deployed the oracle-ds.xml in C:\jboss-5.1.0.GA_MYAPP\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-5.1.0.GA_MYAPP\common\lib
5. Created and kept jboss-web.xml in <project_home>/src/web/WEB-INF

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 .WAR file, I am receiving the following exception(s),

Need some insight of the error please.

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

2. web.xml of the application is as follows,

3. jboss-web.xml


Thanks,
Joydeep


“Men are only as good as their technical development allows them to be.”
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10112
    
165

Are you packaging any JBoss specific jars or apache catalina jars within your application? If yes, remove those jars from the application packaging.

[My Blog] [JavaRanch Journal]
Joydeep Ghatak
Ranch Hand

Joined: Sep 30, 2009
Posts: 41

Thanks Jaikiran,

Well I have double checked, the project contains some apache.commons packages,apache.struts, xalan and xerces related jars only, but nothing related to JBoss and apache catalina jars.

Thanks for the help !!!

Thanks,
Joydeep
Joydeep Ghatak
Ranch Hand

Joined: Sep 30, 2009
Posts: 41

Also when I am trying to access the application in browser,

http://localhost:<port>/MYAPPUI/jsp/login.jsp, it is giving HTTP 404 error and the console exception, as mentioned earlier.

Joydeep Ghatak
Ranch Hand

Joined: Sep 30, 2009
Posts: 41

Hi all,

Any suggestion on the above mentioned error message please ?

thanks,
Joydeep
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10112
    
165

http://community.jboss.org/message/7214
Joydeep Ghatak
Ranch Hand

Joined: Sep 30, 2009
Posts: 41

Thanks Jaikiran,

I am working on to resolve the issue as per the given link.
Thanks for all the help !!!

~Joydeep
Joydeep Ghatak
Ranch Hand

Joined: Sep 30, 2009
Posts: 41

Hi Jaikiran,

Thanks for the help !!!
Well I tried my bets to delete all the JBoss specific jars or apache catalina jars from my WEB-INF/lib and it seems I am able to delete the jar files, as now the application .ear file is getting deployed in JBoss successfully (no exception in UI and/or in log file).
But when I tried to log into the application it was throwing the following exception.

Note :: The same configuration file is working fine in WebSpehe 6.0 and 6.1


Joydeep Ghatak
Ranch Hand

Joined: Sep 30, 2009
Posts: 41

Hi Jaikiran,

Thanks again for all the help.
BTW, the current problem has been resolved by updating the struts-config.xml of the project.

It seems that Jboss and Websphere considers, relative path(s) differently and hence here(In Jboss Domain) I had to modify the Action Mappings section of the
struts-config.xml as follows,


<action
path="/statusPage"
type="Action class for the statusPage"
parameter = "method"
name = "statusPageForm"
input= "jsp/statusPage.jsp">

<forward
name="statusPage"
path="/jsp/statusPage.jsp" redirect="false"/>

Thanks again !!!


~Thanks
Joydeep

 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JBoss 5.1.0 and Oracle 10g Configuration Issue with new DataSource