Affichage des articles dont le libellé est eclipse. Afficher tous les articles
Affichage des articles dont le libellé est eclipse. Afficher tous les articles

jeudi 20 septembre 2012

Problem: Server Ode v1.x Server at localhost failed to start.

when you want to start the Apache ODE server, you may have this problem:

java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory
at org.apache.catalina.startup.Bootstrap.<clinit>(Bootstrap.java:55)
Caused by: java.lang.ClassNotFoundException: org.apache.juli.logging.LogFactory
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 1 more


Analyse: miss the tomcat-juli.jar in the Classpath
check by: echo $CLASS_PATH
if the reply is empty, that is.
so you can add the tomcat-juli.jar into the classpath.

Solution:
1. double-click on the ODE server entry in the Servers view; this should open the server configuration editor

http://wiki.eclipse.org/images/0/0b/Server-config-editor.png

2. in the configuration editor, click the "Open launch configuration" link
3. select "Classpath" in the launch configuration dialog and then "Add externals jars..."
4. navigate to your $CATALINA_HOME/bin and select the tomcat-juli.jar

http://wiki.eclipse.org/images/thumb/7/77/Launch-config.png/583px-Launch-config.png

Hope that helps
Bob


this solution comes from the eclipse forum:
http://www.eclipse.org/forums/index.php/m/760341/

-

lundi 14 mars 2011

Configuring the Eclipse Java IDE to use CPLEX libraries

Question

How do I configure the Eclipse Java IDE to use CPLEX libraries?

Cause

To specify the configuration details required to connect the Eclipse Java IDE with CPLEX libraries.

Answer

Perform the following steps to configure Eclipse with CPLEX:
1. If you are creating a new Java project
File -> New -> Java project
Else, import the existing project into your workspace
File -> Import -> Expand on 'General' -> Select 'Existing Projects into Workspace'

2. Create source (class) files as needed. To add a new class to the project,
Right click on the source folder (src) -> New -> Class, specify a name, change the
properties like package, modifiers, automatic stubs etc as required, and then click 'Finish'.
To add an existing java file to the project, simply drag and drop the .java file into the 'src'
folder of the project. Sample java programs can be found under <cplex>\examples\src\java
directory.

3. Include the CPLEX jar in the project
a) Project -> Properties -> Java Build Path -> Libraries tab ->
b) Click the 'Add External JARs ...' button and point to cplex.jar
file (found under the <CPLEX>/lib directory)

4. Run Configuration setup
a) Run -> Run Configurations ... -> Java Application
b) Right click to select 'New' if no Run Configuration exists or select the one
which you would like to configure.
c) On the 'Main' tab select your main class (the class containing
the main() function that you want to run).
d) On the 'Arguments' tab add the following to 'VM arguments' section
-Djava.library.path=<path_to_so_or_dll>
where <path_to_so_or_dll> is the directory that contains the
libcplex<version>.so (Linux) or cplex<version>.dll (Windows) file found
by default under the <CPLEX_installation_dir>/bin/<port> directory.
e) If the PATH environment variable is globally defined and includes CPLEX's
.dll or .so (platform dependant) files, then the previous step is not required.
f) This step is required only if you are using CPLEX 12.1 or an earlier version.
If CPLEX's license path is not globally defined under the ILOG_LICENSE_FILE
environment variable, then you can do so in the 'Environment' tab. Click 'New'
and enter ILOG_LICENSE_FILE as the Name and <license_file_location> as the
Value. The <license_file_location> needs to specify the license file name as well and not
just the directory it is present under.

5. You should now be able to run the program.

original link: http://www-01.ibm.com/support/docview.wss?uid=swg21449776