@Romain:
Well, the <listener-class> tag was automatically added by Netbeans when
I created the project. I commented it out when I re-targeted the project
to Glassfish or Glassfish would throw a deploy exception.
So with the project targeted to Glassfish, I clicked in "Clean and
Build" on the Project node and exited out of Netbeans. I then started
the TomEE instance from the command line with bin/startup.sh. Then I
cd'ed into webapps and copied the war file from my dist directory in the
Netbeans project, triggering a deploy as follows:
INFO: Deploying web application archive
/usr/local/java/apache-tomee-plus-1.5.0/webapps/CDITest.war
Dec 13, 2012 2:45:21 PM org.apache.tomee.catalina.TomcatWebAppBuilder init
INFO: -------------------------
TomcatWebAppBuilder.init /CDITest
Dec 13, 2012 2:45:21 PM org.apache.openejb.util.JarExtractor extract
INFO: Extracting jar:
/usr/local/java/apache-tomee-plus-1.5.0/webapps/CDITest.war
Dec 13, 2012 2:45:21 PM org.apache.openejb.util.JarExtractor extract
INFO: Extracted path:
/usr/local/java/apache-tomee-plus-1.5.0/webapps/CDITest
Dec 13, 2012 2:45:22 PM org.apache.openejb.config.ConfigurationFactory
configureApplication
INFO: Configuring enterprise application:
/usr/local/java/apache-tomee-plus-1.5.0/webapps/CDITest
Dec 13, 2012 2:45:22 PM org.apache.openejb.config.AppInfoBuilder build
INFO: Enterprise application
"/usr/local/java/apache-tomee-plus-1.5.0/webapps/CDITest" loaded.
Dec 13, 2012 2:45:22 PM org.apache.openejb.assembler.classic.Assembler
createApplication
INFO: Assembling app:
/usr/local/java/apache-tomee-plus-1.5.0/webapps/CDITest
Dec 13, 2012 2:45:22 PM org.apache.openejb.cdi.CdiBuilder initSingleton
INFO: Existing thread singleton service in SystemInstance()
org.apache.openejb.cdi.ThreadSingletonServiceImpl@3083e8d
Dec 13, 2012 2:45:22 PM org.apache.openejb.cdi.OpenEJBLifecycle
startApplication
INFO: OpenWebBeans Container is starting...
Dec 13, 2012 2:45:22 PM org.apache.webbeans.plugins.PluginLoader startUp
INFO: Adding OpenWebBeansPlugin : [CdiPlugin]
Dec 13, 2012 2:45:22 PM org.apache.webbeans.plugins.PluginLoader startUp
INFO: Adding OpenWebBeansPlugin : [OpenWebBeansJsfPlugin]
Dec 13, 2012 2:45:22 PM org.apache.openejb.cdi.BeansDeployer
validateInjectionPoints
INFO: All injection points are validated successfully.
Dec 13, 2012 2:45:22 PM org.apache.openejb.cdi.OpenEJBLifecycle
startApplication
INFO: OpenWebBeans Container has started, it took 6 ms.
Dec 13, 2012 2:45:22 PM org.apache.tomee.catalina.TomcatWebAppBuilder
deployWebApps
INFO: using context file
/usr/local/java/apache-tomee-plus-1.5.0/webapps/CDITest/META-INF/context.xml
Dec 13, 2012 2:45:22 PM org.apache.openejb.assembler.classic.Assembler
createApplication
INFO: Deployed
Application(path=/usr/local/java/apache-tomee-plus-1.5.0/webapps/CDITest)
Dec 13, 2012 2:45:22 PM
org.apache.myfaces.config.DefaultFacesConfigurationProvider
getStandardFacesConfig
INFO: Reading standard config META-INF/standard-faces-config.xml
Dec 13, 2012 2:45:22 PM org.apache.myfaces.config.LogMetaInfUtils
logArtifact
INFO: Artifact 'myfaces-api' was found in version '2.1.9' from path
'file:/usr/local/java/apache-tomee-plus-1.5.0/lib/myfaces-api-2.1.9.jar'
Dec 13, 2012 2:45:22 PM org.apache.myfaces.config.LogMetaInfUtils
logArtifact
INFO: Artifact 'myfaces-impl' was found in version '2.1.9' from path
'file:/usr/local/java/apache-tomee-plus-1.5.0/lib/myfaces-impl-2.1.9.jar'
Dec 13, 2012 2:45:22 PM org.apache.myfaces.config.FacesConfigurator
handleSerialFactory
INFO: Serialization provider : class
org.apache.myfaces.shared_impl.util.serial.DefaultSerialFactory
Dec 13, 2012 2:45:22 PM
org.apache.myfaces.config.annotation.DefaultLifecycleProviderFactory
getLifecycleProvider
INFO: Using LifecycleProvider
org.apache.myfaces.config.annotation.Tomcat7AnnotationLifecycleProvider
Dec 13, 2012 2:45:22 PM
org.apache.myfaces.webapp.AbstractFacesInitializer initFaces
INFO: ServletContext initialized.
Dec 13, 2012 2:45:22 PM
org.apache.myfaces.webapp.AbstractFacesInitializer initFaces
WARNING:
*******************************************************************
*** WARNING: Apache MyFaces-2 is running in DEVELOPMENT mode. ***
*** ^^^^^^^^^^^ ***
*** Do NOT deploy to your live server(s) without changing this. ***
*** See Application#getProjectStage() for more information. ***
*******************************************************************
I go the the app URL ( http://localhost:8080/CDITest/) and still get
nothing other than the hard-coded text, not the text from the bean method.
So, yeah, I guess the <listener-class> tag was not necessary. Actually
makes it easier for me to switch between Glassfish and TomEE in
Netbeans. Anyway, do you have other suggestions?
Thanks,
Kay
On 12/13/2012 02:37 PM, Romain Manni-Bucau wrote:
hmm,
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
is useless but that's not it
did yuo put a beans.xml?
does it work in manual mode (put your war in webapps then bin/catalina.sh run)?
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau
2012/12/13 Kay Wrobel <[email protected]>:
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
--
------------------------------
The information in this e-mail is confidential and is intended solely for
the addressee(s). Access to this email by anyone else is unauthorized. If
you are not an intended recipient, you may not print, save or otherwise
store the e-mail or any of the contents thereof in electronic or physical
form, nor copy, use or disseminate the information contained in the email.
If you are not an intended recipient, please notify the sender of this
email immediately.