on 02-10-2006 12:05 AM
Hi,
I am trying to play around with repository services.
I created a repository service and then added it to a repository manager.
Now when I try to restart the EP server, it reaches max mem level, shows CPU usage as 100%, does not come up.
Could it be due to the repository service that I have written, I am thinking by mistake i might have an infinite loop in it.
Here is a section of code for repository service -
protected void startUpImpl(Collection repositoryManagers)
throws ConfigurationException, StartupException {
/*
try {
}
catch (Exception e) {
throw new StartupException(e.getMessage(), e);
}
*/
this.repositoryManagers = repositoryManagers;
Iterator it = repositoryManagers.iterator();
while (it.hasNext())
{
try {
if (it.toString().equals("/demo"))
addRepositoryAssignment((IRepositoryManager) it.next());
} catch (ServiceNotAvailableException e)
{
e.printStackTrace();
}
}
}
Can anyone please help me with it.
Any hints will be helpfull.
Thanks,
Vivek
Hi Vivek,
please use the CODE marker of the SDN editor to mark code and make it much more readable - see below.
while (it.hasNext()) {
try {
if (it.toString().equals("/demo"))
addRepositoryAssignment((IRepositoryManager) it.next());
} catch (ServiceNotAvailableException e) {
e.printStackTrace();
}
}
The problem is that the condition is never fulfilled (<i>it</i> is the iterator, not an entry of that) and with that, the loop is infinite (<i>it</i> always <i>hasNext</i> for <i>next()</i> gets never called).
Just delete the <i>if</i> statement, it makes no sense (you can assign the repository service only to the <i>/demo</i> repository by configuration).
Hope it helps
Detlev
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Detlev,
Thanks for the help.
The problem is that after assigning the service to the repository manager, I tried to restart the server.
The EP server is not coming up now, it says that the CPU usage is 100%.
I cannot deploy the changed code of the repository service without the server being up.
Can you please let me know how can I move forward.
Many thanks,
Vivek
Not sure with your version of the portal, but I believe that you can copy your par file directly to the portal's PCD.
Do a search for your par filename with the extension ".bak" on the portal server and copy your new par to the same location and remove ".bak" version.
When you next start the portal, it will should load the new version.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.