See OSGi bundles - eclipse

I have Eclipse 3.8.1 and I want to see which OSGi bundles are started so I wrote in cmd from eclipse/plugins directory:
java -jar org.eclipse.osgi_3.8.1.v20120830-144521.jar -console
But nothing happens only empty line
Do I have to install something to see them?

If you have eclipse already running then you can access the Host OSGI Console from the Console view
UPDATE
I think this is what you are looking for
$ java -Dosgi.bundles=org.eclipse.equinox.console_1.0.0.v20120522-1841.jar#start,org.apache.felix.gogo.command_0.8.0.v201108120515.jar#start,org.apache.felix.gogo.runtime_0.8.0.v201108120515.jar#start,org.apache.felix.gogo.shell_0.8.0.v201110170705.jar#start -jar org.eclipse.osgi_3.8.1.v20120830-144521.jar -console

There are two options. These are as follows:
Create a configuration folder and put a config.ini file. Set the below content in the config.ini file:
osgi.console.enable.builtin=true
This will start equinox framework with the default console.
Or take the following steps. For details check: http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2Fconsole_shell.htm
Place the necessary bundles in a folder. The bundles are:
org.apache.felix.gogo.command_0.8.0v<version>.jar
org.apache.felix.gogo.runtime_0.8.0v<version>.jar
org.apache.felix.gogo.shell_0.8.0v<version>.jar
org.eclipse.equinox.console_1.0.0v<version>.jar
org.eclipse.osgi.jar
Create a configuration subfolder and a config.ini file in it.
Add the following entries in the config.ini file:
osgi.bundles=./org.apache.felix.gogo.runtime_0.8.0v<version>.jar#start,\
./org.apache.felix.gogo.command_0.8.0v<version>.jar#start,\
./org.apache.felix.gogo.shell_0.8.0v<version>.jar#start,\
./org.eclipse.equinox.console.jar#start,\
osgi.console.enable.builtin=false
osgi.console=<port>
Start the Equinox framework with the following command line: java -jar org.eclipse.osgi.jar

Related

Cannot find parser that supports .groovy

When I'm trying to start changelog.groovy via liquibase command line it tells me that
Unexpected error running Liquibase: Cannot find parser that supports changelog.groovy
I'm doing the next: java -jar liquibase.jar update
My liquibase.properties are:
driver=org.postgresql.Driver
classpath=C:\Users\Andrii\org.postgresql.Driver.jar;C:\Users\Andrii\liquibase-3.5.1-bin\lib\liquibase-groovy-dsl-1.2.2-SNAPSHOT.jar
changeLogFile=D:\changelog.groovy
url=jdbc:postgresql://localhost:5432/test
username=postgres
password=rup
It finds those jars since if I change something in that path it will tell that jars cannot be found.
I downloaded the groovy-liquibase-dsl project, build it and added a jar into classpath. What am I doing wrong?
To make it work, you need to additionally include groovy and groovy-sql jars in Liquibase's classpath.
So say you store all the jars in C:\Users\Andrii\LiquibaseDependencies, update your the classpath property of your file as such:
classpath=C:\Users\Andrii\LiquibaseDependencies\org.postgresql.Driver.jar;
C:\Users\Andrii\LiquibaseDependencies\liquibase-groovy-dsl-1.2.1.jar;
C:\Users\Andrii\LiquibaseDependencies\groovy-2.4.6.jar;
C:\Users\Andrii\LiquibaseDependencies\groovy-sql-2.4.6.jar

Jboss log manager error

