Hello I am developing a web application using Oracle ADF. Am using jdeveloper12c. I have created a view criteria for a view object as shown below in 12c.
After creating the view criteria am trying to drop this onto a a.jsf page as a ADF Query Panel. When I am trying to run this page I am getting the following error.
javax.servlet.ServletException: Servlet execution threw an exception
oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:192)
oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:105)
java.lang.NoClassDefFoundError: org/codehaus/groovy/control/customizers/CompilationCustomizer
oracle.jbo.ExprEval$ScriptLibrary.createShell(ExprEval.java:2534)
oracle.jbo.ExprEval$ScriptLibrary.getShell(ExprEval.java:2475)
oracle.jbo.ExprEval.parseScript(ExprEval.java:1571)
oracle.jbo.ExprEval.findScript(ExprEval.java:1152)
oracle.jbo.ExprEval.doEvaluate(ExprEval.java:1956)
oracle.jbo.ExprEval.doEvaluate(ExprEval.java:1928)
root cause
java.lang.ClassNotFoundException: org.codehaus.groovy.control.customizers.CompilationCustomizer
java.net.URLClassLoader$1.run(URLClassLoader.java:366)
java.net.URLClassLoader$1.run(URLClassLoader.java:355)
java.security.AccessController.doPrivileged(Native Method)
java.net.URLClassLoader.findClass(URLClassLoader.java:354)
java.lang.ClassLoader.loadClass(ClassLoader.java:425)
java.lang.ClassLoader.loadClass(ClassLoader.java:358)
oracle.jbo.ExprEval$ScriptLibrary.createShell(ExprEval.java:2534)
oracle.jbo.ExprEval$ScriptLibrary.getShell(ExprEval.java:2475)
oracle.jbo.ExprEval.parseScript(ExprEval.java:1571)
oracle.jbo.ExprEval.findScript(ExprEval.java:1152)
oracle.jbo.ExprEval.doEvaluate(ExprEval.java:1956)
oracle.jbo.ExprEval.doEvaluate(ExprEval.java:1928)
I have successfully created view criteria and used in jdeveloper11.1.2.4.
Please help me with this problem.
Thanks in advance.
According to compatibility matrix, you need Tomcat 7 for running ADF 12c applications:
http://www.oracle.com/technetwork/developer-tools/jdev/documentation/1212-cert-1964670.html
Related
I am trying to execute a SQL job of Copying data from within Database tables. DB server is Oracle 12c. Not able to figure out the probable cause of the below exception :
Caused by: java.sql.SQLException: A problem occurred while trying to acquire a cached PreparedStatement in a background thread.
at com.mchange.v2.c3p0.stmt.GooGooStatementCache.acquireStatement(GooGooStatementCache.java:571)
at com.mchange.v2.c3p0.stmt.GooGooStatementCache.checkoutStatement(GooGooStatementCache.java:204)
at com.mchange.v2.c3p0.impl.NewPooledConnection.checkoutStatement(NewPooledConnection.java:321)
at com.mchange.v2.c3p0.impl.NewProxyConnection.prepareStatement(NewProxyConnection.java:553)
at org.springframework.jdbc.core.PreparedStatementCreatorFactory$PreparedStatementCreatorImpl.createPreparedStatement(PreparedStatementCreatorFactory.java:238)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:632)
Caused by: java.sql.SQLException: [Oracle JDBC Driver]Object has been closed.
at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.mchange.v2.c3p0.stmt.GooGooStatementCache$1StmtAcquireTask.run(GooGooStatementCache.java:547)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)
I tried following this thread "error-occured-while-trying-to-acquire-a-cached-preparedstatement-in-a-background" . But we checked that nobody closed the connection and if its getting closed by itself. We also verified if the DB network was loaded due to some reason but found none.
Appreciate for any suggestion that could help us how to get around this exception to find the root cause of it.
When I want to make an insert I get this error. I'm using the Grails version ... can it be that I'm missing something? Thank you!
2019-03-08 09:08:56,705 [http-bio-8090-exec-20] ERROR events.PatchedDefaultFlushEventListener - Could not synchronize database state with session
org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
at ar.com.mlan.api.PdCController$_save_closure2.doCall(PdCController.groovy:201)
at ar.com.mlan.api.PdCController.save(PdCController.groovy:161)
at grails.plugin.cache.web.filter.PageFragmentCachingFilter.doFilter(PageFragmentCachingFilter.java:198)
at grails.plugin.cache.web.filter.AbstractFilter.doFilter(AbstractFilter.java:63)
at grails.plugin.springsecurity.rest.RestTokenValidationFilter.processFilterChain(RestTokenValidationFilter.groovy:118)
at grails.plugin.springsecurity.rest.RestTokenValidationFilter.doFilter(RestTokenValidationFilter.groovy:84)
at grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter.doFilter(GrailsAnonymousAuthenticationFilter.java:53)
at grails.plugin.springsecurity.rest.RestAuthenticationFilter.doFilter(RestAuthenticationFilter.groovy:143)
at grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter.doFilter(MutableLogoutFilter.java:82)
at com.brandseye.cors.CorsFilter.doFilter(CorsFilter.java:82)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
ConstraintViolationException … so check the constraints on your domain object versus the data you are trying to save.
following exception occured.
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:33)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1117)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:350)
at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2416)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2450)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2235)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:818)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
Caused by: java.net.SocketException: Unable to open connection to the instance: project-A:dba
at com.mysql.jdbc.GoogleCloudSqlSocket.<init>(GoogleCloudSqlSocket.java:48)
at com.mysql.jdbc.GoogleCloudSqlSocketFactory.connect(GoogleCloudSqlSocketFactory.java:81)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:300)
... 44 more
Caused by: java.io.FileNotFoundException: /cloudsql/project-A:dba(No such file or directory)
at java.io.RandomAccessFile.open(Native Method)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:247)
at java.io.RandomAccessFile.<init>(RandomAccessFile...(length 8379)
I have two GAE/J project and both refer same google cloud sql instance.
ex)
project-A(gae/j) use project-A:dba(cloudsql)
project-B(gae/j) use project-A:dba(cloudsql)
such exception occured in project-B.
db connection setting is following.
////(in project-B's java file)//////
String url = "jdbc:google:mysql://"+ "project-B" + ":db/db1";
Connection con = DriverManager.getConnection(url, properties);
////
this is bug? or any mistake?
If the Cloud SQL instance is the same for both projects, then the "project X" used as a qualifier of the instance, must be the same for both applications. This is the project name under which the Cloud SQL instance was created.
The DB host is built in Java as "jdbc:google:mysql://your-project-id:your-instance-name/"
According to your example, it would be "project-A:db/".
Don't forget to authorize your project-B app to access the Cloud SQL instance.
Is it possible to import data from Cassandra into Apache Solr?
I am currently importing data from MySQL into Apache Solr using Solr's dataimporthandler. Is it possible to use Cassandra in place of MySQL?
Update 1:
I tried to connect to Cassandra from a simple Java program using the JDBC driver given here (https://code.google.com/a/apache-extras.org/p/cassandra-jdbc/). My idea was, if the java code works, Solr should also be to import from Cassandra. But it didn't work and I got the following error:
log4j:WARN No appenders could be found for logger (org.apache.cassandra.cql.jdbc.CassandraDriver).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/cassandra/cql/jdbc/AbstractJdbcType
at org.apache.cassandra.cql.jdbc.CassandraConnection.(CassandraConnection.java:146)
at org.apache.cassandra.cql.jdbc.CassandraDriver.connect(CassandraDriver.java:92)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:270)
at CqlConnection.main(CqlConnection.java:14)
Caused by: java.lang.ClassNotFoundException: org.apache.cassandra.cql.jdbc.AbstractJdbcType
at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 5 more
Disclaimer - Never tried this, so cannot vouch for performance etc :)
Solr's DataImportHandler contrib uses JDBC to connect to a relational data source. Here is the official Solr Wiki about configuring JDBC
Now, for Cassandra, you could use the Cassandra-jdbc driver and setup your DIH config to have SQL that this driver supports.
Please note:
- I have not used Cassandra-jdbc in a production setup, so there might be shortcomings that you may want to consider piloting on.
- As mentioned above, I do not know the performance aspect as well - will recommend you spike it out.
Please post back any findings!
I'm running Sonarqube4.0 and PostgreSQL9.3 database and the sonarqube-runner2.3 on different servers.
Connectivity between Sonarqube and Postgresql database is fine as I can get to the console http://[sonar-host]:9000, login change password and do all activities. I can also see the tables created under my schema in the database
The issue I have is with the sonar-runner. When I run sonar-runner from my source directory I get the below Exception:
09:52:21.736 DEBUG - To prevent a memory leak, the JDBC Driver [org.postgresql.Driver] has been forcibly deregistered
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 2.791s
Final Memory: 5M/220M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
org.sonar.runner.impl.RunnerException: Unable to execute Sonar
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
at org.sonar.runner.api.Runner.execute(Runner.java:90)
at org.sonar.runner.Main.executeTask(Main.java:70)
at org.sonar.runner.Main.execute(Main.java:59)
at org.sonar.runner.Main.main(Main.java:41)
Caused by: Unknown database status: FRESH_INSTALL
I know there is a similar post on stack overflow but, all the properties file have the correct URLs usernames and passwords
sonar-project.properties:
sonar.host.url=http://[sonar-host]:9000
sonar.jdbc.url=jdbc:postgresql://[dbhost]:5432/sonarqube-sit
sonar.jdbc.username=sonarqube-sit
sonar.jdbc.password=xEgIVeyr0kw1
sonar.jdbc.schema=sonarqubesit
sonar.jdbc.driverClassName=org.postgresql.Driver
sonar.login=admin
sonar.password=7nQ36mrnk0UCsX1
sonar.properties:
sonar.jdbc.username=sonarqube-sit
sonar.jdbc.password={aes}ftWqQkON7XUqwNmJyHqzJA==
sonar.jdbc.url=jdbc:postgresql://[dbhost]:5432/sonarqube-sit
sonar.jdbc.schema=sonarqubesit
pg_hba.conf has entry for each of the servers and users
I also get some error in postgres log as below when I run the sonar-runner:
2014-01-22 09:52:21 GMT ERROR: relation "schema_migrations" does not exist at character 15
2014-01-22 09:52:21 GMT STATEMENT: select * from schema_migrations
Firstly, I can see the schema_migartions table in the database under sonarqubesit schema. And Secondly, I don't know why its trying to use schema_migrations? as I'm not migrating to a different schema?
Can anyone help me resolve this please. I'm assuming it is something to do with the way the schema is defined in sonar-runner properties, but I can't see anything obvious.
I resolved the issue by deleting the database and re-creating it. But didn't create a new schema.
Also re-installed Sonarqube and used the default 'public' schema i.e. left the property sonar.jdbc.schema commented(#) under sonar.properties