[JBoss AOP] - Unable to resolve pointcut reference
by sandello
My aspect:
| package com.company.cms;
|
| @Aspect(scope=Scope.PER_INSTANCE)
| public class ChangesReporterAspect {
| private Logger debugger=Logger.getLogger(ChangesReporterAspect.class);
|
| private JmsRepoter reporter;
|
| @PointcutDef(
| "execution(* $instanceof{com.company.IDataManager}->save()) OR execution(* $instanceof{com.company.IDataManager}->erase())"
| )
| public static Pointcut updateMethods;
|
|
| public ChangesReporterAspect()
| throws CmsException {
| reporter=new JmsRepoter();
| reporter.init();
| }
|
| @Bind(pointcut="com.company.cms.ChangesReporterAspect.updateMethods")
| public Object update(Invocation invocation) {...}
| }
|
when deploing, Jboss writting:
| 11:58:58,569 ERROR [STDERR] java.lang.RuntimeException: Unable to resolve pointcut reference: com.company.cms.ChangesReporterAspect.updateMethods
| 11:58:58,570 ERROR [STDERR] at org.jboss.aop.pointcut.MatcherHelper.visit(MatcherHelper.java:142)
| 11:58:58,570 ERROR [STDERR] at org.jboss.aop.pointcut.ast.ASTPointcut.jjtAccept(ASTPointcut.java:41)
| 11:58:58,570 ERROR [STDERR] at org.jboss.aop.pointcut.MatcherHelper.visit(MatcherHelper.java:88)
| 11:58:58,570 ERROR [STDERR] at org.jboss.aop.pointcut.MatcherHelper.matches(MatcherHelper.java:83)
| 11:58:58,571 ERROR [STDERR] at org.jboss.aop.pointcut.PointcutExpression.matchesCall(PointcutExpression.java:99)
| 11:58:58,571 ERROR [STDERR] at org.jboss.aop.instrument.CallerTransformer$CallerExprEditor.edit(CallerTransformer.java:343)
| 11:58:58,571 ERROR [STDERR] at javassist.expr.ExprEditor.loopBody(ExprEditor.java:178)
| 11:58:58,571 ERROR [STDERR] at javassist.expr.ExprEditor.doit(ExprEditor.java:90)
| 11:58:58,571 ERROR [STDERR] at javassist.CtBehavior.instrument(CtBehavior.java:468)
| ...
|
What I do wrong?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971174#3971174
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971174
19 years, 8 months
[Clustering/JBoss] - Re: Jgroups jboss cache deadlock
by lmouton
We only use put.
We do call to the cache in a synchronised method. This is how we call the cache.
public synchronized Object put(String fqn, Object key, Object value) throws CacheImplementationException {
| if (isCacheActive()) {
| try {
| StringBuffer buffer = new StringBuffer();
| buffer.append(fqn);
| buffer.append(FORWARD_SLASH);
| buffer.append(key.toString());
|
| HashMap<String, MarshalledValue> map = new HashMap<String, MarshalledValue>(1, 1.0f);
| map.put(key.toString(), new MarshalledValue(value));
|
| return server.invoke(cacheService, "put",
| new Object[] { buffer.toString(), map },
| new String[] { String.class.getName(), Map.class.getName() });
| } catch (Exception e) {
| e.printStackTrace();
| throw new CacheImplementationException(e);
| }
| }
| else {
| return null;
| }
| }
Do we need to have this synchronised? In our TreeCache setup we set the SyncReplTimeout to 10000ms.
The first dump we posted looks like it is blocking in org.jgroups.blocks.GroupRequest.doExecute(GroupRequest.java:492) which is jgroups itself. Are we reading this right?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971173#3971173
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971173
19 years, 8 months
[Security & JAAS/JBoss] - Re: Strange think!
by kourkk
Thanks for the response fhh.
My jboss-web.xml is OK
<?xml version="1.0"?>
<jboss-web>
<security-domain>java:/jaas/myPolicy</security-domain>
</jboss-web>
and is pointing to the correct policy inside login-conf.xml.
<application-policy name="myPolicy">
<login-module code="org.jboss.security.ClientLoginModule" flag="required">
</login-module>
<login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule" flag="required">
<module-option name="managedConnectionFactoryName">
jboss.jca:service=LocalTxCM,name=MySqlDS
</module-option>
<module-option name="dsJndiName">
java:/MySqlDS
</module-option>
<module-option name="principalsQuery">
SELECT PASSWD FROM PRINCIPALS WHERE USERID=?
</module-option>
<module-option name="rolesQuery">
SELECT ROLEID 'Roles', ROLEGROUP 'RoleGroups' FROM ROLES WHERE USERID=?
</module-option>
</login-module>
</application-policy>
I am not sure though if my database realm is need it also. i.e the following is needed in login-conf.xml?
<application-policy name = "MySqlDbRealm">
<login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule"
flag = "required">
<module-option name = "principal">root</module-option>
<module-option name = "userName">root</module-option>
<module-option name = "password">root</module-option>
<module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=MySqlDS</module-option>
</login-module>
</application-policy>
Yes the problem is that can not find the my application policy when i try to login with the loginContext.login. But when i am redirected to the login page (FORM based security) and the j_security_check executed everything works ok, it find everything. But with loginContext.login no. And also remember that IT Was working.
Another good is that I changed to jboss 4.05 cr1 and now is working again.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971170#3971170
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971170
19 years, 8 months
[JBoss Seam] - Rare pagination problem
by juan_uy
Hi all,
I'm facing a rare problem using the Pagination code from the Code Generated by the JBoss Eclipse IDE CRUD reverse eng. (I have manualy hardcoded to understand the code too). Here is the explaination of the code, when I load the page for the first time, the page load the first ten rows, but when I click the next button, the page shows the same rows, and I press N times the next button again until the last page show, and in this case the page show the rows correctly. Similar problem I face when I do previous, in the last page when I press previous button, the page load the N-1 page rows correctly, but when I click previous button again the page shown the same rows of the N-1 page forever.
I have debuged the code, and I have noticed that the Code loads the corrects rows for the list, but when the results is rendered show the firsts rows.
I have used:
- Seam 1.0.1 GA with Sun JSF 1.2 RI and Facelets 1.1.14 (FaceletViewHandler)
- Seam 1.0.1 GA with MyFaces and Facelets 1.1.14 (FaceletViewHandler)
- Seam 20060912 Build with MyFaces and Facelets 1.1.14. (With the SeamFaceletViewHandler and FaceletViewHandler)
The code is the same as the Code of the Code Generator (Plus DRY principles using generics)
|
| @Name("groupFinder")
| @Stateful
| @Scope(ScopeType.SESSION)
| @Interceptors(SeamInterceptor.class)
| public class GroupFinderBean extends GenericFinderBean<Group> implements GroupFinder {
|
| public GroupFinderBean() {
| super(new Group());
| }
|
| @DataModel
| private List<Group> groupList;
|
| @DataModelSelection
| private Group selectedGroup;
|
| @SuppressWarnings("unchecked")
| protected StringBuffer buildQuery(Map<String, Object> parameters) {
| StringBuffer queryString = new StringBuffer();
|
| if (example != null && example.getName() != null && example.getName().length() > 0) {
|
| Integer number = null;
|
| // Verify if I can convert te name to a number
| try {
| number = new Integer(example.getName());
| } catch (NumberFormatException ex) {
| }
|
| // Build the query
| if (number == null) {
| queryString.append(" or group.name like :name");
| parameters.put("name", '%' + example.getName() + '%');
|
| queryString.append(" or group.description like :description");
| parameters.put("description", '%' + example.getName() + '%');
| } else {
| queryString.append(" or group.id = :id");
| parameters.put("id", number);
| }
|
| }
|
| if (queryString.length() == 0) {
| queryString.append("select group from Group group");
| } else {
| queryString.delete(0, 3).insert(0, "select group from Group group where");
| }
|
| if (order != null) {
| queryString.append(" order by group.").append(order);
| if (descending)
| queryString.append(" desc");
| }
|
| return queryString;
| }
|
| @Override
| protected List<Group> getList() {
| return groupList;
| }
|
| @Override
| protected Group getSelectedItem() {
| return selectedGroup;
| }
|
| @Override
| protected Group newInstance() {
| return new Group();
| }
|
| @Override
| protected void setList(List<Group> list) {
| this.groupList = list;
| }
|
| }
|
|
The facelet-config for the navigation (I have used with and without redirect)
<navigation-rule>
| <navigation-case>
| <from-outcome>editGroup</from-outcome>
| <to-view-id>/modules/system/groups/editGroup.seam</to-view-id>
| <redirect/>
| </navigation-case>
| <navigation-case>
| <from-outcome>selectGroup</from-outcome>
| <to-view-id>/modules/system/groups/findGroup.seam</to-view-id>
| <redirect/>
| </navigation-case>
| <navigation-case>
| <from-outcome>viewGroup</from-outcome>
| <to-view-id>/modules/system/groups/viewGroup.seam</to-view-id>
| <redirect/>
| </navigation-case>
| <navigation-case>
| <from-outcome>findGroup</from-outcome>
| <to-view-id>/modules/system/groups/findGroup.seam</to-view-id>
| <redirect/>
| </navigation-case>
| </navigation-rule>
I'm sure that I forgot a stupid thing, but I really in trouble for days...and I don't have found the solution. :S
Any Ideas? ;)
Thx in adv.
juan.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971169#3971169
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971169
19 years, 8 months
[JBoss Eclipse IDE (users)] - Re: JBoss Eclipse IDE 2.0.0.Beta bundle: JBoss Server confi
by lfok
I have the same problem with JBossIDE-1.6.0.GA-ALL when I went to modify the xdoclet in project properties
some messages from .log
+==============================
!ENTRY org.eclipse.jface 4 2 2006-09-13 11:56:39.171
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jface".
!STACK 0
java.lang.NoClassDefFoundError: org/eclipse/jdt/internal/ui/viewsupport/ListContentProvider
at org.jboss.ide.eclipse.xdoclet.run.ui.ConfigurationListViewer.(ConfigurationListViewer.java:115)
at org.jboss.ide.eclipse.xdoclet.run.ui.properties.ConfigurationPropertyPage.createContents(ConfigurationPropertyPage.java:329)
at org.eclipse.jface.preference.PreferencePage.createControl(PreferencePage.java:233)
at org.eclipse.jface.preference.PreferenceDialog.createPageControl(PreferenceDialog.java:1403)
at org.eclipse.jface.preference.PreferenceDialog$12.run(PreferenceDialog.java:1162)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:843)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:149)
at org.eclipse.jface.preference.PreferenceDialog.showPage(PreferenceDialog.java:1156)
at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.showPage(FilteredPreferenceDialog.java:439)
at org.eclipse.jface.preference.PreferenceDialog$8.selectionChanged(PreferenceDialog.java:661)
at org.eclipse.jface.viewers.StructuredViewer$3.run(StructuredViewer.java:839)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:843)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:149)
at org.eclipse.jface.viewers.StructuredViewer.firePostSelectionChanged(StructuredViewer.java:837)
at org.eclipse.jface.viewers.StructuredViewer.handlePostSelect(StructuredViewer.java:1143)
at org.eclipse.jface.viewers.StructuredViewer$5.widgetSelected(StructuredViewer.java:1163)
at org.eclipse.jface.util.OpenStrategy.firePostSelectionEvent(OpenStrategy.java:236)
at org.eclipse.jface.util.OpenStrategy.access$4(OpenStrategy.java:230)
at org.eclipse.jface.util.OpenStrategy$3.run(OpenStrategy.java:404)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3325)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2971)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
at org.eclipse.jface.window.Window.open(Window.java:796)
at org.eclipse.ui.dialogs.PropertyDialogAction.run(PropertyDialogAction.java:156)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:499)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:539)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:400)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971167#3971167
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971167
19 years, 8 months