Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 315345

Summary: Cant startup the OSGI framework on CentOS 5.5
Product: z_Archived Reporter: Kurt Knippschild <kurt>
Component: BIRTAssignee: Birt-ReportViewer <Birt-ReportViewer-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: major    
Priority: P3 CC: bluesoldier, zqian
Version: 2.5.2   
Target Milestone: 3.7.0   
Hardware: PC   
OS: Linux   
Whiteboard: Obsolete
Attachments:
Description Flags
catalina.out none

Description Kurt Knippschild CLA 2010-06-02 02:34:25 EDT
Build Identifier: 2_5_2

Hi,
i have installed the birt-viewer 2_5_2 in CentOS 5.5 in Tomcat 5.5 and always i become this Error when run this command http://gyes-demo.baycix.de:8080/birt/frameset?__report=test.rptdesign&sample=my+parameter

I take the birt-viewer not the servlet.

org.eclipse.birt.core.exception.BirtException: Cant startup the OSGI framework	at org.eclipse.birt.core.framework.Platform.startup(Platform.java:91)	at org.eclipse.birt.report.service.ReportEngineService.setEngineContext(ReportEngineService.java:320)	at org.eclipse.birt.report.service.BirtViewerReportService.setContext(BirtViewerReportService.java:1022)	at org.eclipse.birt.report.servlet.ViewerServlet.__getContext(ViewerServlet.java:148)	at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.doGet(BirtSoapMessageDispatcherServlet.java:151)	at javax.servlet.http.HttpServlet.service(HttpServlet.java:627)	at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)	at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.service(BirtSoapMessageDispatcherServlet.java:122)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)	at org.eclipse.birt.report.filter.ViewerFilter.doFilter(ViewerFilter.java:68)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:873)	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)	at java.lang.Thread.run(Unknown Source)Caused by: org.eclipse.birt.core.exception.CoreException	at org.eclipse.birt.core.framework.osgi.OSGILauncher.startup(OSGILauncher.java:90)	at org.eclipse.birt.core.framework.Platform.startup(Platform.java:79)	... 25 more

What can i do.

Thank for your answer.
Kurt

Reproducible: Always

Steps to Reproduce:
1.Got to http://gyes-demo.baycix.de:8080/birt
2.Click on View Example
3.
Comment 1 Zhiqiang Qian CLA 2010-06-02 04:27:52 EDT
Can you attach the viewer log file?
Comment 2 Kurt Knippschild CLA 2010-06-02 05:05:15 EDT
Created attachment 170761 [details]
catalina.out
Comment 3 Kurt Knippschild CLA 2010-06-02 05:07:03 EDT
Hi,

in the viewer log there are no entrys.
In the catalina.out ther are entrys.
I have attached the catalina.out.

Kurt
Comment 4 Zhiqiang Qian CLA 2010-06-02 20:22:45 EDT
This may be the reason:

Caused by: java.lang.NullPointerException
	at org.eclipse.core.runtime.internal.adaptor.EclipseEnvironmentInfo.guessOS(EclipseEnvironmentInfo.java:211)
	at org.eclipse.core.runtime.internal.adaptor.EclipseEnvironmentInfo.setupSystemContext(EclipseEnvironmentInfo.java:145)
	at org.eclipse.core.runtime.internal.adaptor.EclipseEnvironmentInfo.<init>(EclipseEnvironmentInfo.java:53)
	at org.eclipse.core.runtime.internal.adaptor.EclipseEnvironmentInfo.getDefault(EclipseEnvironmentInfo.java:58)
	at org.eclipse.core.runtime.internal.adaptor.EclipseClassLoadingHook.<clinit>(EclipseClassLoadingHook.java:30)


Seems the eclipse OSGI cannot recognize CentOS during startup. You can manually add the vm property "os.name=linux" for the Tomcat instance and try again.
Comment 5 Kurt Knippschild CLA 2010-06-03 01:58:56 EDT
Hi,

sorry, but I don't know on which point I can add the vm property "os.name=linux" for the Tomcat instance. Can you tell me in wich file on wich position I must do this?

