[jbosstools-issues] [JBoss JIRA] Commented: (JBIDE-4197) JBDS 2.0.0 GA will not deploy JBPM archive

Koen Aers (JIRA) jira-events at lists.jboss.org
Sun Aug 30 13:30:23 EDT 2009


    [ https://jira.jboss.org/jira/browse/JBIDE-4197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12483598#action_12483598 ] 

Koen Aers commented on JBIDE-4197:
----------------------------------

The observed problems are a result of the workspace name containing spaces. Replace the spaces by underscores and everything will work fine.

Also, the problem is not originating from any jBPM GPD code. It is a flaw in the 'list' function of the JDK AFAICS.

In the following code:

			URL url = loader.getResource(classOrResource);
			File file = new File(url.getFile());
			File folder = new File(file.getParent());
			String nestedClasses[] = folder.list(new FilenameFilter() {
				public boolean accept(File dir, String name) {
					return name.startsWith(className);
				}
			});
			for (int i = 0; i < nestedClasses.length; i++) {
				String fileName = classOrResource.substring(0, classOrResource.lastIndexOf("/") + 1) + nestedClasses[i];
				zos.putNextEntry(new ZipEntry("classes/" + fileName));
				is = loader.getResourceAsStream(fileName);
				while ((read = is.read(buff)) != -1) {
					zos.write(buff, 0, read);
				}
				is.close();
			}

the call folder.list(...) will return null if the folder pathname contains spaces and will return an empty array if it doesn't. I have fixed the problem by enclosing the for loop with a null check for the nestedClasses variable. A simple workaround though is to not use spaces anywhere in the names of workspaces and/or folders.


> JBDS 2.0.0 GA will not deploy JBPM archive
> ------------------------------------------
>
>                 Key: JBIDE-4197
>                 URL: https://jira.jboss.org/jira/browse/JBIDE-4197
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: jbpm
>    Affects Versions: 2.0.0.GA
>         Environment: Windows
>            Reporter: Matthew Brasier
>            Assignee: Koen Aers
>             Fix For: 3.1.0.M4
>
>         Attachments: Screenshot.png, workspace_JBDS_aug19.tar.gz
>
>
> JBDS 2.0.0GA, when attempting to deploy a JBPM project using the 'deployment' pane for processdefinition.xml, or when attempting to create an archive with the 'Save without deploying option', if any resources are selected in 'Java Classes and Resources', a NullPointerException is thrown, and deployment/archive creation fails
> This is 100% repeatable.
> If no resources are selected, then creating an archive works, but it won't run as it doesnt have the custom code in it.
> Matt

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list