Morphing class deprecated??

I have been working with a Morphing example found on the internet (posted below) and when I go to compile the code, I get the following warning:
"javax.media.j3d.Morph in javax.media.j3d has been deprecated"
Java 3D is fully functioning on my pc, so it isn't a case of java3d being missing.
Can anyone help explain? Any help would be greatly appreciated, Thanks.
import java.applet.Applet;
import java.awt.BorderLayout;
import java.awt.GraphicsConfiguration;
import java.util.Enumeration;
import javax.media.j3d.Alpha;
import javax.media.j3d.Appearance;
import javax.media.j3d.Background;
import javax.media.j3d.Behavior;
import javax.media.j3d.BoundingSphere;
import javax.media.j3d.BranchGroup;
import javax.media.j3d.Canvas3D;
import javax.media.j3d.GeometryArray;
import javax.media.j3d.Morph;
import javax.media.j3d.QuadArray;
import javax.media.j3d.Shape3D;
import javax.media.j3d.Transform3D;
import javax.media.j3d.TransformGroup;
import javax.media.j3d.WakeupOnElapsedFrames;
import javax.vecmath.Color3f;
import javax.vecmath.Point3d;
import javax.vecmath.Vector3d;
import com.sun.j3d.utils.applet.MainFrame;
import com.sun.j3d.utils.universe.SimpleUniverse;
public class Pyramid2Cube extends Applet {
  private SimpleUniverse u = null;
  private BranchGroup createSceneGraph() {
    // Create the root of the branch graph
    BranchGroup objRoot = new BranchGroup();
    // Create a Transformgroup to scale all objects so they
    // appear in the scene.
    TransformGroup objScale = new TransformGroup();
    Transform3D t3d = new Transform3D();
    t3d.setScale(0.4);
    objScale.setTransform(t3d);
    objRoot.addChild(objScale);
    // Create a bounds for the background and behavior
    BoundingSphere bounds = new BoundingSphere(new Point3d(0.0, 0.0, 0.0),
        100.0);
    // Set up the background
    Color3f bgColor = new Color3f(0.05f, 0.05f, 0.2f);
    Background bg = new Background(bgColor);
    bg.setApplicationBounds(bounds);
    objScale.addChild(bg);
    // Create the transform group nodes for the 3 original objects
    // and the morphed object. Add them to the root of the
    // branch graph.
    TransformGroup objTrans[] = new TransformGroup[4];
    for (int i = 0; i < 4; i++) {
      objTrans[i] = new TransformGroup();
      objScale.addChild(objTrans);
Transform3D tr = new Transform3D();
Transform3D rotY15 = new Transform3D();
rotY15.rotY(15.0 * Math.PI / 180.0);
objTrans[0].getTransform(tr);
tr.setTranslation(new Vector3d(-3.0, 1.5, -6.5));
tr.mul(rotY15);
objTrans[0].setTransform(tr);
objTrans[1].getTransform(tr);
tr.setTranslation(new Vector3d(0.0, 1.5, -6.5));
tr.mul(rotY15);
objTrans[1].setTransform(tr);
objTrans[2].getTransform(tr);
tr.setTranslation(new Vector3d(3.0, 1.5, -6.5));
tr.mul(rotY15);
objTrans[2].setTransform(tr);
objTrans[3].getTransform(tr);
tr.setTranslation(new Vector3d(0.0, -2.0, -5.0));
tr.mul(rotY15);
objTrans[3].setTransform(tr);
// Now create simple geometries.
QuadArray g[] = new QuadArray[3];
Shape3D shape[] = new Shape3D[3];
for (int i = 0; i < 3; i++) {
g[i] = null;
shape[i] = null;
g[0] = new ColorPyramidUp();
g[1] = new ColorCube();
g[2] = new ColorPyramidDown();
Appearance a = new Appearance();
for (int i = 0; i < 3; i++) {
shape[i] = new Shape3D(g[i], a);
objTrans[i].addChild(shape[i]);
// Create a Morph node, and set the appearance and input geometry
// arrays. Set the Morph node's capability bits to allow the weights
// to be modified at runtime.
Morph morphing = new Morph((GeometryArray[]) g, a);
morphing.setCapability(Morph.ALLOW_WEIGHTS_READ);
morphing.setCapability(Morph.ALLOW_WEIGHTS_WRITE);
objTrans[3].addChild(morphing);
// Now create the Alpha object that controls the speed of the
// morphing operation.
Alpha morphAlpha = new Alpha(-1, Alpha.INCREASING_ENABLE
| Alpha.DECREASING_ENABLE, 0, 0, 4000, 1000, 500, 4000, 1000,
500);
// Finally, create the morphing behavior
MorphingBehavior mBeh = new MorphingBehavior(morphAlpha, morphing);
mBeh.setSchedulingBounds(bounds);
objScale.addChild(mBeh);
return objRoot;
public Pyramid2Cube() {
public void init() {
setLayout(new BorderLayout());
GraphicsConfiguration config = SimpleUniverse
.getPreferredConfiguration();
Canvas3D c = new Canvas3D(config);
add("Center", c);
// Create a simple scene and attach it to the virtual universe
BranchGroup scene = createSceneGraph();
u = new SimpleUniverse(c);
// This will move the ViewPlatform back a bit so the
// objects in the scene can be viewed.
u.getViewingPlatform().setNominalViewingTransform();
u.addBranchGraph(scene);
public void destroy() {
u.cleanup();
public static void main(String[] args) {
new MainFrame(new Pyramid2Cube(), 700, 700);
class ColorPyramidUp extends QuadArray {
private static final float[] verts = {
// front face
1.0f, -1.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, -1.0f,
-1.0f, 1.0f,
// back face
-1.0f, -1.0f, -1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f,
-1.0f, -1.0f,
// right face
1.0f, -1.0f, -1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f,
-1.0f, 1.0f,
// left face
-1.0f, -1.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, -1.0f,
-1.0f, -1.0f,
// top face
0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f,
0.0f,
// bottom face
-1.0f, -1.0f, 1.0f, -1.0f, -1.0f, -1.0f, 1.0f, -1.0f, -1.0f, 1.0f,
-1.0f, 1.0f, };
private static final float[] colors = {
// front face (cyan)
0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f,
1.0f,
// back face (magenta)
1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f,
1.0f,
// right face (yellow)
1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f,
0.0f,
// left face (blue)
0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f,
1.0f,
// top face (green)
0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f,
0.0f,
// bottom face (red)
1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f,
0.0f,
ColorPyramidUp() {
super(24, QuadArray.COORDINATES | QuadArray.COLOR_3);
setCoordinates(0, verts);
setColors(0, colors);
class ColorCube extends QuadArray {
private static final float[] verts = {
// front face
1.0f, -1.0f, 1.0f, 1.0f, 1.0f, 1.0f, -1.0f, 1.0f, 1.0f, -1.0f,
-1.0f, 1.0f,
// back face
-1.0f, -1.0f, -1.0f, -1.0f, 1.0f, -1.0f, 1.0f, 1.0f, -1.0f, 1.0f,
-1.0f, -1.0f,
// right face
1.0f, -1.0f, -1.0f, 1.0f, 1.0f, -1.0f, 1.0f, 1.0f, 1.0f, 1.0f,
-1.0f, 1.0f,
// left face
-1.0f, -1.0f, 1.0f, -1.0f, 1.0f, 1.0f, -1.0f, 1.0f, -1.0f, -1.0f,
-1.0f, -1.0f,
// top face
1.0f, 1.0f, 1.0f, 1.0f, 1.0f, -1.0f, -1.0f, 1.0f, -1.0f, -1.0f,
1.0f, 1.0f,
// bottom face
-1.0f, -1.0f, 1.0f, -1.0f, -1.0f, -1.0f, 1.0f, -1.0f, -1.0f, 1.0f,
-1.0f, 1.0f, };
private static final float[] colors = {
// front face (red)
1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f,
0.0f,
// back face (green)
0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f,
0.0f,
// right face (blue)
0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f,
1.0f,
// left face (yellow)
1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f,
0.0f,
// top face (magenta)
1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f,
1.0f,
// bottom face (cyan)
0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f,
1.0f, };
ColorCube() {
super(24, QuadArray.COORDINATES | QuadArray.COLOR_3);
setCoordinates(0, verts);
setColors(0, colors);
class ColorPyramidDown extends QuadArray {
private static final float[] verts = {
// front face
0.0f, -1.0f, 0.0f, 1.0f, 1.0f, 1.0f, -1.0f, 1.0f, 1.0f, 0.0f,
-1.0f, 0.0f,
// back face
0.0f, -1.0f, 0.0f, -1.0f, 1.0f, -1.0f, 1.0f, 1.0f, -1.0f, 0.0f,
-1.0f, 0.0f,
// right face
0.0f, -1.0f, 0.0f, 1.0f, 1.0f, -1.0f, 1.0f, 1.0f, 1.0f, 0.0f,
-1.0f, 0.0f,
// left face
0.0f, -1.0f, 0.0f, -1.0f, 1.0f, 1.0f, -1.0f, 1.0f, -1.0f, 0.0f,
-1.0f, 0.0f,
// top face
1.0f, 1.0f, 1.0f, 1.0f, 1.0f, -1.0f, -1.0f, 1.0f, -1.0f, -1.0f,
1.0f, 1.0f,
// bottom face
0.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f,
-1.0f, 0.0f, };
private static final float[] colors = {
// front face (green)
0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f,
0.0f,
// back face (red)
1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f,
0.0f,
// right face (yellow)
1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f,
0.0f,
// left face (magenta)
1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f,
1.0f,
// top face (blue)
0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f,
1.0f,
// bottom face (cyan)
0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f,
1.0f, };
ColorPyramidDown() {
super(24, QuadArray.COORDINATES | QuadArray.COLOR_3);
setCoordinates(0, verts);
setColors(0, colors);
//User-defined morphing behavior class
class MorphingBehavior extends Behavior {
Alpha alpha;
Morph morph;
double weights[];
WakeupOnElapsedFrames w = new WakeupOnElapsedFrames(0);
// Override Behavior's initialize method to setup wakeup criteria
public void initialize() {
alpha.setStartTime(System.currentTimeMillis());
// Establish initial wakeup criteria
wakeupOn(w);
// Override Behavior's stimulus method to handle the event
public void processStimulus(Enumeration criteria) {
// NOTE: This assumes 3 objects. It should be generalized to
// "n" objects.
double val = alpha.value();
if (val < 0.5) {
double a = val * 2.0;
weights[0] = 1.0 - a;
weights[1] = a;
weights[2] = 0.0;
} else {
double a = (val - 0.5) * 2.0;
weights[0] = 0.0;
weights[1] = 1.0f - a;
weights[2] = a;
morph.setWeights(weights);
// Set wakeup criteria for next time
wakeupOn(w);
public MorphingBehavior(Alpha a, Morph m) {
alpha = a;
morph = m;
weights = morph.getWeights();

A method or (in this case it seems) a class being deprecated is nothing to worry about. All it means is that it is strongly advised that you not use this method/class because they have made something better to use. It also means that support for the method/class is no longer available from the makers and that they will soon be discontinuing the method/class.
In the case of the Morph class, you can still use it, but it may not be there in the next version or two. If you want to stop those compile warnings, then you can stick this somewhere (before the method that uses the Morph, I think):
@SuppressWarnings("unused")Using that will Suppress further Warnings of any "unused" (read "no longer supported/deprecated") classes or methods. And in your next program, see if you can find a replacement for the Morph class.
Tustin2121

Similar Messages

  • Provide Multi Language Content in Knowledge Management // Class deprecated

    Hello,
    I tried to implement the blog "Provide Multi Language Content in Knowledgle Management" by Thomas Kuri (BridingIT).
    I have problems to import the the following class:
    import com.sapportals.portal.prt.service.usermanagement.IUserManagementService;
    I always get the warning "The type IUserManagementService" is deprecated. I use the following jar file for that:
    j2ee\cluster\server0\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF\portal\portalapps\com.sap.portal.usermanagement\lib\com.sap.portal.usermanagementapi.jar
    Is that the wrong jar file? Or am I doing something else wrong?
    Thanks for your help!!
    Kirsten

    Hi,
    she's trying to implement the code example from this article:
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/207ba610-08ac-2b10-1787-fc477da4b5bf
    In this article, the deprecated class is used. Why? The code obviously is not written for EP7, but for EP6 with EP5 support. In the function: getEP5User is used to retrieve the EP5 user.
    If you're not too experienced or just want to try something / PoC it's OK to just copy & paste some sample code. For using this code in an EP7 portal I would recommend to adapt the code.
    br,
    Tobias

  • My fault or limit of Morph functionality?

    Hi there,
    i have a problem with the Morph class. I want to Morph two vrml-objects.
    I have no problem getting the Geometry arrays of the objects i want to morph. Even the Morph Object doesn't complain when i create one with the given Geometry Arrays.
    But when the renderer wants to render the first image, the application crashes with the following exception, which isn't thrown within my code as you can see:
    java.lang.ArrayIndexOutOfBoundsException
         at javax.media.j3d.GeometryArrayRetained.executeVA(Native Method)
         at javax.media.j3d.GeometryArrayRetained.execute(GeometryArrayRetained.java:2423)
         at javax.media.j3d.VertexArrayRenderMethod.renderGeo(VertexArrayRenderMethod.java:80)
         at javax.media.j3d.VertexArrayRenderMethod.render(VertexArrayRenderMethod.java:53)
         at javax.media.j3d.RenderMolecule.render(RenderMolecule.java:1924)
         at javax.media.j3d.TextureBin.renderList(TextureBin.java:1325)
         at javax.media.j3d.TextureBin.renderList(TextureBin.java:1297)
         at javax.media.j3d.TextureBin.render(TextureBin.java:1287)
         at javax.media.j3d.TextureBin.render(TextureBin.java:1240)
         at javax.media.j3d.AttributeBin.render(AttributeBin.java:389)
         at javax.media.j3d.EnvironmentSet.render(EnvironmentSet.java:426)
         at javax.media.j3d.LightBin.render(LightBin.java:361)
         at javax.media.j3d.RenderBin.renderOpaque(RenderBin.java:5020)
         at javax.media.j3d.Renderer.doWork(Renderer.java:1263)
         at javax.media.j3d.J3dThread.run(J3dThread.java:250)I had no problem using morph on a little object which had only 4 defined corners. This object i loaded from the vrml file has 25.000 Vertices (the result i get from getVertexCount on one of the geometry arrays)
    Is this simply to much for the Morph Node? Its even no problem to display these object normaly in the scene but when i add them to a Morph node and the renderer wants to process the first image, the Exception shown above occures.
    Absolutely no error occurs when i don't put the created morph-node into the scenegraph.
    Any ideas if this problem can be solved?
    Thanks in advance
    Sash

    Hi,
    there is a bug in the morph node (Bug-ID 4828096). Here's the description:
    A Morph Behavior tries to change the weight values of class Morph. The
    BehaviorScheduler hangs up, because method setWeights() in class Morph blocks,
    when:
    1. the Scene is compiled and live
    2. the Canvas3D is displayed on screen
    3. the geometries (of the Morph) are of type TriangleArray
    4. the Java3D version is 1.3
    The same Morph and Morph Behavior classes work well with Java3D 1.2.1
    Does your Node use the TriangleArray?
    Regards,
    Oliver

  • Proguard Error with ant/antenna

    I get the following proguard error:
    [wtkobfuscate] java.io.IOException: The output jar is empty. Did you specify the proper '-keep' optons?
    Any idea what is wrong?
    Thanks,
    earamsey
    [wtkobfuscate] Obfuscating C:\Projects\J2ME\CellStory\bin\CellStory.jar with ProGuard
    [wtkobfuscate] ProGuard, version 3.2
    [wtkobfuscate] Reading jars...
    [wtkobfuscate] Reading program jar [C:\Projects\J2ME\CellStory\bin\CellStory.jar]
    [wtkobfuscate] Reading library zip [C:\WTK22\wtklib\devices\Series_60_MIDP_SDK_2_1\lib\kmidp20.zip]
    [wtkobfuscate] Removing unused library classes...
    [wtkobfuscate] Original number of library classes: 305
    [wtkobfuscate] Final number of library classes: 6
    [wtkobfuscate] Shrinking...
    [wtkobfuscate] Removing unused program classes and class elements...
    [wtkobfuscate] Original number of program classes: 1
    [wtkobfuscate] Final number of program classes: 0
    [wtkobfuscate] java.io.IOException: The output jar is empty. Did you specify the proper '-keep' options?
    ^^^^^___Error that I get is here
    [wtkobfuscate] at proguard.ProGuard.shrink(ProGuard.java:474)
    [wtkobfuscate] at proguard.ProGuard.execute(ProGuard.java:86)
    [wtkobfuscate] at proguard.ProGuard.main(ProGuard.java:916)
    Here is my build.xml file:
    <?xml version="1.0" encoding="UTF-8"?>
    <project name="MIDP2.0" default="n66xx" basedir=".">
        <description>
         Build file for MyLittleProject
        </description>
        <!-- predefined antenna tasks -->
        <taskdef resource="antenna.properties"/>
        <!-- ProGuard home -->
        <property name="wtk.proguard.home" value="C:\proguard3.2"/>
        <!-- RetroGuard home -->
        <property name="wtk.retroguard.home" value="C:\retroguard-v2.0.2"/>
        <property name="midlet.name" value="MyLittleProject"/>
        <property name="midlet.home" value="C:\Projects\J2ME\MyLittleProject"/>
        <target name="build" description="Builds everything">
         <antcall target="n66xx"/>
        </target>
        <target name="n66xx" description="Builds Nokia Models 6600 and 6620">
         <ant dir="devices/nokia66xx" inheritall="true" target="build"/>
        </target>
        <target name="cellstory_init" description="Create directory structure">
         <property name="src_pp" location="${preproc_dir}"/>
         <!-- set global properties -->
         <property name="src" location="src"/>
         <property name="bin" location="bin"/>
         <property name="res" location="res"/>
         <property name="classes" location="classes"/>
         <!-- Create the timestamp -->
         <tstamp/>
         <!-- Make directories -->
         <mkdir dir="${src}"/>
         <mkdir dir="${src_pp}"/>
         <mkdir dir="${bin}"/>
         <mkdir dir="${res}"/>
         <mkdir dir="${classes}"/>
        </target>
        <target name="cellstory" depends="cellstory_init" description="Build it all">
         <wtkjad
             jadfile="${bin}/${midlet.name}.jad"
             jarfile="${midlet.name}.jar"
             name="MyLittleProject"
             vendor="Wizzards and Lizzards"
             version="1.0.0">
             <midlet
              name="${midlet.name}"
              icon="${midlet.name}.png"
              class="${midlet.name}.class"/>
             <attribute
              name="deleteConfirm"
              value="Do you really want to delete me?"/>
         </wtkjad>
         <!-- do preprocessing -->
         <wtkpreprocess
             srcdir="${src}"
             destdir="${src_pp}"
             symbols="${symbols}"/>
         <!-- Compile the code -->
         <wtkbuild
             srcdir="${src_pp}"
             destdir="${classes}"
             deprecation="on"
             target="1.4"
             source="1.4"/>
         <!-- Package the classes -->
         <wtkpackage
             jarfile="${bin}/${midlet.name}.jar"
             jadfile="${bin}/${midlet.name}.jad"
             obfuscate="false"
             preverify="false">
             <fileset dir="${classes}" includes="**/*.class"/>
             <fileset dir="${res}" includes="**"/>
         </wtkpackage>
         <wtkobfuscate
             jarfile="${bin}/${midlet.name}.jar"
             jadfile="${bin}/${midlet.name}.jad"
             tojarfile="${bin}/${midlet.name}._jar"
             obfuscator="proguard">
         </wtkobfuscate>
         <wtkpreverify jarfile="${bin}/${midlet.name}.jar"/>
         <!-- run -->
         <wtkrun jadfile="${bin}/${midlet.name}.jad" device="Series_60_MIDP_SDK_2_1"/>
        </target>
        <target name="cleanbuild" description="Cleans and builds">
         <ant dir="devices/nokia66xx" inheritall="true" target="cleanbuild"/>
        </target>
    </project>

    I figured this out - I needed a formatter tag to see the output of the test.

  • JNDI lookup name in a standalone oc4j instance

    Hi,
    Could you please let me know how to create a JNDI lookup name for a database in a stanalone OC4j Instance?
    Both OC4J and oracle 9i database are in the same server.
    Thanks in advance,
    Sukonya

    Hi,
    I have the oracle 9i database as well as the oc4j instance in my local machine.I am trying to deploy a J2ee Application on the OC4j instance,using eclipse IDE.I have not created any connection pool or datasource in the oc4j instance but after i build the application I see that the connection pool and datasource instance have been created in the OC4j instance.
    following are the contents of the build.xml file(for the ant build tool)
    <?xml version="1.0" encoding="UTF-8" ?>
    - <project name="TicketLoggingSystem" default="bind-web-app" basedir="../">
    <property name="app.server" value="D:/oc4j/j2ee/home" />
    <property name="dest.dir" value="${basedir}/dest" />
    <property name="war.file" value="${dest.dir}/TicketLoggingSystem.war" />
    <property name="ear.file" value="${dest.dir}/TicketLoggingSystem.ear" />
    <property name="web.inf" value="${basedir}/WEB-INF" />
    <property name="web.classes" value="${dest.dir}/classes" />
    <property name="app.xml" value="${basedir}/application.xml" />
    <property name="src.dir" value="${basedir}/src" />
    <property name="oc4j.host" value="localhost" />
    <property name="oc4j.admin.port" value="23791" />
    <property name="oracle.home" value="D:/oc4j" />
    <property name="j2ee.home" value="${oracle.home}/j2ee/home" />
    <property name="oc4j.admin.username" value="oc4jadmin" />
    <property name="oc4j.admin.password" value="welcome" />
    <property name="oc4j.ormi" value="ormi://${oc4j.host}:${oc4j.admin.port}" />
    <property name="app.name" value="TicketLoggingSystem" />
    <property name="jdbc.url" value="jdbc:oracle:thin:@localhost:1521:80" />
    <property name="jdbc.username" value="scott" />
    <property name="jdbc.password" value="tiger" />
    <property name="connection.driver" value="oracle.jdbc.driver.OracleDriver" />
    <property name="connection.datasource" value="oracle.jdbc.pool.OracleDataSource" />
    <property name="xa.location" value="jdbc/xa/MpsiDS" />
    - <!-- Delete dest folder
    -->
    - <target name="init">
    <delete dir="${dest.dir}" includeemptydirs="true" />
    <mkdir dir="${dest.dir}" />
    <mkdir dir="${web.classes}" />
    </target>
    - <!-- Compile all Java files
    -->
    - <target name="wscompile">
    - <javac srcdir="${src.dir}" destdir="${web.classes}" deprecation="on" debug="on">
    <exclude name="**/*.properties,**/*.xml" />
    - <classpath>
    <fileset dir="${web.inf}/lib" includes="*.jar" />
    <fileset dir="${app.server}/lib" includes="servlet.jar" />
    </classpath>
    </javac>
    </target>
    - <!-- Build Web archive file
    -->
    - <target name="buildWar" depends="init,wscompile">
    - <war destfile="${war.file}" webxml="${web.inf}/web.xml">
    - <fileset dir="${basedir}">
    <include name="content*/**" />
    </fileset>
    <webinf dir="${web.inf}" includes="*.xml,*.tld" excludes="web.xml" />
    <classes dir="${web.inf}/classes" />
    <lib dir="${web.inf}/lib" includes="*.jar" />
    </war>
    </target>
    - <!-- Build Enterprsie Archive
    -->
    - <target name="buildEar" depends="buildWar">
    - <ear destfile="${ear.file}" appxml="${app.xml}">
    <fileset dir="${dest.dir}" includes="*.war" />
    </ear>
    </target>
    - <!-- Checking availability of oc4j
    -->
    - <target name="check-oc4j-available">
    <echo message="------> Checking to see if OC4J is started ." />
    <echo message="[checking oc4j on machine =${oc4j.host}]" />
    <echo message="[port=${oc4j.admin.port}]" />
    - <condition property="oc4j.started">
    <socket server="${oc4j.host}" port="${oc4j.admin.port}" />
    </condition>
    </target>
    - <!-- Remove data source
    -->
    - <target name="remove-data-source" depends="check-oc4j-available" if="oc4j.started">
    <echo message="Removing DataSource" />
    - <java jar="${j2ee.home}/admin.jar" fork="true">
    <arg value="${oc4j.ormi}" />
    <arg value="${oc4j.admin.username}" />
    <arg value="${oc4j.admin.password}" />
    <arg value="-application" />
    <arg value="${app.name}" />
    <arg value="-removeDataSource" />
    <arg value="-location" />
    <arg value="jdbc/TicketLoggingSystem" />
    </java>
    <echo message="Removed DataSource Successfully" />
    </target>
    - <!-- Undeploy
    -->
    - <target name="undeploy" depends="remove-data-source" description="Undeploying the application" if="oc4j.started">
    <echo message="Undeploying the Application ${app.name}" />
    - <java jar="${j2ee.home}/admin.jar" fork="true">
    <arg value="${oc4j.ormi}" />
    <arg value="${oc4j.admin.username}" />
    <arg value="${oc4j.admin.password}" />
    <arg value="-undeploy" />
    <arg value="${app.name}" />
    </java>
    <echo message="Undeploying the Application ${app.name} is Successful" />
    </target>
    - <!-- Deploy
    -->
    - <target name="deploy" depends="undeploy,buildEar" if="oc4j.started">
    <echo message="Deploying the Application ${app.name}" />
    - <java jar="${j2ee.home}/admin.jar" fork="true">
    <arg value="${oc4j.ormi}" />
    <arg value="${oc4j.admin.username}" />
    <arg value="${oc4j.admin.password}" />
    <arg value="-deploy" />
    <arg value="-file" />
    <arg value="${ear.file}" />
    <arg value="-deploymentName" />
    <arg value="${app.name}" />
    </java>
    <echo message="Deploying the Application ${app.name} is Successful" />
    </target>
    - <!-- Create data source
    -->
    - <target name="create-data-source" depends="check-oc4j-available" if="oc4j.started">
    <echo message="Creating DataSource for Application ${app.name}" />
    - <java jar="${j2ee.home}/admin.jar" fork="true">
    <arg value="${oc4j.ormi}" />
    <arg value="${oc4j.admin.username}" />
    <arg value="${oc4j.admin.password}" />
    <arg value="-application" />
    <arg value="${app.name}" />
    <arg value="-installDataSource" />
    <arg value="-jar" />
    <arg value="${oracle.home}/jdbc/lib/ojdbc14dms.jar" />
    <arg value="-url" />
    <arg value="${jdbc.url}" />
    <arg value="-connectionDriver" />
    <arg value="${connection.driver}" />
    <arg value="-location" />
    <arg value="jdbc/TicketLoggingSystem" />
    <arg value="-username" />
    <arg value="${jdbc.username}" />
    <arg value="-password" />
    <arg value="${jdbc.password}" />
    <arg value="-className" />
    <arg value="${connection.datasource}" />
    </java>
    <echo message="Created DataSource Successfully for Application ${app.name}" />
    </target>
    - <!-- Binding web-app
    -->
    - <target name="bind-web-app" depends="deploy,create-data-source" if="oc4j.started">
    <echo message="executing bind web app" />
    - <java jar="${j2ee.home}/admin.jar" fork="true">
    <arg value="${oc4j.ormi}" />
    <arg value="${oc4j.admin.username}" />
    <arg value="${oc4j.admin.password}" />
    <arg value="-bindWebApp" />
    <arg value="${app.name}" />
    - <!-- app deployname
    -->
    <arg value="${app.name}" />
    - <!-- web module name
    -->
    <arg value="default-web-site" />
    - <!-- web site name
    -->
    <arg value="/${app.name}" />
    - <!-- context root
    -->
    </java>
    <echo message="Access the application using: http://${oc4j.host}:8888/${app.name}" />
    </target>
    </project>
    Following are the contents of Oc4J home->services->jdbc resources:
    Datasource:
    Name jdbc/TicketLoggingSystem
    Application TicketLoggingSystem
    JNDI Location jdbc/TicketLoggingSystem
    Connection Pool
    Managed by OC4j
    Test
    when i click the datasource name,I see that its type is Native datasource with no related connection pool.
    Whereas for the default datasource oracleDS,
    Type     Managed Data Source
    Connection Pool     Example Connection Pool
    However on deployment a connection pool is also created along with the datasource
    Name jdbc/TicketLoggingSystem_connectionPool
    Application TicketLoggingSystem
    ConnectionFactory class : oracle.jdbc.pool.OracleDataSource
    Do we need to bind this connection pool to our datasource?If yes how is it done.And if that is not required,why is this connection pool created?Are the datasource and connection pool already bound to each other?
    Also when I test either the datasource or connection pool,it says
    Confirmation     
    Connection to "jdbc/TicketLoggingSystem_connectionPool" established successfully
    or
    Connection to "jdbc/TicketLoggingSystem" established successfully.
    and displays both the connection pool and datasource details together for both the tests.
    In my java code,while trying to establish connection to the database what should I mention in lookup i.e,
    InitialContext context = new InitialContext();
    DataSource dataSource = (DataSource) context.lookup("     jdbc/TicketLoggingSystem or      jdbc/TicketLoggingSystem_connectionPool");
    con = dataSource.getConnection();
    Sorry if I am sounding novice.Thanks a lot in advance,
    Sukanya

  • Ant compileWebapp

    Anyone know ant well enough to tell me what is wrong w/ my compile? The DVDItem.java compiles w/ javac DVDItem.java but not w/ ant compileWebapp. I'm new to ant so please your audience is a newbie. See below:
    staticWebapp:
    compileWebapp:
    [javac] Compiling 2 source files to C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\dvd\WEB-INF\classes
    [javac] C:\Documents and Settings\jcwaters\My Documents\Personal\programming\java\SunWLC\labs\SL314\exercises\project\src\model\DVDItem.java:3: cannot access java.lang.Object
    [javac] bad class file: C:\Program Files\Java\jdk1.5.0_06\jre\lib\rt.jar(java/lang/Object.class)
    [javac] class file has wrong version 49.0, should be 47.0
    [javac] Please remove or make sure it appears in the correct subdirectory of the classpath.
    [javac] public class DVDItem implements java.io.Serializable {
    [javac] ^
    [javac] 1 error
    BUILD FAILED
    C:\Documents and Settings\jcwaters\My Documents\Personal\programming\java\SunWLC\labs\SL314\exercises\project\build.xml:51: Compile failed; see the compiler error output for details.
    Total time: 2 seconds
    ________________________________________________________

    Here is the build.xml that came w/ the exercise. Where do I put the new attribute? Again, first time I've used ant. I know both tomcat and ant are from apache. Tomcat is a webserver.
    <?xml version="1.0"?>
    <project name="SL314 DVDLibrary Application" default="webapp" basedir=".">
    <!-- =================== Initialize Property Values ===================== -->
    <property environment="env" />
    <property file="build.properties" />
    <!-- =================== Convenient Synonyms ============================ -->
    <target name="clean" depends="cleanWebapp" />
    <target name="all" depends="clean,webapp" />
    <target name="help">
    <echo>
    Build structure of the Web Application
    Toplevel targets:
    help -- this message
    all -- cleans and then builds/deploys this Web app.
    webapp -- (re)builds and deploys this Web app. to Tomcat
    clean -- cleans the deployment environment for this Web app.
    cleanTomcat -- removes all Tomcat Web apps (except ROOT and tomcat-docs)
    </echo>
    </target>
    <!-- =================== CLEAN: Webapp ================================== -->
    <target name="cleanWebapp">
    <delete dir="${webapp.dir}" />
    </target>
    <!-- =================== CLEAN: Tomcat ================================== -->
    <target name="cleanTomcat">
    <delete includeEmptyDirs="true">
    <fileset dir="${build.dir}" excludes="${tomcat.webapps.toSave}" />
    </delete>
    </target>
    <!-- =================== CLEAN: Backup Files ============================ -->
    <target name="cleanTmpFiles">
    <delete>
    <fileset dir="." defaultExcludes="no" includes="**/*~"/>
    </delete>
    </target>
    <!-- =================== WEBAPP: All ==================================== -->
    <target name="webapp" depends="cleanWebapp,compileWebapp" />
    <!-- =================== WEBAPP: Compile Web Components ================= -->
    <target name="compileWebapp" depends="staticWebapp">
    <javac srcdir="src"
    destdir="${webapp.dir}/WEB-INF/classes/"
    deprecation="off" debug="on" optimize="off">
    <classpath>
    <!-- Include all JAR files in my local library -->
    <fileset dir="lib">
    <include name="*.jar"/>
    </fileset>
    <!-- Include all common libraries in Tomcat -->
    <fileset dir="${tomcat.home}/common/lib">
    <include name="*.jar"/>
    </fileset>
    </classpath>
    </javac>
    </target>
    <!-- =================== WEBAPP: Copy Static Web Files ================== -->
    <target name="staticWebapp" depends="prepareWebapp, configTomcat">
    <!-- Copy web files -->
    <copy todir="${webapp.dir}/">
    <fileset dir="web" />
    </copy>
    <!-- Copy webapp configuration files -->
    <copy todir="${webapp.dir}/WEB-INF/">
    <fileset dir="etc" />
    </copy>
    <!-- Copy library files files -->
    <copy todir="${webapp.dir}/WEB-INF/lib/">
    <fileset dir="lib" />
    </copy>
    </target>
    <!-- =================== WEBAPP: Create WebApp Directories ============== -->
    <target name="prepareWebapp">
    <mkdir dir="${webapp.dir}" />
    <mkdir dir="${webapp.dir}/WEB-INF" />
    <mkdir dir="${webapp.dir}/WEB-INF/lib" />
    <mkdir dir="${webapp.dir}/WEB-INF/classes" />
    </target>
    <!-- =================== WEBAPP: Copy Tomcat Config/Lib Files =========== -->
    <target name="configTomcat">
    <copy todir="${tomcat.home}">
    <fileset dir="tomcat" />
    </copy>
    </target>
    <!-- =================== DATABASE TARGETS =============================== -->
    <target name="createUserData">
    <input message="Please enter username for table: "
    addproperty="table.username" />
    <copy file="db/data_template.sql" tofile="db/data.sql">
    <filterset>
    <filter token="username" value="${table.username}"/>
    </filterset>
    </copy>
    </target>
    <target name="createSchema">
    <sql
    driver="com.pointbase.jdbc.jdbcUniversalDriver"
    url="jdbc:pointbase://localhost/dvdlibrary,new"
    userid="PBPUBLIC"
    password="PBPUBLIC"
    classpath="${pointbase.home}/lib/pbclient.jar"
    onerror="continue"
    src="db/schema.sql"
    />
    </target>
    <target name="populateDatabase" depends="createSchema,createUserData">
    <sql
    driver="com.pointbase.jdbc.jdbcUniversalDriver"
    url="jdbc:pointbase://localhost/dvdlibrary"
    userid="PBPUBLIC"
    password="PBPUBLIC"
    classpath="${pointbase.home}/lib/pbclient.jar"
    onerror="continue"
    autocommit="true"
    print="true"
    src="db/data.sql"
    />
    </target>
    </project>

  • Pointbase problem

    Hi,
    I'm using the "Sun Java System Application Server Platform Edition 8.0" version.
    When I try to create some tables and populate them through java class I got this exeption
    [java] SQL Exception thrown: java.sql.SQLException: SQL-server rejected establishment of SQL-connection. Pointbase Server may not be ru
    nning on localhost at port 9092.
    [java] java.sql.SQLException: SQL-server rejected establishment of SQL-connection. Pointbase Server may not be running on localhost at
    port 9092.
    [java] at com.pointbase.dbexcp.dbexcpException.getSQLException(Unknown Source)
    [java] at com.pointbase.net.netJDBCConnection.a(Unknown Source)
    [java] at com.pointbase.net.netJDBCConnection.<init>(Unknown Source)
    [java] at com.pointbase.net.netJDBCConnection30.<init>(Unknown Source)
    [java] at com.pointbase.net.netJDBCDriver.getConnection(Unknown Source)
    [java] at com.pointbase.net.netJDBCDriver.connect(Unknown Source)
    [java] at com.pointbase.jdbc.jdbcUniversalDriver.a(Unknown Source)
    [java] at com.pointbase.jdbc.jdbcUniversalDriver.connect(Unknown Source)
    [java] at java.sql.DriverManager.getConnection(DriverManager.java:512)
    [java] at java.sql.DriverManager.getConnection(DriverManager.java:171)
    [java] at CreateAgency.main(Unknown Source)
    database:
    BUILD SUCCESSFUL
    No result
    Can someone help me, any help appreciate.
    Thanks

    Thanks, now I move a little, but now population of the database.
    I'm studding the j2ee by "Teach yourself J2EE in 21 days". I' m running the casestudy samples day02. In this case should be create tree tables and populate them some data.
    The book says if every thing set up right I should get the next:
    D:\Sun\CaseStudy\Day02\exercise>asant database
    Buildfile: build.xml
    env-user:
    prop-user:
    set-user:
    env-password:
    prop-password:
    read-password:
    set-password:
    set-j2ee:
    create-jdbc:
    set-j2ee:
    asadmin:
    [echo] asadmin.bat create-jdbc-resource user admin password dllg2005 connectionpoolid PointBasePool enabled=true jdbc/Agency
    [exec] Operation 'createJdbcResource' failed in 'resources' Config Mbean.
    [exec] Target exception message: JdbcResource Already Exists: cannot add duplicate
    [exec] CLI137 Command create-jdbc-resource failed.
    set-j2ee:
    asadmin:
    [echo] asadmin.bat list-jdbc-resources user admin password dllg2005
    [exec] jdbc/__TimerPool
    [exec] jdbc/PointBase
    [exec] jdbc/Agency
    [exec] Command list-jdbc-resources executed successfully.
    set-dbpath:
    compile:
    set-j2ee:
    compile-dir:
    [echo] compile: -classpath D:\Sun\AppServer\lib\appserv-rt.jar;D:\Sun\AppServer\lib\endorsed\dom.jar;D:\Sun\AppServer\lib\endorsed\xerc
    esImpl.jar;D:\Sun\AppServer\lib\j2ee.jar;D:\Sun\AppServer\lib\jaxrpc-impl.jar;D:\Sun\AppServer\lib\mail.jar;D:\Sun\AppServer\lib\saaj-impl.j
    ar:classes -deprecation src
    CreateAgency:
    [echo] java -classpath D:\Sun\AppServer\pointbase\lib\pbclient.jar;D:\Sun\AppServer\pointbase\lib\pbembedded.jar;D:\Sun\AppServer\point
    base\lib\pbtools.jar CreateAgency
    [java] Loaded driver: com.pointbase.jdbc.jdbcUniversalDriver
    [java] Connected to: jdbc:pointbase:server://localhost/sun-appserv-samples,new
    [java] Dropping exisiting BMP tables...
    [java] Dropped tables
    [java] Creating new tables...
    [java] Created tables
    [java] Inserting table records...
    [java] Inserted records
    [java] Committed transactions
    database:
    BUILD SUCCESSFUL
    Total time: 4 seconds
    This is what I got, it is tottally the same as in the book, but nothign happened, no tables.
    Thanks
    dllg

  • RoleManagerService.getRoleMembers doesn't work in OIM11gR2

    Hi,
    I use a custom class developed to 11gR1 version to send mail notification, this class use the standard API "roleManagerService.getRoleMembers(roleID, true);" but now, after OIM upgrading to version 11gR2 this API don't work, and always return this exception:
    getUserMemberships: oracle.iam.identity.ex
    ception.RoleMemberException: oracle.iam.identity.exception.RoleMemberException: java.lang.RuntimeException: java.sql.SQLSyntaxErrorException: ORA-01747: invalid user.table.column, table.column, or
    column specification
    So To get member we try to implement a workaround using "tcDataProvider.class" to extract user memberbership directly from OIM DB, but also in this case I catch an exception: "classDefNotFoundException"
    which is the problem? are these classes deprecated?
    How can we get the user list by role?exist a new API that provide this function?

    I am afraid something wrong might have happened during upgrade..
    Errors are database specific...
    So, probably some sql scripts etc are not executed properly....

  • Automatically split quantities on a put away.

    The scenario is as follows:
    We have two locations for a product '123'. One is a pick location which will hold up to 150 units of item '123' and the other is a bulk storage location.
    When a put away task is created we want it to automatically show a quantity up to 150 to be put in the pick location and the balance of the delivery to be assigned to the bulk storage location.
    Is this possible without manually going into the confirmation of the put away task and selecting the split quantities and then manually selecting the second location?

    Hi Sanjeev,
    as far as I see, the invocation service really does not start up automatically.
    However, the following code should autostart all services marked requiring autostart according to the documentation of the DefaultCacheServer.start() method, which by the way also implies that this is the expected behaviour (that autostart services are not started by reading the cache configuration, but only the start method, which is by the way called by the DefaultCacheServer application, so you need not worry about that in case of the standalone cache server JVMs).
    CacheFactory.ensureCluster();
    DefaultCacheServer.start();Depending on what kind of container you deploy to, a single place is probably available for starting up the cluster.
    E.g. in Weblogic:
    - you can use an application server startup class if you have Coherence deployed to the server classpath.
    - if you have Coherence deployed as part of your application, then you can just use an application startup class (deprecated) or application lifecycle listener (recommended). In this case you need to have such a class (application lifecycle listener or application shutdown class) anyway, to properly shut down Coherence, otherwise you will get strange NoClassDefFoundError-s upon redeploying the application.
    Best regards,
    Robert

  • ADFTOYSRORE ERROR500 HttpSessionCookieFactory

    I have just started to run index.jsp page from inside JDevelopr(9.0.5.2) in embedded oc4j by clicking on
    http://localhost:8889/ADFToyStore/index.jsp
    and got
    500 Internal Server Error
    java.lang.NoClassDefFoundError: oracle/jbo/http/HttpSessionCookieFactory
         at oracle.adf.model.bc4j.DataControlFactoryImpl.findOrCreateSessionCookie(DataControlFactoryImpl.java:146)
         at oracle.adf.model.bc4j.DataControlFactoryImpl.createSession(DataControlFactoryImpl.java:220)
         at oracle.adf.model.bc4j.DataControlFactoryImpl.createSession(DataControlFactoryImpl.java:97)
         at oracle.jbo.uicli.mom.JUMetaObjectManager.loadCpx(JUMetaObjectManager.java:612)
         at oracle.adf.model.servlet.ADFBindingFilter.initializeBindingContext(ADFBindingFilter.java:328)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:600)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    log Diagnostics lists:
    [00] Diagnostic Properties: Timing:false Functions:false Linecount:true Threshold:6
    [01] JavaVMVersion: 1.4.2_03-b02
    [02] JavaVMVendor: Sun Microsystems Inc.
    [03] JavaVMName: Java HotSpot(TM) Client VM
    [04] OperatingSystemName: Windows 2000
    [05] OperatingSystemVersion: 5.0
    [06] OperatingSystemUsername: jp1
    [07] jbo.323.compatible Flag: false, str: null
    [08] jbo.903.compatible Flag: false, str: null
    [09] BC4J Property jbo.maxpoolcookieage='-1' -->(Configuration) from System Default
    Should thet class (deprecated?) be in some classpath?
    Thanks for help

    The only reason I could imagine this could happen would be if you:
    (1) Have a partially corrupted installation of JDeveloper 9.0.5.2 in which some of the ADF jars have gone missing or gone corrupt, or
    (2) You have (likely accidentally) removed some of the libraries listed on the Libraries tab of the project properties. For example, if you removed the libraries related to ADF Model Runtime, you would generate such an error.
    Try re-extracting the adftoystore.zip and trying again.

  • How do I find out if a class file has deprecated functions

    Currently I'm having problems with a old Visual Cafe class.
    It is definately using deprecated awt funcions.
    My question is..
    1) Without the source code how do I find out what deprecated functions the CLASS file is using.
    2) Has any deprecated class been truly scrapped ? If so, I cannot find
    it in the JDK API documentation or the java.sun.com search engine..

    Here is what I did, to answer your question. I unzipped the symantec jar and used a decompiler (JAD works fine, or cavaj) to create an entire src tree (you can do this with 1 command). Then, compile using your target version of Java. There are well over 100 warnings (with -deprecation on) ranging from Cafe's use of awt.Component methods (mostly), Thread.suspend in their Timer class, to the use of java.util.Date in their Calendar component.
    Cheers!

  • DOM parsing from memory avoid deprecated class usage

    I am parsing an xml file from memory stored in a StringBuffer xmlBuffer like this
    try {
                   DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
                   DocumentBuilder db = dbf.newDocumentBuilder();
                   InputStream is = new StringBufferInputStream(xmlBuffer.toString());
                   Document doc = db.parse(is);How can i avoid using of that deprecated class?

    Why are you storing the file in memory in a StringBuffer? You could use this method directly:
    [http://java.sun.com/javase/6/docs/api/javax/xml/parsers/DocumentBuilder.html#parse(java.io.File)]
    or from a URI:
    [http://java.sun.com/javase/6/docs/api/javax/xml/parsers/DocumentBuilder.html#parse(java.lang.String)]
    StringBufferInputStream is deprecated because it does not properly convert characters into bytes.

  • Deprecated classes

    Hello,
    I've just downloaded the jsf-examples and modified the build.xml to play with helloDuke a little.
    I'm able to compile and run, but I get several warnings, 3 reasons:
    FormEvent in javax.faces.event has been deprecated
    CommandEvent in javax.faces.event has been deprecated
    ApplicationHandler in javax.faces.lifecycle has been deprecated
    Does anyone know what replaced these? Or what should we use instead?
    thanks!
    Denise

    Hi,
    I also got these depreceted method/class warnings.
    � think these messages are coming because this release is a Early Access release. So I think RI designer put these warnings to warn the
    users of EA3. Otherwise, developers can continue to use EA without noticing that a stable version released.
    Omer

  • Deprecated methods/classes

    Does anyone know if, for the SUN Certified Web Component Developer exam, you are tested on the deprecated classes and methods e.g. HttpSession.putValue(), HttpSession.getValue() etc?

    No they are not in the test

  • Oracle jdbc driver class and classes12.jar whether deprecated.?

    Hi All,
    1. In one of the post, it has been told that oracle.jdbc.driver.OracleDriver will be deprecated and also recommended to used oracle.jdbc.OracleDriver.
    According to that post, I changed the driver class name in my code as below:
    Class.forName("oracle.jdbc.OracleDriver");
    Then to check the driver name, I insert the below code:
    Enumeration<Driver> driverEnum = DriverManager.getDrivers();
    +while (driverEnum.hasMoreElements()){+
    System.out.println("driver : "driverEnum.nextElement());+
    +}+
    Below is the output:
    driver : oracle.jdbc.driver.OracleDriver@addbf1
    Even after specifying the driver class name to be used as oracle.jdbc.OracleDriver, why it is taking oracle.jdbc.driver.OracleDriver..?
    INFO : The Oracle JDBC Driver (classes12.jar) version is 10.2.0.4.0.
    2. We are using classes12.jar for developing all JDBC code. In Oracle Database 11g Release 2 (11.2.0.2.0) JDBC Drivers, there is no classes12.jar. Is this deprecated? Which jar can be used instead of classes12.jar?
    Thanks in advance.

    In Oracle Database 11g Release 2 (11.2.0.2.0) JDBC Drivers, there is no classes12.jar. Is this deprecated? Which jar can be used instead of classes12.jar?For JDBC 4.0 features ojdbc6.jar with JDK 6.0.
    For JDBC 3.0 support ojdbc 5.jar with JDK 5.0
    http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html

Maybe you are looking for