Problems with porting to Personal Java

Hi all,
I'm currently trying to port a java application to Personal Java to run on the jeode jvm. The application needs certain packages from Java standard Edition, packages like java.util.Properties.class etc. However when I add this package to the core jar of classes for jeode, my program still cannot see it. I keep getting a NoSuchMethod Error on java.util.Properties.setProperties. This method does exist, and I am calling it correctly.
I'm just wondering if anyone has met this sort of a problem with jeode? Also packages like java.lang.object and java.lang.string don't appear in the main jar file for jeode? Does anyone know if this is correct?
Many thanks for yor help in advance,
Shane

Hi all,
I'm currently trying to port a java
a java application to Personal Java to run on the
jeode jvm. The application needs certain packages
from Java standard Edition, packages like
java.util.Properties.class etc. However when I add
this package to the core jar of classes for jeode, my
program still cannot see it. I keep getting a
NoSuchMethod Error on
java.util.Properties.setProperties. This method does
exist, and I am calling it correctly.
I suppose you mean java.util.Properties.setProperty(String, String) ? This API was added to Properties in Java 2, so it is not available in Personal Java. You will have to use put(Object, Object), which Properties inherits from Hashtable.
As a suggestion, try running JavaCheck on your project to find uses of APIs not contained in the pjava spec.
Regards,
Alex

