radder5
radder5

Reputation: 236

WSO2 Developer Studio 3.6 creating car file fail

On a completely fresh install of Developer Studio 3.6 (not the plugin) I have created a very simple ESB config project and tried to create a car from the pom editor (using the button in the top right hand corner (as per doc). I get a failure message in the UI "an error occurred while creating the carbon archive file. For more details view the log". The log just shows "java.io.FileNotFoundException: C:\wso2workspace\AthenaHRInterfaceApplication\target\AthenaHRInterfaceApplication_0.1.car (The system cannot find the file specified)". If I view the target directory as I do this, one can see the file created halfway through the process (i.e. when selecting which directory to save .car file to), but then on completion (ie. OK button), the error is displayed and the file size of .car file goes to 0kb This is really frustrating and doesn't seem to make any sense. I did get this to work (not with this project) before, but this one just doesn't want to play ball. I can get the car file to be generated external to Dev Studio through maven, but then it isn't deployable from within Studio and appears to be affected by the above error in any case. Any suggestions to where I may be going wrong?

This is the stacktrace in my log file...

!ENTRY org.wso2.developerstudio.eclipse.distribution.project 4 0 2014-05-14 08:55:30.677 !MESSAGE An error occured while creating the carbon archive file !STACK 0 java.io.FileNotFoundException: C:\wso2workspace\AthenaHRInterfaceApplication\AthenaHRInterfaceCAP\target\AthenaHRInterfaceCAP_0.1.car (The system cannot find the file specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.(FileInputStream.java:146) at org.wso2.developerstudio.eclipse.utils.file.FileUtils.copy(FileUtils.java:227) at org.wso2.developerstudio.eclipse.distribution.project.editor.DistProjectEditorPage.exportCar(DistProjectEditorPage.java:791) at org.wso2.developerstudio.eclipse.distribution.project.editor.DistProjectEditorPage$8.run(DistProjectEditorPage.java:755) at org.eclipse.jface.action.Action.runWithEvent(Action.java:499) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501) at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:452) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:140) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:611) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591) at org.eclipse.equinox.launcher.Main.run(Main.java:1450) at org.eclipse.equinox.launcher.Main.main(Main.java:1426)

is this a bug - it looks like it. Happens with a fresh install of DS and new project.

Not that anyone appears to be following this other than the on comments on java version, but for the sake of completeness, I will keep adding to this thread. It appears that the error was being caused by me selecting the location of the 'target' directory, I suspect that behind the scenes DS is using the same location (as in maven) which is trying to write to the same directory with the same file name which is causing the file not found exception. Saving to a different directory appears to at least get past this error. However, the new issue I have is that Registry Resources aren't being included in the resultant .car file using the button at the top right hand corner of the Composite Application POM editor. If I mvn install (from either command line or from Run(ing) the pom within DS, the correct .car file is generated. I think I should create another thread with this specific issue and answer this one myself. Views?

Upvotes: 0

Views: 1689

Answers (1)

Mohammed Khammeri
Mohammed Khammeri

Reputation: 11

Actually after a long night, I solved a related issue. I added then removed a data mapper mediator. Then I got this error : an error occurred while creating the carbon archive file for more details view the log

I navigated to ressource directory, reordered every directory by 'Creation date' (not 'Modified at') checked every line of every file (.temp,XMLs,metadata...) that may cause a confusion,removed them and left the old created ones. Restarted the Integration Studio and all worked out. Point is : The JAVA-based WSO2 creates artifact refrences and links them through different files.

  • Use a text editor to open the parent directory in order to make so much easier to search for unused/removed refs. Delete them.
  • Do not forget or leave any file without verification !
  • Enjoy rolling back, it'll be worth it when everything goes back to normal.

Upvotes: 0

Related Questions