Can''t save phone mappings - asterisk-im 1.0/jive messenger 2.3.0

Hello,

My problem seems similar to this recent post from Eduardo, however I am not savvy enough to say for sure:

http://www.jivesoftware.org/community/thread.jspa?threadID=16635&tstart=0

Just upgraded from asterisk-im 1.0b2 to 1.0, jive messenger 2.2.1 to 2.3.0

Cannot save Phone Mappings, recieve the “operation completed succesfully” when creating a new mapping.

However, when I go into ‘‘Phone Mappings’’ there are no entries listed.

Some things to note:

  • This all worked fine with my previous versions

  • I’'m using the embedded database

  • I included my Error Log for examination

Seems as though there is a difference in the way the 1.0 plugin requires you to enter the details of the phone mapping, or for some reason it cannot save it to the database. This is how I entered the information, which again, worked before:

Username: ryan

Phone: SIP/20 (from the drop down menu)

Extension: 20

My Error Log:

205

206

207

208

209

210

211

212

213

214

215

216

217

218

219

220

221

222

223

224

225

226

227

228

229

230

231

232

233

234

235

236

237

238

239

240

241

242

243

244

245

246

247

248

249

250

251

252

253

254

at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:375)

at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:271)

at org.hibernate.impl.SessionImpl.list(SessionImpl.java:840)

at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)

at org.jivesoftware.phone.database.HibernatePhoneDAO.getALL(HibernatePhoneDAO.java :132)

at org.jivesoftware.phone.BasePhoneManager.getAll(BasePhoneManager.java:34)

at org.jivesoftware.messenger.plugin.phone.phone_002dusers_jsp._jspService(phone_0 02dusers_jsp.java:287)

at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)

at org.jivesoftware.messenger.container.PluginServlet.handleJSP(PluginServlet.java :227)

at org.jivesoftware.messenger.container.PluginServlet.service(PluginServlet.java:9 1)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)

at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427)

at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplica tionHandler.java:822)

at org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:98)

at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplica tionHandler.java:813)

at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:11 8)

at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)

at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplica tionHandler.java:813)

at org.jivesoftware.util.LocaleFilter.doFilter(LocaleFilter.java:43)

at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplica tionHandler.java:813)

at org.jivesoftware.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingF ilter.java:41)

at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplica tionHandler.java:813)

at org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:98)

at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplica tionHandler.java:813)

at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler. java:494)

at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:569)

at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)

at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.ja va:624)

at org.mortbay.http.HttpContext.handle(HttpContext.java:1434)

at org.mortbay.http.HttpServer.service(HttpServer.java:896)

at org.mortbay.http.HttpConnection.service(HttpConnection.java:814)

at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:981)

at org.mortbay.http.HttpConnection.handle(HttpConnection.java:831)

at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)

at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:366)

at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)

Caused by: java.sql.SQLException: Column not found: DEVICES0_.ISMONITORED in statement

at org.hsqldb.jdbc.Util.throwError(Unknown Source)

at org.hsqldb.jdbc.jdbcPreparedStatement.(Unknown Source)

at org.hsqldb.jdbc.jdbcConnection.prepareStatement(Unknown Source)

at org.jivesoftware.database.AbstractConnection.prepareStatement(AbstractConnectio n.java:36)

at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:38 3)

at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:32 1)

at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:8 6)

at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1129)

at org.hibernate.loader.Loader.doQuery(Loader.java:373)

at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java: 210)

at org.hibernate.loader.Loader.loadCollection(Loader.java:1401)

… 46 more

Also, I turned on debugging and this was the output after another attempt at adding a phone mapping:

2005.11.22 21:15:41 No userID found - phone-users.jsp

2005.11.22 21:15:54 No userID found - phone-users.jsp

2005.11.22 21:15:54 No userID found - phone-users.jsp

Hey scratchrf,

The db schema you are using has not been updated. Follow the following steps to update it.

  1. Stop the server.

  2. Create a backup of the file embedded-db/messenger.script.

  3. Open the file embedded-db/messenger.script.

  4. Remove all inserts that are adding data to PHONEDEVICE[/b] and PHONEUSER[/b]. This will remove all your mapping data so you will have to enter it again from the admin console.

  5. Replace the CREATE statements of the PHONEDEVICE[/b] and PHONEUSER[/b] tables with the following text:

CREATE MEMORY TABLE PHONEDEVICE(DEVICEID BIGINT NOT NULL PRIMARY KEY,DEVICE VARCHAR(255) NOT NULL,EXTENSION VARCHAR(255) NOT NULL,CALLERID VARCHAR(255),ISPRIMARY BOOLEAN NOT NULL,ISMONITORED BOOLEAN NOT NULL,USERID BIGINT)

CREATE MEMORY TABLE PHONEUSER(USERID BIGINT NOT NULL PRIMARY KEY,USERNAME VARCHAR(255) NOT NULL,CONSTRAINT SYS_CT_49 UNIQUE(USERNAME))

  1. Save the file.

  2. Start up the server again and try again.

Hope that helps.

Regards,

– Gato

Thank you very much Gato. I followed your advice to the letter and it resolved my issue perfectly.

– Scratchrf

I am getting a similar problem with a fresh install of the latest of Jive Messenger & Asterisk on MySQL. I get this when I try to open the interface for Asterisk-IM:

‘‘The Asterisk plugin was not able to succesfully initialize the database. Please see the documentation on initializing the database manually.’’

But, I do not see any documentation to refer to. Any assistance appreciated.

yeah, I need to write that don’‘t i I am going to include manual database scripts in the build but I haven’'t had time… I have attached the mysql sql for your convenience.

There is a way to manually generate the database scripts. The tool is called org.jivesoftware.phone.database.HibernateUtil. Hibernate util takes two args;

If you have the asterisk-im source (current as of today) you can use hibernate util by running the target ant target dbscript. You must specify a database type.

example:

ant -Ddatabase=mysql dbscript[/i]

Possible database types are:

mysql, postgres, oracle, hsqldb, db, and sqlserver. If the database type is not specified unknown is used. Unknown may or may not worked, so it is stressed to pick a database type.

The ddl will be printed on the console and saved to a file asterisk-im-.sql

All that and i forget to attach the sql file

Here it is now.
asterisk-im-mysql.sql (651 Bytes)

Thanks! I will give it a try.

I did this, but still have the same error.

No userID found - phone-users.jsp

Presense status and everything works. Only Action -> Dial doesnot show.

You usually get this error when you try to create a mapping for a user that does not exist in the jiveUser table. Can you confirm this user exists?

Andrew,

I don’'t have the user in jiveUser table ''cause i use ADS authentication.

regards

KIRAN

I am not sure Asterisk-IM has ever been tested using LDAP authentication. I have created the following issue PHONE-43 to test and investigate this.

Hopefully I will have time to work on 1.0.1 in the near future. My schedule has been very fully lately.

Appears to work fine with Wildfire v2.4 as well.

Message was edited by:

MuppetMaster