Bug 748448
Summary: | Purged plugin in RHQ Server fail | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Other] RHQ Project | Reporter: | Bruno Leite Alves <brunoleitealves> | ||||||
Component: | Plugins | Assignee: | RHQ Project Maintainer <rhq-maint> | ||||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Mike Foley <mfoley> | ||||||
Severity: | unspecified | Docs Contact: | |||||||
Priority: | medium | ||||||||
Version: | 4.0.1 | CC: | hrupp, jshaughn, mazz | ||||||
Target Milestone: | --- | ||||||||
Target Release: | RHQ 4.3.0 | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2013-09-12 21:22:25 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
Description
Bruno Leite Alves
2011-10-24 14:00:37 UTC
Created attachment 529880 [details]
Log of RHQ Server
Log of RHQ Server
This is the error that causes the problem: 2011-10-24 10:27:35,443 INFO [org.rhq.enterprise.server.core.plugin.AgentPluginScanner] Plugin file [C:\rhq-server-4.0.1\jbossas\server\default\deploy\rhq.ear\rhq-downloads\rhq-plugins\pdvexpert-rhqplugin-0.9.2-SNAPSHOT.jar] has been deleted from the file system. 2011-10-24 10:28:02,081 INFO [org.rhq.enterprise.server.resource.metadata.PluginManagerBean] Scheduling plugin [AgentPlugin [id=10051, name=PdvExpertJmxPlugin, md5=d23db50eb155f223291d835fd470a7f3]] to be purged from the database. 2011-10-24 10:30:04,355 WARN [org.hibernate.util.JDBCExceptionReporter] SQL Error: 0, SQLState: 22025 2011-10-24 10:30:04,355 ERROR [org.hibernate.util.JDBCExceptionReporter] ERRO: cadeia de caracteres de escape inválida Hint: Cadeia de caracteres de escape deve ser vazia ou ter um caracter. 2011-10-24 10:30:04,357 ERROR [org.rhq.enterprise.server.scheduler.jobs.AbstractStatefulJob] Failed to execute job [PurgePluginsJob] javax.ejb.EJBTransactionRolledbackException: org.hibernate.exception.DataException: could not execute query Unknown why this happened. Postgres error 22025: Invalid escape sequence: HINT: Escape string must be empty or one character. I wonder if it had something to do with the filename being a Windows path that has backslashes??? That's the only thing I can think of that would be "escaped" in the query. But this is just a wild guess, because I know this worked on Windows before. looking closer at the stack trace, I see this is where it technically failed: Caused by: javax.persistence.PersistenceException: org.hibernate.exception.DataException: could not execute query at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:629) at org.hibernate.ejb.QueryImpl.getSingleResult(QueryImpl.java:99) at org.rhq.enterprise.server.util.CriteriaQueryRunner.getCount(CriteriaQueryRunner.java:124) at org.rhq.enterprise.server.util.CriteriaQueryRunner.execute(CriteriaQueryRunner.java:76) at org.rhq.enterprise.server.resource.ResourceTypeManagerBean.findResourceTypesByCriteria(ResourceTypeManagerBean.java:474) ... at $Proxy214.findResourceTypesByCriteria(Unknown Source) at org.rhq.enterprise.server.resource.metadata.PluginManagerBean.isReadyForPurge(PluginManagerBean.java:108) Here's the code building the criteria that gets the types: public boolean isReadyForPurge(Plugin plugin) { ResourceTypeCriteria criteria = new ResourceTypeCriteria(); criteria.addFilterPluginName(plugin.getName()); criteria.setRestriction(Criteria.Restriction.COUNT_ONLY); PageList results = resourceTypeMgr.findResourceTypesByCriteria(subjectMgr.getOverlord(), criteria); return results.getTotalSize() == 0; } Is it possible for you to attach the plugin jar to this BZ, or at least attach the plugin descriptor .xml? Created attachment 529952 [details]
XML do plugin rhq
XML do plugin rhq
(10:53:14 AM) mazz: I never figured out what the issue there was. Looks like it was happening when doing development of a plugin and doing the delete/purge cycle somehow screwed up. (10:53:33 AM) mazz: we'd need to replicate over here to get a good sense of what the problem is (10:54:07 AM) mazz: Postgres error 22025: Invalid escape sequence: HINT: Escape string must be empty or one character. (10:54:19 AM) mazz: that's the cause - I have a sense it might be an i18n'ish issue (10:54:42 AM) mazz: but I really don't know. need to replicate (10:55:05 AM) ccrouch: mazz: did the rhq-plugin.xml he added help? (10:56:01 AM) mazz: not by visual inspection. I was actually looking to see what his plugin name was - perhaps it had some non-English/ASCII characters in it. (10:56:03 AM) mazz: it doesn't (10:56:16 AM) mazz: the description had some spanish chars in it (10:56:31 AM) mazz: but I never actually ran a test with this to see if that really would cause problems (10:56:35 AM) mazz: we only query on the plugin name what version of Postgres are you using? If its 9.1, this sounds like bug #741855 - it too mentions: Caused by: org.postgresql.util.PSQLException: ERROR: invalid escape string Escape string must be empty or one character. Please read that issue and see if its suggestion corrects the problem. I suspect that is the cause for your issue (since the error looks to be the same). There has been a lot of work in this area and I believe the issue has been resolved. Never received any requested info. Closing as CURRENTRELEASE. Please open a new BZ if the issue is rediscovered. |