I am trying to connect from a blackberry device to an XMPP server. I searched over the web and found the smack.jar file that has the XMPP classes ready for use. So I created a new project and added the smack.jar file to the imported jar files. Then in the project I added the following:
public void login(String userName, String password) throws XMPPException {
ConnectionConfiguration config = new ConnectionConfiguration(IP, PORT, "gmail.com");
connection = new XMPPConnection(config);
connection.connect();
connection.login(userName, password);
}
The build is successful. Now when running the simulator and starting the project, i am getting the following error:
Error starting test: Module 'smack-3.1.0' not found
So I removed the smack.jar file from the imported jar files and added it manually to the classes of the project by adding a new file and selecting the smack.jar. When building the project I am getting this error:
org.jivesoftware.smack.AccountManager: Error!: Missing stack map in: supportsAccountCreation at label: 9
How to resolve this? How to connect to an XMPP server? Maybe smack isn't the right way!!
Please I need some help here
It looks like smack is from the andtalk project. Quickly browsing the site, I don't see any claims of Java-ME support. BlackBerry devices do not run full Java SE code, they can only run Java ME code, so most libraries won't work. It looks like this is one of them that won't work.
Jxa is an XMPP client library that works in Blackberry: http://sourceforge.net/projects/jxa/
Related
I have deployed my ASP.NET MVC application using FTP publishing method, application was working fine until i republished it after making some changes, i used code first migration to update database locally and it was working fine. When i published it again i am getting the error saying:"Model backing a DB Context has changed; Consider Code First Migrations". When using web deploy publishing method there is no problem database is updated, problem is when using FTP or File System publishing.
I would like to know how can remote database be updated when using FTP or File System publishing method. My current host doesn't offer web deploy publishing, is either i use FTP or File system.
Can anyone assist?
If you are using the File System publishing method and happen to make changes to your Models, then you will have to re-publish your project and just replace it with the one existing on the Server.
I found solution, all i have to do was to add the following code in DbContext like:
public InvoiceContext()
: base("InvoiceContext")
{
System.Data.Entity.Database.SetInitializer(new
MigrateDatabaseToLatestVersion<InvoiceContext,
Identity2Example.Migrations.InvoiceContext.Configuration>());
}
I hope it will also help somebody.
I´ve a project in github and i did clone it to a different machine, but i´m geting this error: Umbraco cannot start. A connection string is configured but the Umbraco cannot connect to the database
First things first. Did you check for the connections string properties? Is the clone with the right credentials?
Regarding the ModelsBuilder assembly, i'm guessing that you need to get the UmbracoModelsBuilder dll from the original project and copy into the bin output from the new one. Until you pass this assembly and connection string in order to get umbraco started, you can't configure the way the umbracoModels builder behaviour.
I've just started to work on a MVC project. It's a web portal. I've set my sites on my local IIS 6.0
But when I want to start debugging, I get this error:
Unable to start debugging on the web server. The debugger cannot
connect to the remote computer. The debugger was unable to resolve the
specified computer name.
I don't understand that when I want to debug my project locally, what "Remote computer" it's talking about??!!
Please help me guys, this is my first task in this company and I have to overcome this error.
Check all the steps outlined here: https://msdn.microsoft.com/en-us/library/dwesw3ee.aspx?f=255&MSPPError=-2147217396
If you're using a hosts file, make sure you have an entry for the site in question. That was the problem for me, when I encountered this message.
I have similar problem.
My first solution delete url site from iis repositories and project properties write localhost and port number if is it. And debug began working without restart. I also think, may be if add new url in windows host file this can fix this trouble but may be need restat iis or visual studio.
IIS
Project properties
I'm learning Zend framework 2 therefore i downloaded the zendstudio IDE included with the zend server as well. I made my little application which is working totally fine on my local zend server. I wanted to try zend PHP cloud as well so i deployed my application there with zend studio. This application didn't work perfectly there. Some of the content is working and the other parts did not load at all only white screen. I checked the server logs and this is what i found there:
Function Name Zend\Loader\StandardAutoloader::loadClass
Error Type E_COMPILE_ERROR
Source File /home/container_name/.apps/http/__default__/0/app/1.0.0/vendor/zendframework/zendframework/library/Zend/Loader/StandardAutoloader.php
Error String Can't use method return value in write context
I thought that there might be an error during file uploading so i re uploaded the files via an ftp client and the problem is still exists.
Any help is greatly appreciated
After a couple of hours of code trace i found the solution:
if($this->request->isPost()){
if(!empty($this->getRequest()->getPost('sg')) <--- this is the line where it dies
Remote wasn't liked the !empty() so i replaced it with !=''
I am trying to implement the blackberry application which will help the user to update his status through application.
Its like user will enter the username, password and status it will update his status on twitter.
I have seen Twitter API docs but didnt understood how to start. It has many things like application registration and OAuth process which i felt very ambiguity.
I have also tried to use some external jar for blackberry but some of its classes/packages is not supported
twitter4j-core-2.1.1-SNAPSHOT.jar ----> Error preverifying class twitter4j.TwitterBase
java/lang/NoClassDefFoundError: java/io/Serializable
jtwitter.jar ---> VERIFIER ERROR org/json/Test.main([Ljava/lang/String;)V:
Cannot find class java/io/StringWriter
signpost-core-1.2.1.1.jar ---> Error preverifying class oauth.signpost.http.HttpParameters
java/lang/NoClassDefFoundError: java/util/Map
Please friends help me with how to start. it will be appreciated if any link or jar which support on blackberry can shared.
For a 10,000 mile view, you first need to preverify your jar files using the preverify.exe tool in the bin directory of your simulator.
You then need to create a new project, change the project type from CDLC -> Library and add your twitter4j-*.jar to it. Set this project as a reference (right click your main project and it's somewhere in the properties) to your main project. Next, configure build path for the main project and add twitter4j-* to your build path.
A detailed view with screenshots for eclipse is provided for a different library at -
http://www.craigagreen.com/index.php?/Blog/blackberry-and-net-webservice-tutorial-part-1.html
More info -
http://supportforums.blackberry.com/t5/Java-Development/Tutorial-How-To-Use-3rd-Party-Libraries-in-your-Applications/m-p/177543
If it's a simple tweet, you might be better of just doing a HTTP POST with the appropriate parameters.
Check URLEncodedPostData and HTTPConnection for more info about HTTP Post requests.