Error(86,88): incompatible types; found: java.util.ArrayList

Hi,
I'm getting following error :
Error(86,88): incompatible types; found: java.util.ArrayList, required: com.sun.java.util.collections.ArrayList
The line JDev is complaining about contains the following code :
com.sun.java.util.collections.ArrayList runtimeErrors = container.getExceptionsList();
I really don't have a clue where this error comes from. If I right-click on ArrayList it brings me to the correct declaration.
Does somebody know what I'm doing wrong?
Thanks in advance for you help!
Kris

Kris,
try changing the code to :
java.util.ArrayList runtimeErrors = container.getExceptionsList();apparently container.getExceptionsList() returns a java.util.Arraylist not a com.sun.java.util.collections.ArrayList
HTH,
John

Similar Messages

  • Error in Parser.fx file "incompatible types found   : java.util.Properties"

    Hi,
    In parser file "Parser.fx",
    public-read def PROPERTIES_PARSER = StreamParser {
    override public function parse(input : java.io.InputStream) : RecordSet {
    var props = javafx.util.Properties {};
    props.load(input);
    input.close();
    MemoryRecordSet {
    records: [
    MapRecord {
    fields: props
    due to under line portion an error is appearing:
    "incompatible types
    found : javafx.util.Properties
    required: java.util.Map
    fields: props".
    Please suggest some solution.
    Thanks in advance.
    regards,
    Choudhary Nafees Ahmed
    Edited by: ChoudharyNafees on Jul 5, 2010 3:48 AM

    Parser.fx
    package org.netbeans.javafx.datasrc;
    import javafx.data.pull.PullParser;
    import javafx.data.pull.Event;
    import org.netbeans.javafx.datasrc.MemoryRecordSet;
    public-read def PROPERTIES_PARSER = StreamParser {
        override public function parse(input : java.io.InputStream) : RecordSet {
            var props =java.util.Properties{};
            props.load(input);
            input.close();
            MemoryRecordSet {
                records: [
                    MapRecord {
                        fields: props
    public-read def LINE_PARSER_FIELD_LINE = ".line";
    public-read def LINE_PARSER = StreamParser {
        override public function parse(input : java.io.Reader) : RecordSet {
            var line : String;
            var result : Record [] = [];
            line = readLine(input);
            // BEWARE  ("" == null) is true
            while (line != null or "".equals(line)) {
                var map = new java.util.HashMap();
                map.put(LINE_PARSER_FIELD_LINE, line);
                var record = MapRecord {
                    fields: map
                insert record into result;
                line = readLine(input);
            MemoryRecordSet {
                records: result
    function readLine(in : java.io.Reader) : String {
        var str = new java.lang.StringBuilder;
        while (true) {
            var c = in.read();
            if (c == -1) {
                return if (str.length() == 0) then null else str.toString();
            } else if (c == 0x0D) {
                c = in.read();
                if (c == 0x0A or c == -1) {
                    return str.toString();
                str.append(0x0D);
            } else if (c == 0x0A) {
                return str.toString();
            str.append(c as Character);
        str.toString()
    public-read def JSON_PARSER = StreamParser {
        function toSequence(list : java.util.List) : Record [] {
            var result : Record [] = [];
            var ii = list.iterator();
            while (ii.hasNext()) {
                var r = ii.next() as Record;
                insert r into result;
            result
        override public function parse(input : java.io.InputStream) : RecordSet {
            var topLevel : Object;
            def parser = PullParser {
                documentType: PullParser.JSON
                input: input
                var mapStack = new java.util.Stack();
                var currentMap : java.util.Map;
                var recordsStack = new java.util.Stack();
                var currentRecords : java.util.List;
                var lastEvent: Event;
                onEvent: function(event: Event) {
                    if (event.type == PullParser.TEXT) {
                        currentMap.put(event.name, event.text)
                    } else if (event.type == PullParser.INTEGER) {
                        currentMap.put(event.name, event.integerValue)
                    } else if (event.type == PullParser.NULL) {
                        currentMap.put(event.name, null)
                    } else if (event.type == PullParser.START_ELEMENT) {
                        if (lastEvent.type == PullParser.START_ARRAY_ELEMENT) return;
                        var oldMap = currentMap;
                        var temp = new java.util.HashMap();
                        temp.put(new Object(), null);
                        currentMap = temp;
                        currentMap.clear();
                        mapStack.push(currentMap);
                        if (topLevel == null) topLevel = currentMap;
                        if (oldMap != null) {
                            var mr = MapRecord {
                                fields: currentMap
                            if (event.name == "" and lastEvent.type == PullParser.START_VALUE) {
                                oldMap.put(lastEvent.name, mr)
                            } else {
                                oldMap.put(event.name, mr)
                    } else if (event.type == PullParser.START_ARRAY_ELEMENT) {
                        var temp = new java.util.HashMap();
                        temp.put(new Object(), null);
                        currentMap = temp;
                        currentMap.clear();
                        mapStack.push(currentMap);
                        var mr = MapRecord {
                            fields: currentMap
                        currentRecords.add(mr);
                    } else if (event.type == PullParser.END_ELEMENT) {
                        mapStack.pop();
                        if (not mapStack.empty()) {
                            currentMap = mapStack.peek() as java.util.HashMap;
                        } else {
                            currentMap = null;
                    } else if (event.type == PullParser.END_ARRAY_ELEMENT) {
                        if (lastEvent.type == PullParser.END_ELEMENT) return;
                        mapStack.pop();
                        if (not mapStack.empty()) {
                            currentMap = mapStack.peek() as java.util.HashMap;
                        } else {
                            currentMap = null;
                    } else if (event.type == PullParser.START_ARRAY) {
                        currentRecords = new java.util.ArrayList();
                        recordsStack.push(currentRecords);
                        if (topLevel == null) topLevel = currentRecords;
                    } else if (event.type == PullParser.END_ARRAY) {
                        var set = MemoryRecordSet {
                            records: toSequence(currentRecords)
                        currentMap.put(event.name, set);
                        recordsStack.pop();
                        if (not recordsStack.empty()) {
                            currentRecords = recordsStack.peek() as java.util.List;
                        } else {
                            currentRecords = null;
                    lastEvent = event;
            parser.parse();
            if (topLevel instanceof java.util.Map) {
                var mr = MapRecord {
                    fields: topLevel as java.util.Map
                MemoryRecordSet {
                   records: [mr]
            } else {
                // List
                var rs = MemoryRecordSet {
                    records: toSequence(topLevel as java.util.List)
                rs
            parser.parse();
            var mr = MapRecord {
                fields: topLevel as java.util.Map
            MemoryRecordSet {
               records: [mr]

  • Incompatible types - found java.lang.String but expected int

    This is an extremely small simple program but i keep getting an "incompatible types - found java.lang.String but expected int" error and dont understand why. Im still pretty new to Java so it might just be something stupid im over looking...
    import java.io.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;
    public class Lab
    public static void main(String []args)
    int input = JOptionPane.showInputDialog("Input Decimal ");
    String bin = Integer.toBinaryString(input);
    String hex = Integer.toHexString(input);
    System.out.println("Decimal= " + input + '\n' + "Binary= " + bin + '\n' + "Hexadecimal " + hex);
    }

    You should always post the full, exact error message.
    Your error message probably says that the error occurred on something like line #10, the JOptionPane line. The error is telling you that the compiler found a String value, but an int value was expected.
    If you go to the API docs for JOptionPane, it will tell you what value type is returned for showInputDialog(). The value type is String. But you are trying to assign that value to an int. You can't do that.
    You will need to assign the showInputDialog() value to a String variable. Then use Integer.parseInt(the_string) to convert to an int value.

  • Incompatible type found

    Gurus,
    I'm getting the following error and hope you could help. It's complaining about code in my AM (in bold). Any ideas?
    Error(281,41): incompatible types; found: oracle.jbo.Row, required: acctmap.oracle.apps.spl.am.server.UserRespVORowImpl
    AM code:
    UserRespVOImpl reqVO = (UserRespVOImpl)findViewObject("Sysadmin");
    if(reqVO!=null)
    Integer userid = new Integer(tx.getUserId());
    reqVO.initUserRespVO(userid);
    reqVO.reset();
    UserRespVORowImpl row = reqVO.next();
    String priv = (String)row.getSysadmin();
    VO code:
    public void initUserRespVO(Integer txUserId)
    setWhereClauseParams(null); //Always reset
    setWhereClauseParam(0,txUserId);
    executeQuery();
    // return Sysadmin;
    }

    Hi Sreese,
    Change your code to ...
    reqVO.reset();
    UserRespVORowImpl row = *(UserRespVORowImpl)* reqVO.next();
    String priv = (String)row.getSysadmin();
    Thanks
    --Anil                                                                                                                                                                                                                                                                                                                                                                   

  • Incompatible types - found, required...

    Experts,
    I am getting the following failure. What am I missing?
    Javac output,
    #javac .\org\ocap\dvr\*.java
    .\org\ocap\dvr\TestRecord.java:123: incompatible types
    found : org.ocap.shared.dvr.RecordingManager
    required: org.ocap.dvr.OcapRecordingManager
    recManager = OcapRecordingManager.getInstance();
    ^
    The source code is as follows,
    In .\src\org\ocap\shared\dvr\RecordingManager.java
    ----------------- START --------------------
    package org.ocap.shared.dvr;
    public abstract class RecordingManager
    public static RecordingManager getInstance()
    return null;
    // stuff deleted
    ------------------ END -------------------
    In .\src\org\ocap\dvr\OcapRecordingManager.java
    ----------------- START --------------------
    package org.ocap.dvr;
    import org.ocap.dvr.*;
    import org.ocap.shared.dvr.*;
    public abstract class OcapRecordingManager extends RecordingManager
    // stuff deleted
    ------------------ END -------------------
    In .\src\org\ocap\dvr\OcapRecordingManagerImpl.java
    ----------------- START --------------------
    package org.ocap.dvr;
    import org.ocap.dvr.*;
    import org.ocap.shared.dvr.*;
    public class OcapRecordingManagerImpl extends OcapRecordingManager
    private static OcapRecordingManager mOcapRecordingManager = null;
    public static OcapRecordingManager getInstance()
    if (mOcapRecordingManager == null)
    mOcapRecordingManager = new OcapRecordingManagerImpl();
    return mOcapRecordingManager;
    ------------------ END -------------------
    In .\src\org\ocap\dvr\TestRecord.java
    ----------------- START --------------------
    package org.ocap.dvr;
    import org.ocap.dvr.OcapRecordingManager;
    import org.ocap.shared.dvr.RecordingManager;
    class TestRecord
    //Object of OcapRecordingManager class
    private static OcapRecordingManager recManager = null;
    public static void main(String args[])
    recManager = OcapRecordingManager.getInstance();
    if(recManager == null)
    System.out.println ("Value obtained in OcapRecordingManagerImpl reference is null");
    ------------------ END -------------------
    Thanks!

    Please don't crosspost!
    http://forum.java.sun.com/thread.jspa?threadID=5210277&messageID=9846716#9846716

  • How to pass attribute of type java.util.ArrayList Property to a Tag

    How do I pass an attribute of type, java.util.ArrayList<my.entity.Property> to a Tag implementation class?
    Please advise!
    Thanks,
    Joe
    package my.tags;
    import java.io.IOException;
    import java.util.ArrayList;
    import javax.servlet.jsp.tagext.SimpleTagSupport;
    import javax.servlet.jsp.JspException;
    import my.entity.Property;
    public class PropertiesTag extends SimpleTagSupport {
        private ArrayList<Property> properties;
        public void setProperties(ArrayList<Property> properties) {
              this.properties = properties;
         public void doTag() throws JspException, IOException {
    <?xml version="1.0" encoding="utf-8" ?>
    <taglib ...>
         <tag>
              <name>propertiesTag</name>
              <tag-class>my.tags.PropertiesTag</tag-class>
              <body-content>empty</body-content>
              <description>Displays the product selection left menu</description>
              <attribute>
                   <name>properties</name>
                   <required>true</required>
                   <rtexprvalue>true</rtexprvalue>
                   <type>java.util.ArrayList<my.entity.Property></type>
              </attribute>
         </tag>
    </taglib>Here's the error message:
    org.xml.sax.SAXParseException: The element type "my.entity.Property" must be terminated by the matching end-tag "</my.entity.Property>".

    802826 wrote:
    How do I pass an attribute of type, java.util.ArrayList<my.entity.Property> to a Tag implementation class?
    Please advise!
    As already pointed out, there is no way to specify a generic type in a tag library descriptor. You may however specify an Object type in your tld and still have the variable in your tag as a parameterized generic type.
    In your tld change the type to Object.
    <type>java.lang.Object</type>.
    The properties tag itself needs no change and can continue to use parameterized types.
    cheers,
    ram.

  • Newbie help with collection java.util.ArrayList

    Hi,
    the documentation for the class ArrayList is given as
    public class ArrayList<E>
    extends AbstractList<E>
    what is that <E> over there ? Similarly, what is the <T> in an iterator ? Exact problem along with code is at the end of the post.
    I am a C++ programmer and am very comfortable with the STL, but that approach i.e. ArrayList<Job> does not work over here :(
    PLease help.
    TIA,
    Madhu.
    Code Details:
    I have a class (Job) which I wish to add to the list using the add method. Obviously, it gives an error.
    Code goes as
    class MyQueue extends java.lang.Object
    private java.util.ArrayList jobsList=new java.util.ArrayList(100);
    public void addtoMyQueueatIndex(Job newJob,int Index)
    jobsList.add((java.lang.Object)newJob,Index);
    Error is :
    MyQueue.java:96: cannot find symbol
    symbol : method addtoMyQueueatIndex((java.lang.Object,int)
    location: class java.util.ArrayList
    jobsList.add((java.lang.Object)newJob,Index);

    Are you using J2SDK 1.5.0 beta 1 or J2SDK 1.4.2? Are you using the docs from 1.5 and the compiler from 1.4.2?
    private java.util.ArrayList jobsList=new java.util.ArrayList(100); //-- 1.4.2 code
    private java.util.List<Job> jobsList = new java.util.ArrayList<Job> (100); //-- 1.5.0 code (preferred style)
    private java.util.ArrayList<Job> jobsList = new java.util.ArrayList<Job> (100); //-- 1.5.0 codeAs a matter of style, use the interface and not the real class when declaring a variable like the jobsList above whenever possible or applicable.
    You do not need to cast the object newJob to Object. And you have inverted the positions of the parameters.
    void add(int index, E element)
    Inserts the specified element at the specified position in this list (optional operation).
    jobsList.add(Index, newJob);

  • Java.io.IOException: Deserialization failed, format CollectionFormat(public java.util.ArrayList())

    I am trying to retrieve a list from coherence cache and when I try to test my cache I get the following exception
    Exception in thread "main" (Wrapped) java.io.IOException: Deserialization failed, format CollectionFormat(public java.util.ArrayList())
      at com.tangosol.util.ExternalizableHelper.fromBinary(ExternalizableHelper.java:266)
      at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$ConverterFromBinary.convert(PartitionedCache.CDB:4)
      at com.tangosol.util.ConverterCollections$ConverterMap.get(ConverterCollections.java:1655)
      at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$ViewMap.get(PartitionedCache.CDB:1)
      at com.tangosol.coherence.component.util.SafeNamedCache.get(SafeNamedCache.CDB:1)
      at com.sesco.cohc.cohc_RegionalForecastedGen.getLatestDataForDataSource(cohc_RegionalForecastedGen.java:32)
      at com.sesco.cohc.cohc_RegionalForecastedGen.main(cohc_RegionalForecastedGen.java:172)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      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 com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
    Caused by: java.io.IOException: Deserialization failed, format CollectionFormat(public java.util.ArrayList())
      at org.gridkit.coherence.utils.pof.ReflectionPofSerializer.internalDeserialize(ReflectionPofSerializer.java:105)
      at org.gridkit.coherence.utils.pof.ReflectionPofSerializer.deserialize(ReflectionPofSerializer.java:92)
      at com.tangosol.io.pof.PofBufferReader.readAsObject(PofBufferReader.java:3316)
      at com.tangosol.io.pof.PofBufferReader.readObject(PofBufferReader.java:2604)
      at com.tangosol.io.pof.ConfigurablePofContext.deserialize(ConfigurablePofContext.java:368)
      at com.tangosol.util.ExternalizableHelper.deserializeInternal(ExternalizableHelper.java:2746)
      at com.tangosol.util.ExternalizableHelper.fromBinary(ExternalizableHelper.java:262)
      ... 11 more
    Caused by: java.io.IOException: Failed to deserialize java.util.ArrayList instance
      at org.gridkit.coherence.utils.pof.ReflectionPofSerializer$CollectionSerializer.deserialize(ReflectionPofSerializer.java:317)
      at org.gridkit.coherence.utils.pof.ReflectionPofSerializer.internalDeserialize(ReflectionPofSerializer.java:101)
      ... 17 more
    Caused by: java.io.EOFException
      at com.tangosol.io.AbstractByteArrayReadBuffer$ByteArrayBufferInput.readPackedInt(AbstractByteArrayReadBuffer.java:430)
      at com.tangosol.io.pof.PofBufferReader$UserTypeReader.complete(PofBufferReader.java:3819)
      at com.tangosol.io.pof.PofBufferReader.readCollection(PofBufferReader.java:2452)
      at org.gridkit.coherence.utils.pof.ReflectionPofSerializer$CollectionSerializer.deserialize(ReflectionPofSerializer.java:306)
      ... 18 more
    I am not sure why I am getting the error. Any help would be appreciated

    You were using the ReflectionPofSerializer coded by Alexey.   If you are pretty sure that the object you retrieved was stored using the same serializer, might want to contact Alexey to see if he can help you out.
    ReflectionPofSerializer - gridkit - ReflectionPofSerializer project page - A home for code misc usefull code related …

  • Question on import java.util.ArrayList, etc.

    Hi,
    I was wondering what the following meant and what the differences were. When would I have to use these:
    import java.util.ArrayList;
    import java.util.Collections; <--I especially don't understand what this means
    import java.util.Comparator; <---same for this (can I consolidate these into the bottom two?)
    import java.io.*;
    import java.util.*;

    MAresJonson wrote:
    Also, what does this mean:
    return foo == f.getFoo() ? true : false;
    (more specifically...what does the "? true : false" mean and is there another way to code that?)It's called the ternary operator. For your specific example, you could just do:
    return foo == f.getFoo();But, more generally,
      return foo == f.getFoo() ? "equal" : "Not equal";means:
    if (foo == f.getFoo()) {
       return "equal";
    else {
       return "Not equal";
    }As everyone else said at the same time...

  • Error while deploying a web service whose return type is java.util.Date

    Hi
    I have written a simple web service which takes in a date input (java.util.Date) and returns the same date back to the client.
    public interface Ping extends Remote
    * A simple method that pings the server to test the webservice.
    * It sends a datetime to the server which returns the datetime.
    * @param pingDateRequest A datetime sent to the server
    * @returns The original datetime
    public Date ping(Date pingDateRequest) throws RemoteException;
    The generation of the Web service related files goes smoothly in JDeveloper 10g. The problem arises when I try to deploy this web service on the Oracle 10g (10.0.3) OC4J standalone. it gives me the following error on the OC4J console :
    E:\Oracle\oc4j1003\j2ee\home\application-deployments\Sachin-TradingEngineWS-WS\
    WebServices\com\sachin\tradeengine\ws\Ping_Tie.java:57: ping(java.util.Date) in com.sachin.tradeengine.ws.Ping cannot be applied to (java.util.Calendar) _result  = ((com.sachin.tradeengine.ws.Ping) getTarget()).ping
    (myPing_Type.getDate_1());
    ^
    1 error
    04/03/23 17:17:35 Notification ==&gt; Application Deployer for Sachin-TradingEngineWS-WS FAILED: java.lang.InstantiationException: Error compiling :E:\Oracle\oc4j1003\j2ee\home\applications\Sachin-TradingEngineWS-WS\WebServices: Syntax error in source [ 2004-03-23T17:17:35.937GMT+05:30 ]
    I read somewhere that the conversion between java to xml datatype and vice versa fails for java.util.Date, so it is better to use java.util.Calendar. When I change the code to return a java.util.Calendar then the JDeveloper prompts me the following failure:
    Method Ping: the following parameter types do not have an XML Schema mapping and/or serializer specified : java.util.Calendar.
    This forces me to return a String data.
    I would appreciate if someone can help me out.
    Thanks
    Sachin Mathias
    Datamatics Ltd.

    Hi
    I got the web service working with some work around. But I am not sure it this approach would be right and good.
    I started altogether afresh. I did the following step :
    1. Created an Interface (Ping.java) for use in web Service as follows :
    public interface Ping extends Remote{
    public java.util.Date ping(java.util.Date pingDateRequest)
    throws RemoteException;
    2. Implemented the above interface in PingImpl.java as follows :
    public class PingImpl implements Ping
    public java.util.Date ping(java.util.Date pingDateRequest) throws RemoteException {
    System.out.println("PingImpl: ping() return datetime = " + pingDateRequest.toString());
    return pingDateRequest;
    3. Compiled the above 2 java files.
    4. Generated a Stateless Java Web Service with the help of JDeveloper. This time the generation was sucessful.(If I had "java.util.Calendar" in place of "java.util.Date" in the java code of the above mentioned files the web service generation would prompt me for error)
    5. After the generation of Web Service, I made modification to the Ping interface and its implementing class. In both the files I replaced "java.util.Date" with "java.util.Calendar". The modified java will look as follows :
    Ping.Java
    =========
    public interface Ping extends Remote{
    public java.util.Calendar ping(java.util.Calendar pingDateRequest)
    throws RemoteException;
    PingImpl.Java
    ================
    public class PingImpl implements Ping
    public java.util.Calendar ping(java.util.Calendar pingDateRequest) throws RemoteException {
    System.out.println("PingImpl: ping() return datetime = " + pingDateRequest.toString());
    return pingDateRequest;
    6. Now I recompile both the java files.
    7. Withour regenerating the Web Service I deploy the Web Service on OC4j 10.0.3 from JDeveloper. This time the deployment was sucessful.(The Deployment fails if I don't follow the step 5.)
    8. Now I generated a Stub from JDeveloper and accessed the stub from a client. It works fine. Here if you see the Stub code it takes java.util.Date as a parameter and returns a java.util.Date. (Mind you I am accepting a java.util.Calendar and returning the same in my Web Service interface. Step 5)
    The confusing thing is the Serialization and Deserialization of Data from Client java data to Soap message and Soap message to Server java data.
    From Client to SOAP :
    java.util.Date to datetime
    From SOAP to Server :
    datetime to java.util.Calendar
    From Server to SOAP :
    java.util.Calendar to datetime
    From SOAP to Client :
    datetime to java.util.Date (I am not able to understand this part of the conversion)
    Any help or inputs would be appreciated.
    Thanks
    Sachin Mathias

  • Tomcat error when run through Eclipse IDE :- java.util.MissingResourceExcep

    Friends,
    I get the following error while running the tomcat from my eclipse IDE(com.sysdeo.eclipse.tomcat_3.2.1) .
    If i try running my tomcat with an application through the command line , it runs fine .... can anybody please guide .?
    The error is as follows :-
    [b]
    Can't find bundle for base name EnvironmentResources_XXXXLocalhostDev, locale en_GB
    java.util.MissingResourceException: Can't find bundle for base name EnvironmentResources_XXXXXxLocalhostDev, locale en_GB

    Putting the driver into [TOMCAT]/common/lib is sufficient.
    The error I think is not related to finding the driver, but actually not retrieving the correct connection string info.
    I never had much luck putting this definition info into server.xml
    I have had success putting it into a custom context.xml file for a web app as described [url http://tomcat.apache.org/tomcat-5.5-doc/config/context.html]here
    in individual files (with a ".xml" extension) in the $CATALINA_HOME/conf/[enginename]/[hostname]/ directory. The name of the file (less the .xml) extension will be used as the context path. Multi-level context paths may be defined using #, e.g. context#path.xml. The default web application may be defined by using a file called ROOT.xml.
    eg [TOMCAT]/conf/catalina/localhost/DataSourceExample.xml
    Hope this helps,
    evnafets

  • Error: Class java.util.ArrayList not found in import

    Bear with me, I'm learning. That's part of the problem.
    I'm trying to teach myself JSP using a book based on Tomcat, but running it on an Oracle 9iAS server that I don't control. (The DBAs do that.) I'm running into constant problems compiling and using classes and such, I think because of the different directory structures on the two servers. (See subject error.)
    So, what I'd like to know is: how do I set up a default/main/whatever-you-want-to-call-it directory under which I can store my practice applications, such that 9iAS will function correctly? We're not using OC4J as far as I can see (no such directory, though there is a J2EE_containers folder), just JServ. Or, conversely, can someone explain in simple terms the basic 9iAS directory structures for deploying apps on 9iAS? I've been 'round and 'round the Oracle documentation until my head spins, and can't find this basic information.
    Help, please!!

    You will have to make Kawa to use the correct jdk
    Look into
    Options-> Directory
    Make a new Profile if it point to your old jdk version
    Thanks
    Joey

  • Converting ResultSet to java.util.ArrayList

    Hi All,
    Is there a way to convert the data contained in a ResultSet Object into an ArrayList, without iterating through the contents of the ResultSet using a while(rs.next())?
    If so, please provide some snippets for the same.
    Thanks,
    Vikas

    masijade. wrote:
    That answer (the edited part) was hopefully, not taken seriously. It's true, but mostly impractical (except the for loop, but why type the extra characters when it is no different from the while loop), and was, obviously (or, at least, hopefully, obviously) sarcastic.Some of us got it:D But yes, I think the clarification was a good idea!

  • Compiler error: incompatible types

    When I try to compile this code it gives the error "incompatible types".
    import java.util.ArrayList;
    public class Poly {
         public static void main (String args[]) {
              Number integer = new Integer(1);
              ArrayList<Number> integers = new ArrayList<Integer>();
    }Assigning a Number object an Integer which extends Number works fine.
    But when I try to assign an ArrayList<Number> object an ArrayList<Integer> object it gives an imcompatible types error.
    Shouldn't it work?
    Edited by: aexyl93 on Jun 7, 2010 2:00 AM
    Edited by: aexyl93 on Jun 7, 2010 2:05 AM

    aexyl93 wrote:
    Thanks for the quick replies.
    I've never seen ArrayList<? extends obj> before.Nitpick: it's not "? extends obj" it's "? extends SomeClass".
    "obj" kind of implies that you could use a variable/field here, which is wrong.
    I thought it would be able to hold an object which extends what it's supposed to hold.A List<? extends Number> could contain any class that extends Number (as well as Number itself if it weren't an abstract class). However you can't add anything (except null), because you don't know the concrete type at this point.

  • Incompatible types (Generics)

    Can someone explain me please the following message I've got when trying to compile a file?
    incompatible types
    found : java.util.Iterator<E1>
    required: java.util.Iterator<E1>
    If the types are identical, how can they be incompatible???!!!
    Thanks.

    Hello,
    I am stuck, I have a compilation probem. I am trying to compile my torque init class, and it gave an error message says that incompatible types. I am using Vector package to check the index of an element in the array. But the compiler found List instead of vector. Can you please tell me what's wrong.
    // Begin MyProject.java source
    package com.digitalevergreen.mytest;
    import com.digitalevergreen.mytest.om.*;
    import org.apache.torque.Torque;
    import org.apache.torque.util.Criteria;
    import java.util.Vector;
    public class MyProject
    public static void main(String[] args)
    try
    // Initialze Torque
    Torque.init( "C:/Project/torque-3.1/Project.properties" );
    // Create some Authors
    Author de = new Author();
    de.setFirstName( "David" );
    de.setLastName( "Eddings" );
    de.save();
    Author tg = new Author();
    tg.setFirstName( "Terry" );
    tg.setLastName( "Goodkind" );
    tg.save();
    // Create publishers
    Publisher b = new Publisher();
    b.setName( "Ballantine" );
    b.save();
    Publisher t = new Publisher();
    t.setName( "Tor" );
    t.save();
    // Ok. For some reason even though the BaseXPeer doInsert
    // methods return the primary key it is not set in the
    // BaseX save method so we have to "retrieve" these objects
    // from the database or we will get null value exceptions
    // when we try to use them in the book objects and do a save.
    Criteria crit = new Criteria();
    crit.add( AuthorPeer.LAST_NAME, "Eddings" );
    Vector v = AuthorPeer.doSelect( crit );
    if ( v != null && v.size() > 0 )
    de = (Author) v.elementAt(0);
    crit = new Criteria();
    crit.add( AuthorPeer.LAST_NAME, "Goodkind" );
    v = AuthorPeer.doSelect( crit );
    if ( v != null && v.size() > 0 )
    tg = (Author) v.elementAt(0);
    crit = new Criteria();
    crit.add( PublisherPeer.NAME, "Ballantine" );
    v = PublisherPeer.doSelect( crit );
    if ( v != null && v.size() > 0 )
    b = (Publisher) v.elementAt(0);
    crit = new Criteria();
    crit.add( PublisherPeer.NAME, "Tor" );
    v = PublisherPeer.doSelect( crit );
    if ( v != null && v.size() > 0 )
    t = (Publisher) v.elementAt(0);
    // Create books
    Book wfr = new Book();
    wfr.setTitle( "Wizards First Rule" );
    wfr.setCopyright( "1994" );
    wfr.setISBN( "0-812-54805-1" );
    wfr.setPublisher( t );
    wfr.setAuthor( tg );
    wfr.save();
    Book dof = new Book();
    dof.setTitle( "Domes of Fire" );
    dof.setCopyright( "1992" );
    dof.setISBN( "0-345-38327-3" );
    dof.setPublisher( b );
    dof.setAuthor( de );
    dof.save();
    // Get and print books from db
    crit = new Criteria();
    v = BookPeer.doSelect( crit );
    for ( int i = 0; i < v.size(); i++ )
    Book book = (Book) v.elementAt(i);
    System.out.println("Title: " + book.getTitle() );
    System.out.println("Author: " +
    book.getAuthor().getFirstName()
    + " " +
    book.getAuthor().getLastName() );
    System.out.println("Publisher: " +
    book.getPublisher().getName() );
    System.out.println("\n\n");
    catch (Exception e)
    e.printStackTrace();
    // End MyProject.java source
    and this is the error message:
    C:\Project\torque-3.1\src\java\com\digitalevergreen\mytest>javac MyProject.java
    MyProject.java:50: incompatible types
    found : java.util.List
    required: java.util.Vector
    Vector v = AuthorPeer.doSelect( crit );
    ^
    MyProject.java:56: incompatible types
    found : java.util.List
    required: java.util.Vector
    v = AuthorPeer.doSelect( crit );
    ^
    MyProject.java:62: incompatible types
    found : java.util.List
    required: java.util.Vector
    v = PublisherPeer.doSelect( crit );
    ^
    MyProject.java:68: incompatible types
    found : java.util.List
    required: java.util.Vector
    v = PublisherPeer.doSelect( crit );
    ^
    MyProject.java:93: incompatible types
    found : java.util.List
    required: java.util.Vector
    v = BookPeer.doSelect( crit );
    ^
    5 errors
    C:\Project\torque-3.1\src\java\com\digitalevergreen\mytest>
    any help will be appreciated. Thank you in advance.
    Omar N.

Maybe you are looking for

  • Can I mirror my Rmbp with apple tv? and how?

    I just purcahsed Apple TV, I have it all configured with my wireless and my iTunes. I have an HDMI cable hooked up from it to the tv. But Can i mirrow my computer on it, I have a Rmbp, anyone???

  • IPod worked fine, sync'd fine, apps functioned BEFORE iTunes 8.2.1.6 update

    I got a new iPod Touch in March...16gb 2G. I have Windows XP. Everything's been working fine up until the last two iTunes updates. The new 8 has yielded the worst problems. I've noticed PRIOR to iTunes 8 that my downloaded apps stopped working. The f

  • Something strange on the screen glass, perhaps a flow of the coating??

    I moisten the iPad screen, the THING appears! It can't be seen easily unless the surface is humid, and when I touch it, I feel this area of screen is not glazed, and rough. I swear to God! This is the first time I clean the screen since I got it 8 da

  • VT01n,VT02n ...Need user exit or Badi to implement this code :

    Hi Experts , In VT01n or VT02n transactions , when I give shipping type as 03 (VTTK-VSART) and TransportPlanPt as 4701 (VTTK-TPLST) , the additional data tab  field Suppl. 1 (VTTK-ADD01) must be filled with Z1 value automatically , Even though if the

  • HTTP  Interface.

    hi experts!!! i am working in a class builder work for HTTp Interface.in that i have implimented the Create,Get Comads using open dataset which opens /create files in server. now i want to set Mime type. in Create i am not getting the Mime type where