Inconvertible Types

Whats an easy way to handle this?
I have 2 strings with a number in each that I need to multiply.
int product = string1 * string2;
That will give me a compile error. So I used type-casting.
int number1 = (int)string1;
int number2 = (int)string2;
int product = number1 * number2;
But this gives me a 'inconvertible type' compile error.
If I can't multiply strings, and I can't convert them to a datatype that can multiply, then how am I supposed to get this to work?

Don't use the above style. It is inefficient and bad
coding practice.
(i.e. it creates an unnecessary object)Doesn't your example use unnecessary int's?
int product = 0;
try {
  product = (Integer.parseInt(string1) * Integer.parseInt(string2));
} catch(NumberFormatException e) {
  System.out.println("string1 or string2 is not a number!");

Similar Messages

  • capture of ? extends scorecard.data.StoreData Inconvertible types

    This one baffles me.
    I have
        private static ReferenceQueue<StoreData> freedReferences = new ReferenceQueue<StoreData>();
    // and
        private static class StoreReference extends SoftReference<StoreData> {
    }So why can't I do:
    StoreReference ref = (StoreReference)freedReferences.remove();I get:
    C:\Scorecard\ScoreCard\src\scorecard\data\StoreDataFactory.java:386: inconvertible types
    found : java.lang.ref.Reference<capture of ? extends scorecard.data.StoreData>
    required: scorecard.data.StoreDataFactory.StoreReference
    The use of generics with these ReferenceQueues seems to be completely fouled up.

    I have
    private static ReferenceQueue<StoreData>
    freedReferences = new ReferenceQueue<StoreData>();
    // and
    private static class StoreReference extends SoftReference<StoreData> {Imagine you also have this:
        private static class FooReference extends SoftReference<StoreData>Now, you could easily create a variable like this:
        SoftReference<StoreData> foo = new FooData();And you certainly shouldn't be able to assign the contents of that variable to StoreReference, even with casting (although I admit the cast should get it past the compiler in this case, with an unchecked conversion warning ...)
    Edit: I think the compiler treats this as a case similar to the following:
        Integer i = new Integer(10);
        Double d = (Double)i;Saying that, I do believe that it appears to be more like:
        Number i = new Integer(10);
        Double d = (Double)i;

  • Help! wscompile generates inconvertible type java code?

    Hi,
    I am trying to create client code from Google AdWords WSDLs. I have to specify -f:explicitcontext to generate source code for <wsdlsoap:header> tag.
    The generated source code has inconvertible types and cannot be compiled.
    The compile error:
    adwords_adgroup/ver_0_1/AdGroupInterface_Stub.java:1058: inconvertible types
    found : java.lang.Object
    required: long
    operations.value = (long)_headerObj;
    This is the command I run:
    wscompile -d build/classes -s build/src -gen -keep -f:explicitcontext config.xml
    This is config.xml:
    <?xml version='1.0' encoding='UTF-8'?>
    <configuration xmlns='http://java.sun.com/xml/ns/jax-rpc/ri/config'>
    <wsdl location='https://sandbox.google.com/api/adwords/v12/AdGroupService?wsdl' packageName='com.tfmx.ws.adwords_adgroup.ver_0_1'/>
    </configuration>
    What is the problem and how can it be solved?
    Thank you!
    Da

    use this code . you have to pass userlogin and lookup name
    Public String GetEmail(String UserLogin,String lookupcode)
    String email;
    try{
    tcLookupOperationIntf lookupIntf = Platform.getService(tcLookupOperationIntf.class);
    HashMap<String, String> lookupValues = getLookupHashMap(lookupIntf, lookupCode);
    String found = lookupValues.get(UserLogin);
    if (found!=null) email= "EMAIL A";
    else
    email= "EMAIL B";
    }catch(Exception e){}
    return email;
    private HashMap<String, String> getLookupHashMap(tcLookupOperationsIntf lookupOperationsIntf, String lookupCode)throws tcAPIException,tcInvalidLookupException,tcColumnNotFoundException {
    HashMap<String, String> lookupMap = new HashMap<String, String>();
              tcResultSet resultLookupHashMap = lookupOperationsIntf
                        .getLookupValues(lookupCode);
              int countResultLookupHashMap = resultLookupHashMap.getRowCount();
    if (countResultLookupHashMap > 0) {
                   for (int i = 0; i < countResultLookupHashMap; i++) {
                        resultLookupHashMap.goToRow(i);
                        lookupMap.put(resultLookupHashMap..getStringValue("Lookup Definition.Lookup Code Information.Code Key"),
    resultLookupHashMap.getStringValue("Lookup Definition.Lookup Code Information.Decode"));
    return lookupMap;
    }

  • Advanced for loop: incompatible & inconvertible types

    class Animal implements java.util.Iterator{ }
    class Dog extends Animal{ }
    class Cat extends Animal{ }
    class Vet {
       public static void main(String [] args) {
         Animal [] aa = {new Dog(), new Dog(), new Dog()};
         for(Object o : aa)  // compiler error.
                  // Incompatible type. found: Animal required: Object
           goWalk((Dog) o); // inconvertible type. found: Object required: Dog
       static void goWalk(Dog d) { }
    }i'm getting 2 compile time error. could someone explain why?
    thanks

    Hi Guys
    i dont know why i'm getting 2 compile-time errors. Small change in the code: it doesn't implement Iterator interface.
    class Animal{ }
    class Dog extends Animal{ }
    class Cat extends Animal{ }
    class Vet {
       public static void main(String [] args) {
         Animal [] aa = {new Dog(), new Dog(), new Dog()};
         for(Object o : aa)
           goWalk((Dog) o);
       static void goWalk(Dog d) { }
    }plz help

  • Please help, 2D Array of Vectors and Incompatible types :(

    I have a 2D array of vectors called nodeLocations but when I try and access the vector inside I get a compile error.
    My code is something like this:
    nodeLocations[j].addElement(noArc)
    My editor picks up that its a Vector and shows me addElement as an acceptable entry to put after the "." yet the compiler says:
    "addElement(java.lang.Object) in java.util.Vector cannot be applied to (int)"
    Can someone please help?
    Thank you in advance.
    also a related problem:
    I get inconvertible types (says int required) when I try and get an element from a vector stored in a 2D Array. I know that it comes out as an object and so should be cast but it does not seem to work. My code is as follows:
    else if (((int)(nodeLocations[nodeNumber][adjNodeNumber].elementAt(0))) != distance)
    I would appreciate any help anyone can give.
    Similar errors to the above two happen when
    I try a push with a Stack in a vector.
    I try to get something out of the stack inside the vector.

    The Vector class's addElement() method requires an Object parameter. It appears that you're trying to add an int to the Vector. You'll need to create an Integer object and place that into the vector (see sample below) or use the pre-release version of JDK 1.5 which provides autoboxing capabilities.
    int z = 5;
    Integer x = new Integer(z);
    nodeLocations[j].addElement(x);

  • Query on conversion between String to Enum type

    Hi All,
    I would like to get advice on how to convert between char and Enum type. Below is an example of generating unique random alphabet letters before converting them back to their corresponding letters that belonged to enum type called definition.Alphabet, which is part of a global project used by other applications:
    package definition;
    public enum Alphabet
    A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S,
    T, U, V, W, X, Y, Z
    public StringBuffer uniqueRandomAlphabet()
    String currentAlphabet="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
    StringBuffer randomAlphabetSB = new StringBuffer();
    for (int numberOfAlphabet=26; numberOfAlphabet>0; numberOfAlphabet--)
    int character=(int)(Math.random()* numberOfAlphabet);
    String characterPicked = currentAlphabet.substring(character, character+1);
    // System.out.println(characterPicked);
    randomAlphabetSB.append(characterPicked);
    StringBuffer remainingAlphabet = new StringBuffer( currentAlphabet.length() );
    remainingAlphabet.setLength( currentAlphabet.length() );
    int current = 0;
    for (int currentAlphabetIndex = 0; currentAlphabetIndex < currentAlphabet.length(); currentAlphabetIndex++)
    char cur = currentAlphabet.charAt(currentAlphabetIndex);
    if (cur != characterPicked.charAt(0))
    remainingAlphabet.setCharAt( current++, cur );
    currentAlphabet = remainingAlphabet.toString();
    return randomAlphabetSB;
    // System.out.println(randomAlphabetSB);
    I got the following compilation error when trying to pass (Alphabet) StringBuffer[0] to a method that expects Alphabet.A type:
    inconvertible types
    required: definition.Alphabet
    found: char
    Any ideas on how to get around this. An alternative solution is to have a huge switch statement to assemble Alphabet type into an ArrayList<Alphabet>() but wondering whether there is a more shorter direct conversion path.
    I am using JDK1.6.0_17, Netbeans 6.7 on Windows XP.
    Thanks a lot,
    Jack

    I would like to get advice on how to convert between char and Enum type. Below is an example of generating unique random alphabet lettersIf I understand well, you may be interested in method shuffle(...) in class java.util.Collections, which randomly reorders a list.
    before converting them back to their corresponding letters that belonged to enum type called definition.AlphabetIf I understand well, you may be interested in the built-in method Alphabet.valueOf(...) which will return the appropriate instance by name (you'll probably have no problem to build a valid String name from a lowercase char).

  • Type cast exception

    Hi Guys,
    I am pretty new at generics and have started reading all material available online. Shown below is the API that I am using
    package api;
    public interface CS<C extends MyConfig> extends S {
    package api;
    public interface MyConfig {
    package api;
    public interface MySession {     
         public <C extends MyConfig, T extends ResourceContainer<? extends C>>
         T createContainer(CS<C> aPredefinedConfig);
    package api;
    public interface NC extends ResourceContainer<NCC>  {
    package api;
    public interface NCC extends MyConfig {
    package api;
    import java.io.Serializable;
    public interface ResourceContainer <T extends MyConfig> extends Serializable {
    package api;
    public interface S {
         public abstract boolean equals(Object other);
         public abstract int hashCode();
         public abstract String toString();
    }And below is my implementation
    package impl;
    import api.NC;
    public class NCImpl implements NC {
    package impl;
    import api.CS;
    import api.MyConfig;
    import api.MySession;
    import api.ResourceContainer;
    public class MySessionImpl implements MySession {
         public <C extends MyConfig, T extends ResourceContainer<? extends C>> T createContainer(
                   CS<C> predefinedConfig) {
              NCImpl ncimpl = new NCImpl();
              return ncimpl; //Error Type mismatch: cannot convert from NCImpl to T
    }As shown above I get error at line 'return ncimpl' But NCImpl implements the NC which extends ResourceContainer<NCC> so shouldn't it be capable of Type casting to T or I am missing something.
    Thanks a lot for your response in advance

    continuation of stack trace .................
    [INFO] ------------------------------------------------------------------------
    [ERROR] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Compilation failure
    /home/abhayani/workarea/eclipse/workspace/workspace-2.x/GenericsTest/impl/src/main/java/impl/MySessionImpl.java:[16,13] inconvertible types
    found : impl.NCImpl
    required: T
    /home/abhayani/workarea/eclipse/workspace/workspace-2.x/GenericsTest/impl/src/main/java/impl/MySessionImpl.java:[16,13] inconvertible types
    found : impl.NCImpl
    required: T
    [INFO] ------------------------------------------------------------------------
    [INFO] Trace
    org.apache.maven.BuildFailureException: Compilation failure
    /home/abhayani/workarea/eclipse/workspace/workspace-2.x/GenericsTest/impl/src/main/java/impl/MySessionImpl.java:[16,13] inconvertible types
    found : impl.NCImpl
    required: T
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:579)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
    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 org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
    at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
    at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
    at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
    Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation failure
    /home/abhayani/workarea/eclipse/workspace/workspace-2.x/GenericsTest/impl/src/main/java/impl/MySessionImpl.java:[16,13] inconvertible types
    found : impl.NCImpl
    required: T
    at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:516)
    at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:114)
    at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
    ... 16 more
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 5 seconds
    [INFO] Finished at: Thu Feb 12 10:39:43 IST 2009
    [INFO] Final Memory: 14M/81M
    [INFO] ------------------------------------------------------------------------
    [abhayani@localhost GenericsTest]$

  • Type casting

    In my program i get a double array from a function call, i want to convert this into an int array, but when i try to type cast it the compiler tells me they are inconvertible types. ie.
    int[][] mat = (int[][])mateng.getArray("arraySig");
    where the getArray function returns a double array.
    Is there any way around this? I have tried to cast the double[][] into an Object[][] array and then back to an int[][], but the compiler wouldnt let me do this either.
    Thanks
    Alex

    One might ask why you're returning a double[][] if you
    actually want a int[][]The method returns a double[][] because its a generic method that will also be used to get double[][]s. In those cases it wont do to lose the information that only returning an int[][] would lose.
    I wanted to be able to cast the double[][] to an int[][] when i return a specific matrix (ie a ones matrix or a logical matrix).
    Alex

  • Incompatible types error in instanceof operator

    inconvertible types error. I have no idea why???
    class A
    class B
    public class Test2
    public static void main(String[] args)
    {     A a = new A();
         B b = new B();
    if (b instanceof A) System.out.println("b is child of A");
         if (a instanceof B) System.out.println("a is child of B");

    The compiler can tell that a isn't an instance of B and b isn't an instance of A. It doesn't need to wait until runtime. So it doesn't waste any time, it tells you that.

  • Converting type INT to type String...possible?

    Hi
    I basically have a stored string that I want to add numbers to, like adding a phone numbers digits to eachother or a calculators numbers to eachother in seperate instances. Is this possible?
    So say I ask the user to input a number (single), can this then be added to the string field and then perhaps looped (dont tell me how to do that - I will try that myself) to create a string of 10 or more numbers?
    Thanks for any help

    Thanks but I have to start with a param of INT before
    adding it to the string, and I cant seem to do this
    with casting (String) FIELDNAME - I get the
    Inconvertible types error[url http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Integer.html#toString(int)]Integer.toString()

  • DateFormat Incompatible type

    Hi there
    Please help.... i am using jxl to copy some excel sheets..
    I am trying to retrieve some date values.. and for that i need to know the cell format used in that particular sheet...
    But while retriving the value i get incompatible error....between java.text.DateFormat and jxl.write.Dateformat.
    Can anyone help me resolve this..heres the code
    if (cell_value.getType() == CellType.DATE)
             DateCell dc = (DateCell) cell_value;
         //     jxl.write.DateFormat format = (jxl.write.DateFormat) dc.getDateFormat();
              DateFormat format = dc.getDateFormat(); //error is at this line at getDateFormat()
              Date cellDate = dc.getDate();
             WritableCellFormat wcFormat = new WritableCellFormat(format);
    [error]
      Java/Copy_ExcelFile.java [88:1] inconvertible types
    found   : java.text.DateFormat
    required: jxl.write.DateFormat
    DateFormat format = dc.getDateFormat();
                                    ^
    [/error]Thank you

    Thanx DrClap
    Actually i did try that..but it didnt work....i get java.lang.IllegalArgumentException...
    What i am trying to do is copy cellformat of one sheet to another sheet in a separate file. and so i am trying to use DateFormat df = dc.getDateFormat();
    As i said before this generates an error.... so i modify it to
    java.text.DateFormat df = dc.getDateFormat();
    heres the code,.. if u can take a look and let me know what i am doing wrong..
                DateCell dc = (DateCell) cell_value;
                System.out.println("Date cell ok");
                //        DateFormat df = dc.getDateFormat();
                 Date dt = dc.getDate();
                java.text.DateFormat ft = dc.getDateFormat();
                String formatString = ft.toString();
                DateFormat df_new = new DateFormat(formatString);
                WritableCellFormat wc = new WritableCellFormat(df_new);
                DateTime dateCell = new DateTime(colNo, rowNo, dt, wc);
                destSheet.addCell(dateCell);
                System.out.println("destSheet ok: ");
    [output]
    THE LC STR VALUE IS: Date of birth
    Date cell ok
    [error]
    Error in copying the wbk: java.lang.IllegalArgumentException: Illegal pattern character 'j'
    [/error]
    [/output]Thanx for u r help.. appreciate that

  • My class only compiles in Java 1.6 and not in Java 1.5

    Hi, my java class wont compile in java 1.5, it only compiles in Java 1.6. How can i compile the following?
    import java.util.*;
    public class ShoppingBasket
         Vector products;
         public ShoppingBasket() { products = new Vector(); }
         public void addProduct(Product product)
         boolean flag = false;
         for(Enumeration e = getProducts(); e.hasMoreElements();)
              { Product item = (Product)e.nextElement();
                   if(item.getId().equals(product.id))
                   {flag = true; item.quantity++; break; }
              if(!flag){ products.addElement(product);}
         public void deleteProduct(String str)
              for(Enumeration e=getProducts();
              e.hasMoreElements();)
              { Product item = (Product)e.nextElement();
                   if(item.getId().equals(str))
                   {products.removeElement(item); break; }
         public void emptyBasket(){products = new Vector();}
         public int getProductNumber(){ return products.size();}
         public Enumeration getProducts() { return products.elements(); }
         public double getTotal()
         Enumeration e = getProducts();
         double total; Product item;
         for(total=0.0D;e.hasMoreElements();     total+= item.getTotal())
         {item = (Product)e.nextElement(); }
         return total;
    }It should link with a class called Product which compiles fine... the errors i get are below:
    K:\jakarta-tomcat-5.0.18\webapps\ROOT\WEB-INF\classes\ShoppingBasket\ShoppingBas
    ket.java:6: cannot find symbol
    symbol  : class Product
    location: class ShoppingBasket
            public void addProduct(Product product)
                                   ^
    K:\jakarta-tomcat-5.0.18\webapps\ROOT\WEB-INF\classes\ShoppingBasket\ShoppingBas
    ket.java:10: cannot find symbol
    symbol  : class Product
    location: class ShoppingBasket
                    { Product item = (Product)e.nextElement();
                      ^
    K:\jakarta-tomcat-5.0.18\webapps\ROOT\WEB-INF\classes\ShoppingBasket\ShoppingBas
    ket.java:10: cannot find symbol
    symbol  : class Product
    location: class ShoppingBasket
                    { Product item = (Product)e.nextElement();
                                      ^
    K:\jakarta-tomcat-5.0.18\webapps\ROOT\WEB-INF\classes\ShoppingBasket\ShoppingBas
    ket.java:20: cannot find symbol
    symbol  : class Product
    location: class ShoppingBasket
                    { Product item = (Product)e.nextElement();
                      ^
    K:\jakarta-tomcat-5.0.18\webapps\ROOT\WEB-INF\classes\ShoppingBasket\ShoppingBas
    ket.java:20: cannot find symbol
    symbol  : class Product
    location: class ShoppingBasket
                    { Product item = (Product)e.nextElement();
                                      ^
    K:\jakarta-tomcat-5.0.18\webapps\ROOT\WEB-INF\classes\ShoppingBasket\ShoppingBas
    ket.java:35: cannot find symbol
    symbol  : class Product
    location: class ShoppingBasket
            double total; Product item;
                          ^
    K:\jakarta-tomcat-5.0.18\webapps\ROOT\WEB-INF\classes\ShoppingBasket\ShoppingBas
    ket.java:36: inconvertible types
    found   : <nulltype>
    required: double
            for(total=0.0D;e.hasMoreElements();     total+= item.getTotal())
                                                                         ^
    K:\jakarta-tomcat-5.0.18\webapps\ROOT\WEB-INF\classes\ShoppingBasket\ShoppingBas
    ket.java:37: cannot find symbol
    symbol  : class Product
    location: class ShoppingBasket
            {item = (Product)e.nextElement(); }
                     ^
    8 errors

    fahafiz wrote:
    ah, so should i put the classes into the folder which the classpath is assigned to?More likely you should assign your classpath to whatever folder your classes are in.
    Put your files where they make sense, and then fill in classpath accordingly:
    javac -classpath classpath MyFile.java(I think, it's been a while since I compiled from the command-line, see http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javac.html)

  • Jdev 11.1.1.4

    <font face="Times New Roman" color="35349F" size="3">
    Hi,
    i have this servlet. can anyone tell me how to correct the problems when using it inside jdev 11.1.1.4?
    </font>
    <font face="Times New Roman" color="black" size="3">
    package view.session;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.net.*;
    import java.util.*;
    public class sessionServlet extends HttpServlet {
    public void doGet(HttpServletRequest request,
    HttpServletResponse response) throws ServletException,
    IOException {
    HttpSession session = request.getSession(true);
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    String title = "Session Information Servlet";
    String heading;
    int cnt = 0;
    if (session.isNew()) {
    heading = "Welcome, New";
    } else {
    heading = "Welcome Back";
    int oldcnt = (int)session.getValue("accessCount");
    </font>
    <font face="Times New Roman" color="red" size="3">
    Error(26,47): inconvertible types
    </font>
    <font face="Times New Roman" color="black" size="3">
    if (oldcnt != null) {
    </font>
    <font face="Times New Roman" color="red" size="3">
    Error(27,24): incomparable types: int and <nulltype>
    </font>
    <font face="Times New Roman" color="black" size="3">
    cnt = oldcnt + 1;
    session.putValue("accessCount", cnt);
    out.println(ServletUtilities.headWithTitle(title) +
    </font>
    <font face="Times New Roman" color="red" size="3">
    Error(33,21): cannot find variable ServletUtilities
    </font>
    <font face="Times New Roman" color="black" size="3">
    "<H1 ALIGN=\"CENTER\">" + heading + "</H1>\n" +
    "<TABLE BORDER=1 ALIGN=CENTER>\n" +
    "<TR>\n" +
    " <TD>ID\n" +
    " <TD>" + session.getId() + "\n" +
    "<TR>\n" +
    " <TD>Creation Time\n" +
    " <TD>" + new Date(session.getCreationTime()) + "\n" +
    "<TR>\n" +
    " <TD>Time of Last Access\n" +
    " <TD>" + new Date(session.getLastAccessedTime()) + "\n" +
    "<TR>\n" +
    " <TD>Number of Accesses\n" +
    " <TD>" + accessCount + "\n" +
    </font>
    <font face="Times New Roman" color="red" size="3">
    Error(47,28): cannot find variable accessCount
    </font>
    <font face="Times New Roman" color="black" size="3">
    "</TABLE>\n" +
    "</BODY></HTML>");
    public void doPost(HttpServletRequest request,
    HttpServletResponse response) throws ServletException,
    IOException {
    doGet(request, response);
    </font>

    When I try Deploying A WebCenter PS3 Portal Application using JDev 11.1.1.1.4 Integarted WebLogic Server I get the following error :
    [02:21:12 PM] Deploying Application...
    <29/03/2011 2:21:12 PM EST> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1301368872572' for task '1'. Error is: 'weblogic.management.DeploymentException: [J2EE:160149]Error while processing library references. Unresolved application library references, defined in weblogic-application.xml: [Extension-Name: oracle.webcenter.framework, Specification-Version: 11.1.1, exact-match: false], [Extension-Name: oracle.webcenter.skin, Specification-Version: 11.1.1, exact-match: false], [Extension-Name: oracle.sdp.client, exact-match: false].'
    weblogic.management.DeploymentException: [J2EE:160149]Error while processing library references. Unresolved application library references, defined in weblogic-application.xml: [Extension-Name: oracle.webcenter.framework, Specification-Version: 11.1.1, exact-match: false], [Extension-Name: oracle.webcenter.skin, Specification-Version: 11.1.1, exact-match: false], [Extension-Name: oracle.sdp.client, exact-match: false].
         at weblogic.application.internal.flow.CheckLibraryReferenceFlow.prepare(CheckLibraryReferenceFlow.java:26)
         at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:613)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
         at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:184)
         at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:58)
         Truncated. see log file for complete stacktrace
    I need some help to triage the issue and resolve the cause. any help in this context appreciated .
    Redg

  • Get an object in a servlet

    Hello! I'm developing a servlet which has to get an object that I send as a parameter:
    Course c = new Course();
    out.println("<form ... action=\"InsertCourse?course="+c+"\">");
    I don't know how to get mi object "c" in the servlet InsertCourse. When I tried to do:
    Course c2=(Course)request.getParameter("course");
    it told me "inconvertible types", so I wrote:
    Course c2=(Course)(Object)request.getParameter("course");
    But that doesn't work.
    Thanks for your help!

    HTTP paremeters are Strings. If your object has a String based constructor, rebuild it like that:
    Course c2 = new Course(request.getParameter("course"))

  • The [b]instanceof[/b] operator

    Hello again world.
    Here's the code in question:
    import java.awt.*;
    import javax.swing.*;
    class InstanceOperator
         public static void main(String args[])
              JButton poo = new JButton();
              if (poo instanceof JComponent)
                 System.out.println("It is.");
              else
                 System.out.println("It's not.");
    }If I change JComponent to Container or Component or Object, I get the string "It is." I am trying to get the string "It's not". However, if I use anything other than something in the JButton ancestral chain - like Window or InstanceOperator - I get the compile error inconvertible types.
    I don't understand the usefullness of instanceof if I can only test for direct ancestors. Can anyone explain this with a practical example.
    Ciao for now and thanx again one and all.

    Demo in code:public class junk{
       public static void main(String[] args) {
            String a = "hello";
            java.awt.Button b  = new java.awt.Button("hello");
            if(checkForType(a).equals("string")) System.out.println("The String has a value of "+a );
            if(checkForType(b).equals("button")) System.out.println("The button has a label of "+b.getLabel() );
       private static String checkForType(Object o){          
           if(o instanceof String) return "string";
           else if(o instanceof java.awt.Button) return "button";
           else return "other object type";
    }(and apologies to the OP for my previous mean-ness)

Maybe you are looking for

  • How do i use numbers for image gallery and arrows?

    Hello there, I'm hoping someone can advise me on the best possible way. I would like to use numbers to help the user navigate through the image gallery i'm creating and arrows on either side of an image (one image viewed at any one time). I have atta

  • Unable to open "Help and support"

    When i click on help and support i get the error message: "Internet explorer cannot download / from help" How do i fix this?

  • Everything you wanted to know about books... and then some.

    Hi, all: With all the questions and speculation about how books are printed, what color profile to use, etc. I contacted Apple and asked for information that I could pass on. Here's the reply I received from Apple: Thank you for contacting the Apple

  • How do I stop an automatic 'sharing' of my files with another Mac user in my address book?

    Hi all I have just installed Lion and it has started to 'share' access to other mac users files - all of which come from my address book. How do I stop this and delate the links that have been created ? Very embarrassing right now - some of these peo

  • Auto suggest behaviour copononent is not working

    Hi All, We migrated our application from JDev 11.1.1.3 to 11.1.1.5. we have a input text with LOV feild in a popup, and the feild has auto suggest behavior, <af:inputListOfValues id="inputListOfValues3" popupTitle="Search and Select: #{bindings.Dica.