EJB QL "LIKE" PROBLEM

Hai All.
I got an error when put this EJB-QL syntax :
<query>
<query-method>
<method-name>findByName</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
<ejb-ql>SELECT DISTINCT object (a) FROM DummyData a WHERE a.name LIKE ?1</ejb-ql>
</query>
Seems like this method cannot take an arguments, because it runs well when I change the <ejb-ql> syntax with harcode query like this :
<ejb-ql>SELECT DISTINCT object (a) FROM DummyData a WHERE a.name LIKE %FOO%</ejb-ql>
Is there something wrong with my first syntax?
or the EJB-QL cannot take an arguments for LIKE operator in EJB 2.0??
Below is the error output
Auto-deploying file:/C:/NS/jdev/TAX_WORKSPACE/TAX_PROJECT/classes/ (No previous deployment found)... Encountered "a . birthdate LIKE ?1" at line 1, column 7.
EJB QL method : public abstract java.util.Collection gov.tax.business.registration.IEbDummyLocalHome.findByName(java.lang.String) throws javax.ejb.FinderException
com.sun.ejb.ejbql.EjbQLQuery
com.sun.ejb.ejbql.parser.EjbQLParser.parse(com.sun.ejb.ejbql.SymbolTable, com.sun.enterprise.deployment.PersistenceDescriptor, java.lang.reflect.Method, java.lang.String)
Thanx in advance

Hi,
You can achieve this by overriding EJB-QL in orion-ejb-jar.xml file. Please look at
http://otn.oracle.com/docs/products/ias/doc_library/903doc_otn/generic.903/a97677/ql.htm#1005714
So you can have something like
<finder-method query="$name like $1"> in orion-ejb-jar.xml
and a dummy (but valid) ejb-ql in ejb-jar.xml, like
<ejb-ql>SELECT DISTINCT object (a) FROM DummyData a WHERE a.name =?1</ejb-ql>
Hope this helps,
Neelesh
OTN Team @ IDC