Similar Messages

  • Problems with JDBC on personal Java

    Hi,
    I am a PhD student in Napier University and work with PDAs and Java. I have installed Jeode 1.9 Runtime Environment which is a certified implementation of 1.2 Personal Java on my HP IPAQ PDA.
    I have the following code that works fine on my desktop, however produces an exception on my PDA (ERROR: java.lang.ClassNotFoundException: sun/jdbc/odbc/JdbcOdbcDriver)
    Thanks for your help!!!
    The code:
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import java.sql.*;
    public class WhoAmI2
    public static void main (String[] args)
    String LocalIP = new String();
    String LocalHome = new String();
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    /* the next 3 lines are Step 2 method 2 from above - you could use the direct
    access method (Step 2 method 1) istead if you wanted */
    String filename = "c:/CompInfo.mdb";
    String database = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=";
    database+= filename.trim() + ";DriverID=22;READONLY=true}"; // add on to the end
    // now we can get the connection from the DriverManager
    Connection con = DriverManager.getConnection( database ,"","");
    Statement s = con.createStatement();
    s.execute("create table Details ( OSName String, OSArch String, OSVer String, JavRunNam String, JavVMVer String, UserName String, UserCountry String, UserLang String, JavVMSpec String, JavRunVer String, JavVer String, Graphics String, SunArchDat String, SunCPUEnd String, SunUni String, SunCPUISA String, MainIP String, MainHost String, LocalIP String, LocalHost String )"); // create a table
    try
    // Properties p = new Properties(System.getProperties());
    // System.getProperties().list(System.out);
    InetAddress localaddr = InetAddress.getLocalHost () ;
    System.out.println ("OS Name : \t\t" + System.getProperty("os.name")) ;
    System.out.println ("OS Architecture : \t" + System.getProperty("os.arch")) ;
    System.out.println ("OS Version : \t\t" + System.getProperty("os.version")) ;
    System.out.println () ;
    System.out.println ("Java Runtime Name : \t" + System.getProperty("java.runtime.name")) ;
    System.out.println ("Java VM Version : \t" + System.getProperty("java.vm.version")) ;
    System.out.println () ;
    System.out.println ("Username : \t\t" + System.getProperty("user.name")) ;
    System.out.println ("User Country : \t\t" + System.getProperty("user.country")) ;
    System.out.println ("User Language : \t" + System.getProperty("user.language")) ;
    System.out.println () ;
    System.out.println ("Java VM Spec : \t\t" + System.getProperty("java.vm.specification.name")) ;
    System.out.println ("Java Runtime Version : \t" + System.getProperty("java.runtime.version")) ;
    System.out.println ("Java Version : \t\t" + System.getProperty("java.version")) ;
    System.out.println ("Graphics : \t\t" + System.getProperty("java.awt.graphicsenv")) ;
    System.out.println () ;
    System.out.println ("Sun Arch Datamodel : \t" + System.getProperty("sun.arch.data.model")) ;
    System.out.println ("Sun CPU Endian : \t" + System.getProperty("sun.cpu.endian")) ;
    System.out.println ("Sun Unicode : \t\t" + System.getProperty("sun.io.unicode.encoding")) ;
    System.out.println ("Sun CPU ISA : \t\t" + System.getProperty("sun.cpu.isalist")) ;
    System.out.println () ;
    System.out.println ( "main Local IP Address : " + localaddr.getHostAddress () );
    System.out.println ( "main Local hostname : " + localaddr.getHostName () );
    System.out.println () ;
    InetAddress[] localaddrs = InetAddress.getAllByName ( "localhost" ) ;
    for ( int i=0 ; i<localaddrs.length ; i++ )
    if ( ! localaddrs[ i ].equals( localaddr ) )
    System.out.println ( "alt Local IP Address : " + localaddrs[ i].getHostAddress () );
    System.out.println ( "alt Local hostname : " + localaddrs[ i].getHostName () );
    System.out.println () ;
    LocalIP=localaddrs[ i].getHostAddress ();

    I have the following code that works fine on my
    desktop, however produces an exception on my PDA
    (ERROR: java.lang.ClassNotFoundException:
    sun/jdbc/odbc/JdbcOdbcDriver)It looks as though Jeode doesn't come with the JDBC/ODBC bridge JDBC driver. You'll need to find another JDBC driver to use.

  • HELP!! asa 5505 8.4(5) problem with port forwarding-smtp

    Hi I am having a big problem with port forwarding on my asa. I am trying to forward smtp through the asa  to my mail server.
    my mail server ip is 10.0.0.2 and my outside interface is 80.80.80.80 , the ASA is setup with pppoe (I get internet access no problem and that seems fine)
    When I run a trace i get "(ACL-Drop) - flow is deied by configured rule"
    below is my config file , any help would be appreciated
    Result of the command: "show running-config"
    : Saved
    ASA Version 8.4(5)
    hostname ciscoasa
    domain-name domain.local
    enable password mXa5sNUu4rCZ.t5y encrypted
    passwd 2KFQnbNIdI.2KYOU encrypted
    names
    interface Ethernet0/0
    switchport access vlan 2
    interface Ethernet0/1
    interface Ethernet0/2
    interface Ethernet0/3
    interface Ethernet0/4
    interface Ethernet0/5
    interface Ethernet0/6
    interface Ethernet0/7
    interface Vlan1
    nameif inside
    security-level 100
    ip address 10.0.0.1 255.255.255.0
    interface Vlan2
    nameif outside
    security-level 0
    pppoe client vpdn group ISPDsl
    ip address 80.80.80.80 255.255.255.255 pppoe setroute
    ftp mode passive
    dns server-group DefaultDNS
    domain-name domain.local
    same-security-traffic permit intra-interface
    object network obj_any
    subnet 0.0.0.0 0.0.0.0
    object network Server_SMTP
    host 10.0.0.2
    access-list outside_access_in extended permit tcp any object server_SMTP eq smtp
    pager lines 24
    logging asdm informational
    mtu inside 1500
    mtu outside 1500
    icmp unreachable rate-limit 1 burst-size 1
    no asdm history enable
    arp timeout 14400
    no arp permit-nonconnected
    object network obj_any
    nat (inside,outside) dynamic interface
    object network server_SMTP
    nat (inside,outside) static interface service tcp smtp smtp
    nat (inside,outside) after-auto source dynamic any interface
    access-group outside_access_in in interface outside
    timeout xlate 3:00:00
    timeout pat-xlate 0:00:30
    timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 icmp 0:00:02
    timeout sunrpc 0:10:00 h323 0:05:00 h225 1:00:00 mgcp 0:05:00 mgcp-pat 0:05:00
    timeout sip 0:30:00 sip_media 0:02:00 sip-invite 0:03:00 sip-disconnect 0:02:00
    timeout sip-provisional-media 0:02:00 uauth 0:05:00 absolute
    timeout tcp-proxy-reassembly 0:01:00
    timeout floating-conn 0:00:00
    dynamic-access-policy-record DfltAccessPolicy
    user-identity default-domain LOCAL
    http server enable
    http 10.0.0.0 255.255.255.0 inside
    no snmp-server location
    no snmp-server contact
    snmp-server enable traps snmp authentication linkup linkdown coldstart warmstart
    telnet timeout 5
    ssh timeout 5
    ssh key-exchange group dh-group1-sha1
    console timeout 0
    vpdn group ISP request dialout pppoe
    vpdn group ISP localname [email protected]
    vpdn group ISP ppp authentication chap
    vpdn username [email protected] password *****
    dhcpd auto_config outside
    threat-detection basic-threat
    threat-detection statistics access-list
    no threat-detection statistics tcp-intercept
    webvpn
    class-map inspection_default
    match default-inspection-traffic
    policy-map type inspect dns preset_dns_map
    parameters
      message-length maximum client auto
      message-length maximum 512
    policy-map global_policy
    class inspection_default
      inspect dns preset_dns_map
      inspect ftp
      inspect h323 h225
      inspect h323 ras
      inspect rsh
      inspect rtsp
      inspect sqlnet
      inspect skinny 
      inspect sunrpc
      inspect xdmcp
      inspect sip 
      inspect netbios
      inspect tftp
      inspect ip-options
    service-policy global_policy global
    prompt hostname context
    no call-home reporting anonymous
    Cryptochecksum:c5570d7ddffd46c528a76e515e65f366
    : end

    Hi Jennifer
    I have removed that nat line as suggested but still no joy.
    here is my current config
    Result of the command: "show running-config"
    : Saved
    ASA Version 8.4(5)
    hostname ciscoasa
    domain-name domain.local
    enable password mXa5sNUu4rCZ.t5y encrypted
    passwd 2KFQnbNIdI.2KYOU encrypted
    names
    interface Ethernet0/0
    switchport access vlan 2
    interface Ethernet0/1
    interface Ethernet0/2
    interface Ethernet0/3
    interface Ethernet0/4
    interface Ethernet0/5
    interface Ethernet0/6
    interface Ethernet0/7
    interface Vlan1
    nameif inside
    security-level 100
    ip address 10.0.0.1 255.255.255.0
    interface Vlan2
    nameif outside
    security-level 0
    pppoe client vpdn group ISP
    ip address 80.80.80.80 255.255.255.255 pppoe setroute
    ftp mode passive
    dns server-group DefaultDNS
    domain-name domain.local
    same-security-traffic permit intra-interface
    object network obj_any
    subnet 0.0.0.0 0.0.0.0
    object network Server_Mail
    host 10.0.0.2
    access-list outside_access_in extended permit tcp any object Server_Mail eq smtp
    pager lines 24
    logging asdm informational
    mtu inside 1500
    mtu outside 1500
    icmp unreachable rate-limit 1 burst-size 1
    no asdm history enable
    arp timeout 14400
    no arp permit-nonconnected
    object network obj_any
    nat (inside,outside) dynamic interface
    object network Server_Mail
    nat (inside,outside) static interface service tcp smtp smtp
    access-group outside_access_in in interface outside
    timeout xlate 3:00:00
    timeout pat-xlate 0:00:30
    timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 icmp 0:00:02
    timeout sunrpc 0:10:00 h323 0:05:00 h225 1:00:00 mgcp 0:05:00 mgcp-pat 0:05:00
    timeout sip 0:30:00 sip_media 0:02:00 sip-invite 0:03:00 sip-disconnect 0:02:00
    timeout sip-provisional-media 0:02:00 uauth 0:05:00 absolute
    timeout tcp-proxy-reassembly 0:01:00
    timeout floating-conn 0:00:00
    dynamic-access-policy-record DfltAccessPolicy
    user-identity default-domain LOCAL
    http server enable
    http 10.0.0.0 255.255.255.0 inside
    no snmp-server location
    no snmp-server contact
    snmp-server enable traps snmp authentication linkup linkdown coldstart warmstart
    telnet timeout 5
    ssh timeout 5
    ssh key-exchange group dh-group1-sha1
    console timeout 0
    vpdn group ISP request dialout pppoe
    vpdn group ISP localname [email protected]
    vpdn group ISP ppp authentication chap
    vpdn username [email protected] password *****
    dhcpd auto_config outside
    threat-detection basic-threat
    threat-detection statistics access-list
    no threat-detection statistics tcp-intercept
    webvpn
    class-map inspection_default
    match default-inspection-traffic
    policy-map type inspect dns preset_dns_map
    parameters
      message-length maximum client auto
      message-length maximum 512
    policy-map global_policy
    class inspection_default
      inspect dns preset_dns_map
      inspect ftp
      inspect h323 h225
      inspect h323 ras
      inspect rsh
      inspect rtsp
      inspect esmtp
      inspect sqlnet
      inspect skinny 
      inspect sunrpc
      inspect xdmcp
      inspect sip 
      inspect netbios
      inspect tftp
      inspect ip-options
    service-policy global_policy global
    prompt hostname context
    no call-home reporting anonymous
    Cryptochecksum:f3bd954d1f9499595aab4f9da8c15795
    : end
    also here is the packet trace
    and my acl
    Thanks

  • Link Problem with port 2 in WLC 4402

    Hi,
    I have a problem with port 2 in Wireless Lan Controler 4402. The problem is that the distribution port 2 of the WLC not link with the switch (3750). We receive the WLC and we follow the autostart wizard and we enable LAG. The wizard finish, I restart the system and all works fine. The two distribution ports of WLC, 1 and 2 appears UP and the LAG works correctly. After this we upgrade the firmware of the WLC to the version AIR-WLC4400-k9-6-0-182-0.aes and we restart the system again but at this time port 2 does not link and port 1 link OK. We do not know the reason why port 2 doesn´t link? Could you help me ?
    Thank in advance.
    Regards.

    Does it properly refuse authentication ? Or does the login page stop appearing or something ?
    There was a bug with the webauth dying under heavy load, regardless of number of identical accounts used.
    One good way for you to check would be, when problem occurs, to create a second backup guest user and see if that would start working. If it doesn't, the account is not the problem.
    I'm not aware of any maximum of usage of the same account.
    Which 4.2 exactly are you running ?

  • Problem with compilation of HelloWorld.java

    hi,
    getting problem with compilation of HelloWorld.java
    CLASSPATH--- C:\java
    PATH--- C:\j2sdk1.4.2_04\bin
    HelloWorld.java source code in: C:\java
    On cmd prompt:
    C:\java>javac HelloWorld.java
    error: cannot read: HelloWorld.java
    1 error
    pls help me with this
    rgds,
    sanlearns

    What does this command yield?
    dir HelloWorld.java

  • Problem with Port Forwarding in WRT320N

    Good day.
    I have a web-server and Internet-radio translator to local network of my provider. And I found a problem with Port Forwarding. I'm trying to setup 80 & 8000 ports to forward. And it's working but only for Internet, without provider's local network. My web-server isn't accessible in local network and radio-translator too. 
    So is it possible to forward ports absolutely - for any type of connections? 
    P.S. DMZ is working like Port Forwarding.

    If you ask questions you have to mention that you have an PPTP connection to the internet and another network directly on the internet port. Otherwise noone will really understand your question as it is a very unusual setup.
    Your setup is not one really supported by the router. You are lucky that it works but don't expect too much. Port forwarding only the internet connection. If you use PPTP the network on the internet port is basically hidden. Using that local network on the internet port is not supported.
    The DMZ host is the IP address to which all ports are forwarded to which are not forwarded otherwise. The same restriction applies here.
    I would recommend to ask your ISP which router they recommend for their internet connection. I think most/all Linksys routers and many other brand's consumer routers won't really support a setup like yours...

  • Are there Color issues with Gifs in Personal Java?

    I am using the pjavawince-1_1-beta-arm implementation of Personal Java.(because that's the only one that seems to actually be readily available, but that's a different issue...)
    I have a program that displays gif's, some with and some without transparency.
    The gif's look fine when I run the program in emulation on my laptop, both in JSE JDK1.1.8_009 and in JME PJEE3.1. However when I run the program on my Pocket PC 2002 PDA, the images appear with a lower resolution or number of colors. When I load the same images into PocketIE on the PDA, they appear fine.
    It appears that Personal Java is doing some sort of translation of the palette. For example, if a gif contains thirty shades of red, the personal java renders it with eight. Like the images are being remapped to a more generalized palette.
    It doesn't appear to be a transparency issue, because the same problem occurs with both.
    Does this problem occur for anyone else? Is it an issue of the Personal Java version or does it happen in both Personal Java 1.1.3 and 1.2? Is it an issue specific to Sun's Beta Personal Java VM? Does it happen in the Jeode JVM?

    Could you please tell me where to find pjavawince-1_1-beta-arm? I can't find it on the personal java page.. just the ones for mips and sh3.. Thanks

  • Problem with n 79 instal java software

    hi
    i have one problem with my nokia n 79
    when i install a java software or game my device ask me where do u wana install? in memory card or memory phone.its natural.but if i select memory card when the installation finished autorun to start the program and software is disable and when i go to the application list are no icon of that progran to run.but in installation list there is it.so there is any icon andany way to run it.
    its just abouy java program and install to memroy card
    i dont have any problem with symbian in 2 memory and  java when i install it in memory phone
    please help me
    thanks

    dear alzaeem i ran java in before this time when i installed it in memory card
    i dont know whay u say it doesnt run in memory card
    before this i installed every application of java and symbian in memory card with out any problem and after installation icon of them were in application list
    when i install java in memry card i dont have problem with installation and its complete installation and there is the name of that software java in installation list but my problem is that there is any icon of software in application list or every where to start or run it.

  • Problem with XMLEncoder for complex java object i

    Hi All.
    My problem with XMLEncoder is it doesnt transfrom java objects without default no arguement constructor. I was able to resolve this in my main java object class, by setting a new persistence delegate, but for other classes that are contained in the main class, they are not being encoded.
    Thanks in advance for your answers

    Better to put this in java forum :-)
    Just check, if this helps.
    http://forum.java.sun.com/thread.jspa?threadID=379614&messageID=1623434

  • In case of problems with SAP GUI for Java  ...

    Hello all,
    in case of having problems (errors, ABAP dumps etc.) with SAP GUI for Java, please create an OSS message on component BC-FES-JAV with information described in OSS note 326558
    http://www.service.sap.com/~form/sapnet?_FRAME=CONTAINER&_OBJECT=011000358700010521522001.
    This makes sure our official support channels get aware of your problem.
    Thanks and best regards
    Rolf-Martin

    Hello Rolf-Martin,
    i don't have access to this website to view the note.
    The version of the Suse libc is:
    GNU C Library stable release version 2.3.2, by Roland McGrath et al.
    Copyright (C) 2003 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.
    There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
    PARTICULAR PURPOSE.
    Compiled by GNU CC version 3.3 20030226 (prerelease) (SuSE Linux).
    Compiled on a Linux 2.4.20 system on 2003-03-13.
    Best Regards,
    Piotr Brostovski

  • Problems with PL/SQL Calling Java Function that returns String []

    Hi,
    I have written the following code. It's not compiling OK.
    DECLARE
    TYPE Tokens_Type IS VARYING ARRAY(20) OF VARCHAR2(20);
    s1 Tokens_Type DEFAULT NULL;
    SQL_STR VARCHAR2(2000) DEFAULT NULL;
    BEGIN
    SQL_STR := 'CREATE OR REPLACE FUNCTION Schema1.SPLIT_STR (S2 VARCHAR2(20)) ' ||
    'RETURN s1 ' ||
    'AS LANGUAGE JAVA ' ||
    'NAME ''String_Mani.split_it (String) return java.lang.String []''';
    EXECUTE IMMEDIATE SQL_STR;
    END;
    What's the problem with this?

    You cannot create a function with a locally defined return type. As soon as this script is executed, Oracle no longer knows what the TOKEN_TYPE type is any more, so the function will be invalid.
    You need to use a collection type defined at the database level or defined in a package - somewhere where it will persist.

  • Problems with importing classes in Java

    Hello,
    i have some problems with a simple project.
    The structure is like this:
    web-inf/classes/databeans/loginexistinguserform.java
    web-inf/classes/formactions/loginexistinguseraction.java
    loginexistinguserform.java :
    package databeans;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionErrors;
    import org.apache.struts.action.ActionError;
    import org.apache.struts.action.ActionMapping;
    import javax.servlet.http.HttpServletRequest;
    public class LoginExistingUserForm extends ActionForm
         String userid;
         String password;
         public String getUserid(){return userid;}
         public void setUserid(String newUserid){userid=newUserid;}
         public String getPassword(){return password;}
         public void setPassword(String newPassword) {password=newPassword;}
         public ActionErrors validate(ActionMapping mapping, HttpServletRequest request){
              ActionErrors errors=new ActionErrors();
              if(this.userid==null||this.userid.equals(""))
                   errors.add("user",new ActionError("error.userid.required"));
              if(this.password==null||this.password.equals(""))
                   errors.add("pass",new ActionError("error.password.required"));
              return errors;
    }loginexistinguseraction.java
    package formactions;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    import java.io.IOException;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import databeans.LoginExistingUserForm;
    public class LoginExistingUserAction extends Action
         public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
         throws IOException, ServletException
              LoginExistingUserForm loginData=(LoginExistingUserForm)form;
              if(loginData.getUserid().equals("Admin")&&loginData.getPassword().equals("Parola"))
                   return mapping.findForward("successLogin");
              else
                   return mapping.findForward("failureLogin");
    }I can complie succesfully loginexisitinguserform.java but problems appears when i want to compile the second file, loginexistinguseraction.java with command: javac loginexistinguseraction.java
    C:\ApacheGroup\Tomcat\webapps\PersonalWeb\WEB-INF\classes\formactions>javac loginexistinguseraction.java
    loginexistinguseraction.java:10: package databeans does not exist
    import databeans.LoginExistingUserForm;
    ^
    loginexistinguseraction.java:17: cannot find symbol
    symbol : class LoginExistingUserForm
    location: class formactions.LoginExistingUserAction
    LoginExistingUserForm loginData=(LoginExistingUserForm)form;
    ^
    loginexistinguseraction.java:17: cannot find symbol
    symbol : class LoginExistingUserForm
    location: class formactions.LoginExistingUserAction
    LoginExistingUserForm loginData=(LoginExistingUserForm)form;
    ^
    3 errors
    I have the CLASSPATH variable setup tu C:/Sun/Appserver/lib/j2ee.jar
    Can someone help me ? Thank you in advance !

    Thank you very much ! It worked. I'm really new in Jav a programming.
    Now i have encoutered another problem. When i want to login, and enter user name and password i am redirected to a login.do page, instead of Welcome.jsp
    Here is Login.jsp:
    <%@taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@page contentType="text/html; charset=ISO-8859-1"%>
    <html>
    <head><title>Login Form</title></head>
    <body>
    <html:errors/>
    <html:form action="/login">
    <table border="0" width="200">
    <tr>
         <td>User Name:</td>
         <td><html:text property="userid" maxlength="13"/></td>
    </tr>
    <tr>
         <td>Password:</td>
         <td><html:password property="password" maxlength="13"/></td>
    </tr>
    </table>
    <br />
    <html:submit value="Login"/>
    </html:form>
    </body>
    </html>and here is struts-config.xml :
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE struts-config PUBLIC
              "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
              "http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd">
    <struts-config>
    <!--========================beans for HTML form data=======================-->
    <form-beans>
         <form-bean name="loginBean" type="databeans.LoginExistingUserForm"/>
    </form-beans>
    <!--========================Action Mappings================================-->
    <action-mappings>
         <action path="/login" type="formactions.LoginExistingUserAction" name="loginBean" input="/Login.jsp" scope="session">
              <forward name="succesLogin" path="/pages/Welcome.jsp" redirect="true"/>
              <forward name="failureLogin" path="/pages/Diverse.jsp" redirect="true"/>
         </action>
    </action-mappings>
        <message-resources parameter="MessageResources" />
    </struts-config>

  • Problems with WLST embedded in java app.

    Hi,
    I have a problem with the WLST embedded in a java app.
    I want to programatically create or reconfigure a domain from a java application. Following is a simple example of what I want to do.
    import weblogic.management.scripting.utils.WLSTInterpreter;
    public class DomainTester {
      static WLSTInterpreter interpreter = new WLSTInterpreter();
      private void processDomain() {
        if(domainExists()) {
          System.out.println("Should now UPDATE the domain");
        } else {
          System.out.println("Should now CREATE the domain");
      private boolean domainExists() {
        try {
          interpreter.exec("readDomain('d:/myDomains/newDomain')");
          return true;
        }catch(Exception e) {
          return false;
    }The output of this should be one of two possibles.
    1. If the domain exists already it should output
    "Should now UPDATE the domain"
    2. If the domain does not exist it should output
    "Should now CREATE the domain"
    However, if the domain does not exist the output is always :
    Error: readDomain() failed. Do dumpStack() to see details.
    Should now UPDATE the domain
    It never returns false from the domainExists() method therefor always states that the exec() worked.
    It seams that the exec() method does not throw ANY exceptions from the WLST commands. The catch clause is never executed and the return value from domainExists() is always true.
    None of the VERY limited number of examples using embedded WLST in java has exception or error handling in so I need to know what is the policy to detect failures in a WLST command executed in java??? i.e. How does my java application know when a command succeeds or not??
    Regards
    Steve

    Hi,
    I did some creative wrapping for the WLSTInterpreter and I now have very good programatic access to the WLST python commands.
    I will put this on dev2dev somewhere and release it into the open source community.
    Don't know the best place to put it yet, so if anybody sees this and has any good ideas please feel free to pass them on.
    Here is the wrapper class. It can be used as a direct replacement for the weblogic WLSTInterpreter. As I can't overload the actual exec() calls because I want to return a String from this call I created an exec1(String command) that will return a String and throw my WLSTException which is a RuntimeException which you can handle if you like.
    It sets up stderr and stdout streams to interpret the results both from the Python interpreter level and at the JVM level where dumpStack() just seem to do a printStackTrace(). It also calls the dumpStack() command should the result contain this in its text. If either an exception is thrown from the lower level interpreter or dumpStack() is in the response I throw my WLSTException containing this information.
    package eu.medsea.WLST;
    import java.io.ByteArrayOutputStream;
    import java.io.PrintStream;
    import weblogic.management.scripting.utils.WLSTInterpreter;
    public class WLSTInterpreterWrapper extends WLSTInterpreter {
         // For interpreter stdErr and stdOut
         private ByteArrayOutputStream baosErr = new ByteArrayOutputStream();
         private ByteArrayOutputStream baosOut = new ByteArrayOutputStream();
         private PrintStream stdErr = new PrintStream(baosErr);
         private PrintStream stdOut = new PrintStream(baosOut);
         // For redirecting JVM stderr/stdout when calling dumpStack()
         static PrintStream errSaveStream = System.err;
         static PrintStream outSaveStream = System.out;
         public WLSTInterpreterWrapper() {
              setErr(stdErr);
              setOut(stdOut);
         // Wrapper function for the WLSTInterpreter.exec()
         // This will throw an Exception if a failure or exception occures in
         // The WLST command or if the response containes the dumpStack() command
         public String exec1(String command) {
              String output = null;
              try {
                   output = exec2(command);
              }catch(Exception e) {
                   try {
                        synchronized(this) {
                             stdErr.flush();
                             baosErr.reset();
                             e.printStackTrace(stdErr);
                             output = baosErr.toString();
                             baosErr.reset();
                   }catch(Exception ex) {
                        output = null;
                   if(output == null) {
                        throw new WLSTException(e);
                   if(!output.contains(" dumpStack() ")) {
                        // A real exception any way
                        throw new WLSTException(output);
              if (output.length() != 0) {
                   if(output.contains(" dumpStack() ")) {
                        // redirect the JVM stderr for the durration of this next call
                        synchronized(this) {
                             System.setErr(stdErr);
                             System.setOut(stdOut);
                             String _return = exec2("dumpStack()");
                             System.setErr(errSaveStream);
                             System.setOut(outSaveStream);
                             throw new WLSTException(_return);
              return stripCRLF(output);
         private String exec2(String command) {
              // Call down to the interpreter exec method
              exec(command);
              String err = baosErr.toString();
              String out = baosOut.toString();
              if(err.length() == 0 && out.length() == 0) {
                   return "";
              baosErr.reset();
              baosOut.reset();
              StringBuffer buf = new StringBuffer("");
              if (err.length() != 0) {
                   buf.append(err);
              if (out.length() != 0) {
                   buf.append(out);
              return buf.toString();
         // Utility to remove the end of line sequences from the result if any.
         // Many of the response are terminated with either \r or \n or both and
         // some responses can contain more than one of them i.e. \n\r\n
         private String stripCRLF(String line) {
              if(line == null || line.length() == 0) {
                   return line;
              int offset = line.length();          
              while(true && offset > 0) {
                   char c = line.charAt(offset-1);
                   // Check other EOL terminators here
                   if(c == '\r' || c == '\n') {
                        offset--;
                   } else {
                        break;
              return line.substring(0, offset);
    }Next here is the WLSTException class
    package eu.medsea.WLST;
    public class WLSTException extends RuntimeException {
         private static final long serialVersionUID = 1102103857178387601L;
         public WLSTException() {
              super();
         public WLSTException(String message) {
              super(message);
         public WLSTException(Throwable t) {
              super(t);
         public WLSTException(String s, Throwable t) {
              super(s, t);
    }And here is the start of a wrapper class for so that you can use the WLST commands directly. I will flesh this out later with proper var arg capabilities as well as create a whole Exception hierarchy that better suites the calls.
    package eu.medsea.WLST;
    // Provides methods for the WLSTInterpreter
    // just to make life a little easier.
    // Also provides access to the more generic exec(...) call
    public class WLSTCommands {
         public void cd(String path) {
              exec("cd('" + path + "')");
         public void edit() {
              exec("edit()");
         public void startEdit() {
              exec("startEdit()");
         public void save() {
              exec("save()");
         public void activate() {
              exec("activate(block='true')");
         public void updateDomain() {
              exec("updateDomain()");
         public String state(String serverName) {
              return exec("state('" + serverName + "')");
         public String ls(String dir) {
              return exec("ls('" + dir + "')");
         // The generic wrapper for the interpreter exec() call
         public String exec(String command) {
              return interpreter.exec1(command);
         private WLSTInterpreterWrapper interpreter = new WLSTInterpreterWrapper();
    }Lastly here is some example code using these classes:
    its using both the exec(...) and cd(...) wrapper commands from the WLSTCommand.class shown above.
        String machineName = ...; // get name from somewhere
        try {
         exec("machine=create('" + machineName + "','Machine')");
         cd("/Machines/" + machineName + "/NodeManager/" + machineName);
         exec("set('ListenAddress','10.42.60.232')");
         exec("set('ListenPort', 5557)");
        }catch(WLSTException e) {
            // Possibly the machine object already exists so
            // lets just try to look it up.
         exec("machine=lookup('" + machineName + "','Machine')");
    ...After this call a machine object is setup that can be allocated later like so:
         exec("set('Machine',machine)");Regards
    Steve

  • Problem with Port Forwarding (when PPTP is up) in WRT-160N

    Hi, everybody!
    I'm looking for some help with Port Forwarding in my new router from Linksys. I've bought the router afew daysago, and was badly surprised when I found out that there is DD-WRT firmware is installed in it (the router was 100% NEW when I've purchased it). I have downloaded the latest original Linksys firmware file and successfully flashed it.
    But I still have problem (same I had on DD-WRT firmware too) with port forwarding for my DC++ and Vuze (app for torrents): I've written port forward for ports 49151 (for Vuze) and 4000 (for DC++) to be forwarded to my desktop computer (IP 192.168.1.201) -- I've seen a post at this forum, that there could be a problem, if you forward to an IP, which is inside DHCP local zone, so I've forwarded it to .201 IP (my local DHCPzone is 192.168.1.100 - .149). But forwardind doesn't work ((
    What's wrong?
    My configuration:
    Router IP: 192.168.1.1
    PPTP (I've got it from my ISP)
    IP address: 192.168.226.127
    Default Gateway: 192.168.226.2
    DNS 1: 192.168.1.1
    DNS 2 & 3: 0.0.0.0
    PPTP Server IP Address: 192.168.226.2
    Username: ****
    Password: ****
    Single Port Forwarding:
    Application name     External port     Internal port     Protocol     To IP address     Enabled
    Vuze                       49151               49151             Both           192.168.1.201    Checked
    DC                          4000                 4000              Both           192.168.1.201    Checked
    Solved!
    Go to Solution.

    As you have mentioned in your post that your ISP has provided you a PPTP connection with an IP address: 192.x.x.x. The IP address which is provided to you by your ISP is in a Private Range, and if you try to forward any ports on your router it will not work, as your ISP modem will block that port. So you need to get a Public IP address from your ISP.
    As you are getting Private IP from your ISP, so this connection is called as NAT behind NAT, and your Modem is acting like a Router. 
    So now you have 2 options, get the Public IP address from your ISP or change the connection type. 

  • Problems with 11g Global Schema / Java API Test Programs

    Hi,
    In the process of trying to get the 11g sample java api programs up and running, I've encountered a problem. Having installed without error the sample schemas for documentation and set up the 11g version of the test code, I get this error when I try to run BuildAW11g.java
    Created the AW GLOBAL_AWJ
    Identifier "GLOBAL.CHANNEL_DIM.TOTAL_ID" is invalid.
         at
    oracle.olapi.syntax.parser.IdentifierResolver.error(Unknown Source)
         at oracle.olapi.syntax.SyntaxObject.validate(Unknown Source)
         at oracle.olapi.syntax.SyntaxObject.fromSyntax(Unknown Source)
         at oracle.olapi.syntax.SyntaxObject.fromSyntax(Unknown Source)
         at oracle.olapi.syntax.SyntaxObject.fromSyntax(Unknown Source)
         at oracle.olapi.examples.metadata.BuildAW11g.createDimension(BuildAW11g.java:470)
         at oracle.olapi.examples.metadata.BuildAW11g.run(BuildAW11g.java:120)
         at oracle.olapi.examples.BaseExample11g.execute(BaseExample11g.java:54)
         at oracle.olapi.examples.BaseExample11g.execute(BaseExample11g.java:74)
         at oracle.olapi.examples.metadata.BuildAW11g.main(BuildAW11g.java:989)
    This seems to indicate that there is a problem with the sample schema - that GLOBAL.CHANNEL_DIM.TOTAL_ID doesn't exist. Is that right?
    On the topic of the sample schemas, a quick question. The install script runs without error so presumably the tables described in the readme had been installed, but I'm not sure. How can I verify this? When I connect as global using Oracle SQL Developer and expand 'Tables' in the right hand pane, I don't see any tables at all. I would have (perhaps naively) expected to see the tables listed in the samples schemas readme, eg, CHANNEL_DIM. Should I have? If not, how can I view these tables? Thanks in advance for any input anyone may have.
    -exits

    After a reboot the "DHCP-check" is passed:
    INFO: Checking DetectIfDHCPAssignedIP
         This is a prerequisite condition to test whether the primary IP address of the system is DHCP-assiged or static.
    INFO: Detecting the IP.....:192.168.1.4
    INFO: Checking the network interface display name.... :eth0
    INFO: Checking the network reference name..... :eth0
    INFO: Checking the platform .......46
    INFO: Checking the LINUX vendor .... :enterprise
    INFO: Inspect interface file :/etc/sysconfig/network-scripts/ifcfg-eth0
    INFO: Check complete. The overall result of this check is: Passed
    But net configuration assistant is still failing.

Maybe you are looking for

  • ORA-00942: table or view does not exist in database control

    Hi all, i am getting "ORA-00942: table or view does not exist" error while accessing tablespaces from database control. i am able to access control files, redo log files everything fine, but not tablespaces. database version ---> 10.2.0.1 OS ----> Re

  • How can I transfer my itunes library edits to my computer music

    I got my PC music that I transfer to my itunes library, and I do a lot of editing of my itunes music and I would like it to automaticly edit my PC music so that when I lose my itunes music I could go back to my PC and download it again without having

  • Profile used differently in LR than in PS??

    I've installed CS3 and did a Softproof (edit from LR to CS3) of an image from LR using the SP3800_EFP_PK_2880.ICC profile in CS3. The CS3 Softproof looked identical to the image. Print Preview in the 3800 driver looked identical to the image in CS3 a

  • Where are my data? data loss!

    hi, i just realized that ical and my address book are empty. *all data is gone!* if you have any suggestions what happened and even more important how to solve the problem, please let me know. unfortunately i never did a backup. does osx save a autom

  • Os x 10.6.8 and Epson r2400 printer

    Hey I´ve jut opgraded to 10.6.8 and now will add my epson photo stylus R2400. newest driver is downloaded but it will not work, eny solutions?