Class Definition Error

Hi- when I compile the following code I receive this error message:
Exception in thread "main" java.lang.NoClassDefFoundError: ConnectionPool
Any ideas?
Here's the code:
package databaseConn;
import java.awt.*;
import java.io.*;
import java.util.*;
import java.sql.*;
public class ConnectionPool
     private Hashtable connections=new Hashtable();
     private Properties props;
     public ConnectionPool(Properties props, int initialConnections)
                                   throws SQLException, ClassNotFoundException
          this.props=props;
          initializePool(props,initialConnections);
     public ConnectionPool(String driverClassName, String dbURL, String user,
                                String password, int initialConnections)
                                throws SQLException, ClassNotFoundException
          props=new Properties();
          props.put("connection.driver",driverClassName);
          props.put("connection.url",dbURL);
          props.put("user",user);
          props.put("password",password);
          initializePool(props,initialConnections);
     public Connection getConnection()
          Connection con=null;
          Enumeration cons=connections.keys();
          synchronized(connections)
               while(cons.hasMoreElements())
                    con=(Connection)cons.nextElement();
                    Boolean b= (Boolean) connections.get(con);
                    if(!b.booleanValue())
                         try
                              con.setAutoCommit(true);
                         catch(SQLException e)
                              try
                                   connections.remove(con);
                                   con=getNewConnection();
                              catch(SQLException er)
                         connections.put(con,Boolean.TRUE);
                         return con;
               try
                    con=getNewConnection();
                    connections.put(con,Boolean.FALSE);
               catch(SQLException er)
               return con;     
     public void releaseConnection(Connection released)
          if(connections.containsKey(released))
               connections.put(released,Boolean.FALSE);
     public void initializePool(Properties props, int initialConnections)
                                     throws SQLException, ClassNotFoundException
          Class.forName(props.getProperty("connection.driver"));
          for(int k=0;k<initialConnections;k++)
               Connection con= getNewConnection();
               connections.put(con,Boolean.FALSE);
     public Connection getNewConnection() throws SQLException
          return DriverManager.getConnection(props.getProperty("connection.url"),props);
