Talk:DevelopJavaEE6App

First of all thank you for your tutorial!

A minor correction:
"In the New Session Bean dialog, specify the EJB Name as CustomerSession"
should be
"In the New Session Bean dialog, specify the EJB Name as CustomerSessionBean"


I've tried to follow your demo until the first deployment, when i got an error. I deleted the project, downloaded the zip version and tried with this: the result is identical. I copy here the server log:


INFO: nullID: /home/massimo/java-src/NetBeansProjects68/CustomerApp/dist/gfdeploy/CustomerApp/CustomerApp-ejb_jar/ CLASSES: [class com.customerapp.entity.DiscountCode, class com.customerapp.entity.Customer, class com.customerapp.ejb.CustomerSessionBean, class com.customerapp.mdb.NotificationBean]
ID: /home/massimo/java-src/NetBeansProjects68/CustomerApp/dist/gfdeploy/CustomerApp/CustomerApp-war_war/ CLASSES: [class com.customerapp.web.CustomerMBean]
   ID: /home/massimo/java-src/NetBeansProjects68/CustomerApp/dist/gfdeploy/CustomerApp/CustomerApp-ejb_jar/ CLASSES: [class com.customerapp.entity.DiscountCode, class com.customerapp.entity.Customer, class com.customerapp.ejb.CustomerSessionBean, class com.customerapp.mdb.NotificationBean]
SEVERE: Exception while loading the app
org.glassfish.deployment.common.DeploymentException: Message Driven Beans can't be Managed Beans
        at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:169)
        at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:125)
        at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:224)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:338)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
        at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
        at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:365)
        at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)
        at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
        at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:245)
        at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
        at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
        at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
        at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
        at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
        at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
        at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
        at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
        at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
        at java.lang.Thread.run(Thread.java:619)
Caused by: org.jboss.weld.DefinitionException: Message Driven Beans can't be Managed Beans
        at org.jboss.weld.bean.SessionBean.checkEJBTypeAllowed(SessionBean.java:313)
        at org.jboss.weld.bean.SessionBean.initialize(SessionBean.java:122)
        at org.jboss.weld.bootstrap.AbstractBeanDeployer.deploy(AbstractBeanDeployer.java:111)
        at org.jboss.weld.bootstrap.BeanDeployment.deployBeans(BeanDeployment.java:151)
        at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:367)
        at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:167)
        ... 30 more

What is the mistake I made?

Thank you again,
Massimo



I was able to get past this error by removing the 'beans.xml' files that netBeans 6.8 put in the folders.

+++ Also, this implmentation of nb with JSF 2 does not create a faces-config.xml. I manually created one and inserted the navigation rules from the downloaded version of this project. The "New JSF Managed Bean" has the "Add data to configuration file" option (check-box) disabled.

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo