Java.lang.InstantiationException on user defined class

Hi all,
I'm getting the following exception.
Portable(java.io.IOException): An exception occurred instantiating a PortableObject user type from a POF stream: type-id=2001, class-name=com.inmdb.CacheRowDataExtractor, exception=
java.lang.InstantiationException: com.inmdb.CacheRowDataExtractor
at com.tangosol.io.pof.PortableObjectSerializer.deserialize(PortableObjectSerializer.java:121)
at com.tangosol.io.pof.PofBufferReader.readAsObject(PofBufferReader.java:3293)
at com.tangosol.io.pof.PofBufferReader.readObject(PofBufferReader.java:2600)
at com.tangosol.util.filter.ExtractorFilter.readExternal(ExtractorFilter.java:165)
at com.tangosol.util.filter.ComparisonFilter.readExternal(ComparisonFilter.java:227)
at com.tangosol.util.filter.LikeFilter.readExternal(LikeFilter.java:367)
at com.tangosol.io.pof.PortableObjectSerializer.initialize(PortableObjectSerializer.java:153)
at com.tangosol.io.pof.PortableObjectSerializer.deserialize(PortableObjectSerializer.java:128)
at com.tangosol.io.pof.PofBufferReader.readAsObject(PofBufferReader.java:3293)
at com.tangosol.io.pof.PofBufferReader.readAsObjectArray(PofBufferReader.java:3337)
at com.tangosol.io.pof.PofBufferReader.readObjectArray(PofBufferReader.java:2169)
at com.tangosol.util.filter.ArrayFilter.readExternal(ArrayFilter.java:235)
at com.tangosol.io.pof.PortableObjectSerializer.initialize(PortableObjectSerializer.java:153)
at com.tangosol.io.pof.PortableObjectSerializer.deserialize(PortableObjectSerializer.java:128)
at com.tangosol.io.pof.PofBufferReader.readAsObject(PofBufferReader.java:3293)
at com.tangosol.io.pof.PofBufferReader.readObject(PofBufferReader.java:2600)
at com.tangosol.io.pof.ConfigurablePofContext.deserialize(ConfigurablePofContext.java:348)
at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.readObject(Service.CDB:4)
at com.tangosol.coherence.component.net.Message.readObject(Message.CDB:1)
at com.tangosol.coherence.component.net.message.requestMessage.distributedCacheRequest.partialRequest.FilterRequest.read(FilterRequest.CDB:8)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$QueryRequest.read(DistributedCache.CDB:1)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:123)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onNotify(DistributedCache.CDB:3)
at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
at java.lang.Thread.run(Thread.java:595)
at <process boundary>
at com.tangosol.io.pof.ThrowablePofSerializer.deserialize(ThrowablePofSerializer.java:57)
at com.tangosol.io.pof.PofBufferReader.readAsObject(PofBufferReader.java:3293)
at com.tangosol.io.pof.PofBufferReader.readObject(PofBufferReader.java:2600)
at com.tangosol.io.pof.PortableException.readExternal(PortableException.java:150)
at com.tangosol.io.pof.ThrowablePofSerializer.deserialize(ThrowablePofSerializer.java:58)
at com.tangosol.io.pof.PofBufferReader.readAsObject(PofBufferReader.java:3293)
at com.tangosol.io.pof.PofBufferReader.readObject(PofBufferReader.java:2600)
at com.tangosol.io.pof.ConfigurablePofContext.deserialize(ConfigurablePofContext.java:348)
at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.readObject(Service.CDB:4)
at com.tangosol.coherence.component.net.Message.readObject(Message.CDB:1)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$QueryResponse.read(DistributedCache.CDB:33)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:123)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onNotify(DistributedCache.CDB:3)
at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
at java.lang.Thread.run(Thread.java:595)
class looks like:-
public class CacheRowDataExtractor extends AbstractExtractor implements
          PortableObject, Serializable {
// code
What could be the problem?
Thanks in advance,
Rony

Hi Rony,
Yes it is mandatory. The default POF serializer just calls newInstance() on the Class to create an instance and it has no way of knowing how to call parameterised constructors. If you must have parameterised constructors then you would need to use external serializers rather than implement PortableObject. The docs are here: http://docs.oracle.com/cd/E24290_01/coh.371/e22837/api_pof.htm#BABEJCFF
Does your Dev environment only have a single Coherence process, if so then nothing will be getting serialised so you will not see this sort of error. This is a common dev mistake and if possible you should always write Dev tests to use multiple nodes and also write unit tests to test POF serialisation.
Writing a unit test is pretty easy...
ConfigurablePofContext ctx = new ConfigurablePofContext("... name of your pof config file ...");
CacheRowDataExtractor value = new CacheRowDataExtractor......
Binary binary = ExternalizableHelper.toBinary(value, ctx);
CacheRowDataExtractor result = (CacheRowDataExtractor) ExternalizableHelper.fromBinary(binary, ctx);
... now assert result is equal to original value ...JK

Similar Messages

  • Java.lang.InstantiationException when using Action class with constructor

    Hi everyone,
    I'm using the insertNewNode() method from this class in another action class, which works fine. But when this action itself is called, I get an infinite java.lang.InstantiationException (until the stack is overflowed). I'm initiating the fields required in every method in a constructor. If there is no constructor, this action works fine again. What's wrong?
    public class GliederungNewAction implements Action {
         private final String DEFAULT_DESCRIPTION = "Neuer Punkt";
         private OracleConnection connection;
         private String username;
         private String catalogue;
         private String attribute;
         private String parent_attr;
         private int parent_sequenceNr;
         private int requiredSequenceNumber;
         public GliederungNewAction(OracleConnection connection, String username, String catalogue) {
              this.connection = connection;
              this.username = username;
              this.catalogue = catalogue;
         public String perform(ActionMapping mapping, HttpServletRequest request,
                   HttpServletResponse response) {
              HttpSession session = request.getSession();
              // fetch the necessary parameters from the JSP site
              // the parent attribute is the selected attribute!
              parent_attr = request.getParameter("attr");
              catalogue = request.getParameter("catalogue");
              parent_sequenceNr = Integer.parseInt(request.getParameter("sort_sequence"));
              username = session.getAttribute("username").toString().toUpperCase();
              // connect to database    
              db.SessionConnection sessConn = (db.SessionConnection) session.getAttribute("connection");
              if (sessConn != null) {
                   try {
                        sessConn.setAutoCommit(false);
                        connection = (OracleConnection)sessConn.getConnection();
                        // insert the new node into DB
                        insertNewNode(DEFAULT_DESCRIPTION, parent_attr, parent_sequenceNr);               
                        connection.commit();
                        // set attributes for JSP post-action operations
                        request.setAttribute("attr", attribute);
                        request.setAttribute("parent_attr", parent_attr);
                   } catch(SQLException ex) {
                        if ( ex.getErrorCode() == 20001 ) {
                             return "error_edit.do";
                        } else { // for all other error codes, rollback and return general error page
                             try {
                                  connection.rollback();
                                  ex.printStackTrace();
                                  return "error_general.do";
                             } catch (SQLException e) {
                                  System.err.println("Rollback failed!");
                                  e.printStackTrace();
                                  return "error_general.do";
                             } // end of catch     
                        } // end of else
                   } // end of catch
              return mapping.getForward();
            // sample method
          * Creates, fills and executes a prepared statement to insert a new entry into the specified table, representing
          * a new node in the catalogue.
          * @param parent_attr TODO
          * @param parent_sequenceNr TODO
          * @throws SQLException
         public void insertNewNode(String description, String parent_attr, int parent_sequenceNr) throws SQLException {
                   requiredSequenceNumber = getRequiredSequenceNumber(parent_attr, parent_sequenceNr);
                   int freeSequenceNumber = getFreeSequenceNumber(requiredSequenceNumber);
                   int lastPosition = getLastNodePosition( getLastChildAttribute(parent_attr) );
                   attribute = createNewNodeAttribute(parent_attr, lastPosition);
                   String callAddNode = "{ call package.addNode(:1, :2, :3, :4, :5, :6, :7) }";
                   CallableStatement cst;
                   cst = connection.prepareCall(callAddNode);
                   cst.setString(1, username );
                   cst.setString(2, catalogue);
                   cst.setString(3, attribute);
                   cst.setString(4, parent_attr);
                   cst.setString(5, description);
                   cst.setInt(6, requiredSequenceNumber);
                   cst.setInt(7, freeSequenceNumber);
                   cst.execute();
                   cst.close();
    java.lang.InstantiationException: action.GliederungNewAction
         at java.lang.Class.newInstance0(Unknown Source)
         at java.lang.Class.newInstance(Unknown Source)
         at action.ActionMapping.perform(ActionMapping.java:54)
         at ControllerServlet.doResponse(ControllerServlet.java:92)
         at ControllerServlet.doPost(ControllerServlet.java:50)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679)
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:431)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:355)
         at ControllerServlet.doResponse(ControllerServlet.java:103)
         at ControllerServlet.doPost(ControllerServlet.java:50)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         .......

    You're welcome.
    Still, I would report this as a bug at the Struts mailinglist/issuetracker. This silly behaviour shouldn't happen. Once an InstantiationException, okay, but in an infinite loop?!? That's definately a bug. Also the detail message may be more informative, e.g. "No default constructor found" or so.

  • Pass an array of a user defined class to a stored procedure in java

    Hi All,
    I am trying to pass an array of a user defined class as an input parameter to a stored procedure. So far i have done the following:
    Step 1: created an object type.
    CREATE TYPE department_type AS OBJECT (
    DNO NUMBER (10),
    NAME VARCHAR2 (50),
    LOCATION VARCHAR2 (50)
    Step 2: created a varray of the above type.
    CREATE TYPE dept_array1 AS TABLE OF department_type;
    Step 3:Created a package to insert the records.
    CREATE OR REPLACE PACKAGE objecttype
    AS
    PROCEDURE insert_object (d dept_array);
    END objecttype;
    CREATE OR REPLACE PACKAGE BODY objecttype
    AS
    PROCEDURE insert_object (d dept_array)
    AS
    BEGIN
    FOR i IN d.FIRST .. d.LAST
    LOOP
    INSERT INTO department
    VALUES (d (i).dno,d (i).name,d (i).location);
    END LOOP;
    END insert_object;
    END objecttype;
    Step 4:Created a java class to map the columns of the object type.
    public class Department
    private double DNO;
    private String Name;
    private String Loation;
    public void setDNO(double DNO)
    this.DNO = DNO;
    public double getDNO()
    return DNO;
    public void setName(String Name)
    this.Name = Name;
    public String getName()
    return Name;
    public void setLoation(String Loation)
    this.Loation = Loation;
    public String getLoation()
    return Loation;
    Step 5: created a method to call the stored procedure.
    public static void main(String arg[]){
    try{
    Department d1 = new Department();
    d1.setDNO(1); d1.setName("Accounts"); d1.setLoation("LHR");
    Department d2 = new Department();
    d2.setDNO(2); d2.setName("HR"); d2.setLoation("ISB");
    Department[] deptArray = {d1,d2};
    OracleCallableStatement callStatement = null;
    DBConnection dbConnection= DBConnection.getInstance();
    Connection cn = dbConnection.getDBConnection(false); //using a framework to get connections
    ArrayDescriptor arrayDept = ArrayDescriptor.createDescriptor("DEPT_ARRAY", cn);
    ARRAY deptArrayObject = new ARRAY(arrayDept, cn, deptArray); //I get an SQLException here
    callStatement = (OracleCallableStatement)cn.prepareCall("{call objecttype.insert_object(?)}");
    ((OracleCallableStatement)callStatement).setArray(1, deptArrayObject);
    callStatement.executeUpdate();
    cn.commit();
    catch(Exception e){ 
    System.out.println(e.toString());
    I get the following exception:
    java.sql.SQLException: Fail to convert to internal representation
    My question is can I pass an array to a stored procedure like this and if so please help me reslove the exception.
    Thank you in advance.

    OK I am back again and seems like talking to myself. Anyways i had a talk with one of the java developers in my team and he said that making an array of structs is not much use to them as they already have a java bean/VO class defined and they want to send an array of its objects to the database not structs so I made the following changes to their java class. (Again hoping some one will find this useful).
    Setp1: I implemented the SQLData interface on the department VO class.
    import java.sql.SQLData;
    import java.sql.SQLOutput;
    import java.sql.SQLInput;
    import java.sql.SQLException;
    public class Department implements SQLData
    private double DNO;
    private String Name;
    private String Location;
    public void setDNO(double DNO)
    this.DNO = DNO;
    public double getDNO()
    return DNO;
    public void setName(String Name)
    this.Name = Name;
    public String getName()
    return Name;
    public void setLocation(String Location)
    this.Location = Location;
    public String getLoation()
    return Location;
    public void readSQL(SQLInput stream, String typeName)throws SQLException
    public void writeSQL(SQLOutput stream)throws SQLException
    stream.writeDouble(this.DNO);
    stream.writeString(this.Name);
    stream.writeString(this.Location);
    public String getSQLTypeName() throws SQLException
    return "DOCCOMPLY.DEPARTMENT_TYPE";
    Step 2: I made the following changes to the main method.
    public static void main(String arg[]){
    try{
    Department d1 = new Department();
    d1.setDNO(1);
    d1.setName("CPM");
    d1.setLocation("LHR");
    Department d2 = new Department();
    d2.setDNO(2);
    d2.setName("Admin");
    d2.setLocation("ISB");
    Department[] deptArray = {d1,d2};
    OracleCallableStatement callStatement = null;
    DBConnection dbConnection= DBConnection.getInstance();
    Connection cn = dbConnection.getDBConnection(false);
    ArrayDescriptor arrayDept = ArrayDescriptor.createDescriptor("DEPT_ARRAY", cn);
    ARRAY deptArrayObject = new ARRAY(arrayDept, cn, deptArray);
    callStatement = (OracleCallableStatement)cn.prepareCall("{call objecttype.insert_array_object(?)}");
    ((OracleCallableStatement)callStatement).setArray(1, deptArrayObject);
    callStatement.executeUpdate();
    cn.commit();
    catch(Exception e){
    System.out.println(e.toString());
    and it started working no more SQLException. (The changes to the department class were done manfully but they tell me JPublisher would have been better).
    Regards,
    Shiraz

  • Java.lang.InstantiationException: Error communicating with server:

    Hello everybody, I am an easy Helloworld application, the deploy is fine, but when I execute the client it appears the next error:
    java.lang.InstantiationException: Error communicating with server: Lookup error:
    java.net.ConnectException: Connection refused: connect; nested exception is:
    java.net.ConnectException: Connection refused: connect; nested exception
    is:
    javax.naming.NamingException: Lookup error: java.net.ConnectException: C
    onnection refused: connect; nested exception is:
    java.net.ConnectException: Connection refused: connect
    at com.evermind.server.ApplicationClientContext.createContext(Applicatio
    nClientContext.java:300)
    at com.evermind.server.ApplicationClientInitialContextFactory.getInitial
    Context(ApplicationClientInitialContextFactory.java:190)
    at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
    at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
    at javax.naming.InitialContext.init(Unknown Source)
    at javax.naming.InitialContext.<init>(Unknown Source)
    at hello.HelloClient.main(HelloClient.java:33)
    NamingException: Error reading application-client descriptor: Error communicatin
    g with server: Lookup error: java.net.ConnectException: Connection refused: conn
    ect; nested exception is:
    java.net.ConnectException: Connection refused: connect; nested exception
    is:
    javax.naming.NamingException: Lookup error: java.net.ConnectException: C
    onnection refused: connect; nested exception is:
    java.net.ConnectException: Connection refused: connect
    This is my application client:
    // HelloClient.java
    package hello;
    import javax.ejb.*;
    import javax.naming.*;
    import javax.rmi.PortableRemoteObject;
    import java.io.*;
    import java.util.*;
    import java.rmi.RemoteException;
    * A simple client for accessing an EJB.
    public class HelloClient
    public static void main(String[] args)
    System.out.println("client started...");
    try {
    // Initial context properties are set in the jndi.properties file
         Hashtable env = new Hashtable();
         env.put(Context.INITIAL_CONTEXT_FACTORY,"com.evermind.server.ApplicationClientInitialContextFactory");
         env.put(Context.PROVIDER_URL, "ormi://ecd11107.eadscasa.casa.corp:23791/helloworld");
         env.put(Context.SECURITY_PRINCIPAL, "admin");
         env.put(Context.SECURITY_CREDENTIALS, "123");
         Context context = new InitialContext(env);
    // This for use with com.evermind.server.rmi.RMIInitialContextFactory
    //Object homeObject = context.lookup("HelloBean");
    // This is for use with com.evermind.server.ApplicationClientInitialContextFactory
    Object homeObject = context.lookup("java:comp/env/Helloworld");
    // Narrow the reference to HelloHome.
    HelloHome home =
         (HelloHome) PortableRemoteObject.narrow(homeObject, HelloHome.class);
         System.out.println("hello home");
    // Create remote object and narrow the reference to Hello.
    Hello remote =
         (Hello) PortableRemoteObject.narrow(home.create(), Hello.class);
    System.out.println(remote.sayHello("James Earl"));
    } catch(NamingException e) {
    System.err.println("NamingException: " + e.getMessage());
    } catch(RemoteException e) {
    System.err.println("RemoteException: " + e.getMessage());
    } catch(CreateException e) {
    System.err.println("FinderException: " + e.getMessage());
    Can somebody helps me ???

    Thank you, but don�t work well yet. I checked the files orion-application.xml & principals.xml in the directory C:\servOracle\oracle\j2ee\home\application-deployments\helloworld but the result is the same, when I run the client the next error appears:
    NamingException: Lookup error: javax.naming.NoPermissionException: Not allowed to look up HelloBean, check the namespace-access tag setting in orion-application.xml for details; nested exception is:
    javax.naming.NoPermissionException: Not allowed to look up HelloBean, check the namespace-access tag setting in orion-application.xml for details
    This is my orion-application.xml
    <?xml version="1.0"?>
    <!DOCTYPE orion-application PUBLIC "-//ORACLE//DTD OC4J Application runtime 9.04//EN" "http://xmlns.oracle.com/ias/dtds/orion-application-9_04.dtd">
    <orion-application deployment-version="9.0.4.0.0" default-data-source="jdbc/OracleDS" treat-zero-as-null="true">
         <ejb-module remote="false" path="helloworld-ejb.jar" />
         <web-module id="helloworld-web" path="helloworld-web.war" />
         <client-module path="helloworld-client" deployment-time="fce4439997" auto-start="false" />
         <persistence path="persistence" />
         <principals path="principals.xml" />
         <jazn provider="XML" location="jazn-data.xml" />
         <log>
              <file path="application.log" />
         </log>
         <namespace-access>
              <read-access>
                   <namespace-resource root="">
                        <security-role-mapping name="<jndi-user-role>">
                             <group name="users" />
                        </security-role-mapping>
                   </namespace-resource>
              </read-access>
              <write-access>
                   <namespace-resource root="">
                        <security-role-mapping name="<jndi-user-role>">
                             <group name="users" />
                        </security-role-mapping>
                   </namespace-resource>
              </write-access>
         </namespace-access>
    </orion-application>
    And this is my principals.xml
    <?xml version="1.0"?>
    <!DOCTYPE principals PUBLIC "//ORACLE//DTD OC4J Principals 9.04//EN" "http://xmlns.oracle.com/ias/dtds/principals-9_04.dtd">
    <principals>
         <groups>
              <group name="users">
                   <description>users</description>
                   <permission name="rmi:login" />
              </group>
              <group name="guests">
                   <description>guests</description>
              </group>
              <group name="administrators">
                   <description>administrators</description>
                   <permission name="administration" />
              </group>
         </groups>
         <user username="admin" password="ADMIN">
              <description>The default administrator</description>
              <group-membership group="administrators" />
              <group-membership group="guests" />
              <group-membership group="users" />
         </user>
         <user username="SCOTT" password="TIGER">
              <description>no description</description>
              <group-membership group="users" />
              <group-membership group="administrators" />
         </user>
    </principals>
    Thanks in advance, please help me....

  • Java.lang.InstantiationException Error

    Hello everyone,
    I am getting the following error when I try to run my applet in the applet viewer.
    java.lang.InstantiationException: Factory
         at java.lang.Class.newInstance0(Class.java:335)
         at java.lang.Class.newInstance(Class.java:303)
         at sun.applet.AppletPanel.createApplet(AppletPanel.java:723)
         at sun.applet.AppletPanel.runLoader(AppletPanel.java:652)
         at sun.applet.AppletPanel.run(AppletPanel.java:326)
         at java.lang.Thread.run(Thread.java:613)
    Factory is a class which extends JApplet. Here is the init() method:
    public void init(){
         this.setSize(800, 600);
         this.setContentPane(getJContentPane());
         try{
           Factory factory = new Factory("input.txt");
           factory.generateClass();
         catch(IOException e){}
    }Any help would be greatly appreciated.

    Roosh wrote:
    That is correct. Should I have a constructor which contains no arguments in
    order for this to work correctly?Yes. The browser plugin, for example, gets the name of your applet subclass from the HTML:
    <applet code="AppletWorld.class" width="200" height="200">
    </applet> It instantiates your class in a way that requires it to have a constructor that takes no arguments. You didn't define this.
    I also mean that Factory is a class which inherits JApplet, so the Factory is an applet.Am I correct in thinking that Factory's init method creates another instance of Factory? That's the part the doesn't make sense to me.

  • How to import user defined class in UIX page?

    Does anyone know how to import user defined class in UIX page so that the class can be called in the javascript in the UIX ?
    Thks & Rgds,
    Benny

    what you are referring to is not javascript.
    it is JSP scriptlets. These are very different.
    In order to keep a strict separation between View and Controller, it is not possible to run arbitrary java code from within your UIX code.
    However, you can run java code from within a UIX event handler; see:
    http://otn.oracle.com/jdeveloper/help/topic?inOHW=true&linkHelp=false&file=jar%3Afile%3A/u01/app/oracle/product/IAS904/j2ee/OC4J_ohw/applications/jdeveloper904/jdeveloper/helpsets/jdeveloper/uixhelp.jar!/uixdevguide/introducingbaja.html
    event handler code is run before the page is rendered.

  • Java.lang.InstantiationException in ADF

    Hello everyone,
    I am working in ADF 11g version 3 and working on a spplication which has af:tree and many af:table components. After being sometime on the Application, suddenly the screen displays: Error 500--Internal Server Error. Here is the log:
    vWX7TCDCCqTZtRglTBsRX06TSbS8pvcNfXsgspfRVJ7z9FGGYxJG!-1400692531!NONE!1321370562820 | 77f91341-536c-46a3-b6f5-a34c74fe6aec[0000JEbp74j9tXwj8DEgKD1EkLal0000H7,0] | ABCD | SEVERE | org.apache.myfaces.trinidad.bean.util.StateUtils$Saver.restoreState |
    java.lang.InstantiationException: oracle.adfinternal.view.faces.model.binding.FacesCtrlSearchBinding$QueryIntegerConverter
         at java.lang.Class.newInstance0(Class.java:340)
         at java.lang.Class.newInstance(Class.java:308)
         at org.apache.myfaces.trinidad.bean.util.StateUtils$Saver.restoreState(StateUtils.java:533)
         at org.apache.myfaces.trinidad.bean.util.StateUtils.restoreStateHolder(StateUtils.java:411)
         at org.apache.myfaces.trinidad.bean.PropertyKey.restoreValue(PropertyKey.java:243)
         at org.apache.myfaces.trinidad.bean.util.StateUtils.restoreState(StateUtils.java:357)
         at org.apache.myfaces.trinidad.bean.util.FlaggedPropertyMap.restoreState(FlaggedPropertyMap.java:195)
         at org.apache.myfaces.trinidad.bean.FacesBeanImpl.restoreState(FacesBeanImpl.java:348)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.restoreState(UIXComponentBase.java:945)
         at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:58)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:918)
         at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:96)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:918)
         at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:96)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:918)
         at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:96)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:918)
         at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:96)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:918)
         at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:96)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:918)
         at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:96)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:918)
         at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:144)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:918)
         at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:96)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:918)
         at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:96)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:918)
         at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:144)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:918)
         at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:96)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:918)
         at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:96)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:918)
         at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:144)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:918)
         at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:144)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:918)
         at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:96)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:918)
         at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:96)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:918)
         at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:96)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:918)
         at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1182)
         at org.apache.myfaces.trinidadinternal.application.StateManagerImpl.restoreView(StateManagerImpl.java:651)
         at com.sun.faces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:316)
         at javax.faces.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:204)
         at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:282)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._restoreView(LifecycleImpl.java:532)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:281)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:421)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:421)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:414)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at sni.foundation.facesextensions.filters.FoundationFilter.doFilter(FoundationFilter.java:93)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at oracle.security.wls.filter.SSOSessionSynchronizationFilter.doFilter(SSOSessionSynchronizationFilter.java:280)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:160)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Can someone throw some light based on this error, I know its hard to know but any clue is highly appreciated.
    Thanks a lot !

    Hi experts,
    I am Working in jdev 11.1.1.3.0.
    We are facing same issue in most of non-development environment.
    Wed Mar 21 09:16:28:651 CDT 2012 | 1332339388651 | 23 | IRCT_UI | null | 1ZgGPphftVRpq3wRhKTD6VcDTpg7DsJvcYLYBglspVC1TvvZvPpf!1815485401!-1542606130!1332337375138 | 143dc8c6-d216-4fff-89cd-b8ceb095df97[0000JOpbR3c1Newj8DNa4D1FQNwC0000ae,0] | d57461 | SEVERE | org.apache.myfaces.trinidad.bean.util.StateUtils$Saver.restoreState |java.lang.InstantiationException: oracle.adfinternal.view.faces.model.binding.FacesCtrlSearchBinding$QueryIntegerConverter
    at java.lang.Class.newInstance0(Class.java:340)
    at java.lang.Class.newInstance(Class.java:308)
    at org.apache.myfaces.trinidad.bean.util.StateUtils$Saver.restoreState(StateUtils.java:533)
    at org.apache.myfaces.trinidad.bean.util.StateUtils.restoreStateHolder(StateUtils.java:411)
    at org.apache.myfaces.trinidad.bean.PropertyKey.restoreValue(PropertyKey.java:243)
    at org.apache.myfaces.trinidad.bean.util.StateUtils.restoreState(StateUtils.java:357)
    at org.apache.myfaces.trinidad.bean.util.FlaggedPropertyMap.restoreState(FlaggedPropertyMap.java:195)
    at org.apache.myfaces.trinidad.bean.FacesBeanImpl.restoreState(FacesBeanImpl.java:348)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.restoreState(UIXComponentBase.java:945)
    at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:58)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:918)
    at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:96)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:918)
    at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:96)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:918)
    at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:96)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:918)
    at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:96)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:918) at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:96) at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:918) at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:96) at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:918) at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:144) at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:918) at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:96) at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:918) at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:96) at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:918) at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:144) at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:918)
              at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:421) at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:421)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:414)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at sni.foundation.facesextensions.filters.FoundationFilter.doFilter(FoundationFilter.java:93)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at oracle.security.wls.filter.SSOSessionSynchronizationFilter.doFilter(SSOSessionSynchronizationFilter.java:280)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:160)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Any inputs could be highly appreciate.

  • Cannot comile user defined classes

    Hello i have a problem on compiling user defined classes .
    example
    file x.java
    public class x{
    file y.java
    import x;
    public class y{
    I first compile x.java and everything is OK .
    Then i compile y.java and the compiler gives the folowing
    y.java:2: '.' expected
    import y
    I have tried to put the classes on a package and added the folowing line yo each file
    import /home/bill/test
    Then i puted the java files on that dir
    and compiled with
    javac -classpath /home/bill/test y.java
    AGAIN THE SAME
    y.java:2: '.' expected
    import y
    WHAT I DO WRONG PLEASE HELP!!!!!!!!!!!!

    1. Since J2SDK 1.4, you can not import classes that are in the default (or unnamed) package. You are getting the error because the compiler expects something after y like y.*;
    2. You do not need to import classes that are in the same package, and all classes in the default package are in the same package.
    In your case, your classes are in the default package so remove the import statement.

  • Exception: java.lang.InstantiationException.....

    Hi there,
    I have recently been playing around with converting an application to an applet. Everything seems great at my end, I have tried ir in 'Internet Explorer 6' & 'Netscape 6.2', they both show the applet, however 'Opera 5' does not. The annoying problem is that nobody else can see the applet in thier browser's. Because I can't experience what they are seeing it is proving really dificult to troubleshoot this error. The only indication I have to the route of this problem is the message:
    Exception: java.lang.InstantiationException.....
    I have even remove this class file from my own P.C. just to make sure that some how I am not viewing the local class on my computer instead of what I have uploaded. It had no effect on my results as I suspected. Could it be I need to use a H.T.M.L. convertor?
    I am a bit stumped. Does anyone know what trhis error message generally means.
    If you want the code I can e-mail, but in the mean time if anyone is familiar with this problem, HELP!!!

    the previous post pretty much explained what the Exception means exactly. To be more specific however, your compiler would not let you instantiate an interface or abstract class so either a) you are doing this incorrectly via reflection or b) there is some class conflict with client system. Is your applet enclosed in an applet tag that directs the browser to use the sun plugin? I would recomend that you have clients use the sun plugin- it will probably solve this problem (assumming it is not bad code) and you should run into less conflicts between different browser types.

  • How to put a user defined class in Web dynpro

    How and where can we create some user defined classes?
    For example i wanted to create some utility classs for my project. Under what folder should i create this?

    Please create the .java files under src folder of the project
    Go to PackageExplorer->expand the project->select src/packages and create the package under this and create java file.
    Regards, Anilkumar

  • Java.lang.InstantiationException

    My class throws a java.lang.InstantiationException and I can't see why. my class extends an abstract class but should not be abstract itself.
    My Class_
    package com.propylon.core.tests;
    import org.eclipse.core.runtime.Plugin;
    import org.osgi.framework.BundleContext;
    * The activator class controls the plug-in life cycle
    public class Activator extends Plugin {
         // The plug-in ID
         public static final String PLUGIN_ID = "com.propylon.core.tests";
         // The shared instance
         private static Activator plugin;
         * The constructor
         public Activator() {
         * (non-Javadoc)
         * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
         public void start(BundleContext context) throws Exception {
              super.start(context);
              plugin = this;
         * (non-Javadoc)
         * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
         public void stop(BundleContext context) throws Exception {
              plugin = null;
              super.stop(context);
         * Returns the shared instance
         * @return the shared instance
         public static Activator getDefault() {
              return plugin;
    Console Window_
    java-test:
    [echo] Running com.propylon.core.tests.testcase.AllTests. Result file: C:/eclipse3.3/results/com.propylon.core.tests.testcase.AllTests.xml.
    [java] org.osgi.framework.BundleException: The activator org.eclipse.core.runtime.Plugin for bundle com.propylon.core.Test is invalid
    [java]      at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:141)
    [java]      at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:970)
    [java]      at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346)
    [java]      at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:260)
    [java]      at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:400)
    [java]      at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:111)
    [java]      at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:417)
    [java]      at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:189)
    [java]      at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:340)
    [java]      at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:408)
    [java]      at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:369)
    [java]      at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:357)
    [java]      at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:83)
    [java]      at java.lang.ClassLoader.loadClass(Unknown Source)
    [java]      at org.eclipse.osgi.framework.internal.core.BundleLoader.loadClass(BundleLoader.java:289)
    [java]      at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:227)
    [java]      at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1269)
    [java]      at org.eclipse.test.EclipseTestRunner.loadSuiteClass(EclipseTestRunner.java:302)
    [java]      at org.eclipse.test.EclipseTestRunner.getTest(EclipseTestRunner.java:233)
    [java]      at org.eclipse.test.EclipseTestRunner.<init>(EclipseTestRunner.java:216)
    [java]      at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:200)
    [java]      at org.eclipse.test.CoreTestApplication.runTests(CoreTestApplication.java:35)
    [java]      at org.eclipse.test.CoreTestApplication.run(CoreTestApplication.java:31)
    [java]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [java]      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    [java]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    [java]      at java.lang.reflect.Method.invoke(Unknown Source)
    [java]      at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethod(EclipseAppContainer.java:533)
    [java]      at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:155)
    [java]      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
    [java]      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
    [java]      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
    [java]      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
    [java]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [java]      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    [java]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    [java]      at java.lang.reflect.Method.invoke(Unknown Source)
    [java]      at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504)
    [java]      at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
    [java]      at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
    [java]      at org.eclipse.equinox.launcher.Main.main(Main.java:1144)
    [java]      at org.eclipse.core.launcher.Main.main(Main.java:30)
    [java] Caused by: java.lang.InstantiationException
    [java]      at sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(Unknown Source)
    [java]      at java.lang.reflect.Constructor.newInstance(Unknown Source)
    [java]      at java.lang.Class.newInstance0(Unknown Source)
    [java]      at java.lang.Class.newInstance(Unknown Source)
    [java]      at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:136)
    [java]      ... 41 more
    [java] Java Result: 2
    Is there anything obviously flawed with this class or am I going mad.
    thank you for your time
    slider

    I can't see anywhere in your code that tries to create an Activator object... i.e. there is nowhere that tries to use the new Activator() constructor, so I would suggest that the problem is not with your code.
    This is the description of Instantiation Exception from the API:
    Thrown when an application tries to create an instance of a class using the newInstance method in class Class, but the specified class object cannot be instantiated because it is an interface or is an abstract class.
    So, I would imagine, somewhere the Class.newInstance() method is being invoked on Plugin (the abstract class) rather than Activator (the non-abstract one)

  • Unreported Exception java.lang.InstantiationException

    Dear Friends,
    I am developing javabean connectivty for inserting records to mysql database from jsp. when i try to compile java bean program. It gives an error like unreported Exception java.lang.InstantiationException: Must be caught or declared to be thrown*. This is my mode. Please anyone help to solve this error. if you find any error in my code, please suggest me. Thanks in advance.
    package com.webdeveloper.servlets;
    import java.sql.*;
    import java.io.*;
    public class InsertBean {
    private String dbURL = "jdbc:mysql://localhost:3306/test";
    private Connection dbCon;
    private Statement st;
    String dbuser = "root";
    String dbpass = "admin";
    String Name = null;
    String Address = null;
    String Zip = null;
    public InsertBean() {
    super();
    public String getName() {
    return this.Name;
    public String getAddress() {
    return this.Address;
    public String getZip() {
    return this.Zip;
    public void setName(String pname) {
    this.Name = pname;
    public void setAddress(String paddress) {
    this.Address = paddress;
    public void setZip(String pzip) {
    this.Zip = pzip;
    public void doInsert() throws ClassNotFoundException, SQLException {
    Class.forName("com.mysql.jdbc.Driver").newInstance();//it gives error in this line
    dbCon = DriverManager.getConnection(dbURL,dbuser,dbpass);
    Statement s = dbCon.createStatement();
    String sql = "Insert into Person values ('" + this.Name;
    sql = sql + "', '" + this.Address + "', " + this.Zip;
    sql = sql + ")";
    int insertResult = s.executeUpdate(sql);
    dbCon.close();
    }

    Dear BalusC,
    Thanks for your suggestion. I used try catch block also. But it still gives same error. I have modified my following code. Is there any thing wrong in my code? Please give me your suggestion. Thankyou.
    // Java Document
    package com.webdeveloper.servlets;
    import java.sql.*;
    import java.io.*;
    public class InsertBean {
    private String dbURL = "jdbc:mysql://localhost:3306/test";
    private Connection dbCon;
    private Statement st;
    String dbuser = "root";
    String dbpass = "admin";
    String Name = null;
    String Address = null;
    String Zip = null;
    public InsertBean() {
    super();
    public String getName() {
    return this.Name;
    public String getAddress() {
    return this.Address;
    public String getZip() {
    return this.Zip;
    public void setName(String pname) {
    this.Name = pname;
    public void setAddress(String paddress) {
    this.Address = paddress;
    public void setZip(String pzip) {
    this.Zip = pzip;
    public void doInsert() throws ClassNotFoundException, SQLException {
         try{
         Class.forName("com.mysql.jdbc.Driver").newInstance();
    dbCon = DriverManager.getConnection(dbURL,dbuser,dbpass);
    Statement s = dbCon.createStatement();
    String sql = "Insert into Person values ('" + this.Name;
    sql = sql + "', '" + this.Address + "', " + this.Zip;
    sql = sql + ")";
    int insertResult = s.executeUpdate(sql);
         catch(Exception e){
         System.out.println("error occured :" + e);
         dbCon.close();
    }

  • User defined class  for Web Services

    I am trying to use the Web Service Publishing Wizard to publish
    a class as a web service. The wizard will not allow me to select
    the method I wish to publish. When I click on the "Why Not?"
    button the message says:
    "One or more parameters did not have an XML Schema mapping
    and/or serializer specified"
    I use user defined classes as parameters of the methods of the service web.
    How cam i install this web service on "Oracle J2EE Web services"?

    If you use Java Beans (or single dimension arrays of Java Beans) that implement the java.io.serializable interface as per this article:
    http://otn.oracle.com/tech/webservices/htdocs/samples/customtype/content.html
    then Oracle9iAS will handle the publishing process of custom data types. The publishing wizard in Oracle9i JDeveloper 9.0.2 doesn't support this yet, but the link in the article to the JDeveloper help gives a fairly straightforward workaround. This workaround will be eliminated in Oracle9i JDeveloper 9.0.3 (due late August).
    Does representing your parameters as Java Beans work for your problem?
    Mike.

  • Class Data Sharing for User Defined Classes

    i am using jdk 5.0 . JDK 5.0 supports class data sharing for system level classes. Is there any way a class data sharing be done for a user defined class?

    Samantha10 wrote:
    Is this class data sharing possible for user defined classes also? i have a singleton class which i am invoking through a script. The script has been scheduled to run every 1 sec . Since it is being invoked every 1 sec hence the singleton pattern is failing . Hence if the this class data sharing is possible then the singleton pattern can be made applicable.If you have a single process and you have a single class loaded by two different ClassLoader instances
    in some respects they will be two different classes
    if (class1 instanceof class2.getClass())returns false.
    This is not the case for Java core classes because they are always loaded by the SystemClassLoader.
    You write you
    have a singleton class which i am invoking through a script. What approach to you use to invoke the singleton?
    I am trying to figure out if you launch a new JVM every second...
    Maybe you can use Nailgun.

  • Identifying APIs & user-defined classes

    I have a class name in a string variable. Is it possible to identify whether that class is a Java API or user-defined class ? Please note that the identification has to be done thru code not manually.

    There is no clear distinction between Java API and user defined classes. What I mean is there is no rule to limit user to use java.util as their package name and create their own classes like java.util.CustomCollection. Although that is not recommended at all, but nothing prevents it. There is sun.* package which implements most of the java.* classes, do you consider those Java API? And there are third party classes such as org.omg.* etc. All these classes including user defined classes are treated equally with the JVM.
    So there is no clear distinction. The only thing you can do is to define a list of class names you consider Java API.
    Why do you want to seperate them if I may ask? Since the JVM doesn't care.
    --lichu                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Maybe you are looking for

  • Heat cpu/hdd hp pavilion dv6t-7000

    Product name: HP Pavilion dv6t-7000 CTO Entertainment Notebook Problem: Over heating on the CPU and fan noizes More details: O.S. Windows 7 Ultimate Service Pack 1 CPU: Intel Core i7-3610 QM @ 2.30 GHZ RAM: 8.00 GB 64 Bit My message:  Greetings fella

  • Error in crystal report Connection

    Hi I created a crystal report in SAP B1, its showing connectivity error when I  was viewing the report in SAP B1 .(I'm useing SAP 2007B) As u2018* failed to open the connection  u2019* Plz do need fully Regards Aravind M

  • Can't print from MBP to HP DeskJet Cxi

    I have a new MacBook Pro and an older but not much used HP DeskJet Cxi. I can print from my old PowerBookk G4 but not from my MBP. Apple says HP doesn't offer a driver; HP says Apple doesn't offer a driver. Is there any way to use this printer with m

  • LOIPRO01 outbound idoc issue

    Hi All, When I release the production order, Idoc need to be send to external system.    I have extended LOIPRO01 idoc(for Production Order)and called RCCLORD program using SUBMIT in user exit include ZXCO1U01 for creation of IDoc and it is successfu

  • Obviously, it is Oracle's misplay

    In Oracle 11g's document Data Guard Concepts and Administration(about how to create a standby database), it mentions:"configure Listener on both side using Oracle Net Manager". But it never mentions installing the Oracle database soft first on the st