[EJB/JBoss] - DB2/AS400 select statements not getting generated properly
by pfloyd
I am using jboss 3.2.3, DB2 on AS400. I wrote a simple entity bean. I setup all the necessary xml files and I am able to connect to the database via jboss. When I invoke the findAll method (implemented by the container), I get an exception from the DB because the statement is not getting generated properly. If you notice, after the SELECT, there is two spaces. Shouldn't it be SELECT * .... instead. As soon as the DB sees the spaces, it thinks it has hit the end of statement. Any help is appreciated.
Thanks
Here is the exception,
2006-07-20 11:57:28,059 INFO [STDOUT] Thu Jul 20 11:57:28 MDT 2006 as400: PreparedStatement STMT0001 (20574010) : Preparing [SELECT FROM LKUP_ACCT_CLSS].
2006-07-20 11:57:28,091 INFO [STDOUT] Thu Jul 20 11:57:28 MDT 2006 as400: static method Connection DEN9 (23370522) : Throwing exception, id: 1 error class: 1 return code: -104 reason: [SQL0104] Token <END-OF-STATEMENT> was not valid. Valid tokens: , FROM INTO. Cause . . . . . : A syntax error was detected at token <END-OF-STATEMENT>. Token <END-OF-STATEMENT> is not a valid token. A partial list of valid tokens is , FROM INTO. This list assumes that the statement is correct up to the token. The error may be earlier in the statement, but the syntax of the statement appears to be valid up to this point. Recovery . . . : Do one or more of the following and try the request again: -- Verify the SQL statement in the area of the token <END-OF-STATEMENT>. Correct the statement. The error could be a missing comma or quotation mark, it could be a misspelled word, or it could be related to the order of clauses. -- If the error token is <END-OF-STATEMENT>, correct the SQL statement because it does not end with a valid clause. state: 42601.java.sql.SQLException: [SQL0104] Token <END-OF-STATEMENT> was not valid. Valid tokens: , FROM INTO. Cause . . . . . : A syntax error was detected at token <END-OF-STATEMENT>. Token <END-OF-STATEMENT> is not a valid token. A partial list of valid tokens is , FROM INTO. This list assumes that the statement is correct up to the token. The error may be earlier in the statement, but the syntax of the statement appears to be valid up to this point. Recovery . . . : Do one or more of the following and try the request again: -- Verify the SQL statement in the area of the token <END-OF-STATEMENT>. Correct the statement. The error could be a missing comma or quotation mark, it could be a misspelled word, or it could be related to the order of clauses. -- If the error token is <END-OF-STATEMENT>, correct the SQL statement because it does not end with a valid clause.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3959662#3959662
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3959662
19 years, 9 months
[JBoss Portal] - SVG in portlet
by scollins311
Describe your environment:
JBoss Portal Version
2.4.0 CR1
Did you get Portal from CVS? or download it?
download
JBoss AS Version
4.0.4 GA
Database Vendor and Version
enterprise db 8.1
JDBC Connector and Version
EnterpriseDB Native Driver, version: EnterpriseDB 8.1.3.12
OS Platform
windows xp sp2
Describe the problem:
I have a portlet that contains an inline svg image. The rest of the portlet is displayed fine but the svg is ignored by the browser. The tags appear in the source. I can reproduce this in a regular page(not a portlet) by making the file .html instead of .xhtml. This has led me to believe that the portal is returning an .html file (I could be wrong). That would explain why the browser is ignoring the svg content. Is there a way to get the portal to return an xhtml page, or has anyone found a way to get inline svg to work?
Thanks in advance,
Shaun
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3959661#3959661
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3959661
19 years, 9 months
[EJB 3.0] - Re: env-entry injection in a @Service EJB
by rene@xinit.org
Hi,
when I try
| <?xml version="1.0"?>
|
| <ejb-jar
| xmlns="http://java.sun.com/xml/ns/javaee"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
| http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
| version="3.0">
| <display-name>EnvEntry Tests</display-name>
| <enterprise-beans>
| <session>
| <ejb-name>MyTestServiceBean</ejb-name>
| <env-entry>
| <env-entry-name>maxExceptions</env-entry-name>
| <env-entry-type>java.lang.Integer</env-entry-type>
| <env-entry-value>15</env-entry-value>
| </env-entry>
| </session>
| </enterprise-beans>
| </ejb-jar>
|
together with:
| @Service
| public class MyTestServiceBean implements MyTestService {
|
| @Resource(name="maxExceptions") private int maxExceptions;
|
| public MyTestServiceBean() {
| System.out.println("MAX_EXCPT: " + maxExceptions);
| }
| }
|
I'll get the following exception:
| 19:48:30,715 WARN [ServiceController] Problem creating service jboss.j2ee:service=EJB3,module=openstam-core-1.0dev.jar
| java.lang.ClassCastException: org.jboss.ejb3.dd.SessionEnterpriseBean
| at org.jboss.ejb3.Ejb3DescriptorHandler.getServiceContainer(Ejb3DescriptorHandler.java:297)
| at org.jboss.ejb3.Ejb3AnnotationHandler.getContainers(Ejb3AnnotationHandler.java:153)
| at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:567)
| at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:555)
| at org.jboss.ejb3.Ejb3Deployment.deployUrl(Ejb3Deployment.java:536)
| at org.jboss.ejb3.Ejb3Deployment.deploy(Ejb3Deployment.java:508)
| at org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:463)
| at org.jboss.ejb3.Ejb3Module.createService(Ejb3Module.java:125)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:260)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:243)
| at sun.reflect.GeneratedMethodAccessor3.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.create(Unknown Source)
| at org.jboss.system.ServiceController.create(ServiceController.java:330)
| at org.jboss.system.ServiceController.create(ServiceController.java:273)
| at sun.reflect.GeneratedMethodAccessor4.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 $Proxy34.create(Unknown Source)
| at org.jboss.ejb3.EJB3Deployer.create(EJB3Deployer.java:429)
| 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.integration.jboss.DeployerInterceptor.create(DeployerInterceptor.java:74)
| at org.jboss.ws.integration.jboss.DeployerInterceptorEJB.create(DeployerInterceptorEJB.java:44)
| at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.create(SubDeployerInterceptorSupport.java:180)
| at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:91)
| 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 $Proxy35.create(Unknown Source)
| at org.jboss.deployment.MainDeployer.create(MainDeployer.java:953)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:807)
| 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:634)
| 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)
|
I'm running jboss 4.0.4GA with EJB3 RC8. I didn't expected this to work, because the ejb-jar.xml "speaks" about a session bean and I have a @Service Bean, which is a jboss specific thing.
Is this expected to work? Is this a bug? Or, is this simply not possible?
Thanks, René
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3959660#3959660
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3959660
19 years, 9 months