Resolve full qualified type from compiler syntax tree

I'm writting a program to perform some analysis on arbitrary Java source code and I need to be able to resolve types that are imported. This is relatively easy if the type is explicitly imported e.g.
import java.util.List;
List x = null;
then the type of x can be determined to be List.
However if wildcard imports are used e.g.
import java.util.*;
import java.io.*;
List x = nulll;
How can I determine what the type of x actually is? I'm using the java compiler API to parse the source code:
CompilationTask task = compiler.getTask(null, null, null, options, null, files);
JavacTask javacTask = (JavacTask) task;
Iterable<? extends CompilationUnitTree> tree = javacTask.parse();
and then scanning the CompilationUnitTree for items of interest.
I suspect I need to execute the analyze phase of the compiler but I can't see that the output of that phase is immediatly useful.
Thanks
Ian Clough

GardenAway wrote:
So, I suspect something did not get set properly when the existing app was imported from FB4 Beta to FB4 GA.
dp
I had the same null argument problem as you did. Thank you for the insight above. It saved me a load of time.
Here are some more details:
when I moved onto FB4GA from beta 2, the .actionScriptProperties file contained bunch entries like the following
<compiler>
   <modifiedEntries>
     <libraryPathEntry index="4" kind="3" linkType="4" path="${PROJECT_FR
            <crossDomainRsls>
              <crossDomainRslEntry autoExtract="true" policyFileUrl="" rslUrl=
              <crossDomainRslEntry autoExtract="true" policyFileUrl="http://fp
            </crossDomainRsls>
     </libraryPathEntry>
          about 3-4 more entries like the above
   </modifiedEntries>
   <libraryPathEntry kind="1" linkType="1" path="${FLEXUNIT_LIB_LOCATION}/
</compiler>
In eclipse, I went into project properties > Flex Build Path, deleted all the build path libraries/sdks and re-added only the SDK. The .actionScriptProperties file now has all the libraryPathEntries lines replaced with the following
    <libraryPath defaultLinkType="3">
      <libraryPathEntry kind="4" path="">
        <excludedEntries>
          <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
        </excludedEntries>
      </libraryPathEntry>
    </libraryPath>
and the null argument problem went away

