NullpointerException in java.util.Hashtable.access$100 ???

Hi folks.
I am trying to reconstruct a Hashtable using my own way of serialization/deserialization via Java Reflection. It works fine with most classes, but a reconstructed hashtable is seriously screwed up. After reconstruction, it is passed as an argument to a class that uses the putAll-Method, which causes a NullpointerException.
The root in the stack trace is java.util.Hashtable.access$100 at line 90 in java.util.Hashtable. Unfortunately, if you check the source of hashtable, you will only find the class header on this line.
Is it correct, that javac creates access-methods for inner classes? What are they used for?
Any idea what could cause this?

The exception happens whenever I try methods like toString, putAll or hashCode on the hashtable. The code of the deserialization is just a bit to complex to post here.
I have been able to track the problem down to the internal creation of creation of an iterator by the hashtable.
Here is the stack trace:
Exception in thread "main" java.lang.NullPointerException
at java.util.Hashtable.access$100(Hashtable.java:90)
at java.util.Hashtable$EntrySet.iterator(Hashtable.java:592)
at java.util.Collections$SynchronizedCollection.iterator(Collections.java:1096)
at java.util.Hashtable.hashCode(Hashtable.java:728)
at java.util.Hashtable.get(Hashtable.java:315)
at mypackage.serializer.XMLSerializer.buildXML(XMLSerializer.java:205)
at mypackage.serializer.XMLSerializer.buildXML(XMLSerializer.java:178)
at mypackage.serializer.XMLSerializer.main(XMLSerializer.java:66)

