Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » Error Log filling up
Error Log filling up [message #486215] Wed, 16 September 2009 18:56 Go to next message
No real name is currently offline No real nameFriend
Messages: 16
Registered: July 2009
Junior Member
Hi,
I've been using visual editor for a while now and it's been working fine. However , starting today I noticed that I am getting errors in the error log with vague descriptions that I'm not sure how to fix. My visual component is a simple window with a text area and a few buttons. The errors happen when I'm editing the code. Here are two of them and I'm hoping someone can help.

1. Exception Thrown
Plugin - org.eclipse.ve. java.core

java.lang.NullPointerException
at org.eclipse.ve.internal.java.codegen.util.CodeGenUtil.create Instance(CodeGenUtil.java:103)
at org.eclipse.ve.internal.java.codegen.util.CodeGenUtil.create Instance(CodeGenUtil.java:116)
at org.eclipse.ve.internal.java.codegen.model.BeanPart.createEO bject(BeanPart.java:809)


2. Exception Thrown
plugin - org.eclipse.ve. java.core

java.lang.ArrayIndexOutOfBoundsException: -1
at org.eclipse.emf.common.util.BasicEList.get(BasicEList.java:5 14)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObjectF orURIFragmentRootSegment(ResourceImpl.java:642)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:692)



Thanks in advance

Re: Error Log filling up [message #486245 is a reply to message #486215] Wed, 16 September 2009 21:15 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Hi,

Sometimes there is a stalecache problem. This may be a symptom of that.
The way to get the cache cleared is to:

1) Open a VE
2) Close the VE
3) Project->Clean->Clean all
4) Wait for build to finish
5) Open a VE.

Hopefully you won't get any more such errors.


> Thanks in advance
>
>

