Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » EJB3 project errors and perisistence context editor parse errors
EJB3 project errors and perisistence context editor parse errors [message #207469] Sat, 26 January 2008 13:03 Go to next message
William Woodman is currently offline William WoodmanFriend
Messages: 28
Registered: July 2009
Junior Member
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.
Re: EJB3 project errors and perisistence context editor parse errors [message #207477 is a reply to message #207469] Sat, 26 January 2008 14:19 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dcarver.starstandard.org

> 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.


Does this happen when it builder validates the file? As the normal XML
Editor validation had no problem with this file using WTP 2.0.1 and Europa.
Re: EJB3 project errors and perisistence context editor parse errors [message #207493 is a reply to message #207477] Sun, 27 January 2008 12:41 Go to previous messageGo to next message
William Woodman is currently offline William WoodmanFriend
Messages: 28
Registered: July 2009
Junior Member
David i have the project open in J2EE mode

I am have shut down overnight and restarted - the parse error now doesnt
show this morning -

however the way to get it back is create a new EJB project and set
persistence facet.

then cut/paste the persistence.xml from another project - and paste into
the new project - this then immediately runs the builder in background
mode and it fails with the "Invalid content (no root node)" error

however as mentioned if you run the new EJB project on the server it works
okay.

however i do note i keep getting an error quite regularly when i start up
saying
'an internal error occurred when initialising "java tooling",
java.lang.nullPointerException'

I just got that now when i restarted eclipse and the new temp EJB project
is still showing an error in the persistence.xml i just cut and pasted
before i restarted. (i did this on my calisto build - however i get this
error on the ganymede build also sometimes)

also - I have problems with EAR files. I set up all the ear project
entries that establish and establish the module dependencies. HOwever
once i shutdown eclipse and restart it seems to randomly forget these
settinga and I have to go into the EAR each time and restablish the lost
dependencies in the EAR in order to get rid of a slew of errors in the
builder not seeing the paths and the individual projects declaring they
have no j2ee module dependencies until you do the manual fix -

could this be related to the tooling error just mentioned ?

This is very frustrating - is this just me or do others have this problem ?

Will
Re: EJB3 project errors and perisistence context editor parse errors [message #207501 is a reply to message #207493] Sun, 27 January 2008 13:53 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dcarver.starstandard.org

Will Woodman wrote:
> David i have the project open in J2EE mode
> I am have shut down overnight and restarted - the parse error now doesnt
> show this morning -
> however the way to get it back is create a new EJB project and set
> persistence facet.
>
> then cut/paste the persistence.xml from another project - and paste into
> the new project - this then immediately runs the builder in background
> mode and it fails with the "Invalid content (no root node)" error
> however as mentioned if you run the new EJB project on the server it
> works okay.
>
> however i do note i keep getting an error quite regularly when i start
> up saying 'an internal error occurred when initialising "java
> tooling", java.lang.nullPointerException'
>
> I just got that now when i restarted eclipse and the new temp EJB
> project is still showing an error in the persistence.xml i just cut and
> pasted before i restarted. (i did this on my calisto build - however i
> get this error on the ganymede build also sometimes)
>
> also - I have problems with EAR files. I set up all the ear project
> entries that establish and establish the module dependencies. HOwever
> once i shutdown eclipse and restart it seems to randomly forget these
> settinga and I have to go into the EAR each time and restablish the lost
> dependencies in the EAR in order to get rid of a slew of errors in the
> builder not seeing the paths and the individual projects declaring they
> have no j2ee module dependencies until you do the manual fix -
> could this be related to the tooling error just mentioned ?

Will, since you seem to be able to produce this pretty consistently, I'm
going to recommend that you open a bug report against the WTP JEE
component. Put as much detail in the bug report, as it will help the
committers track it down.

Especially since you are able to reproduce this on both Ganymede and
Callisto.

http://bugs.eclipse.org/bugs


Dave
Re: EJB3 project errors and perisistence context editor parse errors [message #207507 is a reply to message #207501] Sun, 27 January 2008 15:06 Go to previous message
William Woodman is currently offline William WoodmanFriend
Messages: 28
Registered: July 2009
Junior Member
thanks for looking

will do as suggested
Previous Topic:How to start jboss4.2.2GA in eclipse
Next Topic:Register to Download "Replay Director for JAVA EE" (beta)
Goto Forum:
  


Current Time: Thu Apr 25 07:20:10 GMT 2024

Powered by FUDForum. Page generated in 0.02942 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top