Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » [SOLVED] Problem with OSGI platform (BIRT 3.7 on JBoss AS 6)
[SOLVED] Problem with OSGI platform (BIRT 3.7 on JBoss AS 6) [message #727422] Wed, 21 September 2011 09:15 Go to next message
Erik  is currently offline Erik
Messages: 2
Registered: July 2009
Junior Member
I'm trying to use BIRT 3.7 in a web application that runs on JBoss AS 6. The report engine is invoked from a servlet which then presents a PDF to the user.

The problem is that it only works one time. The next time i try to render a report i get an exception on:
Platform.startup();

With the exception:
10:23:15,737 ERROR [STDERR] org.eclipse.birt.core.exception.BirtException: error.CannotStartupOSGIPlatform
10:23:15,738 ERROR [STDERR] 	at org.eclipse.birt.core.framework.Platform.startup(Platform.java:81)
[JBoss trace]
10:23:15,744 ERROR [STDERR] Caused by: org.eclipse.birt.core.framework.FrameworkException: Cant register the ExtensionRegistry classpath
10:23:15,745 ERROR [STDERR] 	at org.eclipse.birt.core.framework.jar.ServiceLauncher.startup(ServiceLauncher.java:99)
10:23:15,745 ERROR [STDERR] 	at org.eclipse.birt.core.framework.Platform.startup(Platform.java:75)
10:23:15,745 ERROR [STDERR] 	... 37 more
10:23:15,745 ERROR [STDERR] Caused by: org.eclipse.core.runtime.CoreException: Extension registry provider is already set.
10:23:15,746 ERROR [STDERR] 	at org.eclipse.core.internal.registry.RegistryProviderFactory.setDefault(RegistryProviderFactory.java:31)
10:23:15,746 ERROR [STDERR] 	at org.eclipse.core.runtime.RegistryFactory.setDefaultRegistryProvider(RegistryFactory.java:129)
10:23:15,746 ERROR [STDERR] 	at org.eclipse.birt.core.framework.jar.ServiceLauncher.startup(ServiceLauncher.java:84)
10:23:15,746 ERROR [STDERR] 	... 38 more


In order to get BIRT to run on JBoss i had to remove the jar-files:
org.eclipse.core.resources_3.7.100.v20110510-0712.jar
org.apache.xerces_2.9.0.v201101211617.jar


and i also get an exception during boot from the org.eclipse.osgi libraries:
11:13:06,217 WARN  [ClassLoaderManager] Unexpected error during load of:org.osgi.service.log.package-info: java.lang.ClassFormatError: Illegal class name "org/osgi/service/log/package-info" in class file org/osgi/service/log/package-info
	at java.lang.ClassLoader.defineClass1(Native Method) [:1.6.0_26]
	at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) [:1.6.0_26]
	at java.lang.ClassLoader.defineClass(ClassLoader.java:615) [:1.6.0_26]
	at org.jboss.classloader.spi.base.BaseClassLoader.access$200(BaseClassLoader.java:52) [jboss-classloader.jar:2.2.0.GA]
	at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:650) [jboss-classloader.jar:2.2.0.GA]
	at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:609) [jboss-classloader.jar:2.2.0.GA]
	at java.security.AccessController.doPrivileged(Native Method) [:1.6.0_26]
	at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:608) [jboss-classloader.jar:2.2.0.GA]
	at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:585) [jboss-classloader.jar:2.2.0.GA]
	at org.jboss.classloader.spi.base.BaseDelegateLoader.loadClass(BaseDelegateLoader.java:156) [jboss-classloader.jar:2.2.0.GA]
	at org.jboss.classloader.spi.filter.FilteredDelegateLoader.doLoadClass(FilteredDelegateLoader.java:141) [jboss-classloader.jar:2.2.0.GA]
	at org.jboss.classloader.spi.filter.FilteredDelegateLoader.loadClass(FilteredDelegateLoader.java:132) [jboss-classloader.jar:2.2.0.GA]
	at org.jboss.classloader.spi.base.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:461) [jboss-classloader.jar:2.2.0.GA]
	at org.jboss.classloader.spi.base.ClassLoaderManager.nextTask(ClassLoaderManager.java:262) [jboss-classloader.jar:2.2.0.GA]
	at org.jboss.classloader.spi.base.ClassLoaderManager.process(ClassLoaderManager.java:161) [jboss-classloader.jar:2.2.0.GA]
	at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:260) [jboss-classloader.jar:2.2.0.GA]
	at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:1152) [jboss-classloader.jar:2.2.0.GA]
	at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:886) [jboss-classloader.jar:2.2.0.GA]
	at org.jboss.classloader.spi.base.BaseClassLoader.doLoadClass(BaseClassLoader.java:505) [jboss-classloader.jar:2.2.0.GA]
	at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:450) [jboss-classloader.jar:2.2.0.GA]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247) [:1.6.0_26]
	at java.lang.Class.forName0(Native Method) [:1.6.0_26]
	at java.lang.Class.forName(Class.java:247) [:1.6.0_26]


