IBM Worklight - Build failed - ibm-mobilefirst

My environments are failing to build after restart, cleaning, exiting the eclipse, deleting native folders, also I am looking for a reason and perfect fix of this below error as any developer wont be deleting every time when this issue arises, please help
error log
windowsphone build failed: com.worklight.builder.exception.WorklightBuildRuntimeException: Resource Manager - Error while reading XML file: /Users/Desktop/16th July/30thJuly-Map/test_Login/apps/test/windowsphone/native/Properties/WMAppManifest.xml (No such file or directory) Nested exception: /Users/test/Desktop/16th July/30thJuly-Map/test_Login/apps/test/windowsphone/native/Properties/WMAppManifest.xml (No such file or directory)
[2013-07-30 17:39:20] FWLST1040E: ipad build failed: com.worklight.builder.exception.WorklightBuildRuntimeException: Resource Manager - Problem reading info.plist file /Users/test/Desktop/16th July/30thJuly-Map/test_Login/apps/test/ipad/native/testLogintestIpad-Info.plist (No such file or directory) Nested exception: /Users/test/Desktop/16th July/30thJuly-Map/test_Login/apps/test/ipad/native/testLogintestIpad-Info.plist (No such file or directory)
[2013-07-30 17:39:21] FWLST1040E: iphone build failed: com.worklight.builder.exception.WorklightBuildRuntimeException: Resource Manager - Problem reading info.plist file /Users/test/Desktop/16th July/30thJuly-Map/test_Login/apps/test/iphone/native/testLogintestIphone-Info.plist (No such file or directory) Nested exception: /Users/test/Desktop/16th July/30thJuly-Map/test_Login/apps/test/iphone/native/testLogintestIphone-Info.plist (No such file or directory)
[2013-07-30 17:39:21] FWLST1040E: windows8 build failed: com.worklight.builder.exception.WorklightBuildRuntimeException: Resource Manager - Error while reading XML file: /Users/test/Desktop/16th July/30thJuly-Map/test_Login/apps/test/windows8/native/package.appxmanifest (No such file or directory) Nested exception: /Users/test/Desktop/16th July/30thJuly-Map/test_Login/apps/test/windows8/native/package.appxmanifest (No such file or directory)
[2013-07-30 17:39:23] FWLST1040E: android build failed: com.worklight.builder.exception.WorklightBuildRuntimeException: Resource Manager - Error while reading XML file: /Users/test/Desktop/16th July/30thJuly-Map/test_Login/apps/test/android/native/AndroidManifest.xml (No such file or directory) Nested exception: /Users/test/Desktop/16th July/30thJuly-Map/test_Login/apps/test/android/native/AndroidManifest.xml (No such file or directory)
[2013-07-30 17:39:24] A core eclipse exception has occurred: Failed to read project description file from location '/Users/test/Desktop/16th July/30thJuly-Map/test_Login/apps/test/android/native/.project'.
Thanks
djrecker

I got the same error in my eclipse after changing the project name by using Refactor->Rename
The below fix is for iPhone environment. You can try the same for other environment also.
The error says it cant find the info.plist file.Try to move to that location in your computer and see wether the file is there or not.
in your case ESILoginESIIphone-Info.plist
if you cant find the file. just see the ***-Info.plist in the same path and note down the ****
worklight will always append your porject name twice in info.plist file ( dont know why). For example if you have project name as ESI then your plist file name would be ESIESI-Info.plist.
i guess in your project file you have changed the name to ESILogin
Try to rename the project with **** which you found in above step.
Thats all.
Happy Building.

Please look in the Error Log view in Eclipse; there should be an exception trace there which could help us in identifying the root cause.
Can you reproduce this? Does it happen only when you create a new project and add all Mobile environments at once, or even when you add only one Mobile environment?
What is your Worklight version?

Delete the bin folder contents in your project and restart the server.
Deploy all the adapters and application again

Related

The error path in FileNotFoundException is not same as the path in my project directory

Here is the error I got when I run the project with "mvn clean install"
Caused by: java.io.FileNotFoundException: /Users/IdeaProjects/rules-management12/grpc/grpc/src/main/resources/my-sample.yml (No such file or directory)
This is my project structure, as you can see the path is below, why there's two grpc dir?
rules-management12/grpc/src/main/resources/my-sample.yml,
Edit:
This is my-sample.yml, set some default value.
migration:
sourceId: xxxx
targetId: xxxxx
In application.yml file, I set this my-sample to ticketName.
ticketName: my-sample
and using #Value in my code.
#Value("${ticketName}")

ActiveJDBC (JavaLite) : Using "activejdbc.properties" does not work for test directory