Thanks.

Kurt
Comment 6 Kurt Knippschild CLA 2010-06-03 02:14:46 EDT
Hi,

when I start ./version.sh then this is the output:

[root@gyes-demo bin]# ./version.sh
Using CATALINA_BASE:   /opt/apache-tomcat-5.5.29
Using CATALINA_HOME:   /opt/apache-tomcat-5.5.29
Using CATALINA_TMPDIR: /opt/apache-tomcat-5.5.29/temp
Using JRE_HOME:        /usr/java/default
Using CLASSPATH:       /opt/apache-tomcat-5.5.29/bin/bootstrap.jar
Server version: Apache Tomcat/5.5.29
Server built:   Mar 29 2010 07:46:34
Server number:  5.5.29.0
OS Name:        Linux
OS Version:     2.6.18-194.3.1.el5
Architecture:   amd64
JVM Version:    1.6.0_20-b02
JVM Vendor:     Sun Microsystems Inc.

and the env command give this output:

SSH_AGENT_PID=22243
HOSTNAME=gyes-demo.baycix.de
SHELL=/bin/bash
DESKTOP_STARTUP_ID=
TERM=xterm
HISTSIZE=1000
SSH_CLIENT=127.0.0.1 53501 22
GTK_RC_FILES=/etc/gtk/gtkrc:/home/kknipp/.gtkrc-1.2-gnome2
WINDOWID=41946563
USER=kknipp
LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:
SSH_AUTH_SOCK=/tmp/ssh-ccaYU22241/agent.22241
GNOME_KEYRING_SOCKET=/tmp/keyring-8LpaD1/socket
SESSION_MANAGER=local/gyes-demo.baycix.de:/tmp/.ICE-unix/22241
JAVA_PATH=/usr/java/default/bin
NXSESSIONID=gyes-demo.baycix.de-1000-6B84528AC743BFFCC73EA0D1A44F6A74
MAIL=/var/spool/mail/kknipp
PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/java/default/bin:/usr/java/default/bin:/usr/java/default/bin:/home/kknipp/bin:/usr/java/default/bin:/usr/java/default/bin
SHADOW_XAUTHORITY=/home/kknipp/.nx/C-gyes-demo.baycix.de-1000-6B84528AC743BFFCC73EA0D1A44F6A74/authority
INPUTRC=/etc/inputrc
PWD=/etc
JAVA_HOME=/usr/java/default
LANG=en_US.UTF-8
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
SLAVE_PID=21656
SHLVL=5
HOME=/root
GNOME_DESKTOP_SESSION_ID=Default
LOGNAME=kknipp
SSH_CONNECTION=127.0.0.1 53501 127.0.0.1 22
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-uige7nih6D,guid=f19156d3e8fbc188d0b659004c0744c5
LESSOPEN=|/usr/bin/lesspipe.sh %s
DISPLAY=:1000.0
G_BROKEN_FILENAMES=1
XAUTHORITY=/root/.xauthuu0wiA
COLORTERM=gnome-terminal
OLDPWD=/home/kknipp
_=/bin/env
[root@gyes-demo etc]# env
SSH_AGENT_PID=22243
HOSTNAME=gyes-demo.baycix.de
SHELL=/bin/bash
DESKTOP_STARTUP_ID=
TERM=xterm
HISTSIZE=1000
SSH_CLIENT=127.0.0.1 53501 22
GTK_RC_FILES=/etc/gtk/gtkrc:/home/kknipp/.gtkrc-1.2-gnome2
WINDOWID=41946563
USER=kknipp
LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:
SSH_AUTH_SOCK=/tmp/ssh-ccaYU22241/agent.22241
GNOME_KEYRING_SOCKET=/tmp/keyring-8LpaD1/socket
SESSION_MANAGER=local/gyes-demo.baycix.de:/tmp/.ICE-unix/22241
JAVA_PATH=/usr/java/default/bin
NXSESSIONID=gyes-demo.baycix.de-1000-6B84528AC743BFFCC73EA0D1A44F6A74
MAIL=/var/spool/mail/kknipp
PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/java/default/bin:/usr/java/default/bin:/usr/java/default/bin:/home/kknipp/bin:/usr/java/default/bin:/usr/java/default/bin
SHADOW_XAUTHORITY=/home/kknipp/.nx/C-gyes-demo.baycix.de-1000-6B84528AC743BFFCC73EA0D1A44F6A74/authority
INPUTRC=/etc/inputrc
PWD=/etc
JAVA_HOME=/usr/java/default
LANG=en_US.UTF-8
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
SLAVE_PID=21656
SHLVL=5
HOME=/root
GNOME_DESKTOP_SESSION_ID=Default
LOGNAME=kknipp
SSH_CONNECTION=127.0.0.1 53501 127.0.0.1 22
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-uige7nih6D,guid=f19156d3e8fbc188d0b659004c0744c5
LESSOPEN=|/usr/bin/lesspipe.sh %s
DISPLAY=:1000.0
G_BROKEN_FILENAMES=1
XAUTHORITY=/root/.xauthuu0wiA
COLORTERM=gnome-terminal
OLDPWD=/home/kknipp
_=/bin/env


