This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 236593

Summary: Tomсat does not init setenv.sh due startup
Product: serverplugins Reporter: panason2008
Component: TomcatAssignee: Petr Hejl <phejl>
Status: RESOLVED WORKSFORME    
Severity: normal CC: panason2008
Priority: P3    
Version: 7.4   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Attachments: IDE log
TomcatConnection_in_7_3_1 screenshot
TomcatStartup_in_7_3_1 screenshot
TomcatConnection_in_7_4 screenshot
TomcatStartup_in_7_4 screenshot
Tomcat_start_log_in_7_3_1
Tomcat_start_log_in_7_4
ps_in_7_3_1
ps_in_7_4

Description panason2008 2013-10-01 10:53:43 UTC
Product Version = NetBeans IDE 7.4 RC1 (Build 201309162201)
Operating System = Linux version 3.5.0-40-generic running on amd64
Java; VM; Vendor = 1.7.0_25
Runtime = Java HotSpot(TM) 64-Bit Server VM 23.25-b01

Tomсat does not  init setenv.sh  due startup
Comment 1 panason2008 2013-10-01 10:53:46 UTC
Created attachment 140684 [details]
IDE log
Comment 2 Petr Hejl 2013-10-22 09:14:03 UTC
Please provide exact steps to reproduce. We are starting the tomcat via standard script.
Comment 3 panason2008 2013-10-22 10:34:27 UTC
Created attachment 141393 [details]
TomcatConnection_in_7_3_1 screenshot
Comment 4 panason2008 2013-10-22 10:35:04 UTC
Created attachment 141394 [details]
TomcatStartup_in_7_3_1  screenshot
Comment 5 panason2008 2013-10-22 10:35:40 UTC
Created attachment 141395 [details]
TomcatConnection_in_7_4 screenshot
Comment 6 panason2008 2013-10-22 10:36:19 UTC
Created attachment 141396 [details]
TomcatStartup_in_7_4 screenshot
Comment 7 panason2008 2013-10-22 10:37:07 UTC
Created attachment 141397 [details]
Tomcat_start_log_in_7_3_1
Comment 8 panason2008 2013-10-22 10:37:24 UTC
Created attachment 141398 [details]
Tomcat_start_log_in_7_4
Comment 9 panason2008 2013-10-22 10:37:47 UTC
Created attachment 141399 [details]
ps_in_7_3_1
Comment 10 panason2008 2013-10-22 10:38:08 UTC
Created attachment 141401 [details]
ps_in_7_4
Comment 11 panason2008 2013-10-22 10:39:24 UTC
I have attached screenshots and conclusions tomcat and the ps command
Run as usual.
Comment 12 Petr Hejl 2013-10-22 11:22:48 UTC
Sorry I can't guess what you are trying to achieve. Please describe step by step instructions what you are trying to do and what are the expected results for you.
Comment 13 panason2008 2013-10-22 11:34:58 UTC
I'm running tomcat in the masonry of the Service, or by running the web application.

In the file are located setenv.sh important for me settings.
This file, if it is located in the TOMCAT_HOME/bin should be executed automatically. Here are the lines from the file standard file catalina.sh

if [-r "$ CATALINA_BASE / bin / setenv.sh"]; then
   . "$ CATALINA_BASE / bin / setenv.sh"
elif [-r "$ CATALINA_HOME / bin / setenv.sh"]; then
   . "$ CATALINA_HOME / bin / setenv.sh"
fi

In version 7.3.1 and below, it works flawlessly
In version 7.4 it does not work.

Command output and error in my application suggests that the configs of setenv.sh not having picked up.
Comment 14 panason2008 2013-10-22 12:04:34 UTC
My  setenv.sh

#!/bin/sh

if [ "x$JAVA_OPTS" = "x" ] 
then
 JAVA_OPTS="$JAVA_OPTS -Xms1G"
 JAVA_OPTS="$JAVA_OPTS -Xmx6G"
 JAVA_OPTS="$JAVA_OPTS -XX:PermSize=2G"
 JAVA_OPTS="$JAVA_OPTS -XX:MaxPermSize=4G"
 JAVA_OPTS="$JAVA_OPTS -XX:+CMSClassUnloadingEnabled"
 JAVA_OPTS="$JAVA_OPTS -XX:+CMSPermGenSweepingEnabled"
 JAVA_OPTS="$JAVA_OPTS -Dfile.encoding=utf-8"
 JAVA_OPTS="$JAVA_OPTS -Dcu.conf.dir=/home/apanasovich/tool/apache-tomcat-6.0.35/lib"
 JAVA_OPTS="$JAVA_OPTS -Dspring.profiles.active=fssp,route"
   echo $JAVA_POTS
   export JAVA_OPTS
fi
Comment 15 Petr Hejl 2015-03-12 12:02:36 UTC
The setenv.sh is called. Just your if is not as there are already some options configured by the IDE.

BTW you can configure your JAVA_OPTS in the IDE as well using Tomcat properties panel - Platform - VM options.