NullPointerException when scanning files on C:\

I am scanning all the files on the C:\ drive and when the scan comes to the end of the hard drive it finds the directory:
C:\System Volume Information
which is neither hidden nor can it be seen when I enable viewing of hidden files.
Anyway, when it comes to this directory and tries to read its contents, it throws a NullPointerException.
Anybody have any ideas on how I can bypass this?
Thanks in advanced

I assume, that you are using a win-system.
"C:\System Volume Information" is realy present in NTFS and FAT32.
Its hidden and it's a system folder.
Default setting of explorer is, that system files are not shown. So it's not enough to show hidden files, you have to enable system files too in explorer settings.
In Fat32 you are able to access this folder (but better leave it alone!).
In NTFS you can't read it's contents, even if you are admin.
You are simply missing the rights!
So of course you have to do some error handling, if you are missing the rights of accessing something. (This should be done in any case)
Don't know the methods you are using, so i cant't give you a sample.
Good luck.

Similar Messages

  • Keeping redline text "red" when Scanning file in Adobe Acrobat 9 Pro?

    The document is a word document that has several "red" color text and "red" color strikethrough words to show that a particular word is being edited/deleted.  The problem/question I have is that the "red" color in the document, when scanned, does not come out "red?"  The color is dark blue/black?  However, if there are other colors in the word document, these colors come out OK?  Not sure why "only" red strikethroughs or text "colored" red in same document does not come out in "red?"  The following info is sent:  I am using Adobe Acrobat 9 Pro; the reader is Adobe Reader X; and the print/scanner is HP OfficeJet Pro 8600.  Any answers/help is greatly appreciated.  Thanks!

    Dear user,
    You are getting such output because you have checked ON the setting 'Print to file' in one of your previous prints. For resolving this issue, kindly uncheck option 'Print to file' present in bottom left corner of print dialog and then click on 'Print' (See attached image for reference).
    Hope this will solve your problem.
    Thanks
    sonal

  • Officejet L7680, corrupt PDF file when scanning

    When scanning on my L7680, I have just started to have issues with a "General Error" message (on and off) and also a corrupt PDF file error.  What can I do to fix this? 
    HELP!!!!

    Hi 1193,
    Welcome to the HP Forums!
    I see that you cannot scan with your HP Officejet L7680, and I am happy to help you with this scanning issue!
    For further assistance, I will need to know the following:
    If you are using a Windows or Mac Operating System, and the version number. To find the exact version, visit this link. Whatsmyos.
    If the printer is connected, Wireless, Ethernet, or USB.
    If the power cable is plugged into a surge protector, or directly to the wall outlet. Issues when Connected to an Uninterruptible Power Supply/Power Strip/Surge Protector. This applies to Inkjet printers as well.
    If the printer is able to make copies by itself.
    If you are using Windows, please try our HP Print and Scan Doctor, and let me know what happens!
    Hope to hear from you, and have a great day!
    RnRMusicMan
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" to say “Thanks” for helping!

  • Am trying to convert jpeg file to pdf. When I scan file it comes up in jpeg.?

    When scanning doc it comes up as jpeg. How do I convert to PDF?

    Adobe Reader does not do this conversion. Adobe Acrobat can convert JPEG to PDF or (much better) scan direct to PDF. Perhaps your scanner already comes with software that makes PDF files - some do, but unless that software is Acrobat it's not really our field.

  • NullPointerException when adding an object into a Vector Class

    So here is the code:
    package Image;
    import java.io.Serializable;
    import java.util.Vector;
    public class Album implements Serializable{
    private String name;
    private String password;
    Vector<ImageClass> allImages;
    public Album( String name, String password, Vector<ImageClass> allImages) {
    this.name = name;
    this.password = password;
    this.allImages = allImages;
    public Album() {
    public Vector<ImageClass> getAllImages() {
    return allImages;
    public void setAllImages(Vector<ImageClass> allImages) {
    this.allImages = allImages;
    public String getName() {
    return name;
    public void setName(String name) {
    this.name = name;
    public String getPassword() {
    return password;
    public void setPassword(String password) {
    this.password = password;
    public void addIC(ImageClass ic){
    allImages.add(ic);
    public ImageClass getIC(int pos){
    ImageClass ic = allImages.get(pos);
    return ic;
    Now I got an NullPointerException when I call the getIC Method from another class of another package
    Here is the part of code of that class.
    private void SaveMenuItemActionPerformed(java.awt.event.ActionEvent evt) {                                            
    ImageClass ic = new ImageClass();
    ic.setTitle(ImageTextField.getText());
    ic.setDescription(DescriptionTextArea.getText());
    try {
    ic.setReferenceNumber(Integer.parseInt(ReferenceTextField.getText()));
    } catch (NumberFormatException nfe) {
    JOptionPane.showMessageDialog(null, "Reference Number is not in a correct format");
    try {
    ic.setDate(new SimpleDateFormat("dd/MM/yyyy").parse(DateTextField.getText(), new ParsePosition(0)));
    } catch (IllegalArgumentException iae) {
    JOptionPane.showMessageDialog(null, "Date is not in correct format");
    ic.setImageData(imageData);
    if(a==null){
    JOptionPane.showMessageDialog(this,"Please, create or open an Album");
    }else{
    a.addIC(ic);
    try{
    ObjectOutputStream oos;
    FileOutputStream fos = new FileOutputStream(album, true);
    oos = new ObjectOutputStream(fos);
    oos.writeObject(a);
    oos.flush();
    oos.close();
    }catch(FileNotFoundException fnfe){
    fnfe.printStackTrace();
    }catch(IOException ioe){
    ioe.printStackTrace();
    }

    h1. The Ubiquitous Newbie Tips
    * DON'T SHOUT!!!
    * Homework dumps will be flamed mercilessly. [Feelin' lucky, punk? Well, do ya'?|http://www.youtube.com/watch?v=1-0BVT4cqGY]
    * Have a quick scan through the [Forum FAQ's|http://wikis.sun.com/display/SunForums/Forums.sun.com+FAQ].
    h5. Ask a good question
    * Don't forget to actually ask a question. No, The subject line doesn't count.
    * Don't even talk to me until you've:
        (a) [googled it|http://www.google.com.au/] and
        (b) had a squizzy at the [Java Cheat Sheet|http://mindprod.com/jgloss/jcheat.html] and
        (c) looked it up in [Sun's Java Tutorials|http://java.sun.com/docs/books/tutorial/] and
        (d) read the relevant section of the [API Docs|http://java.sun.com/javase/6/docs/api/index-files/index-1.html] and maybe even
        (e) referred to the JLS for "advanced" questions.
    * [Good questions|http://www.catb.org/~esr/faqs/smart-questions.html#intro] get better Answers. It's a fact. Trust me on this one.
        - Lots of regulars on these forums simply don't read badly written questions. It's just too frustrating.
          - FFS spare us the SMS and L33t speak! Pull your pants up, and get a hair cut!
        - Often you discover your own mistake whilst forming a "Good question".
        - Often you discover that you where trying to answer "[the wrong question|http://blog.aisleten.com/2008/11/20/youre-asking-the-wrong-question/]".
        - Many of the regulars on these forums will bend over backwards to help with a "Good question",
          especially to a nuggetty problem, because they're interested in the answer.
    * Improve your chances of getting laid tonight by writing an SSCCE
        - For you normal people, That's a: Short Self-Contained Compilable (Correct) Example.
        - Short is sweet: No-one wants to wade through 5000 lines to find your syntax errors!
        - Often you discover your own mistake whilst writing an SSCCE.
        - Often you solve your own problem whilst preparing the SSCCE.
        - Solving your own problem yields a sense of accomplishment, which makes you smarter ;-)
    h5. Formatting Matters
    * Post your code between a pair of &#123;code} tags
        - That is: &#123;code} ... your code goes here ... &#123;code}
        - This makes your code easier to read by preserving whitespace and highlighting java syntax.
        - Copy&paste your source code directly from your editor. The forum editor basically sucks.
        - The forums tabwidth is 8, as per [the java coding conventions|http://java.sun.com/docs/codeconv/].
          - Indents will go jagged if your tabwidth!=8 and you've mixed tabs and spaces.
          - Indentation is essential to following program code.
          - Long lines (say > 132 chars) should be wrapped.
    * Post your error messages between a pair of &#123;code} tags:
        - That is: &#123;code} ... errors here ... &#123;code}
        - OR: &#91;pre]&#123;noformat} ... errors here ... &#123;noformat}&#91;/pre]
        - To make it easier for us to find, Mark the erroneous line(s) in your source-code. For example:
            System.out.println("Your momma!); // <<<< ERROR 1
        - Note that error messages are rendered basically useless if the code has been
          modified AT ALL since the error message was produced.
        - Here's [How to read a stacktrace|http://www.0xcafefeed.com/2004/06/of-thread-dumps-and-stack-traces/].
    * The forum editor has a "Preview" pane. Use it.
        - If you're new around here you'll probably find the "Rich Text" view is easier to use.
        - WARNING: Swapping from "Plain Text" view to "Rich Text" scrambles the markup!
        - To see how a posted "special effect" is done, click reply then click the quote button.
    If you (the newbie) have covered these bases *you deserve, and can therefore expect, GOOD answers!*
    h1. The pledge!
    We the New To Java regulars do hereby pledge to refrain from flaming anybody, no matter how gumbyish the question, if the OP has demonstrably tried to cover these bases. The rest are fair game.

  • Handling repository of scanned files in SAP

    Hi all!
    1> I want to maintain a repository of scanned documents. I will have a frontend screen through which I can handle the repository, i.e. uploading or downloading the document. Please suggest how to handle.
    2> I also require a log with the changes for the particular file, i.e. when the file has been changes and who changed it so that I can generate a log later. I can maintain a log table for that also.
    Please help.

    Hi All,
    Can anyone suggest anything on this? This is very urgent.
    Regards,
    Atanu

  • NullPointerException when trying to load faces application

    Hi,
    I'm new with JSF and I have a NullPointerException when trying to use a JSF tag in my file.
    My web.xml is defined as follows:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <context-param>
    <param-name>javax.faces.CONFIG_FILES</param-name>
    <param-value>/WEB-INF/faces-config.xml</param-value>
    </context-param>
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>0</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.faces</url-pattern>
    </servlet-mapping>
    </web-app>
    And faces-config.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE faces-config PUBLIC
    "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
    "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
    The exception that I get is:
    java.lang.NullPointerException
         javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:615)
         javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:217)
         org.apache.myfaces.taglib.core.ViewTag.doStartTag(ViewTag.java:71)
    (HttpJspBase.java:97)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    I guess that it's a matter of configuration, but couldn't find a solution.
    Can someone help?
    Thanks,
    Efrat

    well i think you will need
    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>server</param-value>
    </context-param>
    in you web.xml as well can be server or client state save but quite sure you have to define that

  • How do I save a scan file in OS X Maverick? The file can be saved, but not readable.

    How do I save a scan file in OS X Maverick properly? The file can be saved, but not readable.

    I've never had a problem with that. What does the error message say when you try to open it?

  • Java.lang.NullPointerException when trying to compile

    Hi everybody!
    I'm trying to compile a file using javax.tools.JavaCompiler but I get a java.lang.NullPointerException when running the program.
    Here is my code:
    public boolean CompExecFile(File filename){
              boolean compRes = false;
              try {
                   System.out.println(filename.getAbsolutePath());
                   JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
                   StandardJavaFileManager fileManager = compiler.getStandardFileManager(null, null, null); //line where I get the error
                   Iterable<? extends JavaFileObject> compilationUnits2 = fileManager.getJavaFileObjects(filename);
                   compRes = compiler.getTask(null, fileManager, null, null, null, compilationUnits2).call();
                   fileManager.close();
                 if (compRes) {
                     System.out.println ("Compilation was successful");
                 } else {
                     System.out.println ("Compilation failed");
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              return compRes;
         }There error on the line "StandardJavaFileManager fileManager = compiler.getStandardFileManager(null, null, null);":
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException+
    I've seen several examples using the parameters "null,null,null" but I don't know if it's good :(
    Many thanks for your help.

    I've found something which could maybe be what I need to do but I'm not sure:
    // Build a new ClassLoader using the given URLs, replace current Classloader
    ClassLoader oldCL = Thread.currentThread().getContextClassLoader();
    ClassLoader newCL = new URLClassLoader(myClasspathURLs, oldCL);
    Thread.currentThread().setContextClassLoader(newCL);
    System.out.println("Successfully replaced ClassLoader");
    Class fooClass = newCL.loadClass(appClass); //which replaces the line "Class<?> tempFileClass = Class.forName("TempFile");" ?!Is that what I need to do?
    EDIT: I've tried that but I still have the same problem:
                      File classFile = new File ("TempFile.class");
                      ClassLoader oldCL = Thread.currentThread().getContextClassLoader();
                      ClassLoader newCL = new URLClassLoader(new URL[] {classFile.toURL()}, oldCL);
                      Thread.currentThread().setContextClassLoader(newCL);
                      System.out.println("Successfully replaced ClassLoader");
                      Class tempFileClass = newCL.loadClass("TempFile");
                      Method main = tempFileClass.getMethod("main", String[].class);
                      main.invoke(null,new String[0]); Edited by: Foobrother on Jul 28, 2008 8:18 AM

  • Java.lang.NullPointerException when trying to start UM

    I get java.lang.NullPointerException when I try to start Unified Messaging using EM on a new Windows 2000 single-box installation. Has anyone enountered this problem?

    I have also encountered same issue. Please let me know the solution in case you find it.
    In fact after configuiring Oracle files as per the document provided at Oracle OTN site 'Collaboration handbook', I am unable to connect OID. As per log it says
    2003/04/01:20:37:58[Oidmon]: Unable to connect to database, will retry after 20 sec
    2003/04/01:21:20:21Starting Monitor Process, PID=2920
    2003/04/01:21:20:21ORACLE_SID not set, setting to iasdb
    2003/04/01:21:41:22Failed to fetch Process Table. ORA-12571: TNS:packet writer failure
    I checked Listener, which was found ok, then I checked TNSPING, which executed ok.
    I have dowloaded documents troubleshooting OID, but no success. The document itself says that architecture of OID is fairly complex and the log does not suggest much insight.
    Any solution?
    Regards,
    Vipul

  • NullPointerException when opening a script in SQL Developer 4.0.0.12

    I recently upgraded to SQL Developer v.4.0.0.12 64 bit, and am running into some issues.
    I am running this on 64 bit Windows 7. I have a 64 bit Oracle 11, and in addition have the 32 bit oracle client installed.
    I made an association between the .sql file extension and sqldeveloper64W.exe.
    However I frequently get a nullpointerexception when clicking on a script in the file explorer.
    It seems to occur mostly if I loaded scripts into SQL Developer before.
    If I close all the windows before closing SQL Developer and then click on a script in the file manager, things work (startup is arguably slower than v.3).
    But in most cases either nothing happens, or I get the NullPointerException below.
    What am I doing wrong?
    Regards,
    Wim
    java.lang.NullPointerException
      at oracle.dbtools.raptor.plsql.FindHighlightListener.editorDeactivated(FindHighlightListener.java:63)
      at com.oracle.jdeveloper.nbwindowsystem.NbEditorManager.fireEditorEvent(NbEditorManager.java:1315)
      at com.oracle.jdeveloper.nbwindowsystem.NbEditorManager.handleEditorEvent(NbEditorManager.java:1294)
      at com.oracle.jdeveloper.nbwindowsystem.NbEditorManager.whenCurrentEditorChanges(NbEditorManager.java:1556)
      at com.oracle.jdeveloper.nbwindowsystem.editor.TabGroup.whenCurrentEditorChanges(TabGroup.java:1026)
      at com.oracle.jdeveloper.nbwindowsystem.editor.TabGroup.setCurrentTabGroupState(TabGroup.java:847)
      at com.oracle.jdeveloper.nbwindowsystem.editor.TabGroup.addTabGroupState(TabGroup.java:129)
      at com.oracle.jdeveloper.nbwindowsystem.NbEditorManager.createEditor(NbEditorManager.java:534)
      at com.oracle.jdeveloper.nbwindowsystem.NbEditorManager.createEditor(NbEditorManager.java:511)
      at com.oracle.jdeveloper.nbwindowsystem.NbEditorManager.openEditor(NbEditorManager.java:379)
      at oracle.ide.cmd.OpenCommand.openWithNoProject(OpenCommand.java:337)
      at oracle.ide.cmd.OpenCommand.access$100(OpenCommand.java:62)
      at oracle.ide.cmd.OpenCommand$1.run(OpenCommand.java:266)
      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
      at java.awt.EventQueue.access$200(EventQueue.java:103)
      at java.awt.EventQueue$3.run(EventQueue.java:694)
      at java.awt.EventQueue$3.run(EventQueue.java:692)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
      at oracle.javatools.internal.ui.EventQueueWrapper._dispatchEvent(EventQueueWrapper.java:169)
      at oracle.javatools.internal.ui.EventQueueWrapper.dispatchEvent(EventQueueWrapper.java:151)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

    Please refer to this White paper for how to generate PL/SQL package for workflow deployment:
    Oracle Data Miner (Extension of SQL Developer 4.0)
    Generate a PL/SQL script for workflow deployment
    http://www.oracle.com/technetwork/database/options/advanced-analytics/odmrcodegenwhitepaper-2042206.pdf

  • ARD 2.2 Admin Crashes When Scanning Local Network

    Out of the blue, my ARD Admin application began to crash when scanning the Local Network.
    I deleted the application's preferences file (com.apple.RemoteDesktop.plist) and retried with the same results.
    Installed ARD admin application on a different machine with a fresh 10.4.2 OS install and it is still crashing whilst scanning.
    My Network Engineers swears that nothing has changed recently on the network.
    Wondering if anyone else has seen this.

    I was having the same problem until this morning, and one of my associates in a neighbor district discovered the problem. ARD 2.2 is VERY concerned about DNS entries.
    We are using OS X Server for our DNS, and what I did was create a bogus machine entry for each subnet. Thus, if I wanted to search our senior high lab subnet (10.136.43.x) I created an entry for 10.136.43.0. There is no physical machine at that address, but it forces OS X Server to create an IN-ADDR.ARPA record for that subnet. I found that to be a lot easier than manually editing the associated DNS files.
    It does work superbly. Three other folks in our district with ARD crashes tried doing searches and they were all successful. Adding the IN-ADDR.ARPA entries wasn't time consuming as we don't have a ton of subnets . We've defined standards for where machines should be as follows:
    (Device: Range)
    Switches: 10.x.1.100-150
    Printers: 10.x.2.1-50
    DHCP: 10.x.2.150-254
    Classrooms: 10.x.3.1-254
    Labs: 10.x.4.1-100
    Media Center: 10.x.4.101-150
    The junior high and high school are a bit different because they have more lab machines, but we try to stick to the basic scheme. This works great for us because 1) it allows us to know where devices should appear and 2) it greatly limits the range ARD must scan to pick up all machines of a particular kind (e.g. classroom or lab). We have a bit of reconfiguration to do because we should be able to have static classroom and DHCP units all within the 10.x.3 subnet, but that will be taken care of over the course of this year.
    I hope this helps some folks.

  • Naming scanned files

    Hello Everyone,
    As far as I can tell (I haven't had PSE long) when files are scanned, they are given the name Image 1,2,3....
    Is it possible to supply a name eg. "2007 Holiday" and then have the images numbered automatically sequentially?
    Thanks
    Jim

    Hi again,
    That sounds fine and will do the job when the files are displayed in the desired order in the Organiser.
    It doesn't appear to be possible to alter the display order other than defined by date/time/name/folder location.
    It would be handy to be able to shuffle the images around in Organiser and then rename so that they can be retrieved in that order.
    Thanks for advice - Im busy scanning old family photos into my PC for the purposes of creating a Photo Database and I must say PSE 5 is brilliant for the job.!
    Regards
    Jim

  • Enlarging/​reducing document size when scanning.

    Is it possible to enlarge/reduce a document size on the Deskjet 2540? My wife uses that function for her sewing patterns. If not capable, could someone please recommend software?
    Thank you,
    Tom
    This question was solved.
    View Solution.

    Hi,
    No zooming function, you het 100% (size) of the original when scan. No need to buy any software, you can use Windows Paint to increase/decrease the scanned file.
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • NullPointerException when creating a JTextField ?

    I feel pretty stupid asking about a NPE - a typical newbie problem, but this is just very strange. Working on my app I seem to have messed up something - somewhere. I get a NullPointerException when creating a new JTextField. I haven't had a problem with this line before, and I was not editing that file...
    The line in my ImageSearchBox class:
            searchField = new JTextField(10);where searchField is defined
    private JTextField searchField;The stack trace:
    java.lang.NullPointerException
         at javax.swing.text.StyleContext.registerStaticAttributeKey(StyleContext.java:665)
         at javax.swing.text.StyleContext.<clinit>(StyleContext.java:1602)
         at javax.swing.text.AbstractDocument.<init>(AbstractDocument.java:91)
         at javax.swing.text.PlainDocument.<init>(PlainDocument.java:74)
         at javax.swing.text.PlainDocument.<init>(PlainDocument.java:64)
         at javax.swing.text.DefaultEditorKit.createDefaultDocument(DefaultEditorKit.java:113)
         at javax.swing.plaf.basic.BasicTextUI.installUI(BasicTextUI.java:688)
         at javax.swing.plaf.basic.BasicTextFieldUI.installUI(BasicTextFieldUI.java:56)
         at javax.swing.JComponent.setUI(JComponent.java:449)
         at javax.swing.text.JTextComponent.setUI(JTextComponent.java:267)
         at javax.swing.text.JTextComponent.updateUI(JTextComponent.java:277)
         at javax.swing.text.JTextComponent.<init>(JTextComponent.java:251)
         at javax.swing.JTextField.<init>(JTextField.java:211)
         at javax.swing.JTextField.<init>(JTextField.java:178)
         at no.xait.dod.customcomponents.ImageSearchBox.<init>(ImageSearchBox.java:27)
    (..)????

    I found the source of the problem - but I do not understand why it is a problem. If anyone can explain to me why this happens, they get the dukes :) ...
    I've got a Singelton class that's named StyleRepository. When I commented out these declarations the problem disappeared:
        private Object align = javax.swing.text.StyleConstants.ParagraphConstants.Alignment;
        private Object fontfamily = javax.swing.text.StyleConstants.FontConstants.Family;
        private String fontname = "FontName";
        private Object fontsize = javax.swing.text.StyleConstants.FontConstants.FontSize;
        private Object foregroundcolor = javax.swing.text.StyleConstants.Foreground;
        private Object backgroundcolor = javax.swing.text.StyleConstants.CharacterConstants.Background;
        private Object firstlineindent = javax.swing.text.StyleConstants.FirstLineIndent;
        private Object leftindent = javax.swing.text.StyleConstants.LeftIndent;
        private Object rightindent = javax.swing.text.StyleConstants.RightIndent;
        private Object spaceabove = javax.swing.text.StyleConstants.ParagraphConstants.SpaceAbove;
        private Object spacebelow = javax.swing.text.StyleConstants.ParagraphConstants.SpaceBelow;
        private Object linespacing = javax.swing.text.StyleConstants.ParagraphConstants.LineSpacing;
        private Object bold = javax.swing.text.StyleConstants.ParagraphConstants.Bold;
        private Object italic = javax.swing.text.StyleConstants.ParagraphConstants.Italic;
        private Object underline = javax.swing.text.StyleConstants.ParagraphConstants.Underline;Isn't that weird?? It's like the declarations above override something in StyleContext or something, cause if I have the lines there I get an error even doing a
    JTextFiled f = new JTextField(10);
    Strange?! ..

Maybe you are looking for