I hope this can help you.

Thanks Kurt
Comment 7 Kurt Knippschild CLA 2010-06-08 05:52:44 EDT
Hi,

[root@gyes-demo bin]# ./version.sh
Using CATALINA_BASE:   /opt/apache-tomcat-5.5.29
Using CATALINA_HOME:   /opt/apache-tomcat-5.5.29
Using CATALINA_TMPDIR: /opt/apache-tomcat-5.5.29/temp
Using JRE_HOME:        /usr/java/default
Using CLASSPATH:       /opt/apache-tomcat-5.5.29/bin/bootstrap.jar
Server version: Apache Tomcat/5.5.29
Server built:   Mar 29 2010 07:46:34
Server number:  5.5.29.0
OS Name:        Linux
OS Version:     2.6.18-194.3.1.el5
Architecture:   amd64
JVM Version:    1.6.0_20-b02
JVM Vendor:     Sun Microsystems Inc.

os.name = linux

I have always the same problem.

Thanks Kurt
Comment 8 Zhiqiang Qian CLA 2010-06-08 23:16:54 EDT
Can you save the following code as Test.java,

-----------------------------------------------------------------------
public class Test
{
   public static void main(String[] args)
  {
    for (java.util.Map.Entry prop : System.getProperties().entrySet())
    {
        System.out.println(prop.getKey()+"="+prop.getValue());
     }
  }
}
------------------------------------------------------------------------

and attach the output of following commands in the console:

javac Test.java
java Test
Comment 9 Kurt Knippschild CLA 2010-06-09 01:38:37 EDT
Hi,
this is the output from teh Test.class

java.runtime.name=Java(TM) SE Runtime Environment
sun.boot.library.path=/usr/java/jre1.6.0_20/lib/amd64
java.vm.version=16.3-b01
java.vm.vendor=Sun Microsystems Inc.
java.vendor.url=http://java.sun.com/
path.separator=:
java.vm.name=Java HotSpot(TM) 64-Bit Server VM
file.encoding.pkg=sun.io
sun.java.launcher=SUN_STANDARD
user.country=US
sun.os.patch.level=unknown
java.vm.specification.name=Java Virtual Machine Specification
user.dir=/home/kknipp/Gyes_Installationsdateien
java.runtime.version=1.6.0_20-b02
java.awt.graphicsenv=sun.awt.X11GraphicsEnvironment
java.endorsed.dirs=/usr/java/jre1.6.0_20/lib/endorsed
os.arch=amd64
java.io.tmpdir=/tmp
line.separator=

