cancel
Showing results for 
Search instead for 
Did you mean: 

Deployment - RemoteException: Incorrect QL query ...

Former Member
0 Kudos

Hi everybody,

I am currently trying to migrate from WLS 8.1 to SAP WEB AS 6.40 SP11. I have built my application EAR and already

resolved some typical migration issues in my deployment descriptors. The EAR contains multiple component jars with

their according deployment descriptors My current problem is a tough one though. Neither the exception nor the stack

reveals where the exact problem lies. I checked my persistent.xml and ejb-jar.xml for well-formedness and

validity ... everything's fine.

here is the stack:

[code]<i>Starting Deployment of myApp

Aborted: development component 'myApp'/'mycompany.com'/'localhost'/'2005.10.28.10.14.19':

Caught exception during application deployment from SAP J2EE Engine's deploy service:

java.rmi.RemoteException: Cannot deploy application mycompany.com/myApp.. Reason: Incorrect QL query: , errors: line 1: expecting "select", found '<end-of-query>'line 1: expecting "from", found '<end-of-query>'.; nested exception is: com.sap.engine.services.deploy.container.DeploymentException: <--Localization failed: ResourceBundle='com.sap.engine.services.deploy.DeployResourceBundle', ID='com.sap.engine.services.ejb.exceptions.deployment.EJBDeploymentException: Incorrect QL query: , errors: line 1: expecting "select", found '<end-of-query>'line 1: expecting "from", found '<end-of-query>'.

at com.sap.engine.services.ejb.deploy.ejbql.QLTranslator.prepareQLContext(QLTranslator.java:191)

at com.sap.engine.services.ejb.deploy.ejbql.QLTranslator.translateQuery(QLTranslator.java:103)

at com.sap.engine.services.ejb.deploy.ejbql.QLTranslator.translateAllQueries(QLTranslator.java:171)

at com.sap.engine.services.ejb.deploy.DeployAdmin.translateQL(DeployAdmin.java:1398)

at com.sap.engine.services.ejb.deploy.DeployAdmin.generate(DeployAdmin.java:254)

at com.sap.engine.services.ejb.EJBAdmin.deploy(EJBAdmin.java:2118)

at com.sap.engine.services.deploy.server.application.DeploymentTransaction.makeComponents(DeploymentTransaction.java:594)

at com.sap.engine.services.deploy.server.application.DeployUtilTransaction.commonBegin(DeployUtilTransaction.java:379)

at com.sap.engine.services.deploy.server.application.DeploymentTransaction.begin(DeploymentTransaction.java:296)

at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:290)

at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhases(ApplicationTransaction.java:323)

at com.sap.engine.services.deploy.server.DeployServiceImpl.makeGlobalTransaction(DeployServiceImpl.java:3033)

at com.sap.engine.services.deploy.server.DeployServiceImpl.deploy(DeployServiceImpl.java:463)

at com.sap.engine.services.deploy.server.DeployServiceImplp4_Skel.dispatch(DeployServiceImplp4_Skel.java:1555)

at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:294)

at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:183)

at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:119)

at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)

at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)

at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)

at java.security.AccessController.doPrivileged(Native Method)

at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)

at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)

', Arguments: []--> : Can't find resource for bundle java.util.PropertyResourceBundle, key com.sap.engine.services.ejb.exceptions.deployment.EJBDeploymentException: Incorrect QL query: , errors: line 1: expecting "select", found '<end-of-query>'line 1: expecting "from", found '<end-of-query>'.

at com.sap.engine.services.ejb.deploy.ejbql.QLTranslator.prepareQLContext(QLTranslator.java:191)

at com.sap.engine.services.ejb.deploy.ejbql.QLTranslator.translateQuery(QLTranslator.java:103)

at com.sap.engine.services.ejb.deploy.ejbql.QLTranslator.translateAllQueries(QLTranslator.java:171)

at com.sap.engine.services.ejb.deploy.DeployAdmin.translateQL(DeployAdmin.java:1398)

at com.sap.engine.services.ejb.deploy.DeployAdmin.generate(DeployAdmin.java:254)

at com.sap.engine.services.ejb.EJBAdmin.deploy(EJBAdmin.java:2118)

at com.sap.engine.services.deploy.server.application.DeploymentTransaction.makeComponents(DeploymentTransaction.java:594)

at com.sap.engine.services.deploy.server.application.DeployUtilTransaction.commonBegin(DeployUtilTransaction.java:379)

at com.sap.engine.services.deploy.server.application.DeploymentTransaction.begin(DeploymentTransaction.java:296)

