Improvement suggestion for java.lang.Iterable

The current design limits each container to one collection. Wouldn't it be better to define java.lang.Iterable as
interface Iterable<T> {
Iterator<T> iterator(Class<T> class)
Then a conainer could hold multiple collections, as long as each collection contains different types.
Then I could write
class Zoo
implements Iterable<Tiger>,
implements Iterable<Elephant> {
Iterator<Tiger> iterator(Class<Tiger> class) ...
Iterator<Elephant> iterator(Class<Elephant> class) ...
and the compiler would be able to handle this:
for (Tiger tiger : zoo) .. give me all Tigers
for (Elephant elephant : zoo) .. give me all Tigers

The current design limits each container to one collection. Wouldn't it be better to define
java.lang.Iterable as
interface Iterable<T> {
Iterator<T> iterator(Class<T> class)
}If you were to do that, none of the existing Collection types could implement it without breaking backward compatibility.
Then I could write
class Zoo
implements Iterable<Tiger>,
implements Iterable<Elephant> {Unfortunately it's not possible to implement the same interface twice with different type arguments. I say unfortunately because I believe one of my own API designs would benefit from that capability, if it were possible.
and the compiler would be able to handle this:
for (Tiger tiger : zoo) .. give me all Tigers
for (Elephant elephant : zoo) .. give me all TigersYou can still do this:
class Zoo {
    Collection<Tiger> tigers() { ... }
    Collection<Elephant> elephants { ... }
for (Tiger tiger : zoo.tigers())  ...
for (Elephant elephant : zoo.elephants()) ...Mark

Similar Messages

  • Missing type java.lang.Iterable

    Hi,
    When I try to run my application,I'm getting an error:
    "This compilation unit indirectly references the missing type java.lang.Iterable (typically some required class file is referencing a type outside the classpath)"
    How can I correct this?
    Thanks and Regards,
    Shyam.

    Hi Syam,
    Iterable interface is introduced in Java1.5 . Check in ur NWDS  which JRE it is referring to. If it is JRE1.4 , use java.util.Iterator instead of java.lang.Iterable or install jdk1.5 and in NWDS ->installed JREs> add jre 1.5 and rebuild the application.
    Regards,
    Srikanth
    Edited by: Srikanth Thatipally on Jul 20, 2009 11:12 AM

  • Test suites for Java.lang, java.util ?

    Does anyone known a good (free) test suite for java.lang and java.util ?
    I heard about "Mauve project" and was wondering how good it is...
    any others equivalent projects ?
    Thanks a lot !
    Eg\\*

    Hi,
    because I will have to test a specific implementation of these package (on an embedded device).
    Eg\\*

  • Uow registerObject: Missing descriptor for java.lang.Integer

    I get this message on uow.registerObject
    Missing descriptor for java.lang.Integer.
    Any help greatly appreciated,
    Thanks,
    Vivek

    Are you trying to register an Integer with the UOW? You don't have to register primitives. Odds are you're not doing this, but this exception will still be thrown if you have accidentally mapped a DTF as a 1-1 (i.e, if an Order has a price that is an Integer and you accidentally have it as a 1-1 mapping). Or, if you have a 1-M relationship and an Integer gets into the collection. Etc.
    In a nutshell, this error is saying that somehow you have an Integer where TopLink is expecting some sort of business class mapped.
    - Don

  • Maximum capacity for java.lang.StringBuilder

    What is the maximum capacity allowed for java.lang.StringBuilder ? Is it the maximum size of an 'int' ?

    My guess is that the data model for StringBuilder is based on an array of characters (I'm not on my home computer so I can't look at the java source code for this). If so, then the capacity for it is the same as the capacity for any java array. This I know to be JVM specification specific. So the answer would vary depending on which JVM you are using.

  • Is there a forName() for java.lang.reflect.Type?

    Is there an equivelant to Class.forName() for all types?
    For example:forName("java.util.List<java.lang.Sring>");
    //or
    forName("int");Such a method would return a java.lang.reflect.Type, instead of return a java.lang.Class
    See also
    Field.getGenericType()
    Method.getGenericReturnType()

    incidentally, getGenericType() will give you the
    generic type of the member being examined, not the
    parameterized type.
    that is, if I declare a method like this:
    public <T extends MyInterface> T getStuff() {
    }I won't be able to reflectively find out what types
    of T are being used at runtime, only that it's of
    type 'T'. of limited use really
    Java's implementation of Generics isn't as good as it
    could be, mainly to maintain backwards compatibiityYou are right in that case because that is not a ParameterizedType that is a TypeVariable.
    Type can encompass both Types.

  • ClassCastException for java.lang.Integer in JSF

    Hi,
    I am a newbie, i am working on adding 2 numbers in jsf.
    Where i have a addNumber.jsp:-
    Number1:<h:inputText value"#{AddBean.num1)}"/>
    Number2:<h:inputText value"#{AddBean.num2)}"/>
    <h:commandButton value="Add" action="#{AddBean.sum}"/>
    In AddBean.java
    I have getters and setters for num1 & num2 property whose datatype is int.
    public int sum(){
    System.out.println("Inside sum");
    return (num1+num2);
    Here when i click the Add button the sum() is fired where it is printing "Inside sum" after that i am getting a "ClassCastException saying that java.lang.Integer". Which means i can only use Integer object for calculation rather than using primitive datatype(int)?
    What is the problem here? Pls. do explain?
    Thanks

    The action method should be declared void or return a String. It is to be used for the navigation-case entries in the faces-config.xml. If you want a postback to the same page, just declare it void. It should not return the intented "result" of the action. Store the result somewhere as a bean property.
    The following example should work:<h:form>
        <h:inputText value="#{addBean.number1}" />
        <h:inputText value="#{addBean.number2}" />
        <h:commandButton value="Add" action="#{addBean.sum}" />
        <h:outputText value="#{addBean.result}" />
    </h:form>AddBeanprivate int number1; // + getter + setter
    private int number2; // + getter + setter
    private int result; // + getter only
    public void sum() {
        result = number1 + number2;
    }And I'd rather to use Integer instead of int, but that's more a design choice.

  • Improving Suggestion for Elements 12

    How do I make suggestions for improving the current Photo Elements 12 software?

    There have been so many times that I would have an idea or request that I thought would make the software better etc….. but couldn’t find how to submit the idea.  Thank you, for such a quick reply and link.  I have just submitted my request on the  linked site.
    LinDaZie

  • Solution needed  for java.lang.ClassCastException

    My code+_
    public class EmployeeResultsCO extends OAControllerImpl
    public static final String RCS_ID="$Header$";
    public static final boolean RCS_ID_RECORDED =
    VersionInfo.recordClassVersion(RCS_ID, "%packagename%");
    * Layout and page setup logic for a region.
    * @param pageContext the current OA page context
    * @param webBean the web bean corresponding to the region
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    if (TransactionUnitHelper.isTransactionUnitInProgress(pageContext,"empCreateTxn", false))
    am.invokeMethod("rollbackEmployee");
    TransactionUnitHelper.endTransactionUnit(pageContext, "empCreateTxn");
    // This controller is associated with the table.
    OATableBean table = (OATableBean)webBean;
    table.prepareForRendering(pageContext);
    DataObjectList columnFormats = (DataObjectList)table.getColumnFormats();
    DictionaryData columnFormat = null;
    int childIndex = pageContext.findChildIndex(table, "DeleteSwitcher");
    columnFormat =(DictionaryData)columnFormats.getItem(childIndex);
    columnFormat.put(COLUMN_DATA_FORMAT_KEY, ICON_BUTTON_FORMAT);
    // Implement the bound value for the Status Image
    OAImageBean statusImageBean =
    (OAImageBean)table.findIndexedChildRecursive("EmpStatus");
    if (statusImageBean == null)
    MessageToken[] tokens = { new MessageToken("OBJECT_NAME",
    "EmpStatus") };
    throw new OAException("AK", "FWK_TBX_OBJECT_NOT_FOUND", tokens);
    // Define the OA Framework image directory
    FixedBoundValue imageDirectory =
    new FixedBoundValue(APPS_MEDIA_DIRECTORY);
    // Define a binding between the image bean and the view object attribute
    // that it will reference to get the appropriate .gif image value name.
    // Note that the corresponding attribute values are obtained using a
    // decode() in the EmployeeSummaryVO view object.
    OADataBoundValueViewObject statusBinding = new OADataBoundValueViewObject
    (statusImageBean, "EmployeeStatus");
    // Concatenate the image directory with the actual image name (as retrieved
    // from the view object attribute decode() statement)
    ConcatBoundValue statusCBV = new ConcatBoundValue(new BoundValue[]
    {imageDirectory, statusBinding});
    // Tell the image bean where to get the image source attribute
    statusImageBean.setAttributeValue(SOURCE_ATTR, statusCBV);
    // For accessibility compliance, you always specify the alternate text for an
    // image. Note that you should never use static text as shown (always source
    // translatable text from Message Dictionary when setting display text values
    // programmatically), and ideally, the alternate text should in this case
    // should clearly indicate the status the image represents.
    // Generally, we would recommend that you use a Switcher as shown for the
    // Delete column to easily show different images with associated alternate
    // text, but we wanted to show how to use a bound value also in this lab.
    statusImageBean.setAttributeValue(SHORT_DESC_ATTR, "Employee status indicator");
    Error
    oracle.apps.fnd.framework.OAException: java.lang.ClassCastException
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:891)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:597)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1133)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)
         at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2318)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1717)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:502)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:423)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:209)
         at com.evermind.server.http.GetParametersRequestDispatcher.forward(GetParametersRequestDispatcher.java:189)
         at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:199)
         at OA.jspService(OA.jsp:45)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    ## Detail 0 ##
    java.lang.ClassCastException
         at kumarkris.oracle.apps.ak.employee.webui.EmployeeResultsCO.processRequest(EmployeeResultsCO.java:59)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:581)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1133)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)
         at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2318)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1717)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:502)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:423)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:209)
         at com.evermind.server.http.GetParametersRequestDispatcher.forward(GetParametersRequestDispatcher.java:189)
         at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:199)
         at OA.jspService(OA.jsp:45)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    java.lang.ClassCastException
         at kumarkris.oracle.apps.ak.employee.webui.EmployeeResultsCO.processRequest(EmployeeResultsCO.java:59)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:581)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1133)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)
         at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2318)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1717)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:502)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:423)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:209)
         at com.evermind.server.http.GetParametersRequestDispatcher.forward(GetParametersRequestDispatcher.java:189)
         at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:199)
         at OA.jspService(OA.jsp:45)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)

    ## Detail 0 ##
    java.lang.ClassCastException
    at kumarkris.oracle.apps.ak.employee.webui.EmployeeResultsCO.processRequest(EmployeeResultsCO.java:59)What is the code at line no. 59 ?
    -Anand

  • New in Kodo 3.3.3: Improved support for Java 5 enums and generics?

    Hello,
    Can anybody tell me if Kodo 3.3.3 can be deployed on WebLogic 8.1 sp4, jdk
    1.4.1? The reason I ask this is because one of the features mentioned for
    v3.3.3 is the support for Java 5 generics, which is available on WebLogic
    9 -- but not in WebLogic 8.1 sp4. The documentation for Kodo 3.3.3 seems
    to indicate that it can be deployed on WebLogic 8.1 -- can anyone tell me
    if this is accurate?
    Thanks for your help!

    Correction:
    I think that my question may have been misunderstood. What I want to know
    is if Kodo 3.3.3 can be deployed on WebLogic 8.1sp4 which is running JDK
    1.4 or do I have to deploy on a newer version of WebLogic that is running
    Java 5?
    Thanks!
    Rita wrote:
    I think that my question may have been misunderstood. What I want to know
    is if Kodo 3.3.3 can be deployed on WebLogic 8.1sp4 which is running JDK
    1.4 or do I have to deploy on a newer version of WebLogic that is running
    Java 4?
    Thanks!
    Stephen Kim wrote:
    Rita,
    While Kodo 3.3.x can work with JDK 5, it cannot make WL work with JDK 5.
    However, Kodo 3.4 RC 3 / 4.0 EA 2 both can work with WL 9 (which works
    with JDK 5).
    Rita wrote:
    Hello,
    Can anybody tell me if Kodo 3.3.3 can be deployed on WebLogic 8.1 sp4,
    jdk
    1.4.1? The reason I ask this is because one of the features mentionedfor
    v3.3.3 is the support for Java 5 generics, which is available on WebLogic
    9 -- but not in WebLogic 8.1 sp4. The documentation for Kodo 3.3.3 seems
    to indicate that it can be deployed on WebLogic 8.1 -- can anyone tell me
    if this is accurate?
    Thanks for your help!
    Steve Kim
    [email protected]
    SolarMetric Inc.
    http://www.solarmetric.com

  • Help for java.lang.NoClassDefFoundError:

    hi all, i wrote a jws shows the following.
    import java.lang.*;
    import java.util.*;
    * * @author bow5003
    public class CalculatorWithDLL {
    private native float add(float num1, float num2);
    private native float sub(float num1, float num2);
    private native float mult(float num1, float num2);
    private native float divid(float num1, float num2);
    private native float square(float num1);
    private native float tripple(float num1);
    //private float result;
    /** Creates a new instance of CalculatorWithDLL */
    public static float getAdd(float num1, float num2) {
    CalculatorWithDLL calculator = new CalculatorWithDLL();
    float result = calculator.add(num1, num2);
    return result;
    public static float getSub(float num1, float num2){
    CalculatorWithDLL calculator = new CalculatorWithDLL();
    float result = calculator.sub(num1, num2);
    return result;
    public static float getMult(float num1, float num2) {
    CalculatorWithDLL calculator = new CalculatorWithDLL();
    float result = calculator.mult(num1, num2);
    return result;
    public static float getDivid(float num1, float num2) {
    CalculatorWithDLL calculator = new CalculatorWithDLL();
    float result = calculator.divid(num1, num2);
    return result;
    public static float getSquare(float num1) {
    CalculatorWithDLL calculator = new CalculatorWithDLL();
    float result = calculator.square(num1);
    return result;
    public static float getTriple(float num1) {
    CalculatorWithDLL calculator = new CalculatorWithDLL();
    float result = calculator.tripple(num1);
    return result;
    static {
    System.loadLibrary("Calculator");
    and when i try to access throw the web browser http://localhost:8080/axis/JWS_Files/CalculatorWithDLL.jws?wsdl it gives the error:
    java.lang.NoClassDefFoundError: Could not initialize class CalculatorWithDLL
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:247)
    at org.apache.axis.utils.ClassUtils$2.run(ClassUtils.java:168)
    at java.security.AccessController.doPrivileged(NativeMethod)
    at org.apache.axis.utils.ClassUtils.loadClass(ClassUtils.java:160)
    at org.apache.axis.utils.ClassUtils.forName(ClassUtils.java:142)
    at org.apache.axis.utils.cache.ClassCache.lookup(ClassCache.java:85)
    at org.apache.axis.providers.java.JavaProvider.getServiceClass(JavaProvider.java:428)
    at org.apache.axis.providers.java.JavaProvider.initServiceDesc(JavaProvider.java:461)
    at org.apache.axis.handlers.soap.SOAPService.getInitializedServiceDesc(SOAPService.java:286)
    at org.apache.axis.handlers.JWSHandler.setupService(JWSHandler.java:273)
    at org.apache.axis.handlers.JWSHandler.generateWSDL(JWSHandler.java:294)
    at org.apache.axis.strategies.WSDLGenStrategy.visit(WSDLGenStrategy.java:33)
    at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
    at org.apache.axis.SimpleChain.generateWSDL(SimpleChain.java:104)
    at org.apache.axis.server.AxisServer.generateWSDL(AxisServer.java:454)
    at org.apache.axis.transport.http.QSWSDLHandler.invoke(QSWSDLHandler.java:68)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.axis.transport.http.AxisServlet.processQuery(AxisServlet.java:1226)
    at org.apache.axis.transport.http.AxisServlet.doGet(AxisServlet.java:249)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
    at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Thread.java:619)
    anyone can help me?
    Message was edited by:
    BCW0928
    Message was edited by:
    BCW0928

    Where is the dll ?
    you need to include it in a jar, and ref that jar with
    <nativelib href=<url to the jar>/>
    and request all-permissions in you jnlp file (and sign both jars)
    /Andy

  • Improving performance for java

    I'm new to this so please bare with me ... I have 2 basic questions
    I just upgraded my server to SunOS 5.10 Generic_139555-08 sun4u sparc SUNW,Sun-Fire-V440
    I also upgraded java to java version "1.6.0_14"
    This is a 4 processor box. Top gives me:
    last pid: 26233; load averages: 2.79, 2.99, 3.12 13:23:57
    174 processes: 172 sleeping, 2 on cpu
    CPU states: 40.2% idle, 54.2% user, 5.6% kernel, 0.0% iowait, 0.0% swap
    Memory: 8192M real, 3059M free, 6156M swap in use, 4105M swap free
    PID USERNAME THR PRI NICE SIZE RES STATE TIME CPU COMMAND
    17294 prodslic 270 0 0 654M 641M cpu/1 527:36 50.02% java
    *!st Question:*
    *1. Why is java using so much cpu time?*
    When I run ps -ef | grep java:
    root 15666 1 0 Aug 10 ? 4:52 /usr/java/bin/java -server -Xmx128m -XX:+UseParallelGC -XX:ParallelGCThreads=4
    prodslic 17294 1 25 18:07:14 ? 530:07 /usr/jdk/instances/jdk1.6.0/bin/java -Xmx1024m -Djava.awt.headless=true -Djava.
    *2nd Question:*
    *2. Why are there 2 java version running?*
    /usr/java/bin/java -versionjava version "1.5.0_18"
    /usr/jdk/instances/jdk1.6.0/bin/java -versionjava version "1.6.0_14"
    This is confusiing to me. I'd also like to know what the different command line options mean
    Thanks
    Edited by: BH80477 on Aug 14, 2009 8:19 AM

    Claudia,
    We have not yet released a "production" version of OHJ 4.2 because 1) we'd like to add a few more features before calling it production, and 2) OHJ 4.2 has not yet shipped with an Oracle product and therefore hasn't undergone the rigorous testing that takes place on larger Oracle products. If you're concerned about the label of "production" versus "beta," I think you'd be pretty safe going with the latest release of OHJ, or we wouldn't have put it OTN for you to use. The developers have tested thoroughly. :) I'd recommend trying out 4.2.1 since it's got some substantial improvements over the 4.1 branch, and on the off-chance you run into problems, please let us know.
    - Ryan

  • Need the career suggestion for Java developer

    Dear all,
    I am a programmer with four years experience in webMethods integration. I am also good at Oracle PL/SQL, XML and Java.
    So, here is my question, shall I study for an ABAP certification and begin to look for an ABAP job? or, based on my background, I should try to get a Netweaver Java Certification and try to move to portal development or SAP XI?
    Regards,
    Mike
    Message was edited by:
            Mike Eng

    hi mike,
    Its good u have such a good experience in webmethods and oracle/pl-sql and also java. i feel abap would be much better option to move on to.
    ABAP is sap custom language, and it would always be preferred more over everthing else, and apart from that certified abapers are still very few, while compare that with java, which is at peak in the job market,and flodded with java proffesionals.
    And as u have previous experience getting through abap certification wont be tough.Happy abap programing.......!!!!
    Best of luck

  • Any JDeveloper tutorial suggestions for Java/OOP newbie

    I know SQL and basics of OOP. Have Oracle 10g and JDev installed. Got up to Chapter 4 of the on-line JJavaEE tutorial ( http://download-west.oracle.com/otndocs/products/jdev/10131/JavaEE_tutorial.pdf ), but then got lost after that. Too complex of an example app and not enough explainations of WHY the steps were to be taken in the tutorial. Anyone know of a SIMPLE tutorial that would be good to use with JDeveloper?
    Paul Peterson

    There is a bunch of tutorials linked from the JDeveloper home page on OTN: http://oracle.com/technology/jdev
    I would suggest to start with the following 3:
    Get to know the IDE:
    http://www.oracle.com/technology/obe/obe1013jdev/10131/introide/introjdevide.htm
    Get to know ADF:
    http://www.oracle.com/technology/obe/obe1013jdev/10131/masterdetail_adf_bc/master-detail_pagewith_adf_bc.htm
    Get deeper into ADF:
    http://www.oracle.com/technology/obe/ADFBC_tutorial_1013/10131/index.htm
    But you should also check all the rest there.

  • Improvement suggestions for Spotify Radio

    Spotify radio is great, not up to the standard of Pandora but you're getting there soon I hope. Still the same tracks loop play all the time. It fells like there are only about 30 songs looping around and few new songs are played.
    1. Make it possible to dislike a track that was previously liked. Once you have liked a track it's not possible to dislike (thumbs down button is disabled. So if you accidentally liked a song, or get tired hearing a song, you cannot change your mind later.
    2. Add the like/dislike option to the right-click menu when spotify is minimized on the taskbar. It's awkward to have to bring up the app do indicate that you like/dislike a track. When playing from a playlist these options could simply be disabled.
    That's all for now 8-)

    I find myself frequently going out to bars or clubs and hearing a song a really like, but don't know that song. So on my iPhone, I have an app for that SoundHound or Shazam etc. But when I get home and I want to listen to the song again, I have to go back onto the app and find the song and then type it into spotify. 
    I think it would be great if SoundHound and my Spotify account were integrated. I can check my listen history or my bookmarks from SoundHound on my Spotify account. 
    It would be so great. More artists would be discovered and spotify could potentially get more listens to more artists.
    Figure out the logistics to make this happen.
    Regard, 
    Monkeyroll10

Maybe you are looking for