This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
This is the error obtained after a full verify of the enterprise application project: -------------- FAILED TESTS : -------------- Test Name : tests.ejb.entity.findermethod.HomeInterfaceFindMethodMatch Test Assertion : Entity bean home interface find[METHOD](...) matches ejbFind[METHOD](...). Test Description : For [ CSIPortal#EJBWebProfile-ejb.jar#EJBWebDwnld ] For home interface [ ejb.com.dbprofile.EJBWebDwnldHome ] method [ findByCustomerId ]. Error: A corresponding [ ejbFindByCustomerId ] method was found, but the parameters did not match. --------------------------------------- Issue Explanation: The error appears even if the following condition is satisfied in the code: Entity bean home interface find[METHOD](...) matches ejbFind[METHOD](...). The verification test fails because I have two find methods with the same name and a different number of parameters. Below I indicate the Class where the bug can be easely identified because the home methods are compared with the bean methods by matching their names but comparing then the wrong ones. E.g. the verify test compares the findMethodA(P1) with the ejbFindMethodA(P1, P2) which is wrong. The error is located in the following Class: com.sun.enterprise.tools.verifier.tests.ejb.entity.findermethod.HomeInterfaceFindMethodMatch Under the Method: private void commonToBothInterfaces(String home, String remote, EjbDescriptor descriptor) At the following instruction the compared parameters are not coming from the right methods: if (!Arrays.equals(methodParameterTypes,ejbFinderMethodParameterTypes)) { ... Because the following test is not sufficient to start a compare of the home/beans method parameters: if (homeInterfaceMethods[i].getName().toUpperCase().equals (ejbFinderMethods[z].getName().toUpperCase().substring(3))) { ... This test is allowing a wrong comparation between findMethodA(P1) with the ejbFindMethodA(P1, P2) findMethodA(P1, P2) with the ejbFindMethodA(P1) instead of findMethodA(P1) with the ejbFindMethodA(P1) findMethodA(P1, P2) with the ejbFindMethodA(P1, P2)
I must say I don't fully understand, what are the steps to reproduce this in the IDE? Can you please attach a project which reproduces this? Also, is this a bug in the verifier tool, or in the IDE?
What is application server, version?
The verifier support is implemented on the server plugin side. Reassign for evaluation.
ok. The problem is in the verifier. I have to assume that your application targets GF v1 or v2 or SJSAS 8.x. The work-around is simple... change the name of one of the two methods so there is no possibility of the crisscrossed match. something like findByX (one param) findByXAndY (two param) You should probably file a bug at https://glassfish.dev.java.net/issues for the verifier Since there is no code change which we can commit to the NB source code that will fix this issue, I am going to mark it as won't fix. If you disagree with this resolution, please reopen the issue with details about how you used NetBeans to create the code that triggered the warning from the verifier. For example... which wizard did you use to generate the bogus finder methods.