0
votes

I'm using JavaEE 6, EJB3, JSF2 and JPA to develop a web shop, backend logic and desktop administration application for all that. I'm using Netbeans 7 and Glassfish for that.

Among a lot of stability issues I am having with Glassfish, I guess, one of them is really bugging. And when it creeps up there is literally no way to fix it until it goes by itself and everything continues working for a short period of time until it comes back.

It reflects itself as the EJB module stops working. The web application runs and the desktop runs but neither can access the EJB's. The usual messages in the Glassfish Server ouput when running the EAR are something like:

WARNING: Error in annotation processing: java.lang.NoClassDefFoundError: rs/elfak/eposlovanje/beans/ManagerBeanRemote

WARNING: Error in annotation processing: java.lang.NoClassDefFoundError: rs/elfak/eposlovanje/beans/SubcategoryBeanRemote WARNING: Error in annotation processing: java.lang.NoClassDefFoundError: rs/elfak/eposlovanje/beans/ProductBeanRemote

WARNING: Error in annotation processing: java.lang.NoClassDefFoundError: rs/elfak/eposlovanje/beans/CategoryBeanRemote

WARNING: Error in annotation processing: java.lang.NoClassDefFoundError: rs/elfak/eposlovanje/beans/ManagerBeanRemote

WARNING: Error in annotation processing: java.lang.NoClassDefFoundError: rs/elfak/eposlovanje/beans/SubcategoryBeanRemote

WARNING: Error in annotation processing: java.lang.NoClassDefFoundError: rs/elfak/eposlovanje/beans/ProductBeanRemote

WARNING: Error in annotation processing: java.lang.NoClassDefFoundError: rs/elfak/eposlovanje/beans/CategoryBeanRemote

SEVERE: Class [ Lrs/elfak/eposlovanje/beans/CategoryBeanRemote; ] not found. Error while

loading [ class exercise.UiBean ]

SEVERE: Class [ Lrs/elfak/eposlovanje/beans/CategoryBeanRemote; ] not found. Error while loading [ class exercise.UiBean ]

That leads to my CDI bean crashing, that's the thing called UiBean (I didn't go far enough so the naming is just temporary).

Down the glassfish console it also shows an error loading UiBean caused by:

org.jboss.weld.resources.spi.ResourceLoadingException: Error loading class exercise.UiBean . . .

Caused by: java.lang.NoClassDefFoundError: Lrs/elfak/eposlovanje/beans/CategoryBeanRemote; at java.lang.Class.getDeclaredFields0(Native Method) at java.lang.Class.privateGetDeclaredFields(Class.java:2317) at java.lang.Class.getDeclaredFields(Class.java:1762)...

And so on for each EJB. The xxxRemote items are actually remote interfaces, the EJBs are named like that but without the Remote postfix.

Sometimes I get an error related to JPA, as it can't create a table or execute a SQL (sometimes it tries to drop tables although the persistance.xml is set up not to create tables). But that usually goes away after hitting Run a couple of times.

What can be done concerning this? I've Googled up a couple of solutions, such as cleaning some Netbeans cache in AppData, re-adding the ejb and war projects, copying libs around, but nothing really cuts it.

Should I try some other application server, because it looks to me that it's the source of my problems?

1

1 Answers

0
votes

After a couple of other workstations joined the project with no problems, I clean reinstalled Glasfish server and Netbeans and it continued working on well.