at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:290)

at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhases(ApplicationTransaction.java:323)

at com.sap.engine.services.deploy.server.DeployServiceImpl.makeGlobalTransaction(DeployServiceImpl.java:3033)

at com.sap.engine.services.deploy.server.DeployServiceImpl.deploy(DeployServiceImpl.java:463)

at com.sap.engine.services.deploy.server.DeployServiceImplp4_Skel.dispatch(DeployServiceImplp4_Skel.java:1555)

at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:294)

at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:183)

at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:119)

at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)

at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)

at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)

at java.security.AccessController.doPrivileged(Native Method)

at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)

at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)</i>[/code]

I tried the deployment via SDM, Visual Administrator, SWDS and deploytool, but without success.

Using the Visual Administrator I get a totally different exception. I thought that the deployment can be done by

any of the above mentioned tools with the same outcome. There is no storage.xml included in the jar, the

persistent.xml and ejb-jar.xml are parsable, thus they are wellformed and valid:

[code]<i>com.sap.engine.deploy.exceptions.BaseIOException: Cannot parse persistent.xml or storage.xml for JAR C:\usr\sap\J2E\JC00\j2ee\admin\.\temp\deploying\deploy_temp\reader1131614442531\comp.jar.

Reason: com.sap.engine.deploy.exceptions.BaseIOException: Cannot parse ejb-jar.xml for JAR C:\usr\sap\J2E\JC00\j2ee\admin\.\temp\deploying\deploy_temp\reader1131614442531\comp.jar.

Reason: java.lang.ArrayIndexOutOfBoundsException: 2..

at com.sap.engine.deploy.ejb.descriptors.jar.ReadEjbJar.getEjbJarDescriptor(ReadEjbJar.java:130)

at com.sap.engine.deploy.ejb.descriptors.jar.ReadEjbJar.getEjbJarDescriptor(ReadEjbJar.java:150)

at com.sap.engine.deploy.tool.deployer.ExtendedEarReader.loadDescriptorFromFile(ExtendedEarReader.java:230)

at com.sap.engine.deploy.tool.deployer.ExtendedEarReader.getFullEarDescriptor(ExtendedEarReader.java:102)

at com.sap.engine.services.deploy.gui.runtime.EarLoader.loadEar(EarLoader.java:137)

at com.sap.engine.services.deploy.gui.runtime.MainDeployPanelLogical.loadEarAction(MainDeployPanelLogical.java:169)

at com.sap.engine.services.deploy.gui.runtime.EarDialog.setEar(EarDialog.java:79)

at com.sap.engine.services.deploy.gui.DeployDialogLogical.okButtonAction(DeployDialogLogical.java:294)

at com.sap.engine.services.deploy.gui.DeployDialogLogical.actionPerformed(DeployDialogLogical.java:71)

at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)

at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)

at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)

at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)

at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)

at java.awt.Component.processMouseEvent(Component.java:5100)

at java.awt.Component.processEvent(Component.java:4897)

at java.awt.Container.processEvent(Container.java:1569)

at java.awt.Component.dispatchEventImpl(Component.java:3615)

at java.awt.Container.dispatchEventImpl(Container.java:1627)

at java.awt.Component.dispatchEvent(Component.java:3477)

at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)

at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)

at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)

at java.awt.Container.dispatchEventImpl(Container.java:1613)

at java.awt.Window.dispatchEventImpl(Window.java:1606)

at java.awt.Component.dispatchEvent(Component.java:3477)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:480)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:141)

at java.awt.Dialog$1.run(Dialog.java:540)

at java.awt.Dialog.show(Dialog.java:561)

at java.awt.Component.show(Component.java:1133)

at java.awt.Component.setVisible(Component.java:1088)

at com.sap.engine.services.deploy.gui.DeployDialogLogical.showDialog(DeployDialogLogical.java:378)

at com.sap.engine.services.deploy.gui.ApplicationsPanel.deployAction(ApplicationsPanel.java:409)

at com.sap.engine.services.deploy.gui.ApplicationsPanel.actionPerformed(ApplicationsPanel.java:351)

at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)

at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)

at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)

at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)

at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)

at java.awt.Component.processMouseEvent(Component.java:5100)

at java.awt.Component.processEvent(Component.java:4897)

at java.awt.Container.processEvent(Container.java:1569)

at java.awt.Component.dispatchEventImpl(Component.java:3615)

at java.awt.Container.dispatchEventImpl(Container.java:1627)

at java.awt.Component.dispatchEvent(Component.java:3477)

at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)

at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)

