wsadmin AdminApp.install of a 23MB EAR is hanging - deployment

I'm able to log into my local WAS 8 admin console and deploy a 23MB EAR with all of the defaults with no problems. However, when I attempt to do the install using wsadmin and this Jython script...
AdminApp.install('C:\Development\MyApp\MyApp.ear')
AdminConfig.save()
... wsadmin just hangs. I've been running this script right now for well over 10 minutes with my CPU at 70% on the java.exe process responsible for the deploy.
I would like to run my EAR deploys/undeploys using wsadmin if at all possible to bypass the need to log into the admin console.
Are there settings specific to wsadmin that I could tweak to make this deploy successful?
EDIT I
I tweaked my wsadmin call to launch like this (it gets called from a DOS command line...)
C:\Development\batch>call "C:\Development\WebSphere\WAS8.0\bin\wsadmin" -lang jython -conntype none -javaoption -Xms256m -Xmx1024m -f MyApp\MyAppDeploy.py
and now I'm getting java.lang.OutOfMemoryError...
Exception in thread "Bundle File Closer" java.lang.OutOfMemoryError
at java.util.zip.ZipFile.close(Native Method)
java/lang/OutOfMemoryError
at java/util/zip/ZipFile.close (Native Method)
at java/util/zip/ZipFile.close (ZipFile.java:408)
at org/eclipse/osgi/baseadaptor/bundlefile/ZipBundleFile.close (ZipBundleFile.java:313)
at org/eclipse/osgi/baseadaptor/bundlefile/MRUBundleFileList.dispatchEvent (MRUBundleFileList.java:183)
at org/eclipse/osgi/framework/eventmgr/EventManager.dispatchEvent (EventManager.java:227)
at org/eclipse/osgi/framework/eventmgr/EventManager$EventThread.run (EventManager.java:337)
Exception in thread "Bundle File Closer" at Exception in thread "Thread-10" java.lang.OutOfMemoryErrorjava.lang.O
utOfMemoryError
at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:156 at )
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startjava.util.zip.ZipFile(.BundleContextImpl.java
:75Exception in thread "Thread-10" java/lang/OutOfMemoryError
1closejava.lang.OutOfMemoryError
at java/util/zip/ZipFile.close (Native Method)
at java/util/zip/ZipFile.close (ZipFile.java:408)
at org/eclipse/osgi/baseadaptor/bundlefile/ZipBundleFile.close (ZipBundleFile.java:313)
at org/eclipse/osgi/baseadaptor/bundlefile/MRUBundleFileList.dispatchEvent (MRUBundleFileList.java:183)
at org/eclipse/osgi/framework/eventmgr/EventManager.dispatchEvent (EventManager.java:227)
at org/eclipse/osgi/framework/eventmgr/EventManager$EventThread.run (EventManager.java:337)
at java.nio.CharBuffer.wrap(CharBuffer.java:361)
at sun.nio.cs.StreamEncoder$CharsetSE.implWrite(StreamEncoder.java:399)
at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:159)
at java.io.OutputStreamWriter.write(OutputStreamWriter.java:229)
at java.io.BufferedWriter.flushBuffer(BufferedWriter.java:122)
at java.io.PrintStream.write(PrintStream.java:500)
at java.io.PrintStream.print(PrintStream.java:643)
at com.ibm.jvm.io.ConsolePrintStream.print(ConsolePrintStream.java:java/lang/OutOfMemoryError
at java/nio/CharBuffer.wrap (CharBuffer.java:361)
at sun/nio/cs/StreamEncoder$CharsetSE.implWrite (StreamEncoder.java:399)
at sun/nio/cs/StreamEncoder.write (StreamEncoder.java:159)
at java/io/OutputStreamWriter.write (OutputStreamWriter.java:229)
at java/io/BufferedWriter.flushBuffer (BufferedWriter.java:122)
at java/io/PrintStream.write (PrintStream.java:500)
at java/io/PrintStream.print (PrintStream.java:643)
at com/ibm/jvm/io/ConsolePrintStream.print (ConsolePrintStream.java:275)
at java/io/PrintStream.append (PrintStream.java:1039)
at java/io/PrintStream.append (PrintStream.java:51)
at java/lang/StackTraceElement.appendTo (StackTraceElement.java:197)
at java/lang/StackTraceElement.appendTo (StackTraceElement.java:217)
at java/lang/StackTraceElement.appendTo (StackTraceElement.java:165)
at java/lang/Throwable.printStackTrace (Throwable.java:375)
at java/lang/Throwable.printStackTrace (Throwable.java:212)
at java/lang/ThreadGroup.uncaughtException (ThreadGroup.java:779)
at java/lang/ThreadGroup.uncaughtException (ThreadGroup.java:772)
at java/lang/Thread.uncaughtException (Thread.java:1223)

The following solved it for me. This launched from the DOS command line on my PC.
call "C:\Development\WebSphere\WAS8.0\bin\wsadmin" -lang jython -javaoption -Xmx1024m -f %1

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.

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).

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.

JBoss AS 7 deployment dilemma, eclipse vs standalone.bat

![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.

How do I start/stop JBoss on system startup on Mac Lion?

I'm using Mac Lion (10.7.3) and I just downloaded JBoss 7.1.0. I would like JBoss to run when I start my machine. So I created this directory
/Library/StartupItems/JBoss/
and then created a file named "JBoss" within the above directory containing ...
#!/bin/sh
. /etc/rc.common
StartService ()
{
ConsoleMessage "Starting JBoss"
$JBOSS_HOME/bin/standalone.sh
}
StopService ()
{
ConsoleMessage "Stopping JBoss"
# Don't know what to put here.
}
RunService "$1"
What, if anything, do I need to put in the "StopService" clause to stop JBoss? Also, is this the right way to go about running JBoss in the background when I start my machine?
Thanks, - Dave
Looking in the README.txt it states this:
If the server is running in a background process, the server can be stopped using the JBoss CLI:
JBOSS_HOME>/bin/jboss-cli.sh --connect --command=:shutdown