CMP with MySQL
HI......
I have a SQLException under SJSAS81, with Entity Bean mapped in MySQL database (using mysql-connector-java-3.1.8-bin.jar).
The query:
select t0."id", t0."nome" from "aldotab" t0 where t0."id"
MySQL not support t0."<table>" or t0."<attribute> . How can I configure CMP to not put "" under table name or attribute??
Error:
[#|2005-05-04T01:05:32.312+0200|WARNING|sun-appserver-pe8.1_01|javax.enterprise.system.stream.err|_ThreadID=25;|
javax.ejb.EJBException
at com.sun.ejb.containers.BaseContainer.processSystemException(BaseContainer.java:2807)
at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:2713)
at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:2521)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:819)
at com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:199)
at $Proxy58.findByPrimaryKey(Unknown Source)
at Myservlet.processRequest(Myservlet.java:42)
at Myservlet.doGet(Myservlet.java:59)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:747)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
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.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:184)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:653)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:534)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doTask(ProcessorTask.java:403)
at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:55)
Caused by: com.sun.jdo.api.persistence.support.JDODataStoreException: JDO76400: Got a JDBC SQLException while executing the SQL statement:
SQL statement<select t0."id", t0."nome" from "aldotab" t0 where t0."id" = ?> with input values:java.lang.Integer:1.
Please examine the SQLException for more information.
NestedException: java.sql.SQLException: Invalid table name "aldotab" specified at position 31.
at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.throwJDOSqlException(SQLStoreManager.java:614)
at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.executeQuery(SQLStoreManager.java:448)
at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.retrieve(SQLStoreManager.java:345)
at com.sun.jdo.spi.persistence.support.sqlstore.SQLStateManager.retrieve(SQLStateManager.java:2024)
at com.sun.jdo.spi.persistence.support.sqlstore.SQLStateManager.reload(SQLStateManager.java:1162)
at com.sun.jdo.spi.persistence.support.sqlstore.SQLStateManager.reload(SQLStateManager.java:1118)
at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl.getObjectById(PersistenceManagerImpl.java:633)
at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerWrapper.getObjectById(PersistenceManagerWrapper.java:245)
at pkg.AldotabBean_1984140392_ConcreteImpl.ejbFindByPrimaryKey(AldotabBean_1984140392_ConcreteImpl.java:121)
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 com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:147)
at com.sun.ejb.containers.EntityContainer.invokeFindByPrimaryKey(EntityContainer.java:738)
at com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:181)
... 34 more
|#]
Help me!!
Thanks..
Bye
Hi asrmj0,
CMP is configured by defualt not to generate quotes on MYSQL. The file defining the setting is
com/sun/jdo/spi/persistence/support/sqlstore/database/MYSQL.properties and lives in $AS_HOME/lib/appserv-cmp.jar. This file should contain the following lines:
QUOTE_CHAR_START=
QUOTE_CHAR_END=
Can you please compare that with your environment?
-- markus.
Similar Messages
-
Problem in creating a CMP bean with MySql
Hi,
I am using lomboz eclipse, jboss 4.0.2, xdoclet 1.2.3 & DB as MySql 5.0. I am encountering a very strange problem when I try to create a CMP with MySql as DB. After entering relevant information about the datasource & testing the connection & finding it to be successful, I get the error in lomboz eclipse as : CMP has no attributes. Moreover, I donot even get the table names from the schema, that was given in the datasource, with which the mapping of my CMP will be done.
I tried using Oracle 9i. But to my wonder, I didnot experience this issue, as it gave me all the CMP atttributes mapped & also created the CMP with Oracle DB. Can anyone help me in getting this issue resloved with MySql DB?Yeah, the DB User permissions are found to be ok, as the test connection was successfull. I have tried for MySql 4.1 & Myql 5.0, with their respective jars & driver classes. But the result was same. Test connection is successful, but when i hit the next button to see the CMP attributes, it doesnot give me the list of tables under that schema & says that CMP has no attributes. Please help.
-
How to use CMP in Weblogic 9.2 with MySQL?
Hello all...
So I've been tasked wiith moving an Oracle/Weblogic installation to a MySQL/Weblogic platform. Things are moving along well, except that in my CMP (Container-Managed Persistence) descriptors, the database-type is set to "Oracle" and there are references to columns of type "OracleBlob" and "OracleClob".
I changed database-type to "MySQL" and those columns to "Blob" and "Clob", but it doesn't work -- Weblogic reports that MySQL doesn't support Blobs and Clobs (which is untrue, but perhaps Weblogic 9.2 doesn't know how to deal with MySQL Blobs and Clobs).
Has anyone encountered this before? Is there a workaround? I've Google'd it and looked here, and it doesn't seem like many people use this combination of MySQL and Weblogic, so there's not much discussed on this topic.
Any help would be much appreciated!
- Tim BessieFirst you need to make sure that you are using supported configuration. CMP (WebLogic feature) is supported with MySql4 with Connect/J
http://edocs.bea.com/platform/suppconfigs/configs92/92_over/supported_db.html#1177621
Thanks,
Jayesh
Yagna Sys -
Trying to deploy CMP bean on JBoss4.0.2 with MySQL
Hi all I am trying to deploy CMP bean on JBoss4.0.2
with MySQL db.
The tables are created but I get the following error when trying to insert data in the db.
Does anyone have a solution for this.
I have been trying it for a week now.
javax.ejb.EJBException: getGeneratedKeys returned an empty ResultSet
at org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCMySQLCreateCommand.executeInsert(JDBCMySQLCreateCommand.java:87)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.performInsert(JDBCAbstractCreateCommand.java:308)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.execute(JDBCAbstractCreateCommand.java:138)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreManager.java:572)
at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:222)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createEntity(CachedConnectionInterceptor.java:266)
at org.jboss.ejb.EntityContainer.createHome(EntityContainer.java:766)
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:324)
at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1113)
at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:192)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:212)
at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:90)
at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:117)
at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:61)
at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:28)
at org.jboss.ejb.plugins.CallValidationInterceptor.invokeHome(CallValidationInterceptor.java:41)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:109)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:146)
at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:116)
at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:121)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93)
at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:508)
at org.jboss.ejb.Container.invoke(Container.java:894)
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:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:155)
at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:104)
at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:179)
at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:165)
at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:169)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:86)
at $Proxy59.create(Unknown Source)
at com.cygnet.medina.HospitalManager.HospitalManagerEJB.addHospital(HospitalManagerEJB.java:59)
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:324)
at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:130)
at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:51)
at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:139)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
at org.jboss.ejb.Container.invoke(Container.java:873)
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:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:155)
at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:104)
at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:179)
at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:165)
at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:97)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:86)
at $Proxy64.addHospital(Unknown Source)
at com.cygnet.medina.Hospital.HospitalCreateAction.execute(HospitalCreateAction.java:58)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:534)
19:29:12,828 ERROR [LogInterceptor] TransactionRolledbackException in method: public abstract com.cygnet.medina.Hospital.HospitalData com.cygnet.medina.HospitalManager.Hospital
javax.ejb.EJBException: getGeneratedKeys returned an empty ResultSet
at org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCMySQLCreateCommand.executeInsert(JDBCMySQLCreateCommand.java:87)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.performInsert(JDBCAbstractCreateCommand.java:308)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.execute(JDBCAbstractCreateCommand.java:138)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreManager.java:572)
at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:222)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createEntity(CachedConnectionInterceptor.java:266)
at org.jboss.ejb.EntityContainer.createHome(EntityContainer.java:766)
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:324)
at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1113)
at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:192)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:212)
at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:90)
at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:117)
at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:61)
at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:28)
at org.jboss.ejb.plugins.CallValidationInterceptor.invokeHome(CallValidationInterceptor.java:41)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:109)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:146)
at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:116)
at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:121)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93)
at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:508)
at org.jboss.ejb.Container.invoke(Container.java:894)
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:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:155)
at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:104)
at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:179)
at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:165)
at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:169)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:86)
at $Proxy59.create(Unknown Source)
at com.cygnet.medina.HospitalManager.HospitalManagerEJB.addHospital(HospitalManagerEJB.java:59)
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:324)
at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:130)
at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:51)
at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:139)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
at org.jboss.ejb.Container.invoke(Container.java:873)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)opola,
Hi. it looks like you have run into at least the limitations on HD/IO access, security restrictions and running/viewing native processes - see the whitelist exclusion in the following link.
Understanding Java Cloud Service Whitelist Criteria
http://docs.oracle.com/cloud/CSJSU/dev_app.htm#CSJSU7121
ERROR : 1:Type "java.lang.SecurityManager" not allowed.
Overriding Java Security Manager
ERROR : 17:Type "java.lang.Process" not allowed.
Executing a new Process
ERROR : 8:Type "java.nio.channels.FileLock" not allowed
Java non-blocking IO
Also see the unsupported API list
http://docs.oracle.com/cloud/CSJSU/dev_app.htm#CEGEADDC
thank you
/Michael
https://forums.oracle.com/forums/profile.jspa?userID=609861
https://forums.oracle.com/forums/profile.jspa?userID=849227 -
i wanna test my work with Ejb 3.0 and i want connect with MySQL
i tested connection with MySQL database from JDeveloper
and it successed and i created CMP from MySQL tables
But the problem when im trying to deploy it with OC4J
it throws an exception SQLException ( Invalid Oracle URL )
if anybody know anything about this problem
please help methankx for help
but it didnt work i dont know why
i tried many way to deploy it but it stell throws exception
<< Invalid Oracle URL specifiedError Code: 17067
>>
this is OC4J data-sources.xml file
<?xml version="1.0" ?>
<data-sources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/data-sources-10_1.xsd" schema-major-version="10" schema-minor-version="1">
<managed-data-source user="root" password="pagera" connection-pool-name="Example Connection Pool" jndi-name="jdbc/MySQLDS" name="MySQLDS" />
<connection-pool name="Example Connection Pool">
<connection-factory factory-class="oracle.jdbc.pool.OracleDataSource" user="root" password="pagera" url="jdbc:mysql://localhost/test" />
</connection-pool>
</data-sources>
and i tried it
<data-source class="com.mysql.jdbc.jdbc2.optional.MysqlDataSource"
name="mysqlDS" location="jdbc/mysqlCoreDS" xa-location="jdbc/xa/mysqlXADS"
ejb-location="jdbc/mysqlDS" connection-driver="com.mysql.jdbc.Driver"
username="root"
password="pagera"
url="jdbc:mysql://localhost/test"
inactivity-timeout="30" />
but it didnt work too
i dont know what to do.....
if anyone has another way pls tell me -
Building postfix with mysql problem
Hi all,
I have a sun fire v880 machine running solaris 10, i need to set an email server using postfix+mysql.
I already installed myql and its working fine. but when trying to build postfix with mysql i get a compliation error, here's wts going on:
bash-3.00# make makefiles 'CCARGS=-DHAS_MYSQL -I/usr/local/bdb/include -I/opt/mysql/mysql/include -DUSE_SASL_AUTH' 'AUXLIBS=-L/opt/mysql/mysql/lib -R/opt/mysql/mysql/lib -lmysqlclient -lz -lm'
(echo "# Do not edit -- this file documents how Postfix was built for your machine."; /bin/sh makedefs) >makedefs.tmp
set +e; if cmp makedefs.tmp conf/makedefs.out; then rm makedefs.tmp; \
else mv makedefs.tmp conf/makedefs.out; fi >/dev/null 2>/dev/null
set -e; for i in src/util src/global src/dns src/tls src/xsasl src/milter src/master src/postfix src/smtpstone src/sendmail src/error src/pickup src/cleanup src/smtpd src/local src/trivial-rewrite src/qmgr src/oqmgr src/smtp src/bounce src/pipe src/showq src/postalias src/postcat src/postconf src/postdrop src/postkick src/postlock src/postlog src/postmap src/postqueue src/postsuper src/qmqpd src/spawn src/flush src/verify src/virtual src/proxymap src/anvil src/scache src/discard src/tlsmgr; do \
(set -e; echo "[$i]"; cd $i; rm -f Makefile; \
make -f Makefile.in Makefile MAKELEVEL=) || exit 1; \
done;
[src/util]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/global]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/dns]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/tls]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/xsasl]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/milter]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/master]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postfix]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/smtpstone]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/sendmail]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/error]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/pickup]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/cleanup]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/smtpd]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/local]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/trivial-rewrite]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/qmgr]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/oqmgr]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/smtp]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/bounce]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/pipe]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/showq]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postalias]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postcat]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postconf]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postdrop]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postkick]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postlock]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postlog]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postmap]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postqueue]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postsuper]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/qmqpd]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/spawn]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/flush]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/verify]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/virtual]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/proxymap]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/anvil]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/scache]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/discard]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/tlsmgr]
(set -e; echo "# DO NOT EDIT"; /bin/sh ../../makedefs && cat Makefile.in) >Makefile
rm -f Makefile; (cat conf/makedefs.out Makefile.in) >Makefile
* Then when i run:
bash-3.00# /usr/local/bin/make
The compilation goes on till i get the following error
"ld: warning: file /opt/mysql/mysql/lib/libmysqlclient.a(libmysql.o): wrong ELF class: ELFCLASS64
Undefined first referenced
symbol in file
mysql_fetch_row ../../lib/libglobal.a(dict_mysql.o)
mysql_query ../../lib/libglobal.a(dict_mysql.o)
mysql_error ../../lib/libglobal.a(dict_mysql.o)
mysql_close ../../lib/libglobal.a(dict_mysql.o)
mysql_free_result ../../lib/libglobal.a(dict_mysql.o)
mysql_store_result ../../lib/libglobal.a(dict_mysql.o)
mysql_init ../../lib/libglobal.a(dict_mysql.o)
mysql_real_connect ../../lib/libglobal.a(dict_mysql.o)
mysql_real_escape_string ../../lib/libglobal.a(dict_mysql.o)
mysql_num_rows ../../lib/libglobal.a(dict_mysql.o)
mysql_num_fields ../../lib/libglobal.a(dict_mysql.o)
mysql_escape_string ../../lib/libglobal.a(dict_mysql.o)
ld: fatal: Symbol referencing errors. No output written to error
collect2: ld returned 1 exit status
make: *** [error] Error 1
make: *** [update] Error 1"
Please help me with this issue, i use gcc-3.3.2 and used both GNU make and the "make" shipped with solaris, both gave the same result.
I installed Mysql as a pkg and didn't compile it from source.
Thanks in advance."ld: warning: file /opt/mysql/mysql/lib/libmysqlclient.a(libmysql.o): wrong ELF class: ELFCLASS64Usually this kind of error is an indication that both 32- and 64-bit object files are being used in building the application. Use all 32-bit objects or 64-bit objects - please do not mix them during compilation.
If building from scratch is not mandatory for you, you can try installing postfix {and other applications, libraries, ..} with the help of Blastwave's 'pkg-get'. Some instrustions are at: http://technopark02.blogspot.com/2005/06/solaris-installing-appspackages-with.html
% pkg-get -a | grep postfix
postfix 2.2.8,REV=2006.03.13 -
Problem building postfix with mysql
Hi all,
I have a sun fire v880 machine running solaris 10, i need to set an email server using postfix+mysql.
I already installed myql and its working fine. but when trying to build postfix with mysql i get a compliation error, here's wts going on:
bash-3.00# make makefiles 'CCARGS=-DHAS_MYSQL -I/usr/local/bdb/include -I/opt/mysql/mysql/include -DUSE_SASL_AUTH' 'AUXLIBS=-L/opt/mysql/mysql/lib -R/opt/mysql/mysql/lib -lmysqlclient -lz -lm'
(echo "# Do not edit -- this file documents how Postfix was built for your machine."; /bin/sh makedefs) >makedefs.tmp
set +e; if cmp makedefs.tmp conf/makedefs.out; then rm makedefs.tmp; \
else mv makedefs.tmp conf/makedefs.out; fi >/dev/null 2>/dev/null
set -e; for i in src/util src/global src/dns src/tls src/xsasl src/milter src/master src/postfix src/smtpstone src/sendmail src/error src/pickup src/cleanup src/smtpd src/local src/trivial-rewrite src/qmgr src/oqmgr src/smtp src/bounce src/pipe src/showq src/postalias src/postcat src/postconf src/postdrop src/postkick src/postlock src/postlog src/postmap src/postqueue src/postsuper src/qmqpd src/spawn src/flush src/verify src/virtual src/proxymap src/anvil src/scache src/discard src/tlsmgr; do \
(set -e; echo "[$i]"; cd $i; rm -f Makefile; \
make -f Makefile.in Makefile MAKELEVEL=) || exit 1; \
done;
[src/util]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/global]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/dns]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/tls]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/xsasl]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/milter]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/master]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postfix]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/smtpstone]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/sendmail]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/error]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/pickup]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/cleanup]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/smtpd]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/local]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/trivial-rewrite]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/qmgr]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/oqmgr]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/smtp]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/bounce]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/pipe]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/showq]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postalias]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postcat]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postconf]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postdrop]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postkick]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postlock]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postlog]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postmap]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postqueue]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/postsuper]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/qmqpd]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/spawn]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/flush]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/verify]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/virtual]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/proxymap]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/anvil]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/scache]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/discard]
(cat ../../conf/makedefs.out Makefile.in) >Makefile
[src/tlsmgr]
(set -e; echo "# DO NOT EDIT"; /bin/sh ../../makedefs && cat Makefile.in) >Makefile
rm -f Makefile; (cat conf/makedefs.out Makefile.in) >Makefile
* Then when i run:
bash-3.00# /usr/local/bin/make
The compilation goes on till i get the following error
"ld: warning: file /opt/mysql/mysql/lib/libmysqlclient.a(libmysql.o): wrong ELF class: ELFCLASS64
Undefined first referenced
symbol in file
mysql_fetch_row ../../lib/libglobal.a(dict_mysql.o)
mysql_query ../../lib/libglobal.a(dict_mysql.o)
mysql_error ../../lib/libglobal.a(dict_mysql.o)
mysql_close ../../lib/libglobal.a(dict_mysql.o)
mysql_free_result ../../lib/libglobal.a(dict_mysql.o)
mysql_store_result ../../lib/libglobal.a(dict_mysql.o)
mysql_init ../../lib/libglobal.a(dict_mysql.o)
mysql_real_connect ../../lib/libglobal.a(dict_mysql.o)
mysql_real_escape_string ../../lib/libglobal.a(dict_mysql.o)
mysql_num_rows ../../lib/libglobal.a(dict_mysql.o)
mysql_num_fields ../../lib/libglobal.a(dict_mysql.o)
mysql_escape_string ../../lib/libglobal.a(dict_mysql.o)
ld: fatal: Symbol referencing errors. No output written to error
collect2: ld returned 1 exit status
make: *** [error] Error 1
make: *** [update] Error 1"
Please help me with this issue, i use gcc-3.3.2 and used both GNU make and the "make" shipped with solaris, both gave the same result.
I installed Mysql as a pkg and didn't compile it from source.
Thanks in advance."ld: warning: file /opt/mysql/mysql/lib/libmysqlclient.a(libmysql.o): wrong ELF class: ELFCLASS64Usually this kind of error is an indication that both 32- and 64-bit object files are being used in building the application. Use all 32-bit objects or 64-bit objects - please do not mix them during compilation.
If building from scratch is not mandatory for you, you can try installing postfix {and other applications, libraries, ..} with the help of Blastwave's 'pkg-get'. Some instrustions are at: http://technopark02.blogspot.com/2005/06/solaris-installing-appspackages-with.html
% pkg-get -a | grep postfix
postfix 2.2.8,REV=2006.03.13 -
OBIEE 11G with MySql Issue Hierarchy is not working..
Hi,
i am using the OBIEE 11G with MySQL DB. i have sucessfully created the RPD. i created the Hierarchy in the RPD. this is the scerario i have created.
i have only one data column created_at. by using this column i create 3 more logical logical columns, which are Year,Month Name,Week and created Hierarchy by taking the these columns only.
when i am viewing the result by taking the hierarchy it throwing the error systax error"ou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version".
but we selecting the year column it successfully nagvigating to the month level data but when selecting the Hierarchy directly it is unable to navigate from year to month.
please provide me the solution for this as soon as possbile i have an urgent requirement on this.
Thanks,
Yogi.Hi,
Thanks for you post..
My Requriement is that we no need to create new columns we need to necessary columns in BMM layer only and we need to use them in Hierarchy.
Thanks,
Yogi. -
Can' t connect Java with MySQL
My goal is to connect Java with MySQL. I found many solutions on Internet, but I always get the same mistake:
SQLException: No suitable driver
SQLState: 08001
VendorError: 0MySQL works fine alone or with php.Only thing left me to think is that the installed versions are not compatible for this mysql-connector-java-5.0.4
I don't believe that could be a reason.
Installed versions are:
Apache Tomcat 5.5.20 Server
Apache HTTP Server 2.2.4
PHP 5.2.0
MySQL 5.2
jre 1.5.0_11
jdk1.5.0_11
Apache Tomacat JK2 connector Version: 1.2.20 File Name: mod_jk-apache-2.2.3.so
mysql-connector-java-5.0.4
I also set connector in class path: C:\mysql-connector-java-5.0.4;C:\mysql-connector-java-5.0.4\mysql-connector-java-5.0.4-bin.jar;C:\mysql-connector-java-5.0.4\src\com\mysql\jdbc
For installation I used manulas from:
http://apacheguide.org/jsp.php
http://doc.51windows.net/mysql/?url=/MySQL/ch23s03.html
Here is also a test code in java:
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
public class Connect
public static void main (String[] args)
Connection conn = null;
try {
conn =
DriverManager.getConnection("jdbc:mysql://localhost/first_test" +
"user=monty&password=greatsqldb");
// Do something with the Connection
} catch (SQLException ex) {
// handle any errors
System.out.println("SQLException: " + ex.getMessage());
System.out.println("SQLState: " + ex.getSQLState());
System.out.println("VendorError: " + ex.getErrorCode());
}i'm desperate, please help or tell me someone who'll know the answer.
Thank You in advancehey buddy .. it seems yr code is wrong .. in getconnection () method u should also specify the port ,which u r not doing ...
the default port for MySQL is 3306 ... see below i am giving you a sample code ... its working fine .. and dont forget to put the MySQL driver jar path in to classpath and also copy the jar into common/lib folder of your tomcat ....
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
public class MySQLConnectionTest {
public static void main(String[] args) {
new MySQLConnectionTest().connTest();
public void connTest() {
String tableName = "portfolio"; //change as per setting
String hostName = "10.81.9.39"; // please change for the target database ip or hostname
String dbPort = "3306"; //change if not using the default
String dbName = "tradingsystem"; //change as per the given DB name
String username = "root"; //change as per setting
String password = "password"; //change as per setting
System.out.println("before try");
Double data=0.0;
Double data1=0.0;
try {
Class.forName("org.gjt.mm.mysql.Driver");
System.out.println("before driver manager");
Connection conn = DriverManager.getConnection("jdbc:mysql://"+hostName+":"+dbPort+"/"+dbName, username, password);
String query1 = "select * from "+tableName+" where User_id='trader1' and Stock_Type='Equity'";
System.out.println("quesry1="+query1);
Statement stmt = conn.createStatement();
ResultSet rs1 = stmt.executeQuery(query1);
while(rs1.next())
System.out.println("hiiiiii for rs1");
System.out.println(rs1);
Quantity=(Integer)rs1.getObject(5);
MarketPrice=(Double) rs1.getObject(8);
data=Quantity*MarketPrice;
data1+=data;
System.out.println("data1="+data1);
i=0;
rs1.close();
stmt.close();
conn.close();
} catch (ClassNotFoundException e) {
e.printStackTrace(System.err);
} catch (SQLException e) {
e.printStackTrace(System.err);
i hope it will work for u...
cheers, -
JDeveloper 10.1.2 with MySQL and PostgreSQL
I'm testing JDeveloper 10.1.2 business components with mysql or postgresql because my company needs to connect also to these non-oracle DBs. ADF suits our developement needs, in speed and functionalities; anyway to make it our main developement system we need it to be compatible.
I made three tests and they were all disappointing.
At first, I installed MySQL 4.0 on my windows machine. I used the stable Connector/J 3.1
and then MySQL Connector/J 3.0, but in both cases JDeveloper had a strange behaviour: I can make the connection, I can navigate correctly through all tables in the connection-navigator, I see all the column names etc... Anyway, as I try to build a "new Entity Object" from a table, there are no available table properties, like if the table had no columns.
In this forum I only found documentation about rowid problems with mysql, but nothing about Entity Object wizard issues.
Then I switched to PostgreSQL. I installed it locally, so I had to choose the 8.01 since I'm on a windows machine. JDBC driver: postgresql-8.0-310 jdbc3
The developement test phase went ok, it is possible to use this DB just as if it was a Oracle, all the business components wizards works perfectly.
The problem is at runtime, unfortunately. I built a simple datapage on the struts-config diagram and I dragged on it a "read-only table" from the data control palette.
As I run the application, the embedded OC4J immediately returns this error:
oracle.jbo.JboException: JBO-29000: JBO-29000: JBO-29000: JBO-26061: Errore durante lapertura della connessione JDBC.
at oracle.jbo.JboException.<init>(JboException.java:343)
(in english: Error during JDBC connection)
There are no other available JDBC drivers for JVM 1.4x so I see no solution...
I also tried to connect to an older PostgresSQL with its (older) JDBC but I get same the result.
Anyone can help? Is it a JDev 10.1.2 issue?Hi Paolo.
I'm also doing such tests.
I did not ran into these problems because I created the busisness componentes using an Oracle connection first.
After that, I switched the datatype of the table columns in the entity object to meet the SQL92 criteria ( like changing NUMBER(n) to INTEGER ).
And then, I switched the connection to the postgreSQL or MySQL. This worked fine for me.
But, the other big problem you will face is related to updating records using postgreSQL connection.
Please see my post "Problem updating records using BC4J with foreign data sources" Problem updating records using BC4J with foreign data sources
It would by fine if we help each other to solve this problems.
Thanks
Denis -
i am using JSP in Linux Platform. when i connected to mysql with mysql driver for odbc by using the following code,
import java.sql.*;
public class TestMysql
public static void main(String args[]) {
try {
Connection con;
String connStr = "jdbc:mysql://localhost/test?user=root&password=mysql";
Class.forName( "com.mysql.jdbc.Driver" ).newInstance();
System.out.println("OK");
con = DriverManager.getConnection( connStr );
System.out.println("Again OK");
catch( Exception x )
x.printStackTrace();
i got the following exception
OK
java.sql.SQLException: Error during query: Unexpected Exception: java.io.CharConversionException message given: null
Nested Stack Trace:
** BEGIN NESTED EXCEPTION **
java.io.CharConversionException
STACKTRACE:
java.io.CharConversionException
at gnu.gcj.convert.Input_iconv.read(char[], int, int) (/usr/lib/libgcj.so.5.0.0)
at java.lang.String.init(byte[], int, int, java.lang.String) (/usr/lib/libgcj.so.5.0.0)
at java.lang.String.String(byte[], int, int, java.lang.String) (/usr/lib/libgcj.so.5.0.0)
at com.mysql.jdbc.SingleByteCharsetConverter.SingleByteCharsetConverter(java.lang.String) (Unknown Source)
at com.mysql.jdbc.SingleByteCharsetConverter.initCharset(java.lang.String) (Unknown Source)
at com.mysql.jdbc.SingleByteCharsetConverter.getInstance(java.lang.String, com.mysql.jdbc.Connection) (Unknown Source)
at com.mysql.jdbc.Connection.getCharsetConverter(java.lang.String) (Unknown Source)
at com.mysql.jdbc.StringUtils.getBytes(java.lang.String, java.lang.String, java.lang.String, boolean, com.mysql.jdbc.Connection) (Unknown Source)
at com.mysql.jdbc.Buffer.writeStringNoNull(java.lang.String, java.lang.String, java.lang.String, boolean, com.mysql.jdbc.Connection) (Unknown Source)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(com.mysql.jdbc.Statement, java.lang.String, java.lang.String, com.mysql.jdbc.Buffer, int, com.mysql.jdbc.Connection, int, int, boolean, java.lang.String, boolean) (Unknown Source)
at com.mysql.jdbc.Connection.execSQL(com.mysql.jdbc.Statement, java.lang.String, int, com.mysql.jdbc.Buffer, int, int, boolean, java.lang.String, boolean, boolean) (Unknown Source)
at com.mysql.jdbc.Connection.configureClientCharacterSet() (Unknown Source)
at com.mysql.jdbc.Connection.initializePropsFromServer() (Unknown Source)
at com.mysql.jdbc.Connection.createNewIO(boolean) (Unknown Source)
at com.mysql.jdbc.Connection.Connection(java.lang.String, int, java.util.Properties, java.lang.String, java.lang.String) (Unknown Source)
at com.mysql.jdbc.NonRegisteringDriver.connect(java.lang.String, java.util.Properties) (Unknown Source)
at java.sql.DriverManager.getConnection(java.lang.String, java.util.Properties) (/usr/lib/libgcj.so.5.0.0)
at java.sql.DriverManager.getConnection(java.lang.String) (/usr/lib/libgcj.so.5.0.0)
at TestMysql.main(java.lang.String[]) (Unknown Source)
** END NESTED EXCEPTION **
at com.mysql.jdbc.Connection.execSQL(com.mysql.jdbc.Statement, java.lang.String, int, com.mysql.jdbc.Buffer, int, int, boolean, java.lang.String, boolean, boolean) (Unknown Source)
at com.mysql.jdbc.Connection.configureClientCharacterSet() (Unknown Source)
at com.mysql.jdbc.Connection.initializePropsFromServer() (Unknown Source)
at com.mysql.jdbc.Connection.createNewIO(boolean) (Unknown Source)
at com.mysql.jdbc.Connection.Connection(java.lang.String, int, java.util.Properties, java.lang.String, java.lang.String) (Unknown Source)
at com.mysql.jdbc.NonRegisteringDriver.connect(java.lang.String, java.util.Properties) (Unknown Source)
at java.sql.DriverManager.getConnection(java.lang.String, java.util.Properties) (/usr/lib/libgcj.so.5.0.0)
at java.sql.DriverManager.getConnection(java.lang.String) (/usr/lib/libgcj.so.5.0.0)
at TestMysql.main(java.lang.String[]) (Unknown Source)
i have the database, hello.
The same code works well in Windows, But in Linux, the above exception.
By using the username root and password mysql , i can connect to mysql directly from the mysql prompt.
Pls help me..
I have already put the query 'access denied problem in Mysql' some day before. from the reply, i made some changes in user table(ie. set the password for [email protected].).After this change, this new Exception came..
The structure of my mysql.user table is
# host user password
1 localhost root 68d4f47c49a579c9
2 localhost.localdomain root 68d4f47c49a579c9
3 localhost.localdomain
4 localhost
Pls help me.
Edited by: SUMESHBABU_R on Sep 30, 2007 11:36 PMWell, at least the trace tells me that this issue is to be tracked back to the core of the MySQL JDBC driver and the Linux's implementation of JVM. It might be worth the effort to post this issue at their website/forum/issuetracker. It might also be worth the effort to tryout the newer MySQL JDBC driver 5.1, as it is written specific for JDK 6.0 (while MySQL JDBC driver 5.0 is targeted at JDK 5.0).
-
Setting up testing server with MySQL
I am just migrating to the MacBook from an older iMac G5. I was running PHP with MySQL 4.1.15. I just downloaded the PHP 5.2.2 and need to know which version of MySQL will run with it on my MacBook. Any help, please, especially if you are using Dreamweaver and have migrated to CS3. Thanks, Jay
Hi
I am successfully running MySQL 5.0.37 with PHP 5.2.1. (I don't use Dreamweaver or CS3 though.)
Matt -
How to use Ago function in BIEE with mysql database
Hi experts,
Ago function works well in Oracle database,but when I tried a mysql database,it didn't show results as expected. Anyone knows how to use Ago with mysql as data source?Hi Gurus, need help
-
Clob mapping not working with mysql
Hi,
I have an application that i'm running with MySQL and Oracle at the same
time. At some point, i need to use a 'clob' mapping. When i do this, it
just works fine with oracle but it fails with mysql. i have the exception:
Field "com.ennov.prisma.api.document.jdo.AbstractDocumentPO.description"
is mapped as a clob, but should be represented as a different mapping.
If the field is a string and you would like to force it to map as a
clob, add an extension to its field metadata with a key of "jdbc-size"
and a value of
-1.[com.ennov.prisma.api.document.jdo.AbstractDocumentPO.description]
at kodo.jdbc.meta.Mappings.invalidMapping(Mappings.java:132)
at kodo.jdbc.meta.Mappings.invalidMapping(Mappings.java:118)
at
kodo.jdbc.meta.ClobFieldMapping.fromMappingInfo(ClobFieldMapping.java:46)
if i use a value mapping, it works with MySQL but fails with Oracle (I
have sql error because a clob is used in a distinct select).
In the manual, it is written "Note that some databases can support
string of unlimited length without using a CLOB; when this is the case
the mapping tool will install a value mapping in favor of
this mapping.". So apparently, this is not the case with MySQLDictionary.
To solve my problem and have my code working with both databases, i had
to extend the MySQLDictionary and overwrite the replaceFieldMapping
method in order to replace the clob mapping by a value mapping at
runtime but i don't feel confident to do this kind of modifications by
mysel and would expect this behaviour to be solved quite soon.
Thanks for your help since this problem is urgent for us,
Laurent CzinczenheimLaurent-
The best solution would probably be to just have separate mappings for
the MySQL and Oracle databases. The easiest way to accomplish this would
be to have a separate setting for each of the databases. E.g.:
kodo.jdbc.meta.MappingFactory: file(SingleFile=true, FileName=oracle.mapping)
kodo.jdbc.meta.MappingFactory: file(SingleFile=true, FileName=mysql.mapping)
That way, you can use a clob mapping for Oracle, and a normal value
mapping for MySQL (since MySQL doesn't need to use the CLOB mapping, and
it isn't very efficient).
For more details on this, see:
http://docs.solarmetric.com/manual.html#ref_guide_mapping_factory
Another solution is to just stick with your custom extension of the
MySQLDictionary, which is a perfectly valid way of having special CLOB
handling in MySQL. Note, though, that CLOB handling is less efficient
than VARCHAR handling, so it should be a mapping of last resort, and
there isn't any need to use it in MySQL.
In article <[email protected]>, czinczenheim wrote:
Hi,
I have an application that i'm running with MySQL and Oracle at the same
time. At some point, i need to use a 'clob' mapping. When i do this, it
just works fine with oracle but it fails with mysql. i have the exception:
Field "com.ennov.prisma.api.document.jdo.AbstractDocumentPO.description"
is mapped as a clob, but should be represented as a different mapping.
If the field is a string and you would like to force it to map as a
clob, add an extension to its field metadata with a key of "jdbc-size"
and a value of
-1.[com.ennov.prisma.api.document.jdo.AbstractDocumentPO.description]
at kodo.jdbc.meta.Mappings.invalidMapping(Mappings.java:132)
at kodo.jdbc.meta.Mappings.invalidMapping(Mappings.java:118)
at
kodo.jdbc.meta.ClobFieldMapping.fromMappingInfo(ClobFieldMapping.java:46)
if i use a value mapping, it works with MySQL but fails with Oracle (I
have sql error because a clob is used in a distinct select).
In the manual, it is written "Note that some databases can support
string of unlimited length without using a CLOB; when this is the case
the mapping tool will install a value mapping in favor of
this mapping.". So apparently, this is not the case with MySQLDictionary.
To solve my problem and have my code working with both databases, i had
to extend the MySQLDictionary and overwrite the replaceFieldMapping
method in order to replace the clob mapping by a value mapping at
runtime but i don't feel confident to do this kind of modifications by
mysel and would expect this behaviour to be solved quite soon.
Thanks for your help since this problem is urgent for us,
Laurent Czinczenheim
Marc Prud'hommeaux
SolarMetric Inc. -
Powerdns with MySQL doesn't work
I recently switched from ubuntu to Arch and I love it. However I have problems with PowerDNS running with MySQL database. When I set pdns.conf to
launch=gmysql
gmysql-host=127.0.0.1
gmysql-user=user
gmysql-password=pass
gmysql-dbname=database_name
and restart pdns i get this error:
Oct 22 22:43:34 Archlinux pdns[3337]: Caught an exception instantiating a backend, cleaning up
Oct 22 22:43:34 Archlinux pdns[3337]: gmysql Connection failed: Unable to connect to database: Lost connection to MySQL server at 'reading initial communication packet', system error: 0
Socket connection doesn't work either.
If someone could help me out of this I would be very happy.
Best regards!
JernejIt works! Thank you! Thank you! Thank you!
I wasted so many hours combating this...
I owe you a beer byte! Thx again!
Maybe you are looking for
-
Urgent: Issue with time out sql auzre
We are trying to connect to our SQL AZURE databased (Northern Europe) we keep getting timeout error. Initially it was post-login phase error and now we keep getting 10600 error. We are on V12 version. Any ideas please? Here is the detail An unhandle
-
Hi All, My environment details: SCSM 2012 R2 SCCM 2012 R2 connector configured When I looked into the event viewer , I find the following error occurring continuously while the SCCM 2012 synchronization Error Event 26319 An exception was thrown while
-
HT1212 i have the message Ipod is disabled, try again in 9,595 days. help
i have the message Ipod is disabled, try again in 9,595 days. help!
-
ORing the arbitration ID in a cluster in Write Net Multi
I am using Frame API CAN, and would like to write several messages to my device. The trouble I am having is my arbitration ID, it needs to be 29 bit instead of 11. I know that I need to OR it, but how do you go about this when it is in a cluster.
-
How can I get my 3GS to show correct GPS posotion again? It always shows wrong by 3 km in different directions..!!!