EJB3 project errors and perisistence context editor parse errors [message #207469] |
Sat, 26 January 2008 08:03  |
Eclipse User |
|
|
|
can any one help. I want to check with the community before raising a bug.
I have used callisto and Ganymede m4 and had the same error in both.
I aam trying to build some simple applications with jboss and ejb3.
I keep getting anonomlies in the eclipse wtp j2ee editor context that seem
fairly consistent for me and a little annoying in use.
1. A number of times when I create an EJB project and specify the
peristence facet - the project gets created but the builder reports an
error on any persistence file i edit and save
example ..
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
<persistence-unit name="embedDS" transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider >
<jta-data-source>jdbc/embedDS</jta-data-source>
<properties>
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
<property name="hibernate.show_sql" value="true"/>
</properties>
</persistence-unit>
</persistence>
this persistence file shows an error in eclipse at the first line saying
"Invalid content [no root node]". whatever i do edit/overwrite save it
says the same. However if i deploy the project to the jboss server it
works and the persistence context can be used just fine -
this happens in both callisto and ganymede.
2. when i deploy an EAR project to jboss and use the add/remove projects
action on the server - I keep geting errors in the deploy which say that
the META-INF/application xml is not there. It still uninstalls and
reintalls. but i get this error.
I have the jboss tools bundle installed on my callisto build - and it
seems to use exploded EAR format (directory structure is deployed in the
'deploy' directory but the META-INF directory doesnt have an
application.xml file (hence the error) but it is there in the eclipse
project directory in the EAR project.
When i tried this in Ganymede (no jboss tools deploy) its copying the .ear
file into the deploy directory - however its moaning about not finding the
embedDS data source
--- MBeans waiting for other MBeans ---
ObjectName: jboss.j2ee:service=EJB3,module=CustSiteEAOProject.jar
State: FAILED
Reason: java.lang.ClassNotFoundException: Unexpected error during load
of: org.ww.eao.CustomerEAOBean, msg=Bad version number in .class file
ObjectName: persistence.units:ear=CustSiteEar.ear,unitName=embedDS
State: FAILED
Reason: javax.persistence.PersistenceException: [PersistenceUnit:
embedDS] class or package not found
I Depend On:
jboss.jca:service=DataSourceBinding,name=jdbc/embedDS
--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: persistence.units:ear=CustSiteEar.ear,unitName=embedDS
State: FAILED
Reason: javax.persistence.PersistenceException: [PersistenceUnit:
embedDS] class or package not found
I Depend On:
jboss.jca:service=DataSourceBinding,name=jdbc/embedDS
ObjectName: jboss.j2ee:service=EJB3,module=CustSiteEAOProject.jar
State: FAILED
Reason: java.lang.ClassNotFoundException: Unexpected error during load
of: org.ww.eao.CustomerEAOBean, msg=Bad version number in .class file
Still trying to find out why its not started. This works fine from the
callisto build - but not right now in the ganyemede one.
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03040 seconds