Skip to main content

Various questions about Vorpal

  2 posts   Feedicon  
Replies: 1 - Last Post: August 09, 2012 01:38
by: oneminutedistraction
showing 1 - 2 of 2
Posted: August 09, 2012 01:05 by oneminutedistraction
Note: This message was originally posted in here by renclav. I felt that the thread is too long

Hi,

I have recently returned to the XMPP world, to discover a few changes/issues:

1. If source is set to 6, netbeans complains
2. A class such as

@RequestScoped
public class LifeCycle {

private void presStart(@Observes ComponentPreStart preStartEvent) {

ComponentContext componentContext = preStartEvent.getComponentContext();
componentContext.identity(new IdentitySpecification("directory", "group", "Groups"));
componentContext.add(new FeatureSpecification("http://jabber.org/protocol/disco#items"));
System.out.println("\n\nPRESTART\n\n");
}
}

does not set the identity or anything defined in the above method, the default is still used. Glassfish log:
OFF: Firing component lifecycle event: ComponentPreStart
OFF: Instantiating com.indaba.XMPP.LifeCycle
OFF: Instantiating com.indaba.XMPP.LifeCycle
SEVERE: No valid EE environment for injection of com.indaba.XMPP.LifeCycle
INFO: PRESTART

3. Every packet sent to the component initiated the new conversation login. Does this mean that every user, for example, who performs a disco query, will start a conversion stored in glassfish?

4. All machines used for component testing phases are windows 64 bit, Netbeans 7.1 and Netbeans 7.2 with glassfish 3.1.2.
Yet some boxes just not run new components. The error logs:

