JBoss AS 7 deployment dilemma, eclipse vs standalone.bat - eclipse

![enter image description here][1]I am using Eclipse plug-in to deploy my J2EE application on JBoss AS 7.
I made changes in JBOSS_HOME/bin/standalone.conf as well as in standalone.conf.bat, where I updated the JVM heap sizes.
If I deploy the application via eclipse, the modified JVM configuriation isn't applied during the server start up. However, when I start it, using the standalone.conf.bat the changes are reflected during the start up as expected.
Is there anything I'm missing that eclipse fails to pick up?
Here is how the standalone.conf reads:
#JAVA=""
if [ "x$JBOSS_MODULES_SYSTEM_PKGS" = "x" ]; then
JBOSS_MODULES_SYSTEM_PKGS="org.jboss.byteman"
fi
# Uncomment the following line to prevent manipulation of JVM options
# by shell scripts.
#
#PRESERVE_JAVA_OPTS=true
#
# Specify options to pass to the Java VM.
#
if [ "x$JAVA_OPTS" = "x" ]; then
JAVA_OPTS="-Xms256m -Xmx1024m -XX:MaxPermSize=512m -Djava.net.preferIPv4Stack=true - Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 - Dsun.rmi.dgc.server.gcInterval=3600000"
JAVA_OPTS="$JAVA_OPTS -Djboss.modules.system.pkgs=$JBOSS_MODULES_SYSTEM_PKGS - Djava.awt.headless=true"
JAVA_OPTS="$JAVA_OPTS -Djboss.server.default.config=standalone.xml"
else
echo "JAVA_OPTS already set in environment; overriding default settings with values: $JAVA_OPTS"
fi
standalone.conf.bat:
if not "x%JAVA_OPTS%" == "x" (
echo "JAVA_OPTS already set in environment; overriding default settings with values: %JAVA_OPTS%"
goto JAVA_OPTS_SET
)
rem # JVM memory allocation pool parameters - modify as appropriate.
set "JAVA_OPTS=-Xms64M -Xmx512M -XX:MaxPermSize=256M"
rem # Reduce the RMI GCs to once per hour for Sun JVMs.
set "JAVA_OPTS=%JAVA_OPTS% -Dsun.rmi.dgc.client.gcInterval=3600000 - Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.net.preferIPv4Stack=true"
The eclipse runtime clearly points to c: where i have done the edits to configuration files
![Eclipse Image]: http://i.stack.imgur.com/Mdq8d.jpg

You can specify heap size in VM arguments within eclipse.
Double click on Server-> Open Launch Configuration -> enter heap size in VM argument.

Since there is no other answer yet, here's my assumption.
Did you made the changes directly under the JBOSS_HOME/.... or in Eclipse for the JBoss instance? For any reason you can't make the changes under
Eclipse -> Server -> JBoss7_Runtime -> Filesets -> Configuration File -> standalone.xml
This is different from the Tomcat instance, where it is usual to edit the server.xml configuration file in eclipse as well. May be there is a workaround for the JBoss runtime, so that you can edit the config in eclipse too.

Related

How to minimize Eclipse PyDev Console output / tracing

I have multiple installations of Eclipse(2021-12) + PyDev(9.3.0.202203051235) all using Iron Python(2.7). All running on Windows 10. They all run the scripts as expected, but one installation has a much more robust console output when debugging, almost like a tracing option is enabled. I've tried reinstalling, deleting workspaces, deleting '.metadata' folders, etc. All the project settings seem identical.
Any ideas how to minimize the console output? Something in registry?
Expected Console output:
pydev debugger: starting (pid: 15312)
Actual Console output:
1.99s - Using GEVENT_SUPPORT: False
0.00s - Using GEVENT_SHOW_PAUSED_GREENLETS: False
0.00s - pydevd __file__: C:\\Eclipse-2021-12-R\plugins\org.python.pydev.core_9.3.0.202203051235\pysrc\pydevd.py
0.11s - Initial arguments: (['C:\\Eclipse-2021-12-R\\plugins\\org.python.pydev.core_9.3.0.202203051235\\pysrc\\pydevd.py', '--multiprocess', '--protocol-http', '--print-in-debugger-startup', '--vm_type', 'python', '--client', '127.0.0.1', '--port', '60413', '--file', 'C:\\Test.py'],)
0.00s - Current pid: 8884
pydev debugger: starting (pid: 8884)
Those should only appear if you add an environment variable asking it to be shown.
i.e.: Something as:
PYDEVD_DEBUG=1
PYDEV_DEBUG=1
Maybe you have such an environment set in your launch configuration or interpreter configuration or elsewhere in your system?
You may want to check the os.environ of the running program to see what's set there.

Adding a user to a WildFly server, results in error

