Issue with creating weblogic server domain in jdeveloper? - weblogic

I am not able to create weblogic domain from jdevloper!
I am using Jdevloper 12.1.2(12c), when I am try to create domain on default integrated weblogic server then that gives me error like this-
wlst > Error occurred during initialization of VM
wlst > Could not reserve enough space for object heap
wlst > Error: Could not create the Java Virtual Machine.
wlst > Error: A fatal exception has occurred. Program will exit.
I am re-Installed jdeveloper(12c),restart machine,set JAVA_HOME environment variable but error still occur.
Please some body help me and fix this problem.

Modify %HOME%\oracle_common\common\bin\commEnv.cmd file setting USER_MEM_ARGS environment variable after ":continue" tag and re-create default domain again from Application Servers view on JDeveloper.
SET USER_MEM_ARGS=-Xms32m -Xmx1024m -XX:MaxPermSize=512m -XX:MaxHeapSize=512m

This is a RAM problem for your JDeveloper process
Edit the jdev.conf file (~/Oracle/middleware/jdeveloper/jdev/bin) and add more memory to the file
AddVMOption -Xmx1024M
AddVMOption -XX:MaxPermSize=256M
which is 1 GB provided you have RAM available on your machine
Also check if your JDK is the 32 or 64 bit to match your OS

How much RAM does your machine have - you need at least 2GB.

Check to make sure you are using a 64bit JDK

Related

AttachNotSupportedException when trying to start a JFR recording

I'm receiving AttachNotSupportedException when trying to start a JFR recording.
It was working normally, until now.
jcmd 3658 JFR.start maxsize=100M filename=jfr_1.jfr dumponexit=true settings=profile
Output:
3658:
com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: target process not responding or HotSpot VM not loaded
at sun.tools.attach.LinuxVirtualMachine.<init>(LinuxVirtualMachine.java:106)
at sun.tools.attach.LinuxAttachProvider.attachVirtualMachine(LinuxAttachProvider.java:63)
at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:208)
What might be happening?
SO: Oracle Linux Server release 6.7
$ java -version
java version "1.8.0_102"
Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)
One of the probable reasons is that /tmp/.java_pid1234 file has been deleted (where 1234 is PID of a Java process).
Tools that depend on Dynamic Attach Mechanism (jstack, jmap, jcmd, jinfo) communicate to JVM through a UNIX domain socket created at /tmp.
This socket is created by JVM lazily on the first attach attempt or eagerly at JVM initialization if -XX:+StartAttachListener flag is specified.
Once the file corresponding to the socket is deleted, tools cannot connect to the target process, and unfortunately there is no way to re-create communication socket without restarting JVM.
For the description of Dynamic Attach Mechanism see this answer.
With personal experience... This problem also occurs in scenarios where the development environment is divided into partitions, and the partition where the operating system is located is different from the operating system partition. Example, operating system partition is EXT4 and the development environment partition is NTFS (where the JVM is). Problem occurs because you can not create a file "/tmp/.java_pid6024" (where 6024 is the PID of the java process).
To troubleshoot add -XX: + StartAttachListener at the start of the JVM, or application server.
Another possibility: your app is running under systemd with 'PrivateTmp=yes'. This prevents the /tmp/.java_pid1234 file from being found.

Error initializing JVM

I am getting "Could not reserve enough space for object heap" error when I am trying to start hybris server.
I have set
wrapper.java.additional.1=-Xmx1G
wrapper.java.additional.2=-XX:MaxPermSize=1024M
My machine is 64 bit 8GB RAM Windows
I faced the same problem once, The problem in my case was that too many other Applications were running on my system.
So go to the task manager and check the memory available use.
Close some applications and try running.
Also if you are using eclipse Then, In your eclipse.ini file (this is beside the eclipse executable), replace -Xmx256m with -Xmx1024m (or Xmx512m).
This is not compulsory but in certain cases it works.
If you are using some extension then,
Open YOURPATH/config/local.properties file.
Add the following entry:
config/local.properties
build.parallel=true
Save the file.
(In cases where we have multiple cores in the machine, we can tell hybris to utilize these by building in parallel and in certain cases this too works)
I too faced the same probelm. I followed below steps and set the max heap size to 1GB.
Add the following content to local.properties
tomcat.generaloptions=-Xmx4G -ea -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dorg.tanukisoftware.wrapper.WrapperManager.mbean=true -Djava.endorsed.dirs="%CATALINA_HOME%/lib/endorsed" -Dcatalina.base=%CATALINA_BASE% -Dcatalina.home=%CATALINA_HOME% -Dfile.encoding=UTF-8 -Dlog4j.configuration=log4j_init_tomcat.properties -Djava.util.logging.config.file=jdk_logging.properties -Djava.io.tmpdir="${HYBRIS_TEMP_DIR}"
ant clean all
start hybrisserver
Reference
https://launchpad.support.sap.com/#/notes/0002437669

