Ojdbc14_g.jar and tracing

I have been trying to get tracing to work for the last couple of days. I have read all of the docs about tracing but I am still missing something. I am hoping that someone can fill in the gaps for me.
In my code JSP code I have the following:
System.setProperty("java.util.logging.config.file", "/pirusfj/OracleLog.properties");
oracle.jdbc.driver.OracleLog.setTrace(true);
System.out.println ("Tracing turned on");
Where in my web directories should the OracleLog.properties file be so that it is picked up by the logger? Do I need to have OracleHome set to that location? Also I have everything set to FINEST. Should the log out put come out as INFO: log message or FINEST: log message?
The OracleLog.properties file is the one that came with the demo code and everything is changed from INFO to FINEST. Here is a copy of it:
# OracleLog.properties Copyright Oracle 2004
# Controls output of OracleLog for JDBC applications using
# JDK1.4.x and ojdbc14_g.jar
# See the Javadoc for OracleLog for more information.
# Starting with Oracle 10gR1 the OracleLog system in
# ojdbc14_g.jar for JDK1.4.x uses the services of
# java.util.logging.* This file is a starting
# point for controlling that output via a properties
# file. Note that there is also a programatic interface
# for java.util.logging which may be used as well. That
# would allow finer grained control and the ability to
# change the logging as the program runs.
# Copy this file to your runtime directory to use as a
# starting point. You should expect to change it to
# suit your needs.
# To enable logging controlled by this file start your
# main java class with the swtiches
# -Doracle.jdbc.Trace=true
# -Djava.util.logging.config.file=OracleLog.properties
# See also the file logging.properties in the jre/lib directory
# in your JDK1.4 installation and the JDK documentation.
handlers= java.util.logging.ConsoleHandler
.level= FINEST
# default file output is in user's home directory.
java.util.logging.FileHandler.pattern = jdbc.log
java.util.logging.FileHandler.limit = 50000
java.util.logging.FileHandler.count = 1
java.util.logging.FileHandler.formatter = java.util.logging.XMLFormatter
# Setting this to SEVERE avoids duplicate output from default logger
java.util.logging.ConsoleHandler.level = FINEST
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
# Starting point -- main driver function level log
oracle.jdbc.level = FINEST
oracle.jdbc.driver.level = FINEST
# Uncomment and/or change the levels for more detail
oracle.jdbc.datum.level = FINEST
oracle.jdbc.adt.level = FINEST
oracle.jdbc.conversion.level = FINEST
oracle.jdbc.adt.level = FINEST
oracle.jdbc.thin.level = FINEST
oracle.jdbc.datum.level = FINEST
oracle.jdbc.kprb.level = FINEST
oracle.jdbc.pool.level = FINEST
oracle.jdbc.xa.level = FINEST
oracle.jdbc.sqlj.level = FINEST
oracle.jdbc.oci.level = FINEST
oracle.jdbc.jpub.level = FINEST
# Category definitions are listed in the following:
# USER_OPER JDBC API level tracing.
# INFO (expected volume: low)
# PROG_ERR Program error (eg. an unexpected value encountered
# SEVERE in a switch statement). Messages of this category
# is not maskable.
# (expected volume: low)
# ERROR Error conditions that usually lead to catastrophic
# SEVERE or unrecoverable results. Messages of this
# category is not maskable.
# (expected volume: low)
# WARNING Error conditions that are usually recoverable.
# WARNING Note that the module and sub-module filters do not
# apply to messages of this category. See also
# enableWarning().
# (expected volume: low)
# FUNCTION Function entry/return information.
# FINE (expected volume: medium)
# DEBUG1 High-level debug information.
# FINER (expected volume: medium)
# DEBUG2 Detail debug information.
# FINEST (expected volume: high)
# SQL_STR SQL string
# CONFIG (expected volume: low)
Any help would be greatly appreciated.
Thanks,
Susan Conger

Duplicate post:
ojdbc14_g.jar and tracing
Susan,
You wrote:
In my JSP code I have the following:
System.setProperty("java.util.logging.config.file", "/pirusfj/OracleLog.properties");For some "System" properties, the "setProperty()" method does nothing.
These properties must be set on the command-line using the "-D" option of the "java" command.
Indeed, this is stated in the comments of the demo code that you posted, namely:
# -Djava.util.logging.config.file=OracleLog.propertiesYou also asked:
Where in my web directories should the OracleLog.properties file beThat may depend on the JSP engine you are using.
Excuse me, but I couldn't find that information in your post.
Hence I can't really answer that question.
Good Luck,
Avi.

