English 中文(简体)
位于Tomcat的OSGi的Cast Exception
原标题:ClassCastException in OSGi embedded in Tomcat

我们有一个在秘书长特别代表内部运作的框架。 我们的les子之一在JMS pub/sub based式通知中使用活性MQ。 这一障碍将活性q积在dle(私人)内。

Bundle-ClassPath: .,
 ....
 lib/activemq-all.jar,
 ....

所有这一切都对所有假想进行罚款(只有1例除外——嵌入案>)。

现在,我们正在处理各种假设情景,其中一项应用将我们的框架纳入其中。 在此之前,一项植根申请从产阶级开始使用活性成分。 这种嵌入式申请是一种基于目录的网络应用,具有积极性。 jar in tomcat slib.

我们的DONOT通过我们的碎块出口任何与活性木材有关的产品,因此,在我们的les子中,不应看到活性木板的班级,但似乎正在出现。

Caused by: java.lang.ClassCastException: org.apache.activemq.transport.tcp.TcpTransportFactory cannot be cast to org.apache.activemq.transport.TransportFactory 
at org.apache.activemq.transport.TransportFactory.findTransportFactory(TransportFactory.java:201)   
... 24 more

We tried setting/resetting ContextClassLoader before/after creating ActiveMQ connections which seemed to have solved this issue but breaking a lot of other stuff (around Apache Tuscany SDO that we use) so it is NOT a viable option.

Question: How come ActiveMQ classes are conflicting between app classpath and bundle classpath when they are completely disconnected? How to solve this problem?

问题回答

因此,如果我正确理解,你从Tomcat网络应用程序开始一个嵌入式的OSGi框架,从Tomcat阶级path的班次现在可见于OSGi环境中。

我猜测这取决于你向框架提供哪几类服务。 关于Felix(我不知道哪一个是OSGi执行,你可以使用机组特性

也许你的问题与,这个内容是和您的申请编号:org.osgi.framework.delegation=*





相关问题
Tomcat´s server.xml dynamic configuration

My web application uses the same database configuration as the application XYZ. I have a resource declaration for a context in server.xml, so I have a duplicated configuration (once for web ...

session transfer issue from Tomcat to ASP.Net

I am using Tomcat to host JSP and using IIS 7.0 to host aspx (C# + .Net 3.5 + VSTS 2008), and I have some session transfer issue from JSP page to ASPX page. JSP page is in one domain and all other ...

JSP exception - class not found (tomcat)

I m setting up an existing application on a new Tomcat 5.5 server connecting to a Postgres database (running on Debian Lenny). When I access it I get a series of stack traces with the following root ...