I am trying to start up JBoss with parameters in Windows but getting some errors. If I remove parameters than JBoss startup iwht no errors. Could some one please take a look.
environment variables:
JAVA_HOME=C:\Java\jdk1.6.0_45
JBOSS_HOME=C:\bin\jboss-eap-6.1
Path=C:\Java\jdk1.6.0_45\bin;C:\WINDOWS\system32;
start up jboss with following parameters:
set "JAVA_OPTS=%JAVA_OPTS%
-Djava.rmi.server.hostname=myhost
-Dcom.sun.management.jmxremote.port=myport
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=true
-Dcom.sun.management.jmxremote.password.file=C:\Java\jdk\jre\lib\management\jmx.password
-Dcom.sun.management.jmxremote.access.file=C:\Java\jdk\jre\lib\management\jmx.access
"
Error:
WARNING: failed to load the specified log manager class org.jboss.logmanager.LogManager
Error: Operation <"parallel-extension-add"> failed - address:<[]>
java.lang.RuntimeException: failed initializing module org.jboss.as.logging
==========================================================================
so to fix the error above. I have added logmanager parameter below.
start up jboss using parameters:
set "JAVA_OPTS=%JAVA_OPTS%
-Djava.util.logging.manager=org.jboss.logmanager.LogManager
-Djava.rmi.server.hostname=myhost
-Dcom.sun.management.jmxremote.port=myport
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=true
-Dcom.sun.management.jmxremote.password.file=C:\Java\jdk\jre\lib\management\jmx.password
-Dcom.sun.management.jmxremote.access.file=C:\Java\jdk\jre\lib\management\jmx.access
​"
ERROR:
Could not load Logmanager "org.jboss.logmanager.LogManager"
java.lang.ClassNotFoundException: org.jboss.logmanager.logManager
==========================================================================
so to fix error above. I have added -xbootclasspath parameter.
start up jboss using parameters:
set "JAVA_OPTS=%JAVA_OPTS%
-Djava.util.logging.manager=org.jboss.logmanager.LogManager"
-Xbootclasspath:C:\bin\jboss-eap-6.1\modules\system\layers\base\org\jboss\logmanager\main\jboss-logmanager-1.4.0.Final-redhat-1.jar
-Djava.rmi.server.hostname=myhost
-Dcom.sun.management.jmxremote.port=myport
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=true
-Dcom.sun.management.jmxremote.password.file=C:\Java\jdk\jre\lib\management\jmx.password
-Dcom.sun.management.jmxremote.access.file=C:\Java\jdk\jre\lib\management\jmx.access
​"
ERROR:
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object
and now I have no idea what to do. I have tried reinstalling jdk but no luck.
when I enter "java -version" in CMD. Than I get result: "1.6.0_45". So I know jdk is set up. but when I start Jboss than jdk is not initialization.
To resolve this, do the following:
Go to the JBOSS_HOME location on the file system e.g. c:\jboss\appserver\jboss-eap-6.3, look in the bin folder and open the configuration file named, standalone.conf, in a text editor.
At the top of the file, add the following line - JBOSS_MODULES_SYSTEM_PKGS="org.jboss.logmanager".
Scroll-down the file, to where JVM options are specified and add the following two options:
JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.jboss.logmanager.LogManager" JAVA_OPTS="$JAVA_OPTS -Xbootclasspath/p:$JBOSS_HOME/modules/system/layers/base/org/jboss/logmanager/main/jboss-logmanager-1.5.2.Final-redhat-1.jar"
Note: You may need to modify the exact path to the logmanager jar file, as the one on your jboss installation may differ from what applies here. The JBoss EAP version being used in this case was 6.3.0GA. A different version may have a different path to the logmanager jar file.
Simply save the modified 'standalone.conf' file, with these couple of changes, and re-attempt starting up of the JBoss App server (either on the CLI or within Eclipse).
Note: For fixing the issue for a JBoss EAP appserver instance running just within Eclipse, simply open the server's launch configuration and add the 2 JVM options to the VM arguments of the launch configuration, as shown in the screenshot below:
Voila! The startup issue with regards to failure to load the LogManager, should be resolved.
Check this blogpost for details and screenshots - http://obinnakalu.blogspot.com/2014/10/jboss-enterprise-application-platform.html
Although this is an old post, but if someone is still facing the issue:
-Xbootclasspath:C:\bin\jboss-eap-......
Above line replaces bootclasspath and now jvm will use only the specified jar to boot.
Use -Xbootclasspath\a:C:\bin\jboss-eap-......
instead. This will append the mentioned jar to existing bootclasspath.
For Jboss 7.1.1 I have solved this issue by adding following lines in standalone.conf.bat. All the jars are taken from JBoss 7.1.1 modules folder
set "JAVA_OPTS=%JAVA_OPTS% -Djboss.modules.system.pkgs=org.jboss.byteman,org.jboss.logmanager -Djava.util.logging.manager=org.jboss.logmanager.LogManager -Xbootclasspath/p:E:/jboss-logmanager-1.2.2.GA.jar;E:/jboss-logmanager-log4j-1.0.0.GA.jar;E:/log4j-1.2.16.jar"

How to include external library to jetty (start jetty by using start.jar)