Similar Messages

  • Display the sql statement with arguments with ojdbc14_g.jar

    Hi,
    I'd like to display the sql statements with ojdbc14_g.jar.
    So I've followed the documentation and set an OracleLog.properties file which is linked to my java program.
    The problem is the trace generated is huge and I only need the SQL requests wich are made with the arguments but I don't know how to configure that.
    Have you got a sample file which handle that ?
    I've tried that :
    oracle.jdbc.handlers=java.util.logging.ConsoleHandler
    java.util.logging.ConsoleHandler.level=CONFIG
    java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
    oracle.level=INFO
    oracle.jdbc.driver.level=OFF
    oracle.jdbc.driver.OraclePreparedStatement.level=OFF
    oracle.jdbc.pool.level=OFF
    oracle.jdbc.util.level=OFF
    oracle.sql.level=INFO
    But that doesn't display only the SQL and args :(
    Regards.

    The fact is the statement are made by ejb entities on JBoss so I don't have a way to make specific logger to display the sql order. The only thing I can do is to set the log4j org.jboss.ejb.plugins.cmp to a trace level in order to see the sql order but without the arguments.
    I tried those traces however I see stuff like that without any SQL orders :
    <<
    10:10:53,833 INFO [STDOUT] NFO: PhysicalConnection.getRestrictGetTables() returned false
    29 nov. 2007 10:10:52 oracle.jdbc.driver.PhysicalConnection getRemarksReporting
    INFO: PhysicalConnection.getRemarksReporting()
    29 nov. 2007 10:10:52 oracle.jdbc.driver.PhysicalConnection getRestrictGetTables
    INFO: PhysicalConnection.getRestrictGetTables() returned false
    29 nov. 2007 10:10:52 oracle.jdbc.driver.PhysicalConnection getDefaultFixedString
    INFO: PhysicalConnection.getDefaultFixedString() returning false
    29 nov. 2007 10:10:52 oracle.jdbc.driver.OraclePreparedStatement setString
    INFO: OraclePreparedStatement.setString(paramIndex=1, x=%)
    29 nov. 2007 10:10:52 oracle.jdbc.driver.OraclePreparedStatement setString
    INFO: OraclePreparedStatement.setString(paramIndex=2, x=VIEW_ACTION_NAMES)
    29 nov. 2007 10:10:52 oracle.jdbc.driver.PhysicalConnection getRestrictGetTables
    INFO: PhysicalConnection.getRestrictGetTables() returned false
    29 nov. 2007 10:10:52 oracle.jdbc.driver.T4CPreparedStatement allocateTmpByteArray
    GRAVE: oracle.jdbc.driver.T4CPreparedStatement.allocateTmpByteArray : Re-allocate byte array of size : 4000
    29 nov. 2007 10:10:52 oracle.jdbc.driver.OracleResultSetImpl close
    INFO: OracleResultSetImpl.close()
    29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getMetaData
    INFO: PhysicalConnection.getMetaData()
    29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getCatalog
    INFO: PhysicalConnection.getCatalog()
    29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRemarksReporting
    INFO: PhysicalConnection.getRemarksReporting()
    29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRestrictGetTables
    INFO: PhysicalConnection.getRestrictGetTables() returned false
    29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRemarksReporting
    INFO: PhysicalConnection.getRemarksReporting()
    29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRestrictGetTables
    INFO: PhysicalConnection.getRestrictGetTables() returned false
    29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getDefaultFixedString
    INFO: PhysicalConnection.getDefaultFixedString() returning false
    29 nov. 2007 10:10:53 oracle.jdbc.driver.OraclePreparedStatement setString
    INFO: OraclePreparedStatement.setString(paramIndex=1, x=%)
    29 nov. 2007 10:10:53 oracle.jdbc.driver.OraclePreparedStatement setString
    INFO: OraclePreparedStatement.setString(paramIndex=2, x=PROCESS_TYPE_HIERARCHY)
    29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRestrictGetTables
    INFO: PhysicalConnection.getRestrictGetTables() returned false
    29 nov. 2007 10:10:53 oracle.jdbc.driver.T4CPreparedStatement allocateTmpByteArray
    GRAVE: oracle.jdbc.driver.T4CPreparedStatement.allocateTmpByteArray : Re-allocate byte array of size : 4000
    29 nov. 2007 10:10:53 oracle.jdbc.driver.OracleResultSetImpl close
    INFO: OracleResultSetImpl.close()
    29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getMetaData
    INFO: PhysicalConnection.getMetaData()
    29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getMetaData
    INFO: PhysicalConnection.getMetaData()
    29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getCatalog
    INFO: PhysicalConnection.getCatalog()
    29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRemarksReporting
    INFO: PhysicalConnection.getRemarksReporting()
    29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRestrictGetTables
    INFO: PhysicalConnection.getRestrictGetTables() returned false
    29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRemarksReporting
    INFO: PhysicalConnection.getRemarksReporting()
    29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRestrictGetTables
    INFO: PhysicalConnection.getRestrictGetTables() returned false
    29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getDefaultFixedString
    INFO: PhysicalConnection.getDefaultFixedString() returning false
    29 nov. 2007 10:10:53 oracle.jdbc.driver.OraclePreparedStatement setString
    INFO: OraclePreparedStatement.setString(paramIndex=1, x=%)
    29 nov. 2007 10:10:53 oracle.jdbc.driver.OraclePreparedStatement setString
    INFO: OraclePreparedStatement.setString(paramIndex=2, x=PROCESS_TYPE_HIERARCHY)
    29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRestrictGetTables
    INFO: PhysicalConnection.getRestrictGetTables() returned false
    29 nov. 2007 10:10:53 oracle.jdbc.driver.T4CPreparedStatement allocateTmpByteArray
    GRAVE: oracle.jdbc.driver.T4CPreparedStatement.allocateTmpByteArray : Re-allocate byte array of size : 4000
    29 nov. 2007 10:10:53 oracle.jdbc.driver.OracleResultSetImpl close
    INFO: OracleResultSetImpl.close()
    29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getMetaData
    INFO: PhysicalConnection.getMetaData()
    29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getCatalog
    INFO: PhysicalConnection.getCatalog()
    29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRemarksReporting
    INFO: PhysicalConnection.getRemarksReporting()
    29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRestrictGetTables
    INFO: PhysicalConnection.getRestrictGetTables() returned false
    29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRemarksReporting
    INFO: PhysicalConnection.getRemarksReporting()
    29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRestrictGetTables
    INFO: PhysicalConnection.getRestrictGetTables() returned false
    29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getDefaultFixedString
    INFO: PhysicalConnection.getDefaultFixedString() returning false
    29 nov. 2007 10:10:53 oracle.jdbc.driver.OraclePreparedStatement setString
    INFO: OraclePreparedStatement.setString(paramIndex=1, x=%)
    29 nov. 2007 10:10:53 oracle.jdbc.driver.OraclePreparedStatement setString
    INFO: OraclePreparedStatement.setString(paramIndex=2, x=FORM_EMBEDDED_VIEWS)
    29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRestrictGetTables
    INFO: PhysicalConnection.getRestrictGetTables() returned false
    29 nov. 2007 10:10:53 oracle.jdbc.driver.T4CPreparedStatement allocateTmpByteArray
    GRAVE: oracle.jdbc.driver.T4CPreparedStatement.allocateTmpByteArray : Re-allocate byte array of size : 4000
    29 nov. 2007 10:10:53 oracle.jdbc.driver.OracleResultSetImpl close
    INFO: OracleResultSetImpl.close()
    29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getMetaData
    INFO: PhysicalConnection.getMetaData()
    29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getMetaData
    INFO: PhysicalConnection.getMetaData()
    29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getCatalog
    INFO: PhysicalConnection.getCatalog()
    29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRemarksReporting
    INFO: PhysicalConnection.getRemarksReporting()
    29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRestrictGetTables
    INFO: PhysicalConnection.getRestrictGetTables() returned false
    29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRemarksReporting
    INFO: PhysicalConnection.getRemarksReporting()
    29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRestrictGetTables
    INFO: PhysicalConnection.getRestrictGetTables() returned false
    29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getDefaultFixedString
    INFO: PhysicalConnection.getDefaultFixedString() returning false
    29 nov. 2007 10:10:53 oracle.jdbc.driver.OraclePreparedStatement setString
    INFO: OraclePreparedStatement.setString(paramIndex=1, x=%)
    29 nov. 2007 10:10:53 oracle.jdbc.driver.OraclePreparedStatement setString
    INFO: OraclePreparedStatement.setString(paramIndex=2, x=FORM_EMBEDDED_VIEWS)
    29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getRestrictGetTables
    INFO: PhysicalConnection.getRestrictGetTables() returned false
    29 nov. 2007 10:10:53 oracle.jdbc.driver.T4CPreparedStatement allocateTmpByteArray
    GRAVE: oracle.jdbc.driver.T4CPreparedStatement.allocateTmpByteArray : Re-allocate byte array of size : 4000
    29 nov. 2007 10:10:53 oracle.jdbc.driver.OracleResultSetImpl close
    INFO: OracleResultSetImpl.close()
    29 nov. 2007 10:10:53 oracle.jdbc.driver.PhysicalConnection getMetaData
    INFO: PhysicalConnection.getMetaData()
    29 nov. 20>>

  • What is the diffrence b/w jar and ear?

    what is the diffrence b/w jar and ear?

    Refer this
    http://forum.java.sun.com/thread.jspa?threadID=779900&tstart=0
    Regards
    lekshmi

  • Loading .jar and .class in MX7

    I have a cfx tag that includes a .class and .jar file. I
    could do this on the old MX server but in MX7 the option is not in
    the cfide/administrator.
    I copied the .jar and .class files into the
    c:\cfusionmx7\runtime\lib\ directory and then added them to the
    bottom of the jvm.config file with the following entry. (note: The
    .jar file is called MYNEWFILE.jar)
    java.class.path={application.home}/servers/lib,{application.home}/../lib/macromedia_driver s.jar,{application.home}/lib/cfmx_mbean.jar,{application.home}/lib,{application.home}/lib/ MYNEWFILE.jar,{application.home}/../wwwroot/WEB-INF/lib/
    I then rebooted the server. I also have a ".class" file that
    goes with this. I have no idea where to put that thing. The cfx
    (which I mapped in the administrator).
    I get the standard 500 error saying:
    HTTP 500 - Internal server error
    Internet Explorer
    even though I have debugging going to my laptop.
    Here is the output of the exception.log
    "Error","jrpp-0","07/05/07","16:04:14",,"com/allaire/cfx/CustomTag
    The specific sequence of files included or processed is:
    C:\Inetpub\wwwroot\Pauly\example.cfm "
    java.lang.NoClassDefFoundError: com/allaire/cfx/CustomTag
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown
    Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$100(Unknown Source)
    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)
    at
    jrunx.util.JRunURLClassLoader.loadClass(JRunURLClassLoader.java:77)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at
    jrunx.util.JRunURLClassLoader.loadClass(JRunURLClassLoader.java:77)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at
    jrunx.util.JRunURLClassLoader.loadClass(JRunURLClassLoader.java:77)
    at
    jrunx.util.JRunURLClassLoader.loadClass(JRunURLClassLoader.java:69)
    at
    coldfusion.bootstrap.BootstrapClassLoader.loadClass(BootstrapClassLoader.java:207)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at coldfusion.tagext.CfxTag.doStartTag(CfxTag.java:88)
    at
    coldfusion.runtime.CfJspPage._emptyTag(CfJspPage.java:1908)
    at
    cfexample2ecfm2026642798.runPage(C:\Inetpub\wwwroot\Pauly\example.cfm:3)
    at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:152)
    at
    coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:343)
    at
    coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
    at
    coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:210)
    at coldfusion.filter.PathFilter.invoke(PathFilter.java:86)
    at
    coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:50)
    at
    coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:52)
    at
    coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:2 8)
    at
    coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
    at
    coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
    at
    coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
    at coldfusion.CfmServlet.service(CfmServlet.java:105)
    at
    coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:78)
    at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
    at
    jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
    at
    jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:257)
    at
    jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:527)
    at
    jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:204)
    at
    jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:349)
    at
    jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:457)
    at
    jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:295)
    at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
    "Information","Thread-10","07/05/07","16:14:10",,"Address
    already in use: JVM_Bind"
    java.net.BindException: Address already in use: JVM_Bind
    at java.net.PlainSocketImpl.socketBind(Native Method)
    at java.net.PlainSocketImpl.bind(Unknown Source)
    at java.net.ServerSocket.bind(Unknown Source)
    at java.net.ServerSocket.<init>(Unknown Source)
    at java.net.ServerSocket.<init>(Unknown Source)
    at
    coldfusion.server.jrun4.metrics.CfstatServer.run(CfstatServer.java:64)
    Any help would be greatly appreciated, as I've been working
    on this for a while. I couldn't find a solution in the forums so I
    thought I would post. Thanks!
    Pauly

    >> java.lang.NoClassDefFoundError:
    com/allaire/cfx/CustomTag
    Is the CFX.jar in the classpath?
    > The option is not in the cfide/administrator.
    What option? The administrator has several options for custom
    jars, tags, et.
    - Extensions -> Custom Tag Paths
    - Extensions -> CFX Tags
    CF will also look in these directories automatically
    - {cf_webroot}/WEB-INF/classes (for classes)
    - {cf_webroot}/WEB-INF/lib (for jars)

  • Adding a jar to the classpath of an executable jar (mixing -jar and -cp)

    Hello,
    frankly I hesitated over posting this to "New to Java"; my apologies (but also, eternal gratefulness) if there is an ultra-simple answer I have overlooked...
    I integrate a black-box app (I'm not supposed to have the source) that comes packaged as an executable jar (with a Manifest.MF that specifies the main class and a bunch of dependent jars), along with a few dependent jars and a startup script. Long story short, the application code supports adding jars in the classpath, but I can't find a painless way to add a jar in its "classpath".
    The app's "vendor" (another department of my customer company) has a slow turnaround on support requests, so while waiting for their suggestion as to how exactly to integrate custom jars, I'm trying to find a solution at the pure Java level.
    The startup script features a "just run the jar" launch line:
    java -jar startup.jarI tried tweaking this line to add a custom jar in the classpath
    java -cp mycustomclasses.jar -jar startup.jarBut that didn't seem to work ( NoClassDefFound at the point where the extension class is supposed to be loaded).
    I tried various combination of order, -cp/-classpath, using the CLASSPATH environment variable,... and eventually gave up and devised a manual launch line, which obviously worked:
    java -cp startup.jar;dependency1.jar;dependency2.jar;mycustomclasses.jar fully.qualified.name.of.StartupClassI resent this approach though, which not only makes me have to know the main class of the app, but also forces me to specify all the dependencies explicitly (the whole content of the Manifest's class-path entry).
    I'm surprised there isn't another approach: really, can't I mix -jar and -cp options?
    - [url http://download.oracle.com/javase/6/docs/technotes/tools/windows/classpath.html]This document (apparently a bible on the CLASSPATH), pointed out by a repited forum member recently, does not document the -jar option.
    - the [url http://download.oracle.com/javase/tutorial/deployment/jar/run.html]Java tutorial describes how to use the -jar option, but does not mention how it could play along with -cp
    Thanks in advance, and best regards,
    J.
    Edited by: jduprez on Dec 7, 2010 11:35 PM
    Ahem, the "Java application launcher" page bundled with the JDK doc (http://download.oracle.com/javase/6/docs/technotes/tools/windows/java.html) specifies that +When you use [the -jar] option, the JAR file is the source of all user classes, and other user class path settings are ignored+
    So this behavior is deliberate indeed... my chances diminish to find a way around other than specifying the full classpath and main class...

    I would have thought that the main-class attribute of the JAR you name in the -jar option is the one that is executed.Then I still have the burden of copying that from the initial startup.jar's manifest. Slightly less annoying than copying the whole Class-path entry, but it's an impediment to integrating it as a "black-box".
    The 'cascading' behavior is implicit in the specification
    I know at least one regular in addition to me that would issue some irony about putting those terms together :o)
    Anyway, thank you for confirming the original issue, and merci beaucoup for your handy "wrapper" trick.
    I'll revisit the post markers once I've actually tried it.
    Best regards,
    Jérôme

  • How to install the struts-el jar and tld file

    How can i install/configure the struts-el jar and struts-logic-el.tld. When I tried with the related sites, i couldn't get any jar files for struts-el tag.
    I got only 404 status error.
    From where and how to get the jar file and tld file for the struts-el tag .Please refer me

    The jar file is part of the download of struts.
    its in the /contrib/lib directory
    You should need struts, jstl plus the struts-el jar files.
    The tld files should not be necessary - just use the standard URIs for them.
    eg http://struts.apache.org/tags-logic-el

  • Peculiar issue with signed .jars and Linux (Debian unstable, 2.4.20-custom)

    BACKGROUND:
    I am a developer working on a Java3D application, which is to be deliverable over
    the Web. Delivery as an applet seemed a natural choice, and so I spent a considerable amount of effort learning (I won't say "mastering") the process of
    creating a self-signed .jar containing java3d-<some_version>.exe. I have in fact
    successfully created a fully-fuctional from-scratch JPI/Java3D/myapp install. By
    this I mean that Windows machine with only stock IE installed could hit my URL,
    get the proper JPI installed, followed by the Java3D runtime I'd chosen, as well
    as a third-party DXF loader, and finally (after much clicking of 'Yes', 'Accept',
    'OK', etc.) see my app in a browser window.
    That was on my old, slow, Windows2000 workstation. Now I have a shiny, new
    workstation upon which my employer has graciously allowed me to run Linux. Sadly,
    the re-creation of the self-signed .jar files under a new JDK has not gone smoothly.
    PROBLEM DESCRIPTION:
    When a user attempts to download the self-signed .jar containing the auto-install
    executable for the Java3D runtime, the normal security warning prompts are displayed (one for granting to install the extension, one to accept the "suspect" certificate from me alone). The plugin happily downloads the .jar file, and then
    a NullPointerException is thrown, with a
    stack trace like:
    NPE!
    at java.util.zip.ZipFile.getInputStream (unknown source)
    at java.util.jar.JarFile.getInputStream (unknown source)
    <something>doPrivileged<something>
    etc.
    I apologize for the lack of a full stack trace; I would essentially have to type it in by hand after printing it out on the remote test box; I hope that I've caught the important details above.
    After this, the pure-java signed .jar is downloaded and installed, and then the applet "loads" with the predictable ClassNotFoundException for javax.media.j3d.SceneGroup.
    Downloading and installing the J3D runtime by hand and then re-visiting the URL results in a fully-functional applet.
    I've tried Blackdown Linux JDKs 1.4 and 1.3.1, as well as Sun's JDKs 1.3.1_07 and 1.3.1_05 for the compiling, jar'ing, and jarsigner'ing of these files, all with the same result. At each new JDK, I re-did the HTML conversion so that he appropriate
    JPI version was required on the client. I did complete uninstallations of all client JPI instances (including Web Start for 1.4.1_x, as well as cleaning the registry on the client).
    When this strategy worked, it was on Sun JDK 1.3.1_05 for Windows runnning on Windows2000, unknown service pack.
    DESIRED BEHAVIOR:
    I would like my clients to be able to go from stock Windows2K/IE (this being an intranet without any other options) to some JPI version running the J3D extension, with only the need to click 'OK', 'Accept', 'Grant This Session', etc. a bunch of times on the part of the user. I want this to happen without my having to resurrect my decrepit old Compaq Deskpro just to play the role of "build host" for my
    Java3D and loader .jar files, if at all possible.
    FILES:
    Here's what gets merged into the "main" applet's mainfest at creation time:
    Manifest-Version: 1.0
    Extension-List: java3d DxfLoader
    java3d-Extension-Name: javax.media.j3d
    java3d-Implementation-Vendor-Id: com.sun
    java3d-Implementation-Version: 1.3
    java3d-Specification-Title: Java 3D API Specification
    java3d-Specification-Version: 1.3
    java3d-Specification-Vendor: Sun Microsystems, Inc
    java3d-Implementation-URL: http://10.1.1.1/heartcad/lib/java3d.jar
    DxfLoader-Extension-Name: eupla.dxfloader
    DxfLoader-Implementation-Title: Eupla DXFLoader
    DXFLoader-Implementation-URL: http://10.1.1.1/heartcad/lib/DxfLoader.jar
    And into the manifest for the J3D .jar:
    Manifest-Version: 1.0
    Implementation-Version: 1.3
    Specification-Version: 1.3
    Extension-Installation: "java3d-1_3-windows-i586-directx-rt.exe"
    Extension-Name: javax.media.j3d
    Implementation-Vendor-Id: com.sun
    Implementation-Vendor: Sun Microsystems, Inc
    Specification-Vendor: Sun Microsystems, Inc

    I have seen that bug, and the problem I'm having seems to be different than it. The extension installer is in the first extension .jar my applet asks for, and it
    never works automatically, regardless of how many times the applet is loaded.
    The second .jar, which doesn't have to run any installer, always works fine, but the first one will never work (a manual install of the Java3D runtime is required). This seems to not be the behavior described in the bug.
    I will continue to search for an answer to this problem, and of course if I should find anything I'll post it here.

  • Problem may be with saaj.jar and AXIS,WAS,WSAD

    Hi,
    I have successfully developed and deployed an EJB using WSAD 5.1.2's WebSphere 5.0 Test Environment. I have even able to access the EJB using UTC(Universal Test Client) in WSAD and by launching the j2ee client module using
    WebSphere lauchClient program.
    Basically I have below directory structure:
    a.ear
    --|-----axis.war
    -----------|------ lib
    --------------------|--- all axis related jars are here
    --|-----demoEjb.jar (has java jar dependencies set to axis.war\lib jars
    I have now exposed this ejb as web service using AXIS 1.2 RC2 deployed as web module inside WSAD. This web service is properly exposed as web service as I can see it and access its wsdl when I access axis web services.
    Now I have written a standalone-outside-wsad web service client that uses AXIS stubs and when I try to consume to this ejb web service I am getting below error.
    AxisFault
    faultCode: {http://xml.apache.org/axis/}HTTP
    faultSubcode:
    faultString: (500)Internal Server Error
    faultActor:
    faultNode:
    faultDetail:
    {}:return code: 500
    Error 500: class org.apache.axis.SOAPPart does not implement interface org.w3c.dom.Document
    {http://xml.apache.org/axis/}HttpErrorCode:500
    (500)Internal Server Error
    at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:663)
    at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:94)
    at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
    at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
    at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
    at org.apache.axis.client.AxisClient.invoke(AxisClient.java:147)
    at org.apache.axis.client.Call.invokeEngine(Call.java:2719)
    at org.apache.axis.client.Call.invoke(Call.java:2702)
    at org.apache.axis.client.Call.invoke(Call.java:2378)
    at org.apache.axis.client.Call.invoke(Call.java:2301)
    at org.apache.axis.client.Call.invoke(Call.java:1758)
    at com.sosnoski.test.DemoBindingStub.getAccountHistory(DemoBindingStub.java:194)
    at com.sosnoski.test.Client.query(Client.java:63)
    at com.sosnoski.test.Client.main(Client.java:100)
    I read somewhere with axis mailing lists that it is problem related to axis's saaj.jar and wsad's websphere 5.0
    test environment's webservices.jar so I even replaced my wsad installation's D:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v5\lib\webservices.jar with
    saaj.jar but this did not help and even I have added an references to saaj.jar usign wsad's websphere 5.0 test environment
    environment tab->ws.ext.dirs property and even this did not help.
    Can anyone please tell me why is error occurring and how to solve it ?
    Thanks & Regards,
    Kumar.

    Yes :-)
    At the ear level, set the Classloader mode to PARENT_FIRST and WAR classloader policy to APPLICATION. At the axis web module level, set the Classloader mode to PARENT_LAST
    We can colloborate to our future efforts if you can please give your active personal id from which you can respond faster for queries ....

  • Javascript: copy an object to a new layer and tracing it

    Hello everybody:
    I'm using Illustrator CS5 on Mac. I need to copy an objecto to a new layer and tracing it. I'm trying to execute the script above. There is no problem with the copy to a new layer, but Illustrator returns the error "newItem.trace is not a function". Sorry because this is my first script and i'm lost.
    Thank you in advance.
        var myDoc = app.activeDocument;
        var sel = myDoc.selection[0];
      if ( myDoc.selection.length > 0 ) {
        var newLayer = myDoc.layers.add();
        var newItem = sel.duplicate( newLayer, ElementPlacement.PLACEATEND );
        var myTrace = newitem.trace();
        var myOpts = myTrace.tracing.tracingOptions;
        myOpts.tracingModeType = 'TRACINGMODEBLACKANDWHITE';
        app.redraw();
        myTrace.tracing.expandTracing();

    Hi Jose, if your selection is other than PlacedItems or RasterItems, you have to rasterize it first.

  • Deactivating Logging and Tracing

    Deactivating logging and tracing for single Interface in XI Box
    Could some one guide me on this.
    We have an Interface in which the log file generated due to XSLT Mapping+ Value Mapping is of huge size. So we want to deactivate the logging and tracing of the same.
    Regards
    Abhishek Mahajan

    If you want to change the Trace for value mappings then there is an option for it in Visual Admin....but again it will disable the Trace for all value mappings.....
    http://help.sap.com/saphelp_nw04/helpdata/en/42/52f7415e639c39e10000000a155106/content.htm
    From the link:
    In addition, value mappings can be traced (log configuration XIRUN.com.sap.aii.ibrun.server.valueMapping)
    so just check it out if you can change the above field to disable Trace....
    Regards,
    Abhishek.

  • Load Jar and access a class in jar at run time

    I need help from you.
    How to load a Jar and access a class in the jar at run time?
    When i try the following code it works fine while running in Java (Jdk1.5).If iam running the same code in servlet,ClassCastException occurs.
    Error Message : ClassCastExcption : jartest1 cannot be cast to Thing
    test.jar contains jartest.class and Thing.class
    jartest1.java
    try{
    File file =new File("test.jar");
    String lcStr ="jartest";
    URL jfile = new URL("jar", "", "file:" + file.getAbsolutePath() +"!/");
    URLClassLoader cl = URLClassLoader.newInstance(new URL[] { jfile });
    Class loadedClass = cl.loadClass(lcStr);
    Thing t=(Thing)loadedClass.newInstance();
    t.execute();
    catch(Exception e)
    System.err.println(e);
    Thing.java
    public interface Thing
    void execute();
    jartest.java
    public class jartest implements Thing
    public void exceute()
    System.out.println("Welcome");
    Thanks and Regards
    V.Senthil Kumar
    Edited by: senthilv_sun on Dec 16, 2008 8:30 PM

    senthilv_sun wrote:
    I need help from you.
    How to load a Jar and access a class in the jar at run time?
    When i try the following code it works fine while running in Java (Jdk1.5).If iam running the same code in servlet,ClassCastException occurs.
    Error Message : ClassCastExcption : jartest1 cannot be cast to ThingPresumably we can only hope that that is a transciption error. It always helps to use copy and past actual errors and code rather than manually typing them.
    test.jar contains jartest.class and Thing.classWrong.
    The interface class and plugable class must not be in the same jar.
    A plugable interface requires two components
    - Interface (generic sense)
    - Functional components.
    The Interface must be independant (own jar) so that it is available to the framework (user of plugin) and to the functional components. And the plugable component must not be on the java class path.
    This also means that we know for certain that the plugable component is also on the system class path. That is a bad idea as well.
    Given that it is pretty pointless to even speculate as to why this error is showing up. Create the correct jar layout. Test using the command line. Then test using servlets. Insure that the plugable jar is NOT on the java classpath for both tests.

  • Java - referencing external jar and class files

    When compiling (loadjava) a Java class, how can an externally referenced '.jar file' be resolved please? Using '-resolve' doesn't do the job in this case.
    Many thanks.

    I think I've seen an option for this with manifest files (or was it something that had to do with the java plug-in). There was something about the version and only download a new version if it was newer than the one on your local computer. This version thing is something you define in the manifest file at least. Take a look at jar and manifest files, there might be something there.

  • Standard.jar and jstl.jar directory

    First off I probably should apologize in advance because my problem might be an eclipse config issue.
    I created a simple servlet and I tried to include a jstl library import javax.servlet.jsp.jstl.sql.Result;. It compiled cleanly but, when I ran the application (through a browser accessing tomcat through eclipse) I was getting this error...
    The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application
    I eventually found out what was wrong but I don't understand why it was wrong and that's my question. Originally I had jstl.jar and standard.jar in the projectHome/lib directory. When I moved those 2 files to the projectHome]/WEB-INF/lib directory, however, things ran correctly. Is this a setting somewhere within my tomcat config on eclipse perhaps? Or can someone point me in the right direction about this issue in general?
    Thanks in advance!

    Tomcat and Eclipse have different ideas of classpath.
    In Eclipse you set the classpath as part of the project properties: Java Build Path.
    Tomcat uses:
    - web-inf/classes directory
    - jar files in web-inf/lib
    - jar files in /shared/lib
    - jar files in /common/lib
    So in order to run on Tomcat, they need to be in the web-inf/lib directory.
    Cheers,
    evnafets

  • Ears, wars, support jars, and CLASSPATH

    I am trying to migrate an application from WLS 5.1 to 6.1. There are 25
    EJB jars with an equal number of support jars, most of which are referenced
    by multiple EJBs. There are also a large number of jsps, and html pages.
    I have tried packaging an ear that contains the 25 ejb jars, a war file
    containing the web pages. I have attempted to include the support jars in
    the ear as well.
    In all attempts, the only way I get class references sastisfied is to
    include all the jars on the system CLASSPATH. But this defeats the purpose
    of packaging, since none of the components referenced in the system
    CLASSPATH will be re-deployable.
    The online documents refer to separate class loaders and classpaths for the
    war and ejbs, but no detail as to how classes are found by the loaders.
    Unless I put all the jars into the CLASSPATH, jsp pages cannot reference the
    EJBs, and EJBs are unable to reference other EJBs.

    Thanks,
    Now if I could just get Webgain Visual Cafe to allow me to include the
    Classpath entries in the generated manifests for the EJB jars.
    "Gregory Gerard" <[email protected]> wrote in message
    news:3ba24da1$[email protected]..
    You need to mangle all the Manifest files within the EAR and EJB-JARs and
    WAR to get the right thing to happen. Check out this PDF on Sun's site:
    http://java.sun.com/j2ee/j2ee-1_3-pfd4-spec.pdf
    section 8.1.1.2
    I don't entirely understand all the restrictions and formatting -- Ihaven't
    found an example ear file out there that implements a non-trivial case.
    greg
    "Carl Lawstuen" <[email protected]> wrote in message
    news:3ba21d8e$[email protected]..
    I am trying to migrate an application from WLS 5.1 to 6.1. There are
    25
    EJB jars with an equal number of support jars, most of which arereferenced
    by multiple EJBs. There are also a large number of jsps, and htmlpages.
    I have tried packaging an ear that contains the 25 ejb jars, a war file
    containing the web pages. I have attempted to include the support jarsin
    the ear as well.
    In all attempts, the only way I get class references sastisfied is to
    include all the jars on the system CLASSPATH. But this defeats thepurpose
    of packaging, since none of the components referenced in the system
    CLASSPATH will be re-deployable.
    The online documents refer to separate class loaders and classpaths forthe
    war and ejbs, but no detail as to how classes are found by the loaders.
    Unless I put all the jars into the CLASSPATH, jsp pages cannot referencethe
    EJBs, and EJBs are unable to reference other EJBs.

  • Jars and classpath

    Hi All,
    I have a command line program which access database and somehow connects to a servlet running in Tomcat.
    Originally, the root directory has 2 sub-directories: the classes and the lib. The classes directory contains config files, like database name, port no... The lib dir contains all the jar files needed by my program to run.
    Honestly, it run using: java -cp /path/to/dir/jar1.jar;/path/to/dir/jar2.jar,....
    But the program uses many jar files, more or less 20 jar files, and many config files. And Its not convenient to run the program using the command above.
    So, I made a manifest file, manifest.mnf, and saved it under the classes dir:
    Manifest-Version: 1.0
    Main-Class: ManualSend
    Class-Path: ..\lib\bsiclient.jar
    ..\lib\msh.jar
    ..\classes\dbojects.properties
    ..\classes\config.xml
    ..\classes\jndi.properties
    ..\classes\log4j.properties
    ..\classes\msh_client.properties.xml
    ..\classes\sql.properties
    ..\lib\activation.jar
    ..\lib\avalon-framework-4.1.4.jar
    ..\lib\batik.jar
    ..\lib\bsi.jar
    ..\lib\bcmail-jdk13-115.jar
    ..\lib\commons-beanutils.jar
    ..\lib\commons-codec-1.2.jar
    ..\lib\commons-collections-3.1.jar
    ..\lib\commons-logging.jar
    ..\lib\commons-configuration-1.0.jar
    ..\lib\commons-digester.jar
    ..\lib\commons-lang-2.0.jar
    ..\lib\cos.jar lib\dom.jar
    ....etc.
    The ManualSend class is in bsiclient.jar. It used the default package.
    I run it in classes dir: jar -cvfm test.jar
    java -jar test.jar
    I got an error, saying:
    Error in building: \classes\test.jar!\msh_client.properties.xml (The filename, directory name, or volume label sntax is incorrect).
    I can't figure it out, so for the meantime, i just changed the '..\classes\' part of my manifest to '.\'
    I'm not happy with that. I want it to run from my root directory, using /lib and /classes subdirectories.
    Is there a way to do that? Really i'm confused with these classpath thing.
    Please, any comments, opinions, suggestions.... even violent reactions are greatly appreciated. I haven't received any feedbacks with any of my previous post in all of forums.
    Thanks,

    thanks Peter,
    I've attempted that approach before. But as i've said my program needs a lot of jar files, plus a number of config files. If i write them on one single Class-Path line, i got an error saying 'commands too long lines', or something like that.
    The manifest works fine. I am able to run the program using that manifest. But I'm not happy with that. Actually the program was based on a Tomcat webapp. I am actually doing a command-line version of it.
    So it Tomcat WEB-INF, classes and lib directories were separated. I am looking for a way to use these 2 separate directories. What I would like to find out is how to run my program, outside of the WEB-INF classes and lib directories, and at the same time could access all the jars and config files in them.
    As of the moment I had no luck of doing that. I had to run the program inside classes folder, and make a copy of lib folder inside the classes folder.
    Do you have any more suggestions, opinions? Please.

Maybe you are looking for

  • Difference between NULL and INITIAL

    Hi All,        I just wanted to know that if we have a statement such as 'IF VBAP-KWMENG IS INITIAL' or 'IF VBAP-KWMENG IS NULL' what is teh exact difference and where are they used. Is it that null is used for CHARACTER fields? TIA

  • Link to content submission is not working

    I am unable to access the article submission link.  Following is the path that I am trying Clicked on "How to Contribute" link at the top of SDN home page.  Scrolled down to the section "ARTICLES, TUTORIALS, WHITE PAPERS AND RICH MEDIA" and then clic

  • Error while using RSCRM_BAPI with remote cubes

    Hi,    We are getting short dump while trying to use RSCRM_BAPI with hierarchies i.e.display hierarchies to extract data to a flat file. We do get a warning that display hierachies are not longer supported in 2004s with RSCRM_BAPI and have been going

  • Clients disconnecting randoming..

    So as for the network layout we are using two 5508 controllers running 7.1.19 code currently with 3502i and 3602i radios. Until yesterday, I had issues with a wireless vendor that wouldn't stay connected on 7.2 code. That vendor is no longer here sin

  • WDA with GP -  Web dyn pro Abap intergration with Guided procedure

    Hi All,       I tried integrating a WDA - Webdynpro ABAP application  in Guided procedure. Though I was able to create a CO - Callable object out of the WDA , I am not able to access the WDA input and output parameters, I just want to know, where am