--
Thanks,
Rich Kulp
Re: Error Log filling up [message #486247 is a reply to message #486245] Wed, 16 September 2009 21:20 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 16
Registered: July 2009
Junior Member
I thought that might be the issue because Eclipse opened with an error today so I did run a -clean on it when I opened it again but that didn't fix this error. I'm not sure what the issue could be.
Re: Error Log filling up [message #486371 is a reply to message #486247] Thu, 17 September 2009 13:17 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Hi,
Not -clean. That clears only the plugin configurations. It doesn't clear
cached metadata. You need to use the procedure I outlined to clear the
cached metadata.

Actually -clean should rarely be needed except if you are just putting
plugins directly into the eclipse configuration without using the
install manager or the dropins folder.

cjob68@shaw.ca wrote:
> I thought that might be the issue because Eclipse opened with an error
> today so I did run a -clean on it when I opened it again but that didn't
> fix this error. I'm not sure what the issue could be.

--
Thanks,
Rich Kulp
Re: Error Log filling up [message #486432 is a reply to message #486371] Thu, 17 September 2009 15:44 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 16
Registered: July 2009
Junior Member
Thanks , I tried that but it didn't seem to fix it. I think I may know what the problem is. I have modified the section where the visual editor creates the jTable and the visual editor doesn't like this.

Visual Editor likes this:
String[] columnNames = {"Column1", "Column2"};
Vector<String> columnNamesV = new Vector<String>(Arrays.asList(columnNames));
jTable = new JTable(getRowData(),columnNamesV);


My modified code which it doesn't like:
String[] columnNames = {"Column1", "Column2"};
Vector<String> columnNamesV = new Vector<String>(Arrays.asList(columnNames));
jTable = new JTable(getRowData(),columnNamesV){
...custom table code here including creating a rendered to modify the color of the rows
};

Any ideas ?
Re: Error Log filling up [message #486441 is a reply to message #486432] Thu, 17 September 2009 15:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Yeah, I could see that being a problem. The VE needs to be able to
instantiate a visual component. A non-static inner class can't be
instantiated.

cjob68@shaw.ca wrote:
> Thanks , I tried that but it didn't seem to fix it. I think I may know
> what the problem is. I have modified the section where the visual editor
> creates the jTable and the visual editor doesn't like this.
> Visual Editor likes this:
> String[] columnNames = {"Column1", "Column2"};
> Vector<String> columnNamesV = new
> Vector<String>(Arrays.asList(columnNames));
> jTable = new JTable(getRowData(),columnNamesV);
>
>
> My modified code which it doesn't like:
> String[] columnNames = {"Column1", "Column2"};
> Vector<String> columnNamesV = new
> Vector<String>(Arrays.asList(columnNames));
> jTable = new JTable(getRowData(),columnNamesV){
> ...custom table code here including creating a rendered to modify the
> color of the rows
> };
>
> Any ideas ?

--
Thanks,
Rich Kulp
Re: Error Log filling up [message #486452 is a reply to message #486441] Thu, 17 September 2009 16:57 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 16
Registered: July 2009
Junior Member
I'm also getting errors in another class that doesn't have any tables and for the most part it's got the same code that VE inserted.

The error is :

java.lang.NullPointerException
at org.eclipse.ve.internal.java.codegen.util.CodeGenUtil.create Instance(CodeGenUtil.java:103)
at org.eclipse.ve.internal.java.codegen.util.CodeGenUtil.create Instance(CodeGenUtil.java:116)
at org.eclipse.ve.internal.java.codegen.model.BeanPart.createEO bject(BeanPart.java:809)



Is this something I should be worried about ? Could my install of VE be corrupted ?

Any suggestions ?
Re: Error Log filling up [message #486481 is a reply to message #486452] Thu, 17 September 2009 19:24 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 16
Registered: July 2009
Junior Member
I think I may have found the issue. I removed GUI components one by one from the frame to see when I could add a space in the source and watch the GUI sync and generate an error. When I removed the jTextArea I no longer get the error when the GUI syncs. I'm not sure why this is happening but at least I am getting somewhere.
Re: Error Log filling up [message #486482 is a reply to message #486481] Thu, 17 September 2009 19:28 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 16
Registered: July 2009
Junior Member
I found the line that is causing the problem.

jTextArea.getDocument().addDocumentListener(new MyDocumentListener());

I'm not sure why VE doesn't like this line. The code compiles fine and it also runs fine but when syncing the GUI it generates an error in the Error Log.
Re: Error Log filling up [message #486495 is a reply to message #486482] Thu, 17 September 2009 20:50 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

I'm not sure why either but there is a workaround you can use to have VE
ignore the line. It's kind of kludgy. We never got to put in an
annotation that would tell VE to ignore something when I was working on
VE. :-(

if(false)
;
else
jTextArea.getDocument().addDocumentListener(new MyDocumentListener());

This will work because VE is designed to ignore the else block of an if
statement.

cjob68@shaw.ca wrote:
> I found the line that is causing the problem.
> jTextArea.getDocument().addDocumentListener(new MyDocumentListener());
>
> I'm not sure why VE doesn't like this line. The code compiles fine and
> it also runs fine but when syncing the GUI it generates an error in the
> Error Log.

--
Thanks,
Rich Kulp
Re: Error Log filling up [message #486498 is a reply to message #486495] Thu, 17 September 2009 20:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Rich Kulp wrote:
> We never got to put in an
> annotation that would tell VE to ignore something when I was working on
> VE. :-(

A little bit of grammar problem there. It is not that we never put in
code to have something ignored only when I was working on VE! And so by
corollary when I'm not working on the VE it wouldn't ignore something. :-)



--
Thanks,
Rich Kulp
Re: Error Log filling up [message #486633 is a reply to message #486495] Fri, 18 September 2009 13:35 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 16
Registered: July 2009
Junior Member
Are there any issues with just leaving my code as is and let VE generate those errors ?

My concern with adding the code as described is it will make the code harder to read and also what happens if in a future release the issue is fixed ?
Re: Error Log filling up [message #486641 is a reply to message #486633] Fri, 18 September 2009 13:40 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

If the VE is working otherwise, I guess it is ok.

cjob68@shaw.ca wrote:
> Are there any issues with just leaving my code as is and let VE generate
> those errors ?
> My concern with adding the code as described is it will make the code
> harder to read and also what happens if in a future release the issue is
> fixed ?

--
Thanks,
Rich Kulp
Re: Error Log filling up [message #617423 is a reply to message #486245] Wed, 16 September 2009 21:20 Go to previous message
No real name is currently offline No real nameFriend
Messages: 16
Registered: July 2009
Junior Member
I thought that might be the issue because Eclipse opened with an error today so I did run a -clean on it when I opened it again but that didn't fix this error. I'm not sure what the issue could be.
Re: Error Log filling up [message #617425 is a reply to message #486247] Thu, 17 September 2009 13:17 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Hi,
Not -clean. That clears only the plugin configurations. It doesn't clear
cached metadata. You need to use the procedure I outlined to clear the
cached metadata.

Actually -clean should rarely be needed except if you are just putting
plugins directly into the eclipse configuration without using the
install manager or the dropins folder.

cjob68@shaw.ca wrote:
> I thought that might be the issue because Eclipse opened with an error
> today so I did run a -clean on it when I opened it again but that didn't
> fix this error. I'm not sure what the issue could be.

--
Thanks,
Rich Kulp
Re: Error Log filling up [message #617426 is a reply to message #486371] Thu, 17 September 2009 15:44 Go to previous message
No real name is currently offline No real nameFriend
Messages: 16
Registered: July 2009
Junior Member
Thanks , I tried that but it didn't seem to fix it. I think I may know what the problem is. I have modified the section where the visual editor creates the jTable and the visual editor doesn't like this.

Visual Editor likes this:
String[] columnNames = {"Column1", "Column2"};
Vector<String> columnNamesV = new Vector<String>(Arrays.asList(columnNames));
jTable = new JTable(getRowData(),columnNamesV);


My modified code which it doesn't like:
String[] columnNames = {"Column1", "Column2"};
Vector<String> columnNamesV = new Vector<String>(Arrays.asList(columnNames));
jTable = new JTable(getRowData(),columnNamesV){
...custom table code here including creating a rendered to modify the color of the rows
};

Any ideas ?
Re: Error Log filling up [message #617427 is a reply to message #486432] Thu, 17 September 2009 15:58 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Yeah, I could see that being a problem. The VE needs to be able to
instantiate a visual component. A non-static inner class can't be
instantiated.

cjob68@shaw.ca wrote:
> Thanks , I tried that but it didn't seem to fix it. I think I may know
> what the problem is. I have modified the section where the visual editor
> creates the jTable and the visual editor doesn't like this.
> Visual Editor likes this:
> String[] columnNames = {"Column1", "Column2"};
> Vector<String> columnNamesV = new
> Vector<String>(Arrays.asList(columnNames));
> jTable = new JTable(getRowData(),columnNamesV);
>
>
> My modified code which it doesn't like:
> String[] columnNames = {"Column1", "Column2"};
> Vector<String> columnNamesV = new
> Vector<String>(Arrays.asList(columnNames));
> jTable = new JTable(getRowData(),columnNamesV){
> ...custom table code here including creating a rendered to modify the
> color of the rows
> };
>
> Any ideas ?

--
Thanks,
Rich Kulp
Re: Error Log filling up [message #617428 is a reply to message #486441] Thu, 17 September 2009 16:57 Go to previous message
No real name is currently offline No real nameFriend
Messages: 16
Registered: July 2009
Junior Member
I'm also getting errors in another class that doesn't have any tables and for the most part it's got the same code that VE inserted.

The error is :

java.lang.NullPointerException
at org.eclipse.ve.internal.java.codegen.util.CodeGenUtil.create Instance(CodeGenUtil.java:103)
at org.eclipse.ve.internal.java.codegen.util.CodeGenUtil.create Instance(CodeGenUtil.java:116)
at org.eclipse.ve.internal.java.codegen.model.BeanPart.createEO bject(BeanPart.java:809)



Is this something I should be worried about ? Could my install of VE be corrupted ?

Any suggestions ?
Re: Error Log filling up [message #617429 is a reply to message #486452] Thu, 17 September 2009 19:24 Go to previous message
No real name is currently offline No real nameFriend
Messages: 16
Registered: July 2009
Junior Member
I think I may have found the issue. I removed GUI components one by one from the frame to see when I could add a space in the source and watch the GUI sync and generate an error. When I removed the jTextArea I no longer get the error when the GUI syncs. I'm not sure why this is happening but at least I am getting somewhere.
Re: Error Log filling up [message #617431 is a reply to message #486482] Thu, 17 September 2009 20:50 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

I'm not sure why either but there is a workaround you can use to have VE
ignore the line. It's kind of kludgy. We never got to put in an
annotation that would tell VE to ignore something when I was working on
VE. :-(

if(false)
;
else
jTextArea.getDocument().addDocumentListener(new MyDocumentListener());

This will work because VE is designed to ignore the else block of an if
statement.

cjob68@shaw.ca wrote:
> I found the line that is causing the problem.
> jTextArea.getDocument().addDocumentListener(new MyDocumentListener());
>
> I'm not sure why VE doesn't like this line. The code compiles fine and
> it also runs fine but when syncing the GUI it generates an error in the
> Error Log.

--
Thanks,
Rich Kulp
Re: Error Log filling up [message #617432 is a reply to message #486495] Thu, 17 September 2009 20:58 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Rich Kulp wrote:
> We never got to put in an
> annotation that would tell VE to ignore something when I was working on
> VE. :-(

A little bit of grammar problem there. It is not that we never put in
code to have something ignored only when I was working on VE! And so by
corollary when I'm not working on the VE it wouldn't ignore something. :-)



--
Thanks,
Rich Kulp
Re: Error Log filling up [message #617433 is a reply to message #486495] Fri, 18 September 2009 13:35 Go to previous message
No real name is currently offline No real nameFriend
Messages: 16
Registered: July 2009
Junior Member
Are there any issues with just leaving my code as is and let VE generate those errors ?

My concern with adding the code as described is it will make the code harder to read and also what happens if in a future release the issue is fixed ?
Re: Error Log filling up [message #617434 is a reply to message #617433] Fri, 18 September 2009 13:40 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

If the VE is working otherwise, I guess it is ok.

cjob68@shaw.ca wrote:
> Are there any issues with just leaving my code as is and let VE generate
> those errors ?
> My concern with adding the code as described is it will make the code
> harder to read and also what happens if in a future release the issue is
> fixed ?

--
Thanks,
Rich Kulp
Previous Topic:Re: Error Log filling up
Next Topic:possible VE involvement?
Goto Forum:
  


Current Time: Tue Mar 19 03:43:25 GMT 2024

Powered by FUDForum. Page generated in 0.02910 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top