Trying to implement a quadratic sieve!

Hi
I am trying to write a quadratic sieve. Without posting the code, would anyone be willing to walk me through it, as to be completely honest, I am lost? The examples in the book 'Number Theory with Computer Applications' are as about as useful as a goldfish with a driving licence!
Ron

I suggest google:
http://www.google.ca/search?hl=en&safe=off&q=quadratic+sieve+java&meta=
or
http://www.google.ca/search?hl=en&safe=off&q=quadratic+sieve&meta=

Similar Messages

  • We are trying to implement a process so that any document that needs to be printed through our Java application will be printed as PDF using Adobe Reader.

    We are trying to implement a process so that any document that needs to be printed through our Java application will be printed as PDF using Adobe Reader.
    For which, We created and execute the below command line to call Adobe Reader and print the PDF on a printer.
    "C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe" /T "\\<Application Server>\Report\<TEST.PDF>" "<Printer Name>".
    Current Situation: The above command line parameter when executed is working as expected in a User's Workspace.
    When executed in a command line on the Application Server, it is working as expected.
    But, the same is not working while executing it from Deployed environment.
    Software being used: 1. Adobe 11.0 enterprise version. 2. Webshpere Application Server 8.5.5.2.
    Please let us know if there is a way to enable trace logs in Adobe Reader to further diagnose this issue.

    This is the Acrobat.com forum.  Your question will have a much better chance being addressed in the Acrobat SDK forum.

  • We are trying to implement a process so that any document that needs to be printed through our Java application will be printed as PDF using Adobe Reader. For which, We created and execute the below command line to call Adobe Reader and print the PDF on a

    We are trying to implement a process so that any document that needs to be printed through our Java application will be printed as PDF using Adobe Reader. For which, We created and execute the below command line to call Adobe Reader and print the PDF on a printer."C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe" /T "\\<Application Server>\Report\<TEST.PDF>" "<Printer Name>". Current Situation: The above command line parameter when executed is working as expected in a User's Workspace. When executed in a command line on the Application Server is working as expected. But, the same is not working while executing it from Deployed environment.Software being used: 1. Adobe 11.0 enterprise version. 2. Webshpere Application Server 8.5.5.2. Please let us know if there is a way to enable trace logs in Adobe Reader to further diagnose this issue.

    This is the Acrobat.com forum.  Your question will have a much better chance being addressed in the Acrobat SDK forum.

  • Trying to implement a VPD policy but got the following error ORA-20001

    hey good day,
    I'm trying to implement a VPD policy to my application. After I have performed the below task (Label 1) in oracle 10g database. When I'm about to access my application page in ApEx 3.2.1 I got the following error
    ORA-20001: get_dbms_sql_cursor error ORA-28110: policy function or package CHARLES.VPD_PREDICATE has error
    any form of assistance will be greatly appreciated.
    thanks in advance
    Label 1
    USER is "VPD_ADMIN"
    SQL> create or replace context empnum_ctx using set_empnum_ctx_pkg;
    Context created.
    SQL> CREATE OR REPLACE PACKAGE set_empnum_ctx_pkg IS
      2    PROCEDURE set_empnum;
      3  END;
      4  /
    Package created.
    SQL> CREATE OR REPLACE PACKAGE BODY set_empnum_ctx_pkg IS
      2    PROCEDURE set_empnum IS
      3     emp_id NUMBER;
      4    BEGIN
      5     SELECT EMPNUM INTO emp_id FROM CHARLES.INSTRUCTOR
      6     WHERE upper(username) = nvl(v('APP_USER'), USER);
      7     DBMS_SESSION.SET_CONTEXT('empnum_ctx', 'empnum', emp_id);
      8
      9    EXCEPTION
    10      WHEN NO_DATA_FOUND THEN NULL;
    11    END;
    12  END;
    13  /
    Package body created.
    SQL> create or replace package vpd_policy as
      2    function vpd_predicate(object_schema in varchar2 default null, object_name in varchar2 default null)
      3     return varchar2;
      4  end;
      5  /
    Package created.
    SQL> create or replace package body vpd_policy as  function vpd_predicate(
      2   object_schema in varchar2 default null, object_name in varchar2 default null)
      3     return varchar2 as
      4
      5      BEGIN
      6     if (USER = 'ADMIN') and (v('APP_USER') is null) or
      7        (USER = 'MICHAEL.GRAY') and (v('APP_USER') is NULL) then
      8       return '';
      9     else
    10       return '(
    11             exists (
    12                     select  "INSTRUCTOR"."EMPNUM" as "EMPNUM",
    13                             "INSTRUCTOR"."FIRSTNAME" as "FIRSTNAME",
    14                             "INSTRUCTOR"."LASTNAME" as "LASTNAME",
    15                             "LOAD"."COURSEID" as "COURSEID",
    16                             "COURSE"."CREDIT" as "CREDIT",
    17                             "COURSE"."HPW" as "HPW",
    18                             "LOAD"."CAMPID" as "CAMPID",
    19                             "LOAD"."YR" as "YR",
    20                             "INSTRUCTOR"."POS" as "POS",
    21                             "INSTRUCTOR"."USERNAME" as "USERNAME",
    22                             "INSTRUCTOR"."DEPARTMENT_NAME" as "DEPARTMENT_NAME",
    23                             "LOAD"."SEMESTER" as "SEMESTER"
    24                     from    "COURSE" "COURSE",
    25                             "INSTRUCTOR" "INSTRUCTOR",
    26                             "LOAD" "LOAD"
    27                     where   "INSTRUCTOR"."EMPNUM"="LOAD"."EMPNUM"
    28                     and     "LOAD"."COURSEID"="COURSE"."COURSEID"
    29                     and     department_name = (
    30                                     select department_name from departments
    31                                     where upper (assigned_to) = nvl(v(''APP_USER''),USER) )
    32                                     )
    33
    34                     or upper(username) = nvl(v(''APP_USER''), USER)
    35                                                ) ';
    36
    37     END IF;
    38  END vpd_predicate;
    39  END vpd_policy;
    40  /
    Package body created.
    SQL> begin
      2  dbms_rls.add_policy(
      3  object_schema => 'charles',
      4  object_name => 'load',
      5  policy_name => 'Loading Policy',
      6  function_schema => 'charles',
      7  policy_function => 'vpd_predicate',
      8  statement_types => 'select, update, insert, delete');
      9  end;
    10  /
    PL/SQL procedure successfully completed.

    ORA-20001 isn't an Oracle error message it was coded into your application by a developer: Look it up.
    Consider too the following:
    EXCEPTION
       WHEN NO_DATA_FOUND THEN NULL;so if the employee identifier is not found ... is this really what you want? If an employee isn't valid shouldn't you know it?

  • Trying to implement a mail queue

    I'm trying to implement a very basic mail queue using ExecutorService and a Callable split into a producer which builds the email and an email queue and a consumer to send the queued message out but I keep getting:
    java.lang.NullPointerException
         at javax.mail.Transport.send(Transport.java:97)
         at org.bedework.mail.sendMail.call(sendMail.java:45)
         at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
         at java.util.concurrent.FutureTask.run(Unknown Source)
         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    I'm not sure how to get the transport variable passed across and read by the consumer thread.
    The consumer code is:
    public class sendMail implements Callable<Object> {
         private ArrayBlockingQueue<Object>  queuedMail;
         private Transport trans;
         private MimeMessage msg;
         private Logger log = Logger.getLogger(sendMail.class);
         public sendMail (ArrayBlockingQueue<Object> queuedMail, Transport trans) {
              this.trans = trans;
              this.queuedMail = queuedMail;
         public Object call() throws Exception {
              try {
                   queuedMail.poll();
                   synchronized (queuedMail) {
                      if (queuedMail.isEmpty()) {
                         queuedMail.wait(1000);
                   try {
                        trans.send(msg);
                        Thread.sleep(1000);
                   } catch (Exception e) {
                        e.printStackTrace();
              } catch (Exception e) {
                   e.printStackTrace();
              return null;
    }The code that calls it is:
    tr = sess.getTransport(config.getProtocol());
            pool.submit(new buildMail(sess, cal, originator, to, subject));
            pool.submit(new sendMail (mailqueue, tr));I'd be grateful for any pointers in getting this sorted out.

    First, read this FAQ item:
    [http://java.sun.com/products/javamail/FAQ.html#send|http://java.sun.com/products/javamail/FAQ.html#send]
    Then explain to me how "msg" is ever set in your sendMail class.

  • Trying to implement EAP/TLS using java (as part of RADIUS server)

    Hi
    This is a cross port since I didn't know which forum to post in!
    I'm trying to implement a RADIUS server (EAP/TLS) as part of my master thesis. I'm not used to Java SSL libraries and can't get it to work. The server will respond to an accesspoint that uses 802.1x. I have created certificates using openssl and imported the "cert-clt.pl2"and "root.pem" to a laptop trying to connect to the accesspoint. On the server side i imported the "cacert.pem" and "cert-srv.der" using keytool to a keystore. In my code I read the keystore and create the SSLEngine with following code:
              KeyStore ksKeys = KeyStore.getInstance("JKS");
                ksKeys.load(new FileInputStream("certs/FeebeeCommunity.keystore"), passphrase);
                KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509");
                kmf.init(ksKeys, passphrase);
                KeyStore ksTrust = KeyStore.getInstance("JKS");
                ksTrust.load(new FileInputStream("FeebeeCommunity.keystore"), passphrase);
                TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509");
                tmf.init(ksKeys);
                sslContext = SSLContext.getInstance("TLS");
                sslContext.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
                sslEngine = sslContext.createSSLEngine();
                sslEngine.setUseClientMode(false);
                sslEngine.setNeedClientAuth(true);
                sslEngine.setWantClientAuth(true);
                sslEngine.setEnableSessionCreation(true);
                appBuffer = ByteBuffer.allocate(sslEngine.getSession().getApplicationBufferSize());
                appBuffer.clear();
                netBuffer = ByteBuffer.allocate(sslEngine.getSession().getPacketBufferSize());
                netBuffer.clear();All I want to do with TLS is a handshake.
    I'm not talking ssl using sockets instead I receive and send all TLS data encapsulated in EAP packet that are incapsulated in RADIUS packets. I start off with sending TLS-Start upon I recive TLS data. I handle it with the following code:
           SSLEngineResult result = null;
            SSLEngineResult.HandshakeStatus hsStatus = null;
            if( internalState != EAPTLSState.Handshaking ) {
                if( internalState == EAPTLSState.None ) {
                    TLSPacket tlsPacket = new TLSPacket( packet.getData() );
                    peerIdentity = tlsPacket.getData();
                    internalState = EAPTLSState.Starting;
                    try {
                        sslEngine.beginHandshake();
                    } catch (SSLException e) {
                        e.printStackTrace();
                    return;
                else if(internalState == EAPTLSState.Starting ) {
                    internalState = EAPTLSState.Handshaking;
                    try {
                        sslEngine.beginHandshake();
                    } catch (SSLException e) {
                        e.printStackTrace();
            TLSPacket tlsPacket = new TLSPacket( packet.getData() );
            netBuffer.put( tlsPacket.getData() );
            netBuffer.flip();
            while(true) {
                hsStatus = sslEngine.getHandshakeStatus();
                if(hsStatus == SSLEngineResult.HandshakeStatus.NEED_TASK) {
                    Runnable task;
                    while((task=sslEngine.getDelegatedTask()) != null) {
                        new Thread(task).start();
                else if(hsStatus == SSLEngineResult.HandshakeStatus.NEED_UNWRAP) {
                    try {
                        result = sslEngine.unwrap( netBuffer, appBuffer );
                    } catch (SSLException e) {
                        e.printStackTrace();
                else {
                    return;
            }When I try to send data I use the following code:
               SSLEngineResult.HandshakeStatus hsStatus = null;
                SSLEngineResult result = null;
    //            netBuffer = ByteBuffer.allocate(EAPTLSMethod.BUFFER_SIZE);
                netBuffer.clear();
                while(true) {
                    hsStatus = sslEngine.getHandshakeStatus();
                    if(hsStatus == SSLEngineResult.HandshakeStatus.NEED_TASK) {
                        Runnable task;
                        while((task=sslEngine.getDelegatedTask()) != null) {
                            new Thread(task).start();
                    else if(hsStatus == SSLEngineResult.HandshakeStatus.NEED_WRAP) {
                        try {
                            result = sslEngine.wrap( dummyBuffer, netBuffer );
                        } catch (SSLException e) {
                            e.printStackTrace();
                    else {
                        if( result != null && result.getStatus() == SSLEngineResult.Status.OK ) {
                            int size = Math.min(result.bytesProduced(),this.MTU);
                            byte [] tlsData = new byte[size];
                            netBuffer.flip();
                            netBuffer.get(tlsData,0,size);
                            TLSPacket tlsPacket = new TLSPacket((byte)0,tlsData);
                            if( size < result.bytesProduced() ) {
                                tlsPacket.setFlag(TLSFlag.MoreFragments);
                            return new EAPTLSRequestPacket( ID,
                                    (short)(tlsPacket.getData().length + 6),
                                    stateMachine.getCurrentMethod(), tlsPacket );
                        else {
                            return null;
                    }After I sent TLS-Start I receive data and manage to process it but when then trying to produce TLS data I get the following error:
    javax.net.ssl.SSLHandshakeException: no cipher suites in common
    at com.sun.net.ssl.internal.ssl.Handshaker.checkThrown(Handshaker.java:992)
    at com.sun.net.ssl.internal.ssl.SSLEngineImpl.checkTaskThrown(SSLEngineImpl.java:459)
    at com.sun.net.ssl.internal.ssl.SSLEngineImpl.writeAppRecord(SSLEngineImpl.java:1054)
    at com.sun.net.ssl.internal.ssl.SSLEngineImpl.wrap(SSLEngineImpl.java:1026)
    at javax.net.ssl.SSLEngine.wrap(SSLEngine.java:411)
    at RadiusServerSimulator.EAPModule.EAPTLSMethod.buildReq(EAPTLSMethod.java:125)
    at RadiusServerSimulator.EAPModule.EAPStateMachine.methodRequest(EAPStateMachine.java:358)
    at RadiusServerSimulator.EAPModule.EAPStateMachine.run(EAPStateMachine.java:262)
    at java.lang.Thread.run(Thread.java:595)
    Caused by: javax.net.ssl.SSLHandshakeException: no cipher suites in common
    at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:150)
    at com.sun.net.ssl.internal.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1352)
    at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:176)
    at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:164)
    at com.sun.net.ssl.internal.ssl.ServerHandshaker.chooseCipherSuite(ServerHandshaker.java:638)
    at com.sun.net.ssl.internal.ssl.ServerHandshaker.clientHello(ServerHandshaker.java:450)
    at com.sun.net.ssl.internal.ssl.ServerHandshaker.processMessage(ServerHandshaker.java:178)
    at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:495)
    at com.sun.net.ssl.internal.ssl.Handshaker$1.run(Handshaker.java:437)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.net.ssl.internal.ssl.Handshaker$DelegatedTask.run(Handshaker.java:930)
    Any help wold be most greatfull, if any questions or anything unclear plz let me know.
    add some additional information here is a debug output
    Before this I have sent a TLS-star package and this is when I receive new information and then try to create the answer
    [Raw read]: length = 5
    0000: 16 03 01 00 41 ....A
    [Raw read]: length = 65
    0000: 01 00 00 3D 03 01 41 A4 FC 16 A8 14 89 F0 59 81 ...=..A.......Y.
    0010: C8 C9 29 C2 09 D1 0A 70 18 58 DC 2E B0 C8 14 90 ..)....p.X......
    0020: D4 FD A4 C6 32 C9 00 00 16 00 04 00 05 00 0A 00 ....2...........
    0030: 09 00 64 00 62 00 03 00 06 00 13 00 12 00 63 01 ..d.b.........c.
    0040: 00 .
    Thread-2, READ: TLSv1 Handshake, length = 65
    *** ClientHello, TLSv1
    RandomCookie: GMT: 1084488726 bytes = { 168, 20, 137, 240, 89, 129, 200, 201, 4
    1, 194, 9, 209, 10, 112, 24, 88, 220, 46, 176, 200, 20, 144, 212, 253, 164, 198,
    50, 201 }
    Session ID: {}
    Cipher Suites: [SSL_RSA_WITH_RC4_128_MD5, SSL_RSA_WITH_RC4_128_SHA, SSL_RSA_WITH
    _3DES_EDE_CBC_SHA, SSL_RSA_WITH_DES_CBC_SHA, SSL_RSA_EXPORT1024_WITH_RC4_56_SHA,
    SSL_RSA_EXPORT1024_WITH_DES_CBC_SHA, SSL_RSA_EXPORT_WITH_RC4_40_MD5, SSL_RSA_EX
    PORT_WITH_RC2_CBC_40_MD5, SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA, SSL_DHE_DSS_WITH_DE
    S_CBC_SHA, SSL_DHE_DSS_EXPORT1024_WITH_DES_CBC_SHA]
    Compression Methods: { 0 }
    [read] MD5 and SHA1 hashes: len = 65
    0000: 01 00 00 3D 03 01 41 A4 FC 16 A8 14 89 F0 59 81 ...=..A.......Y.
    0010: C8 C9 29 C2 09 D1 0A 70 18 58 DC 2E B0 C8 14 90 ..)....p.X......
    0020: D4 FD A4 C6 32 C9 00 00 16 00 04 00 05 00 0A 00 ....2...........
    0030: 09 00 64 00 62 00 03 00 06 00 13 00 12 00 63 01 ..d.b.........c.
    0040: 00 .
    Thread-5, fatal error: 40: no cipher suites in common
    javax.net.ssl.SSLHandshakeException: no cipher suites in common
    Thread-5, SEND TLSv1 ALERT: fatal, description = handshake_failure
    Thread-5, WRITE: TLSv1 Alert, length = 2
    Thread-2, fatal: engine already closed. Rethrowing javax.net.ssl.SSLHandshakeEx
    ception: no cipher suites in common
    javax.net.ssl.SSLHandshakeException: no cipher suites in common
    at com.sun.net.ssl.internal.ssl.Handshaker.checkThrown(Handshaker.java:9
    92)
    at com.sun.net.ssl.internal.ssl.SSLEngineImpl.checkTaskThrown(SSLEngineI
    mpl.java:459)
    at com.sun.net.ssl.internal.ssl.SSLEngineImpl.writeAppRecord(SSLEngineIm
    pl.java:1054)
    at com.sun.net.ssl.internal.ssl.SSLEngineImpl.wrap(SSLEngineImpl.java:10
    26)
    at javax.net.ssl.SSLEngine.wrap(SSLEngine.java:411)
    at RadiusServerSimulator.EAPModule.EAPTLSMethod.buildReq(EAPTLSMethod.ja
    va:153)
    at RadiusServerSimulator.EAPModule.EAPStateMachine.methodRequest(EAPStat
    eMachine.java:358)
    at RadiusServerSimulator.EAPModule.EAPStateMachine.run(EAPStateMachine.j
    ava:262)
    at java.lang.Thread.run(Thread.java:595)
    Caused by: javax.net.ssl.SSLHandshakeException: no cipher suites in common
    at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:150)
    at com.sun.net.ssl.internal.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1
    352)
    at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:176)
    at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:164)
    at com.sun.net.ssl.internal.ssl.ServerHandshaker.chooseCipherSuite(Serve
    rHandshaker.java:638)
    at com.sun.net.ssl.internal.ssl.ServerHandshaker.clientHello(ServerHands
    haker.java:450)
    at com.sun.net.ssl.internal.ssl.ServerHandshaker.processMessage(ServerHa
    ndshaker.java:178)
    at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:4
    95)
    at com.sun.net.ssl.internal.ssl.Handshaker$1.run(Handshaker.java:437)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.net.ssl.internal.ssl.Handshaker$DelegatedTask.run(Handshaker.
    java:930)
    ... 1 more

    I am developing a simple client/server SSL app using sdk 1.4 (no SSLEngine) and am faced with the same problem. Could anybody track down the problem further?

  • I have tried to implement jasper report but getting exceptions at run time

    I have tried to implement jasper report but getting exceptions at run time and I couldn't get the reason of these exceptions. please give me idea to solve this problem.
    I am using following jar files for this :
    commons-beanutils-1.6.1.jar
    commons-digester-1.7.jar
    commons-logging.jar
    jasperreports-1.2.0.jar
    code is as follows:-
    (1) xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE jasperReport
    PUBLIC "-//JasperReports//DTD Report Design//EN"
    "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd">
    <jasperReport name="Simple_Report">
    <detail>
    <band height="20">
    <staticText>
    <reportElement x="180" y="0" width="200" height="20"/>
    <text><![CDATA[Hello World!]]></text>
    </staticText>
    </band>
    </detail>
    </jasperReport>
    (2.) java file
    import net.sf.jasperreports.engine.*;
    import net.sf.jasperreports.engine.xml.*;
    import org.xml.sax.*;
    import org.apache.commons.digester.Digester;
    import org.apache.commons.digester.RuleSetBase;
    import java.util.*;
    public class JasperReportsIntro
    public static void main(String[] args)
    JasperReport jasperReport;
    JasperPrint jasperPrint;
    try
         jasperReport = JasperCompileManager.compileReport(
    "jasperreports_demo.jrxml");
    jasperPrint = JasperFillManager.fillReport(
    jasperReport, new HashMap(), new JREmptyDataSource());
    // JasperExportManager.exportReportToPdfFile(
    // jasperPrint, "jasperReports/simple_report.pdf");
    catch (JRException e)
    e.printStackTrace();
    I am getting exceptions like:
    net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:
    /home/navneet/Simple_Report_1143636234024_954843.java:4: package net.sf.jasperreports.engine does not exist
    import net.sf.jasperreports.engine.*;
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:5: package net.sf.jasperreports.engine.fill does not exist
    import net.sf.jasperreports.engine.fill.*;
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:18: cannot find symbol
    symbol: class JREvaluator
    public class Simple_Report_1143636234024_954843 extends JREvaluator
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:25: cannot find symbol
    symbol : class JRFillParameter
    location: class Simple_Report_1143636234024_954843
    private JRFillParameter parameter_REPORT_RESOURCE_BUNDLE = null;
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:26: cannot find symbol
    symbol : class JRFillParameter
    location: class Simple_Report_1143636234024_954843
    private JRFillParameter parameter_REPORT_CONNECTION = null;
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:27: cannot find symbol
    symbol : class JRFillParameter
    location: class Simple_Report_1143636234024_954843
    private JRFillParameter parameter_REPORT_PARAMETERS_MAP = null;
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:28: cannot find symbol
    symbol : class JRFillParameter
    location: class Simple_Report_1143636234024_954843
    private JRFillParameter parameter_IS_IGNORE_PAGINATION = null;
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:29: cannot find symbol
    symbol : class JRFillParameter
    location: class Simple_Report_1143636234024_954843
    private JRFillParameter parameter_REPORT_CLASS_LOADER = null;
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:30: cannot find symbol
    symbol : class JRFillParameter
    location: class Simple_Report_1143636234024_954843
    private JRFillParameter parameter_REPORT_VIRTUALIZER = null;
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:31: cannot find symbol
    symbol : class JRFillParameter
    location: class Simple_Report_1143636234024_954843
    private JRFillParameter parameter_REPORT_LOCALE = null;
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:32: cannot find symbol
    symbol : class JRFillParameter
    location: class Simple_Report_1143636234024_954843
    private JRFillParameter parameter_REPORT_DATA_SOURCE = null;
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:33: cannot find symbol
    symbol : class JRFillParameter
    location: class Simple_Report_1143636234024_954843
    private JRFillParameter parameter_REPORT_SCRIPTLET = null;
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:34: cannot find symbol
    symbol : class JRFillParameter
    location: class Simple_Report_1143636234024_954843
    private JRFillParameter parameter_REPORT_MAX_COUNT = null;
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:35: cannot find symbol
    symbol : class JRFillVariable
    location: class Simple_Report_1143636234024_954843
    private JRFillVariable variable_PAGE_NUMBER = null;
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:36: cannot find symbol
    symbol : class JRFillVariable
    location: class Simple_Report_1143636234024_954843
    private JRFillVariable variable_COLUMN_NUMBER = null;
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:37: cannot find symbol
    symbol : class JRFillVariable
    location: class Simple_Report_1143636234024_954843
    private JRFillVariable variable_REPORT_COUNT = null;
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:38: cannot find symbol
    symbol : class JRFillVariable
    location: class Simple_Report_1143636234024_954843
    private JRFillVariable variable_PAGE_COUNT = null;
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:39: cannot find symbol
    symbol : class JRFillVariable
    location: class Simple_Report_1143636234024_954843
    private JRFillVariable variable_COLUMN_COUNT = null;
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:62: cannot find symbol
    symbol : class JRFillParameter
    location: class Simple_Report_1143636234024_954843
    parameter_REPORT_RESOURCE_BUNDLE = (JRFillParameter)pm.get("REPORT_RESOURCE_BUNDLE");
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:63: cannot find symbol
    symbol : class JRFillParameter
    location: class Simple_Report_1143636234024_954843
    parameter_REPORT_CONNECTION = (JRFillParameter)pm.get("REPORT_CONNECTION");
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:64: cannot find symbol
    symbol : class JRFillParameter
    location: class Simple_Report_1143636234024_954843
    parameter_REPORT_PARAMETERS_MAP = (JRFillParameter)pm.get("REPORT_PARAMETERS_MAP");
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:65: cannot find symbol
    symbol : class JRFillParameter
    location: class Simple_Report_1143636234024_954843
    parameter_IS_IGNORE_PAGINATION = (JRFillParameter)pm.get("IS_IGNORE_PAGINATION");
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:66: cannot find symbol
    symbol : class JRFillParameter
    location: class Simple_Report_1143636234024_954843
    parameter_REPORT_CLASS_LOADER = (JRFillParameter)pm.get("REPORT_CLASS_LOADER");
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:67: cannot find symbol
    symbol : class JRFillParameter
    location: class Simple_Report_1143636234024_954843
    parameter_REPORT_VIRTUALIZER = (JRFillParameter)pm.get("REPORT_VIRTUALIZER");
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:68: cannot find symbol
    symbol : class JRFillParameter
    location: class Simple_Report_1143636234024_954843
    parameter_REPORT_LOCALE = (JRFillParameter)pm.get("REPORT_LOCALE");
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:69: cannot find symbol
    symbol : class JRFillParameter
    location: class Simple_Report_1143636234024_954843
    parameter_REPORT_DATA_SOURCE = (JRFillParameter)pm.get("REPORT_DATA_SOURCE");
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:70: cannot find symbol
    symbol : class JRFillParameter
    location: class Simple_Report_1143636234024_954843
    parameter_REPORT_SCRIPTLET = (JRFillParameter)pm.get("REPORT_SCRIPTLET");
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:71: cannot find symbol
    symbol : class JRFillParameter
    location: class Simple_Report_1143636234024_954843
    parameter_REPORT_MAX_COUNT = (JRFillParameter)pm.get("REPORT_MAX_COUNT");
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:88: cannot find symbol
    symbol : class JRFillVariable
    location: class Simple_Report_1143636234024_954843
    variable_PAGE_NUMBER = (JRFillVariable)vm.get("PAGE_NUMBER");
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:89: cannot find symbol
    symbol : class JRFillVariable
    location: class Simple_Report_1143636234024_954843
    variable_COLUMN_NUMBER = (JRFillVariable)vm.get("COLUMN_NUMBER");
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:90: cannot find symbol
    symbol : class JRFillVariable
    location: class Simple_Report_1143636234024_954843
    variable_REPORT_COUNT = (JRFillVariable)vm.get("REPORT_COUNT");
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:91: cannot find symbol
    symbol : class JRFillVariable
    location: class Simple_Report_1143636234024_954843
    variable_PAGE_COUNT = (JRFillVariable)vm.get("PAGE_COUNT");
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:92: cannot find symbol
    symbol : class JRFillVariable
    location: class Simple_Report_1143636234024_954843
    variable_COLUMN_COUNT = (JRFillVariable)vm.get("COLUMN_COUNT");
    ^
    33 errors
    at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:193)
    at net.sf.jasperreports.engine.design.JRDefaultCompiler.compileReport(JRDefaultCompiler.java:131)
    at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:211)
    at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:144)
    at com.appnetix.app.portal.financials.reports.RoyaltyReportAction.execute(RoyaltyReportAction.java:68)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
    at com.appnetix.app.control.web.AppnetixRequestProcessor.process(AppnetixRequestProcessor.java:149)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    at com.appnetix.app.control.web.AppnetixControllerServlet.doPost(AppnetixControllerServlet.java:262)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
    at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
    at java.lang.Thread.run(Thread.java:595)

    You have no permission to create a report. You have to create a permisson-entry into your server.policy. Then it would be work.

  • I tried to implement photo albums using iweb and got a publishing error.

    I tried to implement photo albums using iweb and got a publishing error. All was fine with my site until I added the photo album page. The software doesnt say what the error is exactly, only that it is a publishing error to my ftp
    Exact message "There was an error communicating with the FTP server. Try again later, or check with your service provider."
    If I reduce the albums inside to 1 then it seems to work but that takes away from the usefullness of multiple albums.
    my iWeb version is 3.0.4 (601)

    Publish your site to a folder on your hard drive to see if the publication will proceed successfully and open the site locally with your browser to confirm all of the alums are there and work.  If they do try the following:
    delete the iWeb preference files, com.apple.iWeb.plist and com.apple.iWeb.plist.lockfile, that resides in your Home() /Library/Preferences folder.
    go to your Home()/Library/Caches/com.apple.iWeb folder and delete its contents.
    Click to view full size
    launch iWeb and try again.
    If you're still not able to publish from iWeb to your server download and use the free  Cyberduck to upload your website files to the server. Users have found that CD has been successful when iWeb had problems.
    OT

  • Trying to implement MAA on 4node race

    Subject: Trying to implement MAA on 4node race
    RDBMS Version: 10.2.0.3
    Operating System and Version: Solaris 5.9
    Error Number (if applicable): ORA-12154
    Product (i.e. SQL*Loader, Import, etc.): DATAGUARD
    Product Version: 10.2.0.3
    Trying to implement MAA on 4node race
    Can anyone clarify my questions related to RAC & DATAGUARD.
    We are trying to implement 4node physical standby, our primary is a 4node RAC.
    How does oracle ship the archive logs and apply at the secondary(physical standby). Does we need to mount all the instances on the physical standby or only one instance?
    what we have done is mounted one instance recovered the primary database at physical standby.
    We are currently shipping the logs manually and recovering at the physical. we are hoping that the automatic shipping of archive logs and recovery at the physical, will catch up when its current. Is my assumption correct???
    On the primary we see the following eroors:
    Redo shipping client performing standby login
    OCIServerAttach failed -1
    .. Detailed OCI error val is 12154 and errmsg is 'ORA-12154: TNS:could not resolve the connect identifier specified
    *** 2007-11-05 14:56:12.338 61287 kcrr.c
    Error 12154 received logging on to the standby
    Error 12154 connecting to destination LOG_ARCHIVE_DEST_3 standby host 'CP00TSG002'
    Error 12154 attaching to destination LOG_ARCHIVE_DEST_3 standby host 'CP00TSG002'
    ORA-12154: TNS:could not resolve the connect identifier specified
    *** 2007-11-05 14:56:12.338 61287 kcrr.c
    PING[ARC1]: Heartbeat failed to connect to standby 'CP00TSG002'. Error is 12154.
    *** 2007-11-05 14:56:12.338 59530 kcrr.c
    kcrrfail: dest:3 err:12154 force:0 blast:1
    *** 2007-11-05 15:01:16.450
    Redo shipping client performing standby login
    OCIServerAttach failed -1
    .. Detailed OCI error val is 12154 and errmsg is 'ORA-12154: TNS:could not resolve the connect identifier specified
    *** 2007-11-05 15:01:18.208 61287 kcrr.c
    Error 12154 received logging on to the standby
    Error 12154 connecting to destination LOG_ARCHIVE_DEST_3 standby host 'CP00TSG002'
    Error 12154 attaching to destination LOG_ARCHIVE_DEST_3 standby host 'CP00TSG002'
    ORA-12154: TNS:could not resolve the connect identifier specified
    *** 2007-11-05 15:01:18.209 61287 kcrr.c
    PING[ARC1]: Heartbeat failed to connect to standby 'CP00TSG002'. Error is 12154.
    *** 2007-11-05 15:01:18.209 59530 kcrr.c
    kcrrfail: dest:3 err:12154 force:0 blast:1
    *** 2007-11-05 15:06:22.682
    Redo shipping client performing standby login
    OCIServerAttach failed -1
    .. Detailed OCI error val is 12154 and errmsg is 'ORA-12154: TNS:could not resolve the connect identifier specified
    *** 2007-11-05 15:06:23.460 61287 kcrr.c
    Error 12154 received logging on to the standby
    Error 12154 connecting to destination LOG_ARCHIVE_DEST_3 standby host 'CP00TSG002'
    Error 12154 attaching to destination LOG_ARCHIVE_DEST_3 standby host 'CP00TSG002'
    ORA-12154: TNS:could not resolve the connect identifier specified
    *** 2007-11-05 15:06:23.460 61287 kcrr.c
    PING[ARC1]: Heartbeat failed to connect to standby 'CP00TSG002'. Error is 12154.
    *** 2007-11-05 15:06:23.460 59530 kcrr.c
    kcrrfail: dest:3 err:12154 force:0 blast:1
    we are unable to find why we are getting these errors.
    Can anyone let me know how MAA functions. I mean..4 node RAC shipping logs and applying at 4 node physical standby.........
    Message was edited by:
    raghu559

    Hi josefli
    i got quite different response from oracle metalink forum. can you explain me about this and how we can achive failover?
    here is what it said:
    In a RAC configuration, you need to make sure you load balance
    the archive receiving on standby site. If you just use
    one instance to receive all the archive logs and apply them,
    it could potentially create bottleneck on a very busy
    environment. So you have to use all the RAC instances
    even on the DR site and they all need to be mounted.
    You need to designate one instance as the applier, which would
    run the MRP, and all the instances as receiver.
    Primary 1 ===> Standby 1 (receiver and applier)
    Primary 2 ===> Standby 2 (receiver only)
    Primary 3 ===> Standby 3 (receiver only)
    Primary 4 ===> Standby 4 (receiver only)
    Let us assume your database name is "finp"
    Primary Site
    finp1.log_archive_dest_2='SERVICE=finp1_stby LGWR ASYNC=20480 NOAFFIRM reopen=10 max_failure=5 net_timeout=180 delay=0'
    finp2.log_archive_dest_2='SERVICE=finp2_stby LGWR ASYNC=20480 NOAFFIRM reopen=10 max_failure=5 net_timeout=180 delay=0'
    finp3.log_archive_dest_2='SERVICE=finp3_stby LGWR ASYNC=20480 NOAFFIRM reopen=10 max_failure=5 net_timeout=180 delay=0'
    finp4.log_archive_dest_2='SERVICE=finp4_stby LGWR ASYNC=20480 NOAFFIRM reopen=10 max_failure=5 net_timeout=180 delay=0'
    finp1.fal_client=finp1_stby
    finp2.fal_client=finp2_stby
    finp3.fal_client=finp3_stby
    finp4.fal_client=finp4_stby
    finp1.fal_server=finp1_stby, finp2_stby, finp3_stby, finp4_stby
    finp2.fal_server=finp2_stby, finp3_stby, finp4_stby, finp1_stby
    finp3.fal_server=finp3_stby, finp4_stby, finp1_stby, finp2_stby
    finp4.fal_server=finp4_stby, finp1_stby, finp2_stby, finp3_stby
    *.log_archive_dest_state_2=enable
    Add tns entries for finp1_stby, finp2_stby, finp3_stby and finp4_stby on
    primary site tnsnames.ora. All these entries would be pointing
    to DR site.
    Standby Site
    finp1.log_archive_dest_2='SERVICE=finp1_stby LGWR ASYNC=20480 NOAFFIRM reopen=10 max_failure=5 net_timeout=180 delay=0'
    finp2.log_archive_dest_2='SERVICE=finp2_stby LGWR ASYNC=20480 NOAFFIRM reopen=10 max_failure=5 net_timeout=180 delay=0'
    finp3.log_archive_dest_2='SERVICE=finp3_stby LGWR ASYNC=20480 NOAFFIRM reopen=10 max_failure=5 net_timeout=180 delay=0'
    finp4.log_archive_dest_2='SERVICE=finp4_stby LGWR ASYNC=20480 NOAFFIRM reopen=10 max_failure=5 net_timeout=180 delay=0'
    finp1.fal_client=finp1_stby
    finp2.fal_client=finp2_stby
    finp3.fal_client=finp3_stby
    finp4.fal_client=finp4_stby
    finp1.fal_server=finp1_stby, finp2_stby, finp3_stby, finp4_stby
    finp2.fal_server=finp2_stby, finp3_stby, finp4_stby, finp1_stby
    finp3.fal_server=finp3_stby, finp4_stby, finp1_stby, finp2_stby
    finp4.fal_server=finp4_stby, finp1_stby, finp2_stby, finp3_stby
    *.log_archive_dest_state_2=defer
    Add tns entries for finp1_stby, finp2_stby, finp3_stby and finp4_stby on
    standby site tnsnames.ora. All these entries would be pointing
    to primary site.
    What is good about this type of setup is that if one of the
    server is unavailable, still the configuration would work
    withoout any chagnes. During switch over and switch back,
    you don't need to any changes on spfile or tnsnames.ora file.
    Note the fal_server is listing all the server names so that
    it could get the archive files from other servers if
    one of the server would be unavailable.
    So i need to place all the instances on physical standby in mount stage? like i said currently we are recovering on one instance. Do we need to make any changes to other 3 instances(physical standby)? or just do a startup mount on those 3nodes?

  • Trying ot implement AJAX

    Hi I am trying to implement AJAx functionality in my JSP page.. It will work to bring or open the callup window when ever any one puts mouse over any image.
    Well i am sending an product ID to my servlet and getting response in form of XML text but i am not able to track the response from servlet the command i am using for it is...
    var ro;
    function createRequestObject(objurl,objurl1)
    var url1 = "<%= link("catalog", "catProductDescription", extraParam) %>" ;
    document.dataForm.OP.value = "description";
    var url = url1 + "&ProdId=" + objurl ;
    if(window.XMLHttpRequest)
    ro = new XMLHttpRequest();
    else if(window.ActiveXObject)
    ro = newActiveXObject("Microsoft.XMLHTTP");
    ro.open("GET", url, true);
    ro.onreadystatechange = handleResponse;
    ro.send(null);
    function handleResponse()
    if(ro.status == 200)
    var message = ro.responseXML.getElementsByTagNam("message") [0];
    setMessage(message.childNodes[0].nodeValue);
    function setMessage(message)
    alert(message);
    I am trying to send product description from Servlet by using:
         response.setContentType("text/xml");
         response.setHeader("Cache-Control", "no-cache" );
         response.getWriter().write(msProdBean.getDescription());
    please try to guide me with proper code.

    try this handle response function
    function handleResponse()
    if(ro.readyState == 4)
            var response = ro.responseText;
            var update = new Array();
             if(response.indexOf('||' != -1))
              update = response.split('||');
              // access the response string from servlet with this variable, update[0];
              // eg: alert(update[0]) ;
            }

  • Trying to implement the Builder pattern with inheritance

    This is just a bit long, but don't worry, it's very understandable.
    I'm applying the Builder pattern found in Effective Java (J. Bloch). The pattern is avaiable right here :
    http://books.google.fr/books?id=ka2VUBqHiWkC&lpg=PA15&ots=yXGmIjr3M2&dq=nutritionfacts%20builder%20java&pg=PA14
    My issue is due to the fact that I have to implement that pattern on an abstract class and its extensions. I have declared a Builder inside the base class, and the extensions specify their own extension of the base's Builder.
    The abstract base class is roughly this :
    public abstract class Effect extends Trigger implements Cloneable {
        protected Ability parent_ability;
        protected Targetable target;
        protected EffectBinder binder;
        protected Effect(){
        protected Effect(EffectBuilder parBuilder){
            parent_ability = parBuilder.parent_ability;
            target = parBuilder.target;
            binder = parBuilder.binder;
        public static class EffectBuilder {
            protected Ability parent_ability;
            protected Targetable target;
            protected EffectBinder binder;
            protected EffectBuilder() {}
            public EffectBuilder(Ability parParentAbility) {
                parent_ability = parParentAbility;
            public EffectBuilder target(Targetable parTarget)
            { target = parTarget; return this; }
            public EffectBuilder binder(EffectBinder parBinder)
            { binder = parBinder ; return this; }
        // etc.
    }And the following is one of its implementation :
    public class GainGoldEffect extends Effect {
        private int gold_gain;
        public GainGoldEffect(GainGoldEffectBuilder parBuilder) {
            super(parBuilder);
            gold_gain = parBuilder.gold_gain;
        public class GainGoldEffectBuilder extends EffectBuilder {
            private int gold_gain;
            public GainGoldEffectBuilder(int parGoldGain, Ability parParentAbility) {
                this.gold_gain = parGoldGain;
                super.parent_ability = parParentAbility;
            public GainGoldEffectBuilder goldGain(int parGoldGain)
            { gold_gain = parGoldGain; return this; }
            public GainGoldEffect build() {
                return new GainGoldEffect(this);
        // etc.
    }Effect requires 1 parameter to be correctly instantiated (parent_ability), and 2 others that are optional (target and binder). Implementing the Builder Pattern means that I won't have to rewrite specific construcors that cover all the combination of parameters of the Effect base class, plus their own parameter as an extension. I expect the gain to be quite huge, as there will be at least a hundred of Effects in this API.
    But... in the case of these 2 classes, when I'm trying to create the a GoldGainEffect like this :
    new GainGoldEffect.GainGoldEffectBuilder(1 , locAbility).goldGain(5);the compiler says "GainGoldEffect is not an enclosing class". Is there something wrong with the way I'm trying to extend the base Builder ?
    I need your help to understand this and find a solution.
    Thank you for reading.

    The GainGoldEffectBuilder class must be static.
    Otherwise a Builder would require a GainGoldEffect object to exist, which is backwards.

  • I'm trying to implement a class called Letter...

    Long story short, here's my Letter class:
    // Implements a class that holds the sender's name, the letter's body, and the recipient's name.
    public class Letter
    * Constructs a letter with a sender name and recipient and the letters first line of text.
    * @param from The letter's sender.
    * @param to The letter's recipient.
    public Letter(String from, String to)
    sender = from;
    recipient = to;
    body.concat("Dear ").concat(recipient).concat(":").concat("\n").concat("\n");
    * Adds a line to the body of the letter and skips a line.
    * @param line The line you want to add.
    public void addLine(String line)
    body.concat(line).concat("\n");
    // Closes the letter and returns the text of the entire letter.
    public String getText()
    body.concat("Sincerely, ").concat("\n").concat("\n").concat(sender);
    return body;
    private String sender;
    private String body;
    private String recipient;
    }with an output message of:
    java.lang.NoSuchMethodError: main
    Exception in thread "main"
    Process completed.
    And here's my tester class:
    public class LetterTester
    public static void main(String[] args)
    Letter departure = new Letter("John", "Mary");
    departure.addLine("I am sorry we must part.");
    departure.addLine("I wish you all the best.");
    String departureLetter = departure.getText();
    System.out.println(departureLetter);
    }with an output message of:
    Exception in thread "main" java.lang.NullPointerException
    at Letter.<init>(Letter.java:13)
    at LetterTester.main(LetterTester.java:5)
    Process completed.
    I'm not too sure what it means since I'm a beginner... This is part of my homework and I'm supposed to get this tester class to ultimately print out:
    Dear John:
    I am sorry we must part.
    I wish you all the best.
    Sincerely,
    Mary.
    And it obviously hasn't worked... What am I doing wrong?
    Edited by: TheAlliedCentralAxis on Mar 7, 2008 7:40 PM

    Exception in thread "main" java.lang.NullPointerExceptionThis means you are trying to dereference some variable or expression whose value is null. To find out which variable or expression look down the stack trace until you come to the first line that refers to your code.
    at Letter.<init>(Letter.java:13)
    at LetterTester.main(LetterTester.java:5)So the problem occurs on line 13 of Letter.java. By "dereferencing" I mean using the "dot" operator or array access square brackets. So in foo.bar() and baz[i] both foo and baz will cause an NPE if they are null. You can check for this (if you are in doubt) by printing their values:
    System.out.println("About to call bar() foo=" + foo);
    foo.bar();By the way note how the println() argument is built up using + for String concatenation. I could have written this as:
    String msg = "Checking to see if foo causes the NPE: " + "About to call bar() foo=" + foo + "!";
    System.out.println(msg);
    foo.bar();This is a common way to perform String concatenation.
    Edited by: pbrockway2 on Mar 8, 2008 4:58 PM
    Too slow...

  • Trying to implement the Observer pattern with a notify() method

    OK, I'm not implementing the observer exactly rigidly but I'm doing something thereabouts inline with the pattern. I have an abstract class which provides some common functionality for the observers and is also used for type checking elsewhere. Each observer must inherit from this class. Now; the abstract class has one abstract method notify() as per the generic observer.
    I get an error that notify() cannot be overridden as it's final. I understand what all that means but I'm curious where it's implemented that's actually affecting my own code? Is notify() a standard method in all objects in Java?
    package zoopackage;
    public abstract class ZooObserver
         protected Cage cage;
         public void setCage(Cage myCage)
              this.cage = myCage;
         abstract public void notify();
    }And...
    package zoopackage.observers;
    import zoopackage.*;
    public class VisualObserver extends ZooObserver
         public void notify()
    }

    Is notify() a standard method in all objects in Java?Yes, as are notifyAll() and wait(). You'll also notice in the API that there already is an Observer interface and an Observable object. That's probably sufficient to implement what you want to do.
    Brian

  • Trying to implement fail log in page and SSO

    Hi everyone,
    Currently I'm using Apex 4.0. My app has enabled SSO and is working fine using the domain users to authenticate. When an user tries to log in into the app using his PC and he has the rights to access it can use the system without problem. However there are some users who has their domain user, but they shared the same PC with other people. In this case, the PC always is on with a generic user for everyone. So if someone tries to access the app (which they has the permissions to use it) the app says! "Sorry you don't have enough privileges" that's because they are using the generic user for that PC and the app is validating that user.
    So here is the deal... I want to use 101 Login page to show up in case an invalid user (generic domain usernames) tries to access the app and give to the user the chance to use his/her Domain username and password there in order to be able to log in into the the app.
    Is there a way I can accomplish this? My app already redirect the generic user into the 101 login page, but can't make it to validate the username and password like the Automatic SSO process.
    Hope you can help me!
    Thanks in advanced
    -Farid
    Edited by: FuryDev on Aug 29, 2012 9:05 AM

    Actually I'm trying to generate sub pages to Page with some local JSP-portlets.
    Basically I'm using PageBackingContext bean with overriding the constructor. In the constructor I'm trying to dynamically generate those sub pages.
    Can't be quite sure if Page can have direct sub pages, or should I first create sub Book with needed pages... but anyway. I think all those Book/PageControls needs to be found somewhere... Although I'm currently trying your PageInstanceControlImpl() aproach to see if it works :)
    - Tave -

  • Trying to implement a ENABLE NOVALIDATE constraint.....

    Hi ,
    In order to see how the ENABLE NOVALIDATE constraint in the DEPT table of SCOTT schema , i followed the following steps:
    1)Disable state
    SQL> alter table dept modify constraint pk_dept disable;
    Table altered2)Perform the operation (insert a row in for which the deptno preexists )
    SQL> insert into dept(deptno,dname) values(10,'dname10');
    1 row inserted
    SQL> commit;
    Commit complete3)Enable novalidate state
    SQL> alter table dept modify constraint pk_dept novalidate;
    Table altered4)Enable state
    SQL> alter table dept modify constraint pk_dept enable;
    alter table dept modify constraint pk_dept enable
    ORA-02437:cannot validate (SCOTT.PK_DEPT) - primary key violatedHow can i solve the problem.....?????
    Many thanks,
    Simon

    Hi,
    I haven't found any use of the NOVALIDATE parameter in the constraint.....
    In Oracle doc ... it's pointed out:
    "When a constraint is in the enable novalidate state, all subsequent statements are checked for conformity to the constraint. However, any existing data in the table is not checked. A table with enable novalidated constraints can contain invalid data, but it is not possible to add new invalid data to it. Enabling constraints in the novalidated state is most useful in data warehouse configurations that are uploading valid OLTP data.
    Enabling a constraint does not require validation. Enabling a constraint novalidate is much faster than enabling and validating a constraint. Also, validating a constraint that is already enabled does not require any DML locks during validation (unlike validating a previously disabled constraint). Enforcement guarantees that no violations are introduced during the validation. Hence, enabling without validating enables you to reduce the downtime typically associated with enabling a constraint."
    I have followed the steps in my first post to run a test case in order to see that the sentence above in bold, is implemented....
    But an error is displayed.....
    What should i have to do......????
    Many thanks ,
    Simon

Maybe you are looking for

  • Conditional case statement help.!

    Hello Forum Members, I have a table with stores order along with order dates and other information. I have a requirement to write a query to get the nominations from that order's table according to the logic mentioned below. Nom1 =  Initial order dat

  • Error when Call DS Smoke Test from Siebel.

    Hi , I am trying to test the DS Smoke test from Siebel. I have configured as per the document. but when I click the Button "DS Smoke Test" button I am getting below error Error invoking service 'Policy Automation Determination Server', method 'Assess

  • Why did I have to choose my disc on Startup?

    My company purchased a new intel imac (installed with LION) in December.  This morning when I turned on my computer, I had to choose the disk I wanted to startup from.  I have my internal HD and then an iomega external HD for time machine to back up

  • Iphone 4 siri

    i am using iphone 4 . can i use siri software in iphone 4 how ?

  • 11.1.1.6.9 - scheduljob - status of actual job instead of parentjob

    we know the jobid returned for the schedulereport is parentjobid and not instance jobid. 1. How to get the instance jobid ? 2. Tried getAllScheduledReportHistory by providing parentjobid - its not returning childjobs 3. Only way it worked is getAllSc