Compiling standalone selenium: Failed to load Main-Class manifest attribute from - java

I'm a total Java noob so please understand =) I need a quick advice on how to fix the issue.
I cloned the official selenium git repo, changed the code a bit (need to dump the page into some specified dirs), and tried to rebuilt it:
./go //java/server/src/org/openqa/selenium/remote/server:server:uber //java/client/src/org/openqa/selenium:client-combined:uber
It was successful but when I tried to execute it I got this:
$ java -jar build/java/server/src/org/openqa/selenium/remote/server/server-standalone.jar
Failed to load Main-Class manifest attribute from
build/java/server/src/org/openqa/selenium/remote/server/server-standalone.jar
Tried to check classpath, CLASS_PATH and CLASSPATH env variables (as a friend of mine suggested) - I simply don't have any.
At the same time, the pre-compiled standalone server from the official downloads works out of the box.
The official docs didn't help. There's nothing about it there.
So - I need a quick advice how to compile it? Thanks.
P.S. JDK 8 (latest), Mac OS 10.7
P.P.S. That friend of mine tried to build it by himself and he was lucky - he got a new build/dist folder where the target big file was. But in my case, the build folder is created, but there's not 'dist' folder in it.

Finally found the answer: I should have built it like that:
./go clean release
it's really strange that all the docs state I need to use these long /bla/bla/:uber things to get a whole single 'uber' server.

Related

I'm having a trouble with starting Eclipse : Error : ... cannot be solved to a type

I really don't know what the problem is.
I followed several web postings about installing and settings of JDK/ JRE and also completed clearly on environment variables :Path & CLASS PATH
I'm sure about that since i checked the cmd and it worked well.
the same problem occured over and over again.
I corrected on Library tab
I add the Library list like this,
But, I still have the same problem. Did I make a severe mistake? what should I do about this problem?
still have JAVA problems
Please check the Java source directory configuration under Java Build Path, Source tab and Java Compiler version settings.
Did you recently update your Java version? If so, then you have to readjust your path so that it directs to the new updated version.

installing openimaj's statistic package

I followed the instructions on this page - http://www.openimaj.org/tutorial/getting-started-with-openimaj-using-maven.html and created a project. However, it's missing org.openimaj.math.statistics package. I just wanted to use MeanAndCovariance method. How do I install this missing package? I'm on osx (Mountain Lion)
I just found out that I really don't need to follow that instruction that basically installed whole lot of unnecessary package. All I need is, download core-math jar file from this link - http://mavensearch.io/repo/org.openimaj/core-math/1.3 and adds to my project. Vola works like charm!

com.android.ant.SetupTask cannot be found

I would need to build one android app from command line. I successfully compiled its jni part, but cannot build Java part. ant prints the following (paths have been removed):
/.../build.xml:69: taskdef class com.android.ant.SetupTask cannot be found
using the classloader AntClassLoader[/path/to/sdk/tools/lib/ant-tasks.jar:/path/to/sdk/tools/lib/manifest-merger.jar:/path/to/sdk/tools/lib/common.jar:/path/to/sdk/tools/lib/guava-13.0.1.ja r:/path/to/sdk/tools/lib/sdklib.jar:/path/to/sdk/tools/lib/layoutlib-api.jar:/path/to/sdk/tools/lib/kxml2-2.3.0.jar:/path/to/sdk/tools/lib/dvlib.jar:/path/to/sdk/tools/lib/bcpkix-jdk15on-1.4 8.jar:/path/to/sdk/tools/lib/commons-compress-1.0.jar:/path/to/sdk/tools/lib/httpclient-4.1.1.jar:/path/to/sdk/tools/lib/httpmime-4.1.jar:/path/to/sdk/tools/lib/bcprov-jdk15on-1.48.jar:/path /to/sdk/tools/lib/httpcore-4.1.jar:/path/to/sdk/tools/lib/commons-logging-1.1.1.jar:/path/to/sdk/tools/lib/commons-codec-1.4.jar]
It seems that SetupTask is inside anttasks.jar, but it is not in my sdk directory. I tried to install all available sdks, tried to add ant-tasks.jar to the class path (it has similar name), but with no success. Is there any way how to install anttasks.jar, or is it replaced by something else? Or is SetupTask obsolete in some way?
I have run:
android update project ...
I tried to find answer by google but with no success for this particular issue (AntClassLoader is not empty, anttasks.jar is missing).
Thanks,
Daniel
Afaik the SetupTask ist obsolete in Android 2.3 and higher. So it seems to me like you're working with an old version of the build.xml. Since Android 2.3 and higher, there is a new template for the build.xml in the directory
your-android-SDK/tools/ant/. You can modify this one according to your needs.
Maybe this link will help you, it pointed me in the right direction:
https://sites.google.com/site/sokolkosta/internal-blog/includingadditionaljavaxpackagesinandroid23
https://stackoverflow.com/a/15719072/1343309
It worked for me.
rm MyProjects/NowRedux/build.xml
android update project --target 8 --path MyProjects/NowRedux

MissingResourceException running MXJ for MySQL

