Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

justify description in word view

Mehdi Yousefi January 20, 2012

hi

i have a problem in word-view of an issue,I changed the align of description feild to "justify" in single-word.vm file,but my context messed,as short sentences were spread out, i found the reason in oscore-2.2.6-dev-9Nov05.jar file in TextUtils.class,I added right method in this class,compiled it again and subtitude with that class but i think its a wrong way because jira wasnt ran any more:(

i hope you guys can help me

thanks in advance

2 answers

1 accepted

0 votes
Answer accepted
Jeremy Largman
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 28, 2012

Can you post the change to TextUtils that you made, and what error you get in the atlassian-jira.log file when you try to restart?

Mehdi Yousefi January 29, 2012

hi Jeremy

i changed wrapParagraph method like this(i just dont use lastC):

public static final String wrapParagraph(String s)
{
s = noNull(s);
StringBuffer result = new StringBuffer();
result.append("<p>");
char lastC = '\0';
char thisC = '\0';
for(int i = 0; i < s.length(); i++)
{
thisC = s.charAt(i);
if(thisC == '\n')
{
result.append("</p>\n\n<p>");
} else
{
result.append(thisC);
}
}

also replace try/catch instead of these two line :

MalformedURLException e;

e;

Mehdi Yousefi January 29, 2012

error in log:

2012-01-30 16:00:44,901 Thread-2 ERROR [atlassian.jira.service.DefaultServiceManager] Could not configure services:

java.lang.NoClassDefFoundError: com/opensymphony/util/TextUtils

at com.atlassian.jira.service.services.file.AbstractMessageHandlingService.init(AbstractMessageHandlingService.java:35)

at com.atlassian.jira.service.services.mail.MailFetcherService.init(MailFetcherService.java:63)

at com.atlassian.jira.service.JiraServiceContainerImpl.init(JiraServiceContainerImpl.java:41)

at com.atlassian.jira.service.ServiceFactory.getService(ServiceFactory.java:22)

at com.atlassian.jira.service.OfBizServiceConfigStore.getServiceContaier(OfBizServiceConfigStore.java:162)

at com.atlassian.jira.service.OfBizServiceConfigStore.getServiceContainer(OfBizServiceConfigStore.java:144)

at com.atlassian.jira.service.OfBizServiceConfigStore.getAllServiceConfigs(OfBizServiceConfigStore.java:123)

at com.atlassian.jira.service.DefaultServiceManager.loadServices(DefaultServiceManager.java:143)

at com.atlassian.jira.service.DefaultServiceManager.getServices(DefaultServiceManager.java:27)

at com.atlassian.jira.upgrade.ConsistencyCheckImpl.destroy(ConsistencyCheckImpl.java:72)

at com.atlassian.jira.upgrade.ConsistencyLauncher.contextDestroyed(ConsistencyLauncher.java:46)

at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4174)

at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4778)

at org.apache.catalina.core.StandardContext.start(StandardContext.java:4675)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)

at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)

at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)

... more

Jeremy Largman
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 29, 2012

The NoClassDefFoundError means you're not compiling and deploying the fix correctly. How are you rebuilding the class? Are you following this doc?

Mehdi Yousefi January 31, 2012

i have changed the jar file and i had this error, i compiled my single class and use it,now it`s ok...i think i cant modificate the jar files?...anyway thanks

Mehdi Yousefi January 31, 2012

i had changed the jar file and i had this error, i compiled my single class and use it,now it`s ok...i think i cant modificate the class of jar files?...anyway thanks

Jeremy Largman
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 31, 2012

You can recompile a jar file using the command 'mvn package'. However in this case an indicidual class file is the way to go.

0 votes
mwarton
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 9, 2013

Hi Mehdi,

If you are just trying to format the Word view of the issue, try Intelligent Reports. It lets you define the formatting in Microsoft Word, so you don't need to change JIRA source code at all.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events