Porting with java

Hi,
I am new to java, im still in high school. I have a final project due for my programming class. I need help writing a code so i can send data or whatever to a serial or parrallel port. I am using jbuilder. I need help getting started with this code. Any help would be thankful.
chris

http://java.sun.com/docs/books/tutorial/

Similar Messages

  • How can I write on ports (COM and LPT) with java APIs

    I need to write in LPT and COM ports with Java like the INP and OUT commands on other languajes, but I don�t want to use native classes... because I want a portable code... so what can I do?

    look at the javax.comm package
    http://java.sun.com/products/javacomm/javadocs/tree.html

  • Problem with a C/C++ port into Java

    Hello,
    I have a problem with a small little C/C++ function which I have to port to Java.
    unsigned char CRC8;
    void CRC8_Init(void)
       CRC8 = 0xC7;
    unsigned char Create_CRC8(unsigned char InByte)
       unsigned char CRC8_Count;
       CRC8 ^= InByte;
       for(CRC8_Count=0;CRC8_Count<8;CRC8_Count++)
          if(CRC8&0x80)
             CRC8=(CRC8<<1)^0x1D;
          else
             CRC8<<=1;
       return CRC8;
    //************************************************************The problem is that there is no unsigned char in Java. If I use byte I have values from -127 to 127 but I need values from 0 - 255.
    Here is my code:
    byte crc8;
    public CRC8()
        this.crc8 = (byte)0xC7;
    public int CreateCRC8(byte inByte)
       this.crc8 ^= inByte;
       for(int crc8Count = 0; crc8Count<8; crc8Count++)
           if( (this.crc8 & 0x80) != 0){
              this.crc8 = (byte)((this.crc8 << 1) ^ 0x1D);
            else{      
                this.crc8<<=1;
        return this.crc8;
    }When I call the function:
       CRC8 c = new CRC8();
       c.CreateCRC8((byte)55);
       c.CreateCRC8((byte)47)
       byte result = c.CreateCRC8((byte)0); //estimated result should be 200 (result of the C/C++ function)
    Is someone out there who can give me a piece of code that works on the same way like the C/C++ function.
    Thanks in advance!*

    just make sure to use "byte" where you would use unsigned char; most bitwise operations work the same way. and if you need to convert it to an int to display it or something, do what was shown above
    this java code
    public class CRC8
    byte crc8;
    public CRC8()
        this.crc8 = (byte)0xC7;
    public byte CreateCRC8(byte inByte)
       this.crc8 ^= inByte;
       for(int crc8Count = 0; crc8Count<8; crc8Count++)
           if( (this.crc8 & 0x80) != 0){
              this.crc8 = (byte)((this.crc8 << 1) ^ 0x1D);
            else{
                this.crc8<<=1;
        return this.crc8;
    public static void main(String[]args)
       CRC8 c = new CRC8();
       c.CreateCRC8((byte)55);
       c.CreateCRC8((byte)47);
       byte result = c.CreateCRC8((byte)0);
       System.out.println(result & 0xff); // convert to int as shown above
    }produces the same result as this c++ code:
    #include <iostream>
    using namespace std;
    unsigned char CRC8;
    void CRC8_Init(void)
       CRC8 = 0xC7;
    unsigned char Create_CRC8(unsigned char InByte)
       unsigned char CRC8_Count;
       CRC8 ^= InByte;
       for(CRC8_Count=0;CRC8_Count<8;CRC8_Count++)
          if(CRC8&0x80)
             CRC8=(CRC8<<1)^0x1D;
          else
             CRC8<<=1;
       return CRC8;
    int main()
      CRC8_Init();
      Create_CRC8(55);
      Create_CRC8(47);
       unsigned char result = Create_CRC8(0);
       cout << (int)result << endl;
    }

  • How to connect to Pgsql on server through jdbc with java on local machine

    I am developing an application in which I have to connect to my database that is in Pgsql and Pgsql is installed on Linux server. I am going to access that from my java program and the java is here on my local computer(in Linux). All the intranet connections are there. How can I get accees to that database? I have heard of java SSL tunnel. Is this the only solution or there is something else that I can use more easily. Also if I use java installed on th same server as Pgsql then what I will have to do to call the java methods using AMI. Will the java at server be able to make connection to Pgsql more easily? Please tell me about it if you know.
    Thanks

    The closer java and pgsql, the easier it is of course to connect. So the easiest way is to have everything on the same machine. If you are in the same network you will need an IP based network, which is pretty much standard these days. In this case you need to modify the pg_hba.conf file to allow connections from other machines. In both cases you have to start the postmaster with the -i option to enable enable TCP/IP connections.
    Having java and pgsql connected through the internet is a different story, I do not have any experience with that. But you can use ssh to build a tunnel and connect to a local ip address / port from java which is then forwared securely via the internet to the server.
    In all cases you will need the postgres jdbc driver in your classpath. You can find information about postgres and jdbc on the postgres web site.
    good luck

  • Preventing multiple instances of same application - started with "java app"

    I need to ensure that only one instance of an application runs at any given time.
    As far as I know launching it twice with "java appName" will run each in its own memory space, so it is not immediately obvious how to achieve it. I considered using a database entry or environment variable, but those would need to be cleared on exit and therefore be at risk of not being cleared if the application crashes or hangs.
    Is there a Java API call that would allow me to do a check for other instances of the same application... safely?

    Create a ServerSocket on a fixed port number that isn't used by any other application. If you get a BindException, your application is alread running.

  • WebLogic 8.1 SP4 fails to start on FC4 with Java (GNU libgcj)

    Hi,
    When I use the Java JVM which comes with FC4, my WebLogic server (8.1 SP4) will not boot.
    NB It boots with the BEA jdk (also a 1.4.2 version)
    I choose the FC4 Java JVM, because then the MySQL's driver mysql-connector-java-3.0.16-ga-bin.jar will work. (Checked
    with a simple java program). But the WebLogic server runs off the rails.
    Here is the output of ./startWebLogic.sh :
    CLASSPATH=/usr/lib/jvm/java//lib/tools.jar:/opt/bea/weblogic81/server/lib/weblogic_sp.jar:/opt/bea/weblogic81/server/lib/weblogic.jar:/opt/bea/weblogic81/server/lib/mysql-connector-java-3.0.16-ga-bin.jar:/usr/lib/jvm/java//jre/lib/rt.jar:/opt/bea/weblogic81/server/lib/webservices.jar:
    PATH=/opt/bea/weblogic81/server/bin:/usr/lib/jvm/java//jre/bin:/usr/lib/jvm/java//bin:/usr/kerberos/bin:/usr/lib/courier/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/opt/jboss/bin:/home/harry/bin
    *** This the actual start of the WebLogic server **
    /usr/lib/jvm/java//bin/java -client -Xms32m -Xmx200m -XX:MaxPermSize=128m -Xverify:none -Dweblogic.Name=ISA -Dweblogic.ProductionModeEnabled=false -Djava.security.policy=/opt/bea/weblogic81/server/lib/weblogic.policy weblogic.Server
    *** The error message *** ***************************************************************************
    The WebLogic Server did not start up properly.
    java.lang.NullPointerException
    at javax.security.auth.login.LoginContext.LoginContext(java.lang.String, javax.security.auth.Subject, javax.security.auth.callback.CallbackHandler) (/usr/lib/libgcj.so.6.0.0)
    at javax.security.auth.login.LoginContext.LoginContext(java.lang.String, javax.security.auth.callback.CallbackHandler) (/usr/lib/libgcj.so.6.0.0)
    at weblogic.security.internal.ServerAuthenticate.main(java.lang.String[]) (Unknown Source)
    at weblogic.t3.srvr.T3Srvr.run(java.lang.String[]) (Unknown Source)
    at weblogic.Server.main(java.lang.String[]) (Unknown Source)
    at gnu.java.lang.MainThread.call_main() (/usr/lib/libgcj.so.6.0.0)
    at gnu.java.lang.MainThread.run() (/usr/lib/libgcj.so.6.0.0)

    The Exceptions before originate from a small java program.
    I tested the working of the mysql driver with a small java program as I got these Exceptions when testing a Connection Pool in WebLogic.
    The problems with WebLogic and databases started when I used the pointBaseConsole.sh script.
    SQL State: 08004
    SQL-Server rejected eshtablishment of SQL-connection. Pointbase Server may not be running at localhost at port 9092. NB Of course I have started the Poinbase server. It says it was listening at port 9092
    I get these Exceptions both wtih opening an existing (demo) database as with creating a new one.
    Here is the small java program: It is compiled/run with java (1.4.x) from FC4 and with java 1.5 from SUN. Both versions worked successfully.
    import java.sql.*;
    public class MySQLTest {
    public static void main (String[] args) throws SQLException {
    DriverManager.registerDriver(new com.mysql.jdbc.Driver());
    Connection conn = DriverManager.getConnection(
    "jdbc:mysql://my.site.com/botenlijst",
    "myUser", "myPassword");
    // The query we will execute
    final String query = "SELECT * FROM fotos";
    // Create a statement
    Statement stmt = conn.createStatement ();
    // Execute the query
    ResultSet rset = stmt.executeQuery (query);
    // Dump the result
    String s = " --- ";
    while (rset.next ()) {
    System.out.println ( rset.getString(1) + s + rset.getString(2) );
    conn.close();
    }

  • Mapping editor not working with Java 5 classes

    I have a small protoype web service which I wrote using Tomcat/Axis/Spring/Hibernate and using EJB3 annotations for the mappings. I want to port the persistence layer to Toplink.
    I installed Toplink 9.0.4.1 and added the toplink libraries to my project and implemented the DAO and the spring bean defs.
    I opened the mapping editor and created a project. When I try to add classes to it for mapping I get an error that it can't find the classes (even though I selected them from the chooser). I figured it might be that they were compiled with Java 5, so I switched the JRE_HOME in setenv.cmd to my Java 5 JRE. Now I can import the classes and see the attributes but when I click on any of them in the Navigator panel, the editor panel remains blank. If I now try to save, I get:
    java.lang.NullPointerException
         at oracle.toplink.workbench.ui.tools.CheckListModel.getRowCount(CheckListModel.java:119)
         at javax.swing.JTable.checkLeadAnchor(JTable.java:2949)
         at javax.swing.JTable.tableChanged(JTable.java:2993)
         at javax.swing.JTable.setModel(JTable.java:2827)
         at oracle.toplink.workbench.ui.tools.CheckList.initialize(CheckList.java:47)
         at oracle.toplink.workbench.ui.tools.CheckList.<init>(CheckList.java:26)
    It seems that the mapping workbench doesnt work with Java 5. What should I do?

    Ah, I see. I saw another post here stating that must use 10.1.3.

  • Connection refused with java, but not javaw

    I have a ServerSocket based program...listening on a port. It is really a very simple program. And I can run it with javaw. Then I can use another problem, for example, telnet to connect to that port, just to prove I can connect to that port. Everything is fine.
    Now if I run the exactly the same ServerSocket program with java, then I got the connection refused error.
    It is weird.
    Do you know why? Do you know a good socket troubleshooting tool on Windows? I am afraid of the viruses, so I haven't downloaded any free tools yet.

    You're right.
    The Norton personal firewall does not handle localhost to localhost correctly. I do all the tests on the same machine. The netstat -an shows the port is listening in either case. But now I know the firewall blocks one of them silently. No rule prompt was triggered. Worse, no logging produced for that particular access.
    Thanks. You've been very helpful.

  • Problem with Java Communication API

    hi
    I installed the Java Communication API on win32 platform (as per the guidelines)
    Now when I try to run the sample program 'Blackbox' for the serial port, I get an error (in fact an exception is generated inside main function in BlackBox.class file)
    I tried the SimpleRead.java example but that too generated the same exception
    Can anybody help me out.... I am a novice with Java Comm API

    I tried running the sample BlackBox program provided for serial port and now it says
    No Serial Ports Found!
    I verified that both comm.jar and javax.comm.properties are in the <JDK>\lib directory.
    Actually, I am using netBeans IDE 1.4 and I used the C:\J2SDK folder installed with netBeans for the Java Communicaion API
    plz help.

  • Enqueuing JMS_TEXT_MESSAGE with Java creates strange message payload

    Hello everybody,
    I'm trying to enqueue a JMS_TEXT_MESSAGE. There is no problem doing this with PL/SQL, but with Java the payload of the enqueued message seems to contain garbage. I tried a lot but actually I have no idea why this happens.
    Here are the different user_data values of the enqueued messages:
    Java: (((; ; 0); ; ; ; ; ; ((; 100; ; ; 27); (; 200; ; 1257325532555; 24); ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; )); 14; ; )
    PL/SQL: ((; ; ; ; ; 0; ); 14; This is a test; )
    As you can see there are a lot of differences. The length of the string (14) is correct with Java, too, but where do the other values come from ? And what happened to the message text ?
    Environment:
    - Oracle Database 10g Enterprise Edition 10.2.0.3.0
    - JDK 1.5.0_06
    - Used libraries
    -- $ORACLE_HOME/rdbms/jlib/jmscommon.jar
    -- $ORACLE_HOME/rdbms/jlib/aqapi13.jar
    -- $ORACLE_HOME/jdbc/lib/ojdb14.jar
    -- $ORACLE_HOME/jlib/jta.jar
    This is how created the user:
    CREATE USER strm_admin IDENTIFIED BY strm_admin;
    GRANT connect, resource, aq_administrator_role TO strm_admin;
    GRANT execute on dbms_aq TO strm_admin;
    Here is the test class that creates the strange payload:
    package test;
    import javax.jms.MessageProducer;
    import javax.jms.Queue;
    import javax.jms.QueueConnection;
    import javax.jms.QueueConnectionFactory;
    import javax.jms.TextMessage;
    import oracle.AQ.AQQueueTable;
    import oracle.AQ.AQQueueTableProperty;
    import oracle.jms.AQjmsDestination;
    import oracle.jms.AQjmsDestinationProperty;
    import oracle.jms.AQjmsFactory;
    import oracle.jms.AQjmsSession;
    public class AQTest
    public static void main(String[] args) throws Exception
    String url = "jdbc:oracle:thin:@server:port:sid";
    QueueConnectionFactory qcf = AQjmsFactory.getQueueConnectionFactory(url, null);
    QueueConnection connection = qcf.createQueueConnection("strm_admin", "strm_admin");
    AQjmsSession session = (AQjmsSession)connection.createQueueSession(true, 0);
    // create queuetable
    AQQueueTableProperty tableProperty = new AQQueueTableProperty("SYS.AQ$_JMS_TEXT_MESSAGE");
    session.createQueueTable("strm_admin", "testqueuetablejms", tableProperty);
    // create queue
    AQQueueTable queueTable = session.getQueueTable("strm_admin", "testqueuetablejms");
    Queue queue = session.createQueue(queueTable, "testqueuejms", new AQjmsDestinationProperty());
    ((AQjmsDestination)queue).start(session, true, true);
    // enqueue message
    TextMessage message = session.createTextMessage();
    message.setText("This is a test");
    MessageProducer producer = session.createProducer(queue);
    producer.send(message);
    producer.close();
    // close
    session.commit();
    session.close();
    connection.close();
    With this PL/SQL the message payload is correct:
    DECLARE
    v_enqueue_options DBMS_AQ.ENQUEUE_OPTIONS_T;
    v_message_properties DBMS_AQ.MESSAGE_PROPERTIES_T;
    v_message SYS.AQ$_JMS_TEXT_MESSAGE;
    v_message_id RAW(16);
    BEGIN
    v_message := SYS.AQ$_JMS_TEXT_MESSAGE.CONSTRUCT;
    v_message.set_text('This is a test');
    DBMS_AQ.ENQUEUE (
    queue_name => 'strm_admin.testqueuejms'
    ,enqueue_options => v_enqueue_options
    ,message_properties => v_message_properties
    ,payload => v_message
    ,msgid => v_message_id
    COMMIT;
    END;
    Can anyone help me, please ? Has anyone experienced the same problem ? Or can anyone reproduce it ?
    Any help is appreciated.
    Roland

    Finally I got it fixed !
    The library "orai18n.jar" hat to be included in class path. Very strange, that there was no exception or any hint to what was missing.

  • How to upgrade Forms 11gR2 to use JAVA 7 after it was installed with JAVA 6

    I recently installed Forms 11gR2 on a development server.  We are trying to have the latest versions of everything to migrate from Forms 10g and assure we have support for the next few years.
    Our platform has the following software configuration:
    Solaris 10 (Update 19) SPARC 64 bits
    Weblogic 11g (10.3.6) that was installed with Java JDK 1.6.0_38
    Forms 11g R2 (11.1.2.1) that was also installed with
    Java JDK 1.6.0_38
    I tried to install Weblogic and Forms using the latest Java 7 JDK (1.7.0_25) but I got an error in the final steps of Forms setup, when I was configuring the domain.  I searched online and found a couple of tips but nothing worked.  The installation was stuck at the
    Creating Weblogic Domain step.  So I decided to try the installation process with the Java 6 JDK that we are using right now for Forms 10g, and it worked perfectly.  I have now two options but I don't know which one might be the better path:
    Uninstall Weblogic and Forms 11g completely, and try to re-install them again with Java 7, trying to fix the error that I got at the end of the configuration process.
    Try to upgrade the current Forms 11g installation from Java 6 to Java 7.  I found a blog that might suggest it is possible, but I don't know if it may cause additional issues along the road. http://pitss.com/us/2013/02/20/how-to-use-java-7-with-oracle-forms-11g-in-an-oracle-supported-environment/
    Thanks in advance for any suggestions you might have, or if any of you has experience installing Forms 11gR2 with Java 7 it might be great to know how to fix this error.  It might be worth mentioning that when I installed Forms and Weblogic with Java 6 I used exactly the same values, ports, options and paths.  The error appears like this in the installation logs and the process hangs there:
    XXX: adding task: oracle.as.install.classic.ca.standard.DomainProvisioningTask
      AdminServer port is 7001
      trying to connect to admuxas09.adminsrvad.sa.gov.au 7001
      Creating Weblogic Domain.
    oracle.as.provisioning.exception.ASProvWorkflowException
            at oracle.as.provisioning.weblogic.ASDomain._createDomain(ASDomain.java:2958)
            at oracle.as.provisioning.weblogic.ASDomain.createDomain(ASDomain.java:2476)
            at oracle.as.provisioning.engine.WorkFlowExecutor._createDomain(WorkFlowExecutor.java:633)
            at oracle.as.provisioning.engine.WorkFlowExecutor.executeWLSWorkFlow(WorkFlowExecutor.java:391)
            at oracle.as.provisioning.engine.Config.executeConfigWorkflow_WLS(Config.java:866)
            at oracle.as.install.classic.ca.standard.StandardWorkFlowExecutor.execute(StandardWorkFlowExecutor.java:65)
            at oracle.as.install.classic.ca.standard.AbstractProvisioningTask.execute(AbstractProvisioningTask.java:26)
            at oracle.as.install.classic.ca.standard.StandardProvisionTaskList.execute(StandardProvisionTaskList.java:61)
            at oracle.as.install.classic.ca.ClassicConfigMain.doExecute(ClassicConfigMain.java:124)
            at oracle.as.install.engine.modules.configuration.client.ConfigAction.execute(ConfigAction.java:371)
            at oracle.as.install.engine.modules.configuration.action.TaskPerformer.run(TaskPerformer.java:88)
            at oracle.as.install.engine.modules.configuration.action.TaskPerformer.startConfigAction(TaskPerformer.java:105)
            at oracle.as.install.engine.modules.configuration.action.ActionRequest.perform(ActionRequest.java:15)
            at oracle.as.install.engine.modules.configuration.action.RequestQueue.perform(RequestQueue.java:64)
            at oracle.as.install.engine.modules.configuration.standard.StandardConfigActionManager.start(StandardConfigActionManager.java:160)
            at oracle.as.install.engine.modules.configuration.boot.ConfigurationExtension.kickstart(ConfigurationExtension.java:81)
            at oracle.as.install.engine.modules.configuration.ConfigurationModule.run(ConfigurationModule.java:86)
            at java.lang.Thread.run(Thread.java:662)
    oracle.as.provisioning.exception.ASProvisioningException
            at oracle.as.provisioning.engine.Config.executeConfigWorkflow_WLS(Config.java:872)
            at oracle.as.install.classic.ca.standard.StandardWorkFlowExecutor.execute(StandardWorkFlowExecutor.java:65)
            at oracle.as.install.classic.ca.standard.AbstractProvisioningTask.execute(AbstractProvisioningTask.java:26)
            at oracle.as.install.classic.ca.standard.StandardProvisionTaskList.execute(StandardProvisionTaskList.java:61)
            at oracle.as.install.classic.ca.ClassicConfigMain.doExecute(ClassicConfigMain.java:124)
            at oracle.as.install.engine.modules.configuration.client.ConfigAction.execute(ConfigAction.java:371)
            at oracle.as.install.engine.modules.configuration.action.TaskPerformer.run(TaskPerformer.java:88)
            at oracle.as.install.engine.modules.configuration.action.TaskPerformer.startConfigAction(TaskPerformer.java:105)
            at oracle.as.install.engine.modules.configuration.action.ActionRequest.perform(ActionRequest.java:15)
            at oracle.as.install.engine.modules.configuration.action.RequestQueue.perform(RequestQueue.java:64)
            at oracle.as.install.engine.modules.configuration.standard.StandardConfigActionManager.start(StandardConfigActionManager.java:160)
            at oracle.as.install.engine.modules.configuration.boot.ConfigurationExtension.kickstart(ConfigurationExtension.java:81)
            at oracle.as.install.engine.modules.configuration.ConfigurationModule.run(ConfigurationModule.java:86)
            at java.lang.Thread.run(Thread.java:662)
    Caused by: oracle.as.provisioning.exception.ASProvWorkflowException: Error Executing workflow.
            at oracle.as.provisioning.engine.WorkFlowExecutor._createDomain(WorkFlowExecutor.java:686)
            at oracle.as.provisioning.engine.WorkFlowExecutor.executeWLSWorkFlow(WorkFlowExecutor.java:391)
            at oracle.as.provisioning.engine.Config.executeConfigWorkflow_WLS(Config.java:866)
            ... 13 more
    Cheers,
    Ivan Neva
    Oracle DBA

    Well if I got it to work with java 6 I'd leave it alone, to say the least. The elephant in the room is the certification matrix.
    http://www.oracle.com/technetwork/developer-tools/forms/overview/index.html
    there's 2 issues, what jdk does forms on the server want? Bigger question, what JRE is acceptable on the client?
    You would surely want the jre to be 7 on the client. Regarding the jdk on the server, you could leave it as is IMHO.
    Note that there was a patch to 11gr2. In conclusion, be sure to check the cert matrix regarding what is certified for the jdk for the server.
    I think the matrices are saying that if you have forms 11.1.2.1.0 that you can use the jdk 7. but like I said the big issue is what can the client use?
    As I read the matrix I think it is saying you have to have 11.1.2.1.0 to use the jre 7 on the client.
    So I would say if you have 11.1.2.1.0 on the server you are good because it's not a problem to have the jdk 6 on the server, if not you have to apply the patch in order to enable the jre 7 on the client.

  • Domino Gateway Crash with Java.io.EOF Exception

    All,
    My client has IDM 7.1 provisioning to Domino 6.5.4. It has been working fine untill last friday. Since then the gateway is crashing with Java.io.EOF Exception while trying to provision. The code has not changed and per some of the previous threads in this forum, I checked if they had any configuration changes in the Domino gateway server or at the domino side - like virus scan etc. However the answer was no.
    I would really appreciate any help on this.
    Thanks,
    Biju.
    Here is the last few lines in the gateway trace before it crashes:
    27/2009 00.20.25.343000 [4924] (../../../../src/wps/agent/connect/main.cpp,247): Enter: doDominoInitialization
    03/27/2009 00.20.25.343000 [4924] (../../../../src/wps/agent/connect/main.cpp,271): NotesIniFileDir: D:\IDM\gateway\notes.ini
    03/27/2009 00.20.25.343000 [4924] (../../../../src/wps/agent/connect/main.cpp,279): NotesInstallDir: D:\notes
    03/27/2009 00.20.25.343000 [4924] (../../../../src/wps/agent/connect/main.cpp,291): Domino Enabled
    03/27/2009 00.20.25.343000 [4924] (../../../../src/wps/agent/connect/main.cpp,303): Updated PATH: ;D:\notes;
    03/27/2009 00.20.25.343000 [4924] (../../../../src/wps/agent/connect/main.cpp,310): NOTESNTSERVICE Successfully set
    03/27/2009 00.20.25.406000 [4924] (../../../../src/wps/agent/connect/main.cpp,327): Exit: doDominoInitialization
    03/27/2009 00.20.25.406000 [2752] (../../../../src/wps/agent/connect/ntsvc.cpp,95): Service::svc
    03/27/2009 00.20.25.437000 [2752] (../../../../src/wps/agent/connect/server.cpp,269): starting up server daemon PORT 9278
    03/27/2009 00.20.25.875000 [2752] (../../../../src/wps/agent/connect/RAEncryptor.cpp,128): Error reading encrpytion key from registry. Using default.
    03/27/2009 00.20.25.875000 [2752] (../../../../src/wps/agent/connect/RASecureConnection.cpp,64): RASecureConnection: new connection handler
    03/27/2009 00.20.25.875000 [3068] (../../../../src/wps/agent/connect/client_handler.cpp,344): got 68 bytes
    03/27/2009 00.20.25.875000 [3068] (../../../../src/wps/agent/connect/RASecureConnection.cpp,264): ReceivePrivate: count: 47, 64 wrapped up rawlength 63
    03/27/2009 00.20.25.875000 [3068] (../../../../src/wps/agent/connect/RASecureConnection.cpp,273): Rightbefore decrypt:
    03/27/2009 00.20.25.875000 [3068] (../../../../src/wps/agent/connect/RAEncryptor.cpp,69): RAEncryptor::Decrypt3DES: input length (56) moded to 7
    03/27/2009 00.20.25.875000 [3068] (../../../../src/wps/agent/connect/RASecureConnection.cpp,114): SendPrivate: count: 0 pad: 4
    03/27/2009 00.20.25.875000 [3068] (../../../../src/wps/agent/connect/RASecureConnection.cpp,422): Enter: MakeChallengeResponse
    03/27/2009 00.20.25.875000 [3068] (../../../../src/wps/agent/connect/RASecureConnection.cpp,474): MakeChallengeResponse(in,out):
    (5C,2F) (CC,56)
    03/27/2009 00.20.25.875000 [3068] (../../../../src/wps/agent/connect/RASecureConnection.cpp,476):  (26,E3) (D7,65)
    03/27/2009 00.20.25.875000 [3068] (../../../../src/wps/agent/connect/RAEncryptor.cpp,128): Error reading encrpytion key from registry. Using default.
    03/27/2009 00.20.25.875000 [3068] (../../../../src/wps/agent/connect/RASecureConnection.cpp,497): MakeChallengeResponse Key:
    03/27/2009 00.20.25.875000 [3068] (../../../../src/wps/agent/connect/RASecureConnection.cpp,507): Exit: MakeChallengeResponse
    03/27/2009 00.20.25.875000 [3068] (../../../../src/wps/agent/connect/RASecureConnection.cpp,114): SendPrivate: count: 16 pad: 4
    03/27/2009 00.20.25.875000 [3068] (../../../../src/wps/agent/connect/client_handler.cpp,344): got 36 bytes
    03/27/2009 00.20.25.875000 [3068] (../../../../src/wps/agent/connect/RASecureConnection.cpp,264): ReceivePrivate: count: 16, 32 wrapped up rawlength 32
    03/27/2009 00.20.25.875000 [3068] (../../../../src/wps/agent/connect/RASecureConnection.cpp,273): Rightbefore decrypt:
    03/27/2009 00.20.25.875000 [3068] (../../../../src/wps/agent/connect/RAEncryptor.cpp,69): RAEncryptor::Decrypt3DES: input length (24) moded to 3
    03/27/2009 00.20.25.875000 [3068] (../../../../src/wps/agent/connect/RASecureConnection.cpp,114): SendPrivate: count: 0 pad: 4
    03/27/2009 00.20.25.875000 [3068] (../../../../src/wps/agent/connect/RAEncryptor.cpp,128): Error reading encrpytion key from registry. Using default.
    03/27/2009 00.20.25.875000 [3068] (../../../../src/wps/agent/connect/RASecureConnection.cpp,571): Session key :
    03/27/2009 00.20.25.875000 [3068] (../../../../src/wps/agent/connect/client_handler.cpp,344): got 16036 bytes
    03/27/2009 00.20.25.875000 [3068] (../../../../src/wps/agent/connect/RASecureConnection.cpp,264): ReceivePrivate: count: 16012, 16032 wrapped up rawlength

    Workflow Trace:
                                  <List>
                                    <String>defaultPasswordExp</String>
                                    <String>365</String>
                                  </List>
                                </List>
                              </ResultRows>
                            </ResultTable>
                          </ResultItem>
                          <ResultItem type='error' status='error'>
                            <ResultError throwable='com.waveset.util.WavesetException'>
                              <StackTrace>com.waveset.util.WavesetException:
    ==> java.io.EOFException:
         at com.waveset.adapter.AgentResourceAdapter.getResponseBytes(AgentResourceAdapter.java:924)
         at com.waveset.adapter.AgentResourceAdapter.getResponse(AgentResourceAdapter.java:955)
         at com.waveset.adapter.AgentResourceAdapter.getResponse(AgentResourceAdapter.java:940)
         at com.waveset.adapter.AgentResourceAdapter.getResponse(AgentResourceAdapter.java:934)
         at com.waveset.adapter.AgentResourceAdapter.doCreateOrUpdateRequest(AgentResourceAdapter.java:1289)
         at com.waveset.adapter.DominoResourceAdapter.doCreateOrUpdateRequest(DominoResourceAdapter.java:1072)
         at com.waveset.adapter.AgentResourceAdapter.createAccounts(AgentResourceAdapter.java:266)
         at com.waveset.adapter.ResourceAdapterBase.createAccount(ResourceAdapterBase.java:832)
         at com.waveset.adapter.ResourceAdapterProxy.createAccount(ResourceAdapterProxy.java:213)
         at com.waveset.provision.ProvisionContext.doResource(ProvisionContext.java:2103)
         at com.waveset.provision.ProvisionContext.processOp(ProvisionContext.java:592)
         at com.waveset.provision.ThreadContext.processContext(ThreadContext.java:330)
         at com.waveset.provision.ThreadContext.launchThreads(ThreadContext.java:239)
         at com.waveset.provision.ProvisionContext.doResources(ProvisionContext.java:280)
         at com.waveset.provision.Provisioner.reProvision(Provisioner.java:2226)
         at com.waveset.provision.Provisioner.reProvision(Provisioner.java:1416)
         at com.waveset.provision.WorkflowServices.reProvision(WorkflowServices.java:2791)
         at com.waveset.provision.WorkflowServices.call(WorkflowServices.java:789)
         at com.waveset.adapter.RASecureConnection.access$700(RASecureConnection.java:53)
         at com.waveset.adapter.RASecureConnection$ReceiveThread.run(RASecureConnection.java:1080)
    Wrapped exception:
    java.io.EOFException
         at java.io.DataInputStream.readFully(DataInputStream.java:204)
         at java.io.DataInputStream.readInt(DataInputStream.java:380)
         at com.waveset.adapter.RASecureConnection.ReceivePrivateThread(RASecureConnection.java:540)
         at com.waveset.adapter.RASecureConnection.access$700(RASecureConnection.java:53)
         at com.waveset.adapter.RASecureConnection$ReceiveThread.run(RASecureConnection.java:1080)
    </StackTrace>
                              <ResultError throwable='java.io.EOFException'>
                                <StackTrace>java.io.EOFException
         at java.io.DataInputStream.readFully(DataInputStream.java:204)
         at java.io.DataInputStream.readInt(DataInputStream.java:380)
         at com.waveset.adapter.RASecureConnection.ReceivePrivateThread(RASecureConnection.java:540)
         at com.waveset.adapter.RASecureConnection.access$700(RASecureConnection.java:53)
         at com.waveset.adapter.RASecureConnection$ReceiveThread.run(RASecureConnection.java:1080)
    </StackTrace>
                              </ResultError>
                            </ResultError>
                          </ResultItem>
                        </WavesetResult>
                      </ResourceResult>

  • C++ can send a "struct" over TCP.How to do the same fuction with JAVA?

    as Title~
    C++ send a struct like the following...
    NEO_MSG neo_msg;
    struct NEO_MSG
    int iPortRecv; // port for recv data of client
    char verify;
    ////After create a TCP connection....
    send(ServerSock, (char*)&neo_msg, sizeof(neo_msg), 0);
    How to rewrite it with JAVA?

    If you are trying to do it in a way that is compatible with C++, then you'll need to write the bytes to the socket. You can do this by wrapping the socket's output stream with a DataOutputStream, then writing each value in order.
    Remember that a C++ struct is just a convention of accessing a linear array of bytes, so the above is equivalent.
    If you are just trying to send an Object's data over a socket (to another Java app), then you can wrap the socket's output stream with an ObjectOutputStream, then just write the object to it.
    - K

  • Sending data during the call with java enabled mobile devices

    hi every one ,
    this is the problem :
    i have 2 mobile phone with java enabled os , i want to call (dial) from phone1 to phone2 with java code , (this will be done by platformRequest("tell:123456"))
    AND then i want to for example press key '1' in phone1 during the call some program send this key to phone2 and in phone2 i want to switch this key and understand that was key '1' ...
    how can i send this data for example a key pressed event to another phone with J2ME ???
    i am developing it with netbeans Mobile Application by the way ...
    could you please tell me your opinion and help me in this ,
    Thanks a lot ,
    Omid

    Hi Kanagaraja L,
    Thanks for you response.
    No I haven't created Created RFC Destination , this RFC destination will be of my JAVA system ???.
    I have tried creating the partner logical system in WE20 and dine the following steps:
    1. Partner No.   IDES800     Ides 800 System - Sender System
        Partn.Type    LS          Logical system
    2. The tab Post processing : permitted agent is filled with default parameters.
    3. Then in the outbound parameter table control I have pressed the add record button and got a new screen in
        which I have made the following entry :-
      Partner No.           IDES800        Ides 800 System - Sender System
      Partn.Type            LS             Logical system
      Partner Role          LS             Logical system
        Message Type      SYNCH                            ALE:Dummy Message Type for De
        Message code
        Message function
    Under tab Outbound options :
    Receiver Port  = A000000008  (This I have selected from F4 help)
    Basic type = SYNCHRON
    Saved it with the above data.
    Now I am not able to understand how to do the things you have mentioned in 3rd step in your reply.
    What are all the things I have to do kindly tell , as I am very new to Idocs so don't have much knowledge.
    Edited by: Rachit Khanna on Dec 7, 2009 1:49 PM

  • Servlet Communication with Java WebStart

    Hi there,
    we have an application that works fine with Java WebStart whenever we start it in a local area network. But from outside the LAN the application cannot communicate to it's servlets. I use the codebase IP address with the servlet runner's port (http://<codebase IP>:port/) as URL for servlet communication, but the application's request never reaches the servlets.
    My question is now, if anyone had the same or a similar problem with servlet communication using Java WebStart, or if anyone knows, if that might be a problem with proxy configuration.
    The servlet runner we use, is JServ from Sun (JSDK2.0) and the webserver where it is running on is not behind a firewall or a proxy, but the client PC with the web start application is.
    Thanks,
    Katja

    Thank you for your early reply. But I think, that's not the problem.
    I get no security error and the webserver is identified the same way it is in the jnlp file. Also my application is not running in the Sandbox. My assumption is, that the http-request to the servlet does not go through the proxy server between my PC and the PC the servletrunner is running on.
    I wonder if I have to configure my application to use a proxy server for communication with the servlets instead of the direct http-request to the servlet runner?

Maybe you are looking for