Exception in Tag Classes

          Hi,
          I am trying to use custom tag libraries with WebLogic. Whenever I use some custom tag in some JSP page, an exception occurs in the tag class code. Following is a portion of stack trace.
          Thu Sep 21 12:58:04 GMT+08:00 2000:<E> <WebAppServletContext-ebanking> Root cause of ServletException
          javax.servlet.ServletException: runtime failure in custom tag 'text'
               at jsp_servlet._webpages._login._jspService(_login.java,
          Compiled Code)
               at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
               at
          weblogic.servlet.internal.ServletStubImpl.invokeServlet
          (ServletStubImpl.java:124)
          For some tags the exception is ClassCastException.
          Is there any special configuration reqired for using tag libraries? Please help.
          Thanks
          Amir
          

You need to look at the class cast issues that have been discussed in the
          weblogic servlet newsgroup. Chances are that you are storing a value in the
          session or request object and getting it back out in the custom tag, right?
          Cameron Purdy
          [email protected]
          http://www.tangosol.com
          WebLogic Consulting Available
          "Amir" <[email protected]> wrote in message
          news:39c9b0df$[email protected]..
          >
          > Hi,
          >
          > I am trying to use custom tag libraries with WebLogic. Whenever I use some
          custom tag in some JSP page, an exception occurs in the tag class code.
          Following is a portion of stack trace.
          >
          > Thu Sep 21 12:58:04 GMT+08:00 2000:<E> <WebAppServletContext-ebanking>
          Root cause of ServletException
          > javax.servlet.ServletException: runtime failure in custom tag 'text'
          > at jsp_servlet._webpages._login._jspService(_login.java,
          > Compiled Code)
          > at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
          > at
          > weblogic.servlet.internal.ServletStubImpl.invokeServlet
          > (ServletStubImpl.java:124)
          >
          >
          > For some tags the exception is ClassCastException.
          >
          > Is there any special configuration reqired for using tag libraries? Please
          help.
          >
          > Thanks
          > Amir
          >
          

