• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JBoss 4.2.0 and Oracle 10g Configuration Issue with new DataSource

 
Ranch Hand
Posts: 43
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ?
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You also need a jboss-web.xml file. This post might help you put it all together:
http://community.jboss.org/message/251298#251298
 
Joydeep Ghatak
Ranch Hand
Posts: 43
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 43
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
These errors suggest that you have the log4j or commons-logging JAR file in your WAR, remove them.
 
Joydeep Ghatak
Ranch Hand
Posts: 43
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot Peter.

Sorry for the delay in replying back, was entangled with some other project and other issues. (https://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
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your question has turned into a question about Eclipse. In fact, it is the same question that Naresh has in this post:
https://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
Posts: 43
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic