Problems with generating persistent classes

I've been following the tutorial for generating persistent classes from a
DB. I'm not having much luck:
First, with rd-schemagen, how do you tell it to only work on a specific
schema? I run "rd-schemagen -file schema.xml NBS_ODS_101", but it still
generates the schema file for all schemas in the DB. Is there a usage
option for the tool (I haven't been able to find it yet)?
Second, I have the following tables in my DB: ACT, ACT_ID, ENTITY,
ENTITY_ID. When rd-reversemappingtool runs on these tables, it creates an
ID class for ACT (ActId) which conflicts with the class generated for
ACT_ID (ActId). Since renaming the tables is not an option and I really
don't want to have to rename classes and change the mapping file every
time I regenerate, what is a solution for this problem?
Third, if I do the latter above so I can run the importtool and then I
run "rd-importtool test\test.mapping", it runs successfully for a bit
while spitting out information until I get this:
Exception in thread "main" java.lang.NullPointerException
at
com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.mapForeignKe
y(ImportTool.java:336)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.mapField(Imp
ortTool.java:207)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.importMappin
gs(ImportTool.java:78)
at com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.run
(ImportTo
ol.java:408)
at com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.main
(ImportT
ool.java:385)

Abe White <[email protected]> wrote in
news:[email protected]:
First, with rd-schemagen, how do you tell it to only work on a specific
schema? I run "rd-schemagen -file schema.xml NBS_ODS_101", but it still
generates the schema file for all schemas in the DB. Is there a usage
option for the tool (I haven't been able to find it yet)?Try using -schemas <comma-separated list of schema names>
I apologize for the documentation in this area. We're going to upgrade
the tool and the documentation to a more recent version from our internal
R&D codebase when our 2.5 release comes out in the next couple of weeks.
This release will also include a system for customizing the tool's output
in many more ways.This works:
rd-schemagen -file schema.xml -indexes false -schemas NBS_ODS_101
but this does not:
rd-schemagen -file schema.xml -indexes false -schemas NBS_ODS_101,NBS_SRT_
101
Exception in thread "main" java.lang.IllegalArgumentException:
com.solarmetric.r
[email protected] = NBS_ODS_
101,NBS_SRT_10
1: java.lang.ArrayIndexOutOfBoundsException: 1
at serp.util.Options.setInto(Options.java:206)
at serp.util.Options.setInto(Options.java:168)
at com.solarmetric.rd.conf.Configurations.populateConfiguration
(Configur
ations.java:144)
at com.solarmetric.rd.kodo.impl.jdbc.schema.SchemaGenerator.main
(SchemaG
enerator.java:690)
Second, I have the following tables in my DB: ACT, ACT_ID, ENTITY,
ENTITY_ID. When rd-reversemappingtool runs on these tables, it creates
an ID class for ACT (ActId) which conflicts with the class generated for
ACT_ID (ActId)This is a bug, and will also be fixed with 2.5. I can't even think of a
good way to tell you to work around it for now, unfortunately.I renamed the ID classes to ActOid and EntityOid and changed the .jdo file
to reflect that. Do you see any problems with this strategy?
Third, if I do the latter above so I can run the importtool and then I
run "rd-importtool test\test.mapping", it runs successfully for a bit
while spitting out information until I get this:
Exception in thread "main" java.lang.NullPointerExceptionCan you please send the generated .mapping, .jdo, and .java files?
Unless you want to wait until the 2.5 improvements to debug.I will send you all the files in a zip file by email.

Similar Messages

  • ""selected font failed during last operation." and " there is a problem with generator" application error

    For PSDs I have created in older versions of Photoshop CC 2014 I am getting errors when opening / trying to save. They seem to be either Generator or font related. Interestingly, PSDs created in newer versions of PS CC 2014 have no issues, even when using same fonts.
    I am getting the error messages:
    When I open the older PSD files, (again created or saved in older versions of PS CC 2014) I am asked to update fonts. If I do I get the error.
    'Selected font failed during last operation'
    When I try to don't try to update fonts and then I try to play with the file I get the following error.
    'There is a problem with Generator. Please quit Photoshop and try again. If the problem persists, remove any third-party plugins or try re-installing photoshop.
    I don't have any third party plugins that I can see.
    I have re-installed multiple times.
    I need to use this program and I am paying for your services. I am actually on the phone now with 'help desk' and have been on hold for 22 minutes.
    Please Help

    When I installed the Apple programs, mobile device application did not uninstall by itself. I had to go to c://program files/common files/apple/mobile device application (or something like that) and manually delete the contents and the folders. I have a 64 bit version so I also had to visit c://program files (x86)/common files/apple/mobile application device (or similar) and also manually delete the files and folders. I had to delete the files before I could delete the folders. This manual part is probably tripping everyone up, because it's not as easy as simply hitting uninstall in the control panel. But the instructions are there. I hope this helps you.

  • Problem with generating xml and nested cursor (ora-600)

    I have a problem with generating xml (with dbms_xmlquery or xmlgen) and nested cursors.
    When I execute the following command, I get a ORA-600 error:
    select dbms_xmlquery.getxml('select mst_id
    , mst_source
    , cursor(select per.*
    , cursor(select ftm_fdf_number
    , ftm_value
    from t_feature_master
    where ftm_mstr_id = pers_master_id ) as features
    from t_person per
    where pers_master_id = mst_id ) as persons
    from f_master
    where mst_id = 3059435')
    from dual;
    <?xml version = '1.0'?>
    <ERROR>oracle.xml.sql.OracleXMLSQLException: ORA-00600: internal error code, arguments: [kokbnp2], [1731], [], [], [], [], [], []
    </ERROR>
    The problem is the second cursor (t_feature_master).
    I want to generate this:
    <master>
    <..>
    <persons>
    <..>
    <features>
    <..>
    </features>
    </persons>
    <persons>
    <..>
    <features>
    <..>
    </features>
    </persons>
    </master>
    If i execute the select-statement in sql-plus, then I get the next result.
    MST_ID MST_SOURCE PERSONS
    3059435 GG CURSOR STATEMENT : 3
    CURSOR STATEMENT : 3
    PERS_MASTER_ID PERS_TITLE PERS_INITI PERS_FIRSTNAME PERS_MIDDL PERS_LASTNAME
    3059435 W. Name
    CURSOR STATEMENT : 15
    FTM_FDF_NUMBER FTM_VALUE
    1 [email protected]
    10 ....
    I use Oracle 8.1.7.4 with Oracle XDK v9.2.0.5.0.
    Is this a bug and do somebody know a workaround?

    Very simple...Drop all type objects and nested tables and create them again. You will get no error. I'll explain the reason later.

  • Problem with generate sine 50 Hz

    I have a problem with generate sine voltage with freq 50 Hz.
    I form waveform with this frequency and sent in to the "AO Write" with update rate equal waveform lenght*frequency. And so I have a cycle of my program 20 ms, but I need a cylce 5 ms.
    How I can make it right?
    I forming my waveform "Basic Function Generator" with sampling Info equal my waveform lenght.
    Message Edited by Unk on 09-28-2005 02:36 PM

    The
    amplitude
    phase
    frequency
    of the signal are independent parameters.
    You can generate the relevant signal using Basic Function Generator VI, then supply this waveform to your AO operation (DAQmx write is polymorphic and allows you to use a waveform directly as the input - those guys at NI are clever )

  • 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

  • Can't fill ByteArray in EJB-Method with generated Model-Class from WD-Model

    Hello everybody,
    i try to call an ejb-method with data from an FileUpload-UI-Element in WD. The EJB-Method is receiving the byte-data to create a document in KM via a Web-Service.
    The ebj-methid has the following signature:
    public FObject putFileDataSimple (byte [] btContent, String fullFileName, String username, String password)
    After importing the Model and creating a context node i have the following structure:
    Request_X_putFileDataSimple
    +---btContent (Node)
          +-- item
    + fullFileName
    + username
    + password
    btContent is of the generated Type Byte_Item, which is itself a generated Model-Class of modelClassType ARRAY
    item is of Type byte
    But i simply have problems to fill the context node (or the binded model-object). i tried different ways and looked at thread [https://www.sdn.sap.com/irj/scn/thread?messageID=1954223] but i cant get it work.
    So my Method in WD looks like this to fill the structure and start the ejb-method:
    public boolean putKMDataSimple( com.sap.tc.webdynpro.services.sal.datatransport.api.IWDResource fin )  {
    try
      wdContext.currentRequest_X_putFileDataSimpleElement().setFullFileName("abc");
      wdContext.currentRequest_X_putFileDataSimpleElement().setUsername("def");
      wdContext.currentRequest_X_putFileDataSimpleElement().setPassword("xxx");
      byte[] buffer = new byte[1];
      InputStream in = fin.read(false);
      int i = 1;
      int j = 0;
      while (i!=-1)
         i = in.read(buffer);
         if (i!=-1)
           Byte_Item bi = new Byte_Item(mAlf);     // mAlf ist global defined Model-Class-Instance
           bi.setItem(buffer[0]);
            wdContext.currentRequest_X_putFileDataSimpleElement().modelObject().addBtContent(bi);
      wdContext.currentRequest_X_putFileDataSimpleElement().modelObject().execute();
    Doing this results in Error-Messages like:
    Model-Object is not a complex type for every byte added this way.
    And finally an IllegalArgumentException at java.lang.reflect.Array.set(Native Method)
    The second way i tried is:
    public boolean putKMDataSimple( com.sap.tc.webdynpro.services.sal.datatransport.api.IWDResource fin )  {
    try
      wdContext.currentRequest_X_putFileDataSimpleElement().setFullFileName("abc");
      wdContext.currentRequest_X_putFileDataSimpleElement().setUsername("def");
      wdContext.currentRequest_X_putFileDataSimpleElement().setPassword("xxx");
      byte[] buffer = new byte[1];
      ArrayList<Byte> btlist = new ArrayList<Byte>();
      InputStream in = fin.read(false);
      int i = 1;
      int j = 0;
      while (i!=-1)
         i = in.read(buffer);
         if (i!=-1)
              btList.add(buffer[0]);
      wdContext.currentRequest_X_putFileDataSimpleElement().modelObject().setBtContent(btList);
      wdContext.currentRequest_X_putFileDataSimpleElement().modelObject().execute();
    Trying so results in:
    java.lang.ClassCastException: class java.lang.Byte:null incompatible with interface com.sap.tc.cmi.model.ICMIModelClass:library:com.sap.tc.cmi(at-sign)[email protected]@alive
    whenn calling the setBtContent Method
    I don't what to do now to fill the context/model-object the right way.
    Any helpfull hints are very welcome
    Edited by: Matthias Hayk on Dec 1, 2008 5:51 PM
    Edited by: Matthias Hayk on Dec 2, 2008 10:56 AM

    Ok Vesselin and thanx for your idea,
    so i adapted the source in the way you told like the following:
                     ArrayList<Byte_Item> btlist = new ArrayList<Byte_Item>();
                     byte[] buffer = new byte[1];
                     InputStream in = fin.read(false);
                     int i = 1;
                     int j = 0;
                     while (i!=-1)
                          i = in.read(buffer);
                          if (i!=-1)
                               // Byte gelesen
                               Byte_Item bi = new Byte_Item(mAlf);
                               bi.setItem(buffer[0]);
                               btlist.add(bi);
                               j++;
                     wdContext.currentRequest_X_putFileDataSimpleElement().modelObject().setBtContent(btlist);     
                     wdContext.currentRequest_X_putFileDataSimpleElement().modelObject().execute();
    This results also in the following Exception when exceuting the WS-proxy:
    execute
    [EXCEPTION]
    java.lang.IllegalArgumentException
    at java.lang.reflect.Array.set(Native Method)
    at com.sap.tc.webdynpro.model.ejb.model.EJBGenericModelClassExecutable.getInputParameters(EJBGenericModelClassExecutable.java:215)
    at com.sap.tc.webdynpro.model.ejb.model.EJBGenericModelClassExecutable.execute(EJBGenericModelClassExecutable.java:112)

  • 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

  • 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 with my new class

    Hi all,
    I had a small applet that included a control panel and an Animation Panel for display. The Animation Panel was a seperate class which just had a table display. (AnimationPanel class)
    When the user selected one of the buttons from the controls I could display text in the table. e.g in the main class...
    AnimationPanel anim = new AnimationPanel();
    anim.animationTable.setValueAt("Hello",2,i);
    The problem with this was that the table was editable (which I didnt want), so following the java tutuorial I modified my AnimationPanel to include another class which creats the JTable and extends AbstractTableModel.
    Now I have the problem that when the user clicks a button as above I am getting huge errors and does not write to the cell.
    Could someone please tell me how I would be able to write to my table if the user clicks a button in my main applet class.
    Here is the seperate class that sets up the table etc...
    class MyAnimationTable extends AbstractTableModel {
    Object[][] data = {
    {"Carry: "," "," ", " ",
    {"X: "," ","0", "0",
    "0", "0", "0", "0", "0", "0"},
    {"Y: "," ","0", "0",
    "0", "0", "0", "0", "0", "0"},
    {"Sum: "," "," ", " ",
    String[] columnNames = {" ",
    "-128",
    "64 ",
    "32 ",
    "16",
    "8",
    "4",
    "2",
    "U"};
    /*animationTable = new JTable(data, columnNames);
    JScrollPane scrollPane = new JScrollPane(animationTable);
    animationTable.setPreferredScrollableViewportSize(new Dimension(400, 210));
    add(scrollPane);*/
    public int getColumnCount() {
    return columnNames.length;
    public int getRowCount() {
    return data.length;
    public String getColumnName(int col) {
    return columnNames[col];
    public Object getValueAt(int row, int col) {
    return data[row][col];
    * JTable uses this method to determine the default renderer/
    * editor for each cell. If we didn't implement this method,
    * then the last column would contain text ("true"/"false"),
    * rather than a check box.
    public Class getColumnClass(int c) {
    return getValueAt(0, c).getClass();
    * Don't need to implement this method unless your table's
    * editable.
    public boolean isCellEditable(int row, int col) {
    //Note that the data/cell address is constant,
    //no matter where the cell appears onscreen.
    if (col < 2) {
    return false;
    } else {
    return true;
    * Don't need to implement this method unless your table's
    * data can change.
    //anim.animationTable.setValueAt(" ",5,i);
    public void setValueAt(Object value, int row, int col) {
    /*if (DEBUG) {
    System.out.println("Setting value at " + row + "," + col
    + " to " + value
    + " (an instance of "
    + value.getClass() + ")");
    data[row][col] = value;
    fireTableCellUpdated(row, col);
    //if (data[0][col] instanceof Integer
    // && !(value instanceof Integer)) {
    //With JFC/Swing 1.1 and JDK 1.2, we need to create
    //an Integer from the value; otherwise, the column
    //switches to contain Strings. Starting with v 1.3,
    //the table automatically converts value to an Integer,
    //so you only need the code in the 'else' part of this
    //'if' block.
    //XXX: See TableEditDemo.java for a better solution!!!
    /*try {
    data[row][col] = new Integer(value.toString());
    fireTableCellUpdated(row, col);
    } catch (NumberFormatException e) {
    JOptionPane.showMessageDialog(AnimationPanel.this,
    "The \"" + getColumnName(col)
    + "\" column accepts only integer values.");
    // } else {
    data[row][col] = value;
    fireTableCellUpdated(row, col);
    /*if (DEBUG) {
    System.out.println("New value of data:");
    //printDebugData();

    Thanks, that works when I do this from current dir (C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\servlets-example
    \WEB-INF\classes) :
    set CLASSPATH=.;%CLASSPATH%
    And I have to put the User.java file in the util directory that is located up one directory (C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\servlets-example
    \WEB-INF\classes\util).
    package util;
    import java.io.*;
    import java.text.*;
    import java.util.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    import util.User;But it still wont work from the num directory that I had in my original question. I tried setting my classpath to point to the num package:
    Set CLASSPATH=%CLASSPATH%;C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\jsp-examples\WEB-INF\classes\num
    and it gave me same error.
    Please advise or should I just live with the servlet calling the class in the util directory and forget about the num directory?

  • Problem in generating Helper class

    Hi All,
    I have generated Helper classes using rmic -iiop tool of JDK 1.4. But the Helper class which is generating doesnot contain any bind method. So in my application, when i am trying to bind CORBA ORB with this helper class bind method, it is giving compilation error.
    When i was using Borland Server i was able to generate Helper class with bind method also using java2iiop and now i am not using Borland as we are migrating to JBoss. So i am using rmic -iiop tool.
    Can anybody suggest me what should i do for this.

    I don't think many of us could help you with such a limited description. Try to be more descriptive, and please include relevant source code if possible.

  • Problem with generating thumbnails for Facebook

    After yesterday's Business Catalyst failure (Intermittent site loading issue on all data centers) we have a problem with thumbnails for Facebook.
    Our each publication has an extra tag og:title placed in the <head>. For example in this article: http://www.leftlane.pl/lip14/zanizanie-przebiegu-samochodu-w-koncu-stanie-sie-niemozliwe.h tml
    there is tag <meta property="og:image" content="http://www.leftlane.pl/lip14/images/364994_8207.jpg" />
    Until yesterday, every published text was getting into debugger (https://developers.facebook.com/tools/debug/). Debugger fetch the image creating a thumbnail. Everything worked as it should.
    Unfortunately, after yesterday's failure thumbnails are no longer generated. In place of the thumbnail is a white spot, like in the picture below. Can I do something to thumbnails work again?
    We are using Adobe Muse (2014.1).

    Just a word of warning about this facebook tester, facebook caches results for sometimes upto 48 hours, so if index the page using facebook then make a change on a page then reindex most of the time (in my dealings) it looked the same, I had to throw different querystring information into the URL or use different URLs to make it look different to facebook and get a fresh (re)index and for it to pick up changes.

  • Problem with large option class during runtime 11.5.10

    It seems like our Oracle Configurator has a problem with loading multiple large option classes with about 10,000 items under it. We are running 11.5.10. My guess is that Oracle has to load everything in the option class and at some point the server just gives up after loading so much data.
    Basically the model looks like this and was set up by Oracle themselves in 04. Overtime the option classes grew.
    --Base model
    ----Model A instance 1
    --------option class
    ------------10000 items
    ----Model A instance 2
    --------option class
    ------------10000 items
    ----Model A instance 50
    --------option class
    ------------10000 items
    Is there an optimal amount for an option class? Is the model structure possibly outdated and we should break up the option classes into models to alleviate some of the pain? Or are we at the limitation that Oracle Configurator can do and should peruse a custom solution?

    Funny thing really because the Case study for Chapter 4 is from our company that Oracle put together for us and its not working in the sense that it seems the servers can't handle the current model structure. I wouldn't blame the UI for these crashes and we already hide stuff from the user (ie, having to sort through all 10,000 items and hiding the BOM structure). Quick story of why i want to try and fix it is becuase the way its set up now in the model document is that 3 people could kill the server by basically saying "ok i selected this item for this location" (which would load the 10,000 items into memory on the server and not to the UI upon selection of the model) and then they would say... "ok now copy this selection to all these 50 places" (which would load those items again for each place that the item had to copied to) and BOOM server dead. I think sandeeps diagram of the changes is a really good idea and could help out alot and I tossed out that idea a few times before around my work place to help with the server issues. I feel that it would work but is it also possible that maybe configurator can't support our model the way they are wanting it to work?

  • Problem with importing a class

    When I compile my class, I get an error pointing to the import statement saying that it expects a period. Below is my code followed by the error I get:
    import Entry;
    public class Dictionary2 extends Entry
      protected Entry entries[];
      public Dictionary2(String puzzle)  // constructor
        entries = new Entry[5];
        if (puzzle == "unscramble")
          entries[0].setEntry("stupid", "Insult");
          entries[1].setEntry("monkey", "Zoo animal");
          entries[2].setEntry("meerkat", "Cute furry African animal that stands 12 inches high on its hind legs");
          entries[3].setEntry("burrow", "Where meerkats sleep and raise their pups");
          entries[4].setEntry("boogers", "Gross things");
    }C:\Program Files\Java\jdk1.6.0_01\bin>javac Dictionary2.java
    Dictionary2.java:1: '.' expected
    import Entry;
    ^
    1 error
    There is nothing wrong with my Entry class. It's where it's supposed to be, and it's compiled correctly. Why is it wanting a period? Your help will be greatly appreciated.

    SysterTara wrote:
    What I'm talking about is this: When you use a package, you have to create a directory path on your hard drive, like com\mydomain\project\Entry. When you want to upload it to a website, what do you do? Will it not work anymore? Will you have to create com/mydomain/project/Entry on the website? Please forgive my lack of knowledge. I am very inexperienced.You're confusing the classpath with your package structure.
    Packages are used to organize Java classes. You import classes based on their fully-qualified name, including the package they belong to. Packages are location-independent.
    The classpath is how the Java VM finds all the classes you're using. When you run a java program, you supply a list of paths to package roots and jar files, which the VM will use as a starting point to find the classes you've imported.

  • Problem with overloading Bean Classes

    For a default Save- & Rollback-Behavior I have defined a Save & Rollback Button in the template.jspx. The backing bean (GlobalOperationMBean|com.example.GlobalOperationHandler|sessionScope) for the 2 buttons is defined in the taskflow-template. If I want a different or extended behavior I declare the same Bean with a different class (GlobalOperationMBean|com.example.DifferentOperationHandler|sessionScope) in a bounded task flow (Taskflow1). Then I have a second task flow (Taskflow2) where I specified another class (GlobalOperationMBean|com.example.AnotherOperationHandler|sessionScope). DifferentBehaviorHandler and AnotherOperationHandler extend GlobalOperationHandler and override the methods for save and rollback. The overloading of the bean works perfecty in Taskflow 1.
    In Taskflow1 I make a task flow call of Taskflow2. Anticipated behavoir for pressing the Rollback-Button would be the execution of the rollback-method in AnotherOperationHandler (Definition in Taskflow2), but the rollback-method in DifferentOperationHandler (Definition in Taskflow1) is called.
    Do I have to make a special declaration in the taskflow to get it work or do I have to make it completely different?
    Any help is appreciated!
    Thanks,
    Thomas

    Hi Frank,
    this is actually what I'm trying to achieve.
    I'm just trying to understand why in my approach the bean in the second taskflow is not used? Do you have a hint?
    Thanks,
    Thomas

Maybe you are looking for