OFF: XXXX container: com.kenai.jabberwocky.xmppcontainer.XEP0114Container@2c48a6
WARNING: Error in annotation processing: java.lang.NoClassDefFoundError: org/springframework/beans/factory/BeanNameAware
WARNING: Error in annotation processing: java.lang.NoClassDefFoundError: org/springframework/beans/factory/BeanNameAware
WARNING: Error in annotation processing: java.lang.NoClassDefFoundError: org/springframework/beans/factory/BeanNameAware
WARNING: Error in annotation processing: java.lang.NoClassDefFoundError: org/springframework/beans/factory/BeanNameAware
SEVERE: Class [ Lorg/springframework/core/io/Resource; ] not found. Error while loading [ class org.apache.activemq.spring.SpringSslContext ]
WARNING: Error in annotation processing: java.lang.NoClassDefFoundError: org/springframework/beans/factory/BeanNameAware
WARNING: Error in annotation processing: java.lang.NoClassDefFoundError: org/springframework/beans/factory/BeanNameAware
WARNING: Error in annotation processing: java.lang.NoClassDefFoundError: org/springframework/beans/factory/BeanNameAware
WARNING: Error in annotation processing: java.lang.NoClassDefFoundError: org/springframework/beans/factory/BeanNameAware
SEVERE: Class [ Lorg/springframework/core/io/Resource; ] not found. Error while loading [ class org.apache.activemq.spring.SpringSslContext ]
INFO: XXXX prepare: C:\Users\Dylan\Documents\NetBeansProjects\XMPP_Groups\build\web
INFO: Initializing Mojarra 2.1.6 (SNAPSHOT 20111206) for context ''
INFO: WELD-000900 1.1.4 (Final)
INFO: XXXX load: C:\Users\Dylan\Documents\NetBeansProjects\XMPP_Groups\build\web
INFO: XXXX source dir - name: web
INFO: XXXX source dir - absolute path: C:\Users\Dylan\Documents\NetBeansProjects\XMPP_Groups\build\web
INFO: XXXX class = index.jsp
INFO: XXXX class = META-INF
INFO: XXXX class = WEB-INF
INFO: XXXX class = WEB-INF/beans.xml
INFO: XXXX class = WEB-INF/classes
INFO: XXXX class = WEB-INF/classes/.netbeans_automatic_build
INFO: XXXX class = WEB-INF/classes/.netbeans_update_resources
INFO: XXXX class = WEB-INF/classes/com
INFO: XXXX class = WEB-INF/classes/com/indaba
INFO: XXXX class = WEB-INF/classes/com/indaba/manage
INFO: XXXX class = WEB-INF/classes/com/indaba/manage/IQHandler.class
INFO: XXXX class = WEB-INF/classes/com/indaba/manage/LifeCycle.class
INFO: XXXX class = WEB-INF/glassfish-web.xml
INFO: XXXX class = WEB-INF/lib
INFO: XXXX class = WEB-INF/lib/activemq-core-5.5.0.jar
INFO: XXXX class = WEB-INF/lib/mysql-connector-java-5.1.11-bin.jar
INFO: XXXX class = WEB-INF/web.xml
INFO: XXXX class = WEB-INF/xep-0114.xml
INFO: key = location, value = fileHmmmCHmmmUsers/Dylan/Documents/NetBeansProjects/XMPP_Groups/build/web/
INFO: key = directory-deployed, value = true
INFO: key = context-root, value = /XMPP_Groups
INFO: key = defaultAppName, value = web
INFO: key = object-type, value = user
INFO: WELD-000119 Not generating any bean definitions from com.indaba.manage.LifeCycle because of underlying class loading error
INFO: catching
org.jboss.weld.resources.spi.ResourceLoadingException: Error loading class com.indaba.manage.LifeCycle
at org.jboss.weld.resources.ClassTransformer.loadClass(ClassTransformer.java:152)
at org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:86)
at org.jboss.weld.bootstrap.BeanDeployer.addClasses(BeanDeployer.java:115)
at org.jboss.weld.bootstrap.BeanDeployment.createBeans(BeanDeployment.java:171)
at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:336)
at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:179)
at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:128)
at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:277)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:460)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:461)
at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212)
at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
at com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
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:662)
Caused by: java.lang.NoClassDefFoundError: com/kenai/jabberwocky/framework/event/ComponentPreStart
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
at java.lang.Class.getDeclaredMethods(Class.java:1791)
at org.jboss.weld.util.reflection.SecureReflections$8.work(SecureReflections.java:172)
at org.jboss.weld.util.reflection.SecureReflections$8.work(SecureReflections.java:169)
at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)
at org.jboss.weld.util.reflection.SecureReflectionAccess.runAndWrap(SecureReflectionAccess.java:63)
at org.jboss.weld.util.reflection.SecureReflections.getDeclaredMethods(SecureReflections.java:169)
at org.jboss.weld.introspector.jlr.WeldClassImpl.<init>(WeldClassImpl.java:233)
at org.jboss.weld.introspector.jlr.WeldClassImpl.of(WeldClassImpl.java:118)
at org.jboss.weld.resources.ClassTransformer$TransformTypeToWeldClass.apply(ClassTransformer.java:49)
at org.jboss.weld.resources.ClassTransformer$TransformTypeToWeldClass.apply(ClassTransformer.java:40)
at com.google.common.collect.ComputingConcurrentHashMap.compute(ComputingConcurrentHashMap.java:206)
at com.google.common.collect.ComputingConcurrentHashMap.apply(ComputingConcurrentHashMap.java:100)
at com.google.common.collect.MapMaker$ComputingMapAdapter.get(MapMaker.java:515)
at org.jboss.weld.resources.ClassTransformer.loadClass(ClassTransformer.java:149)
... 36 more
Caused by: java.lang.ClassNotFoundException: com.kenai.jabberwocky.framework.event.ComponentPreStart
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1509)
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1359)
... 52 more

INFO: WEB0671: Loading application [XMPP_Groups] at [/XMPP_Groups]
OFF: Using classloader: org.glassfish.web.loader.WebappClassLoader
INFO: >XXXX appProps key = appConfig, value = null
INFO: >XXXX appProps key = location, value = fileHmmmCHmmmUsers/Dylan/Documents/NetBeansProjects/XMPP_Groups/build/web/
INFO: >XXXX appProps key = directory-deployed, value = true
INFO: >XXXX appProps key = context-root, value = /XMPP_Groups
INFO: >XXXX appProps key = defaultAppName, value = web
INFO: >XXXX appProps key = object-type, value = user
SEVERE: Exception while invoking class com.kenai.jabberwocky.xmppcontainer.XEP0114ApplicationContainer start method
java.lang.ClassNotFoundException: com.kenai.jabberwocky.framework.core.JabberwockyComponent
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1509)
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1359)
at com.kenai.jabberwocky.xmppcontainer.XEP0114ApplicationContainer.start(XEP0114ApplicationContainer.java:268)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:301)
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:389)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:461)
at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212)
at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
at com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
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:662)

