tangara goh

Ranch Hand
+ Follow
since Dec 27, 2009
I am a beginner in Java and hope to pick up the trade secrets so that I can move on to Android development
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by tangara goh

Hi experts,

I deleted .p2 folder which belongs to Eclipse.

Now, I wanted it back as I received an error message :

java.lang.IllegalStateException: Registry Directory not available: c:\Program Files (x86)\Eclipse JEE IDE\eclipse\p2\org.eclipse.equinox.p2.engine\profileRegistry.
at org.eclipse.oomph.p2.internal.core.LazyProfileRegistry.getProfileMap(LazyProfileRegistry.java:193)
at org.eclipse.oomph.p2.internal.core.LazyProfileRegistry.getProfileMap(LazyProfileRegistry.java:184)
at org.eclipse.oomph.p2.internal.core.LazyProfileRegistry.containsProfile(LazyProfileRegistry.java:165)
at org.eclipse.equinox.internal.p2.engine.ProfilePreferences.containsProfile(ProfilePreferences.java:110)
at org.eclipse.equinox.internal.p2.engine.ProfilePreferences.load(ProfilePreferences.java:253)
at org.eclipse.core.internal.preferences.EclipsePreferences.create(EclipsePreferences.java:370)
at org.eclipse.core.internal.preferences.EclipsePreferences.internalNode(EclipsePreferences.java:623)
at org.eclipse.core.internal.preferences.EclipsePreferences.node(EclipsePreferences.java:766)
at org.eclipse.core.internal.preferences.EclipsePreferences.internalNode(EclipsePreferences.java:629)
at org.eclipse.core.internal.preferences.EclipsePreferences.node(EclipsePreferences.java:766)
at org.eclipse.core.internal.preferences.EclipsePreferences.internalNode(EclipsePreferences.java:629)
at org.eclipse.core.internal.preferences.EclipsePreferences.node(EclipsePreferences.java:766)
at org.eclipse.core.internal.preferences.EclipsePreferences.internalNode(EclipsePreferences.java:629)
at org.eclipse.core.internal.preferences.EclipsePreferences.node(EclipsePreferences.java:766)
at org.eclipse.core.internal.preferences.RootPreferences.getNode(RootPreferences.java:105)
at org.eclipse.core.internal.preferences.RootPreferences.node(RootPreferences.java:84)
at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.getSharedPreferences(AbstractRepositoryManager.java:518)
at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.restoreRepositories(AbstractRepositoryManager.java:1016)
at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.getKnownRepositories(AbstractRepositoryManager.java:480)
at org.eclipse.oomph.p2.internal.core.CachingRepositoryManager$Artifact.getKnownRepositories(CachingRepositoryManager.java:581)
at org.eclipse.oomph.p2.core.P2Util.getKnownRepositories(P2Util.java:79)
at org.eclipse.oomph.setup.p2.impl.P2TaskImpl.isNeeded(P2TaskImpl.java:598)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.initNeededSetupTasks(SetupTaskPerformer.java:1657)
at org.eclipse.oomph.setup.ui.SetupUIPlugin.performStartup(SetupUIPlugin.java:604)
at org.eclipse.oomph.setup.ui.SetupUIPlugin.access$4(SetupUIPlugin.java:344)
at org.eclipse.oomph.setup.ui.SetupUIPlugin$1$1.run(SetupUIPlugin.java:241)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

Can someone tells me how to have this .p2 folder back ?

I thought when I install a new copy of Eclipse Oxygen, .p2 folder will be re-created ?

Hope someone out there can tell me how.


BTW, I am running of Windows 10
3 days ago
Hi experts,

After failing to use the normal debugging method to debug my web project which consists of jsp and servlet etc, I have decided to try remote debugging.

The thing is that I am not familiar with remote debugging.

I have tomcat v 9.0.4 x64 version for Windows 10 'embedded' inside Eclipse.

After doing some research on the internet, I realised I have to add in this line as per https://stackoverflow.com/questions/3835612/remote-debugging-tomcat-with-eclipse

ATALINA_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"

However, when I open up my catalina.bat it has very strange 'language' such that I am not sure how to go about adding the said line.

Here's how my catalina.bat looks like :

I hope someone can tell me what should I do now in order to add in the line and anything I should be aware of in order to make my debugger works...

It's been 2 months already...I think will it take me forever or the things are forcing me to give up ...
1 week ago
Hi expert,

After a long and arduous search about why debugging is not working out in Eclipse, it has to do with Tomcat server.

And now I am advised to use remote dubugging.

After, I can't understand why I need to use remote deugging since mine is just a personal project in a local machine and 'remote' has the connotation that I am working at a machine in a WAN setting something like that.

I hope someone can point me to some resources why there is a need to do remote debugging cos I searched the internet but just can't find any useful explanations.

Kindly correct me if I am veered from the right track in this debugging stuff. Tks again.

3 weeks ago
Hi experts,

I got a build path nesting error after confirming I have all the Log4j in the build path and all the dependencies jar files in place etc.

Then, I saw someone has a similar problem in stackoverflow here :


You have to separate your sources and your target directory where the build output goes.
It's also important to note that no class files ever can end up in the source directory.
This is not against your professor's advice - actually he's promoting the maven standard source structure going for ./src/main/java and ./src/main/webapp.
The second one should hold eg. the mandatory WEB-INF/web.xml file but you will never put actual classes there.

What you need to change is your target directory. I suggest going with the same standards and choosing the name "./target" for this.
All the built files will go in here and packaging that up will result a correct deployable artifact. Should you migrate to using maven later,
it'll also help doing this in a scripted, repeatable way.

Hope that clears up your issue.

