Confusion:  IllegalAccessException with reflection

Hi,
Lets say that I have an opaque object that I know implements
the java.util.Set interface.
Its concrete type is in fact (from exception trace)
java.util.AbstractMap$1
Now I want to get the Method for "iterator" for this object.
I have access to both the concrete java.lang.Class (obviously)
and thru extra work the java.lang.Class for Set.
Intuitively, I would think that doing a Class.getMethod() with the
Set Class would not be best because this would not guarantee
that I am actually invoking the most concrete derivation of "iterator".
In fact, the interface Set has no implementation for "iterator".
But when I use the Class for java.util.AbstractMap$1 for the Class.getMethod("iterator")
call, I do get a result, but that method is not invocable due
to IllegalAccessException. When I do a
java.lang.Set.class.getMethod("iterator", null) and then use the Method.invoke()
for an object of type java.util.AbstractMap$1, this seems to work.
Can anyone explain why NOT to use the concrete Class type for
the getMethod() call? This implies that java.lang.Method for abstract classes
successfully invokes different actual subroutines for different actual objects of
different derivation levels.
Andy

>
Intuitively, I would think that doing a
Class.getMethod() with the
Set Class would not be best because this would not guarantee
that I am actually invoking the most concrete
derivation of "iterator".
In fact, the interface Set has no implementation for
"iterator".
If I am reading that correctly then your intution is wrong.
For an instance there is only one possible method call. There is no way to call a different method with that instance regardless of what you do to it.
A cast never changes the type of an object, all it does is verify that that an instance is of that type.