I am trying to add a user to WildFly server but get an error:
./add-user.sh: 1: eval: /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java/bin/java: not found
I suppose I need to change the JAVA_HOME location in a .conf file but have done so in the .conf files of the wildfly/bin directory. How can I solve this issue?
The add-user.sh script doesn't source any configuration file, so you have to provide the Java binary through your environment.
You can do this in multiple ways :
through a JAVA variable pointing to the java executable :
export JAVA=/path/to/jdk_install/bin/java
./add-user.sh [...]
through a JAVA_HOME variable pointing to the Java installation directory :
export JAVA_HOME=/path/to/jdk_install/
./add-user.sh [...]
by including the Java's installation bin directory to your PATH :
export PATH="/path/to/jdk_install/bin:$PATH"
./add-user.sh [...]
Note that these may vary depending on the WildFly or JBoss EAP version ; I gathered these from reading the script of a wildfly-8.1.0.Final installation.
If you're not sure this applies to your own version and if you have even the most basic understanding of shell scripts you should check your own : they're only a few dozens lines long and are well commented.
Your java path is wrong.
You can observe that in below line there is extra '/bin/java'. You should remove that.
./add-user.sh: 1: eval: /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java/bin/java: not found
To do so, in your adduser.sh/.bat file replace
# Setup the JVM
if [ "x$JAVA" = "x" ]; then
if [ "x$JAVA_HOME" != "x" ]; then
JAVA="$JAVA_HOME/bin/java"
else
JAVA="java"
fi
fi
To
# Setup the JVM
if [ "x$JAVA" = "x" ]; then
if [ "x$JAVA_HOME" != "x" ]; then
JAVA="$JAVA_HOME"
else
JAVA="java"
fi
fi
This does the magic for me.

Debugging Eclipse performance problems

To debug Eclipse performance problems, I created this .options file:
org.eclipse.jdt.ui/debug=true
org.eclipse.jdt.launching/debug = true
org.eclipse.jdt.launching/debug/classpath/jreContainer = true
# trace generation of type constraints and create toString info for debugging
org.eclipse.jdt.ui/debug/TypeConstraints=false
# timing output for code assist
org.eclipse.jdt.ui/debug/ResultCollector=false
org.eclipse.jdt.debug/debug=false
org.eclipse.jdt.debug/debug/jdiEvents=false
org.eclipse.jdt.debug/debug/jdiRequestTimes=false
org.eclipse.jdt.debug/debug/astEvaluations=false
org.eclipse.jdt.debug/debug/astEvaluations/callingThreads=false
# Turn on debug tracing for org.eclipse.jdt.core plugin
org.eclipse.jdt.core/debug=true
# Reports java builder activity : nature of build, built state reading, indictment process
org.eclipse.jdt.core/debug/builder=true
# Reports java builder stats
org.eclipse.jdt.core/debug/builder/stats=true
# Reports compiler activity
org.eclipse.jdt.core/debug/compiler=true
# Turn on debugging for the org.eclipse.core.resources plugin.
org.eclipse.core.resources/debug=true
# Reports the start and end of all builder invocations
org.eclipse.core.resources/build/invoking=true
# Reports the start and end of build delta calculations
org.eclipse.core.resources/build/delta=true
# For incremental builds, displays which builder is being run and
because of changes in which project.
org.eclipse.core.resources/build/needbuild=true
# Prints a stack trace every time an operation finishes that requires a
build
org.eclipse.core.resources/build/needbuildstack=true
The file is in the same folder as eclipse.ini.
When I open the about dialog, I can see the option -debug in the eclipse.commands variable:
...
-product
org.eclipse.epp.package.jee.product
-console
-consoleLog
-debug
$HOME/tools/eclipse/kepler-SR2
-data
$HOME/workspace
-vm
$HOME/tools/java/jdk1.8.0_25/bin/java
...
(I replaced my home folder with $HOME for privacy reasons).
But I don't see any trace output in the console where I started Eclipse. I can see output from the m2e:
2015-01-19 17:04:46,892 [Worker-12] INFO o.e.m.c.i.embedder.EclipseLogger - Using 'UTF-8' encoding to copy filtered resources.
2015-01-19 17:04:46,892 [Worker-12] INFO o.e.m.c.i.embedder.EclipseLogger - Copying 1 resource
When I press Enter, I get an OSGi prompt.
But no trace of a trace output. What did I miss?
When starting Eclipse with -debug, you can see which configuration files it loads during startup. The output looks like this:
...
Install location:
file:$HOME/tools/eclipse/kepler-SR2/
Configuration file:
file:$HOME/tools/eclipse/kepler-SR2/configuration/config.ini loaded
Configuration location:
file:$HOME/tools/eclipse/kepler-SR2/configuration/
Framework located:
file:$HOME/tools/eclipse/kepler-SR2/plugins/org.eclipse.osgi_3.9.1.v20140110-1610.jar
Framework classpath:
file:$HOME/tools/eclipse/kepler-SR2/plugins/org.eclipse.osgi_3.9.1.v20140110-1610.jar
Splash location:
$HOME/tools/eclipse/kepler-SR2//plugins/org.eclipse.platform_4.3.2.v20140221-1700/splash.bmp
Debug options:
file:$HOME/tools/eclipse/kepler-SR2/.options loaded
Time to load bundles: 5
...
Note the last path which gives the debug options. In the case above, this was:
Debug options:
file:$HOME/tools/eclipse/kepler-SR2 loaded
which is a folder ... Why would Eclipse do this? Because it was told so:
-debug
$HOME/tools/eclipse/kepler-SR2
-data
Notice the path between -debug and -data? Get rid of that and it will work (or specify the path to a real options file).