Similar Messages

  • Problem with JSP Tag class

    Hi,
              After some time of work, WLS ends up with the following error message:
              weblogic.servlet.jsp.JspException: (line -1): Error in tag library at:
              'cm': There is no setter method for property 'limit', for Tag
              class 'com.hp.module.cm.tag.GetDocumentsTag'
              at
              weblogic.servlet.jsp.StandardTagLib.jspException(StandardTagLib.java:138)
              at
              weblogic.servlet.jsp.StandardTagLib.processTag(StandardTagLib.java:272)
              at
              weblogic.servlet.jsp.StandardTagLib.processTagElements(StandardTagLib.java:146)
              at
              weblogic.servlet.jsp.StandardTagLib.<init>(StandardTagLib.java:125)
              at weblogic.servlet.jsp.JspLexer.loadTagLib(JspLexer.java:87)
              at
              weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE_BODY(JspLexer.java:3811)
              at
              weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE(JspLexer.java:3561)
              at weblogic.servlet.jsp.JspLexer.mDIRECTIVE(JspLexer.java:3422)
              at
              weblogic.servlet.jsp.JspLexer.mSTANDARD_THING(JspLexer.java:1760)
              at weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java:1601)
              at weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java:1491)
              at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:880)
              at weblogic.servlet.jsp.JspParser.doit(JspParser.java:69)
              at weblogic.servlet.jsp.JspParser.parse(JspParser.java:116)
              at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:97)
              at
              weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:242)
              at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:302)
              at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:217)
              at
              weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:164)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:101)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:124)
              at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:907)
              at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:851)
              at
              weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:252)
              at
              weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:364)
              at
              weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:252)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)
              The class does contain the setter, so we don't know why the message pops
              up. After rebooting the server, the page works properly (!) Does anyone
              know how to get rid of it ? We're running out of ideas, and rebooting
              the server every 2-3 days is not acceptable.
              The configuration consists of BEA WebLogic 5.1.0 SP8 + JDK 1.2.2_07 +
              HPUX 11.0.
              Any help is greatly appreciated.
              Jacek Laskowski
              

    so doesn you bean have a
              void setLimit(String) {}
              String getLimit() {}
              or does it have mismatched getter and setter?
              like
              setLimit(String) {}
              int getLimit() {}
              take a look at :
              http://developer.java.sun.com/developer/bugParade/bugs/4407050.html
              -Nagesh
              Jacek Laskowski wrote:
              > Hi Mike,
              >
              > Thanks for the response. Unfortunatelly, it's happening on a production
              > server and nobody's changing anything. The error message pops up every
              > 2-3 days and the only way to get rid of that is to reboot the server.
              > Hmmm...I could even say it's hitting us quite regularly.
              >
              > The first time I've seen this I thought that there might be somewhere a
              > class which does not really have the necessary setter. It might've been
              > a case, but it's not. Even though we assume it might happen, what's
              > going on with the WLS classloaders that they pick up the right class at
              > the startup and after some time they change their mind and pick up the
              > wrong one. That would be a bug, shouldn't it ?
              >
              > What's more annoying is the fact that we're not able to open a case in
              > the support as there is nothing to be shown. There is merely the error
              > message which anybody can clearly explain that it relates to a wrong
              > class - no setter in it.
              >
              > The only way I can think of would be to enable remote debugging and as
              > soon as it's happend, connect to the WLS JVM and see what's wrong. We
              > don't have the WLS sources, though.
              >
              > -Jacek
              >
              > Mike Reiche wrote:
              > >
              > > Is it possible that the tag was changed - an attribute was added in the .tld and
              > > to the class?
              > >
              > > The new .tld is seen immediately. The new class is not - not until you restart
              > > WL.
              > >
              > > Mike
              > >
              > > Jacek Laskowski <[email protected]> wrote:
              > > >Hi,
              > > >
              > > >After some time of work, WLS ends up with the following error message:
              > > >
              > > >weblogic.servlet.jsp.JspException: (line -1): Error in tag library at:
              > > >'cm': There is no setter method for property 'limit', for Tag
              > > > class 'com.hp.module.cm.tag.GetDocumentsTag'
              > > > at
              > > >weblogic.servlet.jsp.StandardTagLib.jspException(StandardTagLib.java:138)
              > > > at
              > > >weblogic.servlet.jsp.StandardTagLib.processTag(StandardTagLib.java:272)
              > > > at
              > > >weblogic.servlet.jsp.StandardTagLib.processTagElements(StandardTagLib.java:146)
              > > > at
              > > >weblogic.servlet.jsp.StandardTagLib.<init>(StandardTagLib.java:125)
              > > > at weblogic.servlet.jsp.JspLexer.loadTagLib(JspLexer.java:87)
              > > > at
              > > >weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE_BODY(JspLexer.java:3811)
              > > > at
              > > >weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE(JspLexer.java:3561)
              > > > at weblogic.servlet.jsp.JspLexer.mDIRECTIVE(JspLexer.java:3422)
              > > > at
              > > >weblogic.servlet.jsp.JspLexer.mSTANDARD_THING(JspLexer.java:1760)
              > > > at weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java:1601)
              > > > at weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java:1491)
              > > > at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:880)
              > > > at weblogic.servlet.jsp.JspParser.doit(JspParser.java:69)
              > > > at weblogic.servlet.jsp.JspParser.parse(JspParser.java:116)
              > > > at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:97)
              > > > at
              > > >weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:242)
              > > > at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:302)
              > > > at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:217)
              > > > at
              > > >weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:164)
              > > > at
              > > >weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:101)
              > > > at
              > > >weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:124)
              > > > at
              > > >weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:907)
              > > > at
              > > >weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:851)
              > > > at
              > > >weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:252)
              > > > at
              > > >weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:364)
              > > > at
              > > >weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:252)
              > > > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)
              > > >
              > > >The class does contain the setter, so we don't know why the message pops
              > > >up. After rebooting the server, the page works properly (!) Does anyone
              > > >know how to get rid of it ? We're running out of ideas, and rebooting
              > > >the server every 2-3 days is not acceptable.
              > > >
              > > >The configuration consists of BEA WebLogic 5.1.0 SP8 + JDK 1.2.2_07 +
              > > >HPUX 11.0.
              > > >
              > > >Any help is greatly appreciated.
              > > >
              > > >Jacek Laskowski
              

  • Custom component/tag class:  ---which setters/getters do what?

    Hi
    I'm trying to create a custom component, but, there is a major concept that I do not understand...
    ---What are the setters/getters in the "component" class used for?...
    ---What are the setters/getters in the "tag" class used for?
    Another way of asking is...
    ---Which setters/getters are used simply to keep track of attribute name/id/key?
    ---Which setters and getters refer to the actual objects that the attribute names point to?
    The reason for my confusion is that nearly all "custom component" examples I've seen thus far, utilize attributes that point to "String" objects... (i.e., as opposed to ArrayList, HashMap, etc)...
    This makes it difficult for me to distinguish whether the String values in the getters/setters are referring to the String name/"id" of the attribute...or, the String "value" of the attribute...
    I have not been able to verify how I should code the getter/setters (and type casts) for other kinds of objects like ArrayLists, HashMaps, etc
    For example, a typical logic mechanism Ive seen in the custom "tag" examples is as follows...
    in a "tag" class...
            if( tabledata != null )
                if (isValueReference (tabledata))
                    FacesContext context = FacesContext.getCurrentInstance ();
                    Application app = context.getApplication ();
                    ValueBinding vb = app.createValueBinding (tabledata);
                    component.setValueBinding ("tabledata", vb);
                else
                    component.getAttributes ().put ("tabledata", tabledata);
    in the "component" class...
        public void setTabledata (List tabledata)
            this.tabledata = tabledata;
        public List getTabledata ()
            if(null != tabledata)
                return tabledata;
            ValueBinding _vb = getValueBinding ("tabledata");
            if(_vb != null)
                return (List)_vb.getValue (getFacesContext ());
            else
                return null;
        }...considering the above code,
    ---when/where should the "tabledata" variable be referring the "name/id" of the attribute?...
    ---when/where should the "tabledata" variable be referring to the "value" of the attribute?...
    ...as, I need to change the type casting to adjust to what it should be...
    ***NOTE: This is one error that I'm getting, and I believe it is because I do not understand how getter/setter is used in "component" and "tag" classe, i.e., :
    "org.apache.jasper.JasperException: jsp.error.beans.property.conversion
         org.apache.jasper.runtime.JspRuntimeLibrary.getValueFromPropertyEditorManager(JspRuntimeLibrary.java:885)"...
    Thanks for any help on this!
    sd

    The "tabledata" variable always refers the local value of the attribute.
    When using a value binding to some backing bean,
    the local value is null and the model value is owned by the bean.
    You don't need any casting in the tag class nor the component class.
    The setters/getters in the component class specify the type of the attributes.
    Conversion from/to String to/from the type is done automatically if possible.
    When the automatic conversion is impossible, you should specify f:converter
    for the attribute.

  • How to resolve #{row} of af:table in custom tag class?

    Hi all,
    My customer creates custom converter tag with some attributes. When they use it outside af:table, it works as expected.
    However when they use it in af:table and set "#{row.value}" into the tag's attribute, it doesn't work because it can't resolve #{row} EL expression.
    The method they wrote is like below.
    private Object getExpressionValue(ValueExpression expression) {
    if (expression == null) {
    return null;
    final ELContext elContext =
    FacesContext.getCurrentInstance().getELContext();
    return expression.getValue(elContext);
    Does anyone know the way to do resolve #{row} expresison in custom tag class?
    If you share sample codes, it will be much appreciated.
    Regards,
    Atsushi

    Hi,
    the row variable is a temporary variables, which means that #{row} may work when the table renders but not when users edit fields in a table and then submit the change. You don't really mention what doesn't work for your customer (and wouldn't it be better your customer could post here on OTN to avoid you becoming a dispatcher?) . An expression #{row.value} for example doesn't exist unless your customer uses a POJO model that has a property "value" in which case the entity has a setValue/getValue.
    Frank

  • Custom taglib access the variable of jsp in the tag class

    Hi guys:
    I have a question about taglib.the scenario below
    there are a set of tag,they all need to access a variable that declare in the jsp.yes ,I can use the approach like this,
    first I declare a variable
    <%!String variable="test";%>
    then pass the value
    <myTag:hello att="<%=variable%>"/>,but I think that's stupid,because all tags access the same variable.why not get the variable in tag class?
    for example
    public int doStartTag() {
    String variable=;//get the variable at here
    I mean,I want to get the variable's value in my tag class directly without passing parameter in the jsp via attribute of tag ?
    can I do like this?if yes,how can I?
    thanks advance!

    Hi,
    Review pageContext, TagSupport from the JSP and Tag Extensions API. You can put the variable into any of the four scopes and retrieve it using the pageContext object.

  • Exception Description: Entity class [] has no primary key....

    Received the following error in jdeveloper - some info on how to fix would be greatly appreciated
    [EclipseLink/JPA Client] Adding Java options: -javaagent:C:\oracle\MiddlewareNew\jdeveloper\modules\oracle.toplink_11.1.1\eclipselink.jar
    C:\Oracle\MiddlewareNew\jdk160_05\bin\javaw.exe -client -classpath C:\JDeveloper\mywork\APP_CM_AUTONUM_GEN\.adf;C:\JDeveloper\mywork\APP_CM_AUTONUM_GEN\SAM_CM_AUTONUM_GEN\classes;C:\oracle\MiddlewareNew\jdeveloper\modules\oracle.toplink_11.1.1\toplink.jar;C:\oracle\MiddlewareNew\jdeveloper\modules\oracle.toplink_11.1.1\antlr.jar;C:\oracle\MiddlewareNew\modules\com.bea.core.antlr.runtime_2.7.7.jar;C:\oracle\MiddlewareNew\modules\javax.persistence_1.0.0.0_1-0.jar;C:\oracle\MiddlewareNew\jdeveloper\modules\oracle.toplink_11.1.1\eclipselink.jar;C:\oracle\MiddlewareNew\jdeveloper\modules\oracle.xdk_11.1.1\xmlparserv2.jar;C:\oracle\MiddlewareNew\jdeveloper\modules\oracle.xdk_11.1.1\xml.jar;C:\oracle\MiddlewareNew\modules\javax.jsf_1.2.0.0.jar;C:\oracle\MiddlewareNew\modules\javax.ejb_3.0.1.jar;C:\oracle\MiddlewareNew\modules\javax.enterprise.deploy_1.2.jar;C:\oracle\MiddlewareNew\modules\javax.interceptor_1.0.jar;C:\oracle\MiddlewareNew\modules\javax.jms_1.1.1.jar;C:\oracle\MiddlewareNew\modules\javax.jsp_1.1.0.0_2-1.jar;C:\oracle\MiddlewareNew\modules\javax.jws_2.0.jar;C:\oracle\MiddlewareNew\modules\javax.activation_1.1.0.0_1-1.jar;C:\oracle\MiddlewareNew\modules\javax.mail_1.1.0.0_1-1.jar;C:\oracle\MiddlewareNew\modules\javax.xml.soap_1.3.1.0.jar;C:\oracle\MiddlewareNew\modules\javax.xml.rpc_1.2.1.jar;C:\oracle\MiddlewareNew\modules\javax.xml.ws_2.1.1.jar;C:\oracle\MiddlewareNew\modules\javax.management.j2ee_1.0.jar;C:\oracle\MiddlewareNew\modules\javax.resource_1.5.1.jar;C:\oracle\MiddlewareNew\modules\javax.servlet_1.0.0.0_2-5.jar;C:\oracle\MiddlewareNew\modules\javax.transaction_1.0.0.0_1-1.jar;C:\oracle\MiddlewareNew\modules\javax.xml.stream_1.1.1.0.jar;C:\oracle\MiddlewareNew\modules\javax.security.jacc_1.0.0.0_1-1.jar;C:\oracle\MiddlewareNew\modules\javax.xml.registry_1.0.0.0_1-0.jar;C:\oracle\MiddlewareNew\wlserver_10.3\server\lib\weblogic.jar -javaagent:C:\oracle\MiddlewareNew\jdeveloper\modules\oracle.toplink_11.1.1\eclipselink.jar SAM.CMAUTONUMGENClient
    java.lang.reflect.InvocationTargetException
         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 sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:323)
         at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:338)
    Caused by: java.lang.reflect.InvocationTargetException
         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.eclipse.persistence.internal.jpa.deployment.JavaSECMPInitializerAgent.initializeFromAgent(JavaSECMPInitializerAgent.java:45)
         at org.eclipse.persistence.internal.jpa.deployment.JavaSECMPInitializerAgent.premain(JavaSECMPInitializerAgent.java:38)
         ... 6 more
    Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 1.0.2 (Build 20081024)): org.eclipse.persistence.exceptions.EntityManagerSetupException
    Exception Description: Predeployment of PersistenceUnit [SAM_CM_AUTONUM_GEN] failed.
    Internal Exception: Exception [EclipseLink-7161] (Eclipse Persistence Services - 1.0.2 (Build 20081024)): org.eclipse.persistence.exceptions.ValidationException
    Exception Description: Entity class [class oracle.SamCmAutonumGen] has no primary key specified. It should define either an @Id, @EmbeddedId or an @IdClass. If you have defined PK using any of these annotations then please make sure that you do not have mixed access-type (both fields and properties annotated) in your entity class hierarchy.
         at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:870)
         at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.callPredeploy(JPAInitializer.java:101)
         at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.initPersistenceUnits(JPAInitializer.java:149)
         at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.initialize(JPAInitializer.java:135)
         at org.eclipse.persistence.internal.jpa.deployment.JavaSECMPInitializer.initializeFromAgent(JavaSECMPInitializer.java:145)
         ... 12 more
    Caused by: Exception [EclipseLink-28018] (Eclipse Persistence Services - 1.0.2 (Build 20081024)): org.eclipse.persistence.exceptions.EntityManagerSetupException
    Exception Description: Predeployment of PersistenceUnit [SAM_CM_AUTONUM_GEN] failed.
    Internal Exception: Exception [EclipseLink-7161] (Eclipse Persistence Services - 1.0.2 (Build 20081024)): org.eclipse.persistence.exceptions.ValidationException
    Exception Description: Entity class [class oracle.SamCmAutonumGen] has no primary key specified. It should define either an @Id, @EmbeddedId or an @IdClass. If you have defined PK using any of these annotations then please make sure that you do not have mixed access-type (both fields and properties annotated) in your entity class hierarchy.
         at org.eclipse.persistence.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:210)
         ... 17 more
    Caused by: Exception [EclipseLink-7161] (Eclipse Persistence Services - 1.0.2 (Build 20081024)): org.eclipse.persistence.exceptions.ValidationException
    Exception Description: Entity class [class oracle.SamCmAutonumGen] has no primary key specified. It should define either an @Id, @EmbeddedId or an @IdClass. If you have defined PK using any of these annotations then please make sure that you do not have mixed access-type (both fields and properties annotated) in your entity class hierarchy.
         at org.eclipse.persistence.exceptions.ValidationException.noPrimaryKeyAnnotationsFound(ValidationException.java:1245)
         at org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EntityAccessor.validatePrimaryKey(EntityAccessor.java:1173)
         at org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EntityAccessor.process(EntityAccessor.java:486)
         at org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.processORMMetadata(MetadataProcessor.java:443)
    FATAL ERROR in native method: processing of -javaagent failed
         at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:303)
         at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:830)
         ... 16 more
    Exception in thread "main" Process exited with exit code 1.

    Hi,
    you may want to try the J2EE forum here on OTN in case you don't get a sufficient answer to the problem.
    Frank

  • Getting the JAXB exception like "Two classes have the same XML type name-"

    Getting the JAXB exception like "Two classes have the same XML type name...",
    Here is the exception details:
    Exception in thread "main" com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions Two classes have the same XML type name "city". Use @XmlType.name and @XmlType.namespace to assign different names to them. this problem is related to the following location: at com.model.City at public com.model.City com.model.Address.getCurrentCity() at com.model.Address this problem is related to the following location: at com.common.City at public com.common.City com.model.Address.getPreviousCity() at com.model.Address
    at com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException$Builder.check(Unknown Source) at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(Unknown Source) at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.(Unknown Source) at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(Unknown Source) at com.sun.xml.internal.bind.v2.ContextFactory.createContext(Unknown Source) at com.sun.xml.internal.bind.v2.ContextFactory.createContext(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at javax.xml.bind.ContextFinder.newInstance(Unknown Source) at javax.xml.bind.ContextFinder.find(Unknown Source) at javax.xml.bind.JAXBContext.newInstance(Unknown Source) at javax.xml.bind.JAXBContext.newInstance(Unknown Source) at com.PojoToXSD.main(PojoToXSD.java:17)
    I took the example like:
    package com.model; ---->this package contains 'Address' class and 'City' class
    public class Address {
    private String areaName; private City currentCity; private com.common.City previousCity;
    package com.model;
    public class City {
    private String cityName;
    Another city class in "com.common" package.
    package com.common;
    public class City {
    private String pinCode;
    We need to create XSDs and needs to do the Marshalling and unmarshalling with the existing code in our project(like as above example code), code does not have any annotations like "@XmlRootElement/@XmlType" and we can not able to change the source code.
    I would like to know is there any solution to fix the above issue or any other ways to create XSDs and marshaling/unmarshalling(like MOXy..etc)?
    It would be great if i can get the solution from any one....May thanks in advance.
    Thanks,
    Satya.

    Getting the JAXB exception like "Two classes have the same XML type name...",
    Here is the exception details:
    Exception in thread "main" com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions Two classes have the same XML type name "city". Use @XmlType.name and @XmlType.namespace to assign different names to them. this problem is related to the following location: at com.model.City at public com.model.City com.model.Address.getCurrentCity() at com.model.Address this problem is related to the following location: at com.common.City at public com.common.City com.model.Address.getPreviousCity() at com.model.Address
    at com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException$Builder.check(Unknown Source) at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(Unknown Source) at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.(Unknown Source) at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(Unknown Source) at com.sun.xml.internal.bind.v2.ContextFactory.createContext(Unknown Source) at com.sun.xml.internal.bind.v2.ContextFactory.createContext(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at javax.xml.bind.ContextFinder.newInstance(Unknown Source) at javax.xml.bind.ContextFinder.find(Unknown Source) at javax.xml.bind.JAXBContext.newInstance(Unknown Source) at javax.xml.bind.JAXBContext.newInstance(Unknown Source) at com.PojoToXSD.main(PojoToXSD.java:17)
    I took the example like:
    package com.model; ---->this package contains 'Address' class and 'City' class
    public class Address {
    private String areaName; private City currentCity; private com.common.City previousCity;
    package com.model;
    public class City {
    private String cityName;
    Another city class in "com.common" package.
    package com.common;
    public class City {
    private String pinCode;
    We need to create XSDs and needs to do the Marshalling and unmarshalling with the existing code in our project(like as above example code), code does not have any annotations like "@XmlRootElement/@XmlType" and we can not able to change the source code.
    I would like to know is there any solution to fix the above issue or any other ways to create XSDs and marshaling/unmarshalling(like MOXy..etc)?
    It would be great if i can get the solution from any one....May thanks in advance.
    Thanks,
    Satya.

  • Where to place tld,tag class files to create a small custom tag

    hi ,
    please any one help me to create a small custom plugin wothout using JSTL

    Your TLD will reside in the WEB-INF/ directory, whereas your tag class will be put into WEB-INF/classes/ directory, depending on your package it'll live in a directory somewhere under that. Of course, you could also put the TLD and tag class into a JAR file and place that under WEB-INF/lib/

  • [svn:fx-4.x] 14456: Adding ASDoc version tags classes

    Revision: 14456
    Revision: 14456
    Author:   [email protected]
    Date:     2010-02-26 07:45:53 -0800 (Fri, 26 Feb 2010)
    Log Message:
    Adding ASDoc version tags classes
    QE notes:
    Doc notes:
    Bugs:
    Reviewer:
    Tests run: checkintests
    Is noteworthy for integration: no
    Modified Paths:
        flex/sdk/branches/4.x/frameworks/projects/automation/src/mx/automation/events/EventDetail s.as
        flex/sdk/branches/4.x/frameworks/projects/automation_air/src/mx/automation/air/AirDragMan agerAutomationHandler.as
        flex/sdk/branches/4.x/frameworks/projects/automation_air/src/mx/automation/air/AirFunctio nsHelper.as
        flex/sdk/branches/4.x/frameworks/projects/automation_spark/src/spark/automation/delegates /components/SparkApplicationAutomationImpl.as
        flex/sdk/branches/4.x/frameworks/projects/automation_spark/src/spark/automation/delegates /components/SparkBorderContainerAutomationImpl.as
        flex/sdk/branches/4.x/frameworks/projects/automation_spark/src/spark/automation/delegates /components/SparkButtonAutomationImpl.as
        flex/sdk/branches/4.x/frameworks/projects/automation_spark/src/spark/automation/delegates /components/SparkButtonBarAutomationImpl.as
        flex/sdk/branches/4.x/frameworks/projects/automation_spark/src/spark/automation/delegates /components/SparkButtonBarButtonAutomationImpl.as
        flex/sdk/branches/4.x/frameworks/projects/automation_spark/src/spark/automation/delegates /components/SparkDataGroupAutomationImpl.as
        flex/sdk/branches/4.x/frameworks/projects/automation_spark/src/spark/automation/delegates /components/SparkGroupAutomationImpl.as
        flex/sdk/branches/4.x/frameworks/projects/automation_spark/src/spark/automation/delegates /components/SparkLabelAutomationImpl.as
        flex/sdk/branches/4.x/frameworks/projects/automation_spark/src/spark/automation/delegates /components/SparkNavigatorContentAutomationImpl.as
        flex/sdk/branches/4.x/frameworks/projects/automation_spark/src/spark/automation/delegates /components/SparkPanelAutomationImpl.as
        flex/sdk/branches/4.x/frameworks/projects/automation_spark/src/spark/automation/delegates /components/SparkRadioButtonAutomationImpl.as
        flex/sdk/branches/4.x/frameworks/projects/automation_spark/src/spark/automation/delegates /components/SparkSkinnableContainerAutomationImpl.as
        flex/sdk/branches/4.x/frameworks/projects/automation_spark/src/spark/automation/delegates /components/SparkSpinnerAutomationImpl.as
        flex/sdk/branches/4.x/frameworks/projects/automation_spark/src/spark/automation/delegates /components/SparkTabBarAutomationImpl.as
        flex/sdk/branches/4.x/frameworks/projects/automation_spark/src/spark/automation/delegates /components/SparkTileGroupAutomationImpl.as
        flex/sdk/branches/4.x/frameworks/projects/automation_spark/src/spark/automation/delegates /components/SparkTitleWindowAutomationImpl.as
        flex/sdk/branches/4.x/frameworks/projects/automation_spark/src/spark/automation/delegates /components/SparkToggleButtonAutomationImpl.as
        flex/sdk/branches/4.x/frameworks/projects/automation_spark/src/spark/automation/delegates /components/SparkVideoPlayerAutomationImpl.as
        flex/sdk/branches/4.x/frameworks/projects/automation_spark/src/spark/automation/delegates /components/mediaClasses/SparkMuteButtonAutomationImpl.as
        flex/sdk/branches/4.x/frameworks/projects/automation_spark/src/spark/automation/delegates /components/supportClasses/SparkButtonBarBaseAutomationImpl.as
        flex/sdk/branches/4.x/frameworks/projects/automation_spark/src/spark/automation/delegates /components/supportClasses/SparkButtonBaseAutomationImpl.as
        flex/sdk/branches/4.x/frameworks/projects/automation_spark/src/spark/automation/delegates /components/supportClasses/SparkGroupBaseAutomationImpl.as
        flex/sdk/branches/4.x/frameworks/projects/automation_spark/src/spark/automation/delegates /components/supportClasses/SparkRangeAutomationImpl.as
        flex/sdk/branches/4.x/frameworks/projects/automation_spark/src/spark/automation/delegates /components/supportClasses/SparkSkinnableComponentAutomationImpl.as
        flex/sdk/branches/4.x/frameworks/projects/automation_spark/src/spark/automation/delegates /components/supportClasses/SparkSkinnableContainerBaseAutomationImpl.as
        flex/sdk/branches/4.x/frameworks/projects/automation_spark/src/spark/automation/delegates /components/supportClasses/SparkTextBaseAutomationImpl.as
        flex/sdk/branches/4.x/frameworks/projects/automation_spark/src/spark/automation/delegates /components/supportClasses/SparkTrackBaseAutomationImpl.as
        flex/sdk/branches/4.x/frameworks/projects/automation_spark/src/spark/automation/events/Sp arkListItemSelectEvent.as
        flex/sdk/branches/4.x/frameworks/projects/automation_spark/src/spark/automation/events/Sp arkValueChangeAutomationEvent.as
        flex/sdk/branches/4.x/frameworks/projects/framework/src/mx/accessibility/AccConst.as
        flex/sdk/branches/4.x/frameworks/projects/rpc/src/mx/rpc/soap/SOAPResult.as

    I had downloaded it for test, and requested for evaluation license...
    But I haven't got license, and also I am not able to find Flash Builder Plugins from HFCD site....
    I think those plugins are removed from site....
    Please help me, if anyone have those plugins...

  • How to recover from an exception on a class loaded with a classloader?

    I have created a classloader for the purpose of dynamically loading "modules" . The whole application is multithreaded and the separate modules may also run as separate threads. The problem that I am facing is that if one of the modules crashes (does not handle an exception), then the class loader object which loaded the required classes and started the module's thread, cannot be accessed. The thread which attempts to access this class loader freezes. Is there any way to recover from this situation?
    Thanks in advance

    Ok, let me provide a bit more information. Each "module" is handled by specific class (let's call it ModuleDescriptor), which subclasses the URLClassLoader class. The ModuleDescriptor class is responsible for describing each module, maintain module state information (loaded, unloaded, started, stopped, etc) and also executing some method calls on a specific object of the module, which in essence acts as a means to start or stop the module. Each module is a separate thread and is packaged in a JAR file, which is first downloaded locally. If one of these module threads crashes, then I cannot even call a method of the ModuleDescriptor to perform the necessary unloading bit. Basically, when I can the method that thread of execution halts without an exception or an error or anything. The rest of the application continues working properly (other threads). I find this situation bizarre, because the ModuleDescriptor object and the actual module with the thread that crashed execute on separate threads. If there is any more specific information that I have to provide, please let me know.

  • Missing tag class on 10.1.3 but not in JDev embedded oc4j

    I have a JSP 2.0 application created with a few custom tag files in web-inf/tags. The app runs fine within Jdeveloper's embedded oc4j (10.1.3). After deploying the EAR of this application to a 10.1.3 app server, everything works fine except in the way the server compiles the tag files. It puts them in the wrong folder!
    It puts the _tags directory in this folder:
    C:\Oracle\product\10.1.3\OracleAS_1\j2ee\FastConnect\application-deployments\FastConnect\FastConnect\persistence\_tagfiles\_nullweb_2d_inf
    When I manually copy the tags up one directory, the app works and I do not get a missing class error. What is telling my app server to put the generated tag file classes in this nullweb_2d_inf folder?

    repost

  • Upgrade from tomcat to OC4J 10.1.3 jsp parser exception in tag lib

    i have problem in oc4j jsp parser
    but it work ok on tomcat as tomcat using jasper-compiler.jar
    when run on oc4j it give me the exception
    OracleJSP: oracle.jsp.parse.JspParseException: /jsp/layouts/elec/pageheading.jsp: Line # 3, <aa:h1 wrapped="true" labelKey="${heading1BundleKey}"/>
    Error: Errors parsing tag :h1 oracle.jsp.parse.JspParseException: /jsp/layouts/elec/pageheading.jsp: Line # 3, <aa:h1 wrapped="true" labelKey="${heading1BundleKey}"/>
    Error: oracle.jsp.provider.JspCompileException: <H3>Errors compiling:E:\oc4j\j2ee\home\application-deployments\default\sc40\persistence\_tagfiles\_oracle\_jsp\_tag\_aacom\_h1_2e_tag.java</H3><TABLE BORDER=1 WIDTH=100%><TR><TH ALIGN=CENTER>Line #</TH><TH ALIGN=CENTER>Error</TH></TR><TR><TD WIDTH=7% VALIGN=TOP><P ALIGN=CENTER>191</TD><TD> non-static variable _jspFragWriter cannot be referenced from a static context
    _jspFragWriter = null;
    -------------------------------------------------------->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    and i have problem in web.xml
    as i using jsp servlet in jasper-compiler.jar in tomcat package
    <servlet>
    <servlet-name>jsp</servlet-name>
    <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
    <init-param>
    ------------------------------------>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    i try to use this package in oc4j but i can not
    i put this servlet in global-web-application.xml instead of
    <servlet>
         <servlet-name>jsp</servlet-name>
    <servlet-class>oracle.jsp.runtimev2.JspServlet</servlet-class>
    ------------------>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    to make oc4j depend on tomcat parser it give me
    classnotfound mean that (oc4j can not found package) this printed in global-application.log
    i make
    <library path="E:/oc4j/j2ee/home/applib/jasper-compiler.jar"/>
    and still have problem
    any 1 have idea using tomcat parser in oc4j
    or have idea solve this problem
    thanx
    Message was edited by:
    [email protected]
    Message was edited by:
    [email protected]
    Message was edited by:
    [email protected]
    Message was edited by:
    [email protected]

    OC4J 10.1.3 does support JSP 2.0, as well as custom tag libraries (including JSTL 1.1).
    There are two approaches to configuring a custom tag library for use in JSPs served by OC4J:
    1) Package the JSTL or custom tag library with your application:
    i. include the necessary JAR file in your web app's /WEB-INF/lib folder
    ii. include the relevant Tag Library Descriptor (TLD) file(s) in your web app's /WEB-INF folder
    iii. for each TLD, add a <tag-lib> element to web.xml referencing the TLD file's location and taglib URI
    2) Place the JSTL or custom tag library in an Application Server instance-level directory ($ORACLE_HOME/j2ee/home/jsp/lib/taglib) to make them available to multiple applications (in all OC4Js installed in the Oracle Home)
    For example, if you'd like to use the JSTL 1.1 Core and Internationalization Tag Libraries, do one of the following:
    1) Package the JSTL or custom tag library with your application:
    i. Obtain an implementation of JSTL (e.g. Jakarta Taglibs) and include the standard.jar and jstl.jar files in your web module's /WEB-INF/lib directory
    ii. From the JSTL implementation you're using, also copy the c.tld and fmt.tld Tag Library Descriptors to your web module's /WEB-INF/lib directory
    iii. Add the following elements to your web module's web.xml file:
    <jsp-config>
    <taglib>
    <taglib-uri>http://java.sun.com/jsp/jstl/core</taglib-uri>
    <taglib-location>/WEB-INF/c.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>http://java.sun.com/jsp/jstl/fmt</taglib-uri>
    <taglib-location>/WEB-INF/fmt.tld</taglib-location>
    </taglib>
    </jsp-config>
    OR
    2) Copy the standard.jar and jstl.jar libraries from the JSTL implementation you're using to $ORACLE_HOME/j2ee/home/jsp/lib/taglib

  • Error when testing a webservice - Exception raised in class CL_SOAP_REGIST

    Dear coleagues,
    I've got an issue concerning the AS ABAP SOAP Runtime. The system is an ERP 6.0 with SP13.
    If I try to test the service in WSADMIN by using the test-button, I just get an exception after the internet browser opens:
    A Soap Core Exception was raised in Method CL_SOAP_REGISTRY::generate_wsdl(6)
    Technical Details of Soap Core Exception
    Message Text: SRT: ASSERT failed: object reference not bound
    Class: CL_SOAP_REGISTRY
    Method: generate_wsdl
    LocationID: 6
    Program: CL_SOAP_REGISTRY==============CP
    Include: CL_SOAP_REGISTRY==============CM00J
    Line: 59
    I did a look into the coding and think that the exception is raised since the methode
    Hi folks,
    I've got an issue concerning the AS ABAP SOAP Runtime. The system is an ERP 6.0 with SP13.
    At first I create a Web Service by using the context menue of an existing rfc-enabled function module. Afterwards the service is visible in SICF. If I try to test the service in WSADMIN by using the test-button I only get an exception in the opening internet browser:
    Cannot download WSDL from http://serverurl:8027/sap/bc/srt/rfc/sap/ZSTMA_FUNKTIONSTEST2?sap-client=100&wsdl=1.1: Invalid Response Code: (400) Bad Request. The requested URL was:"http://ciswi.sap.swm.de:8027/sap/bc/srt/rfc/sap/ZSTMA_FUNKTIONSTEST2?sap-client=100&wsdl=1.1"
    If I go onto the used url I get the following message:
    Your request could not be processed
    SRT: ASSERT failed: object reference not bound
    What has happened?
    A Soap Core Exception was raised in Method CL_SOAP_REGISTRY::generate_wsdl(6)
    Technical Details of Soap Core Exception
    Message Text: SRT: ASSERT failed: object reference not bound
    Class: CL_SOAP_REGISTRY
    Method: generate_wsdl
    LocationID: 6
    Program: CL_SOAP_REGISTRY==============CP
    Include: CL_SOAP_REGISTRY==============CM00J
    Line: 59
    I did a look into the coding and found out that the exception is raised since
    Hi folks,
    I've got an issue concerning the AS ABAP SOAP Runtime. The system is an ERP 6.0 with SP13.
    At first I create a Web Service by using the context menue of an existing rfc-enabled function module. Afterwards the service is visible in SICF. If I try to test the service in WSADMIN by using the test-button I only get an exception in the opening internet browser:
    Cannot download WSDL from http://serverurl:8027/sap/bc/srt/rfc/sap/ZSTMA_FUNKTIONSTEST2?sap-client=100&wsdl=1.1: Invalid Response Code: (400) Bad Request. The requested URL was:"http://ciswi.sap.swm.de:8027/sap/bc/srt/rfc/sap/ZSTMA_FUNKTIONSTEST2?sap-client=100&wsdl=1.1"
    If I go onto the used url I get the following message:
    Your request could not be processed
    SRT: ASSERT failed: object reference not bound
    What has happened?
    A Soap Core Exception was raised in Method CL_SOAP_REGISTRY::generate_wsdl(6)
    Technical Details of Soap Core Exception
    Message Text: SRT: ASSERT failed: object reference not bound
    Class: CL_SOAP_REGISTRY
    Method: generate_wsdl
    LocationID: 6
    Program: CL_SOAP_REGISTRY==============CP
    Include: CL_SOAP_REGISTRY==============CM00J
    Line: 59
    I found out that the exception is raised since CL_SRT_WSDL_GEN_FACTORY=>GET_WSDL_GENERATOR doesn't return an instance of the class referring to the interface IF_SRT_WSDL_GEN.
    If I test that method in SE24 using the name of the service definition in SE80 for the parameter WSD, the value '1' fpr the parameters TYPE and STYLE, an instance of the class CL_SRT_WSDL11_GEN is rendered.
    Could you give any hints how I could debug that issue to verify the import parameters when the static method CL_SRT_WSDL_GEN_FACTORY=>GET_WSDL_GENERATOR is called in the body of the browser call ?
    Or any other hints?
    Thank you very much and best regards
    Stefan

    The issue was due to missing authorizations of the RFC-user (type 'Communication') calling the webservice. The RFC-user itsself has been assigned before to the webservice in the http-service tree (transaction SICF). RFC-User needs (at least) the role SAP_BC_WEBSERVICE.

  • Calling a PP03 BDC  from abap webdynpro throws an exception from the class

    Hi Experts,
    I am calling a BDC FM for PP03 TCPDE form abap webdynpro.
    When i run the standalone FM, it works fine and When called from Webdynpro its giving a dump saying an exception is raised in the class CL_GUI_SPLITTER_CONTAINER.
    Can you please let me know how to resolve the issue? Your siggestions will be of great help to me.
    Thanks,
    Shilpa

    >
    shilpa hv wrote:
    > Hi Experts,
    >
    > I am calling a BDC FM for PP03 TCPDE form abap webdynpro.
    > When i run the standalone FM, it works fine and When called from Webdynpro its giving a dump saying an exception is raised in the class CL_GUI_SPLITTER_CONTAINER.
    >
    >
    > Can you please let me know how to resolve the issue? Your siggestions will be of great help to me.
    >
    >
    > Thanks,
    > Shilpa
    Hi,
    The FM might be calling a dialog or bringing a GUI screen up. This would cause the Webdynpro session to disconnect abruptly.
    Any conversion exit, GUI screen,dialog popup, transaction handling..etc would cause the webdynpro to disconnect. So you cannot use all FM's as it is.

  • Null pointer exception with inner class

    Hi everyone,
    I've written an applet that is an animation of a wheel turning. The animation is drawn on a customised JPanel which is an inner class called animateArea. The main class is called Rotary. It runs fine when I run it from JBuilder in the Applet Viewer. However when I try to open the html in internet explorer it gives me null pointer exceptions like the following:
    java.lang.NullPointerException      
    at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:2761)      
    at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:2722)      
    at Rotary$animateArea.paintComponent(Rotary.java:251)      
    at javax.swing.JComponent.paint(JComponent.java:808)      
    at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4771)      
    at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4724)      
    at javax.swing.JComponent._paintImmediately(JComponent.java:4668)      
    at javax.swing.JComponent.paintImmediately(JComponent.java:4477)      
    at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:410)      
    at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:117)      
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)      
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:448)      
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)      
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)      
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)      
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)      
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
    Do inner classes have to be compiled seperately or anything?
    Thanks a million for you time,
    CurtinR

    I think that I am using the Java plugin ( Its a computer in college so I'm not certain but I just tried running an applet from the Swing tutorial and it worked)
    Its an image of a rotating wheel and in each sector of the wheel is the name of a person - when you click on the sector it goes red and the email window should come up (that doesn't work yet though). The stop and play buttons stop or start the animation. It is started by default.
    This is the code for the applet:
    import java.applet.*;
    import javax.swing.JApplet;
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    import java.awt.geom.*;
    import javax.swing.*;
    import java.awt.image.*;
    import java.util.StringTokenizer;
    import java.net.*;
    public class Rotary extends JApplet implements ActionListener, MouseListener
    public boolean rotating;
    private Timer timer;
    private int delay = 1000;
    private AffineTransform transform;
    private JTextArea txtTest; //temp
    private Container c;
    private animateArea wheelPanel;
    private JButton btPlay, btStop;
    private BoxLayout layout;
    private JPanel btPanel;
    public Image wheel;
    public int currentSector;
    public String members[];
    public int [][]coordsX, coordsY; //stores sector no. and x or y coordinates for that point
    final int TOTAL_SECTORS= 48;
    //creates polygon array - each polygon represents a sector on wheel
    public Polygon polySector1,polySector2,polySector3, polySector4, polySector5,polySector6,polySector7,polySector8,polySector9,polySector10,
    polySector11,polySector12,polySector13,polySector14,polySector15,polySector16,polySector17,polySector18,polySector19,polySector20,
    polySector21,polySector22,polySector23,polySector24,polySector25,polySector26,polySector27,polySector28,polySector29,polySector30,
    polySector31,polySector32,polySector33,polySector34,polySector35,polySector36,polySector37,polySector38,polySector39,polySector40,
    polySector41,polySector42,polySector43,polySector44,polySector45,polySector46,polySector47,polySector48;
    public Polygon polySectors[]={polySector1,polySector2,polySector3, polySector4, polySector5,polySector6,polySector7,polySector8,polySector9,polySector10,
                      polySector11,polySector12,polySector13,polySector14,polySector15,polySector16,polySector17,polySector18,polySector19,polySector20,
                      polySector21,polySector22,polySector23,polySector24,polySector25,polySector26,polySector27,polySector28,polySector29,polySector30,
                      polySector31,polySector32,polySector33,polySector34,polySector35,polySector36,polySector37,polySector38,polySector39,polySector40,
                      polySector41,polySector42,polySector43,polySector44,polySector45,polySector46,polySector47,polySector48};
    public void init()
    members = new String[TOTAL_SECTORS];
    coordsX= new int[TOTAL_SECTORS][4];
    coordsY= new int[TOTAL_SECTORS][4];
    currentSector = -1;
    rotating = true;
    transform = new AffineTransform();
    //***********************************Create GUI**************************
    wheelPanel = new animateArea(); //create a canvas where the animation will be displayed
    wheelPanel.setSize(600,580);
    wheelPanel.setBackground(Color.yellow);
    btPanel = new JPanel(); //create a panel for the buttons
    btPanel.setLayout(new BoxLayout(btPanel,BoxLayout.Y_AXIS));
    btPanel.setBackground(Color.blue);
    btPanel.setMaximumSize(new Dimension(30,580));
    btPanel.setMinimumSize(new Dimension(30,580));
    btPlay = new JButton("Play");
    btStop = new JButton("Stop");
    //txtTest = new JTextArea(5,5); //temp
    btPanel.add(btPlay);
    btPanel.add(btStop);
    // btPanel.add(txtTest); //temp
    c = getContentPane();
    layout = new BoxLayout(c,layout.X_AXIS);
    c.setLayout(layout);
    c.add(wheelPanel); //add panel and animate canvas to the applet
    c.add(btPanel);
    wheel = getImage(getDocumentBase(),"rotary2.gif");
    getParameters();
    for(int k = 0; k <TOTAL_SECTORS; k++)
    polySectors[k] = new Polygon();
    for(int n= 0; n<4; n++)
    polySectors[k].addPoint(coordsX[k][n],coordsY[k][n]);
    btPlay.addActionListener(this);
    btStop.addActionListener(this);
    wheelPanel.addMouseListener(this);
    startAnimation();
    public void mouseClicked(MouseEvent e)
    if (rotating == false) //user can only hightlight a sector when wheel is not rotating
    for(int h= 0; h<TOTAL_SECTORS; h++)
    if(polySectors[h].contains(e.getX(),e.getY()))
    currentSector = h;
    wheelPanel.repaint();
    email();
    public void mouseExited(MouseEvent e){}
    public void mouseEntered(MouseEvent e){}
    public void mouseReleased(MouseEvent e){}
    public void mousePressed(MouseEvent e){}
    public void email()
    try
    URL rotaryMail = new URL("mailto:[email protected]");
    getAppletContext().showDocument(rotaryMail);
    catch(MalformedURLException mue)
    System.out.println("bad url!");
    public void getParameters()
    StringTokenizer stSector;
    String parCoords;
    for(int i = 0; i <TOTAL_SECTORS; i++)
    {               //put member names in applet parameter list into an array
    members[i] = getParameter("member"+i);
    //separate coordinate string and store coordinates in 2 arrays
    parCoords=getParameter("sector"+i);
    stSector = new StringTokenizer(parCoords, ",");
    for(int j = 0; j<4; j++)
    coordsX[i][j] = Integer.parseInt(stSector.nextToken());
    coordsY[i][j] = Integer.parseInt(stSector.nextToken());
    public void actionPerformed(ActionEvent e)
    wheelPanel.repaint(); //repaint when timer event occurs
    if (e.getActionCommand()=="Stop")
    stopAnimation();
    else if(e.getActionCommand()=="Play")
    startAnimation();
    public void startAnimation()
    if(timer == null)
    timer = new Timer(delay,this);
    timer.start();
    else if(!timer.isRunning())
    timer.restart();
    Thanks so much for your help!

Maybe you are looking for

  • Forgot macbook pro password and locked out :(

    I for got ny mac book pro password my charger broke at the bringing off summer and just got a new one and I have no idea what the password is. ive tried (comman r) or when holding down the option key the recovery arrow doesn't show up.

  • Is there a low quality photo warning in books in iPhoto'11?

    One of the pics in my book is filling a page, and looks pretty blurry and I'm almost positive that it is too low resolution for this size, but there is no warning icon telling me there is a problem. It seemed like my warnings were not working, so I p

  • LR4.2 issue unable to edit while syncing batches

    Hi Just updated to 4.2, Im noticing that when batch syncing in my catalogue, eg, for lens corrections, it seems that I can no longer continue to edit other aspects of my images. Previously I was able to continue with edit my workflow while the sync w

  • Can I use the Ericsson F3507 as mobile phone?

    Hello, I've got a UMTS SIM-card which is also a cellphone SIM-card for my thinkpad. Now I've seen that I can send/receive SMS with it, but I haven't seen a option to phone with it. The last two days I searched for a software to do so, but I only foun

  • Page jumps around in indesign

    Downloaded the trial version of indesign CS5. OSX 10.6.3, 3.06 GHz Intel Core 2 Duo, 4 GB, 1067 MHz RAM, 1 TB HD. Working on a doc and page seems to jump around inexplicably on its own. May be some preference I need to set correctly or some other min