I'm using the code from this tutorial for using MXJ to "embed" MySQL in my java application. However, I'm getting this exception when running the code:
Exception in thread "main" java.util.MissingResourceException: Resource '5-5-9/Windows_7-amd64/mysqld.exe' not found
This happens when I reach this line in the tutorial:
mysqldResource.start("test-mysqld-thread", database_options);
I'm running in Eclipse and I have the 4 following jars added to my build path, since this link says I need them:
mysql-connector-java-5.1.18-bin.jar
mysql-connector-mxj-gpl-5-0-12-db-files.jar
mysql-connector-mxj-gpl-5-0-12.jar
aspectjrt-1.6.9.jar
I'm not sure what I'm missing here. Any tips?
MXJ doesn't come ready for use with Windows 7 64 bit. Using this bug ticket, I found what I needed to do.
Once the files are downloaded and extracted from the zips, unjar mysql-connector-mxj-gpl-5-0-12-db-files.jar and add a line to platform-map.properties file inside:
Windows_7-amd64=Win-x86
Save, and re-jar. Works like a charm!
Actually it's never a good idea to mess up with the jar files, cause whenever you upgrade to a newer version you'll need to remember to redo this fix again. The answer is correct, but you just need to create platform-map.properties file with this inside:
Windows_7-amd64=Win-x86
and add it to your classpath.
For anyone who has the same issue on MacOS Catalina, you can follow the README.md in my repo (https://github.com/pengyue/mysql-connector-mxj-mac-os-catalina), which has the 64 bits executables for MacOS Catalina, and this improved connector works on Catalina.
To explain what I have done:
Download the 64 bits executables from MySQL to the folder 5-5-9
Add the platform mapping for 64 bits MacOS in platform-map.properties
Create a jar by using jar cvf mysql-connector-mxj-db-files-5.0.12.jar .
Replace the jar in your mvn settings folder ~/.m2/repository/mysql/mysql-connector-mxj-db-files/5.0.12/ with the jar you just created.
This solution works fine for my projects, Unfortunately I could not find a github for the mysql-connector-mxj, as it is deprecated and not maintainable anymore.
The other option is to use wix-embedded-mysql(https://github.com/wix/wix-embedded-mysql) instead of mysql-connector-mxj, but this probably requires some code changes in your projects.

Stuck at converting/implementing Qt (.ui) files to Qtjambi(.jui) files

Edit 01.02.2012:
FWIW: 4.7.0 linux packages are broken AFAIK, they
can be fixed or 4.6 packages used instead...
No need to use
custom Qt for Jambi – Smar 2 days ago
Thanks to SMAR, I was finally able to resolve this
issue by downloading the an older version of
qtjambi 4.6.3 ( http://qt-jambi.org/downloads/ ). The only problem was that the
designer did not know where to find my jvm which
I solved by adding these two entries to /etc/bash.bashrc:
# custom PATH exports
export JAVA_HOME=/usr/lib/jvm/java-6-sun
PATH=$PATH:$JAVA_HOME/bin
Then I just had to run (everything was in the qtjambi-folder):
designer.sh --> save it as .jui --> convert it with juic into a .java file --> and load it with netbeans :)
Hope this is somehow helpful to others too.
Thanks for the great and fast help!
Original post:
Good evening,
I am not completely sure if this topic is enough about programming but I am having some problems setting up Qtjambi. I have followed a lot of "howtos" and instructions so I am a little confused about what to do next. Qtjambi works as I have written a example program with netbeans. Although I have created some ui files that I want to implement which doesnt work.
I am trying to get this to run for like a week and I really need this because of my finals in 2 months. I try to give as much useful details as possible.
I am using LinuxMint (ubuntu derivate), downloaded qtjambi v 4.7.0
after trying out
bash qtjambi.sh
I got an error of mismatching versions
Cannot mix incompatible Qt library (version 0x40704) with this library (version 0x40700)
So I downloaded, compiled and installed
qt-everywhere-opensource-src-4.7.0 to /usr/local/Trolltech/Qt-4.7.0/
I know that I have to tell the system where to find all the binarys so I added to the /etc/bash.bashrc
#custom PATH exports
PATH=$PATH:/home/michi/Scripts
PATH=$PATH:/usr/local/Trolltech/Qt-4.7.0/bin/
export LD_LIBRARY_PATH=/usr/local/Trolltech/Qt-4.7.0/lib
export QT_PLUGIN_PATH=/usr/local/Trolltech/Qt-4.7.0/plugins
JAVA_DIR=/usr/lib/jvm/java-6-sun-1.6.0.26/
export JAMBI_PATH=/usr/local/lib/qtjambi-linux64-community-4.7.0/
I followed through the instructions of:
http://www.davidlauzon.net/2010/01/getting-started-with-qt-jambi-on-linux/
Which generally talks about getting jambi-designer to work.
http://jpnurmi.kapsi.fi/blog/2008/03/16/how-to-switch-qt-version-in-ubuntu/
How to manage multiple Qt versions.. These commands worked but had no effect
I finally gave up on trying to run the designer and tried to "convert" the .ui files to .jui files with the program juic which is located in the qtjambi/bin folder. But also here I get an error:
michi#BALMORA ~/Documents/unterlagen/pr_scw/Qt/Qtrainer/test $ which juic
/usr/local/bin/juic
michi#BALMORA ~/Documents/unterlagen/pr_scw/Qt/Qtrainer/test $ juic -cp .
juic: no .jui files found in CLASSPATH
michi#BALMORA ~/Documents/unterlagen/pr_scw/Qt/Qtrainer/test $ /usr/locallib/qtjambi-linux64-community-4.7.0/bin/juic -cp .
juic: no .jui files found in CLASSPATH
It would be great if you could help/guide or redirect me to "better" instructions.
Michael Kargl

Categories