The problem is that I don't understand the explanation.

I have attached a picture of my build path.

Hope someone can help me understand how to resolve the problem.

1 month ago

Jeanne Boyarsky wrote:This might be overkill, but you can create a new workspace. That will have the debug perspective back.

Hi Jeanne,

I did as you said but I am still getting the old problem - once I click on register.jsp page to start the debug, all the debug buttons will just disappear

And when I pressed submit the form, the debug perspective will not take over...(as in there is no prompt if I want debug perspective to take over like in the past)

Do you think there is a corruption somewhere ?
1 month ago
Hi expert,

In the past, I used to be able get a prompt from Eclipse to ask me if I want to open up in debug perspective.  Not anymore now.

I have tried various ways to make Eclipse open up in debug perspective when I run debug in server but failed.

Basically, I saved the perspective in a named perspective after customised the perspective as per the picture.

After that, I named the perspective and set this as the default perspective.

But, the toolbar still don't show the debugging buttons like step in, step over etc.

Hope someone can help me out on this cos I have been stuck at this problem for so long I can't get my project going...

Think I may have to switch to Netbean Ide alreay....

1 month ago
Hi all,

I managed to find the solution.

Go to the Data folder of MySQL where there is a named folder of your Database schema.

Delete the table.ibd file and then create the table again.

No more error again.

The solution can be found also at


Thanks to all for the various replies.  I appreciate all the learning provided.  Tks again.

Jeanne Boyarsky wrote:Tangara,
Try to look if the table is in a schema. If it was created under one user/schema and you are trying to access it using another, you'd need to write schema.test_table.

Hi Jeanne,

I am not sure what you meant by if the table is in a schema.

I did create tablename  query and I got error code 1813 Tablespace '`hi5s`.`user`' exists.

Kindly advise.


Pete Letkeman wrote:Have you looked into running any of the MySQL tools to repair tables and databases such as this tool
From the command prompt you could run:
mysqlcheck --all-databases --auto-repair
You will fine mysqlcheck in the MySQL\bin directory.

There is also a chance that you are have not used the use database command.
Assuming that the name of the database is test and that the name of the table is named test_table what are the results when you try this?
USE test;
SELECT * FROM test_table;

Alternatively you could run this command:
SELECT * FROM test.test_table;

Hi Pete,

I did as you said but still I am getting the same error

I am very sure I used the right Mysql command including use the schema name before the select statement.

It did not help.

Hi expert,

I have a table which I have created.

When I run a query to show all the tables in my database.

It shows the table name.

when I run a select * from tablename, it gives me error 1146.

But, when I tried to insert some dummy data, it said it does not exists.

So, I tried to drop the table.  But, it doesn't work either cos it gives me error :1051 unknown table.

How do I overcome the problem to re-create the table again ?

Mysql 5.7 server on Windows 10 using workbench 6.3.


Campbell Ritchie wrote:A String is a String is a String. The only other type you can convert it to is Object. It may not necessarily be right to use Strings for everything. So your method claims to get a User object and instead returns a String. That won't work. I suggest you start by reminding yourself how users are stored, and how you can use an Id to link to a user. I think that will give you some inspiration.

Hi Campbell,

I am now trying to use HashMap to link the key value as in the string will refer to user object.

Not sure if this can help achieve what what I want.

However, I am not sure why I am getting this error message even though now the method has been changed to User(Type) + variable) ?

My method :

The error I am getting :

Please see attached.

1 month ago
Hi expert,

After refactoring my code to use Generic Type, I am now face with this problem of converting String value to Generic Type.

Here's the refactored code :

Hence, I'd like to know if there is a way to convert the userId to Generic Type cos I can't use User userId = request.getParameter("userId");


If I were to change back the refactored code to use String instead, I am stuck at the query portion.


Hope someone can tell me the way to resolve this problem.

Tks a Million
1 month ago

Jeanne Boyarsky wrote:Tangara,
Eclipse workspaces are designed to go forward and not backward.  If you want to do this, I think the best thing to do is create a new workspace in Kepler and import the project (vs trying to open the workspace itself in Kepler.)

However, I wouldn't recommend Kepler. It's an old IDE. The current Eclipse is Oxygen. Before that was Neon, Mars, Luna and Kepler respectively. This means Kepler is about 5 years old.

Hi Jeanne,

But, I am facing problem with Oxygen.

When I started Eclipse, it will show all the debugging stuff like step in, step out etc but when I touch any key or right click on my jsp page, all the debugging stuff will disappear.

Can you tell me what's going or is there any configuration that I have done to cause this to happen ?

I find that rather than wasting time to resolve this problem which has bugged me for more than 2 weeks I'd just use a new Eclipse and hopefully when I import in the files, it will not cause any problem.

1 month ago
Hi experts,

After failing to get the debugging working in Eclipse NEON, I thought I better switch to another Eclipse cos I just learnt that most people are using Kepler for JEE development.

To prevent further pitfalls or suck into blackholes, I thought I better check with the experts what I should I do to import my old project into this Eclipse Kepler.

What happened was that there was a message that said "This workspace was written with different version of the product and needs to be updated. 
Updating the workspace may make it incompatible with other versions of the product"

So, for this case, can I just go ahead and say OK to the prompt ?

I am just worried that it would import all the old configurations blah blah blah and I will face the same debugging issue..

Hope to have some opinions on the above.

1 month ago

Ankur R Jain wrote:Please delete the .metadata folder in your workspace after closing eclipse, and then try again.

Note: It is going to reset your workspace specific settings.


I did as you said but when I open my Eclipse again, my Project is GONE ....

You have to tell me how to find back my project
1 month ago