java.vm.specification.vendor=Sun Microsystems Inc.
os.name=Linux
sun.jnu.encoding=UTF-8
java.library.path=/usr/java/jre1.6.0_20/lib/amd64/server:/usr/java/jre1.6.0_20/lib/amd64:/usr/java/jre1.6.0_20/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
java.specification.name=Java Platform API Specification
java.class.version=50.0
sun.management.compiler=HotSpot 64-Bit Server Compiler
os.version=2.6.18-194.3.1.el5
user.home=/home/kknipp
user.timezone=
java.awt.printerjob=sun.print.PSPrinterJob
file.encoding=UTF-8
java.specification.version=1.6
java.class.path=.
user.name=kknipp
java.vm.specification.version=1.0
java.home=/usr/java/jre1.6.0_20
sun.arch.data.model=64
user.language=en
java.specification.vendor=Sun Microsystems Inc.
java.vm.info=mixed mode
java.version=1.6.0_20
java.ext.dirs=/usr/java/jre1.6.0_20/lib/ext:/usr/java/packages/lib/ext
sun.boot.class.path=/usr/java/jre1.6.0_20/lib/resources.jar:/usr/java/jre1.6.0_20/lib/rt.jar:/usr/java/jre1.6.0_20/lib/sunrsasign.jar:/usr/java/jre1.6.0_20/lib/jsse.jar:/usr/java/jre1.6.0_20/lib/jce.jar:/usr/java/jre1.6.0_20/lib/charsets.jar:/usr/java/jre1.6.0_20/classes
java.vendor=Sun Microsystems Inc.
file.separator=/
java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi
sun.io.unicode.encoding=UnicodeLittle
sun.cpu.endian=little
sun.desktop=gnome
sun.cpu.isalist=


Thanks Kurt
Comment 10 Kurt Knippschild CLA 2010-06-15 02:28:08 EDT
Hi,

is there any problems with my properties?

Thanks Kurt
Comment 11 Zhiqiang Qian CLA 2010-06-17 00:44:25 EDT
Kurt,

The properties look fine. We need more investigation on CentOS.
Comment 12 Zhiqiang Qian CLA 2010-06-23 00:12:21 EDT
I've tried CentOS 5.5 with Tomcat 5.5.23 and BIRT 2.5.2 runtime without problem. 

I guess that may be a permission issue as at the beginning I've also encountered another OSGi startup problem that OSGi cannot write to the default configuration folder, but after changed the folder permission for BIRT application, it worked well.
Comment 13 Kurt Knippschild CLA 2010-06-23 01:33:12 EDT
Hi,

i have changed the permission of birt and all the files to "drwxrwxrwx"
the group ist tomcat und the user is also tomcat
but the error is the same.
What can I do?

Thanks Kurt
Comment 14 Zhiqiang Qian CLA 2010-06-23 02:32:21 EDT
Can you try using "root" or equivalent user to run tomcat to ensure it bypasses all the permission issues? If that still does not work, then we need look for the other causes.
Comment 15 Zhiqiang Qian CLA 2010-06-23 03:22:26 EDT
By the way, how you deploy the BIRT app? Using tomcat web interface to upload or just directly copy the folder?
Comment 16 Kurt Knippschild CLA 2010-06-23 04:01:40 EDT
Hi,

directly copy to the folder.

Kurt
Comment 17 Zhiqiang Qian CLA 2010-06-23 04:03:46 EDT
Can you try uploading the war using tomcat web interface?
Comment 18 Kurt Knippschild CLA 2010-06-23 05:26:33 EDT
Hi,

now I have undeployed birt, then the Version 2.5.2 downloaded und deployed with the tomcat-manger.
After this the error is the same.
birt group and user are root.

What can I do?

Thanks Kurt
Comment 19 Zhiqiang Qian CLA 2010-06-23 23:58:54 EDT
Did you see any log under the "/opt/apache-tomcat-5.5.29/webapps/birt/logs" or "/opt/apache-tomcat-5.5.29/temp/logs" after deploying the war through tomcat web interface? If it's the second case, that means there could still be some permission issues. And can you attach the latest catalina.out again?
Comment 20 Xiaoying Gu CLA 2011-03-16 02:11:35 EDT
Can not reproduce this issue with:
Brand new installed CentOS5.5 final + Birt example viewer 2.5.1 release + jdk 1.6.

I used a normal user account and did not change any permission of directories.

Set as worksforme.