Configuring and running integrated weblogic server in jdeveloper

i know this can be very simple but i am not able to do so.
I am trying to start integrated weblogic server in jdeveloper(v11.1.1.7.0). But it always says the following error :
*** Using port 7101 ***
C:\Users\595452\AppData\Roaming\JDeveloper\system11.1.1.7.40.64.93\DefaultDomain\bin\startWebLogic.cmd
[waiting for the server to complete its initialization...]
The system cannot find the path specified.
The JRE was not found in directory C:\Oracle\MIDDLE~1\jdk160_29. (JAVA_HOME)
Please edit your environment and set the JAVA_HOME
variable to point to the root directory of your Java installation.
Press any key to continue . . . [Server Instance IntegratedWebLogicServer is shutting down. All applications currently running will be terminated and undeployed.]
My Java_home is set to the jdk i have installed and also have an entry in PATH of system variable.
**User variable:**
C:\Program Files\Java\jdk1.7.0_45;C:\Program Files\Java\jre7
**System Variable :**
C:\Program Files\Java\jdk1.7.0_45\bin;C:\Program Files\Java\jre7\bin
Please assist me in this regard.
I fixed mine by editing the setDomainEnv.cmd in my weblogic installation.
In my installation D:\srv\wls12120\user_projects\domains\mydomain\bin my installation pointed to:
set SUN_JAVA_HOME=D:\Java\jdk\jdk8u40 changed to
set DEFAULT_SUN_JAVA_HOME=C:\PROGRA~1\Java\JDK17~1.0_2
set DEFAULT_SUN_JAVA_HOME=D:\Java\jdk\jdk8u40 changed to
set JAVA_HOME=C:\PROGRA~1\Java\JDK17~1.0_2
as well as here:
if "%VM_TYPE%"=="JRockit" (
set JAVA_HOME=%BEA_JAVA_HOME%
) else (
if "%JAVA_VENDOR%"=="Sun" (
set JAVA_HOME=%SUN_JAVA_HOME%
) else (
set JAVA_VENDOR=Oracle
set JAVA_HOME=D:\Java\jdk\jdk8u40
set VM_TYPE=HotSpot
)
)
This has solved my issue.
Apparently the install routine thinks that your JAVA_HOME is set to the wrong jre. First test is to open a command shell and type in "java -version"
Verify that you see Java 1.7.0 and not 1.6.0
One this had been checked check the ide.conf file or jdev.conf file which java version is configured there. There you should see jdk 1.7.0 configured.
Then you remove the DefaultDomain folder out of the system 11.1.1.x.x.x folder.
Then start jdev again and try to start the integrated server again.
Solution: Windows 7
Delete the C:\Users\\AppData\Roaming\JDeveloper\system11.1.1.2.36.55.36 folder and then restart your JDeveloper.
Delete the C:\Users\"username"\AppData\Roaming\JDeveloper\system11.1.1.2.36.55.36 folder and then restart your JDeveloper
While upgrading Java version, remove all the files available in the below path
C:\Users\\AppData\Roaming\JDeveloper

mule-standalone-3.3.1 won't start on Windows 7