Similar Messages

  • Can this be done with reflection?

    I'm trying to find all the classes in the current classpath that implement a particular interface. Is there anyway to easily do this with reflection, or is that kind of information simply not tracked by the JVM?

    Not sure what other thread your talking about because
    this is the first post I've made on here. Sorry, for that. I got a bit confused a thought that you also had created this thread which asks about custom class loading.
    http://forum.java.sun.com/thread.jspa?threadID=753244
    As for what
    I'm trying to accomplish, I have a number of classes
    that have been annotated with some configuration
    information I want read in at runtime, and also to be
    used by some utilities prior to the applications
    launch. Currently the list of classes is stored in a
    xml file read by both the application and the
    utilities, however, this approach is kind of a pain
    because I have to add every single class that I
    annotate to this seperate fileOk. I would probably add the information to the manifest of the jar files, and place the jar files in the "plugin" folder. I don't like to do things manually so I would probably try to add the information to the manifest during compilation.

  • Problem with reflection in Generics

    I'm using the Prototype compiler for JSR-014 and I am having a big problem with reflection. In the simplest case
    class n<T> {
        void go() {
         this.getGenericType().getTypeParameters();
         this.getClass().getGenericInterfaces();
    }I get a "cannot resolve symbol" on both lines. A glance at the jar included with the prototype shows why: all the collection classes are there, and a lot of the java.lang types, but not java.lang.Class and none of the java.lang.reflection classes.
    So what gives? Is reflection not supported yet? (gaak!) Is there another jar I am supposed to download?
    Thanks

    Schapel is right.
    but also
    The signatures for fields and methods will include the generic types.
    If you really wanted to, this would work.
    get the Class's ClassLoader,
    work out the name of the Class's file, and get an inputStream to this resource (from the classloader). (This bit works because I use as a diagnostics tool to see if classes are loaded from my jar, or my patches directory - see below).
    Write some stuff to read the class file and parse out the generic signatures for the things you are interested in.
    I don't think this last part would fit into anyones definition of "fun", however the specs are all available, and it may turn out simpler than at first appearances.
    Here's the code I use to get the location of where a class is loaded from.
        static URL getLoadPath(Class theClass) {
            StringBuffer resourcename = new StringBuffer(theClass.getName());
            for(int i=0;i < resourcename.length(); i++) {
                if(resourcename.charAt(i) == '.') {
                    resourcename.setCharAt(i,'/');
            resourcename.append(".class");
            return theClass.getClassLoader().getResource(resourcename.toString());
        }if you use getResourceAsStream() in place of getResource() you will have the .class file as an inputStream which you can read and parse.
    Have Fun
    Bruce

  • Error while transforming XSLT by calling function with Reflection API

    Hi,
    I'm new to Reflection API. I want to call function from the jar file which is not in my application context. So I have loaded that jar ( say XXX.jar) file at runtime with URLClassLoader and call the function say [ *myTransform(Document document)* ]. Problem is that when I want to transform any XSLT file in that function it throws exception 'Could not compile stylesheet'. All required classes are in XXX.jar.
    If I call 'myTransform' function directly without reflection API then it transformation successfully completed.
    Following is code of reflection to invoke function
            ClassLoader contextCL = Thread.currentThread().getContextClassLoader();
            URLClassLoader loader = new URLClassLoader(jarURLs, contextCL);
            Class c = loader.loadClass(fullClasspath);
            Constructor constructor = c.getDeclaredConstructor(constructorParamsClasses);
            Object instance = constructor.newInstance(constructorParams);
            Method method = c.getDeclaredMethod("myTransform", methodParamsClasses);
            Object object = method.invoke(instance, methodParams);Following is function to be called with reflection API.
    public Document myTransform ( Document document ) {
    // Reference of Document (DOM NODE) used to hold the result of transformation.
                Document doc = null ;
                // DocumentBuilderFactory instance which is used to initialize DocumentBuilder to create newDocumentBuilder.
                DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance () ;
                // Reference of DocumentBuilder used to create new Document (DOM NODE).
                DocumentBuilder builder;
                try {
                      // Initialize DocumentBuilder by using DocumentBuilderFactory instance.
                      builder = factory.newDocumentBuilder ();
                      // Initialize new document instance by using DocumentBuilder instance.
                      doc = builder.newDocument () ;
                      // Creates new DOMSource by using document (DOM NODE) which is coming through current transform() method parameter.
                      DOMSource domsource = new DOMSource ( document ) ;
                      // Creates new instance of TransformerFactory.
                      TransformerFactory transformerfactory = TransformerFactory.newInstance () ;
                      // Creates new Transformer instance by using TransformerFactory which holds XSLT file.
                      Transformer transformer = null;
    ********* exception is thrown from here onward ******************
                      transformer = transformerfactory.newTransformer (new StreamSource (xsltFile));
                      // Transform XSLT on document (DOM NODE) and store result in doc (DOM NODE).
                      transformer.transform ( domsource , new DOMResult ( doc ) ) ;
                } catch (ParserConfigurationException ex) {
                      ex.printStackTrace();
                } catch (TransformerConfigurationException ex) {
                      ex.printStackTrace();
                } catch (TransformerException ex) {
                     ex.printStackTrace();
                } catch (Exception ex) {
                     ex.printStackTrace();
                //holds result of transformation.
                return doc ;
    }Following is full exception stacktrace
    ERROR:  'The first argument to the non-static Java function 'myBeanMethod' is not a valid object reference.'
    FATAL ERROR:  'Could not compile stylesheet'
    javax.xml.transform.TransformerConfigurationException: Could not compile stylesheet
            at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:829)
            at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:623)
            at com.actl.dxchange.utilities.Transformation.transform(Transformation.java:83)
            at com.actl.dxchange.base.BaseConnector.transform(BaseConnector.java:330)
            at com.actl.dxchange.connectors.KuoniConnector.doRequestProcess(KuoniConnector.java:388)
            at com.actl.dxchange.connectors.KuoniConnector.hotelAvail(KuoniConnector.java:241)
            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:585)
            ...........

    Hi,
    Thanks for response.
    Following is code for setting 'methodParamsClasses' array object. I do ensure that Document is not null and valid. My application is web application.
    Document requestObj = /* my code for generating Document object*/
    Object[] methodParams = new Object[]{requestObj}
    Class[] methodParamsClasses = new Class[]{};
                if (methodParams != null) {
                    methodParamsClasses = new Class[methodParams.length];
                    for (int i = 0; i < methodParams.length; i++) {
                        if (methodParams[i] instanceof Document) {
    /************** if parameter is instance of Document then I set class type as "Document.class" ***********/
                            methodParamsClasses[i] = Document.class;
                        } else {
                            methodParamsClasses[i] = methodParams.getClass();

  • Casting objects with reflection possible?

    I have this code:
    String className = "com.xyz.MeasurementUnit";
    Class provider = Class.forName(className + "Provider");
    Object object = context.getContractProxy(provider);The last line returns an object of type object. I must execute the method getIsoId(...) on that object. But to do that, I think I have to cast it first to the object type MeasurementUnitProvider.
    Is this possible with reflection? Is it somehow possible to solve what I want to do?

    If MeasurementUnitProvider is an interface that is known at compile time, then the cast can be made in the usual way MeasurementUnitProvider unitProvider = (MeasurementUnitProvider)context.getContractProxy(provider);If the interface is not known at compile time, then the object reflecting the method can be obtained from the Class object by name and parameter type. For reflective method invocation, no cast is required.
    Pete

  • Invoking method with reflection - with String[] params

    Hi there,
    I have a method that I need to call with reflection. This method has one parameter
    public void setArgs(String args[])
    I'm trying to invoke it by reflection. I tryied this but didn't work:
    Class[] parameterArgs = {String[].class};
    Method mCallArgs = objClasseChiamata.getClass().getMethod("setArgs",parameterArgs);
    Object[] nomeArgs = new Object[]{"Luca","Alessio"};
    //I try too:
    //String[] nomeArgs = new String[]{"Luca","Alessio"};
    mCallArgs.invoke(objClasseChiamata ,nomeArgs);     
    It compile ok,
    but in Runtime I find this error:
    java.lang.IllegalArgumentException
    java.lang.Throwable()
    java.lang.Exception()
    java.lang.RuntimeException()
    java.lang.IllegalArgumentException()
    java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object [])
    void reflection.TestReflection.main(java.lang.String [])
    Thank you,
    Alessio

    The thing that goes in the Object[] is the paramaters. The parameter is one String[], not two Strings:
    Object[] nomeArgs = { new String[] {"Luca", "Alessio"} };
    mCallArgs.invoke(objClasseChiamata ,nomeArgs);
    // or
    mCallArgs.invoke(objClasseChiamata, new Object[] { new String[] {"Luca", "Alessio"} });Note that there's no reason to use "new Object" when you're initializing a named array reference (just like you initialized the Class[] above).

  • "SAP confuses customers with pricing" ?

    Hello, I've been reading this article:
    SAP confuses customers with pricing. A lot of SAP customers ask Gartner for help figuring out SAP's pricing and licensing, as SAP has unusual terms for billing data going into and out of systems. Gaughan also said that a big technology transition that was driving SAP revenue for the last few years -- moving existing customers from the old R/3 system to the newer Business Suite -- is almost done, which means SAP will have to be more aggressive with maintenance fees. He recommended locking in maintenance prices now.
    Source: What Microsoft, Oracle, IBM, And SAP Don't Tell Customers
    What do you think about this statement?

    Transparent pricing has always been problem in enterprise software. Its not just the big players who do this, even some one selling screen capture software for the enterprise does this !.
    Ofcourse, it does not make it right. The motto seems to be "get as much out of the customer as you can".

  • Confusing issues with ORM.

    I am having some very confusing issues with ORM.
    CF 9,0,0,251028 , developers edition locally hosted, Window XP 5.1
    First I created a test in it's own directory using the book club database. Created a CFC called Books and everything ran fine.
    But when I move the test to the root of one of my projects it gives a "Mapping for component Books not found."
    I set the correct [this.ormenabled = "true"; and this.datasource = "cfbookclub"] in the application.cfc and the test cfm is in the same directory (project root) as the app.cfc and Books.cfc.
    I can cfquery the books database from the test cfm just fine.
    The main project is in Mach-ii, but the test does not invoke any mach-ii elements, index.cfm is not run - just the test cfm.
    I have event commented down the application.cfc so that all is left is
    this.name="myApplication";
    this.ormenabled = "true";
    this.datasource = "cfbookclub";
    Also - as a "crazy try anything" I did:
    this.ormsetting.cfclocation ="books.cfc";
    and created an ORM directory and tried:
    this.ormsetting.cfclocation ="orm";
    and
    this.ormsetting.cfclocation ="C:\ColdFusion9\wwwroot\eBusiness\books.cfc";
    Further info:
    My test.cfm is essentially:
    <cfset books = EntityLoad("Books")>
    The header on Books.cfc is:
    <cfcomponent persistent="true" entityname="Books" table="books">
    Any help would be appreciated.
    Sam.

    its important to use the same exact cameras on multi camera shoots. also important to take color meter and see what the lights give you. sodium vapor and tungsten and flourescent all need different " color correction" gels to make them equal 32k or 56k .. and its not just orange and blue correction ...its also green and magenta etc...
    professionally , you cant do all that at the " lens " with cc filters..you need to actually get to the lights physically ( with scissor lifts or cranes ( manlifts ) and gel the lights too ).
    Once you have your lights corrected and ready to shoot...all cameras need to shoot "color swatches - usually Kodak .. with a single light source that equals what your camera is set to ( color temp )...and that is used to get your balance correct in post.
    That said it sounds like you are screwed...
    To have someone try to correct that professionally would cost more than you can afford, or you would have used that " money " to correct your color etc in the beginning... in other words, if you could afford to send everything to a pro lab and try color correcting all that stuff, you wouldnt have this problem to begin with IMO.
    My suggestion:
    Since wrestling is a gritty sport and " manly " and full of emotion that is basically " tough " and " hard " ....trash the color altogether and make everything black and white... maybe increase your contrast a tiny bit ...or maybe add a slight " tone " to it....( not sepia which looks just " old " , but maybe slight blue tint ? ) ...something to make it look as gritty and hard as you can...
    Then tell client you did it on purpose !  Is part of your concept to begin with... wow them with your creativity !

  • Problems with Reflection API and intantiating an class from a string value

    I want to instantiate a class with the name from a String. I have used the reflection api so:
    static Object createObject(String className) {
    Object object = null;
    try {
    Class classDefinition = Class.forName(className);
    object = classDefinition.newInstance();
    } catch (InstantiationException e) {
    System.out.println(e);
    } catch (IllegalAccessException e) {
    System.out.println(e);
    } catch (ClassNotFoundException e) {
    System.out.println(e);
    return object;
    Let's say my class name is "Frame1".
    and then if i use:
    Frame1 frm = (Frame1) createObject("Frame1");
    everything is ok but i cannot do this because the name "Frame1" is a String variable called "name" and it doesn't work like:
    name frm = (name) createObject("Frame1");
    where i'm i mistaking?
    Thanks very much!

    i have understood what you have told me but here is a little problem
    here is how my test code looks like
    Class[] parameterTypes = new Class[] {String.class};
    Object frm = createObject("Frame1");
    Class cls = frm.getClass();
    cls.getMethod("pack",parameterTypes);
    cls.getMethod("validate",parameterTypes);
    everything works ok till now.
    usually if i would of had instantiated the "Frame1" class standardly the "cls" (or "frm" in the first question ) object would be an java.awt.Window object so now i can't use the function (proprietary):
    frame_pos_size.frame_pos_size(frm,true);
    this function requires as parameters: frame_pos_size(java.awt.Window, boolean)
    because my cls or frm objects are not java.awt.Window i really don't find any solution for my problem. I hope you have understood my problem. Please help. Thanks a lot in advance.

  • Help with reflection in java

    hi
    i am new to java .I write my program in myeclipse4.0 while running the code it gives error dialogbox like javavirtualMachine says that fatal error came so program is exited.after that ArrayIndexOutOfBoundException is came. I am unable to understand this error.can any one help me.
    code is as follows
    import java.lang.reflect.*;
    public class RefTest1
         public static void Listsuperclass1(String name)
              try
              Class c = Class.forName(name);
              Class sc = c.getSuperclass();
              String cname = c.getName();
              String sname = sc.getName();
              System.out.println("\t\t"+cname+"extends"+sname);
              catch(ClassNotFoundException cnf)
                   cnf.printStackTrace();
              catch(Exception e)
                   e.printStackTrace();
         public static void main(String[] args)
              Listsuperclass1(args[0]);
    Thank you

    njb7ty wrote:
    I suggest dropping that example program and concentrating on reading a book on Java such as 'Head First in Java'. Otherwise, you will spend a lot of time trying to get something to work and gain little value from it.Likewise... Jumping into reflections before you can [read a stack-trace|http://www.0xcafefeed.com/2004/06/of-thread-dumps-and-stack-traces/] is like signing up a toddler for the New York Marathon... it's probably simply beyond your skill level... so step back... go read a book, do some tutorials, get your head around just the process of the designing, writing, compiling, running, and debugging java programs... and what the different diagnostics mean... Then, equipped with your nose-clip and your trusty stone ;-) you contemplate leaping into the deep end ;-)
    Cheers. Keith.

  • Confusing behaviour with layout managers.

    It appears that this page has become my favorite web page, having in mind all the
    questions I come up with.
    In the following page:
    http://java.sun.com/docs/books/tutorial/uiswing/layout/none.html
    a code example is given on how to use a null layout manager. If I use exactly the
    same code, but instead of adding the pane into a frame, I add it into yet another
    JPanel with for example FlowLayout, then the pane with the null layout manager
    gets size 0...it just becomes a pixel in the panel it was added. I am not able to
    fix this even if I in a hard-wired manner try to set the size of the internal pane.
    Can somebody explain to me why the top level pane appears to completely ignore
    the bounds and sizes set by the pane with the null layout manager? This confuses
    me a lot :-/

    hi there
    did you...
    1)set the bounds of each of the components contained by your jpanel?
    2)then set the size of the jpanel?
    if yes then did you:
    3)call pack() on your jframe?
    4)[before calling setVisible(true) on same jframe?
    regards
    lutha                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Java.lang.IllegalAccessException using Reflection and SSL

    Hi all,
    I am getting the java.lang.IllegalAccessException when trying to access the field's value. I'm passing an object that has it's fields set. I'm trying to determine the object passed to my method, get the object's fields, get the field values and store them in an array for later processing. The italic line is where the error occurs. I'm running SSL and my constructors for the objects that I'm passing are all declared "public".
    Can anyone help me fix this problem or suggest a better way?
    Thanks.
    *my method
        public void setHtFields( Object obj ) throws Exception
            setAction( "view" );
            setRecType( obj.getClass().getName() );
            Field flds[] = obj.getClass().getDeclaredFields();
            String fieldList = "";
            String value = "";
            for ( int x=0; x<flds.length ; x++ )
    value = flds[x].get(obj).toString();            htFields.put( flds[x].getName(), value);
                fieldList +=  flds[x].getName() + "::" + value + "~";
            setFieldValue( fieldList );
            insertRecord();
            return;
    * stack trace
    java.lang.IllegalAccessException
         at java.lang.reflect.Field.get(Native Method)
         at com.yoursummit.utils.historyLogging.setHtFields(historyLogging.java:276)
         at org.apache.jsp.edit_emp_jsp._jspService(edit_emp_jsp.java:99)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
         at java.lang.Thread.run(Thread.java:479)

    The object your are invoking setHtFields on must be declaring some private or protected fields which you can't access.
    If you try printing the thrown IllegalAccessException message, not just a stack trace, you will see which exacly one.

  • How to confuse people with poorly thought out ideas.

    So I'm looking to upgrade my phone and I see, "you're eligible for a free upgrade." however there's a $30 fee for this "free upgrade." Nonsense! After choosing my plan details for this new phone. (There were actually no changes in my plan from old phone to new phone.) The website tell me my new monthly total will be $48.99. NICE! I used to pay $80 a month. A pleasant chat associate comes online to assist however she is unable to explain this new $48.99 monthly total. She also confirms that this information is regularly confusing to Customers and assures me my regular monthly rate will still be $80. Today I get an email confirmation of my new phone which again includes this $48.99 new monthly total. Verizon! Get your head out from between your knees! You have poorly thought out information on your sales pages and confirmation emails. Your own employees agree and confirm your thoughtlessness. In addition, you have no clear and easy to find way to communicate with you via email. (Hmmm - seems intentional to me!) I will give credit where credit is due. The mobile phone services and signals you provide are excellent. Your website is not!

    deepwoods611 wrote:
    In addition, you have no clear and easy to find way to communicate with you via email. (Hmmm - seems intentional to me!)
    You are correct, it IS intentional. It is not only unclear and/or hard, Verizon DOES NOT even have email correspondence with CS. They discontinued this method of communication within the last year.

  • Draw Live in Symmetry with Reflect Effect

    There was a thread on the MAC forum July of last year (http://www.adobeforums.com/webx/.59b5e982)about drawing in symmetry using the reflect effect set to a copy of -1- in the dialog box.
    I am unable to draw with this LIVE. I can only apply the effect after drawing.
    What am I doing wrong?

    This is a sorta typical example:
    Maybe it's a little harder than average but to -me-, AI should have some sort of 'edge detection' to convert this to about two dozen straight 'lines'.
    But what it -does- is either turn it into a mass of paisley swirls -or- if I use the 'photo' setting, the trace looks mostly like the original, BUT it's created almost 1 path for every frickin' pixel.
    What I end up doing---if I really need it---is to trace over it with the mouse, but I confess I'm a LOUSY 'pen drawer' so it often goes awry. Most often? I make a print-out, trace it on paper with a sharpie, then re-scan it into AI. And THEN it will 'Live Trace' OK... seems like a total Rube Goldberg but AI seems to -need- that sharpie.
    So... in lieu of going to pen boot camp, I was -hoping- that this was just operator error.
    Anyone?
    ---JC

  • Short cut for converting pngs with reflection to jpg?

    After reading the posts about huge image sizes, I tried the suggestion about turning off effects. But I found I liked the little reflection bit at the bottom of my images. So I left in the effect and published my site to get the swoopty png files with alpha and reflection.
    I then loaded the png files up into GraphicConverter, and used that to generate a jpeg. GraphicConverter wanted to know what to do with the alpha channel, so I experimented and found flattening it did what I wanted.
    Finally I turned off reflections on my images, added the new much smaller jpg to my pages, resized and repositioned the graphics. And now I have something that looks to me just like what I started with only with smaller page sizes.
    So.... The Question ... Does anybody know a simpler way to get this same result? I don't want to do this every time I add a picture to my iWeb built website.

    Chris...
    You are discovering the many workarounds that iWeb forces us to do in order to maintain control over visibility in IE and file sizes! Here is what I generally do when I want to apply image effects like rotation, drop shadows, frames, reflections....and I DON'T want iWeb to convert my small JPG into a big PNG...
    I basically arrange the elements of my page to my liking...say it's a series of 3 images in an arrangement and I apply frames and a reflection to it. If I just publish, iWeb will convert my 3 little jpgs into 3 big(ger) PNGs just because of the effects. Instead, what I do is I take a screenshot of the 3 image group once I am happy with the final arrangement using Apple-shift-4. I run the resulting PNG "Picture 1" through my favorite program "Downsize" in order to convert back to JPG, and the result is a nice small jpg with all the effects that I applied! I then delete the 3 elements in iWeb and drop this one little jpg in and voila! That's it! Sometimes I do this with entire pages and really get fast loading pages that also look good in IE.
    If you have found any of this information to be useful to you, please take the time to provide me with feedback by marking my reply as "solved" or "helpful" using those little buttons that you see in the title bar of this reply. I'd really appreciate it!

Maybe you are looking for

  • Not able to create a new FDM application -11.1.1.4

    Hi I have installed Hyperion FDM on win2008 and oracle 10g. After installation, I configured it to authenticate with shared services. Everything else like Load balance, application server are configured. I can login to FDM web url using the shared se

  • How to create a new page in SRM5.0 and return data

    Hi,Everyone,     I want to create a new page,for example:      when user select a po item,and then we want to create a custom button at po item basic data screen,when user click the custom button,     we want to pop up a new page for our custom logic

  • When I take a picture it is not saved in photo app

    Hello, I just bought a new IP4 and when I take a picture it is not saved in my camera roll folder (which doesn't exsist by the way). Same problem for the videos. I can record one but I cannot have a look at it because it is not saved in the PHOTOS ap

  • Data Streaming error in BPM workspace

    Hi All Developed a BPM Process and ADF form with BPM 11g suite and deployed to Oracle weblogic Server 10.3. while we are fetching the data from DB into ADF form in the same Process we are getting the small amount of data but while fetching the large

  • QT 7 PRO?

    If i get Quick Time 7 Pro, can i convert my movies that i purchase off of iTunes to regular ol' MP4 so i can play it on my Cell Phone and my PSP?