Similar Messages

  • Identifying all the types that implements a particular type using roslyn syntax tree.

    I have a method that takes the syntax tree of a .cs file as an argument.This method has to find all the types that inherits or implements a  particular type e.g. finds occurrences of all instances of statements "SqlConn
    c = new SqlConn()" because it implements IDisposable. I am using Roslyn API.

    I had a system recently containing seven sequence files, approx 20 subsequences in each, and around 10-20 steps in each sub-sequence. Every step (except for the NI non-code module types) was an instance of a step type.
    Each one of these steps had an Edit sub-step and a code module called through the code module adapter.
    In order to make these into "wrapped up" step types it was decided to move the code module to a Post-Step substep (as also done in the NI-IVI step types) - so that developers cannot fiddle with the code prototype or module.
    In order to do this I had to open all 7 of the sequence files, make the changes and then ensure that "Apply changes in this dialog to a loaded instances" was checked. This seems to sort of work, but some steps started causing Error 17502 (System Error) when you configure them (call the Edit substep). Over the course of the past few months I have had to effectively check every instance of a type to see if it works (deleting the step and replacing it when it doesnt). Other strange things happened like some of the step type instances now have the "None" (adapter) icon associated with them - but both still work.
    The idea of creating a type-def of a step type is a good one, but frustrating that it doesnt seem to fully work. Why should the sequence file also store a version of the step-type - which is what is effectively causing this problem - why not make it so that if you dont have the step types installed in the type palette - TOUGH! Message Edited by RichM on 03-15-2005 06:55 AM

  • How can i extract  symbol table and Abstract syntax tree of a java compiler

    How can i extract the Abstract Syntax tree and the Symbol Table from the class file of java.I need to have the code for extracting it.
    Can anyone help me in this matter.
    Sreeram

    Everything that it is possible to retrieve from a class file can be deduced from the class file definition.
    http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.html
    Sylvia.

  • A PKGBUILD that helps you compile kernel from local source tree

    I don't know if someone did this beofore. Hours ago I wrote a PKGBUILD file for compiling kernel,
    it is different than the one from abs. It allows you
    compile a kernel from a exiting kernel source tree and leave it clean.
    honor the Archway, this means you have a clean filesystem
    It is acutally because I'm currently playing with The Eudyptula Challenge.
    and I'm tied our compress/decompress a kernel tree all the time. If you are kernel developer, you
    may also find it useful.
    The PKGBUILD file worked on my machine, I will add headers and docs later.
    Oh, almost forgot: here is my PKGBUILD:
    #So we will have a clean src tree
    pkgbase=linux-test
    _kernel_bin=kernel_build
    #the variable you have to provide
    _builddir=kernel_build
    kernel_src_dir='/home/developer/Courses/kernel-base'
    _srcname=kernel_tree
    #end the variable you have to provide
    pkgver=3.8.1
    pkgrel=1
    pkgdesc="The Linux kernel and modules"
    depends=('coreutils' 'linux-firmware' 'kmod' 'mkinitcpio>=0.7')
    makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc')
    optdepends=('crda: to set the correct wireless channels of your country')
    provides=("kernel26${_kernelname}=${pkgver}")
    conflicts=("kernel26${_kernelname}")
    replaces=("kernel26${_kernelname}")
    arch=('i686' 'x86_64')
    url="http://www.kernel.org/"
    license=('GPL2')
    source=(#if we provide this, means kernel compile progress is already done
    "${_kernel_bin}.tar.xz"
    'linux.preset'
    sha256sums=('65847bc847344434657db729d2dde4a408e303ea29ae1409520cecee8da6fc3d'
    '2c2e8428e2281babcaf542e246c2b63dea599abb7ae086fa482081580f108a98')
    #this one strip the linux off
    _kernelname=${pkgbase#linux}
    prepare() {
    #XXX:checked
    #build dir has to be the same as kernel_bin files, then builddir is created
    #automatically by tar
    if [ "${kernel_src_dir}" == "" ];then
    return 1
    fi
    #provide kernel source tree for compile and move modules
    ln -s ${kernel_src_dir} ${srcdir}/${_srcname}
    mkdir -p "${srcdir}/${_srcname}"
    #we need to check here if there exist kernel bin files
    if [ "${_kernel_bin}" == "" ]; then
    make O="${srcdir}/${_builddir}" menuconfig
    fi
    build() {
    #XXX:checked
    cd "${srcdir}/${_srcname}"
    #we need to check here if there exist kernel bin files
    if [ "${_kernel_bin}" == "" ]; then
    #return 1
    make O="${srcdir}/${_builddir}" bzImage modules
    fi
    #otherwise this step is done already done
    _package() {
    #we dont need to worry about mkinitcpio, depmod thing, They are done by
    #install script, we need to provide a preset and install file instead.
    #we build kernel objs on _builddir, and install them in pkgdir
    #install binary files, this means we have a compiled binary tree
    cd "${srcdir}/${_srcname}"
    #echo "$(pwd)"
    KARCH=x86
    install=linux.install
    # get kernel version
    _kernver="$(make O="${srcdir}/${_builddir}" kernelrelease)"
    _kernver=$(echo "${_kernver}" | sed -n 2p -)
    #strip the -dirty away
    _kernver=${_kernver%-*}
    _basekernel=${_kernver%%-*}
    _basekernel=${_basekernel%.*}
    mkdir -p "${pkgdir}"/{lib/modules,lib/firmware,boot}
    make O="${srcdir}/${_builddir}" INSTALL_MOD_PATH="${pkgdir}" modules_install
    cp "${srcdir}/${_builddir}"/arch/$KARCH/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgbase}"
    # set correct depmod command for install
    cp -f "${startdir}/${install}" "${startdir}/${install}.pkg"
    true && install=${install}.pkg
    sed -e "s/KERNEL_NAME=.*/KERNEL_NAME=${_kernelname}/" -i "${startdir}/${install}"
    sed "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/" -i "${startdir}/${install}"
    # install mkinitcpio preset file for kernel
    install -D -m644 "${srcdir}/linux.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
    sed \
    -e "1s|'linux.*'|'${pkgbase}'|" \
    -e "s|ALL_kver=.*|ALL_kver=\"/boot/vmlinuz-${pkgbase}\"|" \
    -e "s|default_image=.*|default_image=\"/boot/initramfs-${pkgbase}.img\"|" \
    -i "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
    # remove build and source links
    rm -f "${pkgdir}"/lib/modules/${_kernver}/{source,build}
    # remove the firmware
    rm -rf "${pkgdir}/lib/firmware"
    # gzip -9 all modules to save 100MB of space
    find "${pkgdir}" -name '*.ko' -exec gzip -9 {} \;
    # make room for external modules
    ln -s "../extramodules-${_basekernel}${_kernelname:--ARCH}" "${pkgdir}/lib/modules/${_kernver}/extramodules"
    # add real version for building modules and running depmod from post_install/upgrade
    mkdir -p "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:--ARCH}"
    echo "${_kernver}" > "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:--ARCH}/version"
    # Now we call depmod...
    #echo "Call Depmod"
    cp "${srcdir}/${_builddir}/System.map" System.map
    depmod -b "${pkgdir}" -F System.map "${_kernver}"
    #echo "Called Depmod"
    # move module tree /lib -> /usr/lib
    mkdir -p "${pkgdir}/usr"
    mv "${pkgdir}/lib" "${pkgdir}/usr/"
    # add vmlinux
    install -D -m644 "${srcdir}/${_builddir}/"vmlinux "${pkgdir}/usr/lib/modules/${_kernver}/build/vmlinux"
    pkgname=("${pkgbase}")
    for _p in ${pkgname[@]}; do
    eval "package_${_p}() {
    _package${_p#${pkgbase}}
    done
    and here is the address of it on github
    Last edited by xedchou (2014-12-23 12:41:55)

    Based on the title alone I almost reflexively binned this thread.  Please rename this thread to *something* relating to what you're actually posting.

  • OracleDriver cannot be resolved to a type

    Hi all..
    Iam new to this forum...Actually i have a problem.please help me..
    Now iam working with tomcat6.0.16 and oracle10g.
    <%@page import="java.sql.*" %>
    <%
    //Register the drivers
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    //Establish connection with the database
    Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","system","manager");
    //create a sql statement
    Statement st=con.createStatement();
    //execute the statement
    ResultSet rs=st.executeQuery("select * from emptab");
    //all rows of emptab are in rs.Now retrive column data
    //from rs and display
    while(rs.next())
    out.println(rs.getInt(1));
    out.println(rs.getString(2));
    out.println(rs.getFloat(3));
    out.println("................");
    //close the connection
    con.close();
    %>
    this is my program...then iam getting following error.please any one can help me?
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSP:
    An error occurred at line: 4 in the jsp file: /oradata.jsp
    oracle.jdbc.driver.OracleDriver cannot be resolved to a type
    1: <%@page import="java.sql.*" %>
    2: <%
    3: //Register the drivers
    4: DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    5: //Establish connection with the database
    6: Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","system","manager");
    7: //create a sql statement
    Stacktrace:
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
         org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:423)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:316)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:294)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:281)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    note The full stack trace of the root cause is available in the Apache Tomcat/6.0.16 logs.
    Apache Tomcat/6.0.16

    You need to have Oracles JDBC driver available to your web application.
    That means the driver (commonly called ojdbc14.jar) should be in either the WEB-INF/lib directory of your web application, or in the [TOMCAT]/lib directory.
    However it is generally accepted that Database connections from JSP pages are a bad idea.
    Put this logic in java code/beans.
    Even better, set up a [JNDI Datasource in Tomcat|http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html] that your web application can access. That way your code can be database independant.
    Cheers,
    evnafets

  • [svn] 1150: More direct syntax tree generation work-in-progress.

    Revision: 1150
    Author: [email protected]
    Date: 2008-04-08 14:56:01 -0700 (Tue, 08 Apr 2008)
    Log Message:
    More direct syntax tree generation work-in-progress. FlexStore now
    compiles and runs with -generate-abstract-syntax-tree set to true, but
    we still parse AS in a few places, like data bindings and styles,
    where it isn't always necessary. The unnecessary cases will be
    removed in the future to maximize performance.
    Asserts have been added to the places that will need an implementation
    before the full compiler test suite will pass.
    checkintests Passed: YES
    Needs QA: Not yet
    Needs DOC: NO
    API Change: NO
    Code-level description of changes:
    compiler/as3/AbstractSyntaxTreeUtil.java
    Added generateAssignment(), generateIdentifier(),
    generateMetaData(), generateParameter(), generateTypeExpression(),
    generateVariable(), generateVariableNew(), and parse().
    Combined generateConstructorDefinition() and
    generateConstructorCommon() into generateConstructor().
    compiler/as3/binding/DataBindingExtension.java
    Modified generateClassDefinition() to call
    nodeFactory.StartClassDefs() to fix a downstream FlowAnalyzer null
    pointer exception.
    Removed generateParameter(), which was added to AbstractSyntaxTreeUtil.
    compiler/mxml/builder/AbstractDocumentBuilder.java
    Modified analyze(BindingNode) to call setFromBindingNode().
    compiler/mxml/rep/Model.java
    Added getSubInitializerIterator().
    compiler/mxml/rep/AtResource.java
    Added getValueExpression().
    compiler/mxml/rep/MxmlDocument.java
    Made getTopLevelInitializerIterator() public and added some
    additional generics usage.
    compiler/mxml/rep/Array.java
    Added getSubInitializerIterator() and some additional generics
    usage.
    compiler/mxml/rep/init/EffectInitializer.java
    Added generateAssignExpr().
    compiler/mxml/rep/init/ValueInitializer.java
    Added generateValueExpr(), generateInlineRValue(),
    generateDefinitionBody(), generateDefinitions(), and AST versions
    of addAssignExprs(), formatExpr(), asArrayLiteral(),
    asObjectLiteral(), asXmlLiteral(), and asXMLList().
    compiler/mxml/rep/init/Initializer.java
    Added generateValueExpr(), generateAssignExpr(), and
    generateDefinitions().
    compiler/mxml/rep/init/StyleInitializer.java
    Added generateAssignExpr().
    compiler/mxml/rep/init/EventInitializer.java
    Added generateValueExpr(), generateAssignExpr(),
    generateDefinitionBody(), and generateDefinitions().
    compiler/mxml/rep/init/NamedInitializer.java
    Added generateAssignExpr().
    compiler/mxml/rep/init/VisualChildInitializer.java
    Added generateAssignExpr().
    compiler/mxml/rep/init/ArrayElementInitializer.java
    Added generateAssignExpr().
    compiler/mxml/rep/decl/InitializedPropertyDeclaration.java
    Added generateAssignExpr().
    compiler/mxml/rep/MovieClip.java
    Added getSubInitializerIterator().
    compiler/mxml/rep/BindingExpression.java
    Added isFromBindingNode variable and accessors.
    Created ensureHighestLevelModelDeclared() from common code.
    Added generateDestinationAssignment(),
    generateDestinationSetStyle(), and generateDestinationPathRoot().
    compiler/mxml/ImplementationCompiler.java
    Added short circuit to parse1() for the generate AST case.
    compiler/mxml/gen/ClassDefLib.vm
    Removed unnecessary variable declaration.
    compiler/mxml/ImplementationGenerator.java
    Added a truck load of new methods and implemented numerous
    previously stubbed out methods.
    Modified Paths:
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/AbstractSyntaxTreeUtil.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/binding/DataBindingExtension. java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/ImplementationCompiler.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/ImplementationGenerator.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/builder/AbstractDocumentBuil der.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/gen/ClassDefLib.vm
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/Array.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/AtResource.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/BindingExpression.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/Model.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/MovieClip.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/MxmlDocument.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/decl/InitializedProperty Declaration.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/init/ArrayElementInitial izer.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/init/EffectInitializer.j ava
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/init/EventInitializer.ja va
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/init/Initializer.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/init/NamedInitializer.ja va
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/init/StyleInitializer.ja va
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/init/ValueInitializer.ja va
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/init/VisualChildInitiali zer.java

    Hi,
    I'm unsure how long this post will be on the forums, but here it goes.
    Yes, customizing ADF in any way requires a lot of time.
    ADF is build with the concept of less coding and more drag and drop. The framework tailored specifically to this requirement.
    This means that if you use ADF, you must be willing to change business requirements if ADF does not easily allow you to implement them.
    This is of course true for almost any Framework, but for ADF it is really extreme.
    I need to go back to the business a lot when working with ADF, explaining that if we change this requirement development is a lot easier and that sometimes I'm even unsure if I can make it work in ADF.
    But that said, most of the screen WILL work with basic drag and drop and minimal backing beans, ADF is worth it then.
    If people try to convince you, you do not need to code at all with ADF, just ignore them.
    They have never work on a real commercial project with real customers, simple as that.
    On your question, I believe I did something similar in ADF 10.1.3, but I cannot find the code atm.
    But yes, use the native Trinidad components, forget about the bindings for now, bindings will only make your time a lot harder.
    Work with the underlying app module and the view objects directly.
    There is no reason this should not work, but yes you will bypass the binding layer.
    When I have to customize something, I start by checking if the ADF components allow me todo something declarative, this is hardly ever the case.
    I changed to backing beans really fast, then I try to use the bindings, but I never spend much time on this and go directly to the underlying app module.
    -Anton

  • [svn] 1063: ImplementationCompiler abstract syntax tree generation

    Revision: 1063
    Author: [email protected]
    Date: 2008-04-02 08:31:38 -0700 (Wed, 02 Apr 2008)
    Log Message:
    ImplementationCompiler abstract syntax tree generation
    work-in-progress. Most of the methods for the equivalent Velocity
    macros in ClassDef.vm and ClassDefLib.vm are stubbed out in
    ImplementationGenerator. Note, with -generate-abstract-syntax-tree
    set to true, mxml compilation is mostly broken. The current default
    is false.
    checkintests Passed: YES
    Needs QA: Not yet
    Needs DOC: NO
    API Change: NO
    Code-level description of changes:
    swfutils/src/java/flash/swf/tools/SyntaxTreeDumper.java
    Added evaluate() for BlockNode, CommentNode, TypeIdentifierNode,
    and UsePragmaNode.
    Modified evaluate() for CallExpressionNode, GetExpressionNode,
    SetExpressionNode, and FunctionSignatureNode to include more info.
    compiler/src/java/flex2/compiler/as3/AbstractSyntaxTreeUtil.java
    Initial checkin.
    compiler/src/java/flex2/compiler/as3/binding/DataBindingExtension.java
    Moved numerous common methods to AbstractSyntaxTreeUtil.
    compiler/src/java/flex2/compiler/mxml/rep/Model.java
    Made getEffects() public.
    compiler/src/java/flex2/compiler/mxml/rep/MxmlDocument.java
    Added generics to getDeclarationIterator(), getImports(),
    getScripts(), and getMetadata().
    Added getInterfaceNames().
    compiler/src/java/flex2/compiler/mxml/rep/DocumentInfo.java
    Changed return type of getImportNames() from Collection to Set.
    compiler/src/java/flex2/compiler/mxml/ImplementationCompiler.java
    Modified parse1() to call generateImplementationAST() if
    getGenerateAbstractSyntaxTree() is true. Otherwise,
    generateImplementation() is called.
    compiler/src/java/flex2/compiler/mxml/ImplementationGenerator.java
    Initial checkin.
    Modified Paths:
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/binding/DataBindingExtension. java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/ImplementationCompiler.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/DocumentInfo.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/Model.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/MxmlDocument.java
    flex/sdk/trunk/modules/swfutils/src/java/flash/swf/tools/SyntaxTreeDumper.java
    Added Paths:
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/AbstractSyntaxTreeUtil.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/ImplementationGenerator.java

    Hi Florian,
    you can use the resource / EMF API directly in a plain (non-interactive)
    environment.
    If you want to enrich your model you should investigate using imported
    metamodels and derived properties for the derivable information.
    However, the Linker#afterModelLinked is usually a good place to enhance
    the model.
    Regards,
    Sebastian
    Need professional support for Eclipse Modeling?
    Go visit: http://xtext.itemis.com
    Am 29.11.10 19:39, schrieb Florian Gessner:
    > Hi Sebastian,
    >
    > thanks for your fast reply.
    > The example described in the blog uses the IDocumentEditor to manipulate
    > the data. I do not want to implement this in the UI layer but in the
    > backend.
    > I think EMF should would independent from this, but for me it is not
    > clear how I can integrate this into the backend. I think it would be a
    > bit strange if I would enrich the model by some logic during validation
    > or linking. Or is this how it works?
    >
    > Thanks and best regards
    > Florian

  • My class cannot be resolved to a type

    I just installed jstl and I am trying to get it work using this test code. The class Customer is in WEB-INF/classes, an ArrayList of Customer objects is stored in the session in the attribute "results". Any ideas why this is failing?
    <base href="<%= request.getScheme() +"://" + request.getServerName() + (request.getServerPort() != 80 ? ":" + request.getServerPort() : "") + request.getRequestURI() %> "/>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%@ page import="java.util.Collection,
                     java.util.ArrayList"%>
    <%@ taglib prefix="h" tagdir="/WEB-INF/tags" %>
    <jsp:useBean id="customer" class="Customer" />
    <jsp:useBean id="results" scope="session" class="java.util.ArrayList" />
    <table>
    <c:forEach items="${customer.results}" var="item">
    <tr>
         <td><c:out value="${item.id}"/></td>
         <td><c:out value="${item.name}"/></td>
    </tr>
    </c:forEach>
    </table>Here is the error I'm getting:
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 8 in the jsp file: /listCustomers.jsp
    Generated servlet error:
    Customer cannot be resolved to a type
    An error occurred at line: 8 in the jsp file: /listCustomers.jsp
    Generated servlet error:
    Customer cannot be resolved to a type
    An error occurred at line: 8 in the jsp file: /listCustomers.jsp
    Generated servlet error:
    Customer cannot be resolved to a type
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         Search.doPost(Search.java:95)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 8 in the jsp file: /listCustomers.jsp
    Generated servlet error:
    Customer cannot be resolved to a type
    An error occurred at line: 8 in the jsp file: /listCustomers.jsp
    Generated servlet error:
    Customer cannot be resolved to a type
    An error occurred at line: 8 in the jsp file: /listCustomers.jsp
    Generated servlet error:
    Customer cannot be resolved to a type
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
         org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:413)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:297)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:303)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         Search.doPost(Search.java:95)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.16 logs.

    I added this line to my class:
    package storePackage;and put the compiled class in: WEB-INF/classes/storePackage/
    Then I changed my jsp to:
    <base href="<%= request.getScheme() +"://" + request.getServerName() + (request.getServerPort() != 80 ? ":" + request.getServerPort() : "") + request.getRequestURI() %> "/>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%@ page import="java.util.Collection,
                     java.util.ArrayList"%>
    <%@ taglib prefix="h" tagdir="/WEB-INF/tags" %>
    <c:set var="customer" value="<%= new Customer() %>"/>
    <jsp:useBean id="customer" class="com.storePackage.Customer" />
    <jsp:useBean id="results" scope="session" class="java.util.ArrayList" />
    <table>
    <c:forEach items="${customer.results}" var="item">
    <tr>
         <td><c :o ut value="${item.id}"/></td>
         <td><c :o ut value="${item.name}"/></td>
    </tr>
    </c:forEach>
    </table>Now I'm getting this:
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: /listCustomers.jsp(9,0) The value for the useBean class attribute com.CustomerPackage.Customer is invalid.
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         Search.doPost(Search.java:95)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    org.apache.jasper.JasperException: /listCustomers.jsp(9,0) The value for the useBean class attribute com.CustomerPackage.Customer is invalid.
         org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
         org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:405)
         org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:146)
         org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1174)
         org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1116)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
         org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
         org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
         org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
         org.apache.jasper.compiler.Generator.generate(Generator.java:3304)
         org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:198)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:303)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         Search.doPost(Search.java:95)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.16 logs.

  • Getting error message Cannot Resolve Symbol when trying to compile a class

    Hello All -
    I am getting an error message cannot resolve symbol while trying to compile a java class that calls another java class in the same package. The called class compiles fine, but the calling class generates
    the following error message:
    D:\Apache Tomcat 4.0\webapps\examples\WEB-INF\classes\cal>javac
    ConnectionPool.java
    ConnectionPool.java:158: cannot resolve symbol
    symbol : class PooledConnection
    location: class cal.ConnectionPool
    private void addConnection(PooledConnection value) {
    ^
    ConnectionPool.java:144: cannot resolve symbol
    symbol : class PooledConnection
    location: class cal.ConnectionPool
    PooledConnection pcon = new PooledConnection(con);
    ^
    ConnectionPool.java:144: cannot resolve symbol
    symbol : class PooledConnection
    location: class cal.ConnectionPool
    PooledConnection pcon = new PooledConnection(con);
    The code is listed as follows for PooledConnection.java (it compiles fine)
    package cal;
    import java.sql.*;
    public class PooledConnection {
    // Real JDBC Connection
    private Connection connection = null;
    // boolean flag used to determine if connection is in use
    private boolean inuse = false;
    // Constructor that takes the passed in JDBC Connection
    // and stores it in the connection attribute.
    public PooledConnection(Connection value) {
    if ( value != null ) {
    connection = value;
    // Returns a reference to the JDBC Connection
    public Connection getConnection() {
    // get the JDBC Connection
    return connection;
    // Set the status of the PooledConnection.
    public void setInUse(boolean value) {
    inuse = value;
    // Returns the current status of the PooledConnection.
    public boolean inUse() {
    return inuse;
    // Close the real JDBC Connection
    public void close() {
    try {
    connection.close();
    catch (SQLException sqle) {
    System.err.println(sqle.getMessage());
    Now the code for ConnectionPool.java class that gives the cannot
    resolve symbol error
    package cal;
    import java.sql.*;
    import java.util.*;
    public class ConnectionPool {
    // JDBC Driver Name
    private String driver = null;
    // URL of database
    private String url = null;
    // Initial number of connections.
    private int size = 0;
    // Username
    private String username = new String("");
    // Password
    private String password = new String("");
    // Vector of JDBC Connections
    private Vector pool = null;
    public ConnectionPool() {
    // Set the value of the JDBC Driver
    public void setDriver(String value) {
    if ( value != null ) {
    driver = value;
    // Get the value of the JDBC Driver
    public String getDriver() {
    return driver;
    // Set the URL Pointing to the Datasource
    public void setURL(String value ) {
    if ( value != null ) {
    url = value;
    // Get the URL Pointing to the Datasource
    public String getURL() {
    return url;
    // Set the initial number of connections
    public void setSize(int value) {
    if ( value > 1 ) {
    size = value;
    // Get the initial number of connections
    public int getSize() {
    return size;
    // Set the username
    public void setUsername(String value) {
    if ( value != null ) {
    username = value;
    // Get the username
    public String getUserName() {
    return username;
    // Set the password
    public void setPassword(String value) {
    if ( value != null ) {
    password = value;
    // Get the password
    public String getPassword() {
    return password;
    // Creates and returns a connection
    private Connection createConnection() throws Exception {
    Connection con = null;
    // Create a Connection
    con = DriverManager.getConnection(url,
    username, password);
    return con;
    // Initialize the pool
    public synchronized void initializePool() throws Exception {
    // Check our initial values
    if ( driver == null ) {
    throw new Exception("No Driver Name Specified!");
    if ( url == null ) {
    throw new Exception("No URL Specified!");
    if ( size < 1 ) {
    throw new Exception("Pool size is less than 1!");
    // Create the Connections
    try {
    // Load the Driver class file
    Class.forName(driver);
    // Create Connections based on the size member
    for ( int x = 0; x < size; x++ ) {
    Connection con = createConnection();
    if ( con != null ) {
    // Create a PooledConnection to encapsulate the
    // real JDBC Connection
    PooledConnection pcon = new PooledConnection(con);
    // Add the Connection to the pool.
    addConnection(pcon);
    catch (Exception e) {
    System.err.println(e.getMessage());
    throw new Exception(e.getMessage());
    // Adds the PooledConnection to the pool
    private void addConnection(PooledConnection value) {
    // If the pool is null, create a new vector
    // with the initial size of "size"
    if ( pool == null ) {
    pool = new Vector(size);
    // Add the PooledConnection Object to the vector
    pool.addElement(value);
    public synchronized void releaseConnection(Connection con) {
    // find the PooledConnection Object
    for ( int x = 0; x < pool.size(); x++ ) {
    PooledConnection pcon =
    (PooledConnection)pool.elementAt(x);
    // Check for correct Connection
    if ( pcon.getConnection() == con ) {
    System.err.println("Releasing Connection " + x);
    // Set its inuse attribute to false, which
    // releases it for use
    pcon.setInUse(false);
    break;
    // Find an available connection
    public synchronized Connection getConnection()
    throws Exception {
    PooledConnection pcon = null;
    // find a connection not in use
    for ( int x = 0; x < pool.size(); x++ ) {
    pcon = (PooledConnection)pool.elementAt(x);
    // Check to see if the Connection is in use
    if ( pcon.inUse() == false ) {
    // Mark it as in use
    pcon.setInUse(true);
    // return the JDBC Connection stored in the
    // PooledConnection object
    return pcon.getConnection();
    // Could not find a free connection,
    // create and add a new one
    try {
    // Create a new JDBC Connection
    Connection con = createConnection();
    // Create a new PooledConnection, passing it the JDBC
    // Connection
    pcon = new PooledConnection(con);
    // Mark the connection as in use
    pcon.setInUse(true);
    // Add the new PooledConnection object to the pool
    pool.addElement(pcon);
    catch (Exception e) {
    System.err.println(e.getMessage());
    throw new Exception(e.getMessage());
    // return the new Connection
    return pcon.getConnection();
    // When shutting down the pool, you need to first empty it.
    public synchronized void emptyPool() {
    // Iterate over the entire pool closing the
    // JDBC Connections.
    for ( int x = 0; x < pool.size(); x++ ) {
    System.err.println("Closing JDBC Connection " + x);
    PooledConnection pcon =
    (PooledConnection)pool.elementAt(x);
    // If the PooledConnection is not in use, close it
    if ( pcon.inUse() == false ) {
    pcon.close();
    else {
    // If it is still in use, sleep for 30 seconds and
    // force close.
    try {
    java.lang.Thread.sleep(30000);
    pcon.close();
    catch (InterruptedException ie) {
    System.err.println(ie.getMessage());
    I am using Sun JDK Version 1.3.0_02" and Apache/Tomcat 4.0. Both the calling and the called class are in the same directory.
    Any help would be greatly appreciated.
    tnx..
    addi

    Is ConnectionPool in this "cal" package as well as PooledConnection? From the directory you are compiling from it appears that it is. If it is, then you are compiling it incorrectly. To compile ConnectionPool (and PooledConnection similarly), you must change the current directory to the one that contains cal and type
    javac cal/ConnectionPool.

  • Can't use classes in own package ... cannot be resolved into a type

    I am fairly new to java and I am having the following problem.
    i have a folder structure that goes as follows:
    cs/uwm/client/io
    and in this directory I have 3 files: ConsoleReader.java ConsoleWriter.java and ConsoleManager.java
    and at the top of all three I have the following:
    package cs.uwm.client.io;
    ConsoleReader and ConsoleWriter are compiling fine
    However in ConsoleManager I am using these classes ConsoleReader/Writer and It compile fine for me on a windows JDK in cywin, but when I try this on a Fedore6 system with an Eclipe Java Compiler v_686_R32x, 3.2.2 release I have the following error:
    ConsoleWriter cannot be resolved into a type
    when I try the following line: ConsoleReader reader = new ConsoleReader( System.in );
    I tried importing cs.uwm.client.io but that didnt' work. I couldn't find anything on the forums here if you are trying to use a class defined in your package inside your package the way I am.
    Any help would be great!

    So it compiles from a commandline invocation of Java, but not from within Eclipse?
    Sounds like you need to ask the question at an Eclipse site, since the problem is not a Java problem - and this forum is for Java language questions, not IDE support questions.
    Probably caused by the fact that Eclipse doesn't use Sun's Java compiler.

  • Re: OracleDriver cannot be resolved to a type

    I still have the same problem which was reported in the first post.
    I tried all the changes mentioned above but doesn't help as I am totally new to jsp please suggest me a way out in detail.
    An error occurred at line: 6 in the jsp file: /one.jsp
    oracle.jdbc.driver.OracleDriver cannot be resolved to a type
      <%
      try{  
      DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
      Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@10.145.2.142:1521:MESNEW","MESAPUSER", "mesdev");
      String query1="Select OWNER,TABLE_NAME FROM ALL_TAB_PRIVS_MADE ";
    Stacktrace:
      org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:103)
      org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:366)
      org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:468)
      org.apache.jasper.compiler.Compiler.compile(Compiler.java:378)
      org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
      org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
      org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    Thanking you in advance.

    1) you don't want to do that in a JSP
    2) did you actually add the correct jars to the classpath of your web application? Because if you did, you'd not get this error.
    That means adding it to the proper location in your WAR file, as you should have learned when you studied tutorials and books about web application development.

  • Eclipse "cannot be resolved to a type" and new .JAR lib - config prob?

    I'm trying to make use of the Commons HttpClient library in a project being built in Eclipse (3.1). I have a sample program (PostXML) that runs into "cannot be resolved to a type" on the "HttpClient" object. I think the problem is that the JRE 1.4.2 (Mac OS-X) system library includes an earlier release (3.0.1) of the HttpClient, but some of the classes used by PostXML are in the 3.1rc of HttpClient. I've downloaded the newer release, created a user library, and modified the load order so I can see the user library above (i.e. loaded prior to?) the System JRE in the package browser. I can see the HttpClient.class in the Package browser. I have "import org.apache.commons.httpclient.methods.*;" in the head of the application (that took tweaking). Several of the HttpClient methods resolve correctly, but not the HttpClient object constructor itself. I am also finding I cannot simply import all the HttpClient methods, but must import each explicitly (?). Suggestions?

    I have gotten the sample code to compile and run,
    though I still have some confusion about needing the
    explicit imports (as compared to a wildcard import).
    In the end I believe my "cannot be resolved to a
    type" error was due to dependencies within the
    HttpClient library on the commons-codec library. Once
    I downloaded and installed that, the samples started
    working better. Still trying to understand the API,
    but making progress.when downloading third-party libraries, check the download page to see if it has any further dependencies. apache libraries are notoriously dependent on other apache libraries
    regarding the imports, it's not that there's a need for explicit imports, it's more that wildcard imports are a bad idea. explicit imports gives other people looking at your code a first clue as to what it does, and it also can serve as an indicator that your class is too big, if there are lots of imports. wildcards hide this from you. apart from that, it makes no difference to your code, and imports don't even exist at runtime so it affects how your code actually runs, not at all

  • MyClass cannot be resolved to a type

    am looking to call a java class from within a servlet but am having this error on compilation: "MyClass" cannot be resolved to a type.
    my code look like follows showing the file path where am using eclipse :
    <eclipse>/workspace/MyApp/src/pal/MyClass.java
    package pal;
    public class MyClass
        public MyClass()
    }<eclipse>/workspace/MyApp/src/pal/MyServlet.java
    package pal;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class MyServlet extends HttpServlet
         public void doGet(HttpServletRequest request, HttpServletResponse response)
         throws IOException, ServletException
              new MyClass();
    }what did i miss?

    Personally I dislike Netbeans, I found it to be ugly, non-intuitive and buggy. I already threw it away from my system after only 5 mins of testing. It's only good for ones who are really, really new to Java and by a coincidence got Netbeans in the JDK pack, and/or followed the Sun tutorials wherein Netbeans is pushed up, and/or still know nothing about the existence of other IDE's and what they all provides.

  • Loading a class via reflection without knowing the full qualified path ?

    Hi there
    I d like to load a class via reflection and call the constructor of the class object. My problem is that I dont know the full qulified name e.g. org.xyz.Classname bur only the Classname.
    I tried different things but none seem to work:
         1. Class c = Class.forName("Classname");  //does not suffice, full qualified name required
    2. ClassLoader classloader = java.lang.ClassLoader.getSystemClassLoader();
             try {
               Class cl = classloader.loadClass(stripFileType(Filename));//if i do not pass the full qualified name i get a ClassNotFoundException
    3. I tried to consruct a class object with my own classloader , calling:
              Class cl = super.defineClass(null, b, 0, b.length );     b is of type byte[]This almost works. I get a class Object without knowing the full qulified path. I can transform a filename into a raw array of bytes and I get the class out of it. But there is still a problem: If there are more than on classes defined in the same textfile I get an InvocationTargetException.
    It looks like this:
    package org.eml.adaptiveUI.demo;
    import com.borland.jbcl.layout.*;
    import java.awt.*;
    import org.eml.adaptiveUI.layout.*;
    import javax.swing.*;
    import java.awt.event.*;
    * <p>Title: </p>
    * <p>Description: </p>
    * <p>Copyright: Copyright (c) 2003</p>
    * <p>Company: </p>
    * @author not attributable
    * @version 1.0
    public class twoButtons extends JFrame {
      SPanel sPanel1 = new SPanel();
      JButton jButton1 = new JButton();
      GridBagLayout gridBagLayout1 = new GridBagLayout();
      GridBagLayout gridBagLayout2 = new GridBagLayout();
      public twoButtons() throws HeadlessException {
        try {
          jbInit();
        catch(Exception e) {
          e.printStackTrace();
      public static void main(String args[]){
        twoButtons twob = new twoButtons();
        twob.pack();
        twob.show();
      private void jbInit() throws Exception {
        this.getContentPane().setLayout(gridBagLayout1);
        jButton1.setText("button 1");
        jButton1.addActionListener(new TransformationDemo_jButton1_actionAdapter(this));
        this.getContentPane().add(sPanel1,  new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0
                ,GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(57, 52, 94, 108), 35, 44));
        sPanel1.add(jButton1,  new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0
                ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(5, 41, 0, 0), 0, 0));
      void jButton1_actionPerformed(ActionEvent e) {
        System.out.println("button 1 source: " + e.getSource());
        System.out.println("d: " + e.getID());
       System.out.println("/n commmand: " + e.getActionCommand());
    class TransformationDemo_jButton1_actionAdapter implements java.awt.event.ActionListener {
      twoButtons adaptee;
      TransformationDemo_jButton1_actionAdapter(twoButtons adaptee) {
        this.adaptee = adaptee;
      public void actionPerformed(ActionEvent e) {
        adaptee.jButton1_actionPerformed(e);
    }As you can see there is the class TransformationDemo_jButton1_actionAdapter class defined in the same classfile. The problem is now that the twoButtons constructor calls the TransfomationDemo_jButton1_actionAdapter constructor and this leads to InvocationTargetException. I dont know if this is a java bug because it should be possible.
    Can you help me?

    hi thanks at first,
    the thing you mentioned could be a problem, but I dont think it is.
    If I have the full qualified name (which I havent) then everything goes normal. I only have to load the "twoButtons" class and not the other (actionadapter class), so I dont think this is the point. In this case the twoButtons constructor constructs an object of the actionadapter class and everything goes well. The bad thing is though that I do not have the full qulified name :(
    Invocation target exception tells me (in own words): Tried to acces the constructor of the actionadapter class (which is not public) out of class reflectionTest class .
    reflectionTest is the class where the reflection stuff happens and the twoButttons class is defineClass() ed.
    The problem is, only twoButtons class has the rights to call methods from the actionadapter class, the reflection class does not. BUT: I do not call the actionadapter methods from the reflection class. I call them only from the twoButtons class.
    I hope somebody understands my problem :)

  • GEF4 Setup Error - FXCanvas cannot be resolved to a type

    Hallo,
    I tried to setup the development environment for GEF4, as specified in the GEF Contributor guide, and I found the following error:
    FXCanvas cannot be resolved to a type.
    (se attached file)
    This error is persistent, and it seems i am not able to find a solution despite I tried multiple times to setup the environment, as specified in the GEF/GEF4 contributor guide .
    This is the list of steps I followed for the setup
    Check Java 8 (oracle) is installed, that is required by the e(fx)clipse plugin.
    Download Eclipse IDE for Eclipse Committers. In my case: eclipse-committers-mars-R-win32.zip
    Install plugins needed by GEF4, in my case:
    e(fx)clipse - IDE, from http://download.eclipse.org/efxclipse/simrel-contrib/mars/m7/tools/site
    e(fx)clipse - IDE - PDE, from http://download.eclipse.org/efxclipse/simrel-contrib/mars/m7/tools/site
    API Tools Execution Environment Descriptions, from: http://download.eclipse.org/eclipse/updates/4.5-I-builds
    Oomph Version Management, from: http://download.eclipse.org/releases/mars'
    Maven Integration for Eclipse (includes Incubating components), from: http://download.eclipse.org/releases/mars
    Clone the GEF4 Git repository and import the projects in the workspace
    Set MARS.target: from org.eclipse.gef4.target project, double click the target definition, wait for the target is fully resolved, and click on "set as target platform".
    Adjust preferences. select Menu > Window > Preferences:
    Java > Compiler > Errors/Warnings: ignore the "Deprecated and restricted API"
    Plug-in Development > Compilers: Ignore the "References to discouraged classes"
    At the end of the setup, I can not compile the GEF4 project, because "FXCanvas cannot be resolved to a type. "
    See image.
    Does anyone has an idea on how to fix this ?
    Kind Regards.
    Patrik

    I updated the respective section of the contributor guide to make it even more explicit, why the "Specify Execution Environment for J2SE-1.7 (and optionally J2SE-1.8)" is important. I also saw that the guide still listed the e(fx)clipse 2.0.0 Mars M7 contribution. I updated it to refer to the e(fx)clipse 2.0.0 Mars release. You might want to update your IDE accordingly.

Maybe you are looking for

  • How to make audio track respond to timeline

    I'm starting a project and need the ability to control the speed of an audio file playback using the timeline. There are specific events that happen at certain times in the song, and i need the ability to scrub forward and backward on the timeline, i

  • Connecting to Airport Express as speaker?

    Trying to connect to airport express with my new MacBook Air and iTunes. I just do not seem to be able to din the right way to do this. Also, I used to see a choice of speakers on my old machines in the lower right corner of the iTunes window while p

  • How to make two variable always the same in flex?

    private var nsPlay : NetStream = main.media.nsPlay; When nsPlay changes,main.media.nsPlay should change accordingly;vice versa. How to achieve that?

  • Since I´ve upgraded iTunes it´s not working

    I´m using iTunes with windows 7 Starter. Just upgraded last version fo iTunes and it won´t start. What if I delete the program and download it again? will I loose my music? or what should I do?

  • Keeping data in server compact database AFTER deployment

    Hey! I have a small problem regarding SQL Server Compact and Visual Studio 2010: My application uses a database, the purpose is to manage article stocks. My problem now is that I have an existing excel sheet with articles, which I want to put into th