CLASSPATH and javac

Hi all,
I forgot a lot about Java, and need to relearn a few things. I had a JRE (5.0_06) already installed, and installed the JDK (1.5.0). It seems to me I do not need to use the "old" JRE. Comments? But first things first, I use XP Home SP 2.
I am now doing a Wireless Development Tutorial where I had to install Tomcat. In the tutorial it says I need to set my classpath. It now points to the JRE (.;D:\Program Files\Java\jre1.5.0_06\lib\ext\QTJava.zip). Where should I point it to if I want to use the JDK instead of the JRE? To .;D:\Program Files\Java\jdk1.5.0\lib\ ?
Next, I should be able to compile a simple program. But when I type javac, I get "'javac' is not recognized as an internal or external command". How come?
I sat my JAVA_HOME in the System Properties (Advanced tab, Environmental Variables). I should think that would be enough to let the system find the javac program. The system does not agree with me, so who can enlighten me?
Macamba

Hi all,
I forgot a lot about Java, and need to relearn a few
things. I had a JRE (5.0_06) already installed, and
installed the JDK (1.5.0). It seems to me I do not
need to use the "old" JRE. Comments? But first things
first, I use XP Home SP 2.
I am now doing a Wireless Development Tutorial where
I had to install Tomcat. In the tutorial it says I
need to set my classpath. It now points to the JRE
(.;D:\Program
Files\Java\jre1.5.0_06\lib\ext\QTJava.zip). Where
should I point it to if I want to use the JDK instead
of the JRE? To .;D:\Program Files\Java\jdk1.5.0\lib\
I, personally, do not set the CLASSPATH environment variable. I use the -cp option with the command line tools.
Next, I should be able to compile a simple program.
But when I type javac, I get "'javac' is not
recognized as an internal or external command". How
come?The is a PATH issue. In you system path, you need an entry that points to your <JDK INSTALL DIR>\bin folder.
Also, with the JDK, the JRE is bundled under the <JDK Install Dir>\jre folder.
I sat my JAVA_HOME in the System Properties (Advanced
tab, Environmental Variables). I should think that
would be enough to let the system find the javac
program. The system does not agree with me, so who
can enlighten me?Again, javac has to be on your system PATH.
>
MacambaThe JAVA_HOME environment variable should point to the <JDK INSTALL DIR>
The CATALINE_HOME should point to the <Tomcat Install Dir>
For Windows:
Configuring the JDK
Configuring Tomcat