I recently updated to ActiveJDBC 2.1 in order to use activejdbc.properties for the purpose of externalizing out the database property so we didn't have to check in the database username/password into SVN.
Putting the "activejdbc.property" file in src/main/resources for the main code works perfect. Now the goal is to replace the "database.property" file in the test directory src/test/resources with an "activejdbc.property" so it can point to the same database config file out on the file system.
After making this change in the test directory, we receive an error when performing the gradle build (gradle clean build). This is the exception we see:
`"org.javalite.activejdbc.InitException: java.io.FileNotFoundException: \database.properties (The system cannot find the file specified)"
Any ideas why this works for main directory but not for the tests?
Stacktrace:
es/main/com/brookdale/model/UnitOfMeasure.class
**************************** END INSTRUMENTATION ****************************
...
:assemble
:compileTestJava
:processTestResources
:testClasses
:test
com.brookdale.model.ActualChargeTest > unitQuantityMustBeGreaterThanZero FAILED
org.javalite.activejdbc.InitException: java.io.FileNotFoundException: \database.properties (The system cannot find the file specified)
Caused by:
java.io.FileNotFoundException: \database.properties (The system cannot find the file specified)
... more tests ...
com.brookdale.service.RelationshipServiceTest > updateContactRel_GivenValidInfo_
RecordIsInserted FAILED
org.javalite.activejdbc.InitException: java.io.FileNotFoundException: \datab
ase.properties (The system cannot find the file specified)
Caused by:
java.io.FileNotFoundException: \database.properties (The system cannot f
ind the file specified)
49 tests completed, 25 failed, 7 skipped
:test FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':test'.
BUILD FAILED`
It seems you did not name the file correctly: the name of the file is not activejdbc.property, it is activejdbc.properties.
Additionally, Java class loaders do not guarantee which file they will load first if it finds multiples on the classpath. If you want different JDBC properties in your test environment, please follow docs here: http://javalite.io/database_connection_management#multiple-environments-property-file-method
Here is a sample project with this implementation: https://github.com/javalite/simple-example/

Can not deploy adapters due to missing files

I am trying to deploy worklight adapters in a MobileFirst 6.3 project and I am getting errors in the console: It is throwing
Adapter deployment failed: HTTP 500 - Internal Server Error
When I try to build the project it is building and the server is starting. But when I try to deploy the adapter it is throwing an Error with the following stacktrace:
[ERROR ] /Users/915655/Documents/Projects/R2O/New%20Workspace/MobileFirstServerConfig/servers/worklight/workarea/org.eclipse.osgi/bundles/73/data/cache/com.ibm.ws.app.manager_93/.cache/WEB-INF/lib/ibm_web20_wink_no_abdera_no_jackson-1.1.0.0-20110422.jar (No such file or directory)
/Users/915655/Documents/Projects/R2O/New%20Workspace/MobileFirstServerConfig/servers/worklight/workarea/org.eclipse.osgi/bundles/73/data/cache/com.ibm.ws.app.manager_93/.cache/WEB-INF/lib/ibm_web20_wink_no_abdera_no_jackson-1.1.0.0-20110422.jar (No such file or directory)
[ERROR ] /Users/915655/Documents/Projects/R2O/New%20Workspace/MobileFirstServerConfig/servers/worklight/workarea/org.eclipse.osgi/bundles/73/data/cache/com.ibm.ws.app.manager_93/.cache/WEB-INF/lib/ibm_web20_wink_no_abdera_no_jackson-1.1.0.0-20110422.jar (No such file or directory)
/Users/915655/Documents/Projects/R2O/New%20Workspace/MobileFirstServerConfig/servers/worklight/workarea/org.eclipse.osgi/bundles/73/data/cache/com.ibm.ws.app.manager_93/.cache/WEB-INF/lib/ibm_web20_wink_no_abdera_no_jackson-1.1.0.0-20110422.jar (No such file or directory)
[ERROR ] Uncaught.init.exception.thrown.by.servlet
ManagementServlet
WorklightServices
java.lang.NoClassDefFoundError: Could not initialize class org.apache.wink.common.internal.i18n.Messages
at org.apache.wink.server.internal.DeploymentConfiguration.initAlternateShortcutMap(DeploymentConfiguration.java:386)
at org.apache.wink.server.internal.DeploymentConfiguration.init(DeploymentConfiguration.java:167)
at org.apache.wink.server.internal.servlet.RestServlet.getDeploymentConfiguration(RestServlet.java:202)
at org.apache.wink.server.internal.servlet.RestServlet.createRequestProcessor(RestServlet.java:138)
at org.apache.wink.server.internal.servlet.RestServlet.init(RestServlet.java:103)
at javax.servlet.GenericServlet.init(GenericServlet.java:161)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:325)
at [internal classes]
at com.ibm.worklight.admin.common.filter.HSTSFilter.doFilter(HSTSFilter.java:110)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:194)
at [internal classes]
The problem is that it cannot find a file:
ibm_web20_wink_no_abdera_no_jackson-1.1.0.0-20110422.jar (No such file
or directory)
Make sure you're using a Supported version of Eclipse, which must be Eclipse Java EE Kepler or Luna.
Verify that the problem is not the spaces that you have in the workspace name ("new workspace").
Try with a new Eclipse installation

why i am getting these errors in cloud programming?

java.io.FileNotFoundException: simulation.properties (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at org.cloudbus.cloudsim.ex.mapreduce.Configuration.loadPropertiesFromFile(Configuration.java:35)
In Configuration.java file you must have a code to retrieve Properties From a File. There can be two problems
Either configuration file is missing
If you have configured a path any where in the project that path is invalid after you deploy from local host to cloud

When running servlet in tomcat 7 throws FileNotFoundException (permission denied)

When running the servlet application, certain files are written to the application folder, during that time the server throws
Caused by: java.io.FileNotFoundException: config.dbf.0 (Permission denied)
at java.io.RandomAccessFile.open(Native Method)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:216)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:101)
at jdbm.recman.RecordFile.getRaf(RecordFile.java:125)
at jdbm.recman.RecordFile.<init>(RecordFile.java:104)
i am trying to run it on mac os x, and also permission have been provided to write in the catalina.policy file. and also tried to give the system access permission for the file with 755,777 using chmod. Is it the problem related to the os or is it related to file permission scheme in the catalina.policy file?, i am not getting any security exception
whenever i try it on the windows platform its running fine, but when i run it on mac or unix based systems its throwing this exception, the problem is a small db called pcdb is created once the war file is deployed, so problems exisiting while creating the db files itself, these db files are small chunks of about 8 files