Anyone have any idea of why this happens and how to solve it?

[Updated on: Thu, 22 September 2011 08:12]

Report message to a moderator

Re: Problem with OSGI platform (BIRT 3.7 on JBoss AS 6) [message #727652 is a reply to message #727422] Wed, 21 September 2011 18:45 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Erik,

You should only be starting the platform once and re-using it. Take a
look at the attached project. I assume you have the libs from the 3.7
runtime in your web-inf/lib directory and there is no web-inf/platform
directory in you application.

Jason


n 9/21/2011 5:15 AM, Erik wrote:
> I'm trying to use BIRT 3.7 in a web application that runs on JBoss AS 6.
> The report engine is invoked from a servlet which then presents a PDF to
> the user.
>
> The problem is that it only works one time. The next time i try to
> render a report i get an exception on:
> Platform.startup();
> With the exception:
> 10:23:15,737 ERROR [STDERR]
> org.eclipse.birt.core.exception.BirtException:
> error.CannotStartupOSGIPlatform
> 10:23:15,738 ERROR [STDERR] at
> org.eclipse.birt.core.framework.Platform.startup(Platform.java:81)
> [JBoss trace]
> 10:23:15,744 ERROR [STDERR] Caused by:
> org.eclipse.birt.core.framework.FrameworkException: Cant register the
> ExtensionRegistry classpath
> 10:23:15,745 ERROR [STDERR] at
> org.eclipse.birt.core.framework.jar.ServiceLauncher.startup(ServiceLauncher.java:99)
>
> 10:23:15,745 ERROR [STDERR] at
> org.eclipse.birt.core.framework.Platform.startup(Platform.java:75)
> 10:23:15,745 ERROR [STDERR] ... 37 more
> 10:23:15,745 ERROR [STDERR] Caused by:
> org.eclipse.core.runtime.CoreException: Extension registry provider is
> already set.
> 10:23:15,746 ERROR [STDERR] at
> org.eclipse.core.internal.registry.RegistryProviderFactory.setDefault(RegistryProviderFactory.java:31)
>
> 10:23:15,746 ERROR [STDERR] at
> org.eclipse.core.runtime.RegistryFactory.setDefaultRegistryProvider(RegistryFactory.java:129)
>
> 10:23:15,746 ERROR [STDERR] at
> org.eclipse.birt.core.framework.jar.ServiceLauncher.startup(ServiceLauncher.java:84)
>
> 10:23:15,746 ERROR [STDERR] ... 38 more
>
>
> In order to get BIRT to run on JBoss i had to remove the jar-files:
> org.eclipse.core.resources_3.7.100.v20110510-0712.jar
> org.apache.xerces_2.9.0.v201101211617.jar
>
> and i also get an exception during boot from the org.eclipse.osgi
> libraries:
>
> 11:13:06,217 WARN [ClassLoaderManager] Unexpected error during load
> of:org.osgi.service.log.package-info: java.lang.ClassFormatError:
> Illegal class name "org/osgi/service/log/package-info" in class file
> org/osgi/service/log/package-info
> at java.lang.ClassLoader.defineClass1(Native Method) [:1.6.0_26]
> at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) [:1.6.0_26]
> at java.lang.ClassLoader.defineClass(ClassLoader.java:615) [:1.6.0_26]
> at
> org.jboss.classloader.spi.base.BaseClassLoader.access$200(BaseClassLoader.java:52)
> [jboss-classloader.jar:2.2.0.GA]
> at
> org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:650)
> [jboss-classloader.jar:2.2.0.GA]
> at
> org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:609)
> [jboss-classloader.jar:2.2.0.GA]
> at java.security.AccessController.doPrivileged(Native Method) [:1.6.0_26]
> at
> org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:608)
> [jboss-classloader.jar:2.2.0.GA]
> at
> org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:585)
> [jboss-classloader.jar:2.2.0.GA]
> at
> org.jboss.classloader.spi.base.BaseDelegateLoader.loadClass(BaseDelegateLoader.java:156)
> [jboss-classloader.jar:2.2.0.GA]
> at
> org.jboss.classloader.spi.filter.FilteredDelegateLoader.doLoadClass(FilteredDelegateLoader.java:141)
> [jboss-classloader.jar:2.2.0.GA]
> at
> org.jboss.classloader.spi.filter.FilteredDelegateLoader.loadClass(FilteredDelegateLoader.java:132)
> [jboss-classloader.jar:2.2.0.GA]
> at
> org.jboss.classloader.spi.base.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:461)
> [jboss-classloader.jar:2.2.0.GA]
> at
> org.jboss.classloader.spi.base.ClassLoaderManager.nextTask(ClassLoaderManager.java:262)
> [jboss-classloader.jar:2.2.0.GA]
> at
> org.jboss.classloader.spi.base.ClassLoaderManager.process(ClassLoaderManager.java:161)
> [jboss-classloader.jar:2.2.0.GA]
> at
> org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:260)
> [jboss-classloader.jar:2.2.0.GA]
> at
> org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:1152)
> [jboss-classloader.jar:2.2.0.GA]
> at
> org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:886)
> [jboss-classloader.jar:2.2.0.GA]
> at
> org.jboss.classloader.spi.base.BaseClassLoader.doLoadClass(BaseClassLoader.java:505)
> [jboss-classloader.jar:2.2.0.GA]
> at
> org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:450)
> [jboss-classloader.jar:2.2.0.GA]
> at java.lang.ClassLoader.loadClass(ClassLoader.java:247) [:1.6.0_26]
> at java.lang.Class.forName0(Native Method) [:1.6.0_26]
> at java.lang.Class.forName(Class.java:247) [:1.6.0_26]
>
>
> Anyone have any idea of why this happens and how to solve it?
  • Attachment: WebReport.zip
    (Size: 78.48KB, Downloaded 777 times)