I got following issue when starting mule server in windows 7.
I have set JAVA_HOME and MULE_HOME properly.
MULE_HOME is set to C:\BAM\Linux\fresh\mule-standalone-3.3.1\mule-standalone-3.3.1 Running in console/foreground mode by default, use Ctrl-C to exit...
--> Wrapper Started as Console Launching a JVM... Unable to execute Java command. The system cannot find the file specified. (0x2)
"java" -Dmule.home="C:\BAM\Linux\fresh\mule-standalone-3.3.1\mule-standalone-3.3.1"
-Dmule.base="C:\BAM\Linux\fresh\mule-standalone-3.3.1\mule-standalone-3. :MaxPermSize=128m "-Djava.endorsed.dirs=C:\BAM\Linux\fresh\mule-standalone-3.3.1\mule-standalone-3.3.1\lib\endorsed"
-Xmx512m -Djava.library.path="%LD_LIBRARY_P
3.3.1\mule-standalone-3.3.1/lib/boot" -classpath "%MULE_LIB%;C:\BAM\Linux\fresh\mule-standalone-3.3.1\mule-standalone-3.3.1/conf;C:\BAM\Linux\fresh\mule-standal /commons-cli-1.2.jar;C:\BAM\Linux\fresh\mule-standalone-3.3.1\mule-standalone-3.3.1/lib/boot/log4j-1.2.16.jar;C:\BAM\Linux\fresh\mule-standalone-3.3.1\mule-stan .3.1.jar;C:\BAM\Linux\fresh\mule-standalone-3.3.1\mule-standalone-3.3.1/lib/boot/mule-module-logging-3.3.1.jar;C:\BAM\Linux\fresh\mule-standalone-3.3.1\mule-sta t-3.3.1.jar;C:\BAM\Linux\fresh\mule-standalone-3.3.1\mule-standalone-3.3.1/lib/boot/wrapper-3.2.3.jar"
-Dwrapper.key="IqO3S6Ox0DeEiEkH" -Dwrapper.port=32000 -Dw port.max=31999 -Dwrapper.pid=3224 -Dwrapper.version="3.2.3"
-Dwrapper.native_library="wrapper" -Dwrapper.cpu.timeout="10" -Dwrapper.jvmid=1 org.mule.module.rebo Critical error: wait for JVM process failed Press any key to continue . . .
Environment
OS - Windows 7 64 bit
JAVA - 1.7.0_10 64 bit
Can someone help me to fix this issue.
Thanks,
Kasun.
It looks like mule can't find the java executable. An easy way to address this is to edit the ${mule.home}/conf/wrapper.conf file and specify the whole path for the property wrapper.java.command, i.e:
wrapper.java.command=c:/java7/jre/bin/java
On a side note you shouldn't set the MULE_HOME env var anymore since mule will take care of setting it itself upon statup.
Is your %JAVA_HOME%\bin; set as Path variable
I had the same error. But in my case i had the MULE_HOME variable set to a wrong path. Once i deleted that variable, the error was resolved and the server started.

Jdeveloper - Unrecognized option: -jrockit

Every time I try to run a weblogic webcenter application on Jdev I get the following error and I cant find any reference on how to fix this anywhere on the web.
starting weblogic with Java version: Could not create the Java virtual
machine. Unrecognized option: -jrockit
Try modifying the startWebLogic.cmd file (WIN7)
c:\users\{user}\AppData\Roaming\JDeveloper\system{version}\DefaultDomain\bin\startWebLogic.cmd
to contain
set JAVA_VM=-server
set MEM_ARGS=-Xms512m -Xmx1024m -XX:MaxPermSize=512m
Jdeveloper 11g do not support jdk 1.7
https://forums.oracle.com/thread/2482850
I fixed it by add to top of c:\users{user}\AppData\Roaming\JDeveloper\system{version}\DefaultDomain\bin\setDomainEnv.cmd:
set SUN_JAVA_HOME=E:\Oracle\Java\jdk1.6.0_37
set JAVA_VENDOR=Sun
In OSX, look for the this folder /Users/{USERNAME}/.jdeveloper/system{VERSION}/DefaultDomain/bin
Edit the file setDomainEnv.sh and look for SUN_JAVA_HOME and make sure the value is the same value as your JAVA_HOME, i.e. /Library/Java/JavaVirtualMachines/jdk${JDK_VERSION}.jdk/Contents/Home, by default it seems it is set to an empty string "".
Edit the file startWebLogic.sh and add the following before setDomainEnv.sh is called.
JAVA_VENDOR=Sun
You can test it out by running sh ./startWebLogic.sh, if it runs with -jrockit error, then all is good :)
I've also tested with Java JDK 1.7 and it seems to work.
The reason is, that older Weblogic Versions use the Java VM "JRockit"
http://www.oracle.com/technetwork/middleware/jrockit/overview/index.html
The JRockit VM is no longer supported in Java 7 or higher.
All of the other solutions here seem to be hacks and none of them helped me.
I had the same Problem with a Weblogic 10.3.5 and I found out, the installation was incorrect.
The Problem is, that there is no java version check in the installer, so if you don't know that you can't use Java 7 or higher you are screwed.
These steps fixed it for me:
You need to make sure you have Java 6 or lower installed.
Reinstall the Weblogic and make sure to specify the correct JDK