New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation issue #13

Closed
JackWangCS opened this Issue Nov 12, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@JackWangCS

JackWangCS commented Nov 12, 2015

I install the sitewhere -1.2.0 on Windows Server 2012R2, and modify the default-tenant.xml to connect to Azure EventHub. But, when I start the server, I always meet this error.
2015-11-12 14:29:38,097 ERROR [EventHubOutboundEventProcessor] EventHubOutboundEventProcessor state transitioned to ERROR.
com.sitewhere.spi.SiteWhereException: javax.naming.NoInitialContextException: Cannot instantiate class: org.apache.qpid.amqp_1_0.jms.jndi.PropertiesFileInitialContextFactory [Root exception is java.lang.ClassNotFoundException: org.apache.qpid.amqp_1_0.jms.jndi.PropertiesFileInitialContextFactory]
at com.sitewhere.azure.device.communication.EventHubOutboundEventProcessor.start(EventHubOutboundEventProcessor.java:103)
at com.sitewhere.server.lifecycle.LifecycleComponent.lifecycleStart(LifecycleComponent.java:86)
at com.sitewhere.server.lifecycle.LifecycleComponent.startNestedComponent(LifecycleComponent.java:244)
at com.sitewhere.server.lifecycle.LifecycleComponent.startNestedComponent(LifecycleComponent.java:231)
at com.sitewhere.device.event.processor.DefaultOutboundEventProcessorChain.start(DefaultOutboundEventProcessorChain.java:58)
at com.sitewhere.server.lifecycle.LifecycleComponent.lifecycleStart(LifecycleComponent.java:86)
at com.sitewhere.server.lifecycle.LifecycleComponent.startNestedComponent(LifecycleComponent.java:244)
at com.sitewhere.server.SiteWhereServer.start(SiteWhereServer.java:382)
at com.sitewhere.server.lifecycle.LifecycleComponent.lifecycleStart(LifecycleComponent.java:86)
at com.sitewhere.SiteWhere.start(SiteWhere.java:35)
at com.sitewhere.web.SiteWhereServerLoader.init(SiteWhereServerLoader.java:45)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5267)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5557)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1095)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1930)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.naming.NoInitialContextException: Cannot instantiate class: org.apache.qpid.amqp_1_0.jms.jndi.PropertiesFileInitialContextFactory [Root exception is java.lang.ClassNotFoundException: org.apache.qpid.amqp_1_0.jms.jndi.PropertiesFileInitialContextFactory]
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:674)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313)
at javax.naming.InitialContext.init(InitialContext.java:244)
at javax.naming.InitialContext.(InitialContext.java:216)
at com.sitewhere.azure.device.communication.EventHubOutboundEventProcessor.start(EventHubOutboundEventProcessor.java:93)
... 27 more
Caused by: java.lang.ClassNotFoundException: org.apache.qpid.amqp_1_0.jms.jndi.PropertiesFileInitialContextFactory
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1722)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1573)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:72)
at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:61)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:672)
... 31 more
which causes "2015-11-12 14:29:38,923 WARN [DefaultOutboundEventProcessorChain] Skipping event processor EventHubOutboundEventProcessor because its state is 'Error'".

Hope you can help :)

@derekadams

This comment has been minimized.

Member

derekadams commented Nov 12, 2015

It looks like the Apache Qpid library is no longer being packaged with the SiteWhere web archive. We will look into the problem. In the meantime, you should be able to copy the jar from https://github.com/sitewhere/sitewhere/blob/master/sitewhere-azure/lib/qpid-amqp-1-0-client-all-mod.jar and paste it into your sitewhere/webapps/sitewhere/WEB-INF/lib folder, then restart the server. We should have it fixed for the 1.4.0 release later this month.

@JackWangCS

This comment has been minimized.

JackWangCS commented Nov 13, 2015

Thanks for you reply, I will have a try!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment