Jdeveloper - Unrecognized option: -jrockit - weblogic

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

Related

IntelliJ IDEA 2020.1.1 won't start

I am using IntelliJ IDEA Community Version 2020.1.1 on Ubuntu 18.04 LTS and it is not starting. I tried running it from the terminal, the following error is shown:
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Unrecognized option: -ide.win.frame.decoration=true
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
The unrecognized option was added by me, to remove the title bar. But after adding this option and restarting it, it fails to start.
I thought this option might be located in "idea.vmoptions" file but could not find it there. Is there any other file where this option might be located? Or is there any way to start IntelliJ ignoring this error?
So there are multiple "idea.vmoptions" files. I had to edit the one in:
/home/user_name/.config/JetBrains/IdeaIC2020.1
I had to remove "-ide.win.frame.decoration=true" from there. This solved the issue.
.vmoptions file takes options in this format: -D<option>=<value>.
The syntax for the option you've inserted was invalid, should have been -Dide.win.frame.decoration=true instead.
See this FAQ document for the details how this file can be found and edited manually depending on the OS and IDE version.

jackrabbit - There is an error in invoking javac. A full JDK (not just JRE) is required

I'm learning Jackrabbit and following the documentation to run a standalone server. When I run the command java -jar jackrabbit-standalone-2.16.2.jar and access localhost:8080 on my browser, I get a 500 error saying:
org.apache.jasper.JasperException: PWC6345: There is an error in invoking javac. A full JDK (not just JRE) is required
What am I doing wrong?
Note: I have set my jdk/bin path in my environment variables.Also, my javac command is working properly. I've jdk version 1.8.0_74 and Jackrabbit version 2.16.2
Edit: According to this answer, I tried setting my jdk to my installed jres in eclipse but that didn't solve my problem.
Running the latest jackarabit standalone jar(2.17.3) in my machine(windows 10 and java home pointing in java8 jdk) produced the same errors.
I then executed the rar with java -Djava.home="%JAVA_HOME%" -jar jackrabbit-standalone-2.17.3.jar. Although I got the same error in browser I was able to see errors in the console where I invoked the running command.
One of these error was
can't open C:\Progra~1\Java\jdk1.8.0_144\lib\tzmappings.
Searching my java installation I found that the missing files, are located under jre's installation folder.
So I eventually made the standalone jar to work with:
java -Djava.home="%JAVA_HOME%\jre" -jar jackrabbit-standalone-2.17.3.jar
The initial error is a bit misleading as it refers to javac and not to the missing files.
The whole thing seems to be a bug for me. Please give a try to my workaround and if it works for you consider filing a bug in Jackrabbit's issue tracker platform.
jackrabbit-standalone uses JSP. JSP needs compilation. Compilation needs JDK.
Before running java -jar jackrabbit-standalone-2.16.2.jar do you check your JAVA_HOME, and make sure it refers to a fully-fledged JDK? In short, the bin directory should have javac.
I found that there was another variable in the Path environment System variable preceding my %JAVA_HOME%\bin variable.
You don't have to delete the other variable, but move it down (or move %JAVA_HOME\bin up) to correct the load order.

Change jdk path for the integrated weblogic server in oracle soa suite

I keep getting this error after launching an integrated Weblogic server in Jdeveloper,
Starting WLS with line:
C:\PROGRA~1\Java\JDK18~1.0_2\bin\java -server -Xms768m -Xmx1536m -XX:PermSize=256m -XX:MaxPermSize=1024m -Dweblogic.Name=DefaultServer -Djava.security.policy=C:\Oracle\MIDDLE~1\ORACLE~1\wlserver\server\lib\weblogic.policy
-Djavax.net.ssl.trustStore=C:\Users\Idiot\AppData\Local\Temp\trustStore7893387873075798475.jks -Doracle.jdeveloper.adrs=true -Dweblogic.nodemanager.ServiceEnabled=true
-Xverify:none -Djava.endorsed.dirs=C:\PROGRA~1\Java\JDK18~1.0_2\jre\lib\endorsed;C:\Oracle\MIDDLE~1\ORACLE~1\oracle_common\modules\endorsed -Djava.protocol.handler.pkgs="oracle.mds.net.protocol|oracle.fabric.common.classloaderurl.handler|oracle.fabric.common.uddiurl.handler|oracle.bpm.io.fs.protocol" -Dopss.version=12.1.3
-Digf.arisidbeans.carmlloc=C:\Users\Idiot\AppData\Roaming\JDEVEL~1\SYSTEM~1.100\DEFAUL~1\config\fmwconfig\carml -Digf.arisidstack.home=C:\Users\Idiot\AppData\Roaming\JDEVEL~1\SYSTEM~1.100\DEFAUL~1\config\fmwconfig\arisidprovider
-Doracle.security.jps.config=C:\Users\Idiot\AppData\Roaming\JDEVEL~1\SYSTEM~1.100\DEFAUL~1\config\fmwconfig\jps-config.xml -Doracle.deployed.app.dir=C:\Users\Idiot\AppData\Roaming\JDEVEL~1\SYSTEM~1.100\DEFAUL~1\servers\DefaultServer\tmp\_WL_user -Doracle.deployed.app.ext=\- -Dweblogic.alternateTypesDirectory=C:\Oracle\Middleware\Oracle_Home\oracle_common\modules\oracle.ossoiap_12.1.3,C:\Oracle\Middleware\Oracle_Home\oracle_common\modules\oracle.oamprovider_12.1.3,C:\Oracle\Middleware\Oracle_Home\oracle_common\modules\oracle.jps_12.1.3 -Dweblogic.jdbc.remoteEnabled=false -Dcommon.components.home=C:\Oracle\Middleware\Oracle_Home\oracle_common -Djrf.version=12.1.3
-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger -Ddomain.home=C:\Users\Idiot\AppData\Roaming\JDEVEL~1\SYSTEM~1.100\DEFAUL~1 -Doracle.server.config.dir=C:\Users\Idiot\AppData\Roaming\JDEVEL~1\SYSTEM~1.100\DEFAUL~1\config\fmwconfig\servers\DefaultServer -Doracle.domain.config.dir=C:\Users\Idiot\AppData\Roaming\JDEVEL~1\SYSTEM~1.100\DEFAUL~1\config\fmwconfig -Doracle.mds.filestore.preferred=true -Dadf.version=12.1.3 -Doracle.osb.home=C:\Oracle\Middleware\Oracle_Home\osb -da
-Dwls.home=C:\Oracle\MIDDLE~1\ORACLE~1\wlserver\server -Dweblogic.home=C:\Oracle\MIDDLE~1\ORACLE~1\wlserver\server -Djps.app.credential.overwrite.allowed=true -Djavax.management.builder.initial=weblogic.management.jmx.mbeanserver.WLSMBeanServerBuilder -da:org.apache.xmlbeans... -Dem.oracle.home=C:\Oracle\Middleware\Oracle_Home\em -DINSTANCE_HOME=C:\Users\Idiot\AppData\Roaming\JDeveloper\system12.1.3.0.41.140521.1008\DefaultDomain -Djava.awt.headless=true -Doracle.sysman.util.logging.mode=dual_mode -Dsoa.archives.dir=C:\Oracle\Middleware\Oracle_Home\soa\soa -Dsoa.oracle.home=C:\Oracle\Middleware\Oracle_Home\soa -Dsoa.instance.home=C:\Users\Idiot\AppData\Roaming\JDEVEL~1\SYSTEM~1.100\DEFAUL~1
-Dtangosol.coherence.log=jdk -Djavax.xml.soap.MessageFactory=oracle.j2ee.ws.saaj.soap.MessageFactoryImpl -Dweblogic.transaction.blocking.commit=true -Dweblogic.transaction.blocking.rollback=true -Djavax.net.ssl.trustStore=C:\Oracle\MIDDLE~1\ORACLE~1\wlserver\server\lib\DemoTrust.jks -Doracle.xml.schema\Ignore_Duplicate_Components=true -Doracle.xdkjava.compatibility.version=11.1.1 -Doracle.soa.compatibility.version=11.1.1 -Dums.oracle.home=C:\Oracle\Middleware\Oracle_Home\oracle_common -Djava.util.logging.manager=oracle.core.ojdl.logging.ODLLogManager weblogic.Server
Stopping Derby server...
The system cannot find the path specified.
Derby server stopped.
I uninstalled the latest JDK8 and have only the 7th version in my computer. I checked my environment variables and all possible configuration files like jdev.conf and setENVvar.cmd
Has anyone faced the same issue?
Weblogic annoyingly hard codes the value of JAVA_HOME in ORACLE_HOME\wlserver\common\bin\commEnv.cmd around line 103. The shell version of the script does at least give the option to override this as long as both JAVE_HOME and JAVA_VENDOR are set, but there's no such feature in the Windows script I'm afraid - you just have to edit the file.
The Oracle installer puts the JDK path into several configuration files. You can find them by running e.g. this command within your Oracle_Home directory:
find . -type f -exec grep -H 'jdk1.8.0_31' '{}' \;
In my case the list was:
./inventory/Components/oracle.fmwconfig.common.wls/12.2.1.0.0/context.xml
./inventory/Components/oracle.nginst.core/13.3.0.0.0/context.xml
./inventory/Components/oracle.wls.core.app.server/12.2.1.0.0/context.xml
./inventory/Components/oracle.wls.core.app.server/12.2.1.0.0/installIP2Log.xml
./jdeveloper/jdev/bin/jdev.conf
./oep/common/lib/metaInstallUnix.properties
./oep/common/lib/metaInstallWindows.properties
./oep/utils/load-generator/runloadgen.cmd
./oep/utils/load-generator/runloadgen.sh
./OPatch/bin/listDomainPatchInventory.cmd
./OPatch/bin/listDomainPatchInventory.sh
./oracle_common/common/bin/commBaseEnv.cmd
./oracle_common/common/bin/commBaseEnv.sh
./oracle_common/common/bin/setHomeDirs.cmd
./oracle_common/common/bin/setHomeDirs.sh
./oui/bin/compareInventory.cmd
./oui/bin/compareInventory.sh
./oui/bin/internal/ilaunch.cmd
./oui/bin/launch.sh
./oui/bin/viewInventory.cmd
./oui/bin/viewInventory.sh
./oui/mw/common/framework/bin/configinternal.cmd
./oui/mw/common/framework/bin/configinternal.cmd
./oui/mw/common/framework/bin/configinternal.sh
After replacing the version, all works fine again.
In Jdev 12.1.3, the location to change is system12.1.3.??? folder /DefaultDomain/bin/setDomainEnv.cmd (or sh).
You will find the JDK path there in 3 places. Change all of them to be safe.
However, if you are running ADF on your Integrated server, you will need to resolve issues where older jars may not support Java 8. This includes the older mysql driver that Oracle wants to deploy by default.