I am trying to use jetty-nosql-memcached as jetty session backend.
jetty-nosql-memcached: https://github.com/yyuu/jetty-nosql-memcached
After I compiled the jar and put the file "jetty-nosql-memcached-0.4.1-SNAPSHOT-jar-with-dependencies.jar" into the following folder,
$JETTY_HOME/lib or
$JETTY_HOME/lib/ext or
$JETTY_BASE/lib or
$JETTY_BASE/lib/ext
Then I try to start up jetty, all the above setup throws the following exception:
ClassNotFoundException: org.eclipse.jetty.nosql.memcached.MemcachedSessionIdManager
I tried with an param after starts.jar
e.g. java -jar start.jar jetty.home=$JETTY_HOME
it successfully loads the class, however, it does not read the $JETTY_BASE war file anymore. ($JETTY_HOME and $JETTY_BASE rested in different directories)
May I know what is the correct why to include an external library for Jetty?
Many thanks!
Add More information
Jetty version
9.1.0.v20131115
I figured out two ways to include external libraries
Add --lib=$EXTERNAL_LIB_LOCATION in the command line.
java -jar start.jar --lib=$EXTERNAL_LIB_LOCATION
Put the library in $JETTY_HOME\lib\ext, and start jetty in $JETTY_HOME
cd $JETTY_HOME
java -jar start.jar

java.lang.NoClassDefFoundError: com.google.android.gms.gcm.GoogleCloudMessaging

I am trying to implement push notification for my app. i had set up the project in eclipse added google-play-services.jar in the java buildpath and checked it in order and export.so my app was working absolutely fine when i was doing registration with gcm and was getting the registration id from gcm too.but when i try to build my app from command line i am getting the below error
java.lang.NoClassDefFoundError: com.google.android.gms.gcm.GoogleCloudMessaging
i added the google-play-services.jar in the classpath so the code compiled without any issue but at runtime i am getting the above exception.looks like its not able to find the jar at runtime. how can i make the jar available at runtime also please help.
Go to configure build path -> order and export and select(check box) the packages(jars).
No matter what the build path contains in eclipse, it has nothing to do with an application. All the jars have to be added to the classpath.
I would use the following command to start the application after build:
java -cp google.jar;jarA.jar;jarB.jar;jarC.jar -jar application.jar
After the -cp option fill in the semicolon separated list of jars that you use.

upgrade weblogic server from 12cr1 to 12cr2

I need to know how can i upgrade my Weblogic application server from release 1 to release 2.
My OS is windows 7 64 bit. I am new to this some one else installed weblogic so i tried to install it by myself but it is giving me error
C:\Users\User\Downloads>java -D64 -jar wls_121200.jar
Extracting files................................................................
....................................
This installer must be executed using a Java Development Kit (JDK)
but C:\Program Files\Java\jre7 is not a valid JDK.
The Oracle Universal Installer failed. Exiting.
so i unzipped the jar with 7 zip now intaller has started is it the correct way?
Using command prompt, navigate to the directory where you downloaded the installation program.
Launch the installation program by invoking java -jar from the JDK directory on your system,
as shown in the example below:
\home\Oracle\jdk7_15\jdk1.7.0_15\bin\java -jar wls_121200.jar -- sure to replace \home\Oracle\jdk7_15\jdk1.7.0_15 -- in this example with the location of the JDK on your system
The only thing you need is to execute the installer using the jdk needed for it.
for example:
"C:\Program Files\Java\jdk1.7.0_79\bin\java.exe" -jar wls_121200.jar
I used the java.exe from my jdk 7 folder instead of the java installed on my computer.
The weblogic jar folder doesn't matter.
use the following command:
C:\Softwares\Weblogic12c> "\Program Files\Java\jdk1.7.0_05\bin"\java
-jar fmw_12.2.1.0.0_wls.jar
C:\Softwares\Weblogic12c> is the location of my weblogic jar file.
"\Program Files\Java\jdk1.7.0_05\bin"\ is the location of my jdk.
It may happen that the jar is not taking the JAVA_HOME or PATH variables that may be set in the environment variables. In this case you may set it manually in the cmd. GOTO Run->cmd.
Then goto the folder where you have placed your jar
C:\Users\User\Downloads>set JAVA_HOME=C:\Program Files\...\jdk1.8.0_112
C:\Users\User\Downloads>set PATH=C:\Program Files\...\jdk1.8.0_112\bin;%PATH%
and then you may go on executing the jar,
C:\Users\User\Downloads>java -jar wls_121200.jar
It worked for me! Hope it helps. Thanks.
Run as Administrator the Command Prompt
Open the Weblogic's jar directory
Execute the java -jar command over the jar file:
From Runtime Variable (Make sure you have it set)
java -jar wls_121200.jar
From sepecific directory
"C:\Program Files\Java\jdk1.7.0_79\bin\java.exe" -jar wls_121200.jar