Similar Messages

  • Problems in Classpath and Path 's variables setting in Windows XP

    Here is my drive structure in my PC:
    1. hard drive (primary slave, Partition: C and E where E boot Windows XP
    2. Hard drive 2 (Primary Master), Drive letter: D
    Although my default boot directory is E (for strange reason, i like to keep
    that way for now), I installed other programs in C and D drive dues drive
    space factors.
    So My java sdk1.4.2_02 has been installed in C:\Java_home directory, the
    following is my Classpath and Path values:
    (CLASSPATH Variables)
    Classpath=.;
    c:\java_home\j2sdk1.4.2_02;
    e:\Program Files\java\j2re1.4.2_02;c:\java_home; c:\java_home\j2sdk1.4.2_01
    \lib;e:\Program Files\java; e:\Program Files\java web start;c:\java_home\j2
    sdk1.4.2_02\jre\lib;c:\java_home\java\petstore1.3.2\src\lib\jst1;
    (PATH variables)
    c:\java_home\j2sdk1.4.2_01\bin;C:\java_home;e:\Pr
    ogram Files\java;c:\java_home\jdk1.4.2_2\bin;E:\Program Files\Oracle\jre\1.
    1.8\bin;E:\WINDOWS\system32;E:\WINDOWS;E:\WINDOWS\system32\WBEM;E:\
    Program Files\Support Tools\;
    PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
    Path=D:\oracle\ora92\bin;E:\Program Files\Oracle\jre\1.3.1\bin;
    My Fruit txt and Fruit.java file is located in my c:\java_home folder
    when I try to compile the my file as <c:\java_home\javadoc Fruit.java), it
    gives me the error message<'javac' is not recognized as an internal or
    external command,operable program or batch file.>
    however, I can compile the Fruit file from C:\java_home\jdk1.4.2_2
    \bin\javadoc Fruit.java; with out any problem of course I have to copy the
    Fruit.java file at the C:\java_home\jdk1.4.2_2\bin\javadoc Fruit.java
    folder.
    I am requesting u please help or advise me to correct my mistakes
    Ely
    [email protected]

    I must confess that I am totally unable to understand what your PATH is set to. The error that you see,
    <'javac' is not recognized as an internal or external command,operable program or batch file.>
    is due to a missing or incorrectly set PATH. It is used by Windows to find executable file (like javac.exe) that you have added to the computer. Item #5 on this page gives you instructions on how to set it: http://java.sun.com/j2se/1.4.2/install-windows.html
    As for the setting of the CLASSPATH, you seem to have a number of different versions of java (1.4.2_02, 1.4.2_01, 1.4.2_2, and 1.1.8) and I doubt that these are all valid. You are also using an unusual syntax C:\java_home\jdk1.4.2_2\bin\javadoc Fruit.java and I wonder if that is really C:\java_home\jdk1.4.2_2\bin\javadoc\Fruit.java? I think the best action is to point you to Sun's instructions and information about setting and using the CLASSPATH.
    The CLASSPATH is a set of pointers that is used by Java to find the files that YOU (not Java) create and want compiled and/or run.
    Setting the Classpath:
    http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/classpath.html
    [NOTE: always start your classpath with ".;" which means the current directory. See my classpath, below]
    How Classes are Found:
    http://java.sun.com/j2se/1.4.2/docs/tooldocs/findingclasses.html
    Examples:
    This is my path
    PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;C:\BATCH;C:\J2SDK1.4.2_01\BIN;C:\PROGRA~1\UTILIT~1;C:\PROGRA~1\WIN98RK
    This is my classpath
    CLASSPATH=.;C:\mjava;C:\mnrx;C:\NetRexx\lib\NetRexxC.jar;C:\j2sdk1.4.2_01\lib\tools.jar;C:\NetRexx\NrxRedBk

  • CLASSPATH and JAVA_HOME commands (variables) aren't recognized by DOS

    My command prompt doesn't recognize neither CLASSPATH nor JAVA_HOME commands...I've already set the path variable "C:\WINDOWS\System32;C:\Programs\Java\jdk1.6.0\bin", but when i'm going to set the classpath and java_home variables it says that they are not recognized as an intern or extern command etc...
    Could anyone please help me?
    (I'm portuguese; sorry for my english...)

    you don't need to set CLASSPATH. you should learn to use -classpath option on javac.exe and java.exe when you compile and run in a command shell.
    if your PATH points to Java's /bin, you probably don't need to do anything else.
    the right way to set environment variables in Windows XP is in the control panel.
    if you want to set them just for one shell, and have them disappear when the shell is closed, you type "set JAVA_HOME=...." and "set CLASSPATH=...".
    You'll find out quickly that CLASSPATH environment variables are ignored by javac.exe, java.exe, every IDE, and every Java EE app server. You have to learn how each one sets CLASSPATH.
    %

  • Java works, but jar and javac don't

    java at the command line works, but jar and javac don't
    could it be the CLASSPATH
    I'm running Windows if that helps. If you need more info ask away
    Thanks
    CINC

    Definitely sounds like the classpath problem. From the sounds of the error message, you are using win95/98/ME, and so the best way to get around this is to set the classpath in your autoexec.bat file. I think the problem is because you have to set 2 variables in your path, one for the running of the java (JRE) and one for the tools to process the uncompiled files (SDK);
    rightclick on your autoexec.bat and select Edit
    here is my path, change yours accordingly so the paths lead to your windows, command and bin directories accordingly.
    PATH=D:\WINDOWS;D:\WINDOWS\COMMAND;D:\PROGRAM FILES\JAVASOFT\J2SDK1.4\BIN
    SET CLASSPATH=.;D:\PROGRAM FILES\JAVASOFT\J2SDK1.4\BIN\TOOLS.JAR
    Theres a section on setting classpath in This site at :
    java.sun.com/j2se/1.3/docs/tooldocs/win32/classpath.html
    and if that doesn't work, then i recommend you download and IDE which sorts ou most of these problems for you, and makes programming much easier also :)
    anything from:
    Suns Forte
    Jcreator
    Jbuilder
    to a real heavyweight which i use and find indispensible called Visual Age for Java, which is so powerful, but not for the faint hearted or weak-computered. :P
    Good Luck
    Benji

  • Java and javac fullpath

    For a class I'm in we're creating a program that lets you compile a java program. It uses the full path name. ie
    javac <pathname>/file.java
    This works but when I change it to run it
    java <pathname>/file
    It doesn't like it and I get a Exception in thread "main" java.lang.NoClassDefFoundError:. I know it exists because when I remove the pathname it works and I know I'm not making a mistake like putting .java or .class at the end.
    Is there some option that would allow the java command to accept full path name (I tried this on my personal computer, which is linux, and connected to my school's unix system with both the same result). Or is there some way to get the program to point to the right directory so all I have to do is put java file. If I figure out a solution to the problem I'll type it here but I'm not sure if I will.
    Thanks

    Either
    1) Make sure that there is no permanent CLASSPATH environment variable set and execute the java command from the directory that contains the .class file, or
    2) Use the command java -cp . <yourClass> from the directory that contains your .class file.
    (be sure to type the period and spaces), or
    3) Set a permanent CLASSPATH
    Read these topics to understand classpath and prevent further problems of this kind:
    Setting the Classpath, and
    How Classes are Found
    on http://java.sun.com/j2se/1.4.2/docs/tooldocs/tools.html

  • JDBC OSX 10.4 classpath and xcode

    Here is my classpath
    echo $CLASSPATH
    /Users/m3the01/oracle/jdbc/lib/classes111.zip:/Users/m3the01/oracle/jdbc/lib/nls_charset11.zip
    Im getting the oracle.jdbc.driver.oracledriver error
    Any tips on adding the drivers to xcode would also be appreciated.
    I attempt to build by
    javac -classpath $CLASSPATH *.java
    java mainapp
    Than i get the noted error from the call
    try{
         Class.forName("oracle.jdbc.driver.OracleDriver");     
    }catch(ClassNotFoundException e){
                   JOptionPane.showMessageDialog(null, "DatabaseConnectionManager:OracleDriverCheck:\nError: " + e.getMessage(),
                                                      "Error", JOptionPane.ERROR_MESSAGE);
              }

    Please not i can resolve all these issues if i place the two files in
    /System/Library/Java/Extensions/
    folder
    Everything in xcode and through javac terminal compiling and execution works perfectly.
    However i understand this is not the correct method and would really like to get the classpath method working in both xcode and javac terminal comping on mac os 10.4
    thanks

  • Setting Classpath and Path on Windows ME

    Hi..How do I set up the classpath and path on windows ME. Do I use DOS or run the autoexec.bat from windows directly. I have jdk1.3.1 abd my classpath and path are:
    set classpath="C:\jdk1.3.1\bin"
    set PATH=C:\windows\xxxx\;C:\jdk1.3.1\bin
    I sometimes can't compile my programs from other directories other than jdk1.3.1\bin. Why? Is there a way I can compile my program just from the C:\ directory like:
    C:\javac myprogram.java
    C:\java myprogram
    Thanks.

    If you put . in the beginning of your classpath, java always searches the folder you are currently in.
    Now to set the classpath try clicking from the startmenu:
    settings/control panel/system. Then click advanced tab and then the Enviroment variables. I'm on win2000 but I think it should be the same on ME.
    Make sure it starts with .;C:\jdk1.3.1\bin;....
    I think installing jdk puts in the essentials, but if you have certain folders you store your classes in you can stick those in there as well.
    If you hava more questions about this, I suggest searching these forums on Keywords like : "set CLASSPATH PATH". Then you'll find a bunch of threads solving this problem.
    Sjur

  • Classpath and sourcepath

    Dear Sirs;
    I have been having problems with the classpath and sourcepath commands. I am using a Windows NT system. The Sun Certified Programmer for Java 2 stated that the information on setting up the environment would be in the main directory for Java. I have not found this to be the case. I cann't set either of the variable from the control panel. I have been able to key in the following;
    Javac directory\program.java
    This places the class in the same directory.
    Any information you can provide is greatly appreciated.
    Thanks

    Source path is where you're editor/compiler will look for your files to edit/compileNo.
    'sourcepath' is a command line option for javac.
    I remember that it was rather quirky. But its purpose seems to be to allow the dependency checker in the compiler to find other java files that are not in the same package as the compiled code. And compile them if needed.
    I finally decided that it was just easier to handle my own dependencies via make.

  • Java_home, classpath and swing clases

    hello,
    what is the difference between the classpath and java_home enviroment variables
    ref:
    http://java.sun.com/j2se/1.4.1/docs/tooldocs/windows/jdkfiles.html
    also, are the swing classes in the src.zip folder used at compile time when build a swing-based gui ?

    The Classpath is used by the javac.exe and java.exe programs to find classes. If there is no system Classpath, you get a default Classpath of . (the current directory) I don't use java_home so I can't much speak to that. It might be required for some operating systems, but I have only seen it used as a convenience - instead of typing in c:\j2sdk1.4_01\ you just type %JAVA_HOME%
    The src.zip is the source code for the standard java classes. These are not used at compile time. The swing classes are in dt.jar I think.

  • How to set classpath and server configuration in eclipse

    i am new to eclipse tool pls anyone tell me to set classpath and serverconfiguration (tomcat) and sample program

    Get WTP [1], install it [2] and checkout one of the lot Eclipse WTP tutorials [3].
    [1] http://www.eclipse.org/webtools/
    [2] http://ftp.osuosl.org/pub/eclipse/technology/phoenix/demos/install-wtp/install-wtp.html
    [3] http://www.eclipse.org/webtools/community/tutorials/BuildJ2EEWebApp/BuildJ2EEWebApp.html

  • Classpath and manifest.mf

    what is the difference between classpath, buildpath and a Manifest.mf paths?
    I believe class path is used at run time to look for the classes referred in this path.
    Build path is used to build the application i.e. to link the components used while compiling and building classes.
    Manifest.MF is also used for runtime resolution.
    What different purpose did classpath and manifest.mf serve?

    If I understand you correctly, this is more of a general Java Question then a Java Servlet Question... but anyway...
    The manifest.mf is defined for JARs. Your system CLASSPATH, and the classpath set on the command line are ignored for JARs, and only the CLASSPATH set in the manifest is used.
    When running applications outside of JARs, then the system/command line CLASSPATH is used.
    When running a web application inside a WAR, the server has its own classpath which will override that of the manifest and the system CLASSPATH.

  • Classpath and hash Character (#)

    Hi,
    I have some jar files in my java classpath and it looks as if the JVM does not manage to find them when the jar file path contains a hash character (#) (java.lang.NoClassDefFoundError Exception is raised)
    I haven't found anything about this in docs.
    Can anyone help me ?
    Thanks
    Michel

    Maybe not.
    However, once I do not need these classes which are stored in a file path with a hash character, everything works fine.
    You can experiment by yourself following this basic scenario:
    1) store your famous HelloWord.class in a directory containing a hash Character (e.g. C:\tmp\te#st )
    2) run your jvm as follows: java -classpath C:\tmp\te#st HelloWord
    3) you should see the message
    "Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld"
    if not, tell me. I am completely wrong.
    PS: Enviromment: WindowNT, sdk 1.4.0 or sdk 1.3.1
    Michel

  • Classpath and property problem in services

    Hi, all,
    I've had a number of problems getting the Stockquote example to run properly. This seems to be due to a problem that services don't get either classpaths or properties when they start.
    The first manifestation of this problem came when the proxySet, proxyHost, and proxyPort environment variables weren't getting set properly in class services.stockquote.Stockquote. The symptom was that url.openStream () timed out because the proxy was not set correctly.
    The second symptom comes when"JavaPort" is used as the port on the client. Despite every attempt I've made to put services.stockquote.Stockquote on the classpath, URLClassLoader will not find this class. However, a call to Class.forName("services.stockquote.Stockquote") in Main.java, just before the bottom of the stack, works! It works in both the client and the server!
    So, could someone please tell me why the classpath and properties are getting shucked, and how to get them right?
    I'm on Windows 2000 :p using JDK 1.3.1 and Tomcat 4.0.
    Thanks,
    - Steve.

    Vivek, I think this belongs in a different thread. Also you'll need to say what problems you're having.
    The only thing that definitely needs to be changed about the example is that the service may fail if it's run behind a proxy server. You'll need to set the following System properties:
    System.setProperty("proxySet", "true");
    System.setProperty("proxyHost", "your.proxy.com");
    System.setProperty("proxyPort", <your proxy port>");
    If this isn't done you'll get an exception like the following:
    Exception in thread "main" com.ibm.wsif.WSIFException: SOAP Fault:SOAP-ENV:Server Exception from service object: Operation timed out: connect
    -S.

  • Custom classpath and custom jar entry in R12

    Hi all,
    I have created the custom classpath and custom jar file for isrore process. I had put custom jar and custom class entry in orien_application.xml file. But it was working on R12 at doveloper mode. It will creates the classes for custom jsp file using custom import class or custom jar. But once i revert back the devloper mode means it won't work.
    Could you please help..

    Oracle apps R12 - Compiling JSP with custom classpath
    We all know that to compile JSP manually on the Oracle Application R12 instance, we need to run the file $FND_TOP/patch/115/bin/ojspCompile.pl.
    Its help is as follows:
    syntax: ./ojspCompile.pl COMMAND {ARGS}
    COMMAND --compile               update dependency, compile delta
    --create                rebuild entire dependency file
    -delta.out update dependency, list delta to file
    -dep.out update dependency, output heirarchy to file
    ARGS -s matching condition for JSPs filenames
    -p number of parallel compilations
    -log to override logfile from ojspCompile.conf
    You are
    recommended to set the log file location
    outside of any network file system shared (NFS) area/drive.
    -conf to override ojspCompile.conf
    --retry         retry previously failed compilation attempts
    --flush         forces recompilation of all parent JSPs
    --quiet         do not provide an actively running progress meter
    --fast          instantly fail jsps that are possibly invalid
    example1: ojspCompile.pl compile -s 'jtf%' -p 20 retry
    example2: ojspCompile.pl compile -s 'jtflogin.jsp,jtfavald.jsp' flush
    example3: ojspCompile.pl compile fast --quiet
    If your JSP uses custom classes, then compiling jsp manually can fail if proper classpath is not set. Yes, even though if you have setup the classpath correctly in orion-application.xml, it will fail because this jsp compile utility does not read orion-application.xml classpath.
    So, the problem is to identify where to set the classpath so that above utility can pick it up. After several search and looking into code, I found following:
    By default, the jsp compiler script uses following configuration file
    $INST_TOP/appl/admin/ojspCompile.conf
    This conf file has a classpath field in it which is usually pointed to file
    $INST_TOP/appl/admin/ojspCompile.properties
    This property file lists the classpath used for JSP compilation.
    So if your classes are not listed in this file, your jsps will not compile by ojspCompile.
    Ofcourse, you can always set the "main_mode" to "recompile" in orion-web.xml, but that for production you do not want to change it and compile the JSP on file deployment.
    References:
    458338.1 How to Enable Automatic Compilation of JSP pages in R12 Environment
    433386.1 JSP Pages Hanging in R12 After Removing Cached Class Files in _pages
    783094.1 Compile jsp files at Application R12 at Windows

  • WebLogic 11g EAR EJB Classpath and class loaders

    All,
    I have been having issues migrating Spring based EJB applications from OC4J to WebLogic 11g (10.3.1). I have been in communication with Oracle who has suggested a work around however I am keen to see if anyone else can suggest a solution.
    The application is dependant on stateless session EJB beans that communicate with a Spring managed service tier to perform the business logic and database access. PitchFork is used to inject the Spring managers into the EJB’s using the spring-ejb-jar.xml configuration file. Note originally I was using the SpringBeanAutowiringInterceptor however I could not get this to work. See WebLogic 11g and Spring beens injected into EJB for details.
    When the application is deployed packaging all the dependant jars within the APP-INF\lib folder I get a verity of errors from the following InvalidClassException, NoSuchMethodError, AbstractMethodError and IllegalArgumentException. I am using Spring 2.5.3 to match the supported WebLogic version. Note within the EAR application.xml the library-directory is set to APP-INF/lib. The issue appears to be Spring, PitchFork, commons-logging and aspectj libraries are being loaded form WebLogic and do not have visibility on jars within the application or have been modified when bundled for WebLogic. An example of this is the PitchFork jar within WebLogic has been changed excluding the spi package resulting in java.lang.ClassNotFoundException: org.springframework.jee.spi.PitchforkUtilsImpl errors.
    Moving the jars to the domain library path does not resolve any of the issues. I have been unable to successfully deploy the application picking up the application jars using the prefer-application-packages configuration.
    Oracle has advised me to deploy the libraries into the WebLogic system classpath by modifying the startWebLogic command to load the libraries into the classpath. I am concerned that modifying the system classpath will result in an unstable WebLogic server as I will be replacing modified jar files packages with WebLogic (such as PitchFork). This will also limit the applications that can be deployed within the server as each application must use the same libraries and versions (as the application ibraries are leing ignored).
    Has anyone else hit this issue and corrected it? Can anyone think of an alternative solution?
    Regards
    Neil

    Hi,
    I am in the process of updating the tracking bug# 331569 with copies of the eclipse EAR/WAR projects and the EAR for these scenarios. Here are some details on how I got past the 2nd CCE on the org.eclipse.persistence.jpa.PersistenceProvider class (not the javax one)
    https://bugs.eclipse.org/bugs/show_bug.cgi?id=331569
    Essentially an SE persistence unit running both JPA 2.0 api and the 2.0 XSD schema work fine. I will next retest the EE case with variations of the 3 types of injection on the SSB or Servlet.
    Update: There are 3 (possibly 4) issues here (all of these may become obsolete when the next WLS version ships)Initially I got the same 2.0 schema error and the ClassCastException on org.eclipse.persistence.jpa.PersistenceProvider
    It turns out that my import of the 2 eclipse projects from my bug # 296271 for WebLogic 10.3.2.0 lost their facets(specifically the dynamic web facet) because I associated them with a different WebLogic 10.3.3.0. - this caused the CCE I was experiencing like Sri.
    Anyways, after creating an EAR/Web project combination from scratch in eclipse associated with the 10.3.3.0 instance - I predeployed/deployed/ran fine - even with the 2.0 schema - in SE bootstrap mode (no EE yet).
    Reproduction Procedure:
    redoing project from scratch as I noticed that the war was not at the root of the ear - it was a jar in the app-inf/lib dir - my imported eclipse project was not referenced correctly as a web module facet- create empty EAR and WAR project with references
    - download and open my EAR and WAR project code from bug # 296271
    https://bugs.eclipse.org/bugs/show_bug.cgi?id=296271
    - do essentially all the steps in the page below (I paraphrase for re-verification)
    http://wiki.eclipse.org/EclipseLink/Development/JPA_2.0/weblogic#DI_1.1:_Alternative_3:_Application_Level_Shared_Library_-InUse
    - copy applicationService, entity and FrontController servlet code into new projects
    - create persistence.xml and MANIFEST.MF manifest in src\META-INF
    - update manifest
    Class-Path: APP-INF/lib/eclipselink.jar
    APP-INF/lib/javax.persistence_2.0.0.v200911041116.jar
    - copy both javax.persistence 2.0 and eclipselink 2.x jars to APP-INF/lib
    - change ordering of WebLogic library modules classpath reference (javax.persistence 1.0) to ear reference (2.0 version)
    - update web.xml with servlet tags
    - update weblogic.xml with new context root
    - make the persistence unit name the same in persistence.xml and ApplicationManagedService
    - update weblogic-application.xml with prefer-application-packages overrides
    <wls:prefer-application-packages>
    <wls:package-name>javax.persistence.*</wls:package-name>
    <wls:package-name>org.eclipse.persistence.*</wls:package-name>
    </wls:prefer-application-packages>
    - enable server redirect logging
    <!-- new for 10.3.3.0 http://wiki.eclipse.org/EclipseLink/Examples/JPA/Logging#Server_Logging -->
    <property name="eclipselink.logging.logger" value="DefaultLogger"/>
    - start WebLogic 10.3.3.0
    - deploy (run on) server from eclipse or export ear to auto deploy directory
    1) JPA 2.0 XSD usage on 10.3.3.0
    - I reproduced this issue with a bad EAR
    - was able to use the 2.0 schema within the WAR-only application managed EAR
    persistence.xml<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
    <!-- persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"-->
    <persistence-unit name="example2" transaction-type="JTA">
    <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
    <jta-data-source>localJTA</jta-data-source>
    <class>org.eclipse.persistence.example.business.Cell</class>
    <shared-cache-mode>NONE</shared-cache-mode>
    <properties>
    <property name="eclipselink.target-server" value="WebLogic_10"/>
    <property name="eclipselink.logging.level" value="FINEST"/>
    <property name="eclipselink.target-database" value="Derby"/>
    <!-- new for 10.3.3.0 http://wiki.eclipse.org/EclipseLink/Examples/JPA/Logging#Server_Logging -->
    <property name="eclipselink.logging.logger" value="DefaultLogger"/>
    <!-- property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.ClientDriver"/>
    <property name="javax.persistence.jdbc.url" value="jdbc:derby://127.0.0.1:1527/dataparallel;create=true"/>
    <property name="javax.persistence.jdbc.user" value="APP"/>
    <property name="javax.persistence.jdbc.password" value="APP"/-->
    <!-- turn off DDL generation after the model is stable -->
    <!-- property name="eclipselink.ddl-generation" value="drop-and-create-tables"/>
    <property name="eclipselink.ddl-generation.output-mode" value="both"/-->
    </properties>
    </persistence-unit>
    </persistence>
    2) CCE on JPA provider implementation class
    Error instantiating the Persistence Provider class org.eclipse.persistence.jpa.PersistenceProvider of the PersistenceUnit example2: java.lang.ClassCastException: org.eclipse.persistence.jpa.PersistenceProvider
    - I reproduced and fixed this one (was Eclipse project facet issue) - EAR was wrong
    - was able to run JPA 2.0 code fine on an SE PU (predeploy/deploy together)
    - EE injection should not work but I will post an example EAR anyway
    log[EL Example]: enterprise: JPA 2.0 Metamodel: MetamodelImpl@56287508 [ 3 Types: , 1 ManagedTypes: , 1 EntityTypes: , 0 MappedSuperclassTypes: , 0 EmbeddableTypes: ]
    3) CCE on JPA spec interface class
    - I could not reproduce this one
    Re: WebLogic 11g EAR EJB Classpath and class loaders
    Error processing persistence unit PT of module pt: Error instantiating the Persistence Provider class org.eclipse.persistence.jpa.PersistenceProvider of the PersistenceUnit PT: java.lang.ClassCastException: org.eclipse.persistence.jpa.PersistenceProvider cannot be cast to javax.persistence.spi.PersistenceProvider
    4) CCE on fallback Kodo JPA provider (if an invalid say 2.1 JPA XSD schema is referenced)
    java.lang.ClassCastException: kodo.persistence.PersistenceProviderImpl
    at javax.persistence.Persistence.findAllProviders(Persistence.java:186)
    java.lang.NoSuchMethodError: javax/persistence/EntityManager.getMetamodel()Ljavax/persistence/metamodel/Metamodel;
    - reproduced by using the 1.0 javax.persistence jar (but named as the 2.0 one in APP-INF/lib)
    - fixed by using either the 1.0 or 2.0 JPA XSD schema and using the correct 2.0 spec jar
    thank you
    /michael