SQLDeveloper not starting

When i try to start SQLDeveloper, it is giving me the following error in command prompt:
Error: This product requires a Java(TM) Platform 5.0 runtime.
You are using 1.4.2-b28 from C:\j2sdk1.4.2\jre
But my JAVA_HOME is set to java 6
JAVA_HOME=C:\Program Files\Java\jdk1.6.0_32
Can anyone explain what exactly to do to resolve this?
Oracle SQL Developer uses a configuration file named products.conf which is situated at your roaming directory.
If you are using Windows 7 then the directory path will be:
C:\Users\\AppData\Roaming\sqldeveloper\1.0.0.0.0
Delete whole sqldeveloper directory from C:\Users\\AppData\Roaming\
Re run sqldeveloper executable, this will prompt for jdk home
Select jdk home. i.e C:\Program Files\Java\jdk1.7.0_55
Enjoy!
In my case i had 2 folders under C:\Users\username\AppData\Roaming\
sqldeveloper
SQL developer
after removing both of them and launching installation dir\sqldeveloper\sqldeveloper\bin\sqldeveloper64.exe it worked.
True acknowledgement / attribution belongs to Vishal at the following URL:
http://vishalorcl.blogspot.com/2012/12/sql-developer-from-11201-client-software.html. It describes in detail how to resolve this problem. From the page:
I am running Oracle 11g version of SQLDeveloper. I have same problem
noted above, after fresh install of Oracle. The summary is that
SQLDeveloper seems to require the Java 32-bit JDK.
Install 32-bit jdk V7 from Oracle:
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
There is a sqldeveloper.conf file located in
C:\app\UserName\product\11.2.0\dbhome_1\sqldeveloper\sqldeveloper\bin
In the file change pathname within the line at end of file:
SetJavaHome C:\app\admin\product\11.2.0\client_1\jdk
To point to pathname of the jdk install directory; also sometimes
known as JAVA_HOME.
I had this problem too!
you should go to: C:\Users-your user name-\AppData\Roaming\sqldeveloper-version of your sql developer-
there is a file named product.conf there. Right click on it and edit it with notepad in the document change the address of java home and save it.
Done!
In my case, none of the other suggestions worked. Instead, I moved the installation directory from
c:\sqldeveloper
to
anything else
And things worked again. Perhaps, some Windows registry value got broken in an unfixable way...
I don't think SQLDeveloper uses the environment variable. There should be a .conf file that contains a reference to the JDK directory.
I solved this by deleting the folder /home/USERNAME/.sqldeveloper
After that, I started SQLDeveloper and without typing anything, it found the right java-version and started without complaining :-)
So, if you don't want to delete the whole folder, maybe search there for the file which defines the java-version :-)
edit: just found that:
"Type the full pathname of a J2SE installation (or Ctrl-C to quit), the path
will be stored in ~/.sqldeveloper/jdk"
check the version of java that you are installing to you Pc the error show that you are using 4 so uninstall the java that you have then install a new one that is version higher than 5
Removing the instances from the registry worked for me.

Tomcat - The system cannot find the file specified

I downloaded Tomcat 6 from Tomcat Website and try to install. I found the .exe file in C:\apache-tomcat-6.0.35\bin but when i run the exe file the command prompt disappeared after show "The system cannot find the file specified". I already installed JDK 6 update 29 in my system. Please advice
I had a simmilar problem after installing a java update, but JAVA_HOME was set correctly. If you run tomcat as a service, you might have to right click on the tomcat icon and open java tab and change java virtual machine path or just set "use default".
If I were to "guess" I would say that the JAVA_HOME is not set. But to confirm :
Can you go the command line, make sure that JAVA_HOME is set correctly, startup tomcat (from command line) ? If you run into errors, please send the text output.
Try to run "startup.bat" to start a tomcat instance.
Go to your/path/tomcat and execute script catalina_start.bat .I had the same issue and this worked for me (though I installed Tomcat as a part of XAMPP package)