at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)

at java.awt.Container.dispatchEventImpl(Container.java:1613)

at java.awt.Window.dispatchEventImpl(Window.java:1606)

at java.awt.Component.dispatchEvent(Component.java:3477)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:480)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)</i>[/code]

Any help is highly appreciated.

thanks and best regards

Marcel

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Marcel

Check this thread, you can find information about the following exception,

com.sap.engine.deploy.exceptions.BaseIOException: Cannot parse persistent.xml or storage.xml for JAR

hope it helps

cheers

sameer

Former Member
0 Kudos

Hey Sameer,

thank you for your quick post. I don't think the size of the ejb-jar.xml is my problem, it is close to 2000 lines, so way below the given margin of Christian. There must be something else, but I agree that it probably has something to do with the SAP-XML-Parser, because I verified the dd against multiple parsers without any problems.

Best regards

Marcel

Former Member
0 Kudos

Hi Marcel,

Actually what this error means is that you have a method in your EJB QL that has incorrect syntax. If you look at the ejb-jar.xml file for your project you should see a section like this:

<query>

<query-method>

<method-name>findByNameAndID</method-name>

<method-params>

<method-param>java.lang.String</method-param>

<method-param>java.lang.Long</method-param>

</method-params>

</query-method>

<ejb-ql>select Object(inv) from InventoryBean inv where

inv.manufacturer = ?1 and inv.productID = ?2</ejb-ql>

</query>

This should correspond to the finder methods that you have defined for your entity bean. If it doesn't (i.e. variables don't match up) or if the syntax is incorrect you will get the error you mention. Note that it is also case sensitive.

Cheers,

Steve

-


If you find a post useful, please help keep the community going by setting a good example and rewarding the poster with points.

Former Member
0 Kudos

Hi Steve,

thank you for your comment. Actually, it was something else. I checked the queries and they were all perfectly right. I was able to pinpoint the problem to the declaration of Message Driven Beans. The

<acknowledge-mode>Auto-acknowledge</acknowledge-mode>

tag was wrongfully set for a MDB using Container transactions. The exception provided by SAP is more than misleading.

Best regards

Marcel

Former Member
0 Kudos

Hi again,

I have to emend my previous statement. Well, the wrong declaration of MDB was the reason for the ArrayIndexOutOfBoundsException. After proper configuration the components to be deployed are shown in the Visual Administrator and the Deploy Tool.

I checked my EJB-QL queries and they are all syntactically correct. They work on BEA and JBoss as well. SAP does not seem to recognize them at all, because none of my components has any ejb-ql statements in the finder descriptors section in the Deployment Tool (Bean-->Persistent-Finder Descriptors).

Do I have to provide all queries in the persistent.xml again? They are pretty straight forward and do not use any features of EJB 2.1 like Order by.

best regards

Marcel

Message was edited by: Marcel Ecks

Former Member
0 Kudos

Hi Marcel,

Hmmm. I usually get that exception when I have a problem with my select statements for the finder methods. If it's not being recognized by the tools, then you probably have a problem with them too, but to be honest, I always edit the xml by hand. My guess is that you've already tried deleting and adding them again, but if not, you should probably do so.

If the problem really isn't with that, then you'll have to let me know so that I can find someone to fix the error message because it really is misleading. Keep me posted with your progress.

Cheers,

Steve

-


If you find a post useful, please help keep the community going by setting a good example and rewarding the poster with points.

Former Member
0 Kudos

Hi Steve,

I finally figured out what the problem is. The XML parser is obviously not able to parse EOL within ejb-ql Tags when using CDATA sections.

For example:


    <ejb-ql>
     <![CDATA[SELECT OBJECT(a) FROM Document AS a
    
]]>

results in the RemoteException. This query is not recognized by the parser. If the EOLs are removed, everything is fine:

<ejb-ql><![CDATA[SELECT OBJECT(a) FROM Document AS a]]>

The ejb-jar.xml files are generated and auto-indented as one would expect for an XML-document. The simple presence of the EOL leads to failure of deployment, thus I edited all XML-files manually. For the future this not an option, because the ejb-jar.xml will be regenerated, therefore the issue will reemerge on redeployment. After the adjustments I am able to see all my Queries in the Finder Descriptors section of the Deployment Tool.

Another issue. After manually changing all the ejb-jar.xml files, I was able to get to the next exception. Now the parser tries to parse the CDATA section reporting invalid characters. It is supposed to recognize CDATA sections as valid PCDATA as stated in the EJB 2.0 DTD, but it's not.

best regards

Marcel