WildFly - Files\Java\jdk1.7.0_40"" was unexpected at this time

I'm trying to start up WildFly 8 with a custom start.bat file that calls standalone.bat and then also a custom property file. When I run my start.bat I get this error in the command line:
C:\PWServer8>propworks_start.bat
C:\PWServer8\bin>call standalone.bat -P=../propworks/conf/propworks.properties -b 10.10.100.122
Calling "C:\PWServer8\bin\standalone.conf.bat"
Files\Java\jdk1.7.0_40"" was unexpected at this time.
I've done a search for "was unexpected at this time" within all the files in my WildFly folder but nothing turned up so I couldn't pinpoint where the error is coming from. Here is my custom start.bat and afterwards is my property file. If anyone knows what's going on it would be a big help.
propworks_start.bat
C:
cd C:\PWServer8\bin
SET JAVA_HOME="C:\Program Files\Java\jdk1.7.0_40"
call standalone.bat -P=../propworks/conf/propworks.properties -b 10.10.100.122
propworks.properties
#PROPworks Configuration Properties
#Wed Jun 18 17:18:03 EDT 2014
propworks.bind.address=10.10.100.122
propworks.database.class=Oracle10g
propworks.database.connection.sql=select 1 From Dual
propworks.database.desc=support#mcosrvorcl001
propworks.database.dialect=com.airit.propworks.server.dialect.PWOracleDialect
propworks.database.driver=oracle
propworks.database.password=-5522f65bbe2cc1c6
propworks.database.schema=uc2014
propworks.database.url=jdbc\:oracle\:thin\:#10.10.201.10\:1521\:bsdev
propworks.database.user=uc2014
propworks.http.port=8080
propworks.indb.use=NONE
propworks.jdk.home=C\:\\Program Files\\Java\\jdk1.7.0_40
propworks.messaging.port=5445
propworks.remoting.port=4447
archiver.enabled=N
orafin.database.driver=oracle
orafin.database.password=
orafin.database.user=
org.quartz.dataSource.QUARTZ.jndiURL=java\:/propworksDS
org.quartz.dataSource.QUARTZ_NO_TX.jndiURL=java\:/quartzDS
org.quartz.jobStore.class=org.quartz.impl.jdbcjobstore.JobStoreCMT
org.quartz.jobStore.dataSource=QUARTZ
org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.StdJDBCDelegate
org.quartz.jobStore.nonManagedTXDataSource=QUARTZ_NO_TX
org.quartz.jobStore.selectWithLockSQL=SELECT * FROM {0}LOCKS WHERE LOCK_NAME \= ? FOR UPDATE
org.quartz.jobStore.tablePrefix=QRTZ_
org.quartz.scheduler.instanceName=DefaultQuartzScheduler
org.quartz.scheduler.rmi.export=false
org.quartz.scheduler.rmi.proxy=false
org.quartz.scheduler.xaTransacted=false
org.quartz.threadPool.class=org.quartz.simpl.SimpleThreadPool
org.quartz.threadPool.threadCount=3
org.quartz.threadPool.threadPriority=9
psfin.database.driver=oracle
psfin.database.password=
psfin.database.user=
pwarchiver.database.driver=oracle
pwarchiver.database.password=
pwarchiver.database.user=
Two solutions:
1) move java to folder that does not have spaces in it.
2) double quote path when you set it
SET JAVA_HOME=""C:\Program Files\Java\jdk1.7.0_40""
add \ similar below :
SET JAVA_HOME=C:\Program Files\Java\jdk1.7.0_40\
this is caused by the space in front of C:\Program , so what u need to do is changing your JAVA file in c:program files \java to another file without spaces , and then in top of your file write :
SET JAVA_HOME=""NEW DIRECTORY WITHOUT SPACE\Java\jdk1.7.0_40""
this worked for me.

Gitblit services not started

After the execution of batch file in Gitblit, gitblit service won't start.
Install Java 7
Install Gitblit GO in Win 7 - 64 bit machine
Goto service and view the service status.
Win 7 - gitblit GO-1.3.2 - jdk-7u51-windows-x64
gitblit service is required to open the gitblit in browser?
Based on this following site, i exected the gitblit batch files.
http://gitblit.com/setup_go.html
Kindly let me know, what else i need to do.
Regards,
Sathishkumar Pannerselvam
Service isn't required to start Gitblit.
On Windows Envrionnement : you can use the batch script gitblit.cmd to start it. But don't forget the configuration's step in the file gitblit.properties (server.httpPort...). After you can access Gitblit with this url http:\localhost:8080
I encountered a similar problem.
But I solved as follows:
Open installService.cmd with text editor like notepad.
In line 12, I changed SET ARCH=amd64 into SET ARCH=x86. (The architecture of my computer is x86.)
Run installService.cmd by double-clicking it or run installService in Command Prompt.
CD may not be found .Try to add CD definition:
#REM arch = x86, amd64, or ia32
SET ARCH=amd64
SET CD=E:/gitblit-1.8.0
It may work.