Problems in Reflectin JCO Class

Hello.
I am new to Java but very used to ABAP. To start some experiments in Java I want to check, whether JCO Library is available using Reflection-API.
Therefore I wrote the following code:
          Class jcoclass;
          try {
               // try to retrieve descriptor for JCo class
               ClassLoader.getSystemClassLoader().loadClass("com.sap.mw.jco.JCO");
               jcoclass = Class.forName("com.sap.mw.jco.JCO", true, ClassLoader.getSystemClassLoader());
               if (jcoclass != null) {
                    // successful
                    System.out.println("SAP JCo Library available");
               } //if (jcoclass != null)
Unfortunately, this causes a ClassNotFoundException. As soon as I adopt the code to check whether Java ClassLoader is able to load a standard class (here: String), it works:
          Class jcoclass;
          try {
               // try to retrieve descriptor for JCo class
               ClassLoader.getSystemClassLoader().loadClass("java.lang.String");
               jcoclass = Class.forName("java.lang.String", true, ClassLoader.getSystemClassLoader());
               if (jcoclass != null) {
                    // successful
                    System.out.println("SAP JCo Library available");
               } //if (jcoclass != null)
I guess, that my mistake is either the "full qualified name" of the JCo class ("com.sap.mw.jco.JCO"), or a mislocated JCo Library. The JCo Library Files ("librfc32.dll", "sapjco.jar" and "sapjcorfc.dll") are located in the same directory, where the compiled class is located. The dll Files are additionally located in C:\WINDOWS\system32\.
Please help me startung off with Java
Additional information:
- I am using JDK 1.6.0_06 and
- SAP JCo Library 2.1.8 32bit

Solved the problem on my own:
The CLASSPATH contained the directory containing "sapjco.jar", but not "sapjco.jar" itself.
"sapjco.jar" is located in directory "C:\JCo\". So, my CLASSPATH was confgured to be ".;C:\JCO\". But it should have been configured to ".;C:\JCO\sapjco.jar".

Similar Messages

  • Problem in switching JCOs

    Hi,
    I have a very peculiar situation out here :(. I have a single webndynpro application and need it to connect to multiple backends.
    The DC structure is as follows:
    1) DC_UTILS - this DC contains components that actually execute the model objects. It has its own SINGLE model that consists of proxy classes for many RFCs. At the time of creation, these model classes were created with JCOs, "WD_MODELDATA_ABC" and "WD_RFC_METADATA_ABC".
    2) DC_FAP - This DC uses DC_UTILS. It contains the entire business logic and screen flow and calls methods exposed by DC_UTILS.
    3) DC_RUN - This DC uses DC_FAP. It has an application called 'RunApp' that calls the "Window Interface View Controller" of a component within DC_FAP.
    I have tried to add the "sap-wd-arfc-useSys" parameters in the URL and fire the application, 'RunApp'. I am doing this by adding the above parameters to the URL dynamically in the "onPlugDefault" event handler of RunApp's Window interface View Controller. But somehow, the classes within DC_UTILS seem to get executed BEFORE the "onPlugDefault" method of the Window Interface View Controller (and hence the model proxies are generated with the JCO that I had used at design time)... and hence JCO switching doesn't take place.
    I tried the above method in a single DC that contains the model classes, business logic and execute methods and it worked absolutely fine. The problem arises when I start using one DC in another. Somehow, the used DC's model classes get initialized with the JCO names set at design time , EVEN BEFORE THE onPlugDefault of the Window Interface View Controller of the USING DC is called. Is there any method / event in the USING DC that is called BEFORE the classes in the USED DC are initialized ?
    regards,
    Navneet.

    Hi,
    I tried using caps for the password......it didnt work.
    The parameters given are the same as in dev but i get this error when I ping the JCO created : "com.sap.mw.jco.JCO$Exception: (103) RFC_ERROR_LOGON_FAILURE: Name or password is incorrect."
    Are there any priveleges which are needed for JCO creation to use the same userid/pwd in staging?
    What could be the other possibility?
    Please suggest.
    Regards,
    Rajani

  • Problem with reference and class

    I would like to transit a Data object in member function of another class with Labview 9.0 reference with "In place element structure". I use the reference for optimize allocation memory.
    When i use a dispatch static : Vi is executable  -> "TestRefAppExt Statique.vi"
    With Dispatch dynamic : Vi is not executable (because Read/Write a reference's data value : class's Object in a reference can't be replaced by another) -> "TestRefAppExt DynamiqueWithoutParent.vi"/"TestRefAppExt DynamiqueWityParent.vi"
    When i use Preserve Run-Time Class function the Vi becomes executable
    but it creates some allocations. Labview creates copy of data object
    when i'm running the vi. (increase size of data you'll see)
    The problem is that i can't recuparate the same object without copy in dispatch dynamic. Because LabView can't change the data object transited in a dispatch dynamic function of another class (child class).
    I compared in project labview Execution's performance with and without Reference in dynamic and static and for compare, with Message Box and a Reference of Data object's cluster.
    Without reference, i made three Vi : "TestAppExt Statique.vi", "TestAppExt DynamiqueWithParent.vi" and  "TestAppExt DynamiqueWithoutParent.vi"
    The static's function works well, but when Labview calls dispacth Dynamic functions, it works more slowly.
    With reference, i made three vi too : "TestRefAppExt Statique.vi", "TestRefAppExt DynamiqueWithParent.vi" and "TestRefAppExt DynamiqueWithoutParent.vi" with cast Preserve Run-Time Class.
    All This functions are more slowly than without reference.
    I tried for fun to test with the same class with Message Box : "TestRefAppExt Fifo.vi" and Cluster "TestRefAppExt DynamiqueCluster.vi" with the dynamic function. The result is better than with reference in dynamic.
    "TestRefAppExt StatiqueRef.vi" and "TestRefAppExt DynamiqueRef.vi" are a solution of this problem but it's better to work with In place element structure. And it doesn't resolve reference performance in execution.
    Why it's not possible to recuperate data object after a dispatch dynamic?
    Why the performance is not good with LabView reference 2009?
     I attached the project.
     Could you help me please
    thank you so much.
    Pascal
    Attachments:
    RefTest.zip ‏476 KB

    Yes, it helps but there is one thing that isn't being replicated which is the possibility to remove the link from the generated editor.
    My EMF looks like:
    @gmf.node(label="uri", figure="ellipse", label.edit.pattern="{0}", label.view.pattern="<<Class>> {0}", label.icon="false")
    class Class extends Resource {
    @gmf.link(target="subClassOf", target.decoration="arrow", label.text="subClassOf", label.readOnly="true")
    ref Class[*] subClassOf;
    And when I do the fix with self.subClassOf.remove(self) the link isn't removed (although now the model now passes the validation). Is there any easy way to do that?
    Regards

  • Problems with SwingWorker and classes in my new job, ;), can you help me?

    Hi all, ;)
    First of all, sorry about my poor English.
    I have a problem with Swing and Threads, I hope you help me (because I'm in the firsts two weeks in my new job)
    I have two classes:
    Form1: Its a JPanel class with JProgressBar and JLabel inside.
    FormularioApplet: (the main) Its a JPanel class with a form1 inside.
    I have to download a file from a server and show the progress of the download in the JProgressBar. To make it I do this:
    In Form1 I make a Thread that update the progress bar and gets the fole from the server.
    In FormularioApplet (the main) I call to the method getDownloadedFile from Form1 to get the File.
    THE PROBLEM:
    The execution of FormularioApplet finishes before the Thread of Form1 (with download the file) download the file. Then, when I call in FormularioApplet the variable with the file an Exception: Exception in thread "AWT-EventQueue-1" java.lang.NullPointerException is generated.
    First main begins his execution, then call to Form1 (a thread) then continues his execution and when the execution is finished ends the execution os Form1 and his thread.
    How can I do for main class call the function and the Thread download his file after main class assign the file of return method?
    How can I pass information froma class include an a main class. Form1 can't send to main (because main class made a Form1 f1 = new Form1()) any information from his end of the execution. I think if Form1 can say to main class that he finishes is job, then main class can gets the file.
    I put in bold the important lines.
    Note: My level of JAVA, you can see, is not elevated.
    THANKS A LOT
    Form1 class:
    package es.cambrabcn.signer.gui;
    import java.awt.HeadlessException;
    import java.io.ByteArrayOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.net.MalformedURLException;
    import java.net.URL;
    import java.util.StringTokenizer;
    import java.util.Vector;
    import javax.swing.SwingUtilities;
    public class Form1 extends javax.swing.JPanel {
        //Variables relacionadas con la clase original DownloadProgressBar
        private InputStream file;
        private int totalCicles;
        private int totalFiles;
        private int currentProgress;
        private SwingWorker worker;
        private ByteArrayOutputStream byteArray;
        private boolean done;
        /** Creates new form prueba */
        public Form1() {
            initComponents();
            this.byteArray = new ByteArrayOutputStream();
            progressBar.setStringPainted(true);
            //this.totalFiles = totalFiles;
            currentProgress = 0;
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        // <editor-fold defaultstate="collapsed" desc=" C�digo Generado ">                         
        private void initComponents() {
            label1 = new javax.swing.JLabel();
            progressBar = new javax.swing.JProgressBar();
            statusLabel = new javax.swing.JLabel();
            setBackground(new java.awt.Color(255, 255, 255));
            setMaximumSize(new java.awt.Dimension(300, 150));
            setMinimumSize(new java.awt.Dimension(300, 150));
            setPreferredSize(new java.awt.Dimension(300, 150));
            label1.setFont(new java.awt.Font("Arial", 1, 18));
            label1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
            label1.setText("Barra de progreso");
            statusLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
            statusLabel.setText("Cargando");
            org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
            this.setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
                    .addContainerGap()
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                        .add(org.jdesktop.layout.GroupLayout.LEADING, statusLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 280, Short.MAX_VALUE)
                        .add(org.jdesktop.layout.GroupLayout.LEADING, progressBar, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 280, Short.MAX_VALUE)
                        .add(org.jdesktop.layout.GroupLayout.LEADING, label1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 280, Short.MAX_VALUE))
                    .addContainerGap())
            layout.setVerticalGroup(
                layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(layout.createSequentialGroup()
                    .addContainerGap()
                    .add(label1)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(progressBar, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(statusLabel)
                    .addContainerGap(73, Short.MAX_VALUE))
        }// </editor-fold>                       
        // Declaraci�n de variables - no modificar                    
        private javax.swing.JLabel label1;
        private javax.swing.JProgressBar progressBar;
        private javax.swing.JLabel statusLabel;
        // Fin de declaraci�n de variables                  
        public byte[] getDownloadedFile(String documentToSign){
             //Variables locales
             byte puente[] = null;
             try{
                //Leemos el documento a firmar
                StringTokenizer st = new StringTokenizer(documentToSign, ";");
                Vector<URL> fileURL = new Vector<URL>();
                HttpSender sender = new HttpSender(null);
                //Introducimos la lista de URLs de archivos a bajar en el objeto Vector
                for(; st.hasMoreTokens(); fileURL.add(new URL(st.nextToken())));
                //Para cada URL descargaremos un archivo
                for(int i = 0; i < fileURL.size(); i++) {
                    file = sender.getMethod((URL)fileURL.get(i));
                    if(file == null) {
                        Thread.sleep(1000L);
                        throw new RuntimeException("Error descarregant el document a signar.");
                    System.out.println("Form1 Dentro de getDownloadFile, Antes de startDownload()");
                    //Fijamos el valor del n�mero de ciclos que se har�n seg�n el tama�o del fichero
                    this.totalCicles = sender.returnCurrentContentLength() / 1024;
                    this.progressBar.setMaximum(totalCicles);
                    //Modificamos el texto del JLabel seg�n el n�mero de fichero que estemos descargando
                    this.statusLabel.setText((new StringBuilder("Descarregant document ")).append(i + 1).append(" de ").append(fileURL.size()).toString());
                    statusLabel.setAlignmentX(0.5F);
                    *//Iniciamos la descarga del fichero, este m�todo llama internamente a un Thread*
                    *this.startDownload();*
                    *System.out.println("Form1 Dentro de getDownloadFile, Despu�s de startDownload()");*
                    *//if (pane.showProgressDialog() == -1) {*
                    *while (!this.isDone()){*
                        *System.out.println("No est� acabada la descarga");*
                        *if (this.isDone()){*
                            *System.out.println("Thread ACABADO --> Enviamos a puente el archivo");*
                            *puente = this.byteArray.toByteArray();*
                            *System.out.println("Form1 getDownloadFile() tama�o puente: " + puente.length);*
                        *else{*
                            *Thread.sleep(5000L);*
    *//                        throw new RuntimeException("Proc�s de desc�rrega del document a signar cancel�lat.");*
            catch (HeadlessException e) {
                    //javascript("onSignError", new String[] {
                    //(new StringBuilder("UI: ")).append(e.getMessage()).toString()});
            e.printStackTrace();
            catch (MalformedURLException e) {
                    //javascript("onSignError", new String[] {
                    //(new StringBuilder("CMS: ")).append(e.getMessage()).toString()});
            e.printStackTrace();
            catch (HttpSenderException e) {
                    //javascript("onSignError", new String[] {
                    //(new StringBuilder("CMS: ")).append(e.getMessage()).toString()});
            e.printStackTrace();
            catch (InterruptedException e) {
                    //javascript("onSignError", new String[] {
                    //(new StringBuilder("CMS: ")).append(e.getMessage()).toString()});
            e.printStackTrace();
            //System.out.println("Form1 getDownloadFile() tama�o puente: " + puente.length);
            return puente;
        public void updateStatus(final int i){
            Runnable doSetProgressBarValue = new Runnable() {
                public void run() {
                    progressBar.setValue(i);
            SwingUtilities.invokeLater(doSetProgressBarValue);
        public void startDownload() {
            System.out.println("Form1 Inicio startDownload()");
            System.out.println("Form1 Dentro de startDownload, antes de definir la subclase SwingWorker");
            System.out.println(done);
            worker = new SwingWorker() {
                public Object construct() {
                    System.out.println("Form1 Dentro de startDownload, dentro de construct(), Antes de entrar en doWork()");
                    return doWork();
                public void finished() {
                    System.out.println("Form1 Dentro de startDownload, dentro de finished(), Antes de asignar done = true");
                    System.out.println(done);
                    done = true;
                    System.out.println("Form1 Dentro de startDownload, dentro de finished(), Despu�s de asignar done = true");
                    System.out.println(done);
                    statusLabel.setText("Completado, tama�o del archivo: " + (byteArray.size() / 1024) + "KB");
            System.out.println("Form1 Dentro de startDownload, antes de worker.start()");
            worker.start();
            System.out.println("Form1 Dentro de startDownload, antes de salir de startDownload");
            System.out.println(done);
            System.out.println("Form1 Dentro de startDownload, despu�s de worker.start()");
         * M�todo doWork()
         * Este m�todo descarga por partes el archivo que es necesario descargar, adem�s de actualizar
         * la barra de carga del proceso de carga de la GUI.
        public Object doWork() {
            System.out.println("Form1 doWork() this.byteArray.size(): " + this.byteArray.size());
            try {
                byte buffer[] = new byte[1024];
                for(int c = 0; (c = this.file.read(buffer)) > 0;) {
                    this.currentProgress++;
                    updateStatus(this.currentProgress);
                    this.byteArray.write(buffer, 0, c);
                this.byteArray.flush();
                this.file.close();
                this.currentProgress = totalCicles;
                updateStatus(this.currentProgress);
            } catch(IOException e) {
                e.printStackTrace();
            System.out.println("Form1 doWork() FINAL this.byteArray.size(): " + this.byteArray.size());
            //done = true;
            System.out.println("AHORA DONE = TRUE");
            return "Done";
        public boolean isDone() {
            return this.done;
    FormularioApplet class (main)
    package es.cambrabcn.signer.gui;
    import java.awt.Color;
    import java.io.File;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import java.net.URL;
    import java.security.Security;
    import java.util.StringTokenizer;
    import java.util.Vector;
    import javax.swing.SwingUtilities;
    import netscape.javascript.JSObject;
    import org.bouncycastle.jce.provider.BouncyCastleProvider;
    import sun.security.provider.Sun;
    import be.cardon.cryptoapi.provider.CryptoAPIProvider;
    public class FormularioApplet extends java.applet.Applet {
        //Variables globales
        int paso = 0;
        private static final String JS_ONLOAD = "onLoad";
        private static final String JS_ONLOADERROR = "onLoadError";
        private static final int SIGNATURE_PDF = 1;
        private static final int SIGNATURE_XML = 2;
        //private String signButtonValue;
        private int signatureType;
        private String documentToSign;
        private String pdfSignatureField;
        private Vector<String> outputFilename;
        private Color appletBackground = new Color(255, 255, 255);
        private Vector<byte[]> ftbsigned;
         * Initializes the applet FormularioApplet
        public void init(){
            try {
                SwingUtilities.invokeLater(new Runnable() {
                //SwingUtilities.invokeAndWait(new Runnable() {
                //java.awt.EventQueue.invokeAndWait(new Runnable() {
                    public void run() {
                        try{
                            readParameters();
                            initComponents();
                        catch(FileNotFoundException e){
                            javascript(JS_ONLOADERROR, new String[] {
                                (new StringBuilder("Init: ")).append(e.getMessage()).toString()});
                            e.printStackTrace();                       
                        catch(IOException e) {
                            javascript(JS_ONLOADERROR, new String[] {
                                (new StringBuilder("Init: ")).append(e.getMessage()).toString()});
                            e.printStackTrace();
            catch (Exception e) {
                javascript(JS_ONLOADERROR, new String[] {
                    (new StringBuilder("Init: ")).append(e.getMessage()).toString()});
                e.printStackTrace();
            javascript(JS_ONLOAD, null);
        /** This method is called from within the init() method to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        // <editor-fold defaultstate="collapsed" desc=" C�digo Generado ">
        private void initComponents() {
            this.setSize(350, 450);
            appletPanel = new javax.swing.JPanel();
            jPanel1 = new javax.swing.JPanel();
            jTextField1 = new javax.swing.JLabel();
            jPanel2 = new javax.swing.JPanel();
            label = new javax.swing.JLabel();
            jPanel3 = new javax.swing.JPanel();
            jButton1 = new javax.swing.JButton();
            jButton2 = new javax.swing.JButton();
            setLayout(new java.awt.BorderLayout());
            appletPanel.setBackground(new java.awt.Color(255, 255, 255));
            appletPanel.setMaximumSize(new java.awt.Dimension(350, 430));
            appletPanel.setMinimumSize(new java.awt.Dimension(350, 430));
            appletPanel.setPreferredSize(new java.awt.Dimension(350, 430));
            jPanel1.setBackground(new java.awt.Color(255, 255, 255));
            jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 102, 204)));
            jTextField1.setFont(new java.awt.Font("Arial", 1, 18));
            jTextField1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
            jTextField1.setText("SIGNATURA ELECTRONICA");
            org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
            jPanel1.setLayout(jPanel1Layout);
            jPanel1Layout.setHorizontalGroup(
                jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(jPanel1Layout.createSequentialGroup()
                    .addContainerGap()
                    .add(jTextField1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 308, Short.MAX_VALUE)
                    .addContainerGap())
            jPanel1Layout.setVerticalGroup(
                jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(jPanel1Layout.createSequentialGroup()
                    .addContainerGap()
                    .add(jTextField1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 24, Short.MAX_VALUE)
                    .addContainerGap())
            jPanel2.setBackground(new java.awt.Color(255, 255, 255));
            jPanel2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 102, 204)));
            label.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
            label.setIcon(new javax.swing.ImageIcon("C:\\java\\workspaces\\cambrabcn\\firmasElectronicas\\logo.gif"));
            org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2);
            jPanel2.setLayout(jPanel2Layout);
            jPanel2Layout.setHorizontalGroup(
                jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(jPanel2Layout.createSequentialGroup()
                    .addContainerGap()
                    .add(label, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 308, Short.MAX_VALUE)
                    .addContainerGap())
            jPanel2Layout.setVerticalGroup(
                jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(jPanel2Layout.createSequentialGroup()
                    .addContainerGap()
                    .add(label)
                    .addContainerGap(229, Short.MAX_VALUE))
            jPanel3.setBackground(new java.awt.Color(255, 255, 255));
            jPanel3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 102, 204)));
            //this.jButton1.setVisible(false);
            //this.jButton2.setVisible(false);
            jButton1.setText("Seg\u00fcent");
            jButton1.setAlignmentX(0.5F);
            //Cargamos el primer formulario en el JPanel2
            loadFirstForm();
            //Modificamos el texto del bot�n y el contador de pasos.
            //this.jButton1.setText("Siguiente");
            //this.jButton1.setVisible(true);
            //this.jButton2.setVisible(true);
            jButton1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jButton1ActionPerformed(evt);
            jButton2.setText("Cancel\u00b7lar");
            jButton2.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jButton2ActionPerformed(evt);
            org.jdesktop.layout.GroupLayout jPanel3Layout = new org.jdesktop.layout.GroupLayout(jPanel3);
            jPanel3.setLayout(jPanel3Layout);
            jPanel3Layout.setHorizontalGroup(
                jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel3Layout.createSequentialGroup()
                    .addContainerGap()
                    .add(jButton1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 94, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 112, Short.MAX_VALUE)
                    .add(jButton2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 102, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap())
            jPanel3Layout.setVerticalGroup(
                jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel3Layout.createSequentialGroup()
                    .addContainerGap()
                    .add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                        .add(jButton2)
                        .add(jButton1))
                    .addContainerGap())
            org.jdesktop.layout.GroupLayout appletPanelLayout = new org.jdesktop.layout.GroupLayout(appletPanel);
            appletPanel.setLayout(appletPanelLayout);
            appletPanelLayout.setHorizontalGroup(
                appletPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(org.jdesktop.layout.GroupLayout.TRAILING, appletPanelLayout.createSequentialGroup()
                    .addContainerGap()
                    .add(appletPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                        .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addContainerGap())
            appletPanelLayout.setVerticalGroup(
                appletPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(org.jdesktop.layout.GroupLayout.TRAILING, appletPanelLayout.createSequentialGroup()
                    .addContainerGap()
                    .add(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(jPanel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(jPanel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap())
            add(appletPanel, java.awt.BorderLayout.CENTER);
        }// </editor-fold>
        private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
            this.destroy();
        private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                        
            changeForms(this.paso);
        // Declaraci�n de variables - no modificar
        private javax.swing.JPanel appletPanel;
        private javax.swing.JButton jButton1;
        private javax.swing.JButton jButton2;
        private javax.swing.JPanel jPanel1;
        private javax.swing.JPanel jPanel2;
        private javax.swing.JPanel jPanel3;
        private javax.swing.JLabel jTextField1;
        private javax.swing.JLabel label;
        // Fin de declaraci�n de variables
         * M�todo readParameters
         * M�todo que inicializa los valores de los par�metros internos, recibidos por par�metro.
        private void readParameters() throws FileNotFoundException, IOException {
             ???????????????? deleted for the forum
            addSecurityProviders();
         * M�tode loadFirstForm
         * Aquest m�tode carrega a jPanel2 el formulari que informa sobre la c�rrega dels arxius
        private void loadFirstForm(){
            //Form1 f1 = new Form1(stream, i + 1, fileURL.size(), sender.returnCurrentContentLength(), appletBackground);
            //Form1 f1 = new Form1(fileURL.size(), sender.returnCurrentContentLength());
            Form1 f1 = new Form1();
            //Lo dimensionamos y posicionamos
            f1.setSize(310, 150);
            f1.setLocation(10, 110);
            //A�adimos el formulario al JPanel que lo contendr�
            this.jPanel2.add(f1);
            //Validem i repintem el JPanel
            jPanel2.validate();
            jPanel2.repaint();
            //Descarreguem l'arxiu a signar
            *System.out.println("FormularioApplet Dentro de loadFirstForm(), antes de llamar a getDownloadFile()");*
            *byte obj[] = f1.getDownloadedFile(this.documentToSign);*
            if (obj == null){
                System.out.println("Lo que devuelve f1.getDownloadedFile(this.documentToSign) es NULL");
            else{
                System.out.println("Lo que devuelve f1.getDownloadedFile(this.documentToSign) NO es NULL");
                System.out.println("obj: " + obj.length);
            this.ftbsigned.add(obj);
            System.out.println("FormularioApplet Dentro de loadFirstForm(), despu�s de llamar a getDownloadFile()");
            //Indicamos que el primer paso ya se ha efectuado
            this.paso++;
         * M�tode changeForms
         * Aquest m�tode carrega a jPanel2 un formulari concret segons el valor de la variable global "paso"
        private void changeForms(int paso){
            /*A cada paso se cargar� en el JPanel y formulario diferente
             * Paso previo: Se realiza en la inicializaci�n, carga el formulario, descarga el archivo y muestra la barra de carga.
             * Case 1: Se carga el formulario de selecci�n de tipo de firma.
             * Case 2: Se carga el formulario de datos de la persona que firma.
            this.paso = paso;
            switch(paso){
                case 1:
                    //Creamos un objeto de formulario (seleccion de tipo de firma)
                    Form2 f2 = new Form2();
                    //Lo dimensionamos y posicionamos
                    f2.setSize(310, 185);
                    f2.setLocation(10, 110);
                    //Quitamos el formulario 1 y a�adimos el formulario 2 al JPanel
                    this.jPanel2.remove(1);
                    this.jPanel2.add(f2);
                    //Validem i repintem el JPanel
                    jPanel2.validate();
                    jPanel2.repaint();
                    //Modificamos el contador de pasos.
                    this.paso++;
                    break;
                case 2:
                    //Creamos un objeto de formulario (seleccion de tipo de firma)
                    Form3 f3 = new Form3();
                    //Lo dimensionamos y posicionamos
                    f3.setSize(310, 175);
                    f3.setLocation(15, 130);
                    //Quitamos el formulario 1 y a�adimos el formulario 3 al JPanel
                    this.jPanel2.remove(1);
                    this.jPanel2.add(f3);
                    //Validem i repintem el JPanel
                    jPanel2.validate();
                    jPanel2.repaint();
                    //Modificamos el texto del bot�n y el contador de pasos.
                    this.jButton1.setText("Finalizar");
                    this.paso++;
                    break;
                default:
                    //Finalizar el Applet
                    //C�digo que se encargue de guardar el archivo en el disco duro del usuario
                    break;
        private void addSecurityProviders() throws FileNotFoundException, IOException {
            Security.addProvider(new CryptoAPIProvider());
            if (signatureType == SIGNATURE_PDF) {
                Security.addProvider(new BouncyCastleProvider());
            else {
                Security.addProvider(new Sun());
        private File createOutputFile(String filename, int index) {
            return new File((String)outputFilename.get(index));
        protected Object javascript(String function, String args[]) throws RuntimeException {
            //Remove
            if (true) return null;
            try {
                Vector<String> list = new Vector<String>();
                if(args != null) {
                    for(int i = 0; i < args.length; i++) {
                        list.addElement(args);
    if(list.size() > 0) {
    Object objs[] = new Object[list.size()];
    list.copyInto(objs);
    return JSObject.getWindow(this).call(function, objs);
    } catch(UnsatisfiedLinkError e) {
    e.printStackTrace();
    throw new RuntimeException((new StringBuilder()).append(e).append("\nFunci�: ").append(function).toString());
    } catch(Throwable e) {
    e.printStackTrace();
    throw new RuntimeException((new StringBuilder()).append(e).append("\nFunci�: ").append(function).toString());
    return JSObject.getWindow(this).call(function, new Object[0]);
    Edited by: Kefalegereta on Oct 31, 2007 3:54 AM
    Edited by: Kefalegereta on Oct 31, 2007 4:00 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        

    Look at iOS Troubleshooting Wi-Fi networks and connections  http://support.apple.com/kb/TS1398
    iPad: Issues connecting to Wi-Fi networks  http://support.apple.com/kb/ts3304
    iOS: Recommended settings for Wi-Fi routers and access points  http://support.apple.com/kb/HT4199
    Additional things to try.
    Try this first. Turn Off your iPad. Then turn Off (disconnect power cord) the wireless router & then back On. Now boot your iPad. Hopefully it will see the WiFi.
    Go to Settings>Wi-Fi and turn Off. Then while at Settings>Wi-Fi, turn back On and chose a Network.
    Change the channel on your wireless router. Instructions at http://macintoshhowto.com/advanced/how-to-get-a-good-range-on-your-wireless-netw ork.html
    Another thing to try - Go into your router security settings and change from WEP to WPA with AES.
    How to Quickly Fix iPad 3 Wi-Fi Reception Problems
    http://osxdaily.com/2012/03/21/fix-new-ipad-3-wi-fi-reception-problems/
    If none of the above suggestions work, look at this link.
    iPad Wi-Fi Problems: Comprehensive List of Fixes
    http://appletoolbox.com/2010/04/ipad-wi-fi-problems-comprehensive-list-of-fixes/
    Fix iPad Wifi Connection and Signal Issues  http://www.youtube.com/watch?v=uwWtIG5jUxE
    ~~~~~~~~~~~~~~~
    If any of the above solutions work, please post back what solved your problem. It will help others with the same problem.
     Cheers, Tom

  • Problem in connecting JCO destination in web dynpro

    HI all,
    I was installed sneak preview of Net weaver 6.4,
    I want to do some web dynpro (java) programs which connect to back end systems.(R/3 system).
    The R/3 system which I want to connect is at remote place, i have connectivity to that R/3 system using VPN connectivity. With this I am not having any problem. Since I am able to connect using User name and password, and able to do some transactions like RZ70, etc.
    I developed an application which calls COMPANY_CODE_GET_LIST (BAPI function).
    for the above requirement what I did was
    (1)I created SLD setting.
    (a)Web as Java (I am not having any problem to
    Create this.
    (b) Web as ABAP.
    When i am trying to create
    This, there are some steps like i need to go to SAP log in and I need to run the transaction RZ70. For this i need to create an enter in visual administrator>JCO RFC Provider>runtime-->Bundles i need to create an entry for RFC destination as well as Repository.
    under RFC destination there are some fields which i need to enter those are (a)Program ID as mySLD (b) Gateway Host as 10.10.10.125 (c)Gateway service as sapgw00 (d)Number of processes as 1
    Under Repository (a) Application server host 10.10.10.125 (b)system number as 00 (c)Client number as 100 (d)Language as en (e)user as ABCD (f)password as 1234
    I haven't choused the check boxes Local bundle and Unicode and pressed the set button. So like this i created the RFC destinations. under the properties tab there is a property called RFC_DEFAULT_DESTINATION by default it was false so i made it as true. .
    I also went to SLD Data Supplier,under Runtime tab , HTTP Settings , I mentioned
    (a)Host: pava-vis75
    (b) Port: 50000
    (c) user: administrator
    (d) password: abcd1234
    RFC Settings, I mentioned as
    (a)Gateway Host: 10.10.10.125 (which is SAP R/3 system)
    (b)Gateway Service/Host: sapgw00
    CIM Client Generation settings, as
    (a)Host: pava-vis75
    (b)Port (http/https):50000
    (c) user: administrator
    (d) Password : abcd1234
    I tested the CIMClient Test by click the the button. I got the successful message.
    Then I came back to HTTP settings and clicked the button with tilted arrow mark [This triggers data transfer to system landscape directory], for this also I got a successfully message.[data transferred successfully]
    Next I been to SAPLOGON and went to RFC Destinations by using sm59 transaction. There under TCP/IP connections i been to SLD_NUC , opened this by double clicking that and under Technical settings for Program ID I had given the ID which I created at visual administrator [JCO RFC Provider] which is mySLD , under gateway options for Gateway Host as 10.10.10.125and Gateway service as sapgw00 then i tested the connection, it was also successfully.
    Then I opened the SLDAPICUST and i created a new entry for maintaining the SLD Access Data by giving some couple of entries as
    (a)Alias: vissldtest
    (b)Host Name: pava-vis75
    (c)Port: 50000
    (d) user: administrator
    (e) password: abcd1234
    Then saved it.
    Next I created sapmsUV0 3600/tcp entry at
    WINDOWS\system32\drivers\etc\services file, and also there are some required entries which are already existing those are sapgw00 3300/tcp to sapgw99 3399/tcp , another entry starts from sapdp00s 4700/tcp to sapdp99s 4799/tcp , next entry starts from sapgw00s 4800/tcp to sapgw99s 4899/tcp and sapmsJ2E 3601/tcp .
    I restarted the system, as well as server.
    Now my problem is when I was trying to create JCO destination at web dynpro content administrator. For that I navigated as “create JCO Destination &#61664;Deployed Content&#61664;local-&#61664;local/CompanyCodeGetList-&#61664;Applications&#61664; CompanyCodeGetList
    I Choosed the JCO Connections tab-&#61664; there are 2 entries those are
    (1) COMPANY_CODE_MODEL
    (2) COMPANY_CODE_RFC_METADATA
    So I started creating connection for COMPANY_CODE_RFC_METADATA.
    First one is
    General data Name : COMPANY_CODE_RFC_METADATA
    Client : 100
    I didn’t changed any default JCo pool configuration.
    J2EE Cluster
    There is a check box called “Use Local J2EE engine J2E on pava-vis75’ so I choosed that.
    Connection Type
    Dictionary Meta Data and application Data
    I choosed the first one.
    Then
    Msg. Server Connection
    Security
    After these, I tried to test the connection by clicking the ‘Test Connection.
    It is saying the error as
    First time
    com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: Connect to message server host failed Connect_PM TYPE=B MSHOST=v011 GROUP=DEFAULT R3NAME=UV0 MSSERV=sapmsUV0 PCS=1 ERROR service 'sapmsUVO' unknown TIME Fri Jul 01 07:20:41 2006 RELEASE 640 COMPONENT NI (network interface) VERSION 37 RC -3 COUNTER 1
    second time
    com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: Connect to message server host failed Connect_PM TYPE=B MSHOST=v011 GROUP=DEFAULT R3NAME=UV0 MSSERV=sapmsUV0 PCS=1 ERROR service '?' unknown TIME Fri Jul 01 07:20:41 2006 RELEASE 640 COMPONENT NI (network interface) VERSION 37 RC -3 COUNTER 1
    Can any body please help me to solve this problem.
    From past 1 week on wards I have been trying to resolve this. But in vain.

    It does not necessarily mean that you have to change that parameter. I read that blog as I had a similar problem, and after reading it and understanding the reasons and possible causes for the error, I found that my particular problem was that I was using "PUBLIC" as the logon group in my JCO destinations, but such a group does NOT exist at my backend. I went to transaction SMLG, had a look at Logon Groups, noted that there were none other than SPACE, figured out that I had to include that information in SLD (Web AS ABAP tech. system --> Message Server --> Logon Groups), put it there. Voilá. It works.
    Edit: That SPACE logon group is the one I had to use at JCO destinations. Sorry I forgot to mention that one...
    Regards,
    Eduardo.
    Message was edited by: Jesus Cil

  • A problem with struts -  DispatchAction class

    Hi,
    I am facing a problem with DispatchAction class in struts 1.1.
    Here is my senario:
    I have a two classes that extend DispatchAction - classA and classB.
    In classA, I have a start method. In classB, I have two methods - display and submit.
    When my application starts, my index.jsp does a logic:forward to the struts-config.xml file.
    e.g.:
    index.jsp<logic:forward name="startApp"/>
    struts-config.xml<form-beans>
         <form-bean name="testFormBean" type="package.testFormBean">
         </form-bean>
    </form-beans>
    <global-forwards>
         <forward name="startApp" path="/startApp.do?method=start"/>
    </global-forwards>
    <action-mappings>
         <action name="testFormBean"
    path="/startApp"
    parameter="method"
    validate="false"
    scope="request"
    type="package.StartAppActions">
         <forward name="successOneUser" path="/runSearch.do?method=display"/>
         </action>
         <action name="testBean"
    path="/runSearch"
    parameter="method"
    validate="false"
    scope="request"
    type="package.SearchActions">
                   <forward name="success" path="/html/jsps/success.jsp"/>
         </action>
    </action-mappings>
    when my application starts, the control goes to the index.jsp and then because of the logic forward goes to the start method of the /startApp action(i.e. the StartAppActions class). I return a ActionForward element with the value of "successOneUser".
    Uptill this point everything works fine.
    But now it should go the /runSearch element (i.e. SearchActions class) and the display method of it. But it is not going there. The error I am getting is action[runSearch] does not have a method named "start".
    I checked the value for the method parameter using the RAD/WSAD debugger, the value of parameter is "method" is still "start".
    I do not understand why it is not overiding the value of parameter "method" with display even though I am doing a
    <forward name="successOneUser" path="/runSearch.do?method=display"/> in the /startApp element, which should send the control to the display method of the [runSearch] element (i.e. in the startActions class).
    Can anyone tell me what the problem is ?
    Thanks in advance.
    kaushal

    Try this:
    Runtime.getRuntime().exec("your_batch_file.bat");
    where your_batch_file is:
    SET CLASSPATH=....(place all needed classes here)
    javac.exe filename
    must work,but there is some limitation...
    you must think to solve this problems.
    i hope that will help,
    Marius

  • SerialVersionUID problem with third party class

    Hello,
    One of our projects is using java 6 (that won't change). We need to use some third party APIs which is developped using java 5, and I guess some wild rmi implementation.
    If I try to use this api from a java 5 project, no problem.
    If I try to use it from java 6, I got this exception.
    Is there something I could try (workaround, something I can tell the api provider to fix, ...)?
    "C:\Program Files\Java\jdk1.6.0_01\bin\javaw.exe" -client -classpath D:\dev\TestAde\Project1\classes;D:\dev\TestAde\Project1\lib\ADEAde.jar;D:\dev\TestAde\Project1\lib\ADEConfig.jar;D:\dev\TestAde\Project1\lib\ADEJDom.jar;D:\dev\TestAde\Project1\lib\ADEMisc.jar;D:\dev\TestAde\Project1\lib\ADEStubs.jar project1.Test
    Exception in thread "main" java.lang.RuntimeException: Unable to connect to the server : java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
    java.io.InvalidClassException: sun.rmi.server.UnicastRef; local class incompatible: stream classdesc serialVersionUID = -9213327104222131866, local class serialVersionUID = 8258372400816541186
    at com.adesoft.config.ServerLocation.getRemoteConfig(Unknown Source)
    at com.adesoft.config.ConfigManager.getRemote(Unknown Source)
    at com.adesoft.config.ConfigManager.getProperty(Unknown Source)
    at com.adesoft.login.WebSessions.<init>(Unknown Source)
    at com.adesoft.login.WebSessions.getInstance(Unknown Source)
    at com.adesoft.beans.SessionBean.setLogin(Unknown Source)
    at project1.Test.main(Test.java:14)
    Process exited with exit code 1.

    The serialVersionUID of sun.rmi.server.UnicastRef in 1.5 is -9213327104222131866L. Strangely it isn't defined in the source code, just left to be calculated at runtime.
    I recommend you first search all your JAR files on both client and server, apart from the Java rt.jar of course, for classes in java.rmi.* and sun.rmi.*. If you find any class in these packages, or indeed in sun.* or java.*, complain loudly to the supplier, and try deleting them.
    If you don't find any such thing, I would then report this as a bug to Sun and I would also post it to the RMI-USERS mailing list where you will probably get a very rapid response.

  • Problem in creating Rule Class

    I am trying to build a Rules Application..I am totally a novice in this..Following the examples given in documentation i am trying to do it..
    These are the steps i have donr till now..
    CREATE or REPLACE TYPE Account_History AS OBJECT (
    Account_Id VARCHAR2(20),
    Transaction_Month DATE,
    AvgCash_NonCashTxnRatio FLOAT);
    CREATE or REPLACE TYPE Account_Current AS OBJECT (
    Account_Id VARCHAR2(20),
    Transaction_Month DATE,
    Cash_oNonCashTxnRatioCur_Mnth FLOAT);
    BEGIN
    DBMS_RLMGR.CREATE_EVENT_STRUCT (EVENT_STRUCT => 'AccntCompEvent');
    DBMS_RLMGR.ADD_ELEMENTARY_ATTRIBUTE (
                           EVENT_STRUCT => 'AccntCompEvent',
                           ATTR_NAME => 'Acnt_Hist',
                           TAB_ALIAS => RLM$TABLE_ALIAS('STATISTICS_MV'));
    DBMS_RLMGR.ADD_ELEMENTARY_ATTRIBUTE (
                           EVENT_STRUCT => 'AccntCompEvent',
                           ATTR_NAME => 'Acnt_Curr',
                           TAB_ALIAS => RLM$TABLE_ALIAS('CURRENT_RATIO'));
    END;
    BEGIN
       dbms_rlmgr.create_rule_class (
                   rule_class    => 'Account_Rules',
                   event_struct  => 'AccntCompEvent',
                   action_cbk    => 'RuleExecute',
                   rslt_viewnm   => 'RuleExecuteView',
                   actprf_spec   => 'Action1  VARCHAR2(20),
                                     Action2  VARCHAR2(20)',
                   rlcls_prop    => '<composite equal="Acnt_Hist.Account_Id, Acnt_Curr.Account_Id"/>');
    END;But when i am trying to create the Rule Class, i get error saying that
    Error report:
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06512: at "EXFSYS.DBMS_RLMGR", line 686
    ORA-06512: at line 2
    06502. 00000 -  "PL/SQL: numeric or value error%s"
    *Cause:   
    *Action:What is the problem in the code..Can anyone help me fix it..Please..
    I want to form a rule which checks if the Cash_oNonCashTxnRatioCur_Mnth is greater than 5 times the value in AvgCash_NonCashTxnRatio..how do i form a rule for this...Please give me some suggestions..
    Can anyone suggest me some good links where i can get more about Oracle Rules Manager..

    Please tell me, if i am creating the rules correctly ot not.. As u suggested to use &lt; instead of '<'.. When i execute the following, it asks me to enter a value for LT.. When i enter <, it throws me a XML Parser error..as follows:
    INSERT INTO ACCOUNT_RULES (rlm$ruleid, RLM$RULEDESC, rlm$rulecond)
    VALUES ('Rule1', 'DepositFollowedbyATMWithdrawalatODDTime',
    '<condition>
         <and join="Acnt_Stats_Hist.AvgCash_NonCashTxnRatio * 5 &lt; Acnt_Stats_Curr.CASH_TO_NONCASH_RATIO_CURR">
            <object name="Acnt_Stats_Hist"/>
            <object name="Acnt_Stats_Curr"/>
         </and>
      </condition>
    ');Error is
    Error starting at line 1 in command:
    INSERT INTO ACCOUNT_RULES (rlm$ruleid, RLM$RULEDESC, rlm$rulecond)
    VALUES ('Rule1', 'DepositFollowedbyATMWithdrawalatODDTime',
    '<condition>
         <and join="Acnt_Stats_Hist.AvgCash_NonCashTxnRatio * 5 &lt; Acnt_Stats_Curr.CASH_TO_NONCASH_RATIO_CURR">
            <object name="Acnt_Stats_Hist"/>
            <object name="Acnt_Stats_Curr"/>
         </and>
      </condition>
    Error report:
    SQL Error: ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00244: invalid use of less-than ('<') character (use &lt;)
    Error at line 2
    ORA-06512: at "RULES_MANAGER.RLM$VALIDATE_RULE_107363", line 92
    ORA-04088: error during execution of trigger 'RULES_MANAGER.RLM$VALIDATE_RULE_107363'
    31011. 00000 -  "XML parsing failed"
    *Cause:    XML parser returned an error while trying to parse the document.
    *Action:   Check if the document to be parsed is valid.This is the code that i am using to create the rules application:
    --STEP 1
    create or replace
    TYPE Account_Details_Curr AS OBJECT (
    ACCOUNT_ID VARCHAR2(20),
    CURRENT_TRANSACTION_DATE DATE,
    TransactionType_CURR VARCHAR2(10),
    TRANSACTION_CHANNEL_CURR VARCHAR2(10),
    TRANSACTION_MODE_CURR VARCHAR2(10),
    ABNORMALITY_REASON VARCHAR2(15),
    SUSPICIOUS_FUND_FLOW_SCORE FLOAT,
    ACCOUNT_AGE FLOAT,
    INACTIVITY_WEIGHT FLOAT,
    CREDIT_AMT_BURST_SCORE FLOAT,
    DEBIT_AMT_BURST_SCORE FLOAT,
    TRANSACTION_AMOUNT_CURR FLOAT,
    Cumm_CshAmnt_RltdAccnt_Day FLOAT,
    ACCOUNT_TURNOVER FLOAT);
    create or replace
    TYPE Account_Stats_Curr AS OBJECT (
    ACCOUNT_ID VARCHAR2(20),
    CUMM_DEPOSITTXN_CNT_CURR FLOAT,
    CUMM_DEPOSITTXN_AMNT_CURR FLOAT,
    CUMM_WITHDRAWALTXN_CNT_CURR FLOAT,
    CUMM_WITHDRAWALTXN_AMNT_CURR FLOAT,
    CUMM_ATM_DEPOSITTXN_CNT_CURR FLOAT,
    CUMM_ATM_DEPOSITTXN_AMNT_CURR FLOAT,
    CUMM_ATM_WITH_TXN_CNT_CURR FLOAT,
    CUMM_ATM_WITH_TXN_AMNT_CURR FLOAT,
    CUMM_CASH_DEPOSITTXN_CNT_CURR FLOAT,
    CUMM_CASH_DEPOSITTXN_AMNT_CURR FLOAT,
    CUMM_CASH_WITH_TXN_CNT_CURR FLOAT,
    CUMM_CASH_WITH_TXN_AMNT_CURR FLOAT,
    CUMM_CLR_DEPOSITTXN_CNT_CURR FLOAT,
    CUMM_CLR_DEPOSITTXN_AMNT_CURR FLOAT,
    CUMM_CLR_WITH_TXN_CNT_CURR FLOAT,
    CUMM_CLR_WITH_TXN_AMNT_CURR FLOAT,
    CUMM_TRS_DEPOSITTXN_CNT_CURR FLOAT,
    CUMM_TRS_DEPOSITTXN_AMNT_CURR FLOAT,
    CUMM_TRS_WITH_TXN_CNT_CURR FLOAT,
    CUMM_TRS_WITH_TXN_AMNT_CURR FLOAT,
    CUMM_TXN_CNT_CURR FLOAT,
    CUMM_TXN_AMNT_CURR FLOAT,
    CUMM_TRANSFER_TXN_CNT_CURR FLOAT,
    CUMM_TRANSFER_TXN_AMNT_CURR FLOAT,
    CUMM_CLEARING_TXN_CNT_CURR FLOAT,
    CUMM_CLEARING_TXN_AMNT_CURR FLOAT,
    CUMM_ATM_TXN_CNT_CURR FLOAT,
    CUMM_ATM_TXN_AMNT_CURR FLOAT,
    CUMM_ATMCASH_DEP_TXN_CNT_CURR FLOAT,
    CUMM_ATMCASH_DEP_TXN_AMNT_CURR FLOAT,
    CUMM_ATMCASH_WITH_TXN_CNT_CURR FLOAT,
    CUMM_ATMCSH_WITH_TXN_AMNT_CURR FLOAT,
    CUMM_ATM_CSH_TOT_TXN_CNT_CURR FLOAT,
    CUMM_ATM_CSH_TOT_TXN_AMNT_CURR FLOAT,
    CUMM_CASH_TXN_CNT_CURR FLOAT,
    CUMM_CASH_TXN_AMNT_CURR FLOAT,
    CREDIT_TO_DEBIT_RATIO_CURR FLOAT,
    DEBIT_TO_CREDIT_RATIO_CURR FLOAT,
    CASHCR_TO_NONCASHCR_RATIO_CURR FLOAT,
    CASH_TO_NONCASH_RATIO_CURR FLOAT);
    create or replace
    TYPE Account_Stats_Hist AS OBJECT (
    ACCOUNT_ID VARCHAR2(20),
    AVG_DEPOSITTXN_COUNT FLOAT,
    AVG_DEPOSITTXN_AMOUNT FLOAT,
    AVG_WITHDRAWALTXN_COUNT FLOAT,
    AVG_WITHDRAWALTXN_AMOUNT FLOAT,
    AVG_ATM_DEPOSITTXN_COUNT FLOAT,
    AVG_ATM_DEPOSITTXN_AMOUNT FLOAT,
    AVG_ATM_WITHDRAWALTXN_COUNT FLOAT,
    AVG_ATM_WITHDRAWALTXN_AMOUNT FLOAT,
    AVG_CASH_DEPOSITTXN_COUNT FLOAT,
    AVG_CASH_DEPOSITTXN_AMOUNT FLOAT,
    AVG_CASH_WITHDRAWALTXN_COUNT FLOAT,
    AVG_CASH_WITHDRAWALTXN_AMOUNT FLOAT,
    AVG_CLR_DEPOSITTXN_COUNT FLOAT,
    AVG_CLR_DEPOSITTXN_AMOUNT FLOAT,
    AVG_CLR_WITHDRAWALTXN_COUNT FLOAT,
    AVG_CLR_WITHDRAWALTXN_AMOUNT FLOAT,
    AVG_TRS_DEPOSITTXN_COUNT FLOAT,
    AVG_TRS_DEPOSITTXN_AMOUNT FLOAT,
    AVG_TRS_WITHDRAWALTXN_COUNT FLOAT,
    AVG_TRS_WITHDRAWALTXN_AMOUNT FLOAT,
    AVG_TXN_COUNT FLOAT,
    AVG_TXN_AMOUNT FLOAT,
    AVG_TRANSFER_TXN_COUNT FLOAT,
    AVG_TRANSFER_TXN_AMOUNT FLOAT,
    AVG_CLEARING_TXN_COUNT FLOAT,
    AVG_CLEARING_TXN_AMOUNT FLOAT,
    AVG_ATM_TXN_COUNT FLOAT,
    AVG_ATM_TXN_AMOUNT FLOAT,
    AVG_ATMCASH_DEP_TXN_COUNT FLOAT,
    AVG_ATMCASH_DEP_TXN_AMOUNT FLOAT,
    AVG_ATMCASH_WITH_TXN_COUNT FLOAT,
    AVG_ATMCASH_WITH_TXN_AMOUNT FLOAT,
    AVG_ATM_CSH_TOT_TXN_COUNT FLOAT,
    AVG_ATM_CSH_TOT_TXN_AMOUNT FLOAT,
    AVG_CASH_TXN_COUNT FLOAT,
    AVG_CASH_TXN_AMOUNT FLOAT,
    AVG_CREDIT_TO_DEBIT_RATIO FLOAT,
    AVG_DEBIT_TO_CREDIT_RATIO FLOAT,
    AVG_CASHCR_TO_NONCASHCR_RATIO FLOAT,
    AVG_CASH_TO_NONCASH_RATIO FLOAT);
    CREATE or REPLACE TYPE AccntsCompEvent AS OBJECT (Acnt_Details Account_Details_Curr,
                                                      Acnt_Stats_Curr Account_Stats_Curr,
                                                      Acnt_Stats_Hist Account_Stats_Hist);
    BEGIN
    dbms_rlmgr.create_rule_class (
    rule_class => 'Account_Rules',
    event_struct => 'AccntsCompEvent',
    action_cbk => 'Rules_Execution',
    rlcls_prop => '<composite equal="Acnt_Details.ACCOUNT_ID, Acnt_Stats_Curr.ACCOUNT_ID,Acnt_Stats_Hist.ACCOUNT_ID"/>');
    END;
    --STEP 3
    INSERT INTO ACCOUNT_RULES (rlm$ruleid, RLM$RULEDESC, rlm$rulecond)
    VALUES ('Rule1', 'DepositFollowedbyATMWithdrawalatODDTime',
    '<condition>
         <and join="Acnt_Stats_Hist.AvgCash_NonCashTxnRatio * 5 &lt; Acnt_Stats_Curr.CASH_TO_NONCASH_RATIO_CURR">
            <object name="Acnt_Stats_Hist"/>
            <object name="Acnt_Stats_Curr"/>
         </and>
      </condition>
    ');I am getting this error and i am not able to proceed further.. Please help me...

  • Problem in compiling servlet class - using Tomcat

    Hi,
    I have a servlet pgm that I'm trying to compile.I using Tomcat application server.I have my servlet class in D:\servlet_wrk\project1\src
    and my deployment descriptor in D:\servlet_wrk\project1\etc
    my CLASSPATH var is set to C:\Sun\AppServer\jdk\bin
    and
    my PATH var is set to C:\Sun\AppServer\bin.
    When I compile my servlet class Ch1Servlet.java in the command line from the directory
    D:\servlet_wrk\project1 using the command
    javac -classpath D:\applications\tomcat-5.5.12\common\lib\servlet-api.jar -d classes src/Ch1Servlet.java,
    it says error:cannot read: src/Ch1Servlet.java
    Can somebody help me to solve this problem and help me to compile my servlet class.
    Thanks.

    Thanks...as u said I tried putting dir & found that
    my file was saved as Ch1Servlet.java.txt instead for
    Ch1Servlet.java......So that was a problem.Now I'm
    able to compile.Oh, yeah. Notepad will do that to you. I think when you save in Notepad if you put quotes around the name "Whatever.java" then it won't add the .txt.
    But on compiling I'm getting the following error
    package java.servlet.* does not exist
    package java.servlet.http.* does not exist
    package java.io.* does not exist
    Do u the reason for this??? The servlet stuff is java[b]x.servlet. For the io stuff, I don't know, I'd have to see your code. Either you have a typo or a corrupt installation.

  • Two problems with two different classes.

    im having two problems: i get nothing with the printConferences() method inside ReferenceBook class, the arraylist size is equal to zero. and my printSchoolsAndCopies() and schoolsAndCopiesToArray() methods which are inside TextBook class, give exceptions:
    Exception in thread "main" java.lang.ArrayStoreException at java.lang.System.arraycopy(Native Method) at java.util.ArrayList.toArray(ArrayList.java:304) at project3.TextBook.schoolsAndCopiesToArray(TextBook.java:64) at project3.TextBook.printSchoolsAndCopies(TextBook.java:74) at project3.BookTester.main(BookTester.java:27) Java Result: 1 BUILD SUCCESSFUL (total time: 0 seconds)
    all you need to read is TextBook and ReferenceBook class, but i added the tester and BookCatalog, which is an arraylist of books.
    here are my TextBook and ReferenceBook classes and the tester, there are two abstract classes Book and TechnicalBook, but i wont post them unless anybody needs them, i presume not.
    * TextBook.java
    * Created on April 19, 2007, 8:02 PM
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    package project3;
    import java.util.*;
    * @author Kevin
    public class TextBook extends TechnicalBook{
        private ArrayList <String> schools;
        private ArrayList <Integer> numberCopiesForSchool;
        private String [][] schoolsAndCopies;
        public static final String TEXTBOOK = "Textbook";
        /** Creates a new instance of TextBook */
        public TextBook(String author, String title, int numberPages, int copiesSold,
                double price) {
            super(author, title, numberPages, copiesSold, price);
            schools = new ArrayList();
            numberCopiesForSchool = new ArrayList();
        public int getNumberCopiesForSchool(String school){
            Integer temp = null;
            for(int i = 0; i < schools.size();i++){
                if(schools.get(i).equals(school))
                   temp = numberCopiesForSchool.get(i);
            return temp;
        public void addSchool(String school){
            Integer one = new Integer(1);
            schools.add(school);
            // number of copies for the school is initially 1
            numberCopiesForSchool.add(one);  
        public int getNumberSchools(){
            int count = 0;
            for(int i = 0; i < schools.size(); i++){
                if(schools.get(i) != null)
                    count++;
            return count;
        public void addCopiesForSchool(String school, int copies) {
              for (int i = 0; i < schools.size(); i++) {
                        if (schools.get(i).equals(school))
                   numberCopiesForSchool.set(i, numberCopiesForSchool.get(i)
                                + (Integer) copies);
        private void schoolsAndCopiesToArray(ArrayList <String> a, ArrayList <Integer> b){
            String [] c = null;
            String [] d = null;
            c = (String[]) a.toArray(new String[a.size()]);
            d = (String[]) b.toArray(new String[b.size()]);
            String [] [] schoolsAndCopies = null;
            for(int i = 0; i < c.length;i++){
                for(int j = 0; j < d.length;j++){
                    schoolsAndCopies[i] = c;
                    schoolsAndCopies[j] = d;
        public void printSchoolsAndCopies(String title){
            schoolsAndCopiesToArray(schools, numberCopiesForSchool);
            System.out.println("---------------");
            System.out.println("Schools and copies sold to each school for " + this.title+ ".");
            System.out.println("Schools:\tCopies:");
            for(int i = 0; i < schoolsAndCopies.length;i++)
                for(int j = 0; j < schoolsAndCopies.length;j++)
    System.out.println(schoolsAndCopies [i] + "\t" +
    schoolsAndCopies[j]);
    public String getClassName(){
    return TEXTBOOK;
    // overrides TechnicalBook toString
    public String toString(){
    return "Author = " + author + ". Title = " + title + ". Number of Pages = " +
    numberPages + ". Copies Sold = " + copiesSold + ". Schools using " + title +
    ". Price = " + this.getPrice() + " = " + this.getNumberSchools() + ". ";
    * ReferenceBook.java
    * Created on April 19, 2007, 8:02 PM
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    package project3;
    import java.util.*;
    * @author Kevin
    public class ReferenceBook extends TechnicalBook{
    private ArrayList <String> conferences;
    public static final String REFERENCE_BOOK = "Reference Book";
    //private int numberConferences;
    /** Creates a new instance of ReferenceBook */
    public ReferenceBook(String author, String title, int numberPages, int copiesSold,
    double price) {
    super(author, title, numberPages, copiesSold, price);
    conferences = new ArrayList();
    public String getConference(int a){
    for(int i = 0; i < conferences.size();i++)
    if(i == a)
    return conferences.get(i);
    return null;
    public void addConference(String conference){
    for(int i = 0; i < conferences.size();i++){
    conferences.add(conference);
    break;
    public void printConferences(){
    System.out.println("-------------");
    System.out.println("Conferences made for " + this.title + ".");
    for(int i = 0; i < conferences.size(); i++){
    System.out.println("["+(i + 1) +"]: "+ conferences.get(i));
    System.out.println(conferences.size());
    public String getClassName(){
    return REFERENCE_BOOK;
    public String toString(){
    return super.toString();
    * BookTester.java
    * Created on April 19, 2007, 8:02 PM
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    package project3;
    * @author Kevin
    public class BookTester{
    /** Creates a new instance of BookTester */
    public static void main(String [] args){
    BookCatalog catalog = new BookCatalog("Library");
    TextBook java = new TextBook("John", "Java", 5, 20, 5.00);
    TextBook beans = new TextBook("Mike", "JavaBeans", 6, 21, 5.00);
    ReferenceBook ref = new ReferenceBook("Jones", "Standard Class Library", 6, 23, 5.00);
    ref.addConference("Meeting");
    ref.printConferences();
    beans.addSchool("UTSA");
    beans.printSchoolsAndCopies("c++");
    catalog.addBook(java);
    catalog.addBook(beans);
    catalog.printCatalog();
    my BookCatalog class is fine, and everything prints out with out using the listed methods that give trouble.
    * BookCatalog.java
    * Created on April 20, 2007, 4:42 PM
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    package project3;
    import java.util.*;
    * @author Kevin
    public class BookCatalog {
        private String name;
        private ArrayList <Book> bookList;
        /** Creates a new instance of BookCatalog */
        public BookCatalog(String name) {
            this.name = name;
            bookList = new ArrayList <Book>();
        public String getCatalogName(){
            return name;
        public void addBook(Book b){
            bookList.add(b);
        public void printCatalog(){
            for(int i = 0; i < bookList.size(); i ++){
                System.out.println("[" + i + "]: " + bookList.get(i).getClassName() +
                       ": " + bookList.get(i).toString());
    }thanks in advance

    everything runs now, but it doesnt sort them. it prints them in the original order: here is the revised BookCatalog and Tester, also when making sortByTitle static it gives non static variable errors so i have no idea. Thanks for helping me fix the errors, i have no idea why it doesnt sort.
    * BookCatalog.java
    * Created on April 20, 2007, 4:42 PM
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    package project3;
    import java.util.*;
    * @author Kevin
    public class BookCatalog {
        private String name;
        private ArrayList <Book> bookList;
        //private Book [] bookList2;
        /** Creates a new instance of BookCatalog */
        public BookCatalog(String name) {
            this.name = name;
            bookList = new ArrayList <Book>();
        public String getCatalogName(){
            return name;
        public void addBook(Book b){
            bookList.add(b);
            public void sortByTitle(ArrayList<Book> list){
          if (bookList.size() > 1)
            for (int index = 1; index < bookList.size(); index++)
               insertItemByTitle(bookList, index);
         private void insertItemByTitle(ArrayList <Book> bookList, int index) {
                Book key = bookList.get(index);
                int position = index;
                while (position > 0 && key.getTitle().compareTo(bookList.get(index).getTitle()) < 0)   {
                    bookList.set(position, bookList.get(position-1));// = bookList.set(position-1, key);
                   position--;
                bookList.set(position, key);
        public void printCatalog(){
            sortByTitle(bookList);
            Book [] bookList2 = (Book[])bookList.toArray(new Book[bookList.size()]);
            for(int i = 0; i < bookList2.length; i ++){
                System.out.println("[" + (i+1) + "]: " + bookList2.getClassName() +
    ": " + bookList2[i].toString());
    * BookTester.java
    * Created on April 19, 2007, 8:02 PM
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    package project3;
    * @author Kevin
    public class BookTester{
    /** Creates a new instance of BookTester */
    public static void main(String [] args){
    BookCatalog catalog = new BookCatalog("Library");
    TextBook java = new TextBook("John", "Java", 5, 20, 5.00);
    TextBook beans = new TextBook("Mike", "JavaBeans", 6, 21, 5.00);
    ReferenceBook ref = new ReferenceBook("Jones", "Standard Class Library", 6, 23, 5.00);
    ref.addConference("Meeting");
    ref.printConferences();
    beans.addSchool("UTSA");
    //beans.printSchoolsAndCopies("c++");
    catalog.addBook(ref);
    catalog.addBook(java);
    catalog.addBook(beans);
    catalog.printCatalog();

  • Problems Creating a Java Class using a webservice with certificate

    hi,
    i'm developing a java class that call's a webservice that needs a certificate, i'm not used to work with java, last time was 10 years ago, so i'm having some troubles because of the certificate.
    I already add the certificate using java control panel > Security > Certificates. When testing i get the following error: IOException (java.io.IOException: subject key, Unknown key spec)
    I think I need to define the certificate in my class, but i'm having a lots of trouble with the samples that i found over the internet, nothing works and i'm running out of time.
    This is my Class
    create or replace and compile java source named "FishInfoAt" as
    import java.net.*;
    import java.io.*;
    import java.security.*;
    public class FishInfoAt
         public FishInfoAt()
         public static String send(String urlfishinfoat, String mensagem, String mensagem1, String mensagem2, String mensagem3)
              // Init
              String response = "";
              String msgtotal = mensagem+mensagem1+mensagem2+mensagem3;
              String a = "";
              HttpURLConnection conn = null;
              try{
                   URL url = new URL(urlfishinfoat);
                   conn = (HttpURLConnection) url.openConnection();
                   conn.setRequestMethod("POST");
                   conn.setRequestProperty("Content-type", "text/xml; charset=utf-8");
                   conn.setRequestProperty("SOAPAction", "https://servicos.portaldasfinancas.gov.pt:401/sgdtws/documentosTransporte/");
                   conn.setRequestProperty("Content-Length","" + msgtotal.length());
                   conn.setDoOutput(true);
                   conn.setDoInput(true);
                   conn.connect();
                   OutputStream out = conn.getOutputStream();
                   out.write(msgtotal.getBytes());
                   out.flush();
                   InputStream in = conn.getInputStream();
                   int value;
                   while( (value = in.read()) != -1)
                        response+=(char)value;
              catch(Exception e)
    response = ("*** ERROR - IOException (" + e.getMessage() + a + ")");
    return response;
    /

    Hi Deepak,
    Could you please let us know upto which line your code is going safe. Try printing the value in the structure before you send that to the method GetUGEntity().
    I am not too sure that would be a problem. But I have faced a problem like this, wherein I tried to access a structure for which I have not allocated memory and hence got exception because of that.
    Since your JNI code seems to be error free, I got doubt on your C part. Sorry.
    Dhamo.

  • Problems with java.lang.Class in JDK1.3

    Hi,
    I have 3 problems with the reflection in java.lang.Class:
    1) In the specification of method java.lang.Class.getDeclaredFields() is wrote:
    "Returns .... This includes public, protected, default (package) access, and private fields ..."
    This means, that all private fields should be return too. But some private methods are not given back. ????
    2) In java.lang.Class.getDeclaredMethods()
    some public methods are not return. ????
    3) In java.lang.Class.getDeclaredMethods()
    If Class is an interface. The same problem like 2) ????
    Are they errors of java.lang.Class in JDK1.3 ????
    Thanks & sincerely.

    Not sure it makes a difference, but you left off the last part of the quote:
    This includes public, protected, default (package) access, and private classes and interfaces declared by the class, but excludes inherited classes and interfaces.
    Are these missing methods from inherited classes, or are they declared in the class itself?

  • Problems building JavaDoc of classes using Hibernate/javax.persistence

    Hallo!
    I am trying to create the javadoc of classes that use hibernate. First it starts of with error messages like
      [javadoc] SubmissionSet.java:40: cannot find symbol
      [javadoc] symbol: class Table
      [javadoc] @Table(name="submissionset"/*, schema = "reg"*/)or
      [javadoc] Employee.java:8: package javax.persistence does not exist
      [javadoc] import javax.persistence.JoinColumn;
      [javadoc]                         ^Afterwards it gets even strange with exceptions within javadoc like:
    [javadoc] java.lang.ClassCastException: com.sun.tools.javadoc.ClassDocImpl cannot be cast to com.sun.javadoc.AnnotationTypeDoc
      [javadoc]     at com.sun.tools.javadoc.AnnotationDescImpl.annotationType(AnnotationDescImpl.java:46)
      [javadoc]     at com.sun.tools.doclets.internal.toolkit.util.Util.isDeprecated(Util.java:811)
      [javadoc]     at com.sun.tools.doclets.formats.html.TagletWriterImpl.deprecatedTagOutput(TagletWriterImpl.java:70)
      [javadoc]     at com.sun.tools.doclets.internal.toolkit.taglets.DeprecatedTaglet.getTagletOutput(DeprecatedTaglet.java:40)
      [javadoc]     at com.sun.tools.doclets.formats.html.MethodWriterImpl.writeDeprecated(MethodWriterImpl.java:166)
      [javadoc]     at com.sun.tools.doclets.internal.toolkit.builders.MethodBuilder.buildDeprecationInfo(MethodBuilder.java:183)
      [javadoc]     at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
      [javadoc]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      [javadoc]     at java.lang.reflect.Method.invoke(Method.java:597)
      [javadoc]     at com.sun.tools.doclets.internal.toolkit.builders.MethodBuilder.invokeMethod(MethodBuilder.java:109)
      [javadoc]     at com.sun.tools.doclets.internal.toolkit.bu    at java.lang.reflect.Method.invoke(Method.java:597)
      [javadoc]     at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:215)
      [javadoc]     at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:91)
      [javadoc]     at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:340)
      [javadoc]     at com.sun.tools.javadoc.Start.begin(Start.java:128)
      [javadoc]     at com.sun.tools.javadoc.Main.execute(Main.java:41)
      [javadoc]     at com.sun.tools.javadoc.Main.main(Main.java:31)I suppose the problem is somehow linked to the usage of hibernate since the same ant script works for other projects (that don't use hibernate...). Do you have an idea what could be wrong?
    Thanks in advance
    Patrick

    See [http://forums.sun.com/thread.jspa?threadID=5333060&tstart=0]. In general, if you use third-party libraries in your code, you should include these libraries in Javadoc's classpath option when generating documentation.

  • Problem in finding java class file

    I am writting an application using servlets , JSP and a simple java classfile. The simple java class file is for connection pool and the name of connection pool class is DBConnectionManager . I am using JavaWebserver2.0 and I have placed this class file in .\JavaWebserver2.0\classes
    I am placing my servlets in .\JavaWebserver2.0\servlets folder. Since I am using wfm package so my servlets are placed in .\JavaWebserver2.0\servlets\wfm .
    The problem is with compiling the servlet placed in wfm folder . I get the following error:-
    TestServlet.java:11:cannot resolve symbol
    symbol: class DBConnectionManager
    location: class wfm.TestServlet
    However when I try to compile this class in servlets folder and remove the package statement from the source file, it compiles and works very fine. I am having lot of confusion as the class DBConnectionManager is in classpath but even then compiler gives error. The same class when placed in servlets folder and package statement is removed works very fine.
    Kindly help.

    Hi,
    Is the DBConnectionManager class declared public?
    Does the TestServlet import the package that contains the DBConnectionManager?
    This is all I can come up with, with the current information.
    Cheers,
    --Arnout                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • EJB deployment problem --New remote interface class files are not loaded

    Hi, I face a problem while deploying an ear file in oc4j. I basically get some problems like the method in the remote interface is not implemented in the EJB class. But the implementation is actually available in the EJB class.
    We get this problem when we actually change the signature of the EJB remote methods. The new methods are not referenced by oc4j. Only the old version of remote interface is referenced by oc4j. But the latest version of EJB class is taken. I am using 9.0.3 version of the oc4j. Could you pls help me regarding this problem ?
    Regards
    Solomon

    I have found the solution :-)
    You must add to the ejbCreate() method of the bean class throws javax.ejb.CreateException

Maybe you are looking for

  • My ipod 5th generation charges when connected to my PC but not recognised in itunes with windows 8.1

    Why is my ipod 5th generation not recognised in itunes in windows 8.1?Connection to my PC only charges the battery.

  • IMPORT TAKES LONG TIME THAN EXPORT

    Hi, My database is of BANNER Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi PL/SQL Release 10.2.0.4.0 - Production CORE     10.2.0.4.0     Production TNS for Solaris: Version 10.2.0.4.0 - Production NLSRTL Version 10.2.0.4.0 - Produ

  • Synchronisation problems

    I have recently upgraded to windows 7 ultimate on tow of my laptops. The one is an HP 4510s and I have no problem synchronising with my Nokia N97 using PC suite 7.1.40.1. However when I try and synchronise with my other Laptop an Asus F5RL  with the

  • Dreamweaver CS4 wont load

    Dreamweaver CS4 wont load - I get a runtime error with the following message. The application has requested the runtime to terminate in an unusual way. I am running Windows 7. This error came out of the blue. Does anyone have any suggestions on how t

  • Help! Need driver for Lenovo webcam model 12-80401

    Can anyone give me a link where i can download the driver software for my webcam? I just re-imaged my laptop before going out of town and loaded all my software except that :-( Thanks, Bruce