Maybe you are looking for

  • Order BY String, not ordering correct alphabetical

    Hey, I have the following query. SELECT TBLREQUESTTYPES.ID, TYPE_NAME, SCHEDULED, CASE WHEN SCHEDULED = 1 THEN 'No' ELSE 'Yes' END AS SCHEDULEDTEXT, DAYS, CASE WHEN SCHEDULED = 1 THEN DAYS ELSE NULL END AS NUMDAYS, CASE WHEN SCHEDULED = 1 THEN 'Unsch

  • JDev 10.1.2 start-up error

    I've just upgraded from JDev 9.0.5.2 and now I have the following error ... Please, explain. Thanks, 12-Jan-2005 9:49:46 AM oracle.bali.xml.grammar.schema.OracleSchemaFactory buildSchemas SEVERE: Errors processing schema:jar:file:/u/local/orajdev/ide

  • Looking for an installation CDROM Windows NT 4.0 Workstation

    Hi, I'm looking for an installation CDROM Windows NT 4.0 Workstation. I have to fix a very old computer, that is running a special software. I found Windows 3.11 and Windows 3.2 in the technet, but not NT4. Can I download it somewhere else? I am part

  • Floating point field

    hi! i have a field from table AUSP-ATFLV (floating point) can i convert the value of the floating point to 'REAL' number, and how do i do it? regards yifat

  • Why is gmail not working when I try to set up in Mail?

    I cannot set up my mail account. i try to set it up but when I enter my information, it says: Logging in to the Gmail IMAP server "imap.gmail.com" failed. Make sure the user name and password you entered are correct, then click Continue. If the infor