Similar Messages

  • Using EJB Local Interface problem

    Hi to all
    I have got a problem in using Local EJB Interface in Weblogic , please attention to my description
    I use JDeveloper as IDE
    At first I create an Application in JDeveloper that has two projects that their names are Model and ViewContorller that first one contains my EJB and another contains my JSP page respectively
    The EJB code is :
    @Stateless(name="AliEJB001Bean")
    @Remote
    @Local
    public class AliEJB001Bean implements AliEJB001, AliEJB001Local {
    public AliEJB001Bean() {
    public String Hi(){
    return "Hi000";
    And its Local Interface code is :
    @Local
    public interface AliEJB001Local {
    String Hi();
    I deploy Model project to an EJB Jar file that its name is AliEE1ejb1.jar
    and I deploy the ViewContorller project to a WAR file that its name is AliEE1WebApp.war
    Now I add this tags to web.xml
    <ejb-local-ref>
    <ejb-ref-name>ali/testejb</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local>model.AliEJB001Local</local>
    </ejb-local-ref>
    Then I deploy the Application to an EAR file by name AliEE1
    After those I run my JSP page witch calls the EJB in JDeveloper (through Local EJB Interface) , JDeveloper deploy my Application to the ItegratedWeblogicServer
    Ultimately the JSP can calls the EJB through Local Interface and use the Hi method and shows me the result but JDeveloper while compiles the application give me these Warnings :
    Warning: <May 15, 2011 9:02:52 AM PDT> <Error> <J2EE> <BEA-160187> <weblogic.appc failed to compile your application. Recompile with the -verbose option for more details. Please see the error message(s) below.>
    Warning: There are 1 nested errors:
    Warning: weblogic.servlet.internal.dd.compliance.ComplianceException: Element "<ejb-local-ref>" with ejb-ref-name "ali/testejb" must either specify a valid ejb-link element or have a corresponding ejb-reference-descriptor element in weblogic.xml with a valid jndi-name.
    Warning:      at weblogic.servlet.internal.dd.compliance.BaseComplianceChecker.addDescriptorError(BaseComplianceChecker.java:74)
    Warning:      at weblogic.servlet.internal.dd.compliance.BaseComplianceChecker.addDescriptorError(BaseComplianceChecker.java:80)
    Warning:      at weblogic.servlet.internal.dd.compliance.EJBRefsComplianceChecker.validate(EJBRefsComplianceChecker.java:97)
    Warning:      at weblogic.servlet.internal.dd.compliance.EJBRefsComplianceChecker.checkEJBLocalRef(EJBRefsComplianceChecker.java:47)
    Warning:      at weblogic.servlet.internal.dd.compliance.EJBRefsComplianceChecker.check(EJBRefsComplianceChecker.java:39)
    Warning:      at weblogic.servlet.internal.dd.compliance.ComplianceUtils.checkCompliance(ComplianceUtils.java:48)
    Warning:      at weblogic.servlet.jsp.JspcInvoker.checkCompliance(JspcInvoker.java:145)
    Warning:      at weblogic.servlet.jsp.JspcInvoker.compile(JspcInvoker.java:198)
    Warning:      at weblogic.application.compiler.AppcUtils.compileWAR(AppcUtils.java:376)
    Warning:      at weblogic.application.compiler.WARModule.compile(WARModule.java:245)
    Warning:      at weblogic.application.compiler.flow.SingleModuleCompileFlow.proecessModule(SingleModuleCompileFlow.java:18)
    Warning:      at weblogic.application.compiler.flow.SingleModuleFlow.compile(SingleModuleFlow.java:36)
    Warning:      at weblogic.application.compiler.FlowDriver$FlowStateChange.next(FlowDriver.java:69)
    Warning:      at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
    Warning:      at weblogic.application.compiler.FlowDriver.nextState(FlowDriver.java:36)
    Warning:      at weblogic.application.compiler.FlowDriver.run(FlowDriver.java:26)
    Warning:      at weblogic.application.compiler.WARCompiler.compile(WARCompiler.java:29)
    Warning:      at weblogic.application.compiler.flow.AppCompilerFlow.compileInput(AppCompilerFlow.java:112)
    Warning:      at weblogic.application.compiler.flow.AppCompilerFlow.compile(AppCompilerFlow.java:37)
    Warning:      at weblogic.application.compiler.Appc.runBody(Appc.java:198)
    Warning:      at weblogic.utils.compiler.Tool.run(Tool.java:158)
    Warning:      at weblogic.utils.compiler.Tool.run(Tool.java:115)
    Warning:      at weblogic.application.compiler.Appc.main(Appc.java:257)
    Warning:      at weblogic.appc.main(appc.java:14)
    According to the warning messages I wanna add <ejb-link> tag to the web.xml for resolving warnings I add the <ejb-link> like this:
    <ejb-local-ref>
    <ejb-ref-name>ali/testejb</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local>model.AliEJB001Local</local>
    <ejb-link>AliEE1ejb1.jar#AliEJB001Bean </ejb-link>
    </ejb-local-ref>
    But when JDeveloper want deploy my application again it shows me this Error
    [09:29:59 AM] Redeploying Application...
    <May 15, 2011 9:29:59 AM PDT> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1305476999381' for task '7'. Error is: 'weblogic.application.ModuleException: Could not setup environment'
    weblogic.application.ModuleException: Could not setup environment
         at weblogic.servlet.internal.WebAppModule.activateContexts(WebAppModule.java:1499)
         at weblogic.servlet.internal.WebAppModule.activate(WebAppModule.java:442)
         at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:375)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
         at weblogic.application.internal.flow.ModuleStateDriver.activate(ModuleStateDriver.java:95)
         Truncated. see log file for complete stacktrace
    Caused By: weblogic.deployment.EnvironmentException: [J2EE:160101]Error: The ejb-link 'AliEE1ejb1.jar#AliEJB001Bean' declared in the ejb-ref or ejb-local-ref 'ali/testejb' in the application module 'ViewControllerWebApp.war' could not be resolved. The target EJB for the ejb-ref could not be found. Please ensure the link is correct.
         at weblogic.deployment.BaseEnvironmentBuilder.addEJBLinkRef(BaseEnvironmentBuilder.java:464)
         at weblogic.deployment.EnvironmentBuilder.addEJBReferences(EnvironmentBuilder.java:485)
         at weblogic.servlet.internal.CompEnv.activate(CompEnv.java:157)
         at weblogic.servlet.internal.WebAppServletContext.activate(WebAppServletContext.java:3117)
         at weblogic.servlet.internal.WebAppModule.activateContexts(WebAppModule.java:1497)
         Truncated. see log file for complete stacktrace
    >
    <May 15, 2011 9:29:59 AM PDT> <Error> <Deployer> <BEA-149202> <Encountered an exception while attempting to commit the 9 task for the application 'AliEE1'.>
    <May 15, 2011 9:29:59 AM PDT> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating deploy task for application 'AliEE1'.>
    <May 15, 2011 9:29:59 AM PDT> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
    weblogic.application.ModuleException: Could not setup environment
         at weblogic.servlet.internal.WebAppModule.activateContexts(WebAppModule.java:1499)
         at weblogic.servlet.internal.WebAppModule.activate(WebAppModule.java:442)
         at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:375)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
         at weblogic.application.internal.flow.ModuleStateDriver.activate(ModuleStateDriver.java:95)
         Truncated. see log file for complete stacktrace
    Caused By: weblogic.deployment.EnvironmentException: [J2EE:160101]Error: The ejb-link 'AliEE1ejb1.jar#AliEJB001Bean' declared in the ejb-ref or ejb-local-ref 'ali/testejb' in the application module 'ViewControllerWebApp.war' could not be resolved. The target EJB for the ejb-ref could not be found. Please ensure the link is correct.
         at weblogic.deployment.BaseEnvironmentBuilder.addEJBLinkRef(BaseEnvironmentBuilder.java:464)
         at weblogic.deployment.EnvironmentBuilder.addEJBReferences(EnvironmentBuilder.java:485)
         at weblogic.servlet.internal.CompEnv.activate(CompEnv.java:157)
         at weblogic.servlet.internal.WebAppServletContext.activate(WebAppServletContext.java:3117)
         at weblogic.servlet.internal.WebAppModule.activateContexts(WebAppModule.java:1497)
         Truncated. see log file for complete stacktrace
    >
    [09:30:00 AM] #### Deployment incomplete. ####
    [09:30:00 AM] Remote deployment failed
    Do you know how I can solve this issue ?
    thanks

    Thank you so much
    I find out the solution
    I have to define my EJB in ejb-jar.xml like this
    <enterprise-beans>
         <session>
         <ejb-name>ReplicableSFSB2</ejb-name>
         <business-local>model2.AliEJB001Local</business-local>
         <business-remote>model2.AliEJB001</business-remote>
         <ejb-class>model2.AliEJB001Bean</ejb-class>
         <session-type>Stateless</session-type>
         </session>
    </enterprise-beans>
    And then I use the EJB name witch I defined in <ejb-name> tag in <ejb-link> tag of web.xml
    like this
    <ejb-local-ref>
    <ejb-ref-name>ali/testejb2</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local>model2.AliEJB001Local</local>
    <ejb-link>Model2EJB.jar#ReplicableSFSB2</ejb-link>
    </ejb-local-ref>

  • HT201272 You seems not to understand what I mean and what I'm having like problem. I still have my payment recut  from October of this year when I bought 9 songs in the iTunes Store from my iPhone 4S. The problem is from all the 9 songs, 7 are still avail

    You seems not to understand what I mean and what I'm having like problem. I still have my payment receipt  from October of this year when I bought 9 songs in the iTunes Store from my iPhone 4S. The problem is from all the 9 songs I've paid for, only 7 are still available from this list on my iPhone. There is no possibility to download the other 2 without paying for them. I've spoke to the lady from Mississippi on the phone 2 days ago from about 2 hours calling from Belgium but unfortunately she couldn't help me. It's the 3rd time I complain about this. How many time shall I pay for the same songs?? If you can access my music list and my past receipts payment you will be able to find out what I mean. I went back on iTunes I've found the the songs I already downloaded in October that should be on my playlist but if I click on them it will charge me again 0,99 cents. It's been 3 years I've been using the same apple ID with my iPhones. I just wand to get my songs back without having to pay them twice or 3 times

    1. iTunes won't offer cloud downloads for songs that it "thinks" are in your library, even if it "knows" the files are missing. If you've exhaustively searched for the missing files and there is no prospect of repair by restoring to them to their original locations, or connecting to new ones, then delete that tracks that display both the missing exclamation mark and are of media kind Purchased/Protected AAC audio file. Don't hide from iTunes in the cloud when asked, close iTunes, then reopen. You can download from the cloud links or iTunes Store > Quicklinks > Purchased > Music > Not on this computer > All songs > Download all.
    2. Why? Not sure, perhaps 3rd party tools or accidental key presses combined with previously hidden warning messages when trying to organize the library. There is a hint that using the feature to downsample media as it is synced to a device may also be involved, though I've not replicated it. Whatever the reason a backup would protect your media.
    tt2

  • EJB 3.0 - problem with persistence unit.

    Hi everybody, I got this problem I would like you to help me.
    I'm doing a proyect with EJB 3.0 using Netbeans 5.5 and Jboss
    The data source is MySQL.
    When I deploy the proyect, the Jboss Log show me this:
    --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
    ObjectName: persistence.units:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,unitName=DecmoCVLAC-ejbPU
    State: FAILED
    Reason: javax.naming.NameNotFoundException: jdbc not bound
    I Depend On:
    jboss.jca:service=ManagedConnectionFactory,name=jdbc/connectionPool
    Depends On Me:
    jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=NewMessage,service=EJB3
    jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=PersonaEntityFacade,service=EJB3
    [Please help me, I'm kind of new in EJB]
    [ENTIRE JBOSS LOG]
    10:08:37,375 INFO [TomcatDeployer] undeploy, ctxPath=/DecmoCVLAC-war, warUrl=.../tmp/deploy/tmp16823DecmoCVLAC.ear-contents/DecmoCVLAC-war-exp.war/
    10:08:37,515 INFO [EARDeployer] Undeploying J2EE application, destroy step: file:/C:/jboss-4.0.4.GA/server/default/deploy/DecmoCVLAC.ear
    10:08:37,515 INFO [EARDeployer] Undeployed J2EE application: file:/C:/jboss-4.0.4.GA/server/default/deploy/DecmoCVLAC.ear
    10:08:37,546 INFO [EARDeployer] Init J2EE application: file:/C:/jboss-4.0.4.GA/server/default/deploy/DecmoCVLAC.ear
    10:08:39,281 INFO [Ejb3Deployment] EJB3 deployment time took: 47
    10:08:39,296 INFO [JmxKernelAbstraction] installing MBean: persistence.units:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,unitName=DecmoCVLAC-ejbPU with dependencies:
    10:08:39,296 INFO [JmxKernelAbstraction]      jboss.jca:name=jdbc/connectionPool,service=ManagedConnectionFactory
    10:08:39,312 WARN [ServiceController] Problem starting service persistence.units:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,unitName=DecmoCVLAC-ejbPU
    javax.naming.NameNotFoundException: jdbc not bound
    at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
    at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
    at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
    at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
    at javax.naming.InitialContext.lookup(InitialContext.java:351)
    at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:240)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.ejb3.ServiceDelegateWrapper.startService(ServiceDelegateWrapper.java:99)
    at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
    at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
    at sun.reflect.GeneratedMethodAccessor83.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
    at $Proxy0.start(Unknown Source)
    at org.jboss.system.ServiceController.start(ServiceController.java:417)
    at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
    at $Proxy91.start(Unknown Source)
    at org.jboss.ejb3.JmxKernelAbstraction.install(JmxKernelAbstraction.java:82)
    at org.jboss.ejb3.Ejb3Deployment.startPersistenceUnits(Ejb3Deployment.java:626)
    at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:475)
    at org.jboss.ejb3.Ejb3Module.startService(Ejb3Module.java:139)
    at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
    at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
    at sun.reflect.GeneratedMethodAccessor83.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
    at $Proxy0.start(Unknown Source)
    at org.jboss.system.ServiceController.start(ServiceController.java:417)
    at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
    at $Proxy36.start(Unknown Source)
    at org.jboss.ejb3.EJB3Deployer.start(EJB3Deployer.java:449)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
    at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
    at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
    at org.jboss.ws.server.WebServiceDeployer.start(WebServiceDeployer.java:117)
    at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
    at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
    at $Proxy37.start(Unknown Source)
    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:997)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
    at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
    at $Proxy6.deploy(Unknown Source)
    at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
    at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
    at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
    at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
    at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
    10:08:39,812 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=NewMessage,service=EJB3 with dependencies:
    10:08:39,812 INFO [JmxKernelAbstraction]      persistence.units:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,unitName=DecmoCVLAC-ejbPU
    10:08:39,828 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=PersonaEntityFacade,service=EJB3 with dependencies:
    10:08:39,828 INFO [JmxKernelAbstraction]      persistence.units:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,unitName=DecmoCVLAC-ejbPU
    10:08:39,859 INFO [EJB3Deployer] Deployed: file:/C:/jboss-4.0.4.GA/server/default/tmp/deploy/tmp16824DecmoCVLAC.ear-contents/DecmoCVLAC-ejb.jar
    10:08:39,859 INFO [TomcatDeployer] deploy, ctxPath=/DecmoCVLAC-war, warUrl=.../tmp/deploy/tmp16824DecmoCVLAC.ear-contents/DecmoCVLAC-war-exp.war/
    10:08:40,046 INFO [EARDeployer] Started J2EE application: file:/C:/jboss-4.0.4.GA/server/default/deploy/DecmoCVLAC.ear
    10:08:40,062 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
    --- MBeans waiting for other MBeans ---
    ObjectName: persistence.units:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,unitName=DecmoCVLAC-ejbPU
    State: FAILED
    Reason: javax.naming.NameNotFoundException: jdbc not bound
    I Depend On:
    jboss.jca:service=ManagedConnectionFactory,name=jdbc/connectionPool
    Depends On Me:
    jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=NewMessage,service=EJB3
    jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=PersonaEntityFacade,service=EJB3
    ObjectName: jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=NewMessage,service=EJB3
    State: NOTYETINSTALLED
    I Depend On:
    persistence.units:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,unitName=DecmoCVLAC-ejbPU
    ObjectName: jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=PersonaEntityFacade,service=EJB3
    State: NOTYETINSTALLED
    I Depend On:
    persistence.units:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,unitName=DecmoCVLAC-ejbPU
    --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
    ObjectName: persistence.units:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,unitName=DecmoCVLAC-ejbPU
    State: FAILED
    Reason: javax.naming.NameNotFoundException: jdbc not bound
    I Depend On:
    jboss.jca:service=ManagedConnectionFactory,name=jdbc/connectionPool
    Depends On Me:
    jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=NewMessage,service=EJB3
    jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=PersonaEntityFacade,service=EJB3

    Reason: javax.naming.NameNotFoundException: jdbc not bound
    Although i am quite new to this as well i would say that there is a problem with your connection with the database.
    It seems it cannot connect to Mysql.
    have you download the mysql package library and imported it ?
    Also in your deploy folder in you Jboss
    have you altered the jdbc to connect to you database in your dataset ? ( i am not sure about mysql, but postgre reguired this)
    Most probably it would be the same in mysql.
    <connection-url>jdbc:postgresql://127.0.0.1:5432/Dissertation</connection-url>
    Not sure if this is what you reguire, i am new at this my self

  • Integration with Websphere 5.0 (EJB 2.0) problems

    Hello all,
    Although a bit new to JDO, I have been trying to integrate Kodo 2.4 with
    Websphere 5.0 (using EJB 2.0).
    I have been basically binding a PersistenceManagerFactory into JNDI via
    start-up servlet, however got the exception bellow when I tried to create
    PersistenceManagerFactory (in setSessionContext of the EJB).
    <i>JDOFatalInternalException: Could not perform automatic lookup of EJB
    container's javax.transaction.TransactionManager implementation. Please ensure
    that you are running the application from within an <b>EJB 1.1</b> compliant
    EJB container, and then set the
    com.solarmetric.kodo.ee.ManagedRuntimeProperties property to the appropriate
    value to obtain the TransactionManager.</i>
    The reference to EJB 1.1 actually scared me a bit. Does this imply that
    Kodo (2.4) does not support J2EE 1.3?
    Would you know how to set the
    com.solarmetric.kodo.ee.ManagedRuntimeProperties to make it work with WSAD
    5.0?
    Thank you,
    Petr

    Petr-
    Is the integration with Websphere 5.0 application server officially
    supported? Has anobody (that you know of) done it successfully yet?Yes, we do have reports of people using Kodo successfully from within
    Websphere. However, it should be noted that it is not as rigorously
    tested internally at SolarMetric as some other application servers (E.g.,
    JBoss and WebLogic). In short, integration is known to work, but it
    might be a little more rough around the edges than for other application
    servers (as shown in our misspelling of Websphere's TransactionManager
    implementation name).
    How do I tell Kodo to use existing Datasource managed by app server?You can have Kodo use a named DataSource by specifying the
    javax.jdo.option.ConnectionFactoryName property (see
    http://www.solarmetric.com/docs/2.4.0/docs/manual.html#javax.jdo.option.ConnectionFactoryName).
    This is often more appropriate for applications server usage, since it
    allows you to configure pooling and other information from within the
    application server's centralized configuration.
    javax.jdo.option.ConnectionDriverName=COM.ibm.db2.jdbc.app.DB2Driver
    javax.jdo.option.ConnectionURL=jdbc:db2:snetWhat kind of driver is COM.ibm.db2.jdbc.app.DB2Driver? The DB2
    configuration we use for testing with IBM's drivers is:
    javax.jdo.option.ConnectionDriverName=COM.ibm.db2.jdbc.net.DB2Driver
    javax.jdo.option.ConnectionURL=jdbc:db2://SERVER_NAME/DATABASE_NAME
    They shouldn't behave differently (I am guessing that the app driver is
    a type 2 driver or something), but it might be worth a shot to try using
    the net driver. If this fixes the problem, please let us know, because
    it will indicate that Kodo has a deficiency with one of IBM's drivers
    that we should look into resolving.
    Since I have been trying to integrate with App server, this is the
    initialization code that I use to bind PersistenceManagerFactory to JNDI.
    You may find some funny stuff there.The binding code looks fine, and you are obviously able to retrive the
    PM and start persistence operations. Note that you should also be able
    to deploy Kodo as a Resource Adapter (which allows Kodo configuration
    through the centralized Websphere configuration interface). However, I
    doubt this is part of the issue.
    So, in short, I recommend trying the following things:
    1. Using the ConnectionFactoryName to use the DataSource defined for the
    appserver, on the off chance this will fix it.
    2. Using the net driver instead of the app driver.
    3. Seeing if it will work with javax.jdo.option.Optimistic set to false
    If none of these work, please let us know, and we will continue to
    investigate other possible solutions.
    In article <[email protected]>, Petr Bulanek wrote:
    Hello Marc,
    Very good guess. Pretty much the same code worked well without App server.
    In that case, there obviously was no magic related to
    TransactionManagerFactory initialization (see bellow).
    Is the integration with Websphere 5.0 application server officially
    supported? Has anobody (that you know of) done it successfully yet?
    How do I tell Kodo to use existing Datasource managed by app server?
    Here is the basic configuration (URL, class, etc):
    javax.jdo.PersistenceManagerFactoryClass=com.solarmetric.kodo.impl.jdbc.JDBCPersistenceManagerFactory
    javax.jdo.option.ConnectionDriverName=COM.ibm.db2.jdbc.app.DB2Driver
    javax.jdo.option.ConnectionURL=jdbc:db2:snet
    javax.jdo.option.Optimistic=true
    javax.jdo.option.RetainValues=true
    javax.jdo.option.NontransactionalRead=true
    We use DB2 Version 7.2/Version 7.1 FixPak 3 for Windows, in case it helps.
    Since I have been trying to integrate with App server, this is the
    initialization code that I use to bind PersistenceManagerFactory to JNDI.
    You may find some funny stuff there.
    The new EESimpleConfiguration(true) construct seems to (by default) read
    the kodo.properties file that is part of the project.
    EEConfiguration conf = new EESimpleConfiguration(true);
    conf.setManagedRuntimeProperties(\"TransactionManagerMethod=com.ibm.ejs.jts.jta.TransactionManagerFactory.getTransactionManager\");
    conf.setManagedRuntimeClass(\"com.solarmetric.kodo.ee.InvocationManagedRuntime\");
    EEPersistenceManagerFactory pmf =
                        new EEPersistenceManagerFactory(conf);
    InitialContext ic = new InitialContext();
    ic.rebind(\"KodoPMF\", pmf);
    Thank you,
    Petr
    Marc Prud\'hommeaux wrote:
    Petr-
    It looks like DB2 doesn\'t like our attempt to close the connection
    without a rollback or commit. This is odd, since we have never
    seen this happen in our stand-alone DB2 tests. Can you let us know
    the connection details (driver, connectionURL, etc)?
    In the meantime, one possible workaround may be to turn off
    optimistic transactions (since this will cause the PM to
    only use a single Connection); can you try to specify:
    javax.jdo.option.Optimistic=false
    Also, have you tried to run this code in a non-managed environment
    (e.g., outside the application server)? I would be interested
    to know if it is related to running within an appserver.
    In article <[email protected]>, Petr Bulanek wrote:
    Hi Abe,
    Thank you for a speedo reply. You guys really are on the ball!!!
    As you suggested, the
    \\\'com.ibm.ejs.jts.jta.TransactionManagerFactory.getTransactionManager\\\'
    did the job (for others, please note that the proper package name should
    contain \\\'jts.jta\\\', not \\\'jts.jts\\\').
    Unfortunately, I got another problem. When running a method containing
    query (code bellow),
    I get SQLException complaining about \\\'Invalid transaction state\\\'.
    The method that executes the query is a stateless transactional Session
    bean.
    Thank you for your help,
    Petr
    --------------------------- DB2 - transaction state description
    CLI0116E Invalid transaction state.
    Explanation: There was a transaction in progress when SQLDisconnect was
    called.
    User Response: Call SQLTransact before calling SQLDisconnect.
    --------------------------- Exception ------------------------------------
    [2/01/03 16:34:19:050 EST] 563ddb8a SQL I
    com.solarmetric.kodo.impl.jdbc.SQL [ C:336042896; T:1446894474;
    D:118283149 ] preparing statement <369367952>: SELECT DISTINCT
    PARENTX.JDOCLASSX FROM PARENTX
    [2/01/03 16:34:19:050 EST] 563ddb8a SQL I
    com.solarmetric.kodo.impl.jdbc.SQL [ C:336042896; T:1446894474;
    D:118283149 ] executing statement <369367952>: [reused=1;params={}]
    [2/01/03 16:34:19:061 EST] 563ddb8a JDBC I
    com.solarmetric.kodo.impl.jdbc.JDBC [ C:336042896; T:1446894474;
    D:118283149 ] close:
    com.solarmetric.datasource.PoolConnection@14079b90[[requests=6;size=6;max=70;hits=0;created=6;redundant=0;overflow=0;new=6;leaked=0;unavailable=0]]
    [2/01/03 16:34:19:061 EST] 563ddb8a JDBC I
    com.solarmetric.kodo.impl.jdbc.JDBC [ C:336042896; T:1446894474;
    D:118283149 ] close connection
    [2/01/03 16:34:19:061 EST] 563ddb8a JDBC W
    com.solarmetric.kodo.impl.jdbc.JDBC [ C:null; T:1446894474; D:118283149 ]
    exception when closing connection
    [2/01/03 16:34:19:541 EST] 563ddb8a JDBC W
    com.solarmetric.kodo.impl.jdbc.JDBC TRAS0014I: The following exception
    was logged COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver] CLI0116E
    Invalid transaction state. SQLSTATE=25000
    atcom.solarmetric.datasource.ConnectionWrapper.close(ConnectionWrapper.java:243)
    atcom.solarmetric.datasource.DataSourceImpl$AbstractPool.close(DataSourceImpl.java:690)
    atcom.solarmetric.datasource.DataSourceImpl.close(DataSourceImpl.java:373)
    atcom.solarmetric.datasource.DataSourceImpl.close(DataSourceImpl.java:347)
    at com.solarmetric.datasource.PoolConnection.close(PoolConnection.java:70)
    atcom.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.close(SQLExecutionManagerImpl.java:885)
    atcom.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.release(JDBCStoreManager.java:654)
    atcom.solarmetric.kodo.impl.jdbc.ormapping.SubclassProviderImpl.getSubclasses(SubclassProviderImpl.java:274)
    atcom.solarmetric.kodo.impl.jdbc.ormapping.ClassMapping.addSubclassConditions(ClassMapping.java:1239)
    atcom.solarmetric.kodo.impl.jdbc.ormapping.ClassMapping.selectPrimaryMappings(ClassMapping.java:1218)
    atcom.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.executeQuery(JDBCStoreManager.java:717)
    atcom.solarmetric.kodo.impl.jdbc.runtime.JDBCQuery.executeQuery(JDBCQuery.java:92)
    at com.solarmetric.kodo.query.QueryImpl.executeWithMap(QueryImpl.java:792)
    atcom.solarmetric.kodo.query.QueryImpl.executeWithArray(QueryImpl.java:668)
    at com.solarmetric.kodo.query.QueryImpl.execute(QueryImpl.java:609)
    at com.testkodo.ejb.ControllerBean.observeHumans(ControllerBean.java:66)
    --------------------------- Failing code sample
    try {
                   PersistenceManager pm = factory.getPersistenceManager();
                   Extent ex = pm.getExtent(Parent.class, false);
                   Query q = pm.newQuery(ex, \\\"name==parName\\\");
                   q.declareParameters(\\\"String parName\\\");
                   Collection col = (Collection) q.execute(\\\"James\\\");
                   Iterator iter = col.iterator();
                   Parent pp;
                   Collection ch;
                   while (iter.hasNext()) {
                        pp = (Parent) iter.next();
                        System.out.println(pp);
                        ch = pp.getChildren();
                        Iterator it= ch.iterator();
                        while (it.hasNext()) {
                             System.out.println(it.next());
                   q.closeAll();
                   pm.close();
              } catch (Exception e) {
                   System.out.println(e);
                   throw new EJBException(e);
    Abe White wrote:
    The reference to EJB 1.1 actually scared me a bit. Does this imply that
    Kodo (2.4) does not support J2EE 1.3?
    EJB 2.0 is also supported. Sorry for the confusing error message.
    Would you know how to set the
    com.solarmetric.kodo.ee.ManagedRuntimeProperties to make it work with
    WSAD
    5.0?
    Try these settings:
    com.solarmetric.kodo.ee.ManagedRuntimeClass=\\\\
         com.solarmetric.kodo.ee.InvocationManagedRuntime
    com.solarmetric.kodo.ee.ManagedRuntimeProperties=\\\\
         TransactionManagerMethod=\\\\
         com.ibm.ejs.jts.jts.TransactionManagerFactory.getTransactionManager
    Marc Prud\'hommeaux [email protected]
    SolarMetric Inc. http://www.solarmetric.com

  • EJB 2.0 problem

    Hi,
    I�m using WSAD to develop a session bean that interact�s with a CMP bean, but when i try to create a new ejbCreate() method, with any parameter(Ex:Integer or anyone), the WSAD comes with an error that dosen�t make sense:
    "This method must be the create() method(EJB 2.0: 7.8,7.10.6)"
    I have a method ejbCreate() with no parameters, i don�t use it but ok, but the problem is that it compiles but when i try t execute my create() it throws a MarshalException.
    It�s a bug that comes with WebSphere???
    I read the specs of EJB 2.0 it told me nothing that i haven�t tried.
    please help.
    cheers

    change deployment descriptor file like this
    <session-type>Stateful</session-type>
    then hope your problem will solve.

  • Deployment Plan / weblogic-ejb-jar.xml:  Problem

    Hello,
    I am trying to use a deployment plan to override the principal name in the weblogic-ejb-jar.xml.
    The deployment-plan looks like this (showing only the important sections)
    <variable-definition>
    <variable>
    <name>SecurityRoleAssignment_ejbRole_PrincipalNames_1</name>
    <value>MY PRINCIPAL 1</value>
    </variable>
    </variable-definition>
    <variable-assignment>
    <name>SecurityRoleAssignment_ejbRole_PrincipalNames_1</name>
    <xpath>/weblogic-ejb-jar/security-role-assignment/[role-name="View-Role"]/externally-defined</xpath>
    <operation>replace</operation>
    </variable-assignment>
    The security-role assignment in the weblogic-ejb-jar.xml looks like this:
    <security-role-assignment>
    <role-name>View-Role</role-name>
         <externally-defined/>
    </security-role-assignment>
    I 've tried to override the element-value of <externally-defined> (a valid tag in the weblogic-ejb-jar.xml ) with help of a deployment-plan.
    When trying to deploy my application (which is organised in the directory-structure: inst_dir/APP inst_dir/PLAN
    the following error occurs:
    VALIDATION PROBLEMS WERE FOUND problem: cvc-complex-type.2.4a: Expected element 'principal-name@http://www.bea.com/ns/weblogic/10.0' instead of 'externally-defined@http://www.bea.com/ns/weblogic/10.0' here in element security-role-assignment@http://www.bea.com/ns/weblogic/10.0:
    This has surprised me, as externally-defined is (according to the documentation) a valid tag.
    I have tried to replace <externally-defined> with an empty <principal-name> tag (which works fine when deploying the application), but causes a security exception, when trying to use the EJB.
    Has anybody an idea if there is a workaround for this problem?
    IMHO the Validatio Problem is not justified at this place then why should an otherwise valid weblogic-ejb-jar.xml (when not using a deployment-plan) suddenly become invalid when a deployment plan is used?
    Thanx a lot in advance!
    Edited by: user10672779 on 02.12.2008 04:09

    Hi again,
    I tried it with the weblogic 10 Namespace Declaration but got then this error:
    failed to load java type corresponding to e=weblogic-ejb-jar@http://www.bea.com/ns/weblogic/weblogic-ejb-jar/1.0/weblogic-ejb-jar.xsd
    and following Exception:
    <02.12.2008 20.00 Uhr CET> <Error> <J2EE> <BEA-160197> <Unable to load descriptor D:\exportapps\tb.ear\app\tb_flowcontrol.jar/META-INF/weblogic-ejb-jar.xml of module tb_flowcontrol.jar. The error is weblogic.descriptor.DescriptorException: Unmarshaller failed
    at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:152)
    at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:292)
    at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:260)
    at weblogic.application.descriptor.AbstractDescriptorLoader2.getDescriptorBeanFromReader(AbstractDescriptorLoader2.java:774)
    at weblogic.application.descriptor.AbstractDescriptorLoader2.createDescriptorBean(AbstractDescriptorLoader2.java:395)
    at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBeanWithoutPlan(AbstractDescriptorLoader2.java:745)
    Caused by: com.bea.xml.XmlException: failed to load java type corresponding to e=weblogic-ejb-jar@http://www.bea.com/ns/weblogic/weblogic-ejb-jar/1.0/weblogic-ejb-jar.xsd
    at com.bea.staxb.runtime.internal.UnmarshalResult.getPojoBindingType(UnmarshalResult.java:329)
    at com.bea.staxb.runtime.internal.UnmarshalResult.determineTypeForGlobalElement(UnmarshalResult.java:296)
    at com.bea.staxb.runtime.internal.UnmarshalResult.determineTypeForGlobalElement(UnmarshalResult.java:306)
    at com.bea.staxb.runtime.internal.UnmarshalResult.determineRootType(UnmarshalResult.java:287)
    at com.bea.staxb.runtime.internal.UnmarshalResult.unmarshalDocument(UnmarshalResult.java:153)
    at com.bea.staxb.runtime.internal.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:65)
    at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:141)
    Searching the net couldn't supply me with another answer as to use the 90 Namespace Declaration again...
    I think I forgot to mention I am using an exploded directory.
    This all seems very strange.
    cheers.

  • A J2EE problem from an International Bank EJB-RDB remapping problem

    Background Information:
    We are going to deploy a J2EE project with DB2 V7.1 as the backend database server. However, the project is developed using WSED and initially assumed DB2 V.8 will be used as the database server. The inconsistency of DB2 version have us to make some amendments on the project. To simplify the scenario, what we do is to truncate the table/column name with length >18 to 18 defined in all .tblxmi, ... for EJB-RDB mapping. After we rebuild the project and deploy it in WAS 5.1, the following error occured,
    CNTR0020E: Non-application exception occurred while processing method "populateSystemCache" on bean "BeanId(eFOSt
    0#eFOS-Session.jar#SystemService, null)". Exception data: javax.ejb.TransactionRolledbackLocalException: ; nested exception is: com
    .ibm.db2.jcc.DB2SQLException: DB2JDBCCursor Received Error in Method prepare:SQLCODE==> -107 SQLSTATE ==> 42622 Error Tokens ==> <<D
    B2 7.1 SQLJ/JDBC>> "ACTUAL_MONTH_END_DATE" 18
    com.ibm.db2.jcc.DB2SQLException: DB2JDBCCursor Received Error in Method prepare:SQLCODE==> -107 SQLSTATE ==> 42622 Error Tokens ==>
    <<DB2 7.1 SQLJ/JDBC>> "ACTUAL_MONTH_END_DATE" 18
    at COM.ibm.db2os390.sqlj.jdbc.DB2SQLJJDBCCursor.setError(DB2SQLJJDBCCursor.java:1232)
    at COM.ibm.db2os390.sqlj.jdbc.DB2SQLJJDBCSection.prepare(DB2SQLJJDBCSection.java:767)
    at COM.ibm.db2os390.sqlj.jdbc.DB2SQLJConnection.prepareStatement(DB2SQLJConnection.java:1470)
    at COM.ibm.db2os390.sqlj.jdbc.DB2SQLJConnection.prepareStatement(DB2SQLJConnection.java:1580)
    We are sure that we have made all the necessary truncations for the table/column. We discovered that some of the .class file, e.g. SystemBeanFunctionSet_71684028.class, was generated under the directory ../websphere_deploy/DB2UDBOS390_V71_1 after we rebuild the project. Many column names with length >18 were found there, such as ACTUAL_MONTH_END_DATE.
    PreparedStatement pstmt = null;
    try
    pstmt = prepareStatement(connection, "INSERT INTO FAK.SYSTEM (SYSTEM_CODE, ACTIVE_FLAG, SYSTEM_NAME, BUSINESS_DATE, LAST_BUSINESS_DATE, NEXT_BUSINESS_DATE, REGION_CODE, MONTH_FLAG, ACTUAL_MONTH_END_DATE, LOCAL_COMPANY_CODE, LOCAL_BRANCH_CODE, LOCAL_COUNTRY_CODE, LOCAL_CURRENCY_CODE, FUNDING_CURRENCY_CODE) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
    String tempString = (String)inputRecord.get(0);
    May I know what those .class file (with number prefix in the file name)for and how can we solve the problem?
    Thanks a lot

    Put it simply, is there any method using WSED to
    deploy the project using DB2 V.7.2 if the project is
    assembled using DB2 V8 and no java source is
    available ???If you are not making use of any functions specific to DB2 V8 how does it matter for you? The difference only lies in the DataSource configuration or something like that but certainly not on your java code(If you have not done anything specific to V8).Your problem sounds me like as suggested you have an extra/lesser parameters(?) or checkout the parameter that you are passing in is not overflowing any columns.

  • WebLogic 6.1 SP2 stateful EJB handle serialization problem

    I try to serialize and later deserialize the handle of a stateful
    session bean in WebLogic 6.1 SP2. This works on the client, but not on
    the server. In WebLogic 6.1 SP1, it worked on both server and client.
    The test code:
    try {
    InitialContext context = new InitialContext();
    InfSessionHome sessionHome = (InfSessionHome)
    InfEJBUtil.getInfEJBHome
    (context, InfJNDINames.INFSESSION_EJBHOME,
    InfSessionHome.class);
    infSession1 = sessionHome.create();
    // serialize
    ObjectOutputStream objector = new ObjectOutputStream(byteStream);
    objector.writeObject(infSession1.getHandle());
    objector.flush();
    objector.close();
    byte[] ejbKeyBytes = byteStream.toByteArray();
    // deserialize
    ByteArrayInputStream byteInStream = new
    ByteArrayInputStream(ejbKeyBytes);
    ObjectInputStream objStream = new ObjectInputStream(byteInStream);
    Handle ejbHandle = (Handle) objStream.readObject();
    objStream.close();
    InfSession infSession2 = (InfSession) ejbHandle.getEJBObject();
    if (!infSession2.equals(infSession1)) {
    throw new IllegalStateException("not equal: " + infSession2);
    } catch (Exception e) {
    e.printStackTrace();
    I get the following stack trace in the readObject() call:
    java.io.InvalidClassException:
    weblogic.rmi.internal.LocalServerRefMissing no-arg constructor for
    class
    at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1221)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
    at java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java:2263)
    at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:519)
    at weblogic.rmi.internal.StubInfo.readObject(StubInfo.java:73)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.io.ObjectInputStream.invokeObjectReader(ObjectInputStream.java:2214)
    at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1411)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
    at weblogic.ejb20.internal.HandleImpl.readExternal(HandleImpl.java:89)
    at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1212)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
    I suppose that WebLogic uses a different handle on the server
    (LocalServerRef class, handle local to it's EJB) than on the client.
    I took the routine from Apache SOAP 2.2 StatefulEJBProvider. So I
    suppose that more people are running into the same problem.
    Does anybody know of a workaround?
    Tom

    Just a small addition/clarification to what Cameron said on serialization.
    - The no argument constructor is required in the first non-serializable class in the object hierarchy for de-serialization process. If your class extends form Object class(which has a no arg constructor), you need not have a no-arg constructor. refere to http://64.49.216.133/faq/view.jsp?EID=251942 for more details.
    - Also I suggest using the api
    isIdentical(...)
    instead of equals method in the code if you are trying to establish whether the two objects represent the same EJBObject or not
    - Rajeev
    Cameron Purdy <[email protected]> wrote in message news:[email protected]...
    A no-argument constructor is required for a class to be deserialized. It
    sounds like a BEA bug from the stack trace, but make sure you don't have
    something extra that you are serializing on something of yours that should
    be transient. (It's hard to imagine how, but you never know ...)
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    Clustering Weblogic? You're either using Coherence, or you should be!
    Download a Tangosol Coherence eval today at http://www.tangosol.com/
    "Tom Gerber" <[email protected]> wrote in message
    news:[email protected]...
    I try to serialize and later deserialize the handle of a stateful
    session bean in WebLogic 6.1 SP2. This works on the client, but not on
    the server. In WebLogic 6.1 SP1, it worked on both server and client.
    The test code:
    try {
    InitialContext context = new InitialContext();
    InfSessionHome sessionHome = (InfSessionHome)
    InfEJBUtil.getInfEJBHome
    (context, InfJNDINames.INFSESSION_EJBHOME,
    InfSessionHome.class);
    infSession1 = sessionHome.create();
    // serialize
    ObjectOutputStream objector = new ObjectOutputStream(byteStream);
    objector.writeObject(infSession1.getHandle());
    objector.flush();
    objector.close();
    byte[] ejbKeyBytes = byteStream.toByteArray();
    // deserialize
    ByteArrayInputStream byteInStream = new
    ByteArrayInputStream(ejbKeyBytes);
    ObjectInputStream objStream = new ObjectInputStream(byteInStream);
    Handle ejbHandle = (Handle) objStream.readObject();
    objStream.close();
    InfSession infSession2 = (InfSession) ejbHandle.getEJBObject();
    if (!infSession2.equals(infSession1)) {
    throw new IllegalStateException("not equal: " + infSession2);
    } catch (Exception e) {
    e.printStackTrace();
    I get the following stack trace in the readObject() call:
    java.io.InvalidClassException:
    weblogic.rmi.internal.LocalServerRefMissing no-arg constructor for
    class
    atjava.io.ObjectInputStream.inputObject(ObjectInputStream.java:1221)
    atjava.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
    atjava.io.ObjectInputStream.inputClassFields(ObjectInputStream.java:2263)
    atjava.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:519)
    at weblogic.rmi.internal.StubInfo.readObject(StubInfo.java:73)
    at java.lang.reflect.Method.invoke(Native Method)
    atjava.io.ObjectInputStream.invokeObjectReader(ObjectInputStream.java:2214)
    atjava.io.ObjectInputStream.inputObject(ObjectInputStream.java:1411)
    atjava.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
    atjava.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
    atweblogic.ejb20.internal.HandleImpl.readExternal(HandleImpl.java:89)
    atjava.io.ObjectInputStream.inputObject(ObjectInputStream.java:1212)
    atjava.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
    atjava.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
    I suppose that WebLogic uses a different handle on the server
    (LocalServerRef class, handle local to it's EJB) than on the client.
    I took the routine from Apache SOAP 2.2 StatefulEJBProvider. So I
    suppose that more people are running into the same problem.
    Does anybody know of a workaround?
    Tom
    [att1.html]

  • EJB 3.0 - problem reading request parameters

    I'm looking at Spring and TopLink integration and deploying with the EJB 3.0 version. I ran into problems when trying to retrieve a parameter from a request. Since I could not see anything wrong, I deployed with Tomcat and the code executed correctly.
    The simple case below illustrates the problem:
    <%@ page session="false"%>
    <%@ taglib uri="http://jakarta.apache.org/taglibs/request-1.0" prefix="req" %>
    <html>
    <head>
    <title>PetClinic :: a Spring Framework demonstration</title>
    </head>
    <body>
    The ID parameter is: <req:parameter name="id"/>
    </body>
    </html>
    Running with http://localhost:8080/sto12/welcomeURL.htm?id=foo causes foo to be displayed in Tomcat but not in OC4J EJB 3.0. Why is this?
    Thanks
    Mike

    Sorry, I tried to submit the problem in a simplified form and I can see I've just made it more confusing. Let me try again.
    Spring ships with a Petclinic sample. The Spring Toplink integration work has provided new classes that allow the Petclinic example to be deployed using Toplink as the object relational mapping. I have it running using Tomcat, but have had problems using OC4J EJB 3.0.
    In the sample app, there is a JSP that allows surname to be entered, which then calls code to search for Owners with a match on surname. That code treats no matches, one match and many matches differently.
    In the case of no matches, the JSP simply displays a message saying no matches found. In the case of many matches, it uses another JSP to display a list of Owners, from which the desired one is selected. The selected one is then displayed by a further JSP on which updates can be made. Where only one match with surname is found, the selection JSP is bypassed.
    Behind the scenes when obtaining the list of matching Owners, the Toplink code simply obtains a list. When one is selected, a further Toplink access is used which returns the selected Owner by reading via the primary key selected from the list. The essence of the problem is that there is a single piece of code in the sample that makes the Toplink call to read by primary key. When called in one scenario, it works, in the other it does not.
    Where that code is invoked as a result of the user selecting from a list, it is the JSP POSTing the selected Owner that transmits the primary key to the code. The code obtains the key from the request and everything works fine.
    Where only one Owner is found, a redirect is done with the key added as a parameter. When the same code as above attempts the retrieve the key, it is unable to do so ie it returns null and the subsequent Toplink call fails.
    Since the above obscures the problem, I played around with two of the JSPs provided - welcome.jsp and index.jsp. In the sample, index.jsp is included in the web.xml under <welcome-file-list> and hence is used when the app is started. It simply redirects to welcome.jsp. (I believe the reason is that all requests go via the Spring DispatcherServlet and are forwarded to the appropriate JSP depending on configuration - hence the comment that they are "virtual").
    When I put code in the index.jsp to display an id parameter and start it with an id provided, it displays the id parameter. When I let the index.jsp simply redirect to welcome.jsp (with an id included and welcome.jsp changed to display the value)it does not display the value.
    I'm sorry this has become a long post. The gist seems to be that I can't extract parameters from requests that have been redirected. As I said at the top of this note, this is not the case with Tomcat - I can run the same code there and retrieve parameters from a request, whether it has been redirected or not. I've posted in this forum because I believe the problem is with OC4J not with Spring or Toplink. I could be wrong.
    Any suggestions are very welcome.
    Mike

  • JDBC, JMS and EJB transactions - possible problem?

    Hello,
              I am using Oracle 9, Weblogic 8.1 SP 4, MyEclipse and
              XDoclet.
              In my current project I have the following piece of code
              in one of my message driven beans (code cited as pseudocode
              without unnecessary details):
              * @ejb.bean name="MyMessageProcessor"
              * display-name="Display name for a MyMessageProcessor"
              * jndi-name="ejb/MyMessageProcessor"
              * description="Bean MyMessageProcessor"
              * destination-type="javax.jms.Queue"
              * transaction-type="Container"
              * acknowledge-mode="Auto-acknowledge"
              * subscription-durability="Durable"
              * generate="false"
              * @ejb.transaction type="Required"
              public class MyMessageProcessor implements MessageDrivenBean, MessageListener {
              public void onMessage(Message msg) {
                   try {
                        //obtaining connections to two different databases via JNDi
                        java.sql.Connection connOne =
                        ((DataSource)ctx.lookup("DataSourceOne")).getConnection();          
                        java.sql.Connection connTwo =
                             ((DataSource)ctx.lookup("DataSourceTwo")).getConnection();
                        // performing some UPDATEs and INSERTs on connOne and connTwo
                        // calling some other methods of this bean
                        //creating the reply JMS message and sending it to another JMS queue
                        Message msgTwo = this.createReplyMessage(msg)
                        this.queueSender.send(msgTwo);
                        //commiting everything
                        this.queueSession.commit();          
                   } catch (Exception ex) {
                   try {
                        if (this.queueSession!=null) this.queueSession.rollback();
                   } catch (JMSException JMSEx) {};     
                   this.context.setRollbackOnly();
              Some days ago (before the final remarks from my client) there used to be only one DataSource configurated on the basis of the
              connection pool with non-XA jdbc driver. Everything worked fine
              including the transactions (if anything wrong happend not only wasn't the replymessage sent, but also no changes were written
              to database and the incomming message was thrown back to the my bean's
              queue).
              When I deployed the second DataSource I was informed by an error message, that only one non-transactional resource may
              participate in a global transaction. When I changed both datasources
              to depend on underlying datasources with transatcional (XA) jdbc drivers, everything stopped working. Even if
              EJB transaction was theoretically successfully rolledbacked, the changed were written to the database
              and the JMS message wasn't resent to the JMS queue.
              So here are my questions:
                   1. How to configure connection pools to work in such situations? What JDBC drivers should I choose?
                   Are there any global server configurations, which may influence this situation?
                   2. Which jdbc drivers should I choose so that the container was able to rollback the database transactions
                   (of course, if necessary)?
                   3. Are there any JMS Queue settings, which would disable the container to send message back to the
                   queue in case of setRollbackOnly()? How should be the Queue configurated?
              As I am new to the topic and the deadline for the project seems to be too close I would be grateful
              for any help.
              This message was sent to EJB list and JDBC list.
              Sincerely yours,
              Marcin Zakidalski

    Hi,
              I found these information extremely useful and helpful.
              The seperate transaction for sending messages was, of course, unintentional. Thanks a lot.
              Anyway, I still have some problems. I have made some changes to the
              code cited in my previous mail. These changes included changing QueueSessions
              to non-transactional. I also set the "Honorate global transactions" to true.
              I am using XA JDBC driver. After setting "Enable local transactions" to false
              (I did it, because I assume that JDBC transactions should be part on the global
              EJB transaction) I got the following error:
              java.sql.SQLException: SQL operations are not allowed with no global transaction by default for XA drivers. If the XA
              driver supports performing SQL operations with no global transaction, explicitly allow it by setting
              "SupportsLocalTransaction" JDBC connection pool property to true. In this case, also remember to complete the local
              transaction before using the connection again for global transaction, else a XAER_OUTSIDE XAException may result. To
              complete a local transaction, you can either set auto commit to true or call Connection.commit() or Connection.rollback().
              I have also inspected the calls of methods of bean inside of onMessage() method just to check, whether
              the transactions are correctly initialized (using the weblogic.transaction.Transaction class).
              My questions are as follows:
              1. Any suggestions how to solve it? I have gone through the google answers on that problem and only
              thing I managed to realize that JDBC must start its own transaction. Is there any way to prohibit it
              from doing that? Can using setAutocommit(true/false) change the situation for better?
              2. How to encourage the JDBC driver to be a part of EJB transaction?
              3. As I have noticed each of ejb method has its own transactions (transactions have different
              Xid). Each method of the bean has "required" transaction attribute. Shouldn't it work in such
              way that if already started transaction exists it is used by the called method?
              4. The DataSources are obtained in my application via JNDI and in the destination environment I will have slight
              impact on the configuration of WebLogic. What is least problematic and most common WebLogic configuration which would
              enable JDBC driver to participate in the EJB transaction? Is it the WebLogic configuration problem or can it be
              solved programmically?
              Currently my module works quite fine when "enable local transactions" for DataSources is set to true, but this way
              I am loosing the ability to perform all actions in one transaction.
              Any suggestions / hints are more than welcomed. This message was posted to jdbc list and ejb list.
              Marcin

  • Motion Artifacts or 3D like Problem in CS4!

    Hello!
    I have just noticed this strange footage in my timeline as the camera pans or the object in focus moves. The footage have got some edges or kind of shadows which follows behind like 3D footage without glasses or ghosting when the camera pans. This is not good for the eye when you watch it, and it just doesn't look right. Overall there is no smooth fluid motion in this footage where there is movement in the scene.
    Original footage was recorded with a Canon XH A1 HDV 50i as I am in PAL region. I captured this footage using the camera's downconvert feature to SD. After capturing I purchased a Matrox RT X2 which I then used for multicam multiple monitors display. When I edited this footage with my client I didn't see this at all, and since it was a multicam project we had to cut between the cameras first then a second pass for refining and adding titles and transitions. All the editing was done as Matrox SD sequence. However when I played back the DVD thats when I noticed this strange motion artifacts in the footage. This is earlier in the year before the release of CS5.
    I revisited the project because the client now wants more copies of the DVD. Although they didn't complain with this DVD I just thought I should correct the problem. The DVD is just 1hr 30 mins, so its not DVD compression here. This happens in the first half an hour of the DVD and then after that everything else plays smoothly and fluidly.Now the problem is that the footage in the Matrox sequence plays with the motion artifacts and it has a red line bar without any single effects. The othe footage does not have a red bar. But if I play it in the source monitor there is no such problem. This is happening on 3 out of the 8 tapes recorded on that event, and the tapes were recorded by one camera.
    I have tried creating an Adobe PAL project but I cannot actually see as I haven't connected my preview monitor from my PC GPU! Still this SD footage have got a red line bar when in Adobe sequence. This includes even the footage that plays well.
    Is this the matrox sequence causing this and if so how can I get rid of this problem without having to start editing from scratch!
    SYSTEM
    HP XW6600 Vista Biz 64
    Xeon Quad 2.83Ghz
    22GB RAM
    GTX285 GPU (2GB)
    PP CS4
    RAID 0 for Source Files
    Matrox RT X2
    LG 22" monitor
    Samsung 24" monitor

    I wonder if this is a Field Reversal issue, as Matrox flips things around from regular DVD. That would be the first place that I would check.
    Does this footage work in a non-Matrox Project?
    Good luck,
    Hunt

  • Sun ejb tutorial compilation problem with sample code

    I have been trying to follow the ejb tutorial off of Sun's web site. However, I get the following problem when I try to compile the sample code.
    prompt>javac Demo.java
    works fine
    Prompt>javac DemoBean.java
    works fine
    Prompt>javac DemoHome.java
    DemoHome.java:23: cannot resolve symbol
    symbol : class Demo
    location: interface ejb.demo.DemoHome
    public Demo create() throws CreateException, RemoteException;
    ^
    1 error
    Prompt>
    Can anyone help me out as I have tried several books which conveniently skip the part about compiling errors.
    I noticed I don't have a CLASSPATH variable and then i created one with just '.' in it and that didn't work. any help would be appreciated as this is driving me crazy. Thanks.

    try to change the order of the exception.
    first RemoteException and then CreateException

  • Adf ejb jpa persistance problem

    Hi everyone,
    I`m a newbie to adf technology.
    I was trying Build a Web Application with JDeveloper 11g Using EJB, JPA, and JavaServer Faces tutorial
    ([http://www.oracle.com/technology/obe/obe11jdev/11/ejb/ejb.html])
    I have a problem when I try to run it.
    It says;
    javax.ejb.EJBException: EJB Exception: ; nested exception is:
    Exception [EclipseLink-4002|http://forums.oracle.com/forums/] (Eclipse Persistence Services - 1.0.1 (Build 20080905)): org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: java.sql.SQLSyntaxErrorException: ORA-00904: "EMAİL": ge&ccedil;ersiz belirleyici (invalid identifier)
    I thing it`s becouse I use a turkish operating system.
    I tried to change the encoding settings to windows1252 intead of windows 1254 but same problem occures.
    It makes the column EMAIL to EMAİL
    Could you please help me abpout this problem?

    Hi,
    can you print out the value that is received in the session facde to see where the conversion happens?
    Frank

  • EJB QL LIKE Operator

    Hello,
    I want to perform search by keyword on all fields of a table. Say I have a product table with following fields:
    Field Name Data Type
    ProductNo Integer
    ProductName String
    Brand String
    UnitPrice Double
    SupCode Integer
    I cannot use LIKE operator as follows:
    "SELECT OBJECT(p) FROM Product AS p WHERE p.productName LIKE ?1 or p.supCode LIKE ?1 or p.partNo LIKE ?1 p.brand LIKE ?1 or p.unitPrice LIKE ?1 ORDER BY p.productName ASC"
    This throws error as LIKE operator expects String fields only. Is there any way I can use LIKE operator or any other way to search by keywords on all field of any data type using EJB QL.

    Hi Muerrtu,
    I'm assuming you're using an implementation of J2EE 1.3, and thus EJB 2.0. EJB 2.1 (J2EE 1.4) added support for an input parameter with the LIKE clause.
    --ken
    Kenneth Saks
    J2EE SDK Team
    SUN Microsystems

Maybe you are looking for

  • Processor and Graphics Card Upgrade For HP ProBook 4445s

    Hey guys, I wanted to ask that  I have a HP4445s with the A6 4400m processor and don't find it enough to play games. The processor is a little bit slow and the graphics are kind of horrible for a gamer. I feel like upgrading to a new processor. The o

  • How do you rotate one page at a time?

    When I choose Rotate View - Clockwise, it rotates the whole document. I want to rotate one page at a time. Thanks Ray Adobe Reader for Mac, 8.12

  • Log4j error while deploying EJB 3.0 in weblogic 10

    Hi Friends, I am migrating an application EJB from 2.0 to 3.0 annotations. The log4j-1.2.3 for the project is configured in this way, it is added to the startWeblogic.cmd in weblogic 10 as : set JAVA_OPTIONS=%JAVA_OPTIONS% -Dlog4j.configuration=log4j

  • Changed my Virgin to Sky, now I can't see my Shared Drive. Why?

    Hello Got a Seagate Central as my shared wireless drive. Worked fine until we got rid of Virgin and replaced with Sky. Now I can't see the Shared Drive wirelessly. Only works when I connect via Ethernet. What am I doing wrong please?

  • Library consolidation from PC to Mac

    I have a itunes library on a PC formated EHD that I would like to transfer and combine to my Macbooks library (music and movies) how do I do this or ultimately how can I get the content from both computers libraries onto my iphone that can only synch