为什么Websphere不喜欢BIRT? [英] Why doesn't Websphere like BIRT?

查看:145
本文介绍了为什么Websphere不喜欢BIRT?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试开始将项目部署到Websphere,并且得到以下错误提示. (缩短)

ERROR org.springframework.web.context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'birtView' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'birtEngine' while setting bean property 'birtEngine'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'birtEngine': FactoryBean threw exception on object creation; nested exception is java.lang.RuntimeException: Could not start the Birt engine!
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'birtEngine': FactoryBean threw exception on object creation; nested exception is java.lang.RuntimeException: Could not start the Birt engine!
Caused by: java.lang.RuntimeException: Could not start the Birt engine!
Caused by: org.eclipse.birt.core.exception.BirtException: error.CannotStartupOSGIPlatform
Caused by: org.eclipse.birt.core.framework.FrameworkException: Cant register the ExtensionRegistry classpath
Caused by: org.eclipse.core.runtime.CoreException: Extension registry provider is already set.

从网上发现的第三种错误的解决方法是删除以下代码行.

config.setEngineHome("C:/birt-runtime-3_7_0/ReportEngine");

但是,这对于我们的设置不存在且不必要. 它(使用的BIRT特定代码)与在线示例非常相似:

http://www.springsource.org/BusinessIntelligenceWithSpringAndBIRT

BirtView和BirtEngineFactory是我项目中唯一相关的部分. 我已经进入了此错误页面和论坛条目,并尝试添加代码.那没起效.该项目启动并且可以在Tomcat 6x上正常运行.

http://www.eclipse.org/forums/index.php/m/727929/

https://bugs.eclipse.org/bugs/show_bug.cgi? id = 351052

我将Web Sphere中的类加载器顺序设置为首先使用应用程序类加载器加载类".就像下面链接中的示例一样.

http://wiki.eclipse.org/BirtPOJO_Viewer_WebSphere_Deployment

我仍然会遇到同样的错误,而且我不确定我还应该做什么. 我知道在不发布代码的情况下问这个问题有点困难,但是有人会对我应该寻找的东西有一个想法吗? 谢谢.

解决方案

我遇到的错误与您的错误完全相同.我正在使用BIRT 3.7.2和IBM WAS 8.5

参考下面详细介绍的错误, 重新启动ReportEngine时 org.eclipse.core.runtime.CoreException

和错误的实际原因(如下所示), ServiceLauncher.shutdown()不会释放默认的RegistryProvider

我在Platform.startup(..)调用之前添加了以下行 RegistryProviderFactory.releaseDefault();

此后,BIRT报告运行正常.

但是,我怀疑这是否会破坏WAS的运行时中的任何内容. 原因是...

如该错误中所述,第二次尝试启动平台时会发生此异常.这里,在Platform.shutdown()上,RegistryProvider未释放,因此是异常.

现在,就我而言,IBM Websphere 8.5在内部使用OSGi,因此启动了OSGi平台. 因此,当我们的应用程序尝试再次启动平台(第二次启动)时,会发生异常. 我在这里担心的是,这不会影响WAS的运行时(因为它在内部使用OSGi).

注册表提供者不为空,这是BIRT运行时所设置的,因此,这里唯一的问题可能是类版本不匹配,即WAS的注册表提供者和BIRTs注册表提供者,如果不同,则版本冲突.

我不确定我使用的解决方案. 专家,请指导.

I am trying to start a deployment of a project to Websphere and I get the following error trail. (Shortened)

ERROR org.springframework.web.context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'birtView' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'birtEngine' while setting bean property 'birtEngine'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'birtEngine': FactoryBean threw exception on object creation; nested exception is java.lang.RuntimeException: Could not start the Birt engine!
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'birtEngine': FactoryBean threw exception on object creation; nested exception is java.lang.RuntimeException: Could not start the Birt engine!
Caused by: java.lang.RuntimeException: Could not start the Birt engine!
Caused by: org.eclipse.birt.core.exception.BirtException: error.CannotStartupOSGIPlatform
Caused by: org.eclipse.birt.core.framework.FrameworkException: Cant register the ExtensionRegistry classpath
Caused by: org.eclipse.core.runtime.CoreException: Extension registry provider is already set.

The solution to the 3rd from bottom error as I have found online was to delete the following line of code.

config.setEngineHome("C:/birt-runtime-3_7_0/ReportEngine");

However, this is not present and unnecessary for our setup. It(the BIRT specific code used) is very similar to this example online:

http://www.springsource.org/BusinessIntelligenceWithSpringAndBIRT

The BirtView and BirtEngineFactory are the only relevant parts to my project. I have gone to this Bug Page and forum entry and tried the code addition. It did not work. The project starts up and works on Tomcat 6x without any issue.

http://www.eclipse.org/forums/index.php/m/727929/

https://bugs.eclipse.org/bugs/show_bug.cgi?id=351052

I have the class loader order in Web Sphere set to "Classes loaded with application class loader first." as in the example in the link below.

http://wiki.eclipse.org/BirtPOJO_Viewer_WebSphere_Deployment

I still get the same set of errors and I'm not sure what else I should be doing. I know it is a bit hard to ask this without posting code, but would someone have an idea as to what I should look for? Thanks.

解决方案

I had exactly the same error as yours. I am using BIRT 3.7.2 and IBM WAS 8.5

With reference to the bug detailed below, org.eclipse.core.runtime.CoreException when restarting the ReportEngine

and the actual reason of the bug, specified below, ServiceLauncher.shutdown() doesn't release default RegistryProvider

I added the following line before the Platform.startup(..) call RegistryProviderFactory.releaseDefault();

After this, BIRT reports are working fine.

But, I'm doubtful, as to whether this will break anything in WAS's runtime or not. The reason for this is ...

As explained in the bug, this exception occurs when Platform start-up is attempted for a second time. Here, on Platform.shutdown(), the RegistryProvider is not released, and hence the exception.

Now, in my case, IBM Websphere 8.5 internally uses OSGi and hence starts OSGi Platform. Hence, when our application attempts to start the Platform again (the second start), the exception occurs. My concern here is, this should not break anything with WAS’s runtime (as it uses OSGi internally).

The Registry Provider is not null, as its set by BIRT runtime, so, the only problem here can be of Class Version mismatch i.e., WAS’s Registry Provider and BIRTs Registry Provider, if different, then version clashes.

I'm not sure of the solution i have used. Experts, please guide.

这篇关于为什么Websphere不喜欢BIRT?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