Why is WebSphere not like BIRT?

I am trying to start a project deployment on Websphere and I am getting the following error trace. (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 third of the bottom error, as I found on the Internet, is to delete the next line of code.

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

However, this is not and there is no need for our configuration. It (the specific BIRT code used) is very similar to this online example:

http://www.springsource.org/BusinessIntelligenceWithSpringAndBIRT

BirtView and BirtEngineFactory are the only relevant parts of my project. I went to this Error page and the forum, and tried to add code. This does not work. The project starts and runs on Tomcat 6x without any problems.

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

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

I have a class loader order in Web Sphere defined in "Classes loaded first by the application class loader." as in the example in the link below.

http://wiki.eclipse.org/BirtPOJO_Viewer_WebSphere_Deployment

I am still getting the same set of errors, and I'm not sure what else I should do. I know it's a little difficult to ask about this without sending the code, but will anyone think about what I should look for? Thanks.

+4
source share
1 answer

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

Regarding the error described below, org.eclipse.core.runtime.CoreException when restarting ReportEngine

and the actual cause of the error indicated below, ServiceLauncher.shutdown () does not release default RegistryProvider

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

After that, the BIRT reports work fine.

But, I doubt it will break anything in WAS runtime or not. The reason for this is ...

As explained in the error, this exception occurs when trying to launch the platform a second time. Here, on Platform.shutdown (), the RegistryProvider is not freed and therefore an exception.

Now, in my case, IBM Websphere 8.5 internally uses OSGi and therefore runs the OSGi platform. Therefore, when our application tries to restart the platform (second launch), an exception is thrown. My concern here is that this should not break anything with WAS runtime (since it uses OSGi internally).

The registry provider is not null, because it is set by the BIRT runtime, so the only problem here may be a version mismatch, i.e. the WAS registry provider and the BIRT registry provider, if they are different, and then version conflicts.

I am not sure which solution I used. Experts, please direct.

+4
source

Source: https://habr.com/ru/post/1444215/


All Articles