public class RetrieveInfoFromDB
     ConnectionPool pool;
     ResultSet rs=null;
     Connection con=null;
    public RetrieveInfoFromDB(Connection con)
          this.con=con;
     /*public String[] getInfo(String field,String table)
public class InsertInfoIntoDB
     ConnectionPool pool;
     Connection con;
     public InsertInfoIntoDB(ConnectionPool pool)
          this.pool=pool;
    public InsertInfoIntoDB(Connection con)
          this.con=con;
     public String[][] parseFile(File temp)
          String[][] S=null;
          try
               String file="";
               String line;
               int lines=0;
               int r=0;
               StringTokenizer tok;
               BufferedReader in=new BufferedReader(new FileReader(temp));
               while((line=in.readLine())!=null)
                    file+=line;
                    lines++;
               tok=new StringTokenizer(file,"^'/n'");
               S = new String[lines][2];
               while(tok.hasMoreTokens())
                    line=tok.nextToken();
                    S[r][0]=line;
                    line=tok.nextToken();
                    S[r][1]=line;
                    r++;     
          catch(FileNotFoundException e)
          catch(IOException er)
          return S;
public class WriteToTempFile
     PrintWriter fout;
     public WriteToTempFile(File temp)
          try
               fout=new PrintWriter(new FileWriter(temp));
          catch(IOException e)
     public void writeln(String param1, String param2)
          fout.println(param1+"^"+param2+"^");
     public void flush()
          fout.flush();
     public void close()
          fout.close();
[-code]

If all the code you posted is in one .java file it won't compile because only one class can be declared as public. The file should have he same name as the public class.
Example
MyClass.java
public class MyClass {
  // some code here
class Helper1 {
  // some code for this class
class Helper2 {
  // some more code
The Helper1 and Helper2 classes will only be accessible by MyClass objects. If you want to make them available to other classes as well, define them in different .java files called Helper1.java and Helper2.java.
Hope this helps,
Calin

Similar Messages

  • Assistance needed regarding a Class Definition Error:

    I've checked online tutorials, asked friends, tried other forums, IRC, online contacts, and NO ONE can help me at this. I've been stuck on it for hours, and I'm beyond the point of frustration, as I'm about 98% complete without this error. I get it when I try to access a file from the command prompt:
    Exception in thread "main" java.lang.NoClassDefFoundError: MiniTriangle
    Everyone tells me it's a Class Definition error. While this is good to know, no one seems to know how to fix it. So I'm here hoping someone knows an answer which could work for this. I sincerely thank you all for your help in advance!

    This will likely be nonsense, lol
    Well..I compiled it in Jcreator, 2 files packed together:
    package myprojects.minitriangle;
    The java files are in the C:\java directory, but they're separate from the compiler since I couldn't get there with the command prompt (Invalid folder name)

  • Duplicate class definition error while invoking EJB from ADF project

    Hi,
    I am using Jdeveloper TP3 and facing the following problem.
    I have built an EJB project and am ran them successfully in the embedded OC4J via a standalone java program.
    Now I created another project with ADF capabilities and when I tried to ping the EJB i get the following exception
    The application named, current-workspace-app, could not start due to an error.
    duplicate class definition: javax/faces/context/FacesContextFactory Invalid class: javax.faces.context.FacesContextFactory Loader
    This is happenning due to class conflicts between javaee.jar and trinidad-impl.jar/adf-richclient-impl.jar.
    Is there any way of bypassing this class loader issue?

    Hi,
    actually I didn' try the JNDI lookup but used resource injection instead
    In a JSF managed bean I use
    @EJB Ejb30SessionFacadeLocal myLocalInterface;
    public SortableModel getTableModel() {
    List rows = new ArrayList<Employees>();
    rows = myLocalInterface.queryEmployeesFindAll();
    this.tableModel = new SortableModel(rows);
    return tableModel;
    Its a EJB 3.0 session bean that accesses a Local interface. However, if the remote is on the same server then I would think that using @EJB Ejb30SessionFacadeRemote myRemoteInterface; does similar
    Frank

  • Java.lang.LinkageError: duplicate class definition

    Dear Experts,
    We are in the process of Migrating current Mi2.5 application to NWM7.1.
    We have that 2.5 application properly running in production system but in 7.1 while opening some JSP page of application
    it sometimes opens properly & sometimes gives this error..
    java.lang.LinkageError: duplicate class definition
    The detailed error description is as given below..
    Pls advice..

    Error: 500
    Location: /ZEFL_BP_MI/jsp/stock/bp_technicians_issue_sparesforms.jsp
    Internal Servlet Error:
    java.lang.LinkageError: duplicate class definition: com/sap/BP/bean/TableViewBean
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at org.apache.tomcat.loader.AdaptiveClassLoader.doDefineClass(AdaptiveClassLoader.java:575)
    at org.apache.tomcat.loader.AdaptiveClassLoader.loadClass(AdaptiveClassLoader.java:542)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.beans.Beans.instantiate(Unknown Source)
    at java.beans.Beans.instantiate(Unknown Source)
    at jsp.stock.bp_0005ftechnicians_0005fissue_0005fsparesforms._jspService(bp_0005ftechnicians_0005fissue_0005fsparesforms.java:101)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
    at org.apache.tomcat.core.Handler.service(Handler.java:287)
    at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
    at org.apache.tomcat.facade.RequestDispatcherImpl.doForward(RequestDispatcherImpl.java:222)
    at org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:162)
    at com.sap.ip.me.api.runtime.jsp.AbstractMEHttpServlet.dispatchRequest(AbstractMEHttpServlet.java:780)
    at com.sap.ip.me.api.runtime.jsp.AbstractMEHttpServlet.doGetThreadSafe(AbstractMEHttpServlet.java:281)
    at com.sap.ip.me.api.runtime.jsp.AbstractMEHttpServlet.doGet(AbstractMEHttpServlet.java:552)
    at com.sap.ip.me.api.runtime.jsp.AbstractMEHttpServlet.service(AbstractMEHttpServlet.java:190)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
    at org.apache.tomcat.core.Handler.service(Handler.java:287)
    at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
    at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:806)
    at org.apache.tomcat.core.ContextManager.service(ContextManager.java:752)
    at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
    at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
    at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
    at java.lang.Thread.run(Unknown Source)
    Regards,
    Saptak

  • Is the "Device Class Definition for Physical Interface Devices" specification implemented in Windows?

    Can I assume that Windows will be able to handle my physical interface device if I follow the "Device Class Definition for Physical Interface Devices" specification while writing the firmware?
    I'm trying to develop a device which handles rumble output from applications such as games. Applications would include e.g. racing games or simulators. I'm hesitant to just clone Xbox 360 Gamepad or Sidewinder USB reports. I'd like to correctly declare my
    device as something on its own while still making use of already implemented OS-specific drivers. The purpose of the mentioned specification is exactly that as far as I can tell. I wasn't able to find concrete information about its level of support though.
    The "USB device class drivers included in Windows" page (sorry I'm not allowed to post links yet..) seems to link to WinUSB which I'm not sure what to do with.

    Thanks for your response. Well if everything was implemented at that time and it's still available it should be fine since the specification document's last version is dated 1999. I was just hoping there would be any form of documentation whether it's
    supported and by which degree so I don't go through the trouble of figuring out how the firmware should be written according to the specification just to find out there is no OS driver implementation for it which would render my work more or less useless.
    So I suppose I'm forced to go the trial and error path?

  • Binary class definition not found: Hello  --- When access the sample

    Hi,
    I followed the the document of
    Oracle9iAS Release 2 Containers for J2ee
    dated 12/01/01
    to deploy the stateless pure java web service, Hello.
    When I hit
    http://server:port/hellows/helloService?wsdl
    I got the generated WSDL
    Also, I can get the proxy class source and jar from
    http://server:port/hellows/helloService?proxy_jar
    http://server:port/hellows/helloService?proxy_source
    However, after I compiled HelloClient and HelloProxy, I got the following error when I tried to access the web service, Hello
    Any advice is appreciated.
    Qiming
    [SOAPException: faultCode=SOAP-ENV:Protocol; msg=Unsupported response content type "text/html", must be: "text/xml". Response was:
    <HTML><HEAD><TITLE>500 Internal Server Error</TITLE></HEAD><BODY><H1>500 Internal Server Error</H1><PRE>oracle.j2ee.xanadu.JasperGenerationError: no source generated during code generation!: 1 in getFile name: \Hello.class
    <br>1 in getFile name: \Hello.java
    <br>error: error message &apos;class.format&apos; not found<br>binary class definition not found: Hello
    <br>
    <br>     at oracle.j2ee.ws.JavaWrapperGenerator.generate(JavaWrapperGenerator.java:267)
    <br>     at oracle.j2ee.ws.RpcWebService.generateWrapperClass(RpcWebService.java:668)
    <br>     a[i]Long postings are being truncated to ~1 kB at this time.

    You may want to try the latest and greatest OC4J 9.0.3 which is on OTN at:
    OC4J 9.0.3: http://otn.oracle.com/software/htdocs/devlic.html?/software/products/ias/htdocs/utilsoft.html
    The updated Web service writeups are in:
    <oc4j_home>\webservices\demo\demo.zip (unzip and look in the <demo_unzip>\basic\java_services\README.txt)
    One thing that might cause your problem is making sure your class path is updated to point to all the right class files as described in the writeup, including the jar file containing the downloaded class files.
    Mike.

  • Getting java.lang.LinkageError: duplicate class definition after new build

    I few weeks ago I started getting :
    java.lang.LinkageError: duplicate class definition every time I tried to access a web app that just got a fresh ANT build to the the web server. The error sites the application's primary servlet class. When I bump the server on I-Planet (6.0), the error goes away. I cannot find a duplicate class anywhere, though. I'm stumped.

    I few weeks ago I started getting :
    java.lang.LinkageError: duplicate class definition every time I tried to access a web app that just got a fresh ANT build to the the web server. The error sites the application's primary servlet class. When I bump the server on I-Planet (6.0), the error goes away. I cannot find a duplicate class anywhere, though. I'm stumped.

  • LinkageError: duplicate class definition

    I am getting some error codes in my webserver log which I can't seem to figure out. I use IPlanet 6.0
    Has anyone seen this error before:
    [14/Feb/2002:16:36:29] failure ( 105): Internal error: Unexpected error condition thrown (unknown exception,no description), stack: java.lang.LinkageError: duplicate class definition: dnt/getNumbers
         at java.lang.ClassLoader.defineClass0(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:426)
         at com.iplanet.server.http.servlet.NSServletLoader.loadResource(NSServletLoader.java:387)
         at com.iplanet.server.http.servlet.NSServletLoader.loadClass(NSServletLoader.java:429)
         at com.iplanet.server.http.servlet.NSServletLoader.findClass(NSServletLoader.java:174)
         at com.iplanet.server.http.servlet.NSServletLoader.loadClass(NSServletLoader.java:106)
         at com.iplanet.server.http.servlet.NSServletEntity.load(NSServletEntity.java:337)
         at com.iplanet.server.http.servlet.NSServletEntity.update(NSServletEntity.java:173)
         at com.iplanet.server.http.servlet.NSServletRunner.Service(NSServletRunner.java:410)
    The interesting thing about this error is that it only happens when the thread is executing for the first time. Which is right after the web server has been started up.
    I've checked that all classes are in the classpath exacty once.
    I have no idea what is causing this.
    Any help would be very appreciated.
    Thank You.
    -Mike

    Hi,
    I hope you have added the classpath in the "context.properties" file, which will be in config directory of your server root directory. You need to restart the server after adding the classpath in the property file.
    Please send me your configuration files, 1)obj.conf 2)magnus.conf 3)error.log 4)jvm12.conf
    Senthil Babu J
    [email protected]

  • Duplicate class definition: com/oracle/bpel/client/ejb/interfaces/IDeliver

    Hi all ,
    I am getting this error every time i try to make a new instance of BPEL process using java API .
    The error is thrown on when I do a post using "deliveryService.post("UserTaskSample", "4.0", "initiate", nm);"
    An exception has occured : java.lang.Exception: Failed to create "ejb/collaxa/system/DeliveryBean" bean; exception reported is: "javax.naming.NamingException: Lookup error: javax.naming.NamingException: duplicate class definition: com/oracle/bpel/client/ejb/interfaces/IDeliveryBeanHome Invalid class: com.oracle.bpel.client.ejb.interfaces.IDeliveryBeanHome Loader: orabpel.root:0.0.0 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/applications/orabpel/ejb_ob_engine.jar Configuration: in D:\product\10.1.3.1\OracleAS_1\j2ee\home\applications\orabpel Dependent class: oracle.oc4j.rmi.ClientRmiTypeCache$InterfaceTypeCache Loader: oc4j:10.1.3 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar Configuration: in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar [Root exception is oracle.classloader.util.AnnotatedLinkageError: duplicate class definition: com/oracle/bpel/client/ejb/interfaces/IDeliveryBeanHome Invalid class: com.oracle.bpel.client.ejb.interfaces.IDeliveryBeanHome Loader: orabpel.root:0.0.0 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/applications/orabpel/ejb_ob_engine.jar Configuration: in D:\product\10.1.3.1\OracleAS_1\j2ee\home\applications\orabpel Dependent class: oracle.oc4j.rmi.ClientRmiTypeCache$InterfaceTypeCache Loader: oc4j:10.1.3 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar Configuration: in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar ]; nested exception is: javax.naming.NamingException: duplicate class definition: com/oracle/bpel/client/ejb/interfaces/IDeliveryBeanHome Invalid class: com.oracle.bpel.client.ejb.interfaces.IDeliveryBeanHome Loader: orabpel.root:0.0.0 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/applications/orabpel/ejb_ob_engine.jar Configuration: in D:\product\10.1.3.1\OracleAS_1\j2ee\home\applications\orabpel Dependent class: oracle.oc4j.rmi.ClientRmiTypeCache$InterfaceTypeCache Loader: oc4j:10.1.3 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar Configuration: in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar [Root exception is oracle.classloader.util.AnnotatedLinkageError: duplicate class definition: com/oracle/bpel/client/ejb/interfaces/IDeliveryBeanHome Invalid class: com.oracle.bpel.client.ejb.interfaces.IDeliveryBeanHome Loader: orabpel.root:0.0.0 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/applications/orabpel/ejb_ob_engine.jar Configuration: in D:\product\10.1.3.1\OracleAS_1\j2ee\home\applications\orabpel Dependent class: oracle.oc4j.rmi.ClientRmiTypeCache$InterfaceTypeCache Loader: oc4j:10.1.3 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar Configuration: in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar ] [Root exception is javax.naming.NamingException: duplicate class definition: com/oracle/bpel/client/ejb/interfaces/IDeliveryBeanHome Invalid class: com.oracle.bpel.client.ejb.interfaces.IDeliveryBeanHome Loader: orabpel.root:0.0.0 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/applications/orabpel/ejb_ob_engine.jar Configuration: in D:\product\10.1.3.1\OracleAS_1\j2ee\home\applications\orabpel Dependent class: oracle.oc4j.rmi.ClientRmiTypeCache$InterfaceTypeCache Loader: oc4j:10.1.3 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar Configuration: in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar [Root exception is oracle.classloader.util.AnnotatedLinkageError: duplicate class definition: com/oracle/bpel/client/ejb/interfaces/IDeliveryBeanHome Invalid class: com.oracle.bpel.client.ejb.interfaces.IDeliveryBeanHome Loader: orabpel.root:0.0.0 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/applications/orabpel/ejb_ob_engine.jar Configuration: in D:\product\10.1.3.1\OracleAS_1\j2ee\home\applications\orabpel Dependent class: oracle.oc4j.rmi.ClientRmiTypeCache$InterfaceTypeCache Loader: oc4j:10.1.3 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar Configuration: in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar ]] at com.evermind.server.rmi.RMIClientContext.lookup(RMIClientContext.java:69) at javax.naming.InitialContext.lookup(InitialContext.java:351) at com.oracle.bpel.client.util.BeanRegistry.lookupDeliveryBean(BeanRegistry.java:279) at com.oracle.bpel.client.delivery.DeliveryService.getDeliveryBean(DeliveryService.java:299) at com.oracle.bpel.client.delivery.DeliveryService.post(DeliveryService.java:194) at com.oracle.bpel.client.delivery.DeliveryService.post(DeliveryService.java:178) at welcome.welcome.doPost(welcome.java:159) at javax.servlet.http.HttpServlet.service(HttpServlet.java:763) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370) at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453) at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111) at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303) at java.lang.Thread.run(Thread.java:595) Caused by: javax.naming.NamingException: duplicate class definition: com/oracle/bpel/client/ejb/interfaces/IDeliveryBeanHome Invalid class: com.oracle.bpel.client.ejb.interfaces.IDeliveryBeanHome Loader: orabpel.root:0.0.0 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/applications/orabpel/ejb_ob_engine.jar Configuration: in D:\product\10.1.3.1\OracleAS_1\j2ee\home\applications\orabpel Dependent class: oracle.oc4j.rmi.ClientRmiTypeCache$InterfaceTypeCache Loader: oc4j:10.1.3 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar Configuration: in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar [Root exception is oracle.classloader.util.AnnotatedLinkageError: duplicate class definition: com/oracle/bpel/client/ejb/interfaces/IDeliveryBeanHome Invalid class: com.oracle.bpel.client.ejb.interfaces.IDeliveryBeanHome Loader: orabpel.root:0.0.0 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/applications/orabpel/ejb_ob_engine.jar Configuration: in D:\product\10.1.3.1\OracleAS_1\j2ee\home\applications\orabpel Dependent class: oracle.oc4j.rmi.ClientRmiTypeCache$InterfaceTypeCache Loader: oc4j:10.1.3 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar Configuration: in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar ] at com.evermind.server.rmi.RMICall.throwRecordedException(RMICall.java:100) at com.evermind.server.rmi.RMIClientConnection.waitForJndiResponse(RMIClientConnection.java:425) at com.evermind.server.rmi.RMIClientConnection.lookup(RMIClientConnection.java:233) at com.evermind.server.rmi.RMIClient.lookup(RMIClient.java:302) at com.evermind.server.rmi.RMIClientContext.lookup(RMIClientContext.java:56) ... 18 more Caused by: oracle.classloader.util.AnnotatedLinkageError: duplicate class definition: com/oracle/bpel/client/ejb/interfaces/IDeliveryBeanHome Invalid class: com.oracle.bpel.client.ejb.interfaces.IDeliveryBeanHome Loader: orabpel.root:0.0.0 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/applications/orabpel/ejb_ob_engine.jar Configuration: in D:\product\10.1.3.1\OracleAS_1\j2ee\home\applications\orabpel Dependent class: oracle.oc4j.rmi.ClientRmiTypeCache$InterfaceTypeCache Loader: oc4j:10.1.3 Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar Configuration: in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar at oracle.classloader.PolicyClassLoader.defineClass(PolicyClassLoader.java:2287) at oracle.classloader.PolicyClassLoader.findLocalClass(PolicyClassLoader.java:1462) at oracle.classloader.SearchPolicy$FindLocal.getClass(SearchPolicy.java:167) at oracle.classloader.SearchSequence.getClass(SearchSequence.java:119) at oracle.classloader.SearchPolicy.loadClass(SearchPolicy.java:645) at oracle.classloader.PolicyClassLoader.askParentForClass(PolicyClassLoader.java:1289) at oracle.classloader.SearchPolicy$AskParent.getClass(SearchPolicy.java:68) at oracle.classloader.SearchSequence.getClass(SearchSequence.java:119) at oracle.classloader.SearchPolicy.loadClass(SearchPolicy.java:645) at oracle.classloader.PolicyClassLoader.askParentForClass(PolicyClassLoader.java:1289) at oracle.classloader.SearchPolicy$AskParent.getClass(SearchPolicy.java:68) at oracle.classloader.SearchSequence.getClass(SearchSequence.java:119) at oracle.classloader.PolicyClassLoader.internalLoadClass(PolicyClassLoader.java:1674) at oracle.classloader.PolicyClassLoader.loadClass(PolicyClassLoader.java:1635) at java.lang.ClassLoader.loadClass(ClassLoader.java:299) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:242) at oracle.oc4j.rmi.ClientRmiTypeCache$InterfaceTypeCache.getNamedInterfaces(ClientRmiTypeCache.java:98) at oracle.oc4j.rmi.ClientRmiTypeCache$InterfaceTypeCache.getInterfaceType(ClientRmiTypeCache.java:85) at oracle.oc4j.rmi.ClientRmiTypeCache.getCachedType(ClientRmiTypeCache.java:33) at com.evermind.server.rmi.RMIClientConnection.getBoundObject(RMIClientConnection.java:1018) at com.evermind.server.rmi.RMIClientInputStream.resolveObject(RMIClientInputStream.java:26) at java.io.ObjectInputStream.checkResolve(ObjectInputStream.java:1346) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339) at com.evermind.server.rmi.RMIClientConnection.handleLookupResponse(RMIClientConnection.java:879) at com.evermind.server.rmi.RMIClientConnection.handleOrmiCommandResponse(RMIClientConnection.java:337) at com.evermind.server.rmi.RMIClientConnection.dispatchResponse(RMIClientConnection.java:296) at com.evermind.server.rmi.RMIClientConnection.processReceivedCommand(RMIClientConnection.java:278) at com.evermind.server.rmi.RMIConnection.handleCommand(RMIConnection.java:152) at com.evermind.server.rmi.RMIConnection.listenForOrmiCommands(RMIConnection.java:127) at com.evermind.server.rmi.RMIConnection.run(RMIConnection.java:107) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303) at java.lang.Thread.run(Thread.java:595) at com.evermind.server.rmi.RMICall.warningExceptionOriginatesFromTheRemoteServer(RMICall.java:109) at com.evermind.server.rmi.RMICall.throwRecordedException(RMICall.java:91) ... 22 more Caused by: java.lang.LinkageError: duplicate class definition: com/oracle/bpel/client/ejb/interfaces/IDeliveryBeanHome at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at oracle.classloader.PolicyClassLoader.defineClass(PolicyClassLoader.java:2241) at oracle.classloader.PolicyClassLoader.findLocalClass(PolicyClassLoader.java:1462) at oracle.classloader.SearchPolicy$FindLocal.getClass(SearchPolicy.java:167) at oracle.classloader.SearchSequence.getClass(SearchSequence.java:119) at oracle.classloader.SearchPolicy.loadClass(SearchPolicy.java:645) at oracle.classloader.PolicyClassLoader.askParentForClass(PolicyClassLoader.java:1289) at oracle.classloader.SearchPolicy$AskParent.getClass(SearchPolicy.java:68) at oracle.classloader.SearchSequence.getClass(SearchSequence.java:119) at oracle.classloader.SearchPolicy.loadClass(SearchPolicy.java:645) at oracle.classloader.PolicyClassLoader.askParentForClass(PolicyClassLoader.java:1289) at oracle.classloader.SearchPolicy$AskParent.getClass(SearchPolicy.java:68) at oracle.classloader.SearchSequence.getClass(SearchSequence.java:119) at oracle.classloader.PolicyClassLoader.internalLoadClass(PolicyClassLoader.java:1674) at oracle.classloader.PolicyClassLoader.loadClass(PolicyClassLoader.java:1635) at java.lang.ClassLoader.loadClass(ClassLoader.java:299) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:242) at oracle.oc4j.rmi.ClientRmiTypeCache$InterfaceTypeCache.getNamedInterfaces(ClientRmiTypeCache.java:98) at oracle.oc4j.rmi.ClientRmiTypeCache$InterfaceTypeCache.getInterfaceType(ClientRmiTypeCache.java:85) at oracle.oc4j.rmi.ClientRmiTypeCache.getCachedType(ClientRmiTypeCache.java:33) at com.evermind.server.rmi.RMIClientConnection.getBoundObject(RMIClientConnection.java:1018) at com.evermind.server.rmi.RMIClientInputStream.resolveObject(RMIClientInputStream.java:26) at java.io.ObjectInputStream.checkResolve(ObjectInputStream.java:1346) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339) at com.evermind.server.rmi.RMIClientConnection.handleLookupResponse(RMIClientConnection.java:879) at com.evermind.server.rmi.RMIClientConnection.handleOrmiCommandResponse(RMIClientConnection.java:337) at com.evermind.server.rmi.RMIClientConnection.dispatchResponse(RMIClientConnection.java:296) at com.evermind.server.rmi.RMIClientConnection.processReceivedCommand(RMIClientConnection.java:278) at com.evermind.server.rmi.RMIConnection.handleCommand(RMIConnection.java:152) at com.evermind.server.rmi.RMIConnection.listenForOrmiCommands(RMIConnection.java:127) at com.evermind.server.rmi.RMIConnection.run(RMIConnection.java:107) ... 2 more ".

    Hi,
    Thanks for the reply since I am quite new to BPEl can you elaborate a bit on this .
    What I did was
    1. I created a Async BPEL process in JDeveloper and in the same project I put my servlet code and html part when I deploy it on the server and ascess it the welcome jsp is displayed when I click submit on wecome.jsp it forwards to servlet and there the error originates .
    2 If instead I deploy the BPEl process seperately and the try to access the BPEL process using my JDeveloper java code I don't get any error it works fine.
    3 I have included config and schema folders in source path . wf_client_config.xml,user-properties.xml and wf-config.xml is also present in the source folder.
    4 Along with this the jars needed have been also added.
    So when I deploy the BPEL process created in 1 above from Jdeveloper it creates a .ear in j2ee\home\applications and the deploys it .This .ear doesn't has any .class files .
    I take bpelclasses.jar from the .jar which is created when I compile the project and put it in the j2ee\home\applib folder and made an entry for it in the server.xml file.After this it is able to get .class files.
    If there is any alternate way to do the same thing kindly tell me .
    Thanks
    Pranay

  • Duplicate class definition: oracle/jdbc/driver/OracleDriver

    Hi
    I using Jdeveloper 10.1.3.3 and I tried to add jdbc driver version 11.1.0.6.0 to Project by add Library to the project property. And I tried to run my application when step to connect database the program will occur the error.
    This below is the error
    500 Internal Server Error
    oracle.classloader.util.AnnotatedLinkageError: duplicate class definition: oracle/jdbc/driver/OracleDriver
         Invalid class: oracle.jdbc.driver.OracleDriver
         Loader: current-workspace-app.root:0.0.0
         Code-Source: /D:/oracle/jdbc/11/ojdbc5.jar
         Configuration: <library> in /D:/Jdev10133/jdev/mywork/Trainning/Trainning-oc4j-app.xml
         Dependent class: java.sql.DriverManager
         Loader: jre.bootstrap:1.5.0_06
         Code-Source: unknown
         Configuration: jre bootstrap
         at oracle.classloader.PolicyClassLoader.findLocalClass (PolicyClassLoader.java:1462) [D:/Jdev10133/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@17332331]     at oracle.classloader.SearchPolicy$FindLocal.getClass (SearchPolicy.java:167) [D:/Jdev10133/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@17332331]     at oracle.classloader.SearchSequence.getClass (SearchSequence.java:119) [D:/Jdev10133/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@17332331]     at oracle.classloader.SearchPolicy.loadClass (SearchPolicy.java:645) [D:/Jdev10133/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@17332331]     at oracle.classloader.PolicyClassLoader.askParentForClass (PolicyClassLoader.java:1289) [D:/Jdev10133/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@17332331]     at oracle.classloader.SearchPolicy$AskParent.getClass (SearchPolicy.java:68) [D:/Jdev10133/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@17332331]     at oracle.classloader.SearchSequence.getClass (SearchSequence.java:119) [D:/Jdev10133/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@17332331]     at oracle.classloader.PolicyClassLoader.internalLoadClass (PolicyClassLoader.java:1674) [D:/Jdev10133/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@17332331]     at oracle.classloader.PolicyClassLoader.loadClass (PolicyClassLoader.java:1635) [D:/Jdev10133/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@17332331]     at oracle.classloader.PolicyClassLoader.loadClass (PolicyClassLoader.java:1620) [D:/Jdev10133/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@17332331]     at java.lang.ClassLoader.loadClassInternal (ClassLoader.java:319) [jre bootstrap, by jre.bootstrap:1.5.0_06]     at java.lang.Class.forName0 (Native method) [unknown, by unknown]     at java.lang.Class.forName (Class.java:242) [jre bootstrap, by jre.bootstrap:1.5.0_06]     at java.sql.DriverManager.getCallerClass (DriverManager.java:442) [jre bootstrap, by jre.bootstrap:1.5.0_06]     at java.sql.DriverManager.getConnection (DriverManager.java:519) [jre bootstrap, by jre.bootstrap:1.5.0_06]     at java.sql.DriverManager.getConnection (DriverManager.java:171) [jre bootstrap, by jre.bootstrap:1.5.0_06]     at com.util.Util.getConnection (Util.java:14) [D:/Jdev10133/jdev/mywork/Trainning/DBProgramming/classes/ (from <classpath> in D:\Jdev10133\jdev\mywork\Trainning\DBProgramming\public_html), by current-workspace-app.web.dbprogram:0.0.0]     at com.blob.BLOBTest.uploadFileToDB (BLOBTest.java:37) [D:/Jdev10133/jdev/mywork/Trainning/DBProgramming/classes/ (from <classpath> in D:\Jdev10133\jdev\mywork\Trainning\DBProgramming\public_html), by current-workspace-app.web.dbprogram:0.0.0]     at com.upload.doPost (upload.java:28) [D:/Jdev10133/jdev/mywork/Trainning/DBProgramming/classes/ (from <classpath> in D:\Jdev10133\jdev\mywork\Trainning\DBProgramming\public_html), by current-workspace-app.web.dbprogram:0.0.0]     at javax.servlet.http.HttpServlet.service (HttpServlet.java:763) [D:/Jdev10133/j2ee/home/lib/servlet.jar (from <code-source> (ignore manifest Class-Path) in META-INF/boot.xml in D:\Jdev10133\j2ee\home\oc4j.jar), by api:1.4.0]     at javax.servlet.http.HttpServlet.service (HttpServlet.java:856) [D:/Jdev10133/j2ee/home/lib/servlet.jar (from <code-source> (ignore manifest Class-Path) in META-INF/boot.xml in D:\Jdev10133\j2ee\home\oc4j.jar), by api:1.4.0]     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.invoke (ServletRequestDispatcher.java:713) [D:/Jdev10133/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\Jdev10133\j2ee\home\oc4j.jar), by oc4j:10.1.3]     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.forwardInternal (ServletRequestDispatcher.java:370) [D:/Jdev10133/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\Jdev10133\j2ee\home\oc4j.jar), by oc4j:10.1.3]     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.doProcessRequest (HttpRequestHandler.java:871) [D:/Jdev10133/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\Jdev10133\j2ee\home\oc4j.jar), by oc4j:10.1.3]     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.processRequest (HttpRequestHandler.java:453) [D:/Jdev10133/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\Jdev10133\j2ee\home\oc4j.jar), by oc4j:10.1.3]     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.serveOneRequest (HttpRequestHandler.java:221) [D:/Jdev10133/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\Jdev10133\j2ee\home\oc4j.jar), by oc4j:10.1.3]     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run (HttpRequestHandler.java:122) [D:/Jdev10133/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\Jdev10133\j2ee\home\oc4j.jar), by oc4j:10.1.3]     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run (HttpRequestHandler.java:111) [D:/Jdev10133/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\Jdev10133\j2ee\home\oc4j.jar), by oc4j:10.1.3]     at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run (ServerSocketReadHandler.java:260) [D:/Jdev10133/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\Jdev10133\j2ee\home\oc4j.jar), by oc4j:10.1.3]     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run (ReleasableResourcePooledExecutor.java:303) [D:/Jdev10133/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\Jdev10133\j2ee\home\oc4j.jar), by oc4j:10.1.3]     at java.lang.Thread.run (Thread.java:595) [jre bootstrap, by jre.bootstrap:1.5.0_06]
    Please help to suggest me. How should I do to let out this error?
    Thanks

    many people use the two interchangeably, though technically it can mean something different.
    What you get back from a call to newInstance() is the same as what you'd get when using the new keyword and no constructor arguments, a reference to an instance of a class (there are other ways to dynamically create an instance using other constructors).
    "Creating a class object" technically means loading the class which causes a Class instance (so an instance of the class Class) to be created for that particular class, making the class available to the JVM for instantiation of instances.
    newInstance() and its sisters are useful for when the class to be instantiated is not known (or even doesn't exist) when compiling the class that needs to instantiate it.
    This is of course the case with JDBC. The people creating the JVM can't know what driver classes will be out there at some point in the future (and if they did know and have access to all of them in the past it would still be foolish to have them all hardwired into the JVM).

  • Class definition not found

    Hi
    I am getting an error with the message ' xml token writer ' class definition not found.May you please provide the API that I should use to make this class available..
    Thanks in advance,
    Sudeep.

    Hi ,
      I have created an application which accepts a user request for data transfer  from a source system to target system viz. Primavera project planner and SAP project system.
    The application verifies the data on the source and target system before actually transferring data.The info is displayed to the user and only when the user clicks transfer button is the data transferred.
    When the data size is small,the transferred successfully.
    However , when data size is large, the application gives XML Token Writer Class not found exception.
    Thanks in advance.

  • AS3 alternatives to *_exclude.xml files, loading class definitions dynamically

    I've been banging my head against a wall for this for almost a couple days now and hoping that someone can point me in the right direction.
    Working in a very large Flash application, previously in AS2/CS3 I would have a setup like the following:
    root.swf
    -- modules
    ---- code_a.swf
    ---- code_b.swf
    -- views
    ---- view_a.swf
    ---- view_b.swf
    Using _exclude.xml files, I could exclude the classes defined in code_a and code_b from the ouptut .swf of view_a and view_b. root.swf would be responsible for loading the code modules before view_a or view_b, ensuring that class definitions that view_a and view_b depended on existed.
    The Problem
    We've recently migrated to using Actionscript 3/CS5. *_exclude.xml files no longer exist. To get the same functionality as above, I've tried the following:
    My setup now looks something like:
    root.swf
    -- modules
    ---- class_a.as
    ---- class_b.as
    -- views
    ---- view_a.swf
    ---- view_b.swf
    Use mxmlc to compile root.swf, view_a.swf and view_b.swf, passing it -externs option to specify classes that will be loaded externally (the two classes in modules). This ensures that the class is excluded from the compiled swf.
    Use compc to compile class_a.as and class_b.as into classes.swf, using -directory=true to access library.swf for external loading.
    However, when I try running one of the two view files which depend on classes.swf, I get runtime errors telling me that a class definition is not present.
    Current Workaround
    I've devised a workaround which I'm currently not happy with as it's backwards to the modular approach that I was previously using:
    Rather than loading the code modules, I statically link all class definitions required by child movies intoroot.swf. When building root.swf, I use the -link-report option of mxmlc to provide a list of included classes. When building child swfs, I can the use -load-externs to ensure that class definitions that already exist will not be included in the compile output.
    Is there a way that anyone is aware of to replicate the AS2/_exclude.xml solution that I had using AS3/CS5?

    I'd double check if you are loading the child SWF with correct LoaderContext and/or calling ApplicationDomain.getDefinition() correctly - otherwise you cannot access classes defined in loaded SWF files.

  • Help on simple class definition

    This is just the class definition (main() is in its own file, but I was wondering if someone could help me figure out what is wrong w/ the code. I am trying to make a simple program that asks, "what is your name?", than you enter your name, and it says "hello, john, today is feb, 3rd" (or whatever).
    I'm not even sure if the code is right to do what I want to do, but I can't really figure that out if it won't compile.
    Oh, and here is the error message I am getting.
    HelloWorld.java:26: ')' expected
    System.out.println ("Hello " + yourName
    ^
    1 error
    import java.util.*;
    import java.io.*;
    class HelloWorld extends Object
    HelloWorld()
    BufferedReader in = new BufferedReader (new
    InputStreamReader(System.in));
    Date currentDate = new Date();
    String yourname;
    System.out.println ("Hello, please enter your name: ");
    yourName = in.readLine();
    System.out.println ("Hello " + yourName
    "Today is, " + currentDate );

    At this point in your code a java.io.IOException might occur.
    You have to declare your exception to be thrown:
    HelloWorld() throws IOException Or you catch the occuring exception in a try-catch-block:
    HelloWorld()
      try
       //your code here
      catch (IOException e)
       //What should be done with the exception
    Guinevere                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Defining variables from a class gives errors

    Hi,
    I'm trying to create a questionnaire, that can hold an array
    of questions.
    The questions can be of different types, like single punch,
    multi punch, open text etc.
    Much of the code below is copied from examples I've found and
    I am definitely in the beginning
    of my learning process when it comes to Flex, but I think
    Flex can solve a problem I have at work.
    So, I'm trying to cut corners...
    I created this class called Questions, which contains all
    properties any question can have.
    When I'm trying to define a variable (myQuestion) based on
    that class, I the following error.
    (actually I get it on all properties...)
    Error:
    1120: Access of undefined property Qtype.
    This is the class definition:
    package Mycomponents
    //import other classes needed
    //import Mycomponents.Codeframe
    public class Question {
    // Define properties and methods.
    // Define public vars.
    public var Qtype:String="";
    public var Condition:String="";
    public var Qnumber:String="";
    public var Qheading:String="";
    public var Pretext:String="";
    public var Qtext:String="";
    public var Posttext:String="";
    public var Codeframe:String;
    public var Reserved:String="";
    public var EditableFrom:String="";
    public var EditableTo:String="";
    public var Decimal:String="";
    public var SetQfactor:String="";
    public var Logic_if:String="";
    public var Logic_then:String="";
    // Public constructor.
    public function Question(
    Qtype:String,
    Condition:String,
    Qnumber:String,
    Qheading:String,
    Pretext:String,
    Qtext:String,
    Posttext:String,
    Codeframe:String,
    Reserved:String,
    EditableFrom:String,
    EditableTo:String,
    Decimal:String,
    SetQfactor:String,
    Logic_if:String,
    Logic_then:String )
    this.Qtype=Qtype;
    this.Condition=Condition;
    this.Qnumber=Qnumber;
    this.Qheading=Qheading;
    this.Pretext=Pretext;
    this.Qtext=Qtext;
    this.Posttext=Posttext;
    this.Codeframe=Codeframe;
    this.Reserved=Reserved;
    this.EditableFrom=EditableFrom;
    this.EditableTo=EditableTo;
    this.Decimal=Decimal;
    this.SetQfactor=SetQfactor;
    this.Logic_if=Logic_if;
    this.Logic_then=Logic_then;
    This is the part of the code that generates the error:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:Script>
    <![CDATA[
    import mx.states.State;
    import mx.controls.Alert;
    import mx.events.CloseEvent;
    import flash.events.KeyboardEvent;
    import Mycomponents.Codeframe;
    import Mycomponents.Question;
    public var myQuestion:Question = new Question(
    Qtype,
    Condition,
    Qnumber,
    Qheading,
    Pretext,
    Qtext,
    Posttext,
    Codeframe,
    Reserved,
    EditableFrom,
    EditableTo,
    Decimal,
    SetQfactor,
    Logic_if,
    Logic_then
    ....more code...
    ...what am I missing in defining this variable?
    If you have a link to a good book on Flex...let me know.
    Regards
    /Acke

    When you create your local variable myQuestion, where are the
    parameters (used in the constructor) declared and initialized?
    var _qType = "some value";
    var myQ:Question = new Question(_qType,"","" etc);
    Also good OO practice is to declare your variables as private
    and add getters and setters for the values. Sometimes you may want
    to manipulate the values when getting or setting.
    If you use the standard AS3 get and set then declare your
    vars with an _
    so as not to conflict with the getter and setter. For exampe:
    public class MyClass
    private var _var1:String;
    public function get var1():String
    return _var1;
    public function set var1(v:String):void
    _var1 = v;
    This may seem like extra work, but in a complex application
    with lots of classes
    encapsulating updating of members will save you lots of
    headaches.

  • Duplicate class definition: org/apache/jasper/runtime/HttpJspBase

    I am getting a duplicate class definition in an web server class. I have no idea how to solve this, besides the errors appears only sometimes...
    Any ideas ???
    duplicate class definition: org/apache/jasper/runtime/HttpJspBase
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:484).

    I'm getting exactly the same problem and I can't see a proper solution.
    I would appreciate any help.
    Thanks,
    Mauro.

Maybe you are looking for

  • How can i unlock my ipod touch? It is just saying disabled with no option to reset password???

    How can i unlock my ipod touch if the screen keeps saying "ipod is disabled" with no option to enter my password???

  • EJB Store called in a loop

    I am having a problem porting our application from weblogic5.1 (EJB1.1) to weblogic8.1 (EJB2.0) My current problem is an ejbStore called in a loop during a finder method call of a BMP entity bean. The outer session bean calls entity beans in a transa

  • Please note original maintainer when moving pkg to community

    Hello, i maintain the package subdl in AUR. Well, at least i did before it got moved to community. Despite the fact, that subdl is a really great programm (really, have a look at it if you don't like horribly dubbed movies but are too lazy to search

  • How to use  mmpur_remove_messages_by_id  ?

    sap ver. 4.7 badi  ME_PURCHDOC_POSTED transction  : me32k how to use  mmpur_remove_messages_by_id  ? what is the parameter (im_id)  that i have to add ? i am using "MMPUR_MESSAGE_FORCED"  to add error message  , it look like it do the job , but after

  • Miss match of grad total

    Hi All, In my cube i have a scenario like ,one measure should act in different ways like base measure name is Rx(followed by some scope statements as shown below) Explanation:I have written calculated measure for this particular Rx and it is a simple