Similar Messages

  • EntrySet has private access in java.util.Hashtable

    Hi friends,
    While i try to retrieve the data from the hashtable through a JSP page, i'm getting the error saying "E:\Tomcat 5.0\work\Catalina\localhost\dd\org\apache\jsp\disp_jsp.java:55: entrySet has private access in java.util.Hashtable
    Iterator i = h.entrySet.iterator();
    For your reference the code goes like this,
    <% Hashtable h = (Hashtable) session.getAttribute("hash");
    Iterator i = h.entrySet.iterator();
    while(i.hasNext())
    %>
    <tr><td>
    <% String st = i.next().toString();
    String k[] = st.split("=");     
    out.println(k[0]); %>
    </td><td><%
    out.println(k[1]); %></td></tr><% } %>
    can anyone tell me how to get rid of this error quickly please.. Thanks in advance...
    Regards,
    Prakash.

    Iterator i = h.entrySet.iterator();Iterator i = h.entrySet().iterator();

  • Mapping java.util.hashtable

    Hello all
    I have a requirement of mapping java.util.hashtable to Oracle9i database. I read on the application developers guide that this type can not be mapped through the Workbench GUI and you need to write code for it.
    I followed the example code as below
    DirectMapMapping directMapMapping = new DirectMapMapping();
    directMapMapping.setAttributeName("..");
    directMapMapping.setReferenceTableName("..");
    directMapMapping.setReferenceKeyFieldName("..");
    directMapMapping.setDirectKeyFieldName("..");
    directMapMapping.setDirectFieldName("..");
    directMapMapping.setKeyClass(String.class);
    directMapMapping.setValueClass(Integer.class);
    descriptor.addMapping(directMapMapping);
    The insertion to the database went very well but while retriving the data from the database i am getting the following error.
    Exception Description: Trying to set value [[DatabaseRow(
         DUMMYTABLE.KEYVALUE => 100
         KEYNAME => 1), DatabaseRow(
         DUMMYTABLE.KEYVALUE => 200
         KEYNAME => 2)]] for instance variable [dummyTable] of type [java.util.Hashtable] in the object. The specified object is not an instance of the class or interface declaring the underlying field, or an unwrapping conversion has failed.
    If any one has any idea, please let me know.
    Thanks in Advance

    Which version/patch is this running? I don't know of any specific bugs to this, but there have been a couple of minor seemingly-unrelated fixes to DirectMapMapping, but sometimes they're more related than you think.
    The exception is saying the types aren't matching up. You are 100% sure the attribute you're mapping to is a java.util.Hashtable? It shouldn't be necessary, but you might want to call directMapMapping.useMapClass(java.util.Hashtable.class);
    - Don

  • Error: Unsupported Object java.util.Hashtable

    Hi,
    I am getting Uncategorized SQL exception for my code:
    The error is:
    org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [select distinct table_desc from TABLE order by table_desc where   month = ?  and year = ? ]; SQL state [HY000]; error code [857]; [NCR][Teradata JDBC Driver]:PreparedStatement.setObject: Unsupported Object java.util.Hashtable ; nested exception is java.sql.SQLException: [NCR][Teradata JDBC Driver]:PreparedStatement.setObject: Unsupported Object java.util.Hashtable
    Here is the code
    public class ABC {  
    private static final String MYDATE = "  month = ?  and year = ? ";
    public List<String> getTables(Report report) {
              List<String> tables =  new ArrayList<String>();
              JdbcTemplate template = new JdbcTemplate( dataSource );          
              Object sqlParameters[] = null;
              sqlParameters = new Object[]{ getMonthAndYear( report ) };
              String sql = "select distinct table_description from TABLE " +
              " order by table_description where ";
              tables= template.queryForList(sql + MYDATE,sqlParameters);          //the error is throwing on this line     
              return( tables);
    private Map<Integer, Integer> getMonthAndYear( Report report ) {
          Calendar today = Calendar.getInstance();
          Map<Integer, Integer> monthYear = new Hashtable<Integer, Integer>();     
          monthYear.put( Calendar.MONTH, today.get( Calendar.MONTH ) );
          monthYear.put( Calendar.YEAR, today.get( Calendar.YEAR ) );        
            System.out.println("monthYear :"+monthYear);//this prints monthYear :{2=10, 1=2008}
            return( monthYear );
    }Can anybody help me solve it? It's something to do with the parameters I am getting back...
    I will appreciate your help,
    Thanks in advance...

    evnafets wrote:
    What do you expect it to do with your "parameters"?
    You are using a [Spring JdbcTemplate|http://static.springframework.org/spring/docs/2.0.x/api/org/springframework/jdbc/core/JdbcTemplate.html#queryForList(java.lang.String,%20java.lang.Object[])]
    What should the where clause of your sql query be?
    Why do you think this would accept parameters in a Map<Integer, Integer> ?The parameters would restrict the result I will get with my query, i have to bound with month and year constraint as part of requirements.
    The Where clause would be : where month = ? and year = ? ( which could be month = 10 and year = 2008)
    I am using Map<Integer, Integer> because in database these month and year values are numeric...
    But I don't know what it doesn't like it?
    Any idea?
    Edited by: ASH_2007 on Nov 11, 2008 1:36 PM

  • [bug]Jdev 11g:NullPointerException at java.util.regex.Matcher.getTextLength

    Hi,
    Jdev 11.1.1.0.31.51.56
    If somebody of you get the following trace stack when running a jspx using ViewCriteriaRow.setOperator :
    There is bug 7534359 and metalink note 747353.1 available.
    java.lang.NullPointerException
    at java.util.regex.Matcher.getTextLength(Matcher.java:1140)
    at java.util.regex.Matcher.reset(Matcher.java:291)
    at java.util.regex.Matcher.<init>(Matcher.java:211)
    at java.util.regex.Pattern.matcher(Pattern.java:888)
    at oracle.adfinternal.view.faces.model.binding.FacesCtrlSearchBinding._loadFilter
    CriteriaValues(FacesCtrlSearchBinding.java:3695)
    Truncated. see log file for complete stacktrace
    Workaround:
    If you use 
            vcr.setAttribute("Job",job);
    or
            vcr.setAttribute("Job","="+job);
    than add following line of code:
            vcr.setOperator("Job","=");   regards
    Peter

    Hi,
    useful to mention that this happens when setting the equal operator or LIKE operator
    vcr.setAttribute("Job","= '"+job+"'");
    or
    vcr.setOperator("Job","=");
    Frank

  • I need to retrieve an Object[] of all keys in java.util.Hashtable

    public abstract class ArrayFunctionality {
         * Construct {@link java.lang.Object} array of keys from {@link java.util.Hashtable}
         * @param h {@link java.util.Hashtable}
         * @return array {@link java.lang.String}
         * @throws java.lang.IndexOutOfBoundsException Exception thrown if initial {@link java.lang.Object} array paramater cannot be indexed
        public static Object[] arrayKeys(Hashtable<Object, Object> h) throws IndexOutOfBoundsException {
            Vector<Object> v = new Vector<Object>();
            Enumeration keys = h.keys();
            while (keys.hasMoreElements()) v.add(keys.nextElement());
            return v.toArray();
    // HOWEVER, this occurs with Hashtable<String, String> attrs:
    if (hasSetHashtable) String[] keyArray = ArrayFunctionality.arrayKeys(attrs);
    // DOES NOT COMPILE: ".class expected - not a statement"I am not understanding why this is occurring, please advise, I'm lost on this one.
    Thanx
    Phil

    I still don't understand what you mean but it now
    works..
    I am sorry I just don't understand the difference
    between
    if (hasSetHashtable) {
    String[] keyArray;
    keyArray = ArrayFunctionality.arrayKeys(attrs);
    }AND
    if (hasSetHashtable) {
    String[] keyArray =
    ArrayFunctionality.arrayKeys(attrs);PhilThere is no difference between those two you posted. The difference is between
    String[] keyArray;
    if (...) {
        keyArray = ArrayFunctionality.arrayKeys(attrs);
    }and
    if (...) {
         String[] keyArray;
         keyArray = ArrayFunctionality.arrayKeys(attrs);
    }In the first, the keyArray will exist outside of the scope of the if statement. In the second, the keyArray will no longer exist once you leave the if statement. Which is the same thing jbish said.

  • Java.io.NotSerializableException: java.util.Hashtable$KeySet

    Hi,
    i have a
        private Hashtable<IDInterface, String> globalPeerFarmMap_=new Hashtable<IDInterface,String>();    in one class and it can be serialized OK.
    In another class, however i have a     private Hashtable<IDInterface, PeerBasic> thesePeers_=new Hashtable<IDInterface, PeerBasic>();     and a java.io.NotSerializableException is thrown - on the KeySet it seems.
    However, ID (which implements IDInterface) is serializable (and all its fields are serializable) and it works in the first case.
    Any ideas? Didn't want to be confusing, but if simplistic i will post some code.
    Thanks

    Found it. The compiler didn't provice much info. Somewhere inside PeerBasic, i call keySet on a Hashtable. I don't understand why this cause a problem.

  • Java.util.ServiceConfigurationError: while invoking web service

    Hi,
    I am developing a web application which consumes web service.
    We have used JaxWS to generate client side code.
    I am able to invoke the web service successfully using a stand-alone java application.
    But when I deploy my web application on weblogic 10.3 I am getting the following exception?
    Can anyone help?
    Thanks in advance.
    java.util.ServiceConfigurationError: javax.xml.ws.spi.Provider: Provider weblogic.wsee.jaxws.spi.WLSProvider could not be instantiated: java.lang.ClassCastException
         at java.util.ServiceLoader.fail(ServiceLoader.java:207)
         at java.util.ServiceLoader.access$100(ServiceLoader.java:164)
         at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:353)
         at java.util.ServiceLoader$1.next(ServiceLoader.java:421)
         at javax.xml.ws.spi.Provider.getProviderUsingServiceLoader(Provider.java:180)
         at javax.xml.ws.spi.Provider.provider(Provider.java:140)
         at addressvalidationservice.addressvalidationservice._public.AddressValidationPort_Service.<clinit>(AddressValidationPort_Service.java:34)
         at com.att.air.workflow.service.WorkflowServiceImpl.validateAddress(WorkflowServiceImpl.java:426)
         at com.att.air.request.service.RequestServiceImpl.validateAddress(RequestServiceImpl.java:1241)
         at com.att.air.action.request.ValidateRequestAction.validateLocationInformation(ValidateRequestAction.java:200)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:453)
         at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:292)
         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:255)
         at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:256)
         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
         at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:176)
         at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
         at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:265)
         at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
         at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
         at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138)
         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
         at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:211)
         at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
         at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:211)
         at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
         at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190)
         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
         at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
         at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:90)
         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
         at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243)
         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
         at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)
         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
         at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)
         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
         at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)
         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
         at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)
         at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
         at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176)
         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
         at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
         at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:192)
         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
         at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187)
         at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
         at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)
         at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:511)
         at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
         at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3496)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: java.lang.ClassCastException
         at java.lang.Class.cast(Class.java:2990)
         at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:345)
         ... 69 more

    Which version/platform are you using?
    The thing you need to consider here is that the JDev proxy settings do not affect the BPEL server.
    So if the BPEL server cannot connect to your webservice, it will not be because of any Jdev setting.
    Check the proxy settings on your BPEL server (on 10.1.2 developer install it will be in obsetenv.bat, on 10.1.3 it will be a commandline property of the JVM - see AS Control administration page for the JVM)

  • Java.util.concurrent.ConcurrentHashMap

    All,
    I prefer to use the java.util.ConcurrentHashMap over a Hashtable but there are some points regarding this structure that are not very clear to me.
    From java.util.concurrent: Class ConcurrentHashMap:
    "A hash table supporting full concurrency of retrievals and adjustable expected concurrency for updates. This class obeys the same functional specification as Hashtable, and includes versions of methods corresponding to each method of Hashtable.
    *+However, even though all operations are thread-safe, retrieval operations do not entail locking, and there is not any support for locking the entire table in a way that prevents all access. This class is fully interoperable with Hashtable in programs that rely on its thread safety but not on its synchronization details. Iterators are designed to be used by only one thread at a time."+ *
    Also from: Java API: Package java.util.concurrent, we read:
    "The "Concurrent" prefix used with some classes in this package is a shorthand indicating several differences from similar "synchronized" classes. For example java.util.Hashtable and Collections.synchronizedMap(new HashMap()) are synchronized. But ConcurrentHashMap is "concurrent". A concurrent collection is thread-safe, but not governed by a single exclusion lock. In the particular case of ConcurrentHashMap, it safely permits any number of concurrent reads as well as a tunable number of concurrent writes. "Synchronized" classes can be useful when you need to prevent all access to a collection via a single lock, at the expense of poorer scalability. In other cases in which multiple threads are expected to access a common collection, "concurrent" versions are normally preferable. And unsynchronized collections are preferable when either collections are unshared, or are accessible only when holding other locks."
    Based on above, is this correct of I say:
    When using a structure like Hashtable, all the methods or operations are synchronized,
    meaning if one thread is accessing the Hashtable (by get(), put(),... or other methods on this structure), it owns the lock and all other threads will lock out until the thread that owns the lock releases the lock; which means only one thread can access the hash table at a time; which can cause performance issues.
    We need to use a synchronized block or method only of two threads modify a "shared resource", if they do not modify a shared resource, we do not need to use the synchronization.
    On the other hand, the methods of ConcurrentHashMap are not synchronized; so multiple threads can access the ConcurrentHashMap at the same time. But isn't the ConcurrentHashMap itself the "shared resource" that threads are accessing? Should we use it only if the threads are reading from map and not writing to it? And then if threads also write to the structure, then it looks like its better to not to use the ConcurrentHashMap, rather use the regular HashMap with the synchronized wrapper?
    Any help is greatly appreciated.

    We need to use a synchronized block or method only of two threads modify a "shared resource", if they do not modify a shared resource, we do not need to use the synchronization. Actually, you need to synchronize access to the shared resource for both readers and writers. If one thread is updating an unsynchronized HashMap, and a concurrent thread tries to read that map, it may be in an inconsistent state. When synchronizing on the map, the reader will be blocked until the writer completes.
    What you don't need to do is prevent multiple readers from accessing the map, if there's no writer. However, a synchronized map or HashTable will single-thread reads as well as writes.
    On the other hand, the methods of ConcurrentHashMap are not synchronized; so multiple threads can access the ConcurrentHashMap at the same time. But isn't the ConcurrentHashMap itself the "shared resource" that threads are accessing? No, it's actually synchronized at a finer level. Without getting into the details of HashMap implementation, an object's hashcode is used to identify a linked list of hashmap entries. The only time that you have a concurrency issue is when a reader and writer are accessing the same list. So the ConcurrentHashMap locks only the list that's being updated, and allows readers (and writers!) to access the other bucket lists. Plus, it allows two readers to proceed concurrently.

  • Java.security.AccessControlException: access denied (java.lang.RuntimePermi

    Any One can help me to solve this problem, when the Japplet get the return object from servlet, i got the following error, please help me
    at java.security.AccessControlContext.checkPermission(AccessControlConte
    xt.java:272)
    at java.security.AccessController.checkPermission(AccessController.java:
    399)
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
    at java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:150
    1)
    at sun.applet.AppletSecurity.checkPackageAccess(AppletSecurity.java:169)
    at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:108)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:195)
    at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:654)
    at java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java
    :918)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:366)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
    at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1186)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
    at java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java:226
    3)
    at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:51
    9)
    at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1412)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
    at java.util.Hashtable.readObject(Hashtable.java:792)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.io.ObjectInputStream.invokeObjectReader(ObjectInputStream.java:2
    214)
    at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1411)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
    at java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java:226
    3)
    at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:51
    9)
    at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1412)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
    at wots.wb.uml.ServletList.queryServer(ServletList.java:223)
    at wots.wb.uml.ServletList.update(ServletList.java:76)
    at wots.wb.uml.ServletList.run(ServletList.java:52)
    at java.lang.Thread.run(Thread.java:484)

    If you are using Java plugin you may have to set the network access unrestricted at the Java plugin control panel..

  • Java.util.NoSuchElementException Error

    when i am executing my servlet program tha i got this error
    java.util.NoSuchElementException
         at Scanning.scan(googlewsd.java:262)
         at googlewsd.doGet(googlewsd.java:67)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    what can i do to remove this error ..
    plz help me..its very urgent
    thanx

    java.lang.NullPointerException
         at java.util.StringTokenizer.(StringTokenizer.java:119)
         at java.util.StringTokenizer.(StringTokenizer.java:135)
         at Scanning.scan(googlewsd.java:237)
    pls tell me solution of this error.
    pls help me
    thanx

  • Implementing export/import java utility

    Hi all,
    I am not sure I hit the correct forum but I'll give it a try.
    I need to write java utility that access table in one db, select some rows and copy them to a similar table in secon db - as either new rows or update to existing rows (if such rows exist).
    I thought I might use the OracleCachedRowSet to get data from one DB and to write data from another.
    Basically the code looks like....:
    Connection connSrc = null;
    ResultSet rsSrc;
    OracleCachedRowSet crs;
    try
    Class.forName("jdbc:oracle:thin:@myHOST:1521:DBNAME");
    connSrc = DriverManager.getConnection(srcDriver, USER, PWD);
    stmtSrc = connSrc.createStatement();
    rsSrc = stmtSrc.executeQuery("SELECT * FROM MYTBL");
    crs = new OracleCachedRowSet();
    crs.populate(rsSrc);
    crs.setUrl("jdbc:oracle:thin:@myHOST2:1523:DBNAME2");
    crs.setUsername("USER2");
    crs.setPassword("PWD2");
    crs.setCommand("SELECT * FROM " + RULETBL);
    crs.acceptChanges();
    The second table was empty but it did not get populated with the rows from first DB,
    I thought this might have to do with the SyncProvider issue that needs to implement the GRADE_NONE but I don't know if this is indeed the problem and where to get such sync provider implementation.
    I'll be glad to get any assistance.
    Regards,
    Avi

    Hi ,
    Many thanks for helping here.
    I thought I'd get suggestions like that...:-) It is dectated that I'll do this task using Java code. I can't even use system call to EXP/IMP utilities as anyhow I need to analyze all rows that matches the result of the SELECT command in order to access some specific information on specific column. Although I do know some column names (for that specific need) - I don't want to keep the knowledge of the row columns - as the table shema might be altered localy by our customers (usually additional columns) or from version to version of the software that usually deals with it.
    As conclusion of the above I need to use JDBC or something similar (Hibernate, JDO etc.).
    Regards,
    Avi

  • Newbie help with collection java.util.ArrayList

    Hi,
    the documentation for the class ArrayList is given as
    public class ArrayList<E>
    extends AbstractList<E>
    what is that <E> over there ? Similarly, what is the <T> in an iterator ? Exact problem along with code is at the end of the post.
    I am a C++ programmer and am very comfortable with the STL, but that approach i.e. ArrayList<Job> does not work over here :(
    PLease help.
    TIA,
    Madhu.
    Code Details:
    I have a class (Job) which I wish to add to the list using the add method. Obviously, it gives an error.
    Code goes as
    class MyQueue extends java.lang.Object
    private java.util.ArrayList jobsList=new java.util.ArrayList(100);
    public void addtoMyQueueatIndex(Job newJob,int Index)
    jobsList.add((java.lang.Object)newJob,Index);
    Error is :
    MyQueue.java:96: cannot find symbol
    symbol : method addtoMyQueueatIndex((java.lang.Object,int)
    location: class java.util.ArrayList
    jobsList.add((java.lang.Object)newJob,Index);

    Are you using J2SDK 1.5.0 beta 1 or J2SDK 1.4.2? Are you using the docs from 1.5 and the compiler from 1.4.2?
    private java.util.ArrayList jobsList=new java.util.ArrayList(100); //-- 1.4.2 code
    private java.util.List<Job> jobsList = new java.util.ArrayList<Job> (100); //-- 1.5.0 code (preferred style)
    private java.util.ArrayList<Job> jobsList = new java.util.ArrayList<Job> (100); //-- 1.5.0 codeAs a matter of style, use the interface and not the real class when declaring a variable like the jobsList above whenever possible or applicable.
    You do not need to cast the object newJob to Object. And you have inverted the positions of the parameters.
    void add(int index, E element)
    Inserts the specified element at the specified position in this list (optional operation).
    jobsList.add(Index, newJob);

  • Retrofitting java.util.Properties

    Hi all,
    why was java.util.Properties in JDK 1.5 not retrofitted to implement java.util.Map<String,String>?
    This would have been the "natural" way to take advantage of typesafety.
    I'm sure this has something to do with backwards compatibility, but what exactly woud it break?
    Thanks

    java.util.Properties extends java.util.Hashtable
    java.util.Properties : private java.util.HashtableWhat does that actually buy you though?
    I mean its really the difference between:
    class Properties {
        final Hashtable m_contents = new Hashtable();
        public String getProperty(String key) {
                return (String) m_contents.get(key);
    }vs.
    class Properties private extends Hashtable {
        public String getProperty(String key) {
                return (String) super.get(key);
    }Which is nice and all, but it strikes me as syntactic sugar more than anything else.
    I don't disagree: Properties should never have extended Hashtable, it should have encapsulated a Hashtable. Also Stack should not extend Vector, Booleans should not have a public constructor, it would even have been nicer if people actually used the Dictionary interface occassionally in 1.0/1.1.
    Its easy to say these things now with the benefit of 20-20 hindsight.

  • NullPointer java.util.TimeZone.parseCustomTimeZone when trying to connect

    Hi
    I've just upgraded to 1.5.1 Build MAIN-5440 and I'm now getting the following error on every connection.
    It happens after the UN/PW is checked (if you enter UN/PW incorrectly this is detected first).
    I've several Ocacle databases XE and other 10.2 versions - all do exctly the same thing.
    This is a showstopper.
    Any clues.
    Thanks
    Mike
    java.lang.NullPointerException
         at java.util.TimeZone.parseCustomTimeZone(TimeZone.java:756)
         at java.util.TimeZone.getTimeZone(TimeZone.java:485)
         at java.util.TimeZone.getTimeZone(TimeZone.java:479)
         at oracle.jdbc.driver.PhysicalConnection.setDbTzCalendar(PhysicalConnection.java:4653)
         at oracle.jdbc.driver.PhysicalConnection.setSessionTimeZone(PhysicalConnection.java:4598)
         at oracle.javatools.db.ora.Oracle8i.initOC(Oracle8i.java:171)
         at oracle.javatools.db.ora.Oracle8i.<init>(Oracle8i.java:41)
         at oracle.javatools.db.ora.Oracle9i.<init>(Oracle9i.java:181)
         at oracle.javatools.db.ora.Oracle9iR2.<init>(Oracle9iR2.java:41)
         at oracle.javatools.db.ora.Oracle10g.<init>(Oracle10g.java:26)
         at oracle.javatools.db.ora.Oracle10gR2.<init>(Oracle10gR2.java:18)
         at oracle.javatools.db.ora.Oracle10gR2XE.<init>(Oracle10gR2XE.java:17)
         at oracle.javatools.db.ora.OracleDatabaseFactory.createDatabaseImpl(OracleDatabaseFactory.java:115)
         at oracle.javatools.db.DatabaseFactory.createDatabaseImpl(DatabaseFactory.java:147)
         at oracle.javatools.db.DatabaseFactory.createDatabase(DatabaseFactory.java:130)
         at oracle.jdeveloper.db.DatabaseConnections.getDatabase(DatabaseConnections.java:637)
         at oracle.jdeveloper.db.DatabaseConnections.getDatabase(DatabaseConnections.java:564)
         at oracle.dbtools.raptor.utils.Connections$ConnectionInfo$ConnectRunnable.doWork(Connections.java:1144)
         at oracle.ide.dialogs.ProgressRunnable.run(ProgressRunnable.java:161)
         at oracle.ide.dialogs.ProgressBar.run(ProgressBar.java:615)
         at java.lang.Thread.run(Thread.java:595)

    Hi K
    I tried your suggestion but it made no difference.....
    I then removed SQL Developer entirely both the SW directory and all the settings in the ApplicationData directory.
    Reloaded from downloaded zip file, started, and downloaded updated online - taking only the SQLDeveloper software updates - no other database viewers or migration stuff.
    This worked the first time but then I ran into the issue of the connections not loading at startup.
    This I solved by following the sqldeveloper.conf additions described in:-
    http://forums.oracle.com/forums/ann.jspa?annID=737
    Things seem back to normal now.
    Thanks
    Mike

Maybe you are looking for

  • Info broadcaster - falls over when more than 2 queries are in a workbook

    Hi everyone, We use IB reports extensively with over 2,000 IBs being sent out weekly. I have a query I want so send out via IB and I can create an IB setting on the query without issue.  However when I insert more than one version of the query in a w

  • After migrating my files from an HP laptop to my MacBook Pro....

    After migrating my files from an HP to my MacBook, how do I combine the accounts in which my transferred files is under?

  • Sort Contacts by [First Name, Last Name] on Phone

    I currently have all of my contacts in Outlook saved and "Filed As" First Name, Last Name. When I go to sync with the phone (through iTunes), the phone still shows all my contacts sorted as Last Name, First Name. I have tried deleting my contacts com

  • Managing files version using RIDC.

    Hi everyone! I would like to get an checked IN/OUT file depending on a specific version. I know it's possible to do such a task using web interface. However I have to do this programmatically using RIDC. Is there any service that can do the task? Tha

  • How can I un-install the Trial software?

    There is a glitch in the trial software I have been using, so I would prefer to un-install it and then buy the software for a fresh install. How do I make sure all the associated files are removed?