Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 338918 - Null pointer exception when adding a dependencies
Summary: Null pointer exception when adding a dependencies
Status: CLOSED FIXED
Alias: None
Product: Tigerstripe
Classification: Technology
Component: Core (show other bugs)
Version: 0.5   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: 0.5M0   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-04 07:08 EST by Marc FLAUW CLA
Modified: 2011-06-08 12:03 EDT (History)
3 users (show)

See Also:


Attachments
Tigerstripe.log (308.83 KB, application/octet-stream)
2011-03-04 07:08 EST, Marc FLAUW CLA
no flags Details
Tigerstripe.log.1 (35.10 KB, application/octet-stream)
2011-03-04 07:09 EST, Marc FLAUW CLA
no flags Details
TIP_EIM_SSO_Dependencies as zip file (139.27 KB, application/x-zip-compressed)
2011-03-04 07:10 EST, Marc FLAUW CLA
no flags Details
TIP_EIM_SSO_Model as zip file (110.95 KB, application/x-zip-compressed)
2011-03-04 07:10 EST, Marc FLAUW CLA
no flags Details
TS-338918.patch.txt (3.21 KB, patch)
2011-06-06 04:31 EDT, Valentin Yerastov CLA
no flags Details | Diff
TS-338918.patch.txt (4.80 KB, text/plain)
2011-06-06 06:59 EDT, Valentin Yerastov CLA
no flags Details
TS-338918_Cycles_fix.patch.txt (6.14 KB, patch)
2011-06-07 00:21 EDT, Valentin Yerastov CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marc FLAUW CLA 2011-03-04 07:08:21 EST
Created attachment 190370 [details]
Tigerstripe.log

Hello, 

I am running Tigerstripe 0.5.0.20100520 on Galileo (TIP has not switched to Helios yet). 

I have 2 projects: TIP_EIM_SSO_Dependencies and TIP_EIM_SSO_Model

I have exported the Dependencies project as a module (org.tmforum.tip.sso.dep_04.jar) and copied this module to the Model project. 

When I try to add this jar file as a dependency in the tigerstripe.xml of the Model, the first time, there is no response. When trying again, I am getting a null pointer exception when trying to save the Tigerstripe file. 

Attaching the 2 projects and the logs

Best regards

Marc
Comment 1 Marc FLAUW CLA 2011-03-04 07:09:13 EST
Created attachment 190371 [details]
Tigerstripe.log.1
Comment 2 Marc FLAUW CLA 2011-03-04 07:10:10 EST
Created attachment 190372 [details]
TIP_EIM_SSO_Dependencies as zip file
Comment 3 Marc FLAUW CLA 2011-03-04 07:10:54 EST
Created attachment 190373 [details]
TIP_EIM_SSO_Model as zip file
Comment 4 Valentin Yerastov CLA 2011-05-23 08:56:20 EDT
Hi Marc,

The problem is that your several models, at least ResourceFacingService, has 'copy/paste' xml markup and special symbols from MS Word in the description: 

<P style="MARGIN: 0in 0in 0pt" class=TableText>....<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p>&nbsp;</o:p></P><SPAN style="FONT-FAMILY: 'Arial','sans-serif'; LETTER-SPACING: -0.25pt; FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language:

I'm trying to solve this problem... but now you can avoid it by making a plain text descriptions.
Comment 5 Navid Mehregani CLA 2011-05-24 11:21:52 EDT
Hi Valentin,

Tigerstripe doesn't support rich text format in the editor's description.  If this is the main cause of this defect, please close this defect as won't fix.  I don't think it's necessary to modify TS code for this.
Comment 6 Marc FLAUW CLA 2011-05-26 08:39:20 EDT
Valentin, Navid,

I don't mind changing imported data to remove bad data, but I would like to get a clear message to indicate me that there is a problem with rich text data. 
Today, just getting a null pointer exception gives me no clue what to look for.

Best regards

Marc
Comment 7 Navid Mehregani CLA 2011-05-26 10:01:36 EDT
Fair enough.  I agree the code shouldn't throw a null pointer exception.  

It should either support the use case or provide a clear message indicating the issue.
Comment 8 Valentin Yerastov CLA 2011-06-06 04:31:05 EDT
Created attachment 197375 [details]
TS-338918.patch.txt

Navid, Marc,

I've fixed this issue. Now you can use any text in the model description.
Comment 9 Valentin Yerastov CLA 2011-06-06 06:59:00 EDT
Created attachment 197384 [details]
TS-338918.patch.txt
Comment 10 Valentin Yerastov CLA 2011-06-06 07:02:35 EDT
Added a new version of the patch, please use it.
Comment 11 Yuri Strot CLA 2011-06-06 07:12:43 EDT
Valentin's patch applied.
Comment 12 Navid Mehregani CLA 2011-06-06 11:31:55 EDT
I'm still able to reproduce this issue.  Still get an NPE when I add the noted jar file to dependencies of project.
Comment 13 Valentin Yerastov CLA 2011-06-06 13:12:25 EDT
Navid,

Did you recreate dependency module again?
Comment 14 Navid Mehregani CLA 2011-06-06 13:18:19 EDT
No, I used what was attached.  Do I need to recreate it?
Comment 15 Valentin Yerastov CLA 2011-06-06 13:33:26 EDT
Yes, you need to export module again. In fact, I did not provide working with the modules assembled earlier. Should I do this?
Comment 16 Navid Mehregani CLA 2011-06-06 13:39:00 EDT
(In reply to comment #15)
> Yes, you need to export module again. In fact, I did not provide working with
> the modules assembled earlier. Should I do this?

No, there is no need to provide support for the old JAR module.  

I recreated the Tigerstripe module JAR file > Added it as a dependency > but when I save the file, Tigerstripe seems frozen and the workbench becomes unresponsive.
Comment 17 Valentin Yerastov CLA 2011-06-07 00:21:15 EDT
Created attachment 197474 [details]
TS-338918_Cycles_fix.patch.txt

Yes indeed, for the original data downloaded again TS hangs. I had no problems, because I changed the original project, but it is not related to a current bug. 

The problem is as follows: if the artifact has a circular reference to the artifact in another project and these projects are exported when you add dependence TS is hanging.

I've fixed it. If necessary, I can make a separate issue in bugzilla.
Comment 18 Navid Mehregani CLA 2011-06-07 10:40:00 EDT
(In reply to comment #17)
> Created attachment 197474 [details]
> TS-338918_Cycles_fix.patch.txt
> 
> Yes indeed, for the original data downloaded again TS hangs. I had no problems,
> because I changed the original project, but it is not related to a current bug. 
> 
> The problem is as follows: if the artifact has a circular reference to the
> artifact in another project and these projects are exported when you add
> dependence TS is hanging.
> 
> I've fixed it. If necessary, I can make a separate issue in bugzilla.

Thanks Valentin! It's not necessary to create a separate bugzilla.  I'll verify the fix as soon as Yuri reviews and applies the patch.
Comment 19 Yuri Strot CLA 2011-06-07 15:59:11 EDT
OK, I've applied Valentin's patch.
Comment 20 Navid Mehregani CLA 2011-06-08 12:03:59 EDT
Verified thanks!