Re: Problem with OSGI platform (BIRT 3.7 on JBoss AS 6) [message #727913 is a reply to message #727652] Thu, 22 September 2011 08:11 Go to previous messageGo to next message
Erik  is currently offline Erik
Messages: 2
Registered: July 2009
Junior Member
Thanks Jason, now it works properly!
The only problem is the exception from the osgi-jars, but i'm hoping JBoss loads the rest of the classes in the jar.
Re: Problem with OSGI platform (BIRT 3.7 on JBoss AS 6) [message #727929 is a reply to message #727913] Thu, 22 September 2011 09:01 Go to previous message
Paul Ramsden is currently offline Paul Ramsden
Messages: 79
Registered: February 2011
Location: BW, Germany
Member
Just a quick comment to this problem. I was having similar symptoms but on Websphere. The OSGi service could not be started and the error message also contained

Caused by: org.eclipse.core.runtime.CoreException: Extension registry provider is already set.


It was solved by changing the class loader order. See http://wiki.eclipse.org/BirtPOJO_Viewer_WebSphere_Deployment for more details
Previous Topic:Merging datasets
Next Topic:[SOLVED] How to configure Dataset using DE API
Goto Forum:
  


Current Time: Sat Oct 25 17:49:15 GMT 2014

Powered by FUDForum. Page generated in 0.01802 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software