SEVERE: Exception while loading the app
INFO: XXXX unload: C:\Users\Dylan\Documents\NetBeansProjects\XMPP_Groups\build\web
INFO: XXXX clean: C:\Users\Dylan\Documents\NetBeansProjects\XMPP_Groups\build\web
WARNING: Exception while cleaning module 'org.glassfish.internal.data.EngineRef@167e563'java.lang.IllegalStateException: WEB9031: WebappClassLoader unable to load resource [META-INF/services/javax.xml.parsers.SAXParserFactory], because it has not yet been started, or was already stopped
java.lang.IllegalStateException: WEB9031: WebappClassLoader unable to load resource [META-INF/services/javax.xml.parsers.SAXParserFactory], because it has not yet been started, or was already stopped
at org.glassfish.web.loader.WebappClassLoader.findResourceInternal(WebappClassLoader.java:2074)
at org.glassfish.web.loader.WebappClassLoader.findResource(WebappClassLoader.java:1036)
at org.glassfish.web.loader.WebappClassLoader.findResource(WebappClassLoader.java:1020)
at org.glassfish.web.loader.WebappClassLoader.getResourceAsStream(WebappClassLoader.java:1254)
at javax.xml.parsers.SecuritySupport$4.run(SecuritySupport.java:96)
at java.security.AccessController.doPrivileged(Native Method)
at javax.xml.parsers.SecuritySupport.getResourceAsStream(SecuritySupport.java:89)
at javax.xml.parsers.FactoryFinder.findJarServiceProvider(FactoryFinder.java:250)
at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:223)
at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:128)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.getXMLReader(AbstractUnmarshallerImpl.java:115)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:172)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:177)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:186)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:204)
at com.kenai.jabberwocky.xmppcontainer.XARDeployer.clean(XARDeployer.java:75)
at org.glassfish.internal.data.EngineInfo.clean(EngineInfo.java:129)
at org.glassfish.internal.data.EngineRef.clean(EngineRef.java:175)
at com.sun.enterprise.v3.server.ApplicationLifecycle$1.actOn(ApplicationLifecycle.java:303)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:465)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:461)
at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212)
at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
at com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
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:662)

SEVERE: Exception while loading the app : com.kenai.jabberwocky.framework.core.JabberwockyComponent
INFO: WEB0671: Loading application [__admingui] at [/]
INFO: CORE10010: Loading application __admingui done in 4,652 ms
INFO: The Admin Console application is loaded.
INFO: logging.properties file removed, updating log levels disabled


Any idea why this occurs?

Regards,
Dylan
Posted: August 09, 2012 01:38 by oneminutedistraction
renclav

hope you don't mind I started your message in a new thread. I think you have some useful info and its buried too deep in a very old thread.

1. You mention about NB complaining if you set the source to 6. I'm using 6 to develop Vorpal. Can you give me some of the warnings?

2. Firstly you can ignore those warning messages about not having any EE environment. It's the way I've implemented the framework and the container.

As to the identity not appearing, here is what I've found

If you annotate your lifecycle class with
@RequestScoped
, your identity and features that you add to
ComponentContext
will not appear when the component starts up and gets the first
disco#info
request from the server viz. the XMPP server that your component is connecting to. You must explicitly send another
disco#info
to your component for that to be triggered

If you do not annotate your startup class with
@RequestScoped
then you'll get a response with all your configured identities and features.

I think this has something to do with how CDI works. I'm still trying to understand that. The best practice now is to not use any scoped annotations on lifecycle classes because they don't really fall into any of those scopes semantics.

3. That is true only for implicit conversations. Implicit conversations are IQs. The are opened when you send or receive a get/set and close when you send or receive a result/error. But for explicit conversations, they will not be started. You have to explicitly call
Conversation.begin()
to start it and will not end until either you call
Conversation.end()
or the conversation timeout.

I'll blog about implicit conversation in my next post and explicit the one after that or you can send any issues you have with conversation to the forum and I'll trying helping you

4. Looks like there is an issue with your WAR file cause I'm seeing lots of class not found. Look in either your WAR or NetBeans Project window node
WEB-INF/lib
; check if vorpal.jar is there. I've encountered this problem a few times.

HTH

Regards
Replies: 1 - Last Post: August 09, 2012 01:38
by: oneminutedistraction
 
 
Close
loading
Please Confirm
Close