I am not able to get meta information for Sybase 12 database. I am using jconnect4 jar file. I am getting below error:
java.sql.SQLException: JZ0SJ: Metadata accessor information was not found on this database. Please install the required tables as mentioned in the jConnect documentation.
at com.sybase.jdbc4.jdbc.SybConnection.getAllExceptions(Unknown Source)
at com.sybase.jdbc4.jdbc.SybConnection.handleSQLE(Unknown Source)
at com.sybase.jdbc4.jdbc.SybConnection.a(Unknown Source)
at com.sybase.jdbc4.jdbc.SybConnection.if(Unknown Source)
at com.sybase.jdbc4.jdbc.SybConnection.getMetaData(Unknown Source)
I also tried to use jconnect3 jar, sajsbc4 jar but not able to resolve this error. How can I solve this error?
Related
i keep on getting the following error when ever i try to run my code to check connection between java code and db.
java.sql.SQLException: No suitable driver found for jdbc:sqlserver://192.168.1.100
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at StoredProcedure.main(StoredProcedure.java:19)
There's not really enough information here to help you. Check out this question for a good example on how to pose your question, and possibly find an answer.
Its' showing No suitable driver found. Check your jdk compatible driver version with sql server.
Check system requirements here
Both jdk 7 and jdk 8 compatible jar file
Hi I am unable to connect to database from cmd, there is a problem in establishing a connection. I am using DB2 10.5 version client. Databse is on 10.5 server (Triend with db on 9.7 version server too).
I get the below excpetion :
com.ibm.db2.jcc.am.SqlException: [jcc][4038][12241][3.69.24] T2LUW exception: SQL1042C An unexpected system error occurred. SQLSTATE=58004
ERRORCODE=-1042, SQLSTATE=58004
at com.ibm.db2.jcc.am.gd.a(Unknown Source)
at com.ibm.db2.jcc.am.gd.a(Unknown Source)
at com.ibm.db2.jcc.am.gd.a(Unknown Source)
at com.ibm.db2.jcc.uw.UWExceptionGenerator.a(Unknown Source)
at com.ibm.db2.jcc.uw.UWExceptionGenerator.a(Unknown Source)
at com.ibm.db2.jcc.uw.UWConnection.a(Unknown Source)
at com.ibm.db2.jcc.uw.f.b(Unknown Source)
at com.ibm.db2.jcc.uw.UWConnection.a(Unknown Source)
at com.ibm.db2.jcc.uw.UWConnection.a(Unknown Source)
at com.ibm.db2.jcc.uw.UWConnection.<init>(Unknown Source)
at com.ibm.db2.jcc.DB2SimpleDataSource.getConnection(Unknown Source)
at com.ibm.db2.jcc.DB2SimpleDataSource.getConnection(Unknown Source)
at com.ibm.db2.jcc.DB2Driver.connect(Unknown Source)
at com.ibm.db2.jcc.DB2Driver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at DBOperation.setConnection(DBOperation.java:38)
at DBOperation.<init>(DBOperation.java:11)
at VTLoadStandard.main(VTLoadStandard.java:237)
Please help on resolving the issue.
Have a look at the manual entry for this error message.
It may be that your database configuration needs to be upgraded.
Explanation
A system error occurred. Some possible reasons for this error are:
The database manager is not installed correctly or the environment is not set up correctly.
On UNIX-based systems, db2iupdt may need to be run in order to update the DB2 instance to enable acquisition of a new system
configuration or access to function associated with the installation
or removal of certain product options, FixPaks, or modification
levels.
You might get this message if you are not using the correct DB2 Administration Server password.
There is more information about the error at the page I linked above.
You should check the contents of the DB2 diagnostics log file (db2diag.log) on the server side. The JDBC driver itself usually does not raise errors of such type, so there must be something wrong on the server.
For me the following helped: make sure you set the driver type 4.
db2datasource.setDriverType(4);
// put driverType=4; into the jdbc url
I have moved my project into my webapps directory under the tomcat 6.0 directory and am running this under the updated url using port 8080.
Has anyone ever seen this error?
**java.lang.UnsatisfiedLinkError: Native Library D:\oracle\product\10.2.0\client_1\BIN\ocijdbc10.dll already loaded in another classloader**
java.lang.ClassLoader.loadLibrary0(Unknown Source)
java.lang.ClassLoader.loadLibrary(Unknown Source)
java.lang.Runtime.loadLibrary0(Unknown Source)
java.lang.System.loadLibrary(Unknown Source)
oracle.jdbc.driver.T2CConnection$1.run(T2CConnection.java:3147)
java.security.AccessController.doPrivileged(Native Method)
oracle.jdbc.driver.T2CConnection.loadNativeLibrary(T2CConnection.java:3143)
oracle.jdbc.driver.T2CConnection.logon(T2CConnection.java:221)
oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:441)
oracle.jdbc.driver.T2CConnection.<init>(T2CConnection.java:132)
oracle.jdbc.driver.T2CDriverExtension.getConnection(T2CDriverExtension.java:78)
oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
java.sql.DriverManager.getConnection(Unknown Source)
java.sql.DriverManager.getConnection(Unknown Source)
I am curious to find out what the first line of this stack trace is.
What does this mean?
Please let me know if more information is required from my program.
Thank you in advance.
Sonny
As error saying - you can not load dll lirary from two separate class loaders. Most likely you have two separate Web Applications using connection to Oracle.
Please try to move oracle library jar to Tomcat shared/lib folder, so library will be loaded only once by Tomcat Common Class Loader.
Hello all I solved my own issue. I had to change the path of the oracle database to a jdbc thin client url as opposed to directly connecting to the oracle database.
originally I was using the statement: intfdb.JDBCOCIDRV=jdbc:oracle:oci:#GPSTRKPD.na.jnj.com
to connect which was causing the error.
I change my statement to: jdbc:oracle:thin:#psgtwp0.na.jnj.com:1531:gpstrkpd and it works fine now. Thanks for all of your input.
Sonny
I am using AWS Elasti Beanstalk to power one of my apps. In this I need to export a svg document to png,jpg, pdf etc. For this I use Apache Batik library. This provides excellent output on my local dev workstation but as soon as I deploy it on the EBS I start getting errors, all related to fonts.
The error stacktrace was -
Caused by: java.lang.Error: Probable fatal error:No fonts found.
at sun.font.FontManager.getDefaultPhysicalFont(FontManager.java:1088)
at sun.font.FontManager.initialiseDeferredFont(FontManager.java:960)
at sun.font.FontManager.findOtherDeferredFont(FontManager.java:899)
at sun.font.FontManager.findDeferredFont(FontManager.java:916)
...
at sun.font.FontManager.findFont2D(FontManager.java:1904)
at sun.font.FontManager.initialiseDeferredFonts(FontManager.java:792)
at sun.java2d.SunGraphicsEnvironment.loadFonts(SunGraphicsEnvironment.java:468)
at sun.awt.X11GraphicsEnvironment.loadFonts(X11GraphicsEnvironment.java:925)
at sun.java2d.SunGraphicsEnvironment.loadFontFiles(SunGraphicsEnvironment.java:498)
at sun.java2d.SunGraphicsEnvironment.getInstalledFontFamilyNames(SunGraphicsEnvironment.java:721)
at sun.java2d.SunGraphicsEnvironment.getAvailableFontFamilyNames(SunGraphicsEnvironment.java:746)
at sun.java2d.SunGraphicsEnvironment.getAvailableFontFamilyNames(SunGraphicsEnvironment.java:773)
at sun.java2d.HeadlessGraphicsEnvironment.getAvailableFontFamilyNames(HeadlessGraphicsEnvironment.java:99)
at org.apache.batik.gvt.font.FontFamilyResolver.(FontFamilyResolver.java:74)
at org.apache.batik.bridge.SVGTextElementBridge.getFontList(SVGTextElementBridge.java:1529)
at org.apache.batik.bridge.SVGTextElementBridge.getAttributeMap(SVGTextElementBridge.java:1610)
at org.apache.batik.bridge.SVGTextElementBridge.fillAttributedStringBuffer(SVGTextElementBridge.java:902)
at org.apache.batik.bridge.SVGTextElementBridge.buildAttributedString(SVGTextElementBridge.java:856)
at org.apache.batik.bridge.SVGTextElementBridge.computeLaidoutText(SVGTextElementBridge.java:636)
at org.apache.batik.bridge.SVGTextElementBridge.buildGraphicsNode(SVGTextElementBridge.java:292)
at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:224)
at org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:171)
at org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:82)
at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(SVGAbstractTranscoder.java:208)
at org.apache.batik.transcoder.image.ImageTranscoder.transcode(ImageTranscoder.java:92)
at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(XMLAbstractTranscoder.java:142)
at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(SVGAbstractTranscoder.java:156)
So I tried installing fonts as one other stackoverflow answer suggests. But this gave me a new error stacktrace -
Caused by: java.lang.NoClassDefFoundError:
Could not initialize class org.apache.batik.gvt.font.FontFamilyResolver
at org.apache.batik.bridge.SVGTextElementBridge.getFontList(Unknown Source)
at org.apache.batik.bridge.SVGTextElementBridge.getAttributeMap(Unknown Source)
at org.apache.batik.bridge.SVGTextElementBridge.fillAttributedStringBuffer(Unknown Source)
at org.apache.batik.bridge.SVGTextElementBridge.buildAttributedString(Unknown Source)
at org.apache.batik.bridge.SVGTextElementBridge.computeLaidoutText(Unknown Source)
at org.apache.batik.bridge.SVGTextElementBridge.buildGraphicsNode(Unknown Source)
at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source)
at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
at org.apache.batik.bridge.GVTBuilder.build(Unknown Source)
at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(Unknown Source)
at org.apache.batik.transcoder.image.ImageTranscoder.transcode(Unknown Source)
at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(Unknown Source)
at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(Unknown Source)
I dont understand why is this happening. Then I set System.setProperty("java.awt.headless", "true"); just before I make a call to batik's transcoder. But this also generate the above error message. I am running out of options.
Am I missing something? Can I do anything to add more context to this? Thanks for the help.
I added the following dependency to my maven pom.xml file, and it seems to have made the class available for use:
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-gvt</artifactId>
<version>1.7</version>
</dependency>
Note, however, that the fonts that it maps to don't always have the same dimensions as the MS core fonts (arial, times new roman, etc.) so can look kind of blocky or different than the ones they're replacing.
I finally resolved this problem by installing Sun JDK & using it to power my tomcat server.
After upgrading to the latest java version (Java 6 update 13) a webstart application that was being used in production environments for many years, stopped installing with the following error:
java.lang.Exception: cache failed forhttp://localhost:8080/ReactorStudio/studio/installer.jnlp
at com.sun.javaws.Launcher.updateFinalLaunchDesc(Unknown Source)
at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
at com.sun.javaws.Launcher.launch(Unknown Source)
at com.sun.javaws.Main.launchApp(Unknown Source)
at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
at com.sun.javaws.Main$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
The application jnlp is downloaded correctly and all the associated jar files. The application also contains a reference to an installer jnlp file that extracts a few files to the local disk the first the application is being run.
Any ideas on what is the problem, or how I could bypass this?
We had a similar issue when upgrading to the latest JRE. Our issue seemed to be related to this bug that should be fixed in 6u14. Perhaps your issue is also related.
The only workaround we found was to clear the webstart cache and launch the application again. In our experience this seems to be the solution to most webstart issues.
Try to remove href="..." from the "jnlp" tag of the "launch.jnlp" file.