This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes EJB in action - Chapter 2 EAR file error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "EJB in action - Chapter 2 EAR file error" Watch "EJB in action - Chapter 2 EAR file error" New topic
Author

EJB in action - Chapter 2 EAR file error

Abhay Agarwal
Ranch Hand

Joined: Feb 29, 2008
Posts: 1086
    
    1

Hi

I am trying to run EJB3 in action Chapter 2 code.

I am using Jboss version 5.
Instead of using default DB(hypersonic), i configured MySQL DB with my JBOSS.

I ran ant script to build an EAR file for Chapter 2 code and then i placed the EAR file on Jboss'deploy folder. On placing EAR file, i get below mentioned error on command prompt

"Deployment "vfszip:/C:/jboss-5.0.1.GA/server/default/deploy/chapter2.ear/" is in error due to the following reason(s): org.jboss.xb.binding.JBossXBRuntimeException: Failed to resolve schema nsURI= location=persistence"


I found that my persistence.xml is having Hypersonic DB settings.




Please let me how can i configure my persistence.xml according to MySQL so that Chapter 2 EAR file is deployed successfully

Thanks


Oracle Java Web Service Developer (1z0-897), Oracle certified Java 7 Programmer, SCJA 1.0, SCJP 5.0, SCWCD 5.0, Oracle SQL Fundamentals I
Davide Crudo
Ranch Hand

Joined: Sep 08, 2009
Posts: 62
Hi,

My persistence.xml (for O'reilly, but working on jboss 5.x) looks like the following:



Then, under the JBOSS server directory"../Server/Default/Deploy" directory, i put my "titan-ds.xml" file that looks
like the following:



Note that when I've switched to Jboss 5.x...I had to rewrite the XML files... you cannot apparently using the
old XML for version 4.x with the new version...

Dave


SCJP, SCBCD
 
Don't get me started about those stupid light bulbs.
 
subject: EJB in action - Chapter 2 EAR file error