A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
Arduino in Action
this week in the
General Computing
forum!
A special promo:
Enter your blog post or vote on a blogger to be featured in an upcoming Journal
JavaRanch
»
Java Forums
»
Products
»
JBoss/WildFly
Author
JBoss 5.1 with Hibernate
Ashish Shinde
Ranch Hand
Joined: Dec 08, 2002
Posts: 34
posted
Aug 02, 2011 12:56:35
0
I am trying to use Hibernate packaged in
JBoss
5.1. The persistence.xml (JPA 2.0 compliant) has a tag as:
<shared-cache-mode>ENABLE_SELECTIVE</shared-cache-mode>
.
However, JBoss does not recognize it during startup and gives an error:
Caused by: org.jboss.xb.binding.JBossXBRuntimeException: {http://java.sun.com/xml/ns/persistence}shared-cache-mode cannot appear in this position. Expected cont ent of {http://java.sun.com/xml/ns/persistence}persistence-unit is unordered_sequence: {http://java.sun.com/xml/ns/persistence}provider? {http://java.sun.com/xm l/ns/persistence}properties? {http://java.sun.com/xml/ns/persistence}exclude-unlisted-classes? {http://java.sun.com/xml/ns/persistence}class* {http://java.sun.c om/xml/ns/persistence}jar-file* {http://java.sun.com/xml/ns/persistence}jta-data-source? {http://java.sun.com/xml/ns/persistence}non-jta-data-source? {http://ja va.sun.com/xml/ns/persistence}description? {http://java.sun.com/xml/ns/persistence}mapping-file* at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.startElement(SundayContentHandler.java:449) at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$DelegatingContentHandler.startElement(SaxJBossXBParser.java:401) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source) at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
Any idea as to what the resolution might be or what is causing the error?
I agree. Here's the link:
http://ej-technologies/jprofiler
- if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
subject: JBoss 5.1 with Hibernate
Similar Threads
How to use JTA with JPA
org.hibernate.exception.GenericJDBCException: Cannot open connection
Invalid character ':' in value part of property (JBoss-ds.xml)
Exception while deploying the bean
Problem javax.persistence.NoResultException: No entity found for query
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter