Random Uncompilable source code

UI Components for JSF
Post Reply
Valdorian
Posts: 8
Joined: 24 Oct 2011, 18:19

24 Oct 2011, 18:39

Hello PrimeFaces Board!

I am currently working on my second project with primefaces. It is a EJB-Based Webpage with PrimeFaces 2.2.1 , Hibernate3, a mySql Database and Glassfish 3.1 .

The architecture is:
Webpage (.xhtml)
Beans (mostly SessionScoped or RequestScoped)
Logic-Files (seperated into a ...Logic.java file which is a Interface and a ...LogicImpl.java file which is the implemented Code of the Interface)
Facade-Files (seperated into ...Facade.java and ...FacadeLocal.java, also Implemented Code and Interface)
Database

Sometimes, I get the Error while running my Project:
Schwerwiegend: Exception while loading the app : EJB Container initialization error
java.lang.ExceptionInInitializerError
...
Caused by: java.lang.RuntimeException: Uncompilable source code - annotation type not applicable to this kind of declaration

Well, the funny part is: when i start the project without the source files (which i cut-paste into a temp project), i can run it (of course the logic behind the pages wont work)
AND: after re-inserting the source files, i can run the project again.
Which means that this problem happens at random. Anyone knows why?

Some code for you of course:

Code: Select all

Schwerwiegend: Exception while loading the app : EJB Container initialization error
java.lang.ExceptionInInitializerError
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:186)
	at $Proxy385.<clinit>(Unknown Source)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
	at com.sun.ejb.containers.BaseContainer.instantiateEJBLocalBusinessObjectImpl(BaseContainer.java:3814)
	at com.sun.ejb.containers.StatelessSessionContainer.initializeHome(StatelessSessionContainer.java:249)
	at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:167)
	at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:230)
	at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:290)
	at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:101)
	at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:186)
	at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:257)
	at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
	at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
	at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:382)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1064)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1244)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1232)
	at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:459)
	at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:209)
	at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168)
	at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
	at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:238)
	at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828)
	at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725)
	at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019)
	at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
	at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
	at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
	at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
	at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
	at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
	at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
	at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
	at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
	at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
	at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.RuntimeException: Uncompilable source code - annotation type not applicable to this kind of declaration
	at de.logic.xLogic.<clinit>(xLogic_1.java:16)
	... 43 more
xLogic:

Code: Select all

@Local
public interface xLogic {
    public void create(x name);
....
and xLogicImpl:

Code: Select all

@Stateless
public class XLogicImpl implements XLogic {
    @EJB
    private XFacadeLocal xFacade;

    @Override
    public void create(X name){
        xFacade.create(name);
    }
One possible Explanation is that the error refers at: de.logic.xLogic.<clinit>(xLogic_1.java:16) (there is no _1, i copied xLogic and renamed the new file via refactor)

any ideas?
JSF 2.0
Primefaces 3.4
Glassfish 3.1

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

25 Oct 2011, 16:01

what does this have to do with primefaces?

Valdorian
Posts: 8
Joined: 24 Oct 2011, 18:19

26 Oct 2011, 23:49

Well, to be honest, i have no idea what the reason for this problem is. I think it is because of the EJBs but i do not know what forum to post in xD
I hoped that someone who uses primefaces also uses EJBs and knows that error... :roll:
JSF 2.0
Primefaces 3